Giter Club home page Giter Club logo

Comments (3)

infotroph avatar infotroph commented on August 20, 2024 5

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: pandoc test.md --filter pandoc-crossref -o test.docx.

from pandoc-crossref.

lierdakil avatar lierdakil commented on August 20, 2024

I'd say that per-chapter numbering does pretty close to what you want. A
custom template could also help somewhat. Can't remember all implementation
details from the top of my head, but it should be possible without horrible
hacks :)
28 сент. 2015 г. 18:28 пользователь "Chris Black" [email protected]
написал:

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 :)


Reply to this email directly or view it on GitHub
#35.

from pandoc-crossref.

lierdakil avatar lierdakil commented on August 20, 2024

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.

from pandoc-crossref.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.