Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor math syntax highlighting #36

Open
JohnTasto opened this issue Aug 1, 2017 · 2 comments
Open

Editor math syntax highlighting #36

JohnTasto opened this issue Aug 1, 2017 · 2 comments

Comments

@JohnTasto
Copy link

The editor syntax highlighting in math sections is rendered just like regular MarkDown, as in underscores are interpreted as emphasis rather than subscripts:

screen shot 2017-08-01 at 12 44 22 pm

It would be nice if it were styled similar to how GitHub styles LaTeX:

\[
  \begin{aligned}
    A \cup (B_1 \cap B_2 \cap \ldots \cap B_n) &= (A \cap B_1) \cup (A \cap B_2) \cup \ldots \cup (A \cap B_n) \\
    A \cup (B_1 \cap B_2 \cap \ldots \cap B_{n+1}) &= (A \cap B_1) \cup (A \cap B_2) \cup \ldots \cup (A \cap B_{n+1}) \\
    A \cup [(B_1 \cap B_2 \cap \ldots \cap B_n) \cap B_{n+1}] \\
    \space [A \cup (B_1 \cap B_2 \cap \ldots \cap B_n)] \cap (A \cup B_{n+1}) \\
  \end{aligned}
\]

(The \space prefixing the last line is there because KaTeX errored when it began with [)

@shd101wyy
Copy link
Owner

Hi, @JohnTasto

This extension only deals with the preview part but not the editor part.
So I think you will need some other extensions to style math.

Thanks

@SolarLiner
Copy link

The problem is that this is an enhanced feature and not part of regular Markdown - the workaround would be to use a LaTeX code chunk, but that would mean having to write a whole LaTeX file in a code chuck for every formula - and it wouldn't work inline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants