X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mDoc.git/blobdiff_plain/767e7ae1ccbec9c706243a85ac57be2e40de1f6a..cc019cff99afcf7a93de4bca22c19f996aa07937:/python/mDoc/tpl/latex.tpl diff --git a/python/mDoc/tpl/latex.tpl b/python/mDoc/tpl/latex.tpl index fbcbbbb..8068863 100644 --- a/python/mDoc/tpl/latex.tpl +++ b/python/mDoc/tpl/latex.tpl @@ -1,12 +1,80 @@ - + + + expected in : "+elem) +cols = int(attrs["cols"]) +colsep = "" +if attrs["colsep"] == "1": + colsep = "|" +rowsep = False +if attrs["rowsep"] == "1": + rowsep = True +align = "r" +if attrs["align"] == "left": + align = "l" +align_arr = cols*[align] +(ctl,elem, value, attrs) = source.extractElement(XMLE.EC_BEG) # searches tbody +while ctl != XMLE.EC_END: + + if elem == "colspec": # colspec found + if "colwidth" in attrs: + align_arr[int(attrs["colnum"])-1] = "p{"+attrs["colwidth"]+"}" + + if elem == "tbody": # tbody found + out += r"\begin{tabular}{" + tmp_colsep = "" + for i in range(cols): + out += tmp_colsep + align_arr[i] + tmp_colsep = colsep + out += "}\n" + (ctl1,elem, value, attrs) = source.extractElement(XMLE.EC_BEG) # reads row + while ctl1 != XMLE.EC_END: + if elem != "row": + raise RuntimeError("Only expected in : "+elem) + (ctl2,elem, value,attrs) = source.extractElement(XMLE.EC_BEG) # reads entry + entry_sep = "" + while ctl2 != XMLE.EC_END: + if not value: + value = "" + if elem != "entry": + raise RuntimeError("Only expected in : "+elem) + # check for further elems + (ctl3,elem,value3,attrs3) = source.extractElement(XMLE.EC_BEG) + line_sep = "" + while ctl3 != XMLE.EC_END: + if elem != "line": # only lines expected + raise RuntimeError("Only expected in + + + + + + + +
testdata - - + http://texwelt.de/wissen/fragen/2656/ \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} @@ -16,19 +84,38 @@ \geometry{a4paper,left=25mm,right=20mm, top=33mm, bottom=30mm} \renewcommand{\familydefault}{\sfdefault} +\renewcommand{\arraystretch}{1.4} \author{Michael J.M. Wagner} -\date{\vspace{-6ex}} \CenterWallPaper{1}{wagner_tech_briefbogen_blau_fs1.pdf} \setcounter{secnumdepth}{0} % keine Kapitelnummerierung ]]> - -<![CDATA[\title{$value}]]> - + + + <pubdate pre="\date{" post="}"/> +</articleinfo> +<articleinfo position="last"> +<![CDATA[ +\begin{document} +\pagenumbering{gobble} % no page numbers + +\maketitle +]]> +</articleinfo> +<section pre="\section{"> + <title post="}"/> +</section> +</article> +<article position="last"> +<![CDATA[ +\end{document} + +]]> </article> + </hierarchical> </mdoc>