Questions tagged [colorbox]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
2answers
304 views

How to make a border for my own environment?

\documentclass{book} \title{Introduction to Latex} \author{Me} \date{} \usepackage[dvipsnames]{xcolor} \usepackage{exsheets} \SetupExSheets{counter-within={chapter}} \newenvironment{myquestion} {\...
3
votes
3answers
1k views

How can I put two colored boxes next to each other?

I would like to have text in two colored boxes next to each other. I found \tcbox, but it automatically adds a linebreak. Please note: I can use anything that works with pdflatex. No need for \tcbox, ...
1
vote
0answers
159 views

Add rectangle color box inside align and explain using an arrow [duplicate]

Hi i'm creating a beamer presentation and trying to make my equation beautiful. Is it possible to make color rectangle or circle in align and then write something about that part of the equation. \...
2
votes
1answer
179 views

How to make box sizes consistent and “glue” boxes together (in beamer)?

I have been putting together a new beamer template and cannot solve a few last problems. A minimal working example that highlights these problems is the following (it doesn't look minimal but I feel ...
2
votes
1answer
68 views

Is it possible to add colored text (spaces, or colored boxes) to a headrule?

I intend to use small colored boxes in front of sections in order to identify at which heading level the text is located, and I'd want my reader to quickly reference the heading level by color. My ...
2
votes
2answers
2k views

Overlay specification with beamer and '\colorbox'

I use \colorbox in my slides to highlight part of the text (as if it was highlighted with a marker). The command also accepts beamer overlay specifications (e.g. \colorbox<1>{yellow}{Text}). ...
3
votes
1answer
289 views

Specific type of box around equation

When I write notes by hand, if I want to box an equation, I usually do it in the following way. I find the lowest (highest) point of the equation, I go a little bit higher (lower) and take a line, ...
2
votes
2answers
389 views

Adjusting vertical space around equation using \empheq package

I have been using a simple method for adding a framed, colored box around important equations I want to highlight. The empheq package has worked well. However, I am having a lot of trouble figuring ...
0
votes
1answer
210 views

Extending a colorbox on the footnote

In the middle of my book document, I would like to add a page like a title-page. This page is half white and half light blue, with some information in the two halves. Header and footnotes are ...
3
votes
1answer
1k views

How to control the dimensions of \colorbox

I want a long narrow horizontal colored rectangle, something more like a thick line, but I cannot get the height below a certain amount. The best I can come up with is: \documentclass[11pt]{book} \...
1
vote
1answer
198 views

Highlight text in \mtctitle

I would like to produce a title for a table of contents that is highlighted in yellow. However the code \renewcommand{\mtctitle}{\colorbox{yellow}{Contents}} does not seem to work, instead giving ...
2
votes
1answer
196 views

Different definitions of fboxsep in different parts of the code

Is it possible to define one value of \fboxsep to use in an \fbox, for example, and then use another value to use in, say, a \colorbox? Can you define such values locally?
0
votes
0answers
295 views

Inline colorbox & linebreaks

First and foremost, I have found some solutions here, here, and there but they seem overly complicated for what I am trying to accomplish. Problem I am trying to somewhat reproduce the code ...
1
vote
1answer
232 views

colored columns with colored titles in beamer class

I'm trying to create a 2-column poster using the beamer documentclass. Each column is to be split into several blocks and each of these blocks has its own title. The titles should have a background ...
6
votes
3answers
252 views

About a colored table

I am facing a problem of making a table with colored row. The target picture is as follows: My own tex code about the required colored table is as follows: \documentclass[french]{article} \...
2
votes
1answer
308 views

\parbox inside \colorbox ends up being to wide

Can you tell me why the following code always ends up being to wide (minimal example)? It seems to be independent of the environment so I assume that \colorbox has some additional margin? How can I ...
0
votes
1answer
521 views

beamer \usebackgroundtemplate \vbox to \paperhigth too low

In my presentation on each frame (including title frame) I need a background image and a footer line on each frame with the companies name (so that the image begins direclty upon this footer line). I ...
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 \...
1
vote
1answer
629 views

How to create a colorbox with only one rounded corner [duplicate]

is there any posibility of creating a coloured text box with only one rounded corner? (Maybe using tikz) Thank You
4
votes
1answer
312 views

Font used for special characters in listings

I'm trying to highlight code fragments in the listings environment. To do this, I'm using a colorbox with no padding as shown in this answer: \newcommand{\reducedstrut}{\vrule width 0pt height .9\ht\...
6
votes
1answer
11k views

How to change options in the fcolorbox environment

How can I change the options in \fcolorbox{black}{gray!30}{My text} so that the box gets rounded corners for instance or a thicker border? Best regards Henrik
1
vote
3answers
356 views

How to make \colorbox fill the color between underline and overline of a text?

I want the \colorbox to fill the content between underline and overline of a text. How can i achieve this? Currently, i use $\overline{\underline{\colorbox{light-gray}{\makebox [\textwidth][l]{\...
4
votes
1answer
1k views

transparency in colorbox

I want to define my paragraphs and subsubsections to always be inside of a transparent box with a certain color. I know that there's a transparency-package but this doesn't work with the PDF-view ...
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 ...
11
votes
2answers
6k views

Colorbox does not linebreak

I'm new here, so I'm sorry for any mistakes or error in from my part. I am trying to make colored textboxes that refer to colored blocks in a figure. My problem is that the colored box does not ...
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 ...