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

latex: (bright) GitHub theme only black and with only a few commands highlighted #5589

Closed
dbitouze opened this issue Jun 12, 2024 · 3 comments

Comments

@dbitouze
Copy link

dbitouze commented Jun 12, 2024

Describe the bug

On https://ace.c9.io/build/kitchen-sink.html, with a LaTeX document, the (bright) GitHub theme displays LaTeX code only in black with only a few commands highlighted (in bold face).

Expected Behavior

Same kind of behavior as the github.com site or, for instance, the Ace GitHub Dark theme which displays LaTeX code in colors, with all of the command names highlighted.

Current Behavior

In the following default LaTeX code provided by the Kitchen Sink, only \usepackage is highlighted by the Ace (bright) GitHub theme:

\usepackage{amsmath}
\title{\LaTeX}
\date{}
\begin{document}
  \maketitle
  \LaTeX{} is a document preparation system for the \TeX{}
  typesetting program. It offers programmable desktop publishing
  features and extensive facilities for automating most aspects of
  typesetting and desktop publishing, including numbering and
  cross-referencing, tables and figures, page layout, bibliographies,
  and much more. \LaTeX{} was originally written in 1984 by Leslie
  Lamport and has become the dominant method for using \TeX; few
  people write in plain \TeX{} anymore. The current version  is
  \LaTeXe.
 
  % This is a comment; it will not be shown in the final output.
  % The following shows a little of the typesetting power of LaTeX:
  \begin{align}
    E &= mc^2                              \\
    m &= \frac{m_0}{\sqrt{1-\frac{v^2}{c^2}}}
  \end{align}
\end{document}

As you can see above if you're using the default bright theme of this github.com site, the LaTeX code is colorful.

Reproduction Steps

  1. Go to https://ace.c9.io/build/kitchen-sink.html.
  2. Choose a LaTeX document.
  3. Choose the Bright GitHub theme.

Possible Solution

No response

Additional Information/Context

No response

Ace Version / Browser / OS / Keyboard layout

  • Ace version: the latest one, I guess.
  • Browser: Mozilla/5.0 (X11; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0.
  • OS: Linux x86_64.
  • Keyboard: azerty-fr.
@InspiredGuy
Copy link
Contributor

It seems like this is an issue with other document types as well, I did check couple of others (Kotlin, Go, Javascript), and there is also lack of highlighting for some syntax types.

@akoreman
Copy link
Contributor

akoreman commented Jun 26, 2024

Fixed by #5597 which will be included in the next Ace release.

@dbitouze
Copy link
Author

Thanks for the quick fix!

Nevertheless, I wonder why if one:

  1. goes to https://ace.c9.io/build/kitchen-sink.html,
  2. chooses a LaTeX document,
  3. chooses the GitHub Light Default theme,

the LaTeX code will look as follows:

image

and not as usually in GitHub:

\usepackage{amsmath}
\title{\LaTeX}
\date{}
\begin{document}
  \maketitle
  \LaTeX{} is a document preparation system for the \TeX{}
  typesetting program. It offers programmable desktop publishing
  features and extensive facilities for automating most aspects of
  typesetting and desktop publishing, including numbering and
  cross-referencing, tables and figures, page layout, bibliographies,
  and much more. \LaTeX{} was originally written in 1984 by Leslie
  Lamport and has become the dominant method for using \TeX; few
  people write in plain \TeX{} anymore. The current version  is
  \LaTeXe.
 
  % This is a comment; it will not be shown in the final output.
  % The following shows a little of the typesetting power of LaTeX:
  \begin{align}
    E &= mc^2                              \\
    m &= \frac{m_0}{\sqrt{1-\frac{v^2}{c^2}}}
  \end{align}
\end{document}

Especially, the LaTeX command \usepackage and its argument amsmath are highlighted:

  • using the same color with the former,
  • using different colors with the latter.

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

No branches or pull requests

3 participants