Citing mathoverflow answers using \bibitem(without using bibtex) - latex

Is there a way to cite mathoverflow answers using the following :
\begin{thebibliography}
\bibitem ....the mathoverflow citation
\end{thebibliography}
I did the following :
\documentclass[11pt]{amsart}
\setlength{\textheight}{23cm}
\setlength{\textwidth}{16cm}
\setlength{\topmargin}{-0.8cm}
\setlength{\parskip}{0.3\baselineskip}
\hoffset=-1.4cm
\usepackage{pifont}
\usepackage{amsmath,amscd,amssymb}
\usepackage{hyperref}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{conjecture}[subsection]{Conjecture}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{remark}[theorem]{Remark}
\numberwithin{equation}{section}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{corollary}[theorem]{Corollary}
\renewcommand{\thefootnote}{\arabic{footnote}}
\input xy
\xyoption{all}
\begin{document}
some text \cite{MO1}
\begin{thebibliography}{1}
\bibitem{MO1} gowers (\url{https://mathoverflow.net/users/1459/gowers}), Examples of common false beliefs in mathematics, URL (version: 2020-09-03): \url{https://mathoverflow.net/q/23478}
\end{thebibliography}
\end{document}
I know that there are ways to do it using bibtex and creating a separate .bib file. But I was thinking whether we could do it just using \bibitem?
Any help from anyone is welcome.

You could copy the rendered citation from the top of the cite popup:
With some tiny modifications, like wrapping the urls into suitable macros, you can directly use this in your bibliography:
\documentclass{article}
\usepackage{hyperref}
\begin{document}
\begin{thebibliography}{1}
\bibitem{gowers} gowers (\url{https://mathoverflow.net/users/1459/gowers}), Examples of common false beliefs in mathematics, URL (version: 2020-09-03): \url{https://mathoverflow.net/q/23478}
\end{thebibliography}
\end{document}

Related

Overleaf/Latex. How do I add APA 6th edition citation style?

[EDIT]
I am having issues changing the citation style to my document. I am currently working with this preamble. There are a lot of packages, but I need them to organise the entire file. The current code works ok, but the citation style is not correct. I need to change it to apa 6th edition.
Preamble:
\documentclass[11pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{helvet}
\usepackage{xspace}
\usepackage{subcaption}
\usepackage{placeins}
\usepackage{wrapfig}
\usepackage{multirow}
\usepackage[table,xcdraw]{xcolor}
\usepackage{adjustbox}
\usepackage{booktabs,caption}
\usepackage[flushleft]{threeparttable}
\usepackage{ragged2e}
\usepackage{floatrow}
\usepackage{graphicx,wrapfig,lipsum}
\graphicspath{{../figs/}}
\usepackage{pdfcomment}
\usepackage{geometry}
\newgeometry{left=2.5cm,right=2.5cm,bottom=2.5cm}
\usepackage[english]{babel}
\usepackage{CJKutf8}
\pagestyle{headings}
\usepackage{blindtext}
\usepackage{csquotes}
\setcounter{secnumdepth}{4}
\usepackage{titlesec}
\usepackage[T1]{fontenc}
\usepackage{imakeidx}
\makeindex[columns=3, title=Alphabetical Index]
\usepackage{array}
\usepackage{tikzpagenodes}
\usepackage[format=plain, labelfont={bf,it}, textfont=it]{caption}
\usepackage{fancyhdr}
\usepackage[toc,nopostdot, nonumberlist,style=long,automake,acronym]{glossaries}
\usepackage{subfiles}
\usepackage{nicematrix}
\usepackage{amsmath,mathabx}
\usepackage{hyperref}
\usepackage{lscape}
\newcommand{\sectionbreak}{\phantomsection}
\hypersetup{
colorlinks=true,
linkcolor=black,
filecolor=black,
urlcolor=black,
citecolor=olive,
pdftitle={PhD Dissertation},
pdfpagemode=FullScreen,
}
\urlstyle{same}
%\bibliographystyle{abbrvnat}
%\usepackage[authoryear]{natbib}%/bibliography apa
%\setcitestyle{authoryear,open={(},close={)}} %Citation-related commands
The bibliography file called bib.bib
Example:
#article{henriquez_alternative_2017,
title = {An alternative objective microscopic method for the identification of linear enamel hypoplasia ({LEH}) in the absence of visible perikymata},
volume = {14},
doi = {10.1016/j.jasrep.2017.05.040},
journal = {Journal of Archaeological Science: Reports},
author = {Henriquez, Alejandra Cares and Oxenham, Marc F.},
year = {2017},
pages = {76--84},
file = {Full Text:C\:\\Users\\xello\\Zotero\\storage\\MV7QMSWQ\\Henriquez and Oxenham - 2017 - An alternative objective microscopic method for th.pdf:application/pdf},
}
Example of text citing something
\begin{document}
\begin{CJK*}{UTF8}{min}
\citep{henriquez_alternative_2017}, \citet{henriquez_alternative_2017}.
\end{CJK*}
\end{document}
I need to change the citation style to apa6: https://www.ctan.org/pkg/apa6. When Io tried to add this package. It entered into conflict with other packages like titlesec and amsmath, mathabx.
I get errors like
...ex/titlesec/titlesec.sty, 1642. Argument of \subparagraph has an
extra }. or Runaway argument?
or
eric/mathabx/mathabx.sty, 67. Latex Error: Too many symbol fonts
declared.
respectively.
I am not sure how to add this citation style to my current project. Maybe there is an alternative way? I need the packages I am using (like titlesec) to order my document.
Any help will be welcomed.
Thank you,
[EDIT] Solved it. I used Biblatex (https://ctan.org/pkg/biblatex-apa6?lang=en) which also has an apa6 option. Solved additional errors. Works well.

Citation undefined on input even though they exist

Hi I'm using Overleaf for my dissertation and this warning started popping up recently:
Citation 'objprogen' on page 1 undefined on input line 8.
This citation is already created as seen below in the 'sources.bib' file:
#article{objprogen,
author={Guo, Wenzhong and Lin, Renjie and Wang, Shiping and Xiong, Neal},
booktitle={2018 9th International Symposium on Parallel Architectures, Algorithms and
Programming (PAAP)},
title={Object Proposal Generation for Unsupervised Object Localization},
year={2018},
volume={},
number={},
pages={235-242},
doi={10.1109/PAAP.2018.00046}}
This is my main.tex file:
\documentclass[a4paper]{article}
\usepackage{blindtext, graphicx}
\usepackage{csquotes}
\usepackage[hidelinks]{hyperref}
\usepackage{url}
\usepackage[style=authoryear-ibid,backend=biber]{biblatex}
\hyphenation{op-tical net-works semi-conduc-tor}
\bibliography{sources.bib}
\begin{document}
\title{Can image recognition systems be successfully integrated with existing VIN databases
irrespective of the vehicle manufacturer}
\author{myname}
\maketitle{}
\input{includes/01-Abstract}
\input{includes/02-Introduction}
\input{includes/03-Literature}
\input{includes/04-Methodology}
\input{includes/05-Findings}
\input{includes/06-Conclusion}
\input{includes/07-Appendix}
\end{document}
I had the same problem and solved it by adding \bibliographystyle{plain} (of course you could in principle use other styles). For me the structure of the tex file is the following
\documentclass[oneside, a4paper, onecolumn, 11pt]{article}
%%some packages%%
\begin{document}
%%% some stuff
\bibliographystyle{plain}
\bibliography{bibfile} %bibfile name without the .bib extension
\end{document}
So contrary to you the \bibliography is also inside the document environment.

Use Biblatex to get an overview of the keywords from my sources

Hi I'm using LaTeX to write a literature review and BibLaTeX to print my sources and bibliography.
I would like to get an overview of all the keywords used in the articles I have gathered so far.
Since I have them all in a .bib file I figured that there probably is some easy way to get all the keywords from there that utilises BibLaTeX and the BibTeX-format of the file with the info.
From what I can gather BibLaTeX has the support for using keywords to sort the bibliography, or include/exclude certain sources based on keywords, but I can't find if or how I can print other information from the .bib than the full source. I've found \printfield in the documentation but it's not recognised when I use it in my document, even though the \textcite and the \printbibliography works fine so I'm guessing I'm using it wrong. Here's how I've tried to use it:
\documentclass[a4paper]{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
\usepackage[style=authoryear,backend=biber]{biblatex}
\addbibresource{sample.bib}
\title{Test}
\author{Me}
\begin{document}
\maketitle
\section*{Citation examples}
\parencite{Smith:2012qr}.
\printfield{keywords}
\printbibliography
\end{document}
I hope my question is clear enough.
Thank you.
Based on this question https://tex.stackexchange.com/questions/332292/listing-indexing-and-linking-keywords-in-biblatex you could use one of the packages for index creation, e.g. imakeidx:
\documentclass{article}
\begin{filecontents*}[overwrite]{\jobname.bib}
#article{Padial2010,
title={The Integrative Future Of Taxonomy},
author={Padial, J.M. and Miralles, A. and la Riva, I.D. and Vences, M.},
journal={Frontiers in Zoology},
year={2010},
volume={7},
number={16},
pages={1--14},
note={Cited by 4},
abstract={Text},
publisher={Some Publishing},
doi={10.1186/1742-9994-7-16},
issn={1742-9994},
file={./2004_Jensen_Homecoming.pdf},
keywords={biology, taxonomy},
}
#article{Padissal2010,
title={The Integrative Future Of Taxonomy},
author={Padial, J.M. and Miralles, A. and la Riva, I.D. and Vences, M.},
journal={Frontiers in Zoology},
year={2010},
volume={7},
number={16},
pages={1--14},
note={Cited by 4},
abstract={Text},
publisher={Some Publishing},
doi={10.1186/1742-9994-7-16},
issn={1742-9994},
file={./2004_Jensen_Homecoming.pdf},
keywords={math, taxonomy},
}
\end{filecontents*}
\usepackage{biblatex}
\addbibresource{\jobname.bib}
\usepackage{imakeidx}
\makeindex[name=keywords, title=List of Keywords]
\DeclareIndexFieldFormat{keywords}{\forcsvfield{\index[keywords]}{keywords}}
\AtEveryBibitem{\indexfield{keywords}}
\begin{document}
\nocite{*}
\printbibliography
\printindex[keywords]
\end{document}

Citation not getting displayed - instead the alias is getting displayed in the pdf

I am trying to use \cite to cite items from bibliography.bib. However, my citations are not working properly.
The environment, code and output are as below:
\documentclass[12pt]{article}
\usepackage{amssymb,amsmath,amsfonts,eurosym,geometry,ulem,graphicx,caption,color,setspace,sectsty,comment,footmisc,caption,pdflscape,subfigure,array,hyperref,booktabs,dcolumn,threeparttable, adjustbox,apacite,dirtytalk,multirow,tabularx,booktabs,longtable,lscape,placeins,tikz}
\usepackage[backend=biber,natlib,style=author-year,citestyle=authoryear]{biblatex}
\usepackage{ulem}
\usepackage{float}
\restylefloat{table}
\usepackage{pgfplots}
\pgfplotsset{width=12cm,compat=1.9}
\usepackage{pst-func}
\psset{unit=2cm}
\usepackage{hyperref}
\hypersetup{colorlinks=true,urlcolor=blue,citecolor=blue,linkcolor=red}
\usepackage[center]{caption}
\usepackage{setspace}
\usepackage{epsfig}
\usepackage{graphics}
\usepackage{lscape}
\usepackage[english]{babel}
\usepackage{color}
\addbibresource{bibfile.bib}
\begin{document}
This is a \cite{sample}.
\end{document}
The cite takes reference from my .bib file, which is in the same folder. Here I have attached a sample citation.
#article{sample,
title={What is the price elasticity of housing demand?},
author={Hanushek, Eric A and Quigley, John M},
journal={The Review of Economics and Statistics},
pages={449--454},
year={1980},
publisher={JSTOR}
}
The output that I am getting looks like
Author Year with year linking to the bibliography section. However, I want it like Author, Year with the entire phrase linking to the bibliography section
Could you please help me with this issue?
Thank You :)
P.S. : I know my environment is not perfect. It has some packages repeated twice. :)
NEVER IGNORE ERROR MESSAGES! After an error, latex only recovers enough to syntax check the rest of the document. There is no point at even looking at what might or might not be valid output while there are still errors!
There are several major problems:
don't load packages multiple times and in particular don't load them multiple times with different options. An error message in the log file will explicitly tell you about the option clash
don't load incompatible package like apacite and biblatex in the same document. An error message in the log file with explicitly tell you that these two packages are not compatible
the biblatex option is called natbib, not natlib. An error message will explicitly tell you that it does not know the option natlib
the biblatex style is called authoryear, not author-year. An explicit error message will tell you that author-year style is not found
... and then there are many other duplicate, unnecessary or obsolete packages. You should clean up your preamble and only load the packages you need. Also hyperref should be loaded after the other packages.
\documentclass[12pt]{article}
\usepackage{amssymb,amsmath,amsfonts,eurosym,geometry,ulem,graphicx,caption,color,setspace,sectsty,comment,footmisc,caption,pdflscape,subfigure,array,
%hyperref,
booktabs,dcolumn,threeparttable, adjustbox,
%apacite,
dirtytalk,multirow,tabularx,booktabs,longtable,
%lscape,
placeins,tikz}
\usepackage[backend=biber,natbib,style=authoryear,citestyle=authoryear]{biblatex}
%\usepackage{ulem}
\usepackage{float}
\restylefloat{table}
\usepackage{pgfplots}
\pgfplotsset{width=12cm,compat=1.9}
\usepackage{pst-func}
\psset{unit=2cm}
%\usepackage{hyperref}
%\usepackage[center]{caption}
%\usepackage{setspace}
%\usepackage{epsfig}
%\usepackage{graphics}
%\usepackage{lscape}
\usepackage[english]{babel}
%\usepackage{color}
\usepackage{hyperref}
\hypersetup{colorlinks=true,urlcolor=blue,citecolor=blue,linkcolor=red}
\begin{filecontents*}[overwrite]{\jobname.bib}
#article{sample,
title={What is the price elasticity of housing demand?},
author={Hanushek, Eric A and Quigley, John M},
journal={The Review of Economics and Statistics},
pages={449--454},
year={1980},
publisher={JSTOR}
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
This is a \cite{sample}.
\end{document}

Adding bibliography to appendices in latex

I am writing my thesis and I am using the chapterbib option. While it makes beautiful bibliographies for my chapters, I can't get it to do the same thing for my appendices.
The preamble:
\documentclass[pdftex, 11pt, onecolumn, openany]{report}
\usepackage{amsmath}
\usepackage[pdftex]{graphicx}
\usepackage{appendix}
\usepackage[sectionbib]{chapterbib}
\usepackage{chapterbib}
\begin{document}
...
\include{background}
\include{ATRPcomp}
\include{CCTcomp}
\appendix
\include{AppCCT}
\end{document}
In each of my chapter sections and appendix I have:
\chapter{Compartmentalization in Catalytic Chain Transfer}
...
\bibliography{references}
Does the chapterbib also work for appendices or is there another option that could help?
I assume the package to work also within the appendix. I fact, when you issue the command \appendix the sectioning commands' behavior is the same, except for the numbering (and perhaps the heading).
In the main matter, the chapter command
\chapter{CCTcomp}
gives you
7 CCtcomp
(7 is an example). The commands sequence
\appendix
\chapter{AppCCT}
gives you
A AppCCT
The bibliography shoud work properly.

Resources