packages feed

pandoc-crossref 0.3.6.2 → 0.3.6.3

raw patch · 5 files changed

+25/−10 lines, 5 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Text.Pandoc.CrossRef: autoEqnLabels :: forall a_aAGo. ToMetaValue a_aAGo => a_aAGo -> Meta
+ Text.Pandoc.CrossRef: autoEqnLabels :: forall a_aAGs. ToMetaValue a_aAGs => a_aAGs -> Meta
- Text.Pandoc.CrossRef: autoSectionLabels :: forall a_aAFP. ToMetaValue a_aAFP => a_aAFP -> Meta
+ Text.Pandoc.CrossRef: autoSectionLabels :: forall a_aAFT. ToMetaValue a_aAFT => a_aAFT -> Meta
- Text.Pandoc.CrossRef: ccsDelim :: forall a_aAGl. ToMetaValue a_aAGl => a_aAGl -> Meta
+ Text.Pandoc.CrossRef: ccsDelim :: forall a_aAGp. ToMetaValue a_aAGp => a_aAGp -> Meta
- Text.Pandoc.CrossRef: ccsLabelSep :: forall a_aAGm. ToMetaValue a_aAGm => a_aAGm -> Meta
+ Text.Pandoc.CrossRef: ccsLabelSep :: forall a_aAGq. ToMetaValue a_aAGq => a_aAGq -> Meta
- Text.Pandoc.CrossRef: ccsTemplate :: forall a_aAGh. ToMetaValue a_aAGh => a_aAGh -> Meta
+ Text.Pandoc.CrossRef: ccsTemplate :: forall a_aAGl. ToMetaValue a_aAGl => a_aAGl -> Meta
- Text.Pandoc.CrossRef: chapDelim :: forall a_aAG5. ToMetaValue a_aAG5 => a_aAG5 -> Meta
+ Text.Pandoc.CrossRef: chapDelim :: forall a_aAG9. ToMetaValue a_aAG9 => a_aAG9 -> Meta
- Text.Pandoc.CrossRef: chapters :: forall a_aB6U. ToMetaValue a_aB6U => a_aB6U -> Meta
+ Text.Pandoc.CrossRef: chapters :: forall a_aB6Y. ToMetaValue a_aB6Y => a_aB6Y -> Meta
- Text.Pandoc.CrossRef: chaptersDepth :: forall a_aAFM. ToMetaValue a_aAFM => a_aAFM -> Meta
+ Text.Pandoc.CrossRef: chaptersDepth :: forall a_aAFQ. ToMetaValue a_aAFQ => a_aAFQ -> Meta
- Text.Pandoc.CrossRef: codeBlockCaptions :: forall a_aAFO. ToMetaValue a_aAFO => a_aAFO -> Meta
+ Text.Pandoc.CrossRef: codeBlockCaptions :: forall a_aAFS. ToMetaValue a_aAFS => a_aAFS -> Meta
- Text.Pandoc.CrossRef: cref :: forall a_aAFL. ToMetaValue a_aAFL => a_aAFL -> Meta
+ Text.Pandoc.CrossRef: cref :: forall a_aAFP. ToMetaValue a_aAFP => a_aAFP -> Meta
- Text.Pandoc.CrossRef: crossrefYaml :: forall a_aB6S. ToMetaValue a_aB6S => a_aB6S -> Meta
+ Text.Pandoc.CrossRef: crossrefYaml :: forall a_aB6W. ToMetaValue a_aB6W => a_aB6W -> Meta
- Text.Pandoc.CrossRef: customLabel :: forall a_aAGk. ToMetaValue a_aAGk => a_aAGk -> Meta
+ Text.Pandoc.CrossRef: customLabel :: forall a_aAGo. ToMetaValue a_aAGo => a_aAGo -> Meta
- Text.Pandoc.CrossRef: eqLabels :: forall a_aB6W. ToMetaValue a_aB6W => a_aB6W -> Meta
+ Text.Pandoc.CrossRef: eqLabels :: forall a_aB70. ToMetaValue a_aB70 => a_aB70 -> Meta
- Text.Pandoc.CrossRef: eqnPrefix :: forall a_aAFT. ToMetaValue a_aAFT => a_aAFT -> Meta
+ Text.Pandoc.CrossRef: eqnPrefix :: forall a_aAFX. ToMetaValue a_aAFX => a_aAFX -> Meta
- Text.Pandoc.CrossRef: eqnPrefixTemplate :: forall a_aAFY. ToMetaValue a_aAFY => a_aAFY -> Meta
+ Text.Pandoc.CrossRef: eqnPrefixTemplate :: forall a_aAG2. ToMetaValue a_aAG2 => a_aAG2 -> Meta
- Text.Pandoc.CrossRef: figLabels :: forall a_aB6V. ToMetaValue a_aB6V => a_aB6V -> Meta
+ Text.Pandoc.CrossRef: figLabels :: forall a_aB6Z. ToMetaValue a_aB6Z => a_aB6Z -> Meta
- Text.Pandoc.CrossRef: figPrefix :: forall a_aAFS. ToMetaValue a_aAFS => a_aAFS -> Meta
+ Text.Pandoc.CrossRef: figPrefix :: forall a_aAFW. ToMetaValue a_aAFW => a_aAFW -> Meta
- Text.Pandoc.CrossRef: figPrefixTemplate :: forall a_aAFX. ToMetaValue a_aAFX => a_aAFX -> Meta
+ Text.Pandoc.CrossRef: figPrefixTemplate :: forall a_aAG1. ToMetaValue a_aAG1 => a_aAG1 -> Meta
- Text.Pandoc.CrossRef: figureTemplate :: forall a_aAGe. ToMetaValue a_aAGe => a_aAGe -> Meta
+ Text.Pandoc.CrossRef: figureTemplate :: forall a_aAGi. ToMetaValue a_aAGi => a_aAGi -> Meta
- Text.Pandoc.CrossRef: figureTitle :: forall a_aB6O. ToMetaValue a_aB6O => a_aB6O -> Meta
+ Text.Pandoc.CrossRef: figureTitle :: forall a_aB6S. ToMetaValue a_aB6S => a_aB6S -> Meta
- Text.Pandoc.CrossRef: lastDelim :: forall a_aAG8. ToMetaValue a_aAG8 => a_aAG8 -> Meta
+ Text.Pandoc.CrossRef: lastDelim :: forall a_aAGc. ToMetaValue a_aAGc => a_aAGc -> Meta
- Text.Pandoc.CrossRef: linkReferences :: forall a_aAGq. ToMetaValue a_aAGq => a_aAGq -> Meta
+ Text.Pandoc.CrossRef: linkReferences :: forall a_aAGu. ToMetaValue a_aAGu => a_aAGu -> Meta
- Text.Pandoc.CrossRef: listingTemplate :: forall a_aAGj. ToMetaValue a_aAGj => a_aAGj -> Meta
+ Text.Pandoc.CrossRef: listingTemplate :: forall a_aAGn. ToMetaValue a_aAGn => a_aAGn -> Meta
- Text.Pandoc.CrossRef: listingTitle :: forall a_aB6Q. ToMetaValue a_aB6Q => a_aB6Q -> Meta
+ Text.Pandoc.CrossRef: listingTitle :: forall a_aB6U. ToMetaValue a_aB6U => a_aB6U -> Meta
- Text.Pandoc.CrossRef: listings :: forall a_aAFN. ToMetaValue a_aAFN => a_aAFN -> Meta
+ Text.Pandoc.CrossRef: listings :: forall a_aAFR. ToMetaValue a_aAFR => a_aAFR -> Meta
- Text.Pandoc.CrossRef: lofTitle :: forall a_aAGa. ToMetaValue a_aAGa => a_aAGa -> Meta
+ Text.Pandoc.CrossRef: lofTitle :: forall a_aAGe. ToMetaValue a_aAGe => a_aAGe -> Meta
- Text.Pandoc.CrossRef: lolTitle :: forall a_aAGc. ToMetaValue a_aAGc => a_aAGc -> Meta
+ Text.Pandoc.CrossRef: lolTitle :: forall a_aAGg. ToMetaValue a_aAGg => a_aAGg -> Meta
- Text.Pandoc.CrossRef: lotTitle :: forall a_aAGb. ToMetaValue a_aAGb => a_aAGb -> Meta
+ Text.Pandoc.CrossRef: lotTitle :: forall a_aAGf. ToMetaValue a_aAGf => a_aAGf -> Meta
- Text.Pandoc.CrossRef: lstLabels :: forall a_aB6Y. ToMetaValue a_aB6Y => a_aB6Y -> Meta
+ Text.Pandoc.CrossRef: lstLabels :: forall a_aB72. ToMetaValue a_aB72 => a_aB72 -> Meta
- Text.Pandoc.CrossRef: lstPrefix :: forall a_aAFV. ToMetaValue a_aAFV => a_aAFV -> Meta
+ Text.Pandoc.CrossRef: lstPrefix :: forall a_aAFZ. ToMetaValue a_aAFZ => a_aAFZ -> Meta
- Text.Pandoc.CrossRef: lstPrefixTemplate :: forall a_aAG0. ToMetaValue a_aAG0 => a_aAG0 -> Meta
+ Text.Pandoc.CrossRef: lstPrefixTemplate :: forall a_aAG4. ToMetaValue a_aAG4 => a_aAG4 -> Meta
- Text.Pandoc.CrossRef: nameInLink :: forall a_aAGr. ToMetaValue a_aAGr => a_aAGr -> Meta
+ Text.Pandoc.CrossRef: nameInLink :: forall a_aAGv. ToMetaValue a_aAGv => a_aAGv -> Meta
- Text.Pandoc.CrossRef: numberSections :: forall a_aAFQ. ToMetaValue a_aAFQ => a_aAFQ -> Meta
+ Text.Pandoc.CrossRef: numberSections :: forall a_aAFU. ToMetaValue a_aAFU => a_aAFU -> Meta
- Text.Pandoc.CrossRef: outFormat :: forall a_aAGd. ToMetaValue a_aAGd => a_aAGd -> Meta
+ Text.Pandoc.CrossRef: outFormat :: forall a_aAGh. ToMetaValue a_aAGh => a_aAGh -> Meta
- Text.Pandoc.CrossRef: pairDelim :: forall a_aAG7. ToMetaValue a_aAG7 => a_aAG7 -> Meta
+ Text.Pandoc.CrossRef: pairDelim :: forall a_aAGb. ToMetaValue a_aAGb => a_aAGb -> Meta
- Text.Pandoc.CrossRef: rangeDelim :: forall a_aAG6. ToMetaValue a_aAG6 => a_aAG6 -> Meta
+ Text.Pandoc.CrossRef: rangeDelim :: forall a_aAGa. ToMetaValue a_aAGa => a_aAGa -> Meta
- Text.Pandoc.CrossRef: refDelim :: forall a_aAG9. ToMetaValue a_aAG9 => a_aAG9 -> Meta
+ Text.Pandoc.CrossRef: refDelim :: forall a_aAGd. ToMetaValue a_aAGd => a_aAGd -> Meta
- Text.Pandoc.CrossRef: refIndexTemplate :: forall a_aAG2. ToMetaValue a_aAG2 => a_aAG2 -> Meta
+ Text.Pandoc.CrossRef: refIndexTemplate :: forall a_aAG6. ToMetaValue a_aAG6 => a_aAG6 -> Meta
- Text.Pandoc.CrossRef: secHeaderDelim :: forall a_aB70. ToMetaValue a_aB70 => a_aB70 -> Meta
+ Text.Pandoc.CrossRef: secHeaderDelim :: forall a_aB74. ToMetaValue a_aB74 => a_aB74 -> Meta
- Text.Pandoc.CrossRef: secHeaderTemplate :: forall a_aAG4. ToMetaValue a_aAG4 => a_aAG4 -> Meta
+ Text.Pandoc.CrossRef: secHeaderTemplate :: forall a_aAG8. ToMetaValue a_aAG8 => a_aAG8 -> Meta
- Text.Pandoc.CrossRef: secLabels :: forall a_aB6Z. ToMetaValue a_aB6Z => a_aB6Z -> Meta
+ Text.Pandoc.CrossRef: secLabels :: forall a_aB73. ToMetaValue a_aB73 => a_aB73 -> Meta
- Text.Pandoc.CrossRef: secPrefix :: forall a_aAFW. ToMetaValue a_aAFW => a_aAFW -> Meta
+ Text.Pandoc.CrossRef: secPrefix :: forall a_aAG0. ToMetaValue a_aAG0 => a_aAG0 -> Meta
- Text.Pandoc.CrossRef: secPrefixTemplate :: forall a_aAG1. ToMetaValue a_aAG1 => a_aAG1 -> Meta
+ Text.Pandoc.CrossRef: secPrefixTemplate :: forall a_aAG5. ToMetaValue a_aAG5 => a_aAG5 -> Meta
- Text.Pandoc.CrossRef: sectionsDepth :: forall a_aAFR. ToMetaValue a_aAFR => a_aAFR -> Meta
+ Text.Pandoc.CrossRef: sectionsDepth :: forall a_aAFV. ToMetaValue a_aAFV => a_aAFV -> Meta
- Text.Pandoc.CrossRef: subfigGrid :: forall a_aAGp. ToMetaValue a_aAGp => a_aAGp -> Meta
+ Text.Pandoc.CrossRef: subfigGrid :: forall a_aAGt. ToMetaValue a_aAGt => a_aAGt -> Meta
- Text.Pandoc.CrossRef: subfigLabels :: forall a_aB6T. ToMetaValue a_aB6T => a_aB6T -> Meta
+ Text.Pandoc.CrossRef: subfigLabels :: forall a_aB6X. ToMetaValue a_aB6X => a_aB6X -> Meta
- Text.Pandoc.CrossRef: subfigureChildTemplate :: forall a_aAGg. ToMetaValue a_aAGg => a_aAGg -> Meta
+ Text.Pandoc.CrossRef: subfigureChildTemplate :: forall a_aAGk. ToMetaValue a_aAGk => a_aAGk -> Meta
- Text.Pandoc.CrossRef: subfigureRefIndexTemplate :: forall a_aAG3. ToMetaValue a_aAG3 => a_aAG3 -> Meta
+ Text.Pandoc.CrossRef: subfigureRefIndexTemplate :: forall a_aAG7. ToMetaValue a_aAG7 => a_aAG7 -> Meta
- Text.Pandoc.CrossRef: subfigureTemplate :: forall a_aAGf. ToMetaValue a_aAGf => a_aAGf -> Meta
+ Text.Pandoc.CrossRef: subfigureTemplate :: forall a_aAGj. ToMetaValue a_aAGj => a_aAGj -> Meta
- Text.Pandoc.CrossRef: tableEqns :: forall a_aAGn. ToMetaValue a_aAGn => a_aAGn -> Meta
+ Text.Pandoc.CrossRef: tableEqns :: forall a_aAGr. ToMetaValue a_aAGr => a_aAGr -> Meta
- Text.Pandoc.CrossRef: tableTemplate :: forall a_aAGi. ToMetaValue a_aAGi => a_aAGi -> Meta
+ Text.Pandoc.CrossRef: tableTemplate :: forall a_aAGm. ToMetaValue a_aAGm => a_aAGm -> Meta
- Text.Pandoc.CrossRef: tableTitle :: forall a_aB6P. ToMetaValue a_aB6P => a_aB6P -> Meta
+ Text.Pandoc.CrossRef: tableTitle :: forall a_aB6T. ToMetaValue a_aB6T => a_aB6T -> Meta
- Text.Pandoc.CrossRef: tblLabels :: forall a_aB6X. ToMetaValue a_aB6X => a_aB6X -> Meta
+ Text.Pandoc.CrossRef: tblLabels :: forall a_aB71. ToMetaValue a_aB71 => a_aB71 -> Meta
- Text.Pandoc.CrossRef: tblPrefix :: forall a_aAFU. ToMetaValue a_aAFU => a_aAFU -> Meta
+ Text.Pandoc.CrossRef: tblPrefix :: forall a_aAFY. ToMetaValue a_aAFY => a_aAFY -> Meta
- Text.Pandoc.CrossRef: tblPrefixTemplate :: forall a_aAFZ. ToMetaValue a_aAFZ => a_aAFZ -> Meta
+ Text.Pandoc.CrossRef: tblPrefixTemplate :: forall a_aAG3. ToMetaValue a_aAG3 => a_aAG3 -> Meta
- Text.Pandoc.CrossRef: titleDelim :: forall a_aB6R. ToMetaValue a_aB6R => a_aB6R -> Meta
+ Text.Pandoc.CrossRef: titleDelim :: forall a_aB6V. ToMetaValue a_aB6V => a_aB6V -> Meta

Files

CHANGELOG.md view
@@ -1,3 +1,9 @@+## 0.3.6.3++-   Fixed format option order in pipe mode+-   Bump to GHC 8.8.3+-   CI tweaks+ ## 0.3.6.2  -   Force WS state evaluation to resolve duplicate id error inconsistency
docs/index.md view
@@ -17,6 +17,16 @@ `--include-in-header`, add pandoc-crossref-specific definitions as well. See [LaTeX customization](#latex-customization) for more information. +## Note on non-standard LaTeX templates++If you're using non-standard pandoc LaTeX template (this includes the cases where document class is not `article` or `book` close enough to that), pandoc-crossref might not be able to configure that properly. You might to configure LaTeX in the template manually.++## Note on LaTeX and `chapters` option++Because pandoc-crossref offloads all numbering to LaTeX if it can, `chapters: true` has no direct effect on LaTeX output. You have to specify Pandoc's `--top-level-division=chapter` option, which should hopefully configure LaTeX appropriately.++It's a good idea to specify `--top-level-division=chapter` for any output format actually, because pandoc-crossref can't signal pandoc you want to use chapters, and vice versa.+ ## pandoc-citeproc and pandoc-crossref  Since pandoc-crossref uses the same citation syntax as pandoc-citeproc,@@ -452,8 +462,7 @@     package. Only relevant for LaTeX output. `\usepackage{cleveref}`     will be automatically added to `header-includes`. -   `chapters`: if True, number elements as `chapter.item`, and restart-    `item` on each first-level heading (as `--chapters` for latex/pdf-    output)+    `item` on each first-level heading. You might also need to run pandoc with `--top-level-division=chapter` argument to signal it you want to use chapters; whether it's actually required or not depends on the output format, but it's always safe to include. Notice `chapters` and related options are ignored in LaTeX output. See [Note on LaTeX and `chapters` option](#note-on-latex-and-chapters-option) -   `chaptersDepth`, default `1`: header level to treat as "chapter". If     `chaptersDepth>1`, then items will be prefixed with several numbers,     corresponding to header numbers, e.g. `fig. 1.4.3`.
lib/Text/Pandoc/CrossRef.hs view
@@ -113,8 +113,8 @@       >>= replaceAll opts       >>= bottomUpM (replaceRefs opts)       >>= bottomUpM (listOf opts)-    (result, state) = runState doWalk def-  state `seq` return result+    (result, st) = runState doWalk def+  st `seq` return result  {- | Modifies metadata for LaTeX output, adding header-includes instructions to setup custom and builtin environments.
pandoc-crossref.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 476e5c1a727c4d24c20d593fc172c93c2e8a164455696b3521d5aa398f193ccb+-- hash: f27b970767177282fd2813688f31677f401ea50e80da4d57474b99fdc67a92c0  name:           pandoc-crossref-version:        0.3.6.2+version:        0.3.6.3 synopsis:       Pandoc filter for cross-references description:    pandoc-crossref is a pandoc filter for numbering figures, equations, tables and cross-references to them. category:       Text
src/pandoc-crossref.hs view
@@ -72,14 +72,14 @@       void $ openBrowser $ "file:///" <> fp       threadDelay 5000000       return ()-    go (Just Pipe) _ = toJSONFilter f+    go (Just Pipe) fmt = toJSONFilter (f fmt)     go Nothing Nothing = hPutStr stderr $ unlines       [ "Running pandoc-crossref without arguments is not supported. Try"       , "\tpandoc-crossref --help"       , "If you want to run in \"pipe mode\", run with"       , "\tpandoc-crossref --pipe [FORMAT]"       ]-    go Nothing _ = do+    go Nothing fmt = do       Env.lookupEnv "PANDOC_VERSION" >>= \case         Just runv ->           when (VERSION_pandoc /= runv) $ hPutStrLn stderr $@@ -91,8 +91,8 @@           , "\tpandoc-crossref --pipe [FORMAT]"           , "instead."           ]-      toJSONFilter f-    f fmt p@(Pandoc meta _) = runCrossRefIO meta fmt defaultCrossRefAction p+      toJSONFilter (f fmt)+    f fmt p@(Pandoc meta _) = runCrossRefIO meta (Format . T.pack <$> fmt) defaultCrossRefAction p  main :: IO () main = join $ execParser opts