-
Notifications
You must be signed in to change notification settings - Fork 72
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
Separate numbering for supplemental figures/tables #35
Comments
I'd say that per-chapter numbering does pretty close to what you want. A
|
Okay, it seems like I only wanted to implement custom section reference text. This is implemented by 34180d7, but I'm short on ideas on how to make this work with LaTeX output. |
I finally got around to trying this. Yes, per-chapter numbering works nicely (and degrades well in the LaTeX case). Thanks! For anyone else who needs unnumbered chapters, continuous figure/table numbering through all body sections ("fig. 1") and separately numbered supplements ("fig. S1"), the following worked for me: ---
chapters: True
chaptersDepth: 1
chapDelim: ""
---
# Methods {-}
Lorem ipsum dolor sit amet, consectetur adipiscing elit (@fig:lorem, @fig:ipsum).
![Lorem and legemds](a.png){#fig:lorem}
# Results {-}
![I like to ipsum water on a hot day](b.png){#fig:ipsum}
Etiam cursus dictum dui, id condimentum (@fig:lorem, @fig:supsic, @tbl:table, @tbl:suptable).
Table: Ipsum est? {#tbl:table}
| Word | English | Ipsum |
|------|---------|-------|
| day | YES | NO |
| amet | NO | YES |
| sit | YES | YES |
# Discussion {-}
Quisque finibus enim est, quis placerat turpis volutpat at.
# Supplementary Material {label="S"}
Suspendisse vel ante sapien. Donec vitae magna suscipit (@fig:supsic, @fig:lorem).
![Sic transit](c.png){#fig:supsic}
Table: Is English? {#tbl:suptable}
| Word | English | Ipsum |
|------|---------|-------|
| day | YES | NO |
| amet | NO | YES |
| sit | YES | YES | Tested with Pandoc 1.17.1 and pandoc-crossref 0.2.1.3: |
For a paper with a large supplemental section, I needed to maintain two separate sets of figure and table numberings, e.g.
(See @fig:fig1, @fig:fig4, @supfig:figS1)
==> "(See Figures 1, 4, and S1)". I've hacked together most of a solution for this at https://github.com/infotroph/pandoc-crossref/tree/supplemental.This is not a pull request, because I doubt you want my code: It duplicates nearly all of the existing figure and table code, provides no way to support other supplements (equations, listings, etc) other than also duplicating their code, and the numbering is broken in LaTeX and would probably need a custom Pandoc writer to fix it. I'm only posting it here in case it can help someone else who'd otherwise be hassling you for a real fix :)
The text was updated successfully, but these errors were encountered: