Skip to content

LaTeX commands in equations replaced when switching to visual mode #15468

Open

Description

@freierson

System details

RStudio Edition : Desktop
RStudio Version : RStudio 2024.09.1+394 "Cranberry Hibiscus" Release
OS Version      : Windows 10
R Version       : R version 4.4.1 (2024-06-14 ucrt)

Steps to reproduce the problem

  1. Create a .qmd document with the following content:
\newcommand{\abc}{\mathbb{abc}}
$$\abc$$
  1. Change to visual mode.

Describe the problem in detail

The equation is replaced by:

$$\mathbb{abc}$$

Commands can help make equations shorter and also help make it easier to modify formatting everywhere the command was used. This behaviour negates these benefits.

Describe the behavior you expected

Changing to visual mode should leave the equation as:

$$\abc$$
  • I have read the guide for submitting good bug reports.
  • I have installed the latest version of RStudio, and confirmed that the issue still persists.
  • If I am reporting an RStudio crash, I have included a diagnostics report.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

Activity

  1. added
    new
    on Dec 2, 2024
  2. added
    visual markdown
    and removed
    new
    on Dec 17, 2024
  3. gtritchie commented on Jan 23, 2025

    @gtritchie
    Member

    Repro Notes

    This reproduced for me in all versions I tried, back to 2022.12.0+353.

  4. added this to the Later milestone on Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugvisual markdown

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions