LaTeX writer: use deVerb on table and picture captions.
Otherwise LaTeX complains about \verb inside command argument. Thanks to bbanier for reporting the bug.
This commit is contained in:
parent
6e59053d32
commit
8d54e304c6
1 changed files with 2 additions and 2 deletions
|
@ -161,7 +161,7 @@ blockToLaTeX :: Block -- ^ Block to convert
|
|||
blockToLaTeX Null = return empty
|
||||
blockToLaTeX (Plain lst) = inlineListToLaTeX lst
|
||||
blockToLaTeX (Para [Image txt (src,tit)]) = do
|
||||
capt <- inlineListToLaTeX txt
|
||||
capt <- inlineListToLaTeX $ deVerb txt
|
||||
img <- inlineToLaTeX (Image txt (src,tit))
|
||||
return $ "\\begin{figure}[htbp]" $$ "\\centering" $$ img $$
|
||||
("\\caption{" <> capt <> char '}') $$ "\\end{figure}" $$ blankline
|
||||
|
@ -272,7 +272,7 @@ blockToLaTeX (Table caption aligns widths heads rows) = do
|
|||
headers <- if all null heads
|
||||
then return empty
|
||||
else liftM ($$ "\\hline") $ (tableRowToLaTeX widths) heads
|
||||
captionText <- inlineListToLaTeX caption
|
||||
captionText <- inlineListToLaTeX $ deVerb caption
|
||||
rows' <- mapM (tableRowToLaTeX widths) rows
|
||||
let colDescriptors = concat $ zipWith toColDescriptor widths aligns
|
||||
let tableBody = text ("\\begin{tabular}{" ++ colDescriptors ++ "}") $$
|
||||
|
|
Loading…
Add table
Reference in a new issue