-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent duplicate labels in
:alpha
style
This implements a stateful `AlphaStyle` that disambiguates the labels for the bibliography by appending a suffix "a", "b", etc. This emulates the behavior of the numeric citation style in LaTeX. The existing `:alpha` style is automatically upgraded to the new `AlphaStyle`. It's a lot easier for users to pass `style=:alpha` than to instantiate the full `AlphaStyle`, in particular because `AlphaStyle` needs access to all the entries of the `.bib` file (so instantiating in manually would end up reading the `.bib` file twice). Moreover, there's no reason anyone would ever want to use the old "dumb" `:alpha` style. In addition to the new `AlphaStyle`, this also fixes some inconsistencies relative to the alphabetic citation style in LaTeX: * Up to four names are included in the label, not 3 (but 5 or more names results in 3 names and "+") * The first letter of a "particle" of the name is included in the label, e.g. "vWB08" for a first author "von Winckel"
- Loading branch information
Showing
13 changed files
with
344 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
\documentclass[aps,pra,onecolumn,noshowpacs,superscriptaddress,preprintnumbers,% | ||
kamsmath,amssymb,notitlepage,letterpaper]{revtex4-2} | ||
|
||
\def\Author{Michael Goerz} | ||
\def\Title{Demo of the standard RevTeX numeric citation style} | ||
|
||
\usepackage{natbib} | ||
\usepackage[utf8]{inputenc} | ||
\usepackage{caption} | ||
\captionsetup{justification=raggedright, singlelinecheck=true} | ||
\usepackage[ | ||
pdftitle={\Title}, | ||
pdfauthor={\Author}, | ||
colorlinks=true, linkcolor=black, urlcolor=black, citecolor=black, | ||
bookmarksopen=false, breaklinks=true, plainpages=false, pdfpagelabels | ||
]{hyperref} | ||
|
||
\begin{document} | ||
|
||
\title{\Title} | ||
\author{\Author} | ||
\date{\today} | ||
|
||
\maketitle | ||
|
||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
|
||
\begin{itemize} | ||
\item \verb|\cite{GoerzQ2022}| renders as ``\cite{GoerzQ2022}''. | ||
\item \verb|\citet{GoerzQ2022}| renders as ``\citet{GoerzQ2022}''. | ||
\item \verb|\citep{GoerzQ2022}| renders as ``\citep{GoerzQ2022}''. | ||
\item \verb|\cite[Eq.~(1)]{GoerzQ2022}| renders as ``\cite[Eq.~(1)]{GoerzQ2022}''. | ||
\item \verb|\citet[Eq.~(1)]{GoerzQ2022}| renders as ``\citet[Eq.~(1)]{GoerzQ2022}''. | ||
\item \verb|\citep[Eq.~(1)]{GoerzQ2022}| renders as ``\citep[Eq.~(1)]{GoerzQ2022}''. | ||
\item \verb|\citet*{GoerzQ2022}| renders as ``\citet*{GoerzQ2022}''. | ||
\item \verb|\citep*{GoerzQ2022}| renders as ``\citep*{GoerzQ2022}''. | ||
\item \verb|\citet*[Eq.~(1)]{GoerzQ2022}| renders as ``\citet*[Eq.~(1)]{GoerzQ2022}''. | ||
\item \verb|\citep*[Eq.~(1)]{GoerzQ2022}| renders as ``\citep*[Eq.~(1)]{GoerzQ2022}''. | ||
\item \verb|\citet{WinckelIP2008}| renders as ``\citet{WinckelIP2008}''. | ||
\item \verb|\Citet{WinckelIP2008}| renders as ``\Citet{WinckelIP2008}''. | ||
\item \cite{GraceJMO2007}, \cite{GraceJPB2007}, \cite{GrondPRA2009a}, and \cite{GrondPRA2009b} | ||
\end{itemize} | ||
|
||
Further commands that we do not support in markdown: | ||
|
||
\begin{itemize} | ||
\item \verb|\citenum{GoerzQ2022}| renders as ``\citenum{GoerzQ2022}''. | ||
\item \verb|\citealt{GoerzQ2022}| renders as ``\citealt{GoerzQ2022}''. | ||
\item \verb|\citealp{GoerzQ2022}| renders as ``\citealp{GoerzQ2022}''. | ||
\item \verb|\citealt*{GoerzQ2022}| renders as ``\citealt*{GoerzQ2022}''. | ||
\item \verb|\citealp*{GoerzQ2022}| renders as ``\citealp*{GoerzQ2022}''. | ||
\item \verb|\citealt*[Eq.~(1)]{GoerzQ2022}| renders as ``\citealt*[Eq.~(1)]{GoerzQ2022}''. | ||
\item \verb|\citealp*[Eq.~(1)]{GoerzQ2022}| renders as ``\citealp*[Eq.~(1)]{GoerzQ2022}''. | ||
\item \verb|\Citealt{WinckelIP2008}| renders as ``\Citealt{WinckelIP2008}''. | ||
\item \verb|\Citealp{WinckelIP2008}| renders as ``\Citealp{WinckelIP2008}''. | ||
\end{itemize} | ||
|
||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
|
||
\bibliographystyle{alpha} | ||
\bibliography{../src/refs} | ||
|
||
\end{document} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.