latexcgi icon indicating copy to clipboard operation
latexcgi copied to clipboard

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

Open dbitouze opened this issue 2 years ago • 1 comments

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:

  • % !TEX none, if present, would be confusing and error prone,
  • it is not possible (typical to https://texnique.fr/) to rely on the markup {: .noedit :}.

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.

dbitouze avatar Jul 01 '22 11:07 dbitouze

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.

davidcarlisle avatar Jul 23 '23 12:07 davidcarlisle