diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-09-09 22:53:18 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-09-09 22:53:18 -0700 |
commit | fa4ebd71a33a3ca1b435bda34fce91f4a13055f5 (patch) | |
tree | 23869676a88d75fceba6f38f5b7740b8b1d62158 /test | |
parent | 5df45fd1fe62e828827872bd46d9a7bf91e8c139 (diff) | |
download | pandoc-fa4ebd71a33a3ca1b435bda34fce91f4a13055f5.tar.gz |
LaTeX reader: resolve `\ref` for figure numbers.
Diffstat (limited to 'test')
-rw-r--r-- | test/command/refs.md | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/test/command/refs.md b/test/command/refs.md index dd62fa33d..8b58ea6d7 100644 --- a/test/command/refs.md +++ b/test/command/refs.md @@ -43,11 +43,54 @@ Accuracy~\eqref{eq:Accuracy} is the proportion, measuring true results among all Figure \ref{fig:Logo} illustrated the SVG logo ^D [Para [Image ("fig:Logo",[],[]) [Str "Logo",Span ("",[],[("label","fig:Logo")]) []] ("command/SVG_logo.svg","fig:")] -,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"]] +,Para [Str "Figure",Space,Link ("",[],[("reference-type","ref"),("reference","fig:Logo")]) [Str "1"] ("#fig:Logo",""),Space,Str "illustrated",Space,Str "the",Space,Str "SVG",Space,Str "logo"]] ``` ``` % pandoc -f latex -t native +\chapter{One} +\begin{figure} + \includegraphics{command/SVG_logo.svg} + \caption{Logo} + \label{fig:Logo} +\end{figure} + +\begin{figure} + \includegraphics{command/SVG_logo2.svg} + \caption{Logo2} + \label{fig:Logo2} +\end{figure} + +\chapter{Two} + +\section{Subone} + +\begin{figure} + \includegraphics{command/SVG_logo3.svg} + \caption{Logo3} + \label{fig:Logo3} +\end{figure} + +Figure \ref{fig:Logo} illustrated the SVG logo + +Figure \ref{fig:Logo2} illustrated the SVG logo + +Figure \ref{fig:Logo3} illustrated the SVG logo +^D +[Header 1 ("one",[],[]) [Str "One"] +,Para [Image ("fig:Logo",[],[]) [Str "Logo",Span ("",[],[("label","fig:Logo")]) []] ("command/SVG_logo.svg","fig:")] +,Para [Image ("fig:Logo2",[],[]) [Str "Logo2",Span ("",[],[("label","fig:Logo2")]) []] ("command/SVG_logo2.svg","fig:")] +,Header 1 ("two",[],[]) [Str "Two"] +,Header 2 ("subone",[],[]) [Str "Subone"] +,Para [Image ("fig:Logo3",[],[]) [Str "Logo3",Span ("",[],[("label","fig:Logo3")]) []] ("command/SVG_logo3.svg","fig:")] +,Para [Str "Figure",Space,Link ("",[],[("reference-type","ref"),("reference","fig:Logo")]) [Str "1.1"] ("#fig:Logo",""),Space,Str "illustrated",Space,Str "the",Space,Str "SVG",Space,Str "logo"] +,Para [Str "Figure",Space,Link ("",[],[("reference-type","ref"),("reference","fig:Logo2")]) [Str "1.2"] ("#fig:Logo2",""),Space,Str "illustrated",Space,Str "the",Space,Str "SVG",Space,Str "logo"] +,Para [Str "Figure",Space,Link ("",[],[("reference-type","ref"),("reference","fig:Logo3")]) [Str "2.1"] ("#fig:Logo3",""),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 ("section",[],[("label","section")]) [Str "[section]"],Space,Str "Section",Space,Link ("",[],[("reference-type","ref"),("reference","section")]) [Str "[section]"] ("#section","")]] |