pandoc-crossref 0.1.2.1 → 0.1.2.2
raw patch · 3 files changed
+31/−5 lines, 3 filesdep ~pandoc
Dependency ranges changed: pandoc
Files
- README.md +27/−0
- pandoc-crossref.cabal +3/−3
- src/Util/ModifyMeta.hs +1/−2
README.md view
@@ -208,6 +208,31 @@ They can also be used with first character capitalized, i.e. `FigPrefix`, etc. In this case, these settings will override default reference capitailzation settings. +#### LaTeX customization++Support for above variables with LaTeX/PDF output is limited. In particular, the following variables are honored:++* `figureTitle`+* `tableTitle`+* `listingTitle`+* `lofTitle` -- ignores formatting+* `lotTitle` -- ignores formatting+* `lolTitle` -- ignores formatting+* `*Prefix`, upper-/lowercase and single/plural form. Note that with cleveref output, if `*Prefix` is array, only first two items are used, and the rest is ignored.++Templates are *not* supported.++You can add arbitrary LaTeX commands to document header, however, using `header-includes` metadata field. Please bear in mind, that pandoc-crossref up to and including 0.1.2.1 requires `header-includes` to be YAML array, e.g.++```yaml+header-includes:+ - "\\newcommand{\\pcdoc}{Pandoc-crossref documentation}"+```++This will be added *before* any customization applied by pandoc-crossref. For a complete list of what is added to template, consult [ModifyMeta.hs][ModifyMeta.hs].++[ModifyMeta.hs]: https://github.com/lierdakil/pandoc-crossref/blob/master/src/Util/ModifyMeta.hs+ ### Templates pandoc-crossref supports advanced caption customization via caption templates. Templates are specified as YAML metadata variables (see [Customization](#customization)), and are parsed as default Pandoc Markdown. Variables are specified with display math syntax, i.e. `$$var$$` in a template will be replaced with value of variable `var`.@@ -215,6 +240,8 @@ * `i` -- object number, possibly with chapter number (if `chapter=True`) * `t` -- object caption, as given in source Markdown++Please note that at the moment, templates are not supported with LaTeX/PDF output. ### Settings file
pandoc-crossref.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: pandoc-crossref-version: 0.1.2.1+version: 0.1.2.2 synopsis: Pandoc filter for cross-references description: pandoc-crossref is a pandoc filter for numbering figures, equations, tables and cross-references to them. license: GPL-2@@ -23,7 +23,7 @@ source-repository this type: git location: https://github.com/lierdakil/pandoc-crossref- tag: v0.1.2.1+ tag: v0.1.2.2 executable pandoc-crossref main-is: pandoc-crossref.hs@@ -43,7 +43,7 @@ , Util.ModifyMeta other-extensions: CPP build-depends: base >=4.2 && <5- , pandoc >= 1.13 && <1.15+ , pandoc >= 1.13 && <1.16 , mtl >= 1.1 && <2.3 , containers >= 0.1 && <0.6 , pandoc-types >= 1.12.4.1 && < 1.13
src/Util/ModifyMeta.hs view
@@ -19,9 +19,8 @@ where headerInc :: Maybe MetaValue -> MetaValue headerInc Nothing = MetaList incList- headerInc (Just x@(MetaString _)) = MetaList $ x:incList headerInc (Just (MetaList x)) = MetaList $ x ++ incList- headerInc (Just x) = x+ headerInc (Just x) = MetaList $ x:incList incList = map MetaString $ floatnames ++ listnames ++