-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LaTeX writer: avoid error on
refs
div with empty citations.
If there are no citations, don't emit an empty CSLReferences environment. Closes #10185.
- Loading branch information
Showing
2 changed files
with
47 additions
and
2 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,44 @@ | ||
``` | ||
% pandoc -t latex --citeproc | ||
Lorem ipsum | ||
# References | ||
::: #refs | ||
::: | ||
^D | ||
Lorem ipsum | ||
\section{References}\label{references} | ||
``` | ||
|
||
``` | ||
% pandoc -t latex --citeproc | ||
--- | ||
references: | ||
- id: foo | ||
type: book | ||
title: The Title | ||
author: John Doe | ||
... | ||
Lorem ipsum [@foo]. | ||
# References | ||
::: #refs | ||
::: | ||
^D | ||
Lorem ipsum (John Doe, n.d.). | ||
\section{References}\label{references} | ||
\phantomsection\label{refs} | ||
\begin{CSLReferences}{1}{0} | ||
\bibitem[\citeproctext]{ref-foo} | ||
John Doe. n.d. \emph{The Title}. | ||
\end{CSLReferences} | ||
``` | ||
|