From 6bf3f89d69f96f043f63600e199e53c8cfac680c Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 13 Mar 2017 22:11:10 +0100 Subject: Better handling of \part in LaTeX. Closes #1905. Removed stateChapters from ParserState. Now we parse chapters as level 0 headers, and parts as level -1 headers. After parsing, we check for the lowest header level, and if it's less than 1 we bump everything up so that 1 is the lowest header level. So `\part` will always produce a header; no command-line options are needed. --- test/command/1905.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 test/command/1905.md (limited to 'test/command') diff --git a/test/command/1905.md b/test/command/1905.md new file mode 100644 index 000000000..744d1c4d9 --- /dev/null +++ b/test/command/1905.md @@ -0,0 +1,30 @@ +``` +% pandoc -f latex-auto_identifiers -t html +\chapter{chapone} +\part{partone} +\chapter{chaptwo} +\section{secone} +^D +

chapone

+

partone

+

chaptwo

+

secone

+``` + +``` +% pandoc -f latex-auto_identifiers -t html +\chapter{chapone} +\chapter{chaptwo} +\section{secone} +^D +

chapone

+

chaptwo

+

secone

+``` + +``` +% pandoc -f latex-auto_identifiers -t html +\section{secone} +^D +

secone

+``` -- cgit v1.2.3