Questions tagged [syntax-highlighting]
For questions about highlighting document source code in your editor.
165 questions
0
votes
0
answers
23
views
AUCTex: recognize/ignore template for highlighting
How can I configure Emacs/AUCTeX so that it treats tags like <%foo%> as template delimiters rather than the start of a LaTeX comment, for syntax highlighting?
I am working with some third-party ...
3
votes
2
answers
143
views
Redefinition of \begin and \end
I have to use the following macros:
\newcommand{\lbeq}[1]{\begin{equation}\label{#1}}
\newcommand{\eeq}[1]{\end{equation}}
I know this is bad style!
Since I'm using TexStudio, there is the problem ...
4
votes
0
answers
147
views
Listings - How to define a custom listings style using \lstdefinestyle to colour nested parentheses differently without using \lstdefinelanguage?
Let's assume, I have nested parentheses like shown in the picture:
I want to define a custom code style using the listings package and \lstdefinestyle command to highlight nested parentheses with ...
1
vote
1
answer
73
views
Highlight code fragments in LaTeX + using underscore package will cause hanging lines or fail to compile
I would like to highlight inline code fragments in my document using a \colorbox like here https://stackoverflow.com/questions/4709339/latex-color-box-inline-with-text
The problem is that much of the ...
2
votes
0
answers
44
views
How can I get Texmaker to recognize additional math modes?
Texmaker, my IDE of choice, has syntax highlighting that extends to some, but not all, math environments. As it happens to cover the most common environments, it is somewhat annoying when I decide to ...
2
votes
0
answers
90
views
Highlight `macrocode` environment for l3doc class without `ctxdoc` and `njuthesis` class
I'm trying to colorize the macrocode environment using the l3doc class. This isn't possible directly, but the ctxdoc class partially achieves this, and the njuthesis class along with the codehigh ...
3
votes
1
answer
330
views
VSCode highlight .tikz file similar to .tex
Is there a way to enable the same syntax highlighting from a .tex file for a .tikz file?
When the tikz code is written inside a latex-document the highlighting with the Latex-Workshop extensions works ...
0
votes
0
answers
49
views
TeXworks ignore syntax-patterns.txt
I would like to customize syntax colouring by editing
~/.TeXworks/configuration/syntax-patterns.txt
but the file is ignored by TeXworks,
restart doesn't help.
version: TeXworks 0.6.6 ("Debian&...
1
vote
1
answer
57
views
Listings \lst@ProcessOther command doesn't work on ")" character when using the breaklines feature. How can I solve this?
Problem
I am trying to colour brackets in listings using the \lst@ProcessOther command. My code works perfectly fine when using the breaklines=false option. When using breaklines=true however, \lst@...
0
votes
1
answer
541
views
Customized highlighting of a markdown text document with Pandoc [duplicate]
Using Pandoc to render PDF from a Markdown text file, I use highlighting code blocks to format a different type of text, like this:
this is normal text
~~~~~~
this is special text
~~~~~~
The snippet ...
4
votes
1
answer
128
views
TeXstudio and highlighting of units syntax (ex, em, mm, cm, pt, ...)
I am moving from TeXnicCenter to the TeXstudio and wondering, if there is a way, how to make a custom syntax color for units like (pt, in, mm, cm, ex, em) in TexStudio. TexnicCenter has option for ...
1
vote
2
answers
213
views
Loading xparse explicitly required for syntax coloring in emacs?
I was surprised to discover that it is necessary to put \usepackage{xparse} in the preamble in order for syntax coloring to work for LaTeX3 macros in emacs -- or a package that loads xparse such as ...
0
votes
0
answers
139
views
TeXstudio Highlighting Issue with \input
I have an auxiliary .tex file with commands, packages and the like, which I reference with \input{...}. However, TeXstudio doesn't recognise the commands in that auxiliary file.
A MWE can be made in ...
1
vote
1
answer
637
views
Minted styling not working : no pygstyle file created
I want to start this post by telling that I already know the answer to the question. I just came here to post the solution I found so it hopefully helps someone without having to spend an hour ...
10
votes
2
answers
2k
views
Looking for a good Emacs/AUCTeX setup for LaTeX3
I'm trying to switch my editor from vscodium (telemetry free VS Code) to Emacs. So far, I've installed AUCTeX and tried some things in a testdocument. For regular LaTeX code everything is fine.
But ...