@@ -678,7 +678,9 @@ inlineToLaTeX (Emph lst) =
678678inlineToLaTeX (Strong lst) =
679679 inlineListToLaTeX lst >>= return . inCmd "textbf"
680680inlineToLaTeX (Strikeout lst) = do
681− contents <- inlineListToLaTeX lst
681+ -- we need to protect VERB in an mbox or we get an error
682+ -- see #1294
683+ contents <- inlineListToLaTeX $ protectCode lst
682684 modify $ \s -> s{ stStrikeout = True }
683685 return $ inCmd "sout" contents
684686inlineToLaTeX (Superscript lst) =
@@ -784,6 +786,13 @@ inlineToLaTeX (Note contents) = do
784786 -- note: a \n before } needed when note ends with a Verbatim environment
785787 else "\\footnote" <> braces noteContents
786788
789+protectCode :: [Inline] -> [Inline]
790+protectCode [] = []
791+protectCode (x@(Code ("",[],[]) _) : xs) = x : protectCode xs
792+protectCode (x@(Code _ _) : xs) = ltx "\\mbox{" : x : ltx "}" : xs
793+ where ltx = RawInline (Format "latex")
794+protectCode (x : xs) = x : protectCode xs
795+
787796citationsToNatbib :: [Citation] -> State WriterState Doc
788797citationsToNatbib (one:[])
789798 = citeCommand c p s k