From: Sebastian Harl Date: Thu, 14 Oct 2010 18:41:42 +0000 (+0200) Subject: l2l, l2l_scanner: Typeset all of the document in two column mode. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cdfd6e8c4b21e20db62bd71640552adc9162b42c;p=lm2latex.git l2l, l2l_scanner: Typeset all of the document in two column mode. … except abstract and TOC. This will avoid a pagebreak after the TOC and before starting two column mode. --- diff --git a/src/l2l.c b/src/l2l.c index 499ed7f..840f630 100644 --- 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" diff --git a/src/l2l_scanner.l b/src/l2l_scanner.l index 3cf3c8e..6e4f2a0 100644 --- a/src/l2l_scanner.l +++ b/src/l2l_scanner.l @@ -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);