You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In CSL styles that print out the note field, ending the field with a LaTeX command causes formatting errors. I'm not sure if that is a Citeproc or Pandoc issue. Crossposted on jgm/pandoc#9582
Pandoc version: 3.1.12.2
Here's a MWE. You need a CSL style that prints out the note BibTeX field. I pasted one below (can't be attached). Or add this to any CSL file :
...
[ Div
( "ref-geach_pt:1980" , [ "csl-entry" ] , [] )
[ Para
[ SmallCaps [ Str "Geach" ]
, Str ","
, Space
, Str "Peter"
, Space
, Str "Thomas."
, Space
, Str "1980."
, Space
, Emph
[ Str "Reference"
, Space
, Str "and"
, Space
, Str "Generality:"
, Space
, RawInline (Format "latex") "\\leftarrow"
]
, Str "."
, Space
, Str "First"
, Space
, Str "edition:"
, Str ""
, RawInline (Format "latex") "\\leftarrow"
, Str ""
]
]
]
As you can see, in the note field we get empty strings instead of a space separating "edition:" from \leftarrow and a period at the end. This doesn't happen in the title.
The bug disappears if the note doesn't end up with a LaTeX command. Change the note field to:
If it ends with a LaTeX command but there are several LaTeX command, the period is there but the last LaTeX command is still preceded by an empty string. Change the note field to:
note = "first edition: \leftarrow and \rightarrow"
Now we have a period at the end, and a space before the first LaTeX command, but again an empty string before the second LaTeX command.
The colon after 'edition:' isn't the culprit, the behaviour remains when it's removed. Adding spaces at the end of the note field doesn't change anything: if the last non-space element of the note is a LaTeX command, the bug appears.
In CSL styles that print out the
note
field, ending the field with a LaTeX command causes formatting errors. I'm not sure if that is a Citeproc or Pandoc issue. Crossposted on jgm/pandoc#9582Pandoc version: 3.1.12.2
Here's a MWE. You need a CSL style that prints out the
note
BibTeX field. I pasted one below (can't be attached). Or add this to any CSL file :Bib file
test.bib
. (In our actual use case, the LaTeX commands are cite commands, but the error appears with simpler ones too like\leftarrow
.)Markdown source:
Native Pandoc output (
pandoc -C mwe.md -t native
):As you can see, in the note field we get empty strings instead of a space separating "edition:" from
\leftarrow
and a period at the end. This doesn't happen in the title.The bug disappears if the note doesn't end up with a LaTeX command. Change the note field to:
The result is:
If it ends with a LaTeX command but there are several LaTeX command, the period is there but the last LaTeX command is still preceded by an empty string. Change the note field to:
The result is:
Now we have a period at the end, and a space before the first LaTeX command, but again an empty string before the second LaTeX command.
The colon after 'edition:' isn't the culprit, the behaviour remains when it's removed. Adding spaces at the end of the note field doesn't change anything: if the last non-space element of the note is a LaTeX command, the bug appears.
minimal.csl
The text was updated successfully, but these errors were encountered: