Mercurial > projects > dil
comparison src/docgen/page/latexwriter.d @ 806:bcb74c9b895c
Moved out files in the trunk folder to the root.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Sun, 09 Mar 2008 00:12:19 +0100 |
parents | trunk/src/docgen/page/latexwriter.d@db7e27b5c180 |
children |
comparison
equal
deleted
inserted
replaced
805:a3fab8b74a7d | 806:bcb74c9b895c |
---|---|
1 /** | |
2 * Author: Jari-Matti Mäkelä | |
3 * License: GPL3 | |
4 */ | |
5 module docgen.page.latexwriter; | |
6 | |
7 import docgen.page.writer; | |
8 import tango.io.FileConduit : FileConduit; | |
9 | |
10 /** | |
11 * Writes a LaTeX document skeleton. | |
12 */ | |
13 class LaTeXWriter : AbstractPageWriter!("latex", 1) { | |
14 this(PageWriterFactory factory, OutputStream[] outputs) { | |
15 super(factory, outputs); | |
16 } | |
17 | |
18 void generateFirstPage() { | |
19 print.format( | |
20 getTemplate("firstpage"), | |
21 factory.options.templates.paperSize, | |
22 factory.options.templates.title, | |
23 factory.options.templates.versionString, | |
24 docgen_version, | |
25 timeNow(), | |
26 factory.options.listing.literateStyle ? "" : "%" | |
27 ); | |
28 } | |
29 | |
30 void addList(char[][] contents, bool ordered) { | |
31 foreach(item; contents) { | |
32 switch(item) { | |
33 case "(": print(ordered ? "\\begin{enumerate}" : "\\begin{itemize}"); continue; | |
34 case ")": print(ordered ? "\\end{enumerate}" : "\\end{itemize}"); continue; | |
35 default: print("\\item")(item)(\n); | |
36 } | |
37 } | |
38 } | |
39 } |