diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-03-13 22:11:10 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-03-13 22:11:10 +0100 |
commit | 6bf3f89d69f96f043f63600e199e53c8cfac680c (patch) | |
tree | 2a3e2d01afd2d1fb610c460680b799e66acaa274 /test/command/1905.md | |
parent | d5086e7bd77e62dbdb6256c7586c7aed0c614d38 (diff) |
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.
Diffstat (limited to 'test/command/1905.md')
-rw-r--r-- | test/command/1905.md | 30 |
1 files changed, 30 insertions, 0 deletions
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 +<h2>chapone</h2> +<h1>partone</h1> +<h2>chaptwo</h2> +<h3>secone</h3> +``` + +``` +% pandoc -f latex-auto_identifiers -t html +\chapter{chapone} +\chapter{chaptwo} +\section{secone} +^D +<h1>chapone</h1> +<h1>chaptwo</h1> +<h2>secone</h2> +``` + +``` +% pandoc -f latex-auto_identifiers -t html +\section{secone} +^D +<h1>secone</h1> +``` |