Linked Questions

3
votes
2answers
4k views

Wrapping text in a fcolorbox? [duplicate]

I'm using package "color" to have a green text box with black text, and my code is - \textbf{\fcolorbox{black}{green!30}{black text on a boxed green background}} How can I get it to wrap lines ...
2
votes
1answer
3k views

Breakable \colorbox? [duplicate]

Given a phrase in the middle of which TeX will place a return carriage, if we place this phrase within a \colorbox, TeX no longer places the return carriage and the phrase protrudes in the margin. Is ...
1
vote
0answers
102 views

Underlined math in a Beamer presentation: felt-tip marker underlining [duplicate]

I am composing a Beamer presentation, and I would like to underline some mathematical entities for emphasis. I am aware of the ulem package, however for a presentation I would like something more ...
0
votes
0answers
76 views

How to highlight few sentences in a paragraph? [duplicate]

I would like to get a simple result, as the following Is it possible?
1
vote
0answers
54 views

How to display highlighted text generated by user command properly? [duplicate]

I want to highlight some things to do or alternative words/phrases for future refinement in a draft. I have tried to highlight text with \hl in soul package or \colorbox in xcolor package. But \...
0
votes
0answers
50 views

How to make a realistic highlighting [duplicate]

I'm using \hl{} from soul package to highlight some words in my document. However, I'd like a "realistic" highlighting, simulating the result of a "manual" note: a not-so-regular rectangle with "...
91
votes
5answers
8k views

Is there a way to have coloured hyperref hyperlinks in the PDF, but have them print “as if” they were black?

I like having my hyperref hyperlinks a different colour, so it's obvious that they are links. But when I print a copy of the PDF, I don't want the links to be coloured, because you can't click them, ...
60
votes
7answers
12k views

Efficient ways to anonymize a document

Many academic journals practice double-blind peer review which means that the author is required to blind their document by removing any references that can reveal the author's identity. How can I ...
56
votes
5answers
18k views

Extract x, y coordinate of an arbitrary point in TikZ

I need a macro to extract the x and y coordinates from an arbitrary point, like (3,4), or like (A), or like ([xshift=-2pt] A.north west), where A is the name of a node. I've seen the solution \...
31
votes
2answers
1k views

Highlighting arbitrary chunks of text connected to quotes in margins - Can this be done in TeX/LaTeX?

I've got an idea and I'm wondering if it is possible to implement in TeX/LaTeX. The idea is I want to be able to associate arbitrary chunks of text on the page with a quote in the margin, and denote ...
11
votes
5answers
1k views

Let's get fancy: Text like tag?

How to make some text appear with a background like it appears in tags, for example the tags in Stackoverflow?
13
votes
3answers
6k views

How to “highlight” text/formulas with tikz?

I try to construct a yellow rectangle (with tikz) so that I can use it to "highlight" a piece of text. Below you see a minimal example. It already looks good, but how can I avoid the word "dummy" to ...
17
votes
3answers
2k views

Red squiggly imitation

Is there an elegant way to draw red squigglies under text, to emulate what a [source] code editor does when it detects errors (either spelling mistakes, syntactical errors or semantic errors)? Here ...
10
votes
6answers
2k views

A \boxed alternative with nicer spacing?

I like using \boxed to emphasize my answers in homework problem sets. However, whenever I use superscripts/exponents inside the box, the box becomes taller than it seems it should. This causes two ...
25
votes
1answer
700 views

Environments for visually setting text apart

I have a document consisting of alternating paragraphs from different voices. Because the paragraph blocks look too much alike, I need some way to give the different parts a different look. I have ...
18
votes
3answers
2k views

Rounded box around placeholder text that supports line breaking

I want to draw a rounded box around a piece of text like that: The left and right borders should be half circles and line breaking should be supported. This my code so far: \setuppapersize[A7] \...
10
votes
4answers
6k views

mdframed: size frame to content

Consider this: \documentclass{article} \usepackage[framemethod=TikZ]{mdframed} \begin{document} \begin{mdframed}[innerrightmargin=0pt] TEXT\end{mdframed} \end{document} This produces a frame that ...
7
votes
5answers
21k 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. ...
17
votes
2answers
10k views

Installing background and foreground page layers with TikZ

Several times I discovered the need to draw TikZ material behind and on top of the page text (How to draw text-anchored tikz line below text instead of above?, Test if a paragraph has a page break in ...
15
votes
1answer
10k views

How to make highlighting work in beamer with overlays

I'm trying to use the soul package to get highlighting via \hl{some text}. I'd like to do this in overlays in beamer. I'm trying to follow the guidelines in section 9.6.1 of the beamer manual to ...
7
votes
4answers
2k views

A \boxed alternative with minimal spacing?

The following code comes from this post. The problem is that I would like a way to automate the size of the box so as to be very small with a few of spacing, but the following solution doesn't work ...
7
votes
2answers
2k 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 ...
9
votes
1answer
18k views

Highlight some words of a beamer

If I want to highlight some words of following frame: \begin{frame} \frametitle{Paragraphs of Text} Sed iaculis dapibus gravida. Morbi sed tortor erat, nec interdum arcu. Sed id lorem lectus. ...
11
votes
2answers
2k views

Test if a paragraph has a page break in it?

I'm trying to use TikZ to make fancier frames. I'm using the clever \tikzmark thing that Andrew Stacey wrote to put nodes at the top left and bottom right of the body of an environment. Then I use ...
15
votes
1answer
14k views

Change text background within paragraph (with automatic linebreaks)

How do I change the text color as well as the text background color for e.g. a sentence within a paragraph? I know \textcolor for coloring the font and \colorbox for background coloring [http://en....
7
votes
1answer
13k views

highlighting math

The issue of breakable highlighting was addressed in Cool Text Highlighting in LaTeX But how, in latex, do I highlight text involving math, something like which, right now, I do with a succession of ...
17
votes
2answers
1k views

List of Underlining Packages - Pros and Cons

The \underline macro built into LaTeX is pretty much not useable per Why does underlined text not get wrapped once it hits the end of a line ? I have been attempting to use the soul package to ...
8
votes
2answers
1k views

Special action for every new page

I need to define a macro or do some special action every time a new page is encountered. In some sense I want to "number" tikzpictures but have all the tikzpictures on the same page contain the same ...
8
votes
3answers
3k views

todonotes: How to make literally inline notes without line breaks?

For the following MWE, I need the inline note to be in the same line without extra space or additional line breaks. \documentclass{article} \usepackage{todonotes} \author{diaa} \begin{document} ...
9
votes
2answers
2k views

Fixing a code to highlight formulas and text on several lines

In this post I've found the following amazing code to highlight text on several lines. The problem is that code dosen't work well with formulas : for example, fraction using the mode display are ...

15 30 50 per page