Augment latex citation with specific table (or figure) reference - latex

How do I include a specific table within a latex citation, i.e., what's the syntax? In other words, I'd like to cite table 11.1 in the "Handbook of Hydrology" by David Maidment. In my BibTex text file, the reference is:
#book{maidment1993,
Author = {Maidment, David R},
Isbn = {0-07-039732-5},
Publisher = {McGraw-Hill},
Address = {New York, USA},
Title = {Handbook of Hydrology},
Year = {1993}}
and so in the tex file that invokes this reference, it's easy enough to add ...\citep{maidment1993}..., but if I want the output to also include table 11.1, as in "...(Table 1.1; Maidment, 1993)." and not merely "(Maidment, 1993)", how do I do that in the .tex file? I tried \citep{Table 11.1 maidment1993}, but not surprisingly, that doesn't work.

You can add the table as optional argument. For example with biblatex:
\documentclass{article}
\usepackage{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}
\cite[Table 11.1]{knuth:ct}
\printbibliography
\end{document}

Related

Glossaries in TableOfContents with number

The title basically explains it. I want to use the package glossaries and include a number in the table of contents, e. g. 8 Glossary instead of Glossary, This code achives this without a number:
\usepackage[utf8]{inputenc}
\usepackage[toc]{glossaries}
\newglossaryentry{Android}
{
name=Anroid,
description={Das Betriebssystem der meisten Smartphones.}
}
\makeglossaries
(...)
\printglossary
Im just using the default setup on Manjaro wit TexMaker.
Any idea?

LaTEX: changing the format of citation in References to list authors' last name first

It seems the format in the Reference section is a little off! Can you please show me how to format the citation to list authors' last name first?
Thanks all.
Here is the current form in the Reference section:
C. B. Grimmond, A. Isard, and J. Belding. Development and evaluation of
continuously weighing mini-lysimeters. Agricultural and Forest Meteorology,
62(3-4):205{218, 1992.
I use BibDesk to organize the citation database. Here is what I am using in the TeXstudio:
\documentclass[]{article}
\usepackage[pdftex]{graphicx}
\usepackage[round]{natbib}
\begin{document}
\bibliographystyle{plainnat}
\bibliography{/Users/me/Citation/citation}
\end{document}
You can try to change the Bibtex Bibliography style to 'acm' or 'apalike'
\bibliographystyle{stylename}
\bibliography{bibfile}
Read more about other styles: https://www.sharelatex.com/learn/Bibtex_bibliography_styles

Add journal name to biblatex references, journal names not showing up

I'm using biblatex in a beamer presentation so that I can use the \footcite command. The problem is that bibliography styles handling in biblatex don't look quite straighforward and none of the default styles will actually work for me since they do not show Journal references.
I'm looking for something similar as .bst files for Bibtex, since I can have JPC and PRL, PR bibliography styles. I surfed the internet and this stackexchange but couldn't find a proper solution. Could somebody provide me a working example with a style which shows: Authors, Year, Journal?
Best regards
The following code (authoryear style) does not show journal. Alphabetic, numeric etc only produces blank references.
MWE:
\documentclass[8pt mathserif]{beamer}
\usepackage{beamerthemesplit}
\usepackage{latexsym}
\usepackage{eurosym}
\usepackage[english]{babel}
\usepackage{ae,aecompl}
\usepackage{graphicx}
\usepackage{amsfonts}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage[style=authoryear]{biblatex}
\addbibresource{library.bib}
\usetheme{Madrid}
\title[]{Title}
\author[]{author}
\institute{MSE # NTU\\
The Zhao Research Group\\
}
\date[]{Thursday 31, July 2014}
\begin{document}
\section{Review of interesting phenomenology}
\begin{frame}[allowframebreaks noframenumbering]{Polaron Transformation}
\begin{itemize}
\item The original theory was developed by Munn-Silbey{\tiny \footcite{Silbey1980}\footcite{Munn1985}\footcite{Munn1985a}} and further refined by Zhao et al. \footcite{JCP1994OntheMunn}\footcite{Chen2011}
\end{itemize}
\end{frame}
\end{document}
And the library.bib file only contains entries such as the one referenced:
#article{Silbey1980,
author = {Silbey, R. and Munn, R. W.},
doi = {10.1063/1.439425},
file = {:Users/Caco/Documents/Mendeley Desktop/General theory of electronic transport in molecular crystals. I. Local linear electron–phonon coupling R. Silbey and R. W. Munn.pdf:pdf},
issn = {00219606},
journal = {The Journal of Chemical Physics},
number = {4},
pages = {2763},
title = {{General theory of electronic transport in molecular crystals. I. Local linear electron–phonon coupling}},
url = {http://scitation.aip.org/content/aip/journal/jcp/72/4/10.1063/1.439425},
volume = {72},
year = {1980}
}

LaTeX and Bibtex: command to print a single full reference from a bib file?

I'd like to be able to print a single reference from a Bibtex .bib file anywhere in my LaTeX document—not cite it, but print the reference, exactly as it would appear in the normal bibliography listing.
So if this is a regular citation, that prints a bracketed reference:
% Normal citation, appears as bracketed reference, e.g. [2]
\cite{Kawahara:2007p1116}
I want something like the following:
\print_citation{Kawahara:2007p1116}
which should print the full citation as it appears in the bibliography, something like:
[2] S Kawahara. Half rhymes in japanese rap lyrics and knowledge of similarity. Journal of East Asian
Linguistics, Jan 2007.
Is it possible?
Use \fullcite with the biblatex package as mentioned in this answer on tex.stackexchange.
bibentry package would provide inline bibliography. Ref: http://stefaanlippens.net/bibentry.
I've not tried it out myself though.
My CV uses multibib nicely:
\usepackage[resetlabels]{multibib}
% Define bibliographies.
\newcites{j,c}{Journal Publications,Conference Publications}
\begin{document}
% Stuff here.
% Publications.
\bibliographystylej{IEEEtran}
\bibliographystylec{IEEEtran}
\nocitej{journalpaperlabel1}
\nocitej{journalpaperlabel2}
\nocitec{conferencepaperlabel1}
\bibliographyj{mybib}
\bibliographyc{mybib}
% More stuff here.
\end{document}
Edited with something less self-promoting here.
See also this answer, that provides a trick using biblatex and its category system:
\documentclass{article}
\usepackage{filecontents}
\usepackage{biblatex}
\begin{filecontents*}{\jobname.bib}
#misc{Gyro2012,
author = {Gearloose, Gyro},
title = {1st paper with a very loooooooooooong title, so it spans multiple rows},
}
#misc{Gyro2013,
author = {Gearloose, Gyro},
title = {2nd paper},
}
#misc{Stark2012,
author = {Stark, Anthony Edward},
title = {3rd paper},
}
#misc{Stark2013,
author = {Stark, Anthony Edward},
title = {4th paper},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\DeclareBibliographyCategory{enumpapers}
\newcommand{\enumcite}[1]{%
\addtocategory{enumpapers}{#1}%
\defbibcheck{key#1}{
\iffieldequalstr{entrykey}{#1}
{}
{\skipentry}}%
\printbibliography[heading=none,check=key#1]%
}
\begin{document}
\nocite{*}
\begin{enumerate}
\item \enumcite{Gyro2012}
\setcounter{enumi}{9} % Two digits to test alignment
\item \enumcite{Gyro2013}
\end{enumerate}
\printbibliography[notcategory=enumpapers]
\end{document}

How to order citations by appearance using BibTeX?

By default (using the plain style) BibTeX orders citations alphabetically.
How to order the citations by order of appearance in the document?
There are three good answers to this question.
Use the unsrt bibliography style, if you're happy with its formatting otherwise
Use the makebst (link) tool to design your own bibliography style
And my personal recommendation:
Use the biblatex package (link). It's the most complete and flexible bibliography tool in the LaTeX world.
Using biblatex, you'd write something like
\documentclass[12pt]{article}
\usepackage[sorting=none]{biblatex}
\bibliography{journals,phd-references} % Where journals.bib and phd-references.bib are BibTeX databases
\begin{document}
\cite{robertson2007}
\cite{earnshaw1842}
\printbibliography
\end{document}
Change
\bibliographystyle{plain}
to
\bibliographystyle{ieeetr}
Then rebuild it a few times to replace the .aux and .bbl files that were made when you used the plain style.
Or simply delete the .aux and .bbl files and rebuild.
If you use MiKTeX you shouldn't need to download anything extra.
The best I came up with is using the unsrt style, which seems to be a tweaked plain style. i.e.
\bibliographystyle{unsrt}
\bibliography{bibliography}
However what if my style is not the default?
Just a brief note - I'm using a modified version of plain.bst sitting in the directory with my Latex files; it turns out having sorting by order of appearance is a relatively easy change; just find the piece of code:
...
ITERATE {presort}
SORT
...
... and comment it - I turned it to:
...
%% % avoid sort:
%% ITERATE {presort}
%%
%% SORT
...
... and then, after running bibtex, pdflatex, pdflatex - the citations will be sorted by order of appearance (that is, they will be unsorted :) ).
Cheers!
EDIT: just realized that what I wrote is actually in the comment by #ChrisN: "can you edit it to remove the SORT command" ;)
You answered your own question---unsrt is to be used when you want references to ne listed in the order of appeareance.
But you might also want to have a look at natbib, an extremely flexible citation package. I can not imagine living without it.
I'm a bit new to Bibtex (and to Latex in general) and I'd like to revive this old post since I found it came up in many of my Google search inquiries about the ordering of a bibliography in Latex.
I'm providing a more verbose answer to this question in the hope that it might help some novices out there facing the same difficulties as me.
Here is an example of the main .tex file in which the bibliography is called:
\documentclass{article}
\begin{document}
So basically this is where the body of your document goes.
``FreeBSD is easy to install,'' said no one ever \cite{drugtrafficker88}.
``Yeah well at least I've got chicken,'' said Leeroy Jenkins \cite{goodenough04}.
\newpage
\bibliographystyle{ieeetr} % Use ieeetr to list refs in the order they're cited
\bibliography{references} % Or whatever your .bib file is called
\end{document}
...and an example of the .bib file itself:
#ARTICLE{ goodenough04,
AUTHOR = "G. D. Goodenough and others",
TITLE = "What it's like to have a sick-nasty last name",
JOURNAL = "IEEE Trans. Geosci. Rem. Sens.",
YEAR = "xxxx",
volume = "xx",
number = "xx",
pages = "xx--xx"
}
#BOOK{ drugtrafficker88,
AUTHOR = "G. Drugtrafficker",
TITLE = "What it's Like to Have a Misleading Last Name",
YEAR = "xxxx",
PUBLISHER = "Harcourt Brace Jovanovich, Inc."
ADDRESS = "The Florida Alps, FL, USA"
}
Note the references in the .bib file are listed in reverse order but the references are listed in the order they are cited in the paper.
More information on the formatting of your .bib file can be found here: http://en.wikibooks.org/wiki/LaTeX/Bibliography_Management
I often use the bibliography style natbib because it supplies quite complete set of formats as well as tags for us.
Add this if you want the number of citations to appear in order in the document
they will only be unsorted in the reference page:
\bibliographystyle{unsrt}
I used the following in overleaf and become in ascending order:
\usepackage{cite}
\bibliographystyle{unsrt}
with unsrt the problem is the format. use \bibliographystyle{ieeetr} to get refences in order of citation in document.
If you happen to be using amsrefs they will override all the above - so comment out:
\usepackage{amsrefs}
The datatool package offers a nice way to sort bibliography by an arbitrary criterion, by converting it first into some database format.
Short example, taken from here and posted for the record:
\documentclass{article}
\usepackage{databib}
\begin{document}
% First argument is the name of new datatool database
% Second argument is list of .bib files
\DTLloadbbl{mybibdata}{acmtr}
% Sort database in order of year starting from most recent
\DTLsort{Year=descending}{mybibdata}
% Add citations
\nocite{*}
% Display bibliography
\DTLbibliography{mybibdata}
\end{document}
I use natbib in combination with bibliographystyle{apa}. Eg:
\begin{document}
The body of the document goes here...
\newpage
\bibliography{bibliography} % Or whatever you decided to call your .bib file
\usepackage[round, comma, sort&compress ]{natbib}
bibliographystyle{apa}
\end{document}

Resources