davidcarlisle / latexcgi

LaTeX server via perl cgi script, developed for learnlatex.org
https://davidcarlisle.github.io/latexcgi/
MIT License
32 stars 3 forks source link

Add the possibility for `% !TEX ... keyword` comments to not appear in the editor #6

Open dbitouze opened 2 years ago

dbitouze commented 2 years ago

It could be nice for % !TEX ... keyword comments or, more specifically % !TEX none, to possibly not appear (and not be selectable) in the Ace editor (e.g. with a syntax such as % !!TEX none).

Having the editor to be used in Text mode, and no texlive.net button added, is indeed quite often helpful, e.g. as in this case, where:

A step further would be to provide a % !NOTEX comment (not appearing in the editor either). It would act as % !TEX none but let the possibility for % !TEX none to still provide syntax highlighting, which would be useful e.g. in the case of code snippets such as:

\def\]{\leavevmode\hbox{\tt\char`\ }}

where compilation would be useless but syntax highlighting is useful.

davidcarlisle commented 1 year ago

it is not possible (typical to https://texnique.fr/) to rely on the markup {: .noedit :}.

note {: .noedit :} is a markdown extension to set the class, if you are not using markdown, you can set the class directly <pre class="noedit">....

I think I'd prefer using css or javascript to confgure this rather than remove lines from the <pre> before initialising the editor.

But I could perhaps be persuaded if there was a clear case where css can't be used.