REditorSupport / REditorSupport/vscode-R

LaTeX syntax highlighting in Rmd

Open
#93 38 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted highlighting
Dominant language
TypeScript
Stars
1.2k
Forks
139
Avg merge
2h 46m
Merged PRs (30d)
5

Description

  • VSCode Version: 1.28.0
  • VSCode-R Version: v0.6.2
  • OS Version: x86_64-apple-darwin15.6.0 (64-bit)

Steps to Reproduce:

  1. Use two reserved markdown characters in LaTeX math blocks in the same line
  2. Syntax highlighting does not consider the LaTeX math notation and applies styling

Example of issue (with totally made up math)

image

Expected something more like this

image

TBH, simply catching the use of LaTeX and removing the syntax highlighting between paired $..$ or $$..$$ would be a great improvement.

Example text
For each $x_i$, consider all $x_i < k$.
Is $x*2$ greater than $y*2$?

$$
y_i = m * x_i + b
$$

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in VSCode using the supplied R Markdown examples, focusing on inline $..$ and block $$..$$ LaTeX math. Find the R Markdown syntax-highlighting entry point and verify that markdown styling is suppressed inside paired math delimiters, including lines containing reserved characters.

Written by the indexing model from the issue text.

Assessment

Tech stack
latex, markdown, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.