WrapRmd icon indicating copy to clipboard operation
WrapRmd copied to clipboard

LaTeX commands and references escaped with backslash

Open ilsePit opened this issue 1 year ago • 2 comments

I have an issue using the issue in combination with LaTeX commands and references, because using the wrapper leads to certain characters being escaped. For context, I am writing a document in Rmd, using occasional latex commands, and using a LaTeX template to knit into a pdf.

For instance, the text Someone said something [@bibref-to-article_2024], and I am doing something in \experiment{1} to test it.

(where \experiment{1} refers to a macro in the form of \providecommand{\experiment}[1]{experiment #1\@\xspace} in the latex template I am using)

turns into: Someone said something [@bibref-to-article\_2024], and I am doing something in \\experiment{1} to test it.

These escape \ break my references and macros.

Is there a way to prevent them from being added? Thanks!

ilsePit avatar Feb 13 '24 19:02 ilsePit

the package, as-is, does some un-escaping so this should be doable. i can't get to it soon though

tjmahr avatar Feb 14 '24 19:02 tjmahr

I have updated the package to handle LaTeX commands. I need to test out whether an escaped underscore in a reference is a problem for pandoc.

tjmahr avatar Feb 19 '24 18:02 tjmahr