KaTeX / KaTeX/KaTeX

Subscript not shifted to left when base symbol is enclosed in brackets

Open
#3,063 4 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
20.4k
Forks
1.3k
Avg merge
14h 37m
Merged PRs (30d)
7

Description

**Describe the bug:**
The subscript is not shifted to the left to correct for italic, if the base symbol is enclosed in brackets.

**Expected behavior:**
I think `{V}_R` should render the same as `V_R`, as there is no semantic difference between the two. Maybe for groups of several symbols it makes sense, as in `{AV}_R`, although I'm not sure either.
This is especially important regarding computer-generated latex, where brackets are usually included even for single symbols.
This is the Mathjax behaviour.

**Screenshots:**
![image](https://user-images.githubusercontent.com/4263604/120311813-3bfb9500-c2d8-11eb-91c7-17eb14993507.png)

**Environment (please complete the following information):**
Tested in katex.org in various browsers

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.