LaTeX writer: make verbatim environments flush to avoid extra space.
The indented `\end{verbatim}` was causing an extra blank line in the output. Closes #277.
This commit is contained in:
parent
b43873a9ea
commit
8fd3d0bdbb
2 changed files with 5 additions and 4 deletions
|
@ -216,8 +216,9 @@ blockToLaTeX (CodeBlock (_,classes,keyvalAttr) str) = do
|
|||
| null params = empty
|
||||
| otherwise = "[" <> hsep (intersperse "," (map text params)) <>
|
||||
"]"
|
||||
return $ "\\begin{" <> text env <> "}" <> printParams $$ flush (text str) $$
|
||||
"\\end{" <> text env <> "}" $$ cr -- final cr needed because of footnotes
|
||||
return $ flush ("\\begin{" <> text env <> "}" <> printParams $$ text str $$
|
||||
"\\end{" <> text env <> "}") $$ cr
|
||||
-- final cr needed because of footnotes
|
||||
blockToLaTeX (RawBlock "latex" x) = return $ text x <> blankline
|
||||
blockToLaTeX (RawBlock _ _) = return empty
|
||||
blockToLaTeX (BulletList lst) = do
|
||||
|
|
|
@ -808,9 +808,9 @@ Here is a footnote reference,\footnote{Here is the footnote. It can go
|
|||
Subsequent blocks are indented to show that they belong to the footnote (as
|
||||
with list items).
|
||||
|
||||
\begin{Verbatim}
|
||||
\begin{Verbatim}
|
||||
{ <code> }
|
||||
\end{Verbatim}
|
||||
\end{Verbatim}
|
||||
If you want, you can indent every line, but you can also be lazy and just
|
||||
indent the first line of each block.} This should \emph{not} be a footnote
|
||||
reference, because it contains a space.{[}\^{}my note{]} Here is an inline
|
||||
|
|
Loading…
Add table
Reference in a new issue