Code

l2l, l2l_scanner: Added a TOC.
authorSebastian Harl <sh@tokkee.org>
Sun, 13 Jun 2010 21:45:36 +0000 (23:45 +0200)
committerSebastian Harl <sh@tokkee.org>
Sun, 13 Jun 2010 21:45:36 +0000 (23:45 +0200)
For this purpose, use \section rather than \section* and set the ‘secnumdepth’
counter to -1 to remove the (sub)section numbers.

src/l2l.c
src/l2l_scanner.l

index 963ec57c4935a62c3881a45b82cbc9edf4d1b8ea..499ed7f039d91e5866e99c132862e4d5773d8698 100644 (file)
--- 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"
index cf7000c567cf1bdc2925b8a136fe2d53f89937fc..3cf3c8ed0c6157011d7fc5b9acb809ea29480672 100644 (file)
@@ -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):
 <itemize>. ECHO;
 
 @ZT:{WHITESPACE}* {
-       fprintf(yyout, "\\subsection*{");
+       fprintf(yyout, "\\subsection{");
        BEGIN(command);
 }