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

A way to suppress highlighting on piece of text/code? #198

Open
1 task done
khuntercevera opened this issue Sep 27, 2018 · 1 comment
Open
1 task done

A way to suppress highlighting on piece of text/code? #198

khuntercevera opened this issue Sep 27, 2018 · 1 comment

Comments

@khuntercevera
Copy link

Prerequisites

  • Put an X in this box if you have done the following:
    • Ensured the issue has not already been raised
    • Ensured the issue is caused by this package

Description

Possible option to suppress code highlighting in "corner cases". I'm trying to insert bash script with the minted package, but the bash characters such as $ complicate the text highlighting.

Steps to reproduce & Minimum working example

Inside a regular latex file (in our case using the \usepackage{minted}, but probably more widespread).

Regular text...

\begin{minted}[mathescape,breaklines, bgcolor=bg,xleftmargin=1mm
]{bash}
cut -f2 file1.txt | awk ' { if ($1 != 0) { print } } ' >  file2.txt
cut -f3 file3.txt | awk ' { if ($1 != 0) { print } } ' >  outfile.txt
\end{minted}

Regular text, but now highlighting is green and inconsistent.

Suggestion

If the feature does not already exist (could not find any documentation or other comments), maybe a method to suppress highlighting:

text

%%%language-latex suppress begin
\begin{minted}
...
\end{minted}
%%%language-latex suppress end

more text with consistent highlighting.

Additional Information

  • Ubuntu 16.04
  • Atom text editor
  • language-latex 1.2.0
  • latex 0.50.0 package

Thanks in advance!

@Aerijo
Copy link
Collaborator

Aerijo commented Sep 28, 2018

I raised a similar issue once, but it was not wanted. I'm not going to just add it in now that I'm the only one here, but my own grammar package has it.

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