You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Switching to visual mode in removes literal semicolon in citation. #14376
RStudio Edition : Desktop or Server
RStudio Version : 2023.12.1+402
OS Version : Windows 11 Home
R Version : 4.3.3 (2024-02-29 ucrt)
Steps to reproduce the problem
Create a .qmd file.
Switch to source mode.
Type [APA\;@mycitation].
Switch to visual mode.
Switch back to source mode.
The citation appears as [APA; @mycitation], which will render improperly.
Describe the problem in detail
When writing in a Quarto document, sometimes you need to introduce an acronym in a sentence that also has a citation. In APA style, this requires a literal semicolon to separate the acronym from the citations:
The leading organization for psychologists in the U.S. is the American Psychological Association [APA\;@mycitation].
This will render correctly to:
The leading organization for psychologists in the U.S. is the American Psychological Association (APA; Schneider, 2024).
Switching to visual mode in a Quarto file removes the backslash, which will render incorrectly to:
The leading organization for psychologists in the U.S. is the American Psychological Association [APA; Schneider (2024)].
Describe the behavior you expected
Switching to visual mode should not remove the backslash needed to render a literal semicolon.
Activity
ronblum commentedon Mar 6, 2024
@wjschne Thank you for raising this! Also reproducible RStudio Desktop 2022.12.0+353 and 2024.04.0-daily+531 on MacOS 14.4.
jthomasmock commentedon Mar 8, 2024
We should test whether canonical mode also removes the semi-colon @ronblum
ronblum commentedon Mar 8, 2024
Both canonical and non-canonical mode remove the semicolon.
jthomasmock commentedon Mar 11, 2024
Thanks @wjschne -- we are going to look at a few different visual markdown items in the future - thank you for raising!