@@ -296,7 +296,7 @@ inBrackets x = str "[" <> x <> str "]"
296296
297297-- eat an optional argument and one or more arguments in braces
298298ignoreInlines :: PandocMonad m => String -> (String, LP m Inlines)
299−ignoreInlines name = (name, doraw <|> (mempty <$ optargs))
299+ignoreInlines name = (name, doraw <|> (optargs >> ignore name))
300300 where optargs = skipopts *> skipMany (try $ optional sp *> braced)
301301 contseq = '\\':name
302302 doraw = (rawInline "latex" . (contseq ++) . snd) <$>
@@ -304,8 +304,14 @@ ignoreInlines name = (name, doraw <|> (mempty <$ optargs))
304304 guard $ extensionEnabled Ext_raw_tex exts
305305 withRaw optargs)
306306
307+ignore :: (Monoid a, PandocMonad m) => String -> LP m a
308+ignore name = do
309+ pos <- getPosition
310+ warningWithPos pos $ "Skipped \\" ++ name ++ " and its arguments"
311+ return mempty
312+
307313ignoreBlocks :: PandocMonad m => String -> (String, LP m Blocks)
308−ignoreBlocks name = (name, doraw <|> (mempty <$ optargs))
314+ignoreBlocks name = (name, doraw <|> (optargs >> ignore name))
309315 where optargs = skipopts *> skipMany (try $ optional sp *> braced)
310316 contseq = '\\':name
311317 doraw = (rawBlock "latex" . (contseq ++) . snd) <$>
@@ -438,7 +444,7 @@ inlineCommand = try $ do
438444 then parseFromString inlines transformed
439445 else if extensionEnabled Ext_raw_tex exts
440446 then return $ rawInline "latex" rawcommand
441− else return mempty
447+ else ignore name
442448 (lookupListDefault mzero [name',name] inlineCommands <*
443449 optional (try (string "{}")))
444450 <|> raw
@@ -489,7 +495,7 @@ inlineCommands = M.fromList $
489495 , ("sim", lit "~")
490496 , ("label", unlessParseRaw >> (inBrackets <$> tok))
491497 , ("ref", unlessParseRaw >> (inBrackets <$> tok))
492− , ("noindent", unlessParseRaw >> return mempty)
498+ , ("noindent", unlessParseRaw >> ignore "noindent")
493499 , ("textgreek", tok)
494500 , ("sep", lit ",")
495501 , ("cref", unlessParseRaw >> (inBrackets <$> tok)) -- from cleveref.sty