@@ -668,6 +668,8 @@ inlineCommands = M.fromList $
668 , ("nocite", mempty <$ (citation "nocite" NormalCitation False >>=
668 , ("nocite", mempty <$ (citation "nocite" NormalCitation False >>=
669 addMeta "nocite"))
669 addMeta "nocite"))
670 , ("hypertarget", braced >> tok)
670 , ("hypertarget", braced >> tok)
671 ] ++ map ignoreInlines
673 ] ++ map ignoreInlines
672 -- these commands will be ignored unless --parse-raw is specified,
674 -- these commands will be ignored unless --parse-raw is specified,
673 -- in which case they will appear as raw latex blocks:
675 -- in which case they will appear as raw latex blocks:
@@ -726,6 +728,21 @@ dolstinline = do
726doLHSverb :: PandocMonad m => LP m Inlines
728doLHSverb :: PandocMonad m => LP m Inlines
727doLHSverb = codeWith ("",["haskell"],[]) <$> manyTill (satisfy (/='\n')) (char '|')
729doLHSverb = codeWith ("",["haskell"],[]) <$> manyTill (satisfy (/='\n')) (char '|')
731+-- converts e.g. \SI{1}[\$]{} to "$ 1" or \SI{1}{\euro} to "1 €"
732+dosiunitx :: PandocMonad m => LP m Inlines
736+ valueprefix <- option "" $ char '[' >> (mconcat <$> manyTill tok (char ']'))
738+ let emptyOr160 "" = ""
739+ emptyOr160 _ = "\160"
740+ return . mconcat $ [valueprefix,
741+ emptyOr160 valueprefix,
729lit :: String -> LP m Inlines
746lit :: String -> LP m Inlines
730lit = pure . str
747lit = pure . str