How do I stop the visual editor from escaping backslashes? #9138
-
DescriptionHello! I like using the visual editor as it suggests possible cross references when typing "@" and more. But I have the problem, that when I want to use latex in text, like for instance The latest one is this: I want to reference R and add the R version into the cross reference like this: "All analyses were performed in R (version 4.3.3; R CoreTeam, 2024)." In quarto you can add text into a (cross) reference by simply writing it into the square brackets, only that the semicolon has a special function (listing references) so it would break the syntax if used like this: All analyses were performed in R [version 4.3.3; @R-base].output: "All analyses were performed in R [version 4.3.3; R CoreTeam (2024)]." ... which is just an in-text citation surrounded by plain text. In the source editor this is simply solved by escaping the semicolon with a backslash like this: All analyses were performed in R [version 4.3.3\; @R-base]output: "All analyses were performed in R (version 4.3.3; R CoreTeam, 2024)." When switching from source editor to visual editor the backslash will get removed. Adding the backslash in the visual editor doesn´t help either, because it will be escaped with another backslash automatically like I mentioned in the beginning: All analyses were performed in R [version 4.3.3\\; @R-base]output: "All analyses were performed in R [version 4.3.3; R CoreTeam (2024)]." Again not what I want. Finally my question: Is there a way in R Studio Quarto Visual Editor to stop backslashes from getting escaped with a second backslash? (I know I could use VS Code with extensions but I don´t want to, yet) I have already seen, that this kind of issue is old and there have been fixes for inline math and display math and even latex code chunks. Related post: Are there fixes for the issue above? If not I think this would be a really cool feature to include (maybe an option "automatically escape special chracters" that can be turned on or off in the visual). Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Thanks for the report. I suggest you look for something similar or open a new issue on the Visual Editor repository: https://github.com/quarto-dev/quarto. |
Beta Was this translation helpful? Give feedback.
Thanks for the report.
I suggest you look for something similar or open a new issue on the Visual Editor repository: https://github.com/quarto-dev/quarto.