git.iko.soy/typeable/pandoc
on master help sign in
LaTeX writer: Don't use [fragile] unnecessarily.
a2cb536John MacFarlane
src/Text/Pandoc/Writers/LaTeX.hs+5−1
@@ -238,7 +238,11 @@ elementToBeamer slideLevel (Sec lvl _num _ident tit elts)
238 hasCodeBlock _ = []
238 hasCodeBlock _ = []
239 let hasCode (Code _ _) = [True]
239 let hasCode (Code _ _) = [True]
240 hasCode _ = []
240 hasCode _ = []
241+ opts <- gets stOptions
241− let fragile = if not $ null $ queryWith hasCodeBlock elts ++ queryWith hasCode elts
242+ let fragile = if not $ null $ queryWith hasCodeBlock elts ++
243+ if writerListings opts
244+ then queryWith hasCode elts
245+ else []
242 then "[fragile]"
246 then "[fragile]"
243 else ""
247 else ""
244 let slideStart = Para $ RawInline "latex" ("\\begin{frame}" ++ fragile) :
248 let slideStart = Para $ RawInline "latex" ("\\begin{frame}" ++ fragile) :