Skip to content
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

[WIP] Custom label prefixes #174

Open
wants to merge 162 commits into
base: master
Choose a base branch
from
Open

[WIP] Custom label prefixes #174

wants to merge 162 commits into from

Conversation

lierdakil
Copy link
Owner

@lierdakil lierdakil commented Apr 3, 2018

Work towards #84.

At the time of writing, tests pass, but scoping rules remain unimplemented and code really needs some clean-up. Also, worth mentioning that coverage isn't 100%, so some corner cases might be broken.

Since there's no documentation at the moment, and everything can change without advance warnings, you can dump default pandoc-crossref-related metadata options with

pandoc -F pandoc-crossref -t markdown -s /dev/null

(you can replace /dev/null with an empty text file on Windows)
Here's what it dumps at the moment of writing: https://gist.github.com/lierdakil/d5e51a5b077b0b3152f8345926aa6b25

TODO (in no particular order):

  • New metadata format

  • Referencing arbitrary divs and spans

  • Referencing YAML arrays in templates (via $$var[i][j]$$)

  • Scoping rules

  • Local variable overrides for the purpose of templating (via prefix attributes, object attributes)

  • Update subfigures to allow sub-anything

  • Subfigure (or rather sub-anything) collected captions

  • Override-able captions for list-of-stuff

  • Referencing YAML objects in templates (via $$var[i][j]$$)

  • Align LaTeX output with other output formats (probably use caption, subcaption, newfloat)

    For now, it makes the most sense to treat LaTeX as any other output format. This should (mostly) work for the purpose of PDF output, but the resulting LaTeX code wouldn't be much different from a plaintext file. Anyway, reimplementing pandoc-crossref algorithms in LaTeX might be a fun challenge, but it will take an unreasonable amount of time. LaTeX gurus are welcome to help out.

  • Per-output-format setting overrides

  • Way to disable default predefined prefixes

  • Update (rewrite) docs

  • Fix subfigures without grid (captions not shown)

  • Investigate figures/subfigures in ODT (captions not shown?)

    While the original issue is worked around in 2035f42. There are some issues with ODT output, namely ODT writer attempts to add figure and table numbers
    itself, which kinda breaks everything for pandoc-crossref. See thread on pandoc-discuss for discussion.

  • Fix subcaption table style in LaTeX? (lines above and below the table)

  • Access arbitrary scope properties from templates

  • Number and string literals in template variables (for indexed access)

  • Metadata variable name disambiguation?

    Currently implemented via optionally scoping all pandoc-crossref setting under crossref metadata variable. There might be a better solution.

Issues from v0.4 milestone

LaTeX-specific:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants