From: Fletcher T. Penney Date: Tue, 7 Mar 2017 01:45:33 +0000 (-0500) Subject: ADDED: Use native command for table of contents in LaTeX X-Git-Tag: 6.0.0-b1^2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3001b57464c3eb0845a0980ea99a79d61d63c4bf;p=multimarkdown ADDED: Use native command for table of contents in LaTeX --- diff --git a/Sources/libMultiMarkdown/latex.c b/Sources/libMultiMarkdown/latex.c index b2a09b4..0a6d7e5 100644 --- a/Sources/libMultiMarkdown/latex.c +++ b/Sources/libMultiMarkdown/latex.c @@ -752,9 +752,7 @@ void mmd_export_token_latex(DString * out, const char * source, token * t, scrat temp_short = 0; temp_short2 = 0; pad(out, 2, scratch); - - mmd_export_toc_latex(out, source, scratch); - + print_const("\\tableofcontents"); scratch->padded = 0; break; case BRACE_DOUBLE_LEFT: diff --git a/tests/MMD6Tests/Table of Contents.tex b/tests/MMD6Tests/Table of Contents.tex index 4b4fb19..9b99b2b 100644 --- a/tests/MMD6Tests/Table of Contents.tex +++ b/tests/MMD6Tests/Table of Contents.tex @@ -2,59 +2,7 @@ \def\mytitle{Table of Contents} \input{mmd6-article-begin} -\begin{itemize} - -\item{} Second Level (\autoref{secondlevel}) - -\item{} First Level (\autoref{firstlevel}) - -\begin{itemize} - -\item{} Second Level b (\autoref{secondlevelb}) - -\begin{itemize} - -\item{} Third Level (\autoref{thirdlevel}) - -\end{itemize} - -\item{} Second Level c (\autoref{secondlevelc}) - -\end{itemize} - -\item{} First Level b (\autoref{firstlevelb}) - -\begin{itemize} - -\item{} Third Level b (\autoref{thirdlevelb}) - -\item{} Second level d (\autoref{secondleveld}) - -\begin{itemize} - -\item{} Third level d (\autoref{thirdleveld}) - -\begin{itemize} - -\item{} Fourth level d (\autoref{fourthleveld}) - -\end{itemize} - -\end{itemize} - -\end{itemize} - -\item{} First level (\autoref{firstlevele}) - -\begin{itemize} - -\item{} Second level (\autoref{secondlevele}) - -\end{itemize} - -\end{itemize} - - +\tableofcontents \chapter{Second Level } \label{secondlevel}