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
55 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
2k 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 ...
7
votes
2answers
763 views

Underlining words with dash-dotted line without affecting the other text in LaTeX

NOTE: I am searching for a LaTeX solution. The ConText code was offered, which is a good answer, but that doesn't fit my purpose. I want to underline some words in text to show the parts of ...
11
votes
2answers
1k views

MS Word-style Comments

I'm not a fan of Microsoft Word, but I have missed the ability to comment on papers that I'm working on with friends using comments that appear as little bubbles in the margins. I've managed to ...
9
votes
2answers
376 views

How to define a macro to make a line of text red?

I'm looking for a way to make a new command that makes text on that and only that line red (or in another way clearly distinguishable). Like the % symbol comments out a line. Are commands that work ...
6
votes
1answer
993 views

Create box around text without creating a paragraph and with line breaking

I want to draw a box (no rounded corners, keep it simple ^^) around one or multiple words. There are two special things: 1) the box should support line break and 2) the box should not cover multiple ...
8
votes
2answers
439 views

Is there any solution for highlighting text in CJK?

Is there any solution for highlighting texts or sentences in Chinese, Japanese, and Korean? I know none, at the moment. But this will be changed, if someone would like to help me with CJK in LaTeX. ...
8
votes
1answer
1k views

Mixing underline and strike-out

Word allows for all kinds of font formatting: The above example combines strike-through/strike-out (like this) and underlining. I'd like to be able to do the same, but neither ulem nor soul allows ...
4
votes
1answer
1k views

Highlight/color a part of text in block in beamer

I am using beamer in Latex to make a presentation. I use a block for definition like: \begin{block}{P1} \justifying Some text here \end{block} Let us say I wish to highlight a word "Some". By ...
3
votes
2answers
413 views

The Current State-of-the-art TikZ Underliner

UPDATE: The Bounty period is over (AND GUESS WHAT? I gave the credits to the wrong Person (sorry CFR), but thanks Aditya for your contribution. Please upvote CFR answer!!). Find below my current ...
3
votes
3answers
760 views

How to cross out a word with a wavy line in LaTex

I need to cross out a word with a wavy line in LaTex. I used ulem package but the result was underlined word with a wavy line. This is my code so far: \documentclass{article} \usepackage{pict2e} \...
2
votes
2answers
882 views

Strike through with colors

My question is related to: Strikeout in different color appears behind letters, not on top of them, except that I use beamer instead of article. Therefore, the solution provided there is somehow not ...
10
votes
2answers
378 views

Place TikZ coordinate or \zlabel at every (base)line

I'm currently adjusting the code shown in Test if a paragraph has a page break in it? to support underlining and highlighting using TikZ similar as shown in Cool Text Highlighting in LaTeX, but ...
3
votes
1answer
620 views

Colorbox with changes package

I am working with the changes package. Modifying the color of the changed passages works well with \colorlet command. Is it possible to create colorboxes (with yellow color) only around the changes (...
4
votes
1answer
357 views

How to add background for texttt (and allow line breaks)

I use texttt{} to write names of software, commands etc. within the text. Sometimes the texttt text is longer and there is a line break within it. It works well, no problem here. I wish to add ...
2
votes
1answer
536 views

How to Blend Fcolorbox with Surrounding Text

Based on \usepackage{xcolor} you can box text using the commmand \fcolorbox{declared-color-frame}{declared-color-background}{text}. Colored boxes with colored frames and linebreaks can be created by ...
2
votes
1answer
219 views

Boxed text, multiline

How can I something like this (an \fbox that can span multiple lines): |--------------------------------------------- The quick brown fox |jumps over the| lazy dog. The quick ...
3
votes
0answers
874 views

Highlighting words with special characters using \hl (soul)

I am using xelatex, polyglossia and the document is in UTF-8 encoding. I use the soul package to highlight words (using soulutf8 makes no difference). The problem is really weird, so I will go ...
2
votes
2answers
374 views

Box highlighting of text with rounded corners (soul-based)

Here it is an excellent solution from Gonzalo Medina. Could somebody help me to make it with nice small rounded courners?
4
votes
1answer
450 views

URL with dotted/customized underline AND line breaking

How can I get a dotted URL underline with line breaking? I found this solution: Having all links underlined with dotted line but this TIKZ one does not work with line breaking. I also tried a ...
5
votes
1answer
442 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 ...
4
votes
2answers
252 views

Colored background with rounded corners for a text fragment preventing an overflow over the end of line

I have already found some similar solutions, but I was not able to adapt them to my requirements: A text fragment (e.g., source code) surrounded by other text should be highlighted with a background ...

15 30 50 per page