Skip to content

Commit

Permalink
Remove empty brackets if short is null
Browse files Browse the repository at this point in the history
  • Loading branch information
waeltken committed Oct 13, 2015
1 parent 87beb46 commit f05879d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Text/Pandoc/Writers/LaTeX.hs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,9 @@ blockToLaTeX (Para [Image txt (src,'f':'i':'g':':':tit)]) = do
-- can't have figures in notes
then "\\begin{center}" $$ img $+$ capt $$ "\\end{center}"
else "\\begin{figure}[htbp]" $$ "\\centering" $$ img $$
("\\caption" <> brackets (text short) <> braces capt) $$ "\\end{figure}"
if null short
then ("\\caption" <> braces capt) $$ "\\end{figure}"
else ("\\caption" <> brackets (text short) <> braces capt) $$ "\\end{figure}"
-- . . . indicates pause in beamer slides
blockToLaTeX (Para [Str ".",Space,Str ".",Space,Str "."]) = do
beamer <- writerBeamer `fmap` gets stOptions
Expand Down

0 comments on commit f05879d

Please sign in to comment.