Support for definition lists in LaTeX writer.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@586 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher 2007-04-21 21:38:19 +00:00
parent ffd7248af8
commit 7742301c09

View file

@ -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"