-
Notifications
You must be signed in to change notification settings - Fork 7
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. To enable the generating of unique labels, there is a new internal `init_bibliography!` function that is called at the beginning of the `ExpandBibliography` pipeline step. The existing `:alpha` style is automatically upgraded to the new `AlphaStyle`. It's just easier for users to pass `style=:alpha` than to instantiate the full `AlphaStyle`. 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
15 changed files
with
426 additions
and
27 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
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
Oops, something went wrong.