-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add "Figure" label when referencing #13
Comments
Hi, @dbobak. Thanks for this excellent suggestion. I have been thinking on it for a few days. LaTeX supports "clever referencing" through the The question is how to best enable this behaviour. It seems reasonable to add a metadata field to signal clever referencing; e.g., As you have pointed out, there needs to be some way to turn off clever referencing. The use case is markdown text like Using markdown like Pandoc is increasingly using attributes. Can we use them instead? e.g., something like Thoughts? |
I created a new Feedback on the proposed syntax is definitely welcome. |
I was wrong about the This enhancement is still in progress. I'm doing a pretty major refactoring to allow for the same behaviour in pandoc-eqnos and pandoc-tablenos. |
@tomduck, thanks for taking my idea under consideration :) The "clever referencing" feature looks very promising! Thank you! :) |
I just posted new releases of pandoc-fignos/eqnos/tablenos that have clever referencing. The syntax is close to what you suggested. Unfortunately, I couldn't use the minus sign to disable clever referencing because pandoc silently drops minus signs in front of references. There is nothing that I can do to work around this flaw. An exclamation point is used to disable clever referencing instead. As part of this release, I pulled common code out of the three projects and created the pandoc-xnos library. This should make maintenance and further development easier. In any case, enjoy! |
When referencing a figure in the text, fignos produces only the figure number, without "fig" or "figure" label. Would it be possible to make its behaviour similar to pandoc-citeproc?
For example:
Figure insertion:
![My great chart with data.](fig/chart.png){#fig:chart}
Figure reference:
Lorem ipsum ({@fig:chart}) dolor sit amet
Result:
Lorem ipsum (1.1) dolor sit amet
And I mean this behaviour:
Figure reference:
Lorem ipsum ({@fig:chart}) dolor sit amet
Result:
Lorem ipsum (Figure 1.1) dolor sit amet
Figure reference:
Lorem ipsum ({-@fig:chart}) dolor sit amet
Result:
Lorem ipsum (1.1) dolor sit amet
It would also be nice to have the same behaviour in tablenos and eqnos :)
The text was updated successfully, but these errors were encountered: