Closed tikuma-lsuhsc closed 6 months ago
Pandoc-crossref doesn't impose any restrictions IIRC, but Pandoc does. Since pandoc-crossref piggybacks from Pandoc's citation syntax, the limitations are the same. The actual citation syntax is a bit complicated, but essentially you're looking at alphanumeric, _
, and any of :.#$%&-+?<>~/
but not as the first of the last character.
FWIW, you can also brace {}
citation identifiers to get more allowed characters (essentially anything except whitespace), but I don't know if it's particularly useful. But this works:
$$\begin{aligned}my fancy equation\end{aligned}$${#eq:test(a)}
@{eq:test(a)}
Since you're writing a filter, you don't really need to think about it too much, pandoc will do (most) of the parsing for you.
@lierdakil - thanks for your response. After I wrote this issue, I went with the allowed characters for HTML href tag: [a-zA-Z0-9\-_]
. This worked for my personal case. I'll test later with the suggested addition of :.#$%&-+?<>~/
as middle characters. Thanks!
Hi, first of all a great pandoc filter!
That being said, due to its incompatibility with LaTeX with journal specific document classes, I decided to write my own Python filter which is compatible with
pandoc-crossref
so I can simply swap the filter depending on the output format. Towards this goal, I have a question regarding the syntax of the labels.The manual specifies, for example, from an eq label:
but it does not specify which characters are allowed for the
label
part of the syntax. Can a label consists of any non-space characters? Or are there a limit to which characters are eligible?In my document, I have a label
{#fig:fig1}
and a reference to its subfigure@fig:fig1(a)
. This gets rendered correctly asFig. 1(a)
. But,@fig:fig1a
fails. So, I suspect there is a set of allowed characters for labels, but I don't know Haskell to pin down this info on the source.Any input would be appreciated. Thanks! -Kesh