-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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 way to reference images (with captions) #904
Comments
Dup of #813? |
There is a difference between referencing figures (e.g. for print media) and making internal links to figures(e.g. for HTML, on-screen reading). This is a solution for referencing figures in academic writing in .docx works with numbered example lists: Here is the captioned figure:
Here is a reference to the figure:
And at the end of the document there is an index of figures:
The index of figures is nice to have, yet actually it is an excuse to define the items of the numbered list - this can only be done at the start of a new line... |
@CFCF The workaround you show works pretty well. Do you know of a way to restart the numbering? For example, having an index of figures and a separate index of tables? |
You can probably hack something like this together for LaTeX (and thus, PDF) -- or any target, for that matter -- as well but that's not really the point of pandoc, isn't it? |
I have a hack version for latex:
But this only get the figure number and hyper link done. No caption reference though... BTW, is there any way to reference the caption of a figure in latex? |
Would that be necessary? I'm having a hard time imagining a scenario where you can't just write "as explained in the caption of Figure 1". |
@evitaerc Write an article/thesis with lots of figures and then rearrange them. You don't want to go through the whole text and change labels. It's a) useless busy work and b) prone to errors. |
CFCF's hack is working perfectly, except you have to include the example list itself, which in case of figures in an academic paper is not needed. But omit the example list and the hack will not work. Also the parentheses are not obligatory everywhere except the example list. So we're able to write
and then
but always with
at the end of the document. This is not very handy, but still. |
@CFCF's hack is incompatible with pandoc-citeproc, which overrides every instance of |
We can specify images such that they get a a caption which translates to a
figure
environment in the LaTeX target (which is in particular used for PDF export in gitit).However, floating graphics are all but useless if you can not link/refer to it. Therefore, I suggest a syntax to enable (labelling and) referencing images (with captions).
The text was updated successfully, but these errors were encountered: