diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2012-11-04 11:09:15 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2012-11-04 11:09:42 -0800 |
commit | a2cb53640defcbd672ae26d517ee54479a13a32a (patch) | |
tree | aca2d0be535641e583d1c59295ff902a1d274611 /src/Text/Pandoc | |
parent | 0c5801297d02b4407a5ba6101bfa779e5ce6d500 (diff) | |
download | pandoc-a2cb53640defcbd672ae26d517ee54479a13a32a.tar.gz |
LaTeX writer: Don't use [fragile] unnecessarily.
We were using [fragile] on slides even if they only contained
code that was rendered using `\texttt`. Now `[fragile]` is
only used for slides containing inline code if that code
is rendered using listings. Closes #649.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index 4929bb2a9..3d25e0fc9 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -238,7 +238,11 @@ elementToBeamer slideLevel (Sec lvl _num _ident tit elts) hasCodeBlock _ = [] let hasCode (Code _ _) = [True] hasCode _ = [] - let fragile = if not $ null $ queryWith hasCodeBlock elts ++ queryWith hasCode elts + opts <- gets stOptions + let fragile = if not $ null $ queryWith hasCodeBlock elts ++ + if writerListings opts + then queryWith hasCode elts + else [] then "[fragile]" else "" let slideStart = Para $ RawInline "latex" ("\\begin{frame}" ++ fragile) : |