From cdfd6e8c4b21e20db62bd71640552adc9162b42c Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Thu, 14 Oct 2010 20:41:42 +0200 Subject: [PATCH] l2l, l2l_scanner: Typeset all of the document in two column mode. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit … except abstract and TOC. This will avoid a pagebreak after the TOC and before starting two column mode. --- src/l2l.c | 2 +- src/l2l_scanner.l | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) 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); -- 2.30.2