From 7742301c0921048afb97ba3ea5b55ecaf997298a Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sat, 21 Apr 2007 21:38:19 +0000 Subject: Support for definition lists in LaTeX writer. git-svn-id: https://pandoc.googlecode.com/svn/trunk@586 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Writers/LaTeX.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index 8a9cacba3..1cf9fe116 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -110,6 +110,12 @@ blockToLaTeX (BulletList lst) = "\\begin{itemize}\n" ++ (concatMap listItemToLaTeX lst) ++ "\\end{itemize}\n" blockToLaTeX (OrderedList lst) = "\\begin{enumerate}\n" ++ (concatMap listItemToLaTeX lst) ++ "\\end{enumerate}\n" +blockToLaTeX (DefinitionList lst) = + let defListItemToLaTeX (term, def) = "\\item[" ++ + substitute "]" "\\]" (inlineListToLaTeX term) ++ "] " ++ + concatMap blockToLaTeX def + in "\\begin{description}\n" ++ concatMap defListItemToLaTeX lst ++ + "\\end{description}\n" blockToLaTeX HorizontalRule = "\\begin{center}\\rule{3in}{0.4pt}\\end{center}\n\n" blockToLaTeX (Header level lst) = @@ -140,7 +146,6 @@ blockToLaTeX (Table caption aligns widths heads rows) = then centered tableBody ++ "\n" else "\\begin{table}[h]\n" ++ centered tableBody ++ "\\caption{" ++ captionText ++ "}\n" ++ "\\end{table}\n\n" - printDecimal :: Float -> String printDecimal = printf "%.2f" -- cgit v1.2.3