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)

3
votes
0answers
31 views

Text highlighting that works with CMYK xcolor mode?

I looked at Cool Text Highlighting in LaTeX, and as my MWE (below) demonstrates: ... the first part, highlighted with soul's \hl, fails when [cmyk]{xcolor} is used. The accepted answer in the link ...
5
votes
1answer
50 views

Combine todonotes with mdframed to highlight paragraphs and write notes

I am trying to combine todonotes with mdframed to create a unifying command that allows to write todos and and highlight paragraphs at the same time. The syntax is ...
4
votes
1answer
62 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
47 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
83 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 ...
7
votes
2answers
2k 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
52 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
90 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
109 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
63 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
76 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
92 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
71 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
174 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
81 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
54 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
87 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
45 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
247 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
184 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
125 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
54 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
89 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
130 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
123 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
68 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
120 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
157 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
220 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
146 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
105 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
92 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
112 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
168 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
235 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
48 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
85 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
179 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
188 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
112 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
516 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
182 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
103 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
73 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
236 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
160 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
346 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
67 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 ...