Allow beamer-style <...> options in raw LaTeX (also in Markdown).
This allows use of things like `\only<2,3>{my content}` in Markdown that is going to be converted to beamer. Closes #3184.
This commit is contained in:
parent
bd19176026
commit
8d7ecc27a1
1 changed files with 13 additions and 1 deletions
|
@ -423,7 +423,8 @@ inlineCommand = try $ do
|
|||
star <- option "" (string "*")
|
||||
let name' = name ++ star
|
||||
let raw = do
|
||||
rawargs <- withRaw (skipopts *> option "" dimenarg *> many braced)
|
||||
rawargs <- withRaw
|
||||
(skipangles *> skipopts *> option "" dimenarg *> many braced)
|
||||
let rawcommand = '\\' : name ++ star ++ snd rawargs
|
||||
transformed <- applyMacros' rawcommand
|
||||
if transformed /= rawcommand
|
||||
|
@ -886,6 +887,17 @@ rawopt = do
|
|||
skipopts :: LP ()
|
||||
skipopts = skipMany rawopt
|
||||
|
||||
-- opts in angle brackets are used in beamer
|
||||
rawangle :: LP ()
|
||||
rawangle = try $ do
|
||||
char '<'
|
||||
skipMany (noneOf ">")
|
||||
char '>'
|
||||
return ()
|
||||
|
||||
skipangles :: LP ()
|
||||
skipangles = skipMany rawangle
|
||||
|
||||
inlineText :: LP Inlines
|
||||
inlineText = str <$> many1 inlineChar
|
||||
|
||||
|
|
Loading…
Reference in a new issue