]> granicus.if.org Git - multimarkdown/commitdiff
ADDED: Use native command for table of contents in LaTeX
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Tue, 7 Mar 2017 01:45:33 +0000 (20:45 -0500)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Tue, 7 Mar 2017 01:45:33 +0000 (20:45 -0500)
Sources/libMultiMarkdown/latex.c
tests/MMD6Tests/Table of Contents.tex

index b2a09b4364f41045a3ee1850d8f0e237c055b294..0a6d7e57f598e633955bb1a6b4ce395930ecaf05 100644 (file)
@@ -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:
index 4b4fb19ed39e9a7498103580007f5c6413766605..9b99b2b6573f02f39f32a73bc2520667f6dc6045 100644 (file)
@@ -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}