mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-26 10:16:32 +00:00
LaTeX writer: Fixed position of label in figures.
Partially addresses #2813. This isn't perfect, because now the hypertarget is in the wrong place -- when you link to the figure, the screen is positioned with the caption at the top, and most of the figure off screen. So this needs a bit more tweaking.
This commit is contained in:
@@ -415,10 +415,10 @@ blockToLaTeX (Para [Image attr@(ident, _, _) txt (src,'f':'i':'g':':':tit)]) = d
|
||||
else brackets <$> inlineListToLaTeX (walk deNote txt)
|
||||
img <- inlineToLaTeX (Image attr txt (src,tit))
|
||||
let footnotes = notesToLaTeX notes
|
||||
figure <- refLabel ident $ cr <>
|
||||
caption <- refLabel ident ("\\caption" <> captForLof <> braces capt)
|
||||
let figure = cr <>
|
||||
"\\begin{figure}[htbp]" $$ "\\centering" $$ img $$
|
||||
("\\caption" <> captForLof <> braces capt) $$
|
||||
"\\end{figure}" <> cr
|
||||
caption $$ "\\end{figure}" <> cr
|
||||
return $ if inNote
|
||||
-- can't have figures in notes
|
||||
then "\\begin{center}" $$ img $+$ capt $$ "\\end{center}"
|
||||
|
||||
Reference in New Issue
Block a user