Tagged Questions

{highlighting} is about highlighting document elements. Use this tag in addition to other tags specifying what should be highlighted.

learn more… | top users | synonyms (1)

4
votes
1answer
57 views

Using BW style for minted code highlighting not pure BW

I'm trying to use the minted package with bw style for JavaScript code highlighting. Under the document I added \usemintedstyle{bw} and use highlighting like this: ...
5
votes
0answers
38 views

highlighting words which cannot be hyphenated

is there any package which can automatically highlight unhyphenable words in output PDF? I.e. words which are not in the list of words for hyphenation. For example: I'm using polyglossia package. ...
4
votes
1answer
75 views

Listings with keywords that contain both letters and numbers

I have a listing which needs to highlight keywords with both letters and numbers. Following the advice in this question I've used the otherkeywords to define the keywords which contain numbers. This ...
6
votes
2answers
854 views

Highlight anything in LaTeX article

I'm looking for a package/command that will highlight anything I wrap with it. Currently the closest thing I've found is soul but it has many shortcomings: No sectioning highlighting No automatic ...
3
votes
1answer
49 views

Why don't those non-alphanumeric chars (*/_) get colored in blue, here?

Consider the following example: \documentclass{article} \usepackage{listings} \usepackage{xcolor} \lstset{language=R, morecomment=[l]{>}, commentstyle=\color{blue}, alsoletter={*} ...
4
votes
1answer
81 views

How can I highlight JSON string values but not attributes?

example { "name" : "alan", "alias" : "nala" } If I use morecomment=[s][\color{red}]{"}{"}, How can I highlight JSON string values (on the right side) but not the attributes (left side)?
5
votes
1answer
95 views

Correctly highlighting custom html tags in listings

Problem statement I have several code listings containing HTML markup in my latex files. These listings contain multiple custom html tags (created in combination with corresponding AngularJS ...
0
votes
0answers
49 views

get spyder-like color highlighting in pythontex

In my work with Python 3.4, I use spyder (anaconda3 2.0.1) and I like the highlighting of the Spyder editor (version 2.3). Is it possible to have the same highlighting scheme in latex documents ...
0
votes
1answer
64 views

Highlighting labels of undefined citations? [duplicate]

I am wanting 'cite' entries that don't have a corresponding 'bibitem' entry to show up in red, along with the name of the missing reference label. I had found a forum entry that suggested a solution, ...
4
votes
0answers
81 views

(Clickable) cross-reference in lstlisting

To generate documentation for an 'application programming interface', I would like to have a syntax highlighted area (with the class declaration), which has clickable links to the documentation (which ...
3
votes
0answers
58 views

Highlighting text for review

I am looking for a way to highlight sections, sentences, etc for review without breaking the paragraphs up. I have tried the package todonotes, but I couldn't get the underlining to work with ...
2
votes
0answers
151 views

How to change (Mac)Vim's syntax highlighting rules for (La)TeX files? [closed]

I'm a long-time AUCTeX/Emacs user that switched to Vim/LaTeX-Box recently. I got everything working the way I want and grew pretty fond of Vim, but there's still one unusual thing that bothers me: ...
2
votes
1answer
80 views

How to set different color in listing?

I want to split the listing into three different colors. How to do it? I have read Peter Grill's answer and apply it like this: \documentclass[12pt]{article} \usepackage[utf8]{inputenc} ...
1
vote
0answers
49 views

Minted Listings don't behave the way they should

I'm quite new to La/TeX and I have a question about the package minted and it's listing feature. I'm using a LaTeX template from someone else who gave it to me. He used the listing feature as well ...
6
votes
2answers
83 views

T2A fontshape in verbments listings

I'd like to use T2A fontshape inside verbments listings (for comments in source code), but have no luck in this. For the code \begin{pyglist}[language=haskell] fact n = foldl 1 (*) [1..n] -- так ...
1
vote
0answers
42 views

highlight glossaries entries on page

I want to highlight my glossaries entries with bold or italic formatting. I have used the following command but then the whole document is very colorful what I didn't want to have it like this. ...
14
votes
1answer
243 views

How does minted work from a point of LaTeX-User?

The package minted is one of the most famous package for highlighting source code. But how does it work?
7
votes
2answers
173 views

highlight line numbers in listings

I would like to highlight the line numbers of the lines I refer to with lstlistings. I use escape characters to define labels in my Listing to which I refer later in my document (e.g. see Line X of ...
2
votes
1answer
111 views

How to include program listings in C# with custom font and syntax highlighting in LyX?

I'm rather new to LaTeX and use LyX editor to create my documents. There are similar questions but none of them answer how to do that in LyX. I am wondering, how to include a program listing in ...
1
vote
1answer
49 views

error when using tcolorbox + listings for multipage source

I'm try to highlight source code with colored background, but I face a bit error. first image is created with listings only and that is what I need. You can see on the last image that basicstyle ...
1
vote
1answer
74 views

How can I highlight keywords with special characters or numbers in them?

In the following MWE the declared keywords te-st and 999 are not highlighted as expected: \documentclass{scrartcl} \usepackage{listings,xcolor} ...
3
votes
1answer
122 views

How can I highlight a keyword that contains a dash or a slash? [duplicate]

I have a Clojure listing and I want to colour certain keywords whereas I can only do for strings not including any dash ('-') or slash ('/). But I also need to consider keywords consisting of with ...
4
votes
1answer
114 views

How can I highlight SPSS Syntax code with the listings package?

I'm writing my master thesis at the moment and I want to add some code listings to the appendix. The code is written in "Syntax", the programming language of SPSS Statistics. Is there a way to ...
2
votes
1answer
66 views

Listings refuses to highlight identifiers such as 'intent–filter'. Why?

I have some xml code, which I want to look fine in my latexdocument. I am doing it this way: \documentclass[12pt]{scrartcl} \usepackage[ngerman]{babel} \usepackage[utf8]{inputenc} ...
7
votes
2answers
105 views

Automatically highlight undefined references

Is there a way to force LaTeX to automatically change the formatting of the ?? that gets typeset in place of an undefined reference? For example, can one make LaTeX draw a yellow "highlight" ...
1
vote
1answer
149 views

How to write the beautiful code as follows

I want to know how to generate the following beautiful code, including fonts, colors, line, and the figure description. I think it is not written by \lstset. This picture is extracted from a paper ...
3
votes
3answers
212 views

How to improve this text highlighting?

I want to highlight some letters which represent an amino acid sequence of a protein using different colors. The below code works fine, but the highlighted box is not fitting exactly the letters, as ...
3
votes
2answers
134 views

Listings problem with quotes in a string

A single quote occuring inside a listings string seems to be interpreted as ending the string. Is there a way to avoid this from happening? \documentclass[12pt]{article} \usepackage[top=0.3in, ...
3
votes
0answers
102 views

How do you best differentiate listings in different programming languages? [closed]

I am currently producing a new edition of an old book of mine; this new book will incorporate code samples from several different computing environments. I can using the listings package quite ...
5
votes
1answer
91 views

Why are my custom settings for listings not taken into account?

I would like some help to get my source code to look correct. The code is supposed to look like this: As you can see, some words should be purple and bold, some should just be bold, some should be ...
4
votes
1answer
105 views

How can I define a custom class of keywords in listings?

How can I define a custom class of keywords in listings? In the C# listing below, keywords, such as using, namespace, etc., get highlighted as desired. However, I would like to define a custom class ...
5
votes
0answers
162 views

How to activate syntax highlighting for multiple references in TexStudio?

I want to enable highlighting for multiple references command \parencites {} of Biblatex package the same as of a similar command for one reference \parencite {} using TexStudio editor. The image ...
4
votes
1answer
189 views

Highlighting of Beamer navigation bar

I have an issue with the highlighting of my navigation bar within a beamer presentation. On my computer monitor the highlighting looks quite good, but i like to have the current element of the ...
1
vote
1answer
47 views

Remove spaces from source code

I have this code (javascript from language option supported in listings) \lstset{language=javascript} \begin{lstlisting} $('#term').terminal(function(command, terminal) { var cmd = ...
0
votes
0answers
27 views

Is there syntax higlighting for javascript in LaTeX? [duplicate]

Is there a listing setting for javascript, or a package that can be used instead?
3
votes
1answer
83 views

Problems with spacing in lstlisting with escaped code

Consider the following code: \documentclass{beamer} \usepackage{listings} \begin{document} \begin{frame}[fragile]{title} \begin{lstlisting}[escapeinside={!*}{*!},] int add int !*\color{red}add*! ...
7
votes
2answers
170 views

Highlighting text through stacked colored underlines

I have sentences in which characters have been "marked" by some people and not by others. I'd like to present the markings simultaneously. Stacked colored underlining (in which a line represents each ...
4
votes
2answers
183 views

Making an unfilled circle including a number in a table

I wonder is it possible to highlight a number enclosing with an unfilled circle next to a line in a listing or table like the image below? \documentclass[english,a4paper,12pt]{report} ...
1
vote
0answers
108 views

Kile syntax highlighting: A single dollar sign in the preamble

I'm using Kile to edit my LaTeX documents. I define my own custom environment to hightlight LaTeX code named lstLaTeX with the following code: \documentclass[a4paper]{scrartcl} ...
3
votes
1answer
476 views

Color highlighting text and environments in LyX

I am using LyX 2.0.5 with document class article and 'Theorems (AMS)' in the modules. I am wondering if it is possible to make it so that the titles of different environments will be highlighted in ...
3
votes
1answer
178 views

Annotating tables

I'm trying to annotate a table by highlighting and annotating the final column, yet once I use the\tabnode together with coloring I get misalignment. Either the content of the cell marked with ...
1
vote
1answer
94 views

Use common latex quotes with csquote in french mode and keeping specific highlight in SublimeText

I'm using Sublime Text3 with Latexing, and i search to know if it's possible to replace automatically during compilation the regular quote for latex ''mytext"" by \enquote{} That seems silly but, a) ...
3
votes
2answers
69 views

Impossible to select text and, then, autoformat it with Emacs+AUCtex

With Emacs+AUCTeX, I was able to select text (with the shortcut CTRL+SPACE) and, then, format this text. For example, it was possible to select a sentence (the text is highlighted) and to press C-c ...
4
votes
1answer
87 views

How to automatically color a string that starts by a specific character (@)?

Using the memoir class, I'm looking for a way to automatically color any string that starts whith an @ character, whether it be in the main text or in a footnote. Any idea how to do that? Update : I ...
2
votes
1answer
210 views

After changing Kate's LaTeX syntax highlighting file, syntax highlighting for LaTeX can not be selected anymore in Kile

I wanted to adapt the Kate LaTeX Syntax Highlighting file (in my case: /usr/share/kde4/apps/katepart/syntax/latex.xml), to have a different highlighting in Kile, as in the answer to disable syntax ...
8
votes
1answer
155 views

How to get more than 3 levels of nesting in mdframed environments?

Before I get to many of "don't do this as it does not look good", I have two modes of my documents: Final mode: where there is ONLY one level of nested mdframed Review mode: where there are numerous ...
4
votes
1answer
308 views

Can the listings package be set up to highlight Prolog code like minted does?

I am interested to know how listings can be customized to mimic the Pygments's Prolog lexer (i.e. make Prolog code represented by listings look the same as it is done with minted) I previously asked ...
3
votes
1answer
64 views

Beamer Frame is displayed wrong

i made a Code for alerting through a frame. It adds an empty (just looks empty very light text) frame in front of the greyed out frame (Picture below). It only appears to add a frame, if i use ...
6
votes
2answers
200 views

How can you highlight a C compiler directive spanning multiple lines?

In my \lstset{...} I have morecomment=[l][{\color[rgb]{0.1, 0.2, 0.8}}]{\#}, which I've seen used to give preprocessor commands colour. This works just fine but I'd like to get multi-line macros to be ...
8
votes
1answer
265 views

How can I automatically highlight SuperCollider symbols and environment variables?

This question led to a new package: sclang-prettifier I've been poring over the listings manual, trying to figure out how to get some very specific types of formatting for the SuperCollider ...