From: Sebastian Harl Date: Sun, 13 Jun 2010 21:45:36 +0000 (+0200) Subject: l2l, l2l_scanner: Added a TOC. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=39f09285c43cc708f788ee0bec967234f587a1e2;p=lm2latex.git l2l, l2l_scanner: Added a TOC. For this purpose, use \section rather than \section* and set the ‘secnumdepth’ counter to -1 to remove the (sub)section numbers. --- diff --git a/src/l2l.c b/src/l2l.c index 963ec57..499ed7f 100644 --- a/src/l2l.c +++ b/src/l2l.c @@ -86,6 +86,7 @@ write_tex_preamble(FILE *out) "\\setlength{\\parskip}{6pt}\n" "\n" "\\renewcommand{\\captionfont}{\\footnotesize}\n" +"\\setcounter{secnumdepth}{-1}\n" "\n" "\\renewcommand{\\headrulewidth}{0.4pt}\n" "\\renewcommand{\\footrulewidth}{0pt}\n" diff --git a/src/l2l_scanner.l b/src/l2l_scanner.l index cf7000c..3cf3c8e 100644 --- a/src/l2l_scanner.l +++ b/src/l2l_scanner.l @@ -351,6 +351,7 @@ ANY_COMMAND @(R|SW|D|T|V|A|L|ZT|LI|B|Bi|IT|IL|IE|KT|KL|KE|TT|TH|TL|TE): fprintf(yyout, "\\begin{abstract}\n%s\n" "\\end{abstract}\n\n", l2l_abstract.data); + fprintf(yyout, "\\vspace{10mm}\\tableofcontents\n\n"); fprintf(yyout, "\\twocolumn\n\n"); } @@ -393,7 +394,7 @@ ANY_COMMAND @(R|SW|D|T|V|A|L|ZT|LI|B|Bi|IT|IL|IE|KT|KL|KE|TT|TH|TL|TE): . ECHO; @ZT:{WHITESPACE}* { - fprintf(yyout, "\\subsection*{"); + fprintf(yyout, "\\subsection{"); BEGIN(command); }