packages feed

pandoc-crossref 0.3.7.0 → 0.3.8.0

raw patch · 11 files changed

+71/−49 lines, 11 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_aB9l. ToMetaValue a_aB9l => a_aB9l -> Meta
+ Text.Pandoc.CrossRef: autoEqnLabels :: forall a_aBky. ToMetaValue a_aBky => a_aBky -> Meta
- Text.Pandoc.CrossRef: autoSectionLabels :: forall a_aB8M. ToMetaValue a_aB8M => a_aB8M -> Meta
+ Text.Pandoc.CrossRef: autoSectionLabels :: forall a_aBjZ. ToMetaValue a_aBjZ => a_aBjZ -> Meta
- Text.Pandoc.CrossRef: ccsDelim :: forall a_aB9i. ToMetaValue a_aB9i => a_aB9i -> Meta
+ Text.Pandoc.CrossRef: ccsDelim :: forall a_aBkv. ToMetaValue a_aBkv => a_aBkv -> Meta
- Text.Pandoc.CrossRef: ccsLabelSep :: forall a_aB9j. ToMetaValue a_aB9j => a_aB9j -> Meta
+ Text.Pandoc.CrossRef: ccsLabelSep :: forall a_aBkw. ToMetaValue a_aBkw => a_aBkw -> Meta
- Text.Pandoc.CrossRef: ccsTemplate :: forall a_aB9e. ToMetaValue a_aB9e => a_aB9e -> Meta
+ Text.Pandoc.CrossRef: ccsTemplate :: forall a_aBkr. ToMetaValue a_aBkr => a_aBkr -> Meta
- Text.Pandoc.CrossRef: chapDelim :: forall a_aB92. ToMetaValue a_aB92 => a_aB92 -> Meta
+ Text.Pandoc.CrossRef: chapDelim :: forall a_aBkf. ToMetaValue a_aBkf => a_aBkf -> Meta
- Text.Pandoc.CrossRef: chapters :: forall a_aBzO. ToMetaValue a_aBzO => a_aBzO -> Meta
+ Text.Pandoc.CrossRef: chapters :: forall a_aBL1. ToMetaValue a_aBL1 => a_aBL1 -> Meta
- Text.Pandoc.CrossRef: chaptersDepth :: forall a_aB8J. ToMetaValue a_aB8J => a_aB8J -> Meta
+ Text.Pandoc.CrossRef: chaptersDepth :: forall a_aBjW. ToMetaValue a_aBjW => a_aBjW -> Meta
- Text.Pandoc.CrossRef: codeBlockCaptions :: forall a_aB8L. ToMetaValue a_aB8L => a_aB8L -> Meta
+ Text.Pandoc.CrossRef: codeBlockCaptions :: forall a_aBjY. ToMetaValue a_aBjY => a_aBjY -> Meta
- Text.Pandoc.CrossRef: cref :: forall a_aB8I. ToMetaValue a_aB8I => a_aB8I -> Meta
+ Text.Pandoc.CrossRef: cref :: forall a_aBjV. ToMetaValue a_aBjV => a_aBjV -> Meta
- Text.Pandoc.CrossRef: crossrefYaml :: forall a_aBzM. ToMetaValue a_aBzM => a_aBzM -> Meta
+ Text.Pandoc.CrossRef: crossrefYaml :: forall a_aBKZ. ToMetaValue a_aBKZ => a_aBKZ -> Meta
- Text.Pandoc.CrossRef: customLabel :: forall a_aB9h. ToMetaValue a_aB9h => a_aB9h -> Meta
+ Text.Pandoc.CrossRef: customLabel :: forall a_aBku. ToMetaValue a_aBku => a_aBku -> Meta
- Text.Pandoc.CrossRef: eqLabels :: forall a_aBzQ. ToMetaValue a_aBzQ => a_aBzQ -> Meta
+ Text.Pandoc.CrossRef: eqLabels :: forall a_aBL3. ToMetaValue a_aBL3 => a_aBL3 -> Meta
- Text.Pandoc.CrossRef: eqnPrefix :: forall a_aB8Q. ToMetaValue a_aB8Q => a_aB8Q -> Meta
+ Text.Pandoc.CrossRef: eqnPrefix :: forall a_aBk3. ToMetaValue a_aBk3 => a_aBk3 -> Meta
- Text.Pandoc.CrossRef: eqnPrefixTemplate :: forall a_aB8V. ToMetaValue a_aB8V => a_aB8V -> Meta
+ Text.Pandoc.CrossRef: eqnPrefixTemplate :: forall a_aBk8. ToMetaValue a_aBk8 => a_aBk8 -> Meta
- Text.Pandoc.CrossRef: figLabels :: forall a_aBzP. ToMetaValue a_aBzP => a_aBzP -> Meta
+ Text.Pandoc.CrossRef: figLabels :: forall a_aBL2. ToMetaValue a_aBL2 => a_aBL2 -> Meta
- Text.Pandoc.CrossRef: figPrefix :: forall a_aB8P. ToMetaValue a_aB8P => a_aB8P -> Meta
+ Text.Pandoc.CrossRef: figPrefix :: forall a_aBk2. ToMetaValue a_aBk2 => a_aBk2 -> Meta
- Text.Pandoc.CrossRef: figPrefixTemplate :: forall a_aB8U. ToMetaValue a_aB8U => a_aB8U -> Meta
+ Text.Pandoc.CrossRef: figPrefixTemplate :: forall a_aBk7. ToMetaValue a_aBk7 => a_aBk7 -> Meta
- Text.Pandoc.CrossRef: figureTemplate :: forall a_aB9b. ToMetaValue a_aB9b => a_aB9b -> Meta
+ Text.Pandoc.CrossRef: figureTemplate :: forall a_aBko. ToMetaValue a_aBko => a_aBko -> Meta
- Text.Pandoc.CrossRef: figureTitle :: forall a_aBzI. ToMetaValue a_aBzI => a_aBzI -> Meta
+ Text.Pandoc.CrossRef: figureTitle :: forall a_aBKV. ToMetaValue a_aBKV => a_aBKV -> Meta
- Text.Pandoc.CrossRef: lastDelim :: forall a_aB95. ToMetaValue a_aB95 => a_aB95 -> Meta
+ Text.Pandoc.CrossRef: lastDelim :: forall a_aBki. ToMetaValue a_aBki => a_aBki -> Meta
- Text.Pandoc.CrossRef: linkReferences :: forall a_aB9n. ToMetaValue a_aB9n => a_aB9n -> Meta
+ Text.Pandoc.CrossRef: linkReferences :: forall a_aBkA. ToMetaValue a_aBkA => a_aBkA -> Meta
- Text.Pandoc.CrossRef: listingTemplate :: forall a_aB9g. ToMetaValue a_aB9g => a_aB9g -> Meta
+ Text.Pandoc.CrossRef: listingTemplate :: forall a_aBkt. ToMetaValue a_aBkt => a_aBkt -> Meta
- Text.Pandoc.CrossRef: listingTitle :: forall a_aBzK. ToMetaValue a_aBzK => a_aBzK -> Meta
+ Text.Pandoc.CrossRef: listingTitle :: forall a_aBKX. ToMetaValue a_aBKX => a_aBKX -> Meta
- Text.Pandoc.CrossRef: listings :: forall a_aB8K. ToMetaValue a_aB8K => a_aB8K -> Meta
+ Text.Pandoc.CrossRef: listings :: forall a_aBjX. ToMetaValue a_aBjX => a_aBjX -> Meta
- Text.Pandoc.CrossRef: lofTitle :: forall a_aB97. ToMetaValue a_aB97 => a_aB97 -> Meta
+ Text.Pandoc.CrossRef: lofTitle :: forall a_aBkk. ToMetaValue a_aBkk => a_aBkk -> Meta
- Text.Pandoc.CrossRef: lolTitle :: forall a_aB99. ToMetaValue a_aB99 => a_aB99 -> Meta
+ Text.Pandoc.CrossRef: lolTitle :: forall a_aBkm. ToMetaValue a_aBkm => a_aBkm -> Meta
- Text.Pandoc.CrossRef: lotTitle :: forall a_aB98. ToMetaValue a_aB98 => a_aB98 -> Meta
+ Text.Pandoc.CrossRef: lotTitle :: forall a_aBkl. ToMetaValue a_aBkl => a_aBkl -> Meta
- Text.Pandoc.CrossRef: lstLabels :: forall a_aBzS. ToMetaValue a_aBzS => a_aBzS -> Meta
+ Text.Pandoc.CrossRef: lstLabels :: forall a_aBL5. ToMetaValue a_aBL5 => a_aBL5 -> Meta
- Text.Pandoc.CrossRef: lstPrefix :: forall a_aB8S. ToMetaValue a_aB8S => a_aB8S -> Meta
+ Text.Pandoc.CrossRef: lstPrefix :: forall a_aBk5. ToMetaValue a_aBk5 => a_aBk5 -> Meta
- Text.Pandoc.CrossRef: lstPrefixTemplate :: forall a_aB8X. ToMetaValue a_aB8X => a_aB8X -> Meta
+ Text.Pandoc.CrossRef: lstPrefixTemplate :: forall a_aBka. ToMetaValue a_aBka => a_aBka -> Meta
- Text.Pandoc.CrossRef: nameInLink :: forall a_aB9o. ToMetaValue a_aB9o => a_aB9o -> Meta
+ Text.Pandoc.CrossRef: nameInLink :: forall a_aBkB. ToMetaValue a_aBkB => a_aBkB -> Meta
- Text.Pandoc.CrossRef: numberSections :: forall a_aB8N. ToMetaValue a_aB8N => a_aB8N -> Meta
+ Text.Pandoc.CrossRef: numberSections :: forall a_aBk0. ToMetaValue a_aBk0 => a_aBk0 -> Meta
- Text.Pandoc.CrossRef: outFormat :: forall a_aB9a. ToMetaValue a_aB9a => a_aB9a -> Meta
+ Text.Pandoc.CrossRef: outFormat :: forall a_aBkn. ToMetaValue a_aBkn => a_aBkn -> Meta
- Text.Pandoc.CrossRef: pairDelim :: forall a_aB94. ToMetaValue a_aB94 => a_aB94 -> Meta
+ Text.Pandoc.CrossRef: pairDelim :: forall a_aBkh. ToMetaValue a_aBkh => a_aBkh -> Meta
- Text.Pandoc.CrossRef: rangeDelim :: forall a_aB93. ToMetaValue a_aB93 => a_aB93 -> Meta
+ Text.Pandoc.CrossRef: rangeDelim :: forall a_aBkg. ToMetaValue a_aBkg => a_aBkg -> Meta
- Text.Pandoc.CrossRef: refDelim :: forall a_aB96. ToMetaValue a_aB96 => a_aB96 -> Meta
+ Text.Pandoc.CrossRef: refDelim :: forall a_aBkj. ToMetaValue a_aBkj => a_aBkj -> Meta
- Text.Pandoc.CrossRef: refIndexTemplate :: forall a_aB8Z. ToMetaValue a_aB8Z => a_aB8Z -> Meta
+ Text.Pandoc.CrossRef: refIndexTemplate :: forall a_aBkc. ToMetaValue a_aBkc => a_aBkc -> Meta
- Text.Pandoc.CrossRef: secHeaderDelim :: forall a_aBzU. ToMetaValue a_aBzU => a_aBzU -> Meta
+ Text.Pandoc.CrossRef: secHeaderDelim :: forall a_aBL7. ToMetaValue a_aBL7 => a_aBL7 -> Meta
- Text.Pandoc.CrossRef: secHeaderTemplate :: forall a_aB91. ToMetaValue a_aB91 => a_aB91 -> Meta
+ Text.Pandoc.CrossRef: secHeaderTemplate :: forall a_aBke. ToMetaValue a_aBke => a_aBke -> Meta
- Text.Pandoc.CrossRef: secLabels :: forall a_aBzT. ToMetaValue a_aBzT => a_aBzT -> Meta
+ Text.Pandoc.CrossRef: secLabels :: forall a_aBL6. ToMetaValue a_aBL6 => a_aBL6 -> Meta
- Text.Pandoc.CrossRef: secPrefix :: forall a_aB8T. ToMetaValue a_aB8T => a_aB8T -> Meta
+ Text.Pandoc.CrossRef: secPrefix :: forall a_aBk6. ToMetaValue a_aBk6 => a_aBk6 -> Meta
- Text.Pandoc.CrossRef: secPrefixTemplate :: forall a_aB8Y. ToMetaValue a_aB8Y => a_aB8Y -> Meta
+ Text.Pandoc.CrossRef: secPrefixTemplate :: forall a_aBkb. ToMetaValue a_aBkb => a_aBkb -> Meta
- Text.Pandoc.CrossRef: sectionsDepth :: forall a_aB8O. ToMetaValue a_aB8O => a_aB8O -> Meta
+ Text.Pandoc.CrossRef: sectionsDepth :: forall a_aBk1. ToMetaValue a_aBk1 => a_aBk1 -> Meta
- Text.Pandoc.CrossRef: subfigGrid :: forall a_aB9m. ToMetaValue a_aB9m => a_aB9m -> Meta
+ Text.Pandoc.CrossRef: subfigGrid :: forall a_aBkz. ToMetaValue a_aBkz => a_aBkz -> Meta
- Text.Pandoc.CrossRef: subfigLabels :: forall a_aBzN. ToMetaValue a_aBzN => a_aBzN -> Meta
+ Text.Pandoc.CrossRef: subfigLabels :: forall a_aBL0. ToMetaValue a_aBL0 => a_aBL0 -> Meta
- Text.Pandoc.CrossRef: subfigureChildTemplate :: forall a_aB9d. ToMetaValue a_aB9d => a_aB9d -> Meta
+ Text.Pandoc.CrossRef: subfigureChildTemplate :: forall a_aBkq. ToMetaValue a_aBkq => a_aBkq -> Meta
- Text.Pandoc.CrossRef: subfigureRefIndexTemplate :: forall a_aB90. ToMetaValue a_aB90 => a_aB90 -> Meta
+ Text.Pandoc.CrossRef: subfigureRefIndexTemplate :: forall a_aBkd. ToMetaValue a_aBkd => a_aBkd -> Meta
- Text.Pandoc.CrossRef: subfigureTemplate :: forall a_aB9c. ToMetaValue a_aB9c => a_aB9c -> Meta
+ Text.Pandoc.CrossRef: subfigureTemplate :: forall a_aBkp. ToMetaValue a_aBkp => a_aBkp -> Meta
- Text.Pandoc.CrossRef: tableEqns :: forall a_aB9k. ToMetaValue a_aB9k => a_aB9k -> Meta
+ Text.Pandoc.CrossRef: tableEqns :: forall a_aBkx. ToMetaValue a_aBkx => a_aBkx -> Meta
- Text.Pandoc.CrossRef: tableTemplate :: forall a_aB9f. ToMetaValue a_aB9f => a_aB9f -> Meta
+ Text.Pandoc.CrossRef: tableTemplate :: forall a_aBks. ToMetaValue a_aBks => a_aBks -> Meta
- Text.Pandoc.CrossRef: tableTitle :: forall a_aBzJ. ToMetaValue a_aBzJ => a_aBzJ -> Meta
+ Text.Pandoc.CrossRef: tableTitle :: forall a_aBKW. ToMetaValue a_aBKW => a_aBKW -> Meta
- Text.Pandoc.CrossRef: tblLabels :: forall a_aBzR. ToMetaValue a_aBzR => a_aBzR -> Meta
+ Text.Pandoc.CrossRef: tblLabels :: forall a_aBL4. ToMetaValue a_aBL4 => a_aBL4 -> Meta
- Text.Pandoc.CrossRef: tblPrefix :: forall a_aB8R. ToMetaValue a_aB8R => a_aB8R -> Meta
+ Text.Pandoc.CrossRef: tblPrefix :: forall a_aBk4. ToMetaValue a_aBk4 => a_aBk4 -> Meta
- Text.Pandoc.CrossRef: tblPrefixTemplate :: forall a_aB8W. ToMetaValue a_aB8W => a_aB8W -> Meta
+ Text.Pandoc.CrossRef: tblPrefixTemplate :: forall a_aBk9. ToMetaValue a_aBk9 => a_aBk9 -> Meta
- Text.Pandoc.CrossRef: titleDelim :: forall a_aBzL. ToMetaValue a_aBzL => a_aBzL -> Meta
+ Text.Pandoc.CrossRef: titleDelim :: forall a_aBKY. ToMetaValue a_aBKY => a_aBKY -> Meta

Files

CHANGELOG.md view
@@ -1,3 +1,15 @@+## 0.3.8.0++-   [LaTeX] Move hypertarget inside equation environment++    Fixes spacing issues in LaTeX/pdf output++-   [DOCX] Center equation number vertically with tableEqns++## 0.3.7.0++-  Support for pandoc-2.10+ ## 0.3.6.4  -   Last version to support pandoc 2.9
lib/Text/Pandoc/CrossRef/References/Blocks.hs view
@@ -270,7 +270,16 @@     (eq', idx) <- replaceEqn opts attrs eq     replaceNoRecurse $ Div attrs [       simpleTable [AlignCenter, AlignRight] [ColWidth 0.9, ColWidth 0.09]-       [[[Plain [Math DisplayMath eq']], [Plain [Math DisplayMath $ "(" <> idx <> ")"]]]]]+       [[[Plain [Math DisplayMath eq']], [eqnNumber idx]]]]+  where+  eqnNumber idx+    | outFormat opts == Just (Format "docx")+    = Div nullAttr [+        RawBlock (Format "openxml") "<w:tcPr><w:vAlign w:val=\"center\"/></w:tcPr>"+      , mathIdx+      ]+    | otherwise = mathIdx+    where mathIdx = Plain [Math DisplayMath $ "(" <> idx <> ")"] replaceBlock _ _ = noReplaceRecurse  replaceEqn :: Options -> Attr -> T.Text -> WS (T.Text, T.Text)@@ -283,22 +292,23 @@       idxTxt = stringify idxStr   return (eq', idxTxt) -replaceInline :: Options -> Inline -> WS (ReplacedResult Inline)-replaceInline opts (Span attrs@(label,_,_) [Math DisplayMath eq])+replaceInline :: Options -> [Inline] -> WS (ReplacedResult [Inline])+replaceInline opts (Span attrs@(label,_,_) [Math DisplayMath eq]:xs)   | "eq:" `T.isPrefixOf` label || T.null label && autoEqnLabels opts-  = replaceNoRecurse . Span attrs . (:[]) =<< case outFormat opts of+  = replaceNoRecurse . (<>xs) =<< case outFormat opts of       f | isLatexFormat f ->-        pure . RawInline (Format "latex")-        $ "\\begin{equation}"<>eq<>mkLaTeXLabel label<>"\\end{equation}"-      _ -> Math DisplayMath . fst <$> replaceEqn opts attrs eq-replaceInline opts (Image attr@(label,_,attrs) alt img@(_, tit))+        pure [RawInline (Format "latex") "\\begin{equation}"+        , Span attrs [RawInline (Format "latex") eq]+        , RawInline (Format "latex") $ mkLaTeXLabel label <> "\\end{equation}"]+      _ -> pure . Span attrs . (:[]) . Math DisplayMath . fst <$> replaceEqn opts attrs eq+replaceInline opts (Image attr@(label,_,attrs) alt img@(_, tit):xs)   | "fig:" `T.isPrefixOf` label && "fig:" `T.isPrefixOf` tit   = do     idxStr <- replaceAttr opts (Right label) (lookup "label" attrs) alt imgRefs     let alt' = case outFormat opts of           f | isLatexFormat f -> alt           _  -> applyTemplate idxStr alt $ figureTemplate opts-    replaceNoRecurse $ Image attr alt' img+    replaceNoRecurse $ Image attr alt' img:xs replaceInline _ _ = noReplaceRecurse  replaceSubfigs :: Options -> [Inline] -> WS (ReplacedResult [Inline])
pandoc-crossref.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.2.+-- This file has been generated from package.yaml by hpack version 0.33.0. -- -- see: https://github.com/sol/hpack ----- hash: 232423e0b6a509d19ce5c9a2f9de39e0e1a56b2021f29f1ddec8cd41f4a15db8+-- hash: 16b94461d13008e2ca6ada6c83e8f56a855b54be95bc2d50ee6c0a4367bd1232  name:           pandoc-crossref-version:        0.3.7.0+version:        0.3.8.0 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
test/m2m/delim/expect.tex view
@@ -13,20 +13,20 @@ Some of those can be labelled:  This is a test file with some referenced equations, line-\protect\hypertarget{eq:0}{}{\begin{equation} this \label{eq:0}\end{equation}}+\begin{equation}\protect\hypertarget{eq:0}{}{ this }\label{eq:0}\end{equation}  Some equations might be inside of text,-\protect\hypertarget{eq:1}{}{\begin{equation} for example \label{eq:1}\end{equation}}+\begin{equation}\protect\hypertarget{eq:1}{}{ for example }\label{eq:1}\end{equation} this one.  Some equations might be on start of paragraphs: -\protect\hypertarget{eq:2}{}{\begin{equation} start \label{eq:2}\end{equation}}+\begin{equation}\protect\hypertarget{eq:2}{}{ start }\label{eq:2}\end{equation} of paragraph.  Other might be on separate paragraphs of their own: -\protect\hypertarget{eq:3}{}{\begin{equation} separate \label{eq:3}\end{equation}}+\begin{equation}\protect\hypertarget{eq:3}{}{ separate }\label{eq:3}\end{equation}  Then they can be referenced: 
test/m2m/equations-auto/expect.tex view
@@ -1,34 +1,34 @@ This is a test file with some referenced equations, line-{\begin{equation} this \end{equation}}+\begin{equation}{ this }\end{equation}  Some equations might be inside of text,-{\begin{equation} for example \end{equation}} this one.+\begin{equation}{ for example }\end{equation} this one.  Some equations might be on start of paragraphs: -{\begin{equation} start \end{equation}} of paragraph.+\begin{equation}{ start }\end{equation} of paragraph.  Other might be on separate paragraphs of their own: -{\begin{equation} separate \end{equation}}+\begin{equation}{ separate }\end{equation}  Some of those can be labelled:  This is a test file with some referenced equations, line-\protect\hypertarget{eq:0}{}{\begin{equation} this \label{eq:0}\end{equation}}+\begin{equation}\protect\hypertarget{eq:0}{}{ this }\label{eq:0}\end{equation}  Some equations might be inside of text,-\protect\hypertarget{eq:1}{}{\begin{equation} for example \label{eq:1}\end{equation}}+\begin{equation}\protect\hypertarget{eq:1}{}{ for example }\label{eq:1}\end{equation} this one.  Some equations might be on start of paragraphs: -\protect\hypertarget{eq:2}{}{\begin{equation} start \label{eq:2}\end{equation}}+\begin{equation}\protect\hypertarget{eq:2}{}{ start }\label{eq:2}\end{equation} of paragraph.  Other might be on separate paragraphs of their own: -\protect\hypertarget{eq:3}{}{\begin{equation} separate \label{eq:3}\end{equation}}+\begin{equation}\protect\hypertarget{eq:3}{}{ separate }\label{eq:3}\end{equation}  Then they can be referenced: 
test/m2m/equations-tables-auto/expect.tex view
@@ -1,34 +1,34 @@ This is a test file with some referenced equations, line-{\begin{equation} this \end{equation}}+\begin{equation}{ this }\end{equation}  Some equations might be inside of text,-{\begin{equation} for example \end{equation}} this one.+\begin{equation}{ for example }\end{equation} this one.  Some equations might be on start of paragraphs: -{\begin{equation} start \end{equation}} of paragraph.+\begin{equation}{ start }\end{equation} of paragraph.  Other might be on separate paragraphs of their own: -{\begin{equation} separate \end{equation}}+\begin{equation}{ separate }\end{equation}  Some of those can be labelled:  This is a test file with some referenced equations, line-\protect\hypertarget{eq:0}{}{\begin{equation} this \label{eq:0}\end{equation}}+\begin{equation}\protect\hypertarget{eq:0}{}{ this }\label{eq:0}\end{equation}  Some equations might be inside of text,-\protect\hypertarget{eq:1}{}{\begin{equation} for example \label{eq:1}\end{equation}}+\begin{equation}\protect\hypertarget{eq:1}{}{ for example }\label{eq:1}\end{equation} this one.  Some equations might be on start of paragraphs: -\protect\hypertarget{eq:2}{}{\begin{equation} start \label{eq:2}\end{equation}}+\begin{equation}\protect\hypertarget{eq:2}{}{ start }\label{eq:2}\end{equation} of paragraph.  Other might be on separate paragraphs of their own: -\protect\hypertarget{eq:3}{}{\begin{equation} separate \label{eq:3}\end{equation}}+\begin{equation}\protect\hypertarget{eq:3}{}{ separate }\label{eq:3}\end{equation}  Then they can be referenced: 
test/m2m/equations-tables/expect.tex view
@@ -13,20 +13,20 @@ Some of those can be labelled:  This is a test file with some referenced equations, line-\protect\hypertarget{eq:0}{}{\begin{equation} this \label{eq:0}\end{equation}}+\begin{equation}\protect\hypertarget{eq:0}{}{ this }\label{eq:0}\end{equation}  Some equations might be inside of text,-\protect\hypertarget{eq:1}{}{\begin{equation} for example \label{eq:1}\end{equation}}+\begin{equation}\protect\hypertarget{eq:1}{}{ for example }\label{eq:1}\end{equation} this one.  Some equations might be on start of paragraphs: -\protect\hypertarget{eq:2}{}{\begin{equation} start \label{eq:2}\end{equation}}+\begin{equation}\protect\hypertarget{eq:2}{}{ start }\label{eq:2}\end{equation} of paragraph.  Other might be on separate paragraphs of their own: -\protect\hypertarget{eq:3}{}{\begin{equation} separate \label{eq:3}\end{equation}}+\begin{equation}\protect\hypertarget{eq:3}{}{ separate }\label{eq:3}\end{equation}  Then they can be referenced: 
test/m2m/equations/expect.tex view
@@ -13,20 +13,20 @@ Some of those can be labelled:  This is a test file with some referenced equations, line-\protect\hypertarget{eq:0}{}{\begin{equation} this \label{eq:0}\end{equation}}+\begin{equation}\protect\hypertarget{eq:0}{}{ this }\label{eq:0}\end{equation}  Some equations might be inside of text,-\protect\hypertarget{eq:1}{}{\begin{equation} for example \label{eq:1}\end{equation}}+\begin{equation}\protect\hypertarget{eq:1}{}{ for example }\label{eq:1}\end{equation} this one.  Some equations might be on start of paragraphs: -\protect\hypertarget{eq:2}{}{\begin{equation} start \label{eq:2}\end{equation}}+\begin{equation}\protect\hypertarget{eq:2}{}{ start }\label{eq:2}\end{equation} of paragraph.  Other might be on separate paragraphs of their own: -\protect\hypertarget{eq:3}{}{\begin{equation} separate \label{eq:3}\end{equation}}+\begin{equation}\protect\hypertarget{eq:3}{}{ separate }\label{eq:3}\end{equation}  Then they can be referenced: 
@@ -13,20 +13,20 @@ Some of those can be labelled:  This is a test file with some referenced equations, line-\protect\hypertarget{eq:0}{}{\begin{equation} this \label{eq:0}\end{equation}}+\begin{equation}\protect\hypertarget{eq:0}{}{ this }\label{eq:0}\end{equation}  Some equations might be inside of text,-\protect\hypertarget{eq:1}{}{\begin{equation} for example \label{eq:1}\end{equation}}+\begin{equation}\protect\hypertarget{eq:1}{}{ for example }\label{eq:1}\end{equation} this one.  Some equations might be on start of paragraphs: -\protect\hypertarget{eq:2}{}{\begin{equation} start \label{eq:2}\end{equation}}+\begin{equation}\protect\hypertarget{eq:2}{}{ start }\label{eq:2}\end{equation} of paragraph.  Other might be on separate paragraphs of their own: -\protect\hypertarget{eq:3}{}{\begin{equation} separate \label{eq:3}\end{equation}}+\begin{equation}\protect\hypertarget{eq:3}{}{ separate }\label{eq:3}\end{equation}  Then they can be referenced: 
test/m2m/links/expect.tex view
@@ -13,20 +13,20 @@ Some of those can be labelled:  This is a test file with some referenced equations, line-\protect\hypertarget{eq:0}{}{\begin{equation} this \label{eq:0}\end{equation}}+\begin{equation}\protect\hypertarget{eq:0}{}{ this }\label{eq:0}\end{equation}  Some equations might be inside of text,-\protect\hypertarget{eq:1}{}{\begin{equation} for example \label{eq:1}\end{equation}}+\begin{equation}\protect\hypertarget{eq:1}{}{ for example }\label{eq:1}\end{equation} this one.  Some equations might be on start of paragraphs: -\protect\hypertarget{eq:2}{}{\begin{equation} start \label{eq:2}\end{equation}}+\begin{equation}\protect\hypertarget{eq:2}{}{ start }\label{eq:2}\end{equation} of paragraph.  Other might be on separate paragraphs of their own: -\protect\hypertarget{eq:3}{}{\begin{equation} separate \label{eq:3}\end{equation}}+\begin{equation}\protect\hypertarget{eq:3}{}{ separate }\label{eq:3}\end{equation}  Then they can be referenced: 
test/test-pandoc-crossref.hs view
@@ -307,7 +307,7 @@         it "Eqn labels" $           equation "x^2" "some_equation1"             <> para (citeGen "eq:some_equation" [1])-            `test` "\\protect\\hypertarget{eq:some_equation1}{}{\\begin{equation}x^2\\label{eq:some_equation1}\\end{equation}}\n\neq.~\\ref{eq:some_equation1}"+            `test` "\\begin{equation}\\protect\\hypertarget{eq:some_equation1}{}{x^2}\\label{eq:some_equation1}\\end{equation}\n\neq.~\\ref{eq:some_equation1}"  #ifdef FLAKY         it "Tbl labels" $