-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LaTeX writer: add
\leavevmode
before hypertarget at start of paragr…
…aph. Closes #2704 (formatting problems in beamer citations). See http://tex.stackexchange.com/questions/22852/function-and-usage-of-leavevmode
- Loading branch information
Showing
1 changed file
with
8 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -418,7 +418,14 @@ blockToLaTeX :: PandocMonad m | |
blockToLaTeX Null = return empty | ||
blockToLaTeX (Div (identifier,classes,kvs) bs) = do | ||
beamer <- gets stBeamer | ||
linkAnchor <- hypertarget True identifier empty | ||
linkAnchor' <- hypertarget True identifier empty | ||
-- see #2704 for the motivation for adding \leavevmode: | ||
let linkAnchor = | ||
case bs of | ||
Para _ : _ | ||
| not (isEmpty linkAnchor') | ||
-> "\\leavevmode" <> linkAnchor' <> "%" | ||
_ -> linkAnchor' | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jgm
via email
Author
Owner
|
||
let align dir txt = inCmd "begin" dir $$ txt $$ inCmd "end" dir | ||
let wrapDir = case lookup "dir" kvs of | ||
Just "rtl" -> align "RTL" | ||
|
@jgm I have noticed small visual issue while constructing test case for #3255. I have not compiled this patched Pandoc yet but I have noticed that if the resulting LaTeX looks like this, without
%
on the second line, there is small horizontal space at the start of the reference:I think the
%
needs to be added to both lines or the text should immediately follow the\hypertarget
without the intervening new line.