pandoc/test/command/1905.md
John MacFarlane 6bf3f89d69 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.
2017-03-13 22:11:10 +01:00

435 B

% 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>