-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
As stated in #13, I want to use the latex-environment
filter to highlight specific parts of my code, using the listings
latex package / environment together with colorbox
. Per default, all latex code within a listings environment is ignored. However, I can specify an escape character in the package options (see here)
escapechar=⟨character⟩
orescapechar={}
If not empty the given character escapes the user to LATEX: all code between
two such characters is interpreted as LATEX code
So if I set the escapechar = |
, everything in between |
in my listing environment will be interpreted as latex code. Is there a way to get this input:
:::{.lstlisting}
[one]{.colorbox optons = "gray"}, [two]{.colorbox options = "red"}
:::
to this latex output (note the wrapping |
)?:
\begin{lstlisting}
|\colorbox{gray}{one}|, |\colorbox{red}{two}|
\end{lstlisting}
Metadata
Metadata
Assignees
Labels
No labels