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)

6
votes
2answers
485 views

Highlight \verb in inline text

I'm new in LaTeX and I'm searching for solution to highlight verbatim text inside paragraph (for example, it is like on this page, where code is highlighted). Can anyone help me with this? Let say, ...
0
votes
1answer
293 views

Issues when including a tex file [closed]

I have this without any issues if I use it alone. However if I call it with input or include I get this Why?
2
votes
1answer
503 views

Notepad++ highlighted code into LaTeX?

I want to export my Notepad++ highlighted code into LaTeX. Is it possible? Note that my codes are PHP codes.
23
votes
1answer
497 views

How can I highlight ligatures?

I'd like to highlight all the ligatures used in a document similar to the image below as an attempt to show off some of TeX's tender loving care for the font being used. Is there a way to do this ...
2
votes
1answer
715 views

Piecewise highlighting and dim the previous section/text in beamer

I found a way to piece-wise highlighting in beamer but I also want to dim the previous items as the beamer starts to uncover the newer sections. I have done something like this in powerpoint but stuck ...
3
votes
1answer
685 views

More sophisticated syntax highlighting of Prolog code

I'm wondering, does listings allow you to define your own syntax highlighting, and if so, how sophisticated is its system? Here's a minimal example: \documentclass{article} \usepackage{listings} ...
2
votes
0answers
133 views

spot package with pdflatex [closed]

I need to draw an ellipse around a word in a beamer presentation and I stumbled across the promising Spot package. Unfortunately it does not seem to work with pdflatex and I could not find any hint ...
5
votes
2answers
273 views

Highlighting intersections

I would like to highlight the region C in the Euler diagram below. I tried to play around with fill opacity command, but I was not able to highlight C alone. Should I use the intersections libraries ...
1
vote
1answer
281 views

minted Environment Inside minipage Environment

I am having to use the minted environment inside a minipage environment quite often in my document. I wanted to write a new environment for doing this, but since minted isn't designed to be included ...
3
votes
1answer
396 views

Markup Haskell sources in complex structured document with `lhs2TeX`

Simple task Suppose there is a example.tex file with Haskell listings: \documentclass{article} \usepackage{fancyvrb} \DefineVerbatimEnvironment{code}{Verbatim}{fontsize=\small} \begin{document} ...
3
votes
1answer
258 views

Package minted: \mint Command Not Working Inside tabularx Environment

The question, How to embed a minted environment inside a tabular environment?, addresses a similar issue, but I am using: the tabularx package, and the inline \mint command Is there a workaround ...
7
votes
1answer
251 views

How can I highlight a keywordsprefix in listings?

Ok, so here's my problem which I'm repeatedly gnawing on, whenever I try to typset source code. To this day, I have not found someone on the internet asking for the same problem. I want to add a ...
5
votes
1answer
110 views

Ugly spacing in lstinline

I am using the listings package to typeset Erlang source code in my thesis. For short snippets, I use \lstinline. The result is often unsatisfying. Consider the following example, which contains ...
6
votes
4answers
205 views

Highlight / color parts of text

LaTex newbie here. Currently using vim with solarized color scheme to edit .tex documents. When writing I often jump around to different parts of the document, leaving gaps behind to work on later. ...
1
vote
1answer
265 views

Highlighting for viml in latex?

I want syntax highlighting for vim scripts in my latex document. So if I write \begin{lstlisting} autocmd FileType c setlocal expandtab shiftwidth=4 tabstop=4 softtabstop=4 \end{lstlisting} it ...
1
vote
0answers
116 views

Emphasize text that is highlighted using the soul package [closed]

I can highlight a bit of text (i.e., make the background yellow) using the soul package like this: \hl{a bit of text} I figured I could also use italics like this: \hl{\emph{a bit of text}} ... ...
4
votes
1answer
680 views

Emacs / AUCTeX — Customization of keyword highlight syntax

font-lock-keyword-face is used by AUCTeX for all keywords, and I have not been able to find a way to create a new keyword that is a different color. I have defined the foreground of ...
4
votes
1answer
653 views

Tikz beamer highlight different nodes in presentation using againframe

I'm working on a presentation in Beamer, I have a tikz flow chart that I want to repeat after a block on the chart is handeld in the presentation. To make it visually easy for the users I would like ...
4
votes
1answer
178 views

Highlight theorem environment using todonotes

I'm trying to highlight theorem-like environment (defined using amsthm) utilizing todonotes. In the preamble I have: \newtheorem{que}{Question} \newcommand*{\question}[1]{% ...
2
votes
1answer
289 views

disable syntax highlighting in kile

In the \verbatim environment, the syntax highlighting is disabled default, e.g. a $ ist not recognized as beginning of the math mode. I add my own environtment (\rawtext) to the kile Verbatim ...
5
votes
1answer
321 views

Highlighted Matrix with brackets

I would like to produce the matrix as shown in this figure: At the moment, I have this code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} ...
5
votes
2answers
679 views

How can I get multiline outlined/shaded text in LaTeX?

How can I get multiline text highlighted by means of outlining or shading? I found some solutions (contour, shadowtext, pdf-trans) but none able to wrap multiline text. Some examples of outlined and ...
8
votes
2answers
306 views

How can I highlight an interactive GAP session just like so?

Suppose I want to typeset a screen session in some programming language (GAP in my case, but it could be Python, BASH, or something else with an interactive read prompt just as well). So on my screen, ...
6
votes
1answer
2k views

Cell coloring (highlighting) with in-out effects in a table in beamer

I need cell coloring (or highlight effect) in a cell of a table in beamer after a click (I mean, I am planning to talk about something in that frame and I will emphasize just a number in a cell at the ...
2
votes
1answer
136 views

How can I highlight this item of an enumerated list? [duplicate]

How could I hightlight an item from an enumerated list just like this is from the following picture? \documentclass[12pt,a4paper]{article} \usepackage{enumerate} \usepackage{tikz} ...
9
votes
2answers
3k views

Beamer overlay box around text - the correct way?

I have something that "works," but I'm wondering if there's a more elegant solution. I want to box some text after an itemize in beamer, so this is what I'm doing: \documentclass{beamer} ...
6
votes
2answers
168 views

Highlighting code like one would in a SE post

When posting on SE, users can "highlight" code by using the ` symbol. Is there any way to get that in LaTeX? My intention is to highlight segments of code or particular functions. To be clear, I'm ...
9
votes
2answers
567 views

Boxed entries in matrices

I would like to create a formula or figure like this: I tried it simply with the pmatrix environment and the \boxed command, but the spacing looked horrible. I think it might be done with TikZ, but ...
2
votes
1answer
894 views

Syntax highlighting for different programming languages [duplicate]

In my paper I want to include some source codes with colored sytax. For syntax highlighting I use the listings package: \lstset{frame=tb, language={[Visual]Basic}, aboveskip=3mm, belowskip=3mm, ...
1
vote
1answer
268 views

Highlighting a Chunk of Code within a lstlisting by specifying the line number

This question in somehow related to http://stackoverflow.com/questions/1304315/highlighting-a-chunk-of-code-within-a-lstlisting but not exactly the same. I want to make some slides with animation ...
2
votes
0answers
782 views

Is it possible to reorganize coloring/highlighting priority in Texmaker? [closed]

I want to be able to see latex commands in Texmaker while in mathmode, but the settings file does not seem to account for priority via line rearrangement, so I was wondering if there was a way to make ...
1
vote
1answer
253 views

Syntax Highlight in Winedt

I am using Winedt 7.1 and learning TikZ and I am thinking about to add the commands to the keyword.ini, in the help they mentioned, adding to many keywords may affect the performance. Is there a ...
4
votes
1answer
231 views

Disable underlining in display math and resume afterwards

In my documents I have conditional text, which is underlined (in non-display math mode) to make it more obvious to the reader as to exactly which portions of text is conditional text. In display math ...
5
votes
1answer
239 views

Highlight elements in the matrix (continued)

Using @Stefan Kottwitz's solution of Highlight elements in the matrix, is it possible to select one single entry in the matrix? Where does one need to place the left and the right marks?
9
votes
0answers
459 views

Making Source Code Copyable with listings [duplicate]

I'm using listings to display some matlab code in my latex document but i'd like to have syntax highlighting. I've tried two ways of getting syntax highlighting and neither make the code copyable. The ...
8
votes
2answers
355 views

How to draw container box in TikZ? How to get it with rounded corner?

I want to draw something like this: This is what I am able to draw: This is my TikZ code: \documentclass{article} \usepackage{verbatim} \usepackage[active,tightpage,floats]{preview} ...
12
votes
1answer
374 views

Highlighting chunks of text spiral

I use the code provided in this question to draw a text spiral and now I want to highlight each chunk separated with a comma in a different color. Is there a way to achieve that? ...
2
votes
0answers
144 views

Highlight R chunks in a Knitr document when working in Kile [closed]

When working on a knitr document in kile I can get highlights for the LaTeX parts of the document by adding the *.Rnw file extension in the Modes & Filetypes tab under Open/save configuration ...
4
votes
1answer
376 views

wrapping inline long lines and adding background color

Objective I'm trying to achieve the following output. Here's the code I used to produce it. I had to hack it \begin{document} \begin{description} \item In ...
6
votes
2answers
6k views

How to adjust the beamer block width to the size of its content?

I would like to define a nice beamer block environment with the following properties a) it is always centered on the slide (horizontally) b) it is only slightly longer than its content The aim is to ...
1
vote
0answers
76 views

Highlighting modifications in a .tex file using Kile editor [duplicate]

I am looking for any option of automatically highlighting the modified or added text (in pdf version after compilation) in my current .tex file using Kile editor. I know that there is a similar ...
0
votes
1answer
257 views

List a CMake file [closed]

Does anyone have/know of a style file for the listings package which would enable the correct syntax highlighting of cmake files in LaTeX?
3
votes
1answer
1k views

Issue with soul and nested macros

I'm using package soul to highlight text, for example with \hl{some text}. It works nicely in general, but when the text contains other macros, soul simply skips it. For example: \usepackage{soul} ...
1
vote
0answers
90 views

How should I add visual indications of excerpted sections? [duplicate]

Possible Duplicate: Putting a bar in the margin How to make continuous (but breakable) vertical rule along left side of paragraph? I'm planning on including large excerpts of publications ...
10
votes
1answer
361 views

Glitch in 'Cool text highlighting'

This answer provides a fantastic "ragged text highlight". Unfortunately I'm getting a weird glitch with it: I have literally taken the source code from the link and replaced the material between ...
6
votes
3answers
545 views

Putting a coloured background behind text without adding whitespace

Consider this: I want to be able to highlight text like this without adding space around it -- so each word in the first line should line up with the corresponding word in the second line. (I know ...
19
votes
3answers
602 views

Visually highlighting symbolic material

I have a diagram in which I need to indicate the difference between symbolic mathematics and English words (potentially to someone who doesn't know about it): Colour works beautifully for making ...
10
votes
1answer
2k views

A few words in a coloured/grey background box

How can I write a few words with a grey highlighting box in the background, as shown in the picture below ("TEXT 4")?
17
votes
3answers
3k views

Color box with rounded corners around a fragment of a formula

Is there any way in TeX to highlight some part of a formula with a box having colored background and rounded corners? At present, I need to export such formulas into an image, add those highlight ...
1
vote
0answers
58 views

Drawing a box around certain parts of a matrix [duplicate]

Possible Duplicate: Highlight elements in the matrix i have a matrix: \begin{equation} \begin{bmatrix} 1 & 5 & 4 & 2 & 1 \\ 1 & 5 & 4 & 2 & 1 \\ ...