Code

l2l, l2l_scanner: Typeset all of the document in two column mode.
authorSebastian Harl <sh@tokkee.org>
Thu, 14 Oct 2010 18:41:42 +0000 (20:41 +0200)
committerSebastian Harl <sh@tokkee.org>
Thu, 14 Oct 2010 18:41:42 +0000 (20:41 +0200)
… except abstract and TOC.

This will avoid a pagebreak after the TOC and before starting two column mode.

src/l2l.c
src/l2l_scanner.l

index 499ed7f039d91e5866e99c132862e4d5773d8698..840f630acc0e437fd9c9adde6662bc03a20d3f02 100644 (file)
--- a/src/l2l.c
+++ b/src/l2l.c
@@ -47,7 +47,7 @@ write_tex_preamble(FILE *out)
        assert(out);
 
        fprintf(out,
-"\\documentclass[11pt,a4paper,twoside]{article}\n"
+"\\documentclass[11pt,a4paper,twoside,twocolumn]{article}\n"
 "\n"
 "\\usepackage{ifpdf}\n"
 "\n"
index 3cf3c8ed0c6157011d7fc5b9acb809ea29480672..6e4f2a02425a69ddb6bbc8b76d83d11bfe201e65 100644 (file)
@@ -345,14 +345,22 @@ 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{document}\n\n");
                l2l_scanner_state = L2L_BODY;
 
-               fprintf(yyout, "\\maketitle\n\n");
+               fprintf(yyout, "\\twocolumn[\n"
+                               "\\begin{@twocolumnfalse}\n"
+                               "\\maketitle\n\n");
 
                if (l2l_abstract.len)
                        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");
+               fprintf(yyout, "\\rule{\\textwidth}{1pt}\n"
+                               "\\begin{center}\n"
+                               "\\begin{minipage}{.75\\textwidth}\n"
+                               "\\tableofcontents\n"
+                               "\\end{minipage}\n"
+                               "\\end{center}\n"
+                               "\\rule{\\textwidth}{1pt}\n"
+                               "\\end{@twocolumnfalse}\n]\n\n");
        }
 
        yyless(0);