diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-08-16 10:46:56 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-08-16 10:56:12 -0700 |
commit | db715ca84797c8fc945392b61c1642434e8fb2b1 (patch) | |
tree | dff15b9544e3c8af1a14a1785f50c7e5cd581454 /test | |
parent | c6ec189a966c100a7992cc633d88efdd176c2a46 (diff) | |
download | pandoc-db715ca84797c8fc945392b61c1642434e8fb2b1.tar.gz |
LaTeX reader: use Link instead of Span for `\ref`.
This makes more sense semantically and avoids unnecessary
Span [Link] nestings when references are resolved.
Diffstat (limited to 'test')
-rw-r--r-- | test/command/refs.md | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/command/refs.md b/test/command/refs.md index d933235d7..78af1ebdd 100644 --- a/test/command/refs.md +++ b/test/command/refs.md @@ -2,21 +2,21 @@ % pandoc -f latex -t native Figure \ref{fig:1} ^D -[Para [Str "Figure",Space,Span ("",[],[("reference-type","ref"),("reference","fig:1")]) [Str "[fig:1]"]]] +[Para [Str "Figure",Space,Link ("",[],[("reference-type","ref"),("reference","fig:1")]) [Str "[fig:1]"] ("#fig:1","")]] ``` ``` % pandoc -f latex -t native Figure \cref{fig:1} ^D -[Para [Str "Figure",Space,Span ("",[],[("reference-type","ref"),("reference","fig:1")]) [Str "[fig:1]"]]] +[Para [Str "Figure",Space,Link ("",[],[("reference-type","ref"),("reference","fig:1")]) [Str "[fig:1]"] ("#fig:1","")]] ``` ``` % pandoc -f latex -t native Figure \vref{fig:1} ^D -[Para [Str "Figure",Space,Span ("",[],[("reference-type","ref+page"),("reference","fig:1")]) [Str "[fig:1]"]]] +[Para [Str "Figure",Space,Link ("",[],[("reference-type","ref+page"),("reference","fig:1")]) [Str "[fig:1]"] ("#fig:1","")]] ``` ``` @@ -28,7 +28,7 @@ Accuracy~\eqref{eq:Accuracy} is the proportion, measuring true results among all Accuracy = \frac{t_p + t_n}{t_p + f_p + f_n + t_n} \end{equation} ^D -[Para [Str "Accuracy\160",Span ("",[],[("reference-type","eqref"),("reference","eq:Accuracy")]) [Str "[eq:Accuracy]"],Space,Str "is",Space,Str "the",Space,Str "proportion,",Space,Str "measuring",Space,Str "true",Space,Str "results",Space,Str "among",Space,Str "all",Space,Str "results."] +[Para [Str "Accuracy\160",Link ("",[],[("reference-type","eqref"),("reference","eq:Accuracy")]) [Str "[eq:Accuracy]"] ("#eq:Accuracy",""),Space,Str "is",Space,Str "the",Space,Str "proportion,",Space,Str "measuring",Space,Str "true",Space,Str "results",Space,Str "among",Space,Str "all",Space,Str "results."] ,Para [Math DisplayMath "\\label{eq:Accuracy}\n Accuracy = \\frac{t_p + t_n}{t_p + f_p + f_n + t_n}"]] ``` @@ -43,12 +43,12 @@ Accuracy~\eqref{eq:Accuracy} is the proportion, measuring true results among all Figure \ref{fig:Logo} illustrated the SVG logo ^D [Para [Image ("",[],[]) [Str "Logo",Span ("",[],[("label","fig:Logo")]) []] ("command/SVG_logo.svg","fig:")] -,Para [Str "Figure",Space,Span ("",[],[("reference-type","ref"),("reference","fig:Logo")]) [Str "[fig:Logo]"],Space,Str "illustrated",Space,Str "the",Space,Str "SVG",Space,Str "logo"]] +,Para [Str "Figure",Space,Link ("",[],[("reference-type","ref"),("reference","fig:Logo")]) [Str "[fig:Logo]"] ("#fig:Logo",""),Space,Str "illustrated",Space,Str "the",Space,Str "SVG",Space,Str "logo"]] ``` ``` % pandoc -f latex -t native \label{section} Section \ref{section} ^D -[Para [Span ("",[],[("label","section")]) [Str "[section]"],Space,Str "Section",Space,Span ("",[],[("reference-type","ref"),("reference","section")]) [Str "[section]"]]] +[Para [Span ("",[],[("label","section")]) [Str "[section]"],Space,Str "Section",Space,Link ("",[],[("reference-type","ref"),("reference","section")]) [Str "[section]"] ("#section","")]] ``` |