From 39f09285c43cc708f788ee0bec967234f587a1e2 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Sun, 13 Jun 2010 23:45:36 +0200 Subject: [PATCH] l2l, l2l_scanner: Added a TOC. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit For this purpose, use \section rather than \section* and set the ‘secnumdepth’ counter to -1 to remove the (sub)section numbers. --- src/l2l.c | 1 + src/l2l_scanner.l | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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); } -- 2.30.2