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

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

Open
dbitouze opened this issue Jul 1, 2022 · 1 comment

Comments

@dbitouze
Copy link

dbitouze commented Jul 1, 2022

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 dbitouze changed the title % !TEX ... keyword comments not appearing in the editor Add the possibility for % !TEX ... keyword comments to not appear in the editor Jul 1, 2022
@davidcarlisle
Copy link
Owner

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.

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

2 participants