-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
One space too many when prefix is set to empty #428
Comments
→ A workaround is to use the dash syntax in markdown: Histogram [-@fig:histogram] is in
the next section ([-@sec:examples]). |
This works: ---
figPrefixTemplate: $$i$$
---
![Foo](foo.jpg){#fig:foo}
See @fig:foo See https://lierdakil.github.io/pandoc-crossref/#reference-templates |
Ah yes, this seems better than using a dash everywhere. I didn't know about the templates, thank you! It doesn't put non-breaking spaces in the right place automatically, though, right? |
Nope, but neither do dashes. Essentially, putting nbsp outside the exact place where the citation occurs is a very non-trivial problem which I'm not smart enough to solve in general, so I didn't even try. If you want nbsp between the preceeding text and the citation, consider inserting it yourself, e.g. I guess there's an option of playing with citation prefixes, e.g. I could reasonably insert an nbsp if you wrote a citation like this: |
I see – thanks a lot for your answers and your time! |
Hello, and thank you for maintaining pandoc-crossref, it's super useful!
If
figPrefix
,secPrefix
oreqPrefix
is set to empty string, there's one extra space when converting to LaTeX. For example:histogram [@fig:histogram]
becomes:
histogram ~\ref{fig:histogram}
instead of:
histogram~\ref{fig:histogram}
In the second section ([@sec:examples])
becomes:
In the second section (~\ref{sec:examples})
instead of:
In the second section~(\ref{sec:examples})
Is there a way to avoid this?
(similar to #11 and #12)
The text was updated successfully, but these errors were encountered: