@@ -120,43 +120,43 @@ pandocToLaTeX options (Pandoc meta blocks) = do
120120 let main = render colwidth $ vsep body
121121 st <- get
122122 let biblioFiles = intercalate "," $ map dropExtension $ writerBiblioFiles options
123− let context = setField "toc" (writerTableOfContents options) $
124− setField "toc-depth" (show (writerTOCDepth options -
123+ let context = defField "toc" (writerTableOfContents options) $
124+ defField "toc-depth" (show (writerTOCDepth options -
125125 if writerChapters options
126126 then 1
127127 else 0)) $
128− setField "body" main $
129− setField "title-meta" (stringify $ docTitle meta) $
130− setField "author-meta" (intercalate "; " $ map stringify $ docAuthors meta) $
131− setField "documentclass" (if writerBeamer options
128+ defField "body" main $
129+ defField "title-meta" (stringify $ docTitle meta) $
130+ defField "author-meta" (intercalate "; " $ map stringify $ docAuthors meta) $
131+ defField "documentclass" (if writerBeamer options
132132 then ("beamer" :: String)
133133 else if writerChapters options
134134 then "book"
135135 else "article") $
136− setField "verbatim-in-note" (stVerbInNote st) $
137− setField "tables" (stTable st) $
138− setField "strikeout" (stStrikeout st) $
139− setField "url" (stUrl st) $
140− setField "numbersections" (writerNumberSections options) $
141− setField "lhs" (stLHS st) $
142− setField "graphics" (stGraphics st) $
143− setField "book-class" (stBook st) $
144− setField "euro" (stUsesEuro st) $
145− setField "listings" (writerListings options || stLHS st) $
146− setField "beamer" (writerBeamer options) $
147− setField "mainlang" (maybe "" (reverse . takeWhile (/=',') . reverse)
136+ defField "verbatim-in-note" (stVerbInNote st) $
137+ defField "tables" (stTable st) $
138+ defField "strikeout" (stStrikeout st) $
139+ defField "url" (stUrl st) $
140+ defField "numbersections" (writerNumberSections options) $
141+ defField "lhs" (stLHS st) $
142+ defField "graphics" (stGraphics st) $
143+ defField "book-class" (stBook st) $
144+ defField "euro" (stUsesEuro st) $
145+ defField "listings" (writerListings options || stLHS st) $
146+ defField "beamer" (writerBeamer options) $
147+ defField "mainlang" (maybe "" (reverse . takeWhile (/=',') . reverse)
148148 (lookup "lang" $ writerVariables options)) $
149149 (if stHighlighting st
150− then setField "highlighting-macros" (styleToLaTeX
150+ then defField "highlighting-macros" (styleToLaTeX
151151 $ writerHighlightStyle options )
152152 else id) $
153153 (case writerCiteMethod options of
154− Natbib -> setField "biblio-files" biblioFiles .
155− setField "biblio-title" biblioTitle .
156− setField "natbib" True
157− Biblatex -> setField "biblio-files" biblioFiles .
158− setField "biblio-title" biblioTitle .
159− setField "biblatex" True
154+ Natbib -> defField "biblio-files" biblioFiles .
155+ defField "biblio-title" biblioTitle .
156+ defField "natbib" True
157+ Biblatex -> defField "biblio-files" biblioFiles .
158+ defField "biblio-title" biblioTitle .
159+ defField "biblatex" True
160160 _ -> id) $
161161 foldl (\acc (x,y) -> setField x y acc)
162162 metadata (writerVariables options)