artisticat1 / obsidian-latex-suite

Make typesetting LaTeX as fast as handwriting through snippets, text expansion, and editor enhancements
MIT License
1.43k stars 56 forks source link

[FEATURE] Better-looking LaTeX source view #325

Open mozhewen opened 2 months ago

mozhewen commented 2 months ago

Description of the Problem

  1. We don't have to italicize every character in the tex source. For example numbers and brackets are better shown in a normal style.
  2. The unicode characters for \langle and \rangle are ⟨⟩ (U+27E8, U+27E9) instead of the CJK 〈〉 (U+3008, U+3009).

The first one may turn out to be my personal taste.

Description of the Solution

  1. This may be added to user's CSS snippets, or to styles.css.

    span.cm-math {
    &.cm-number, &.cm-bracket, &.cm-tag, &.cm-error {
        font-style: normal;
    }
    }
  2. Modify these lines: https://github.com/artisticat1/obsidian-latex-suite/blob/934a54cc30881712833e67a043406c5e802f3d9b/src/editor_extensions/conceal_maps.ts#L497-L500