aboutsummaryrefslogtreecommitdiff
path: root/test/command/4529.md
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-04-05 10:12:24 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-04-05 10:14:06 -0700
commitd77e8f45c9eba5dc5aca579a009a4cd78fbcbc54 (patch)
tree05c0391f504232f1db7cc58e27d08a709b471045 /test/command/4529.md
parent87dda2109d01098dcf41c01559d3e91e2627cd10 (diff)
downloadpandoc-d77e8f45c9eba5dc5aca579a009a4cd78fbcbc54.tar.gz
LaTEX reader: properly resolve section numbers with \ref and chapters.
Closes #4529.
Diffstat (limited to 'test/command/4529.md')
-rw-r--r--test/command/4529.md36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/command/4529.md b/test/command/4529.md
new file mode 100644
index 000000000..4a2125b9c
--- /dev/null
+++ b/test/command/4529.md
@@ -0,0 +1,36 @@
+```
+% pandoc -f latex -t plain
+\chapter{First chapter}\label{sec:chp1}
+The next chapter is Chapter~\ref{sec:chp2}.
+\section{First section}\label{sec:chp1sec1}
+The next section is Section~\ref{sec:chp2sec1}.
+
+\chapter{Second chapter}\label{sec:chp2}
+The previous chapter is Chapter~\ref{sec:chp1}.
+\section{First section}\label{sec:chp2sec1}
+The previous section is Section~\ref{sec:chp1sec1}.
+^D
+
+
+FIRST CHAPTER
+
+
+The next chapter is Chapter 2.
+
+
+First section
+
+The next section is Section 2.1.
+
+
+
+SECOND CHAPTER
+
+
+The previous chapter is Chapter 1.
+
+
+First section
+
+The previous section is Section 1.1.
+```