Tagged Questions
6
votes
2answers
72 views
How to edit the length of a color box?
I've typed my Resume and Im using a color box, with a line underneath it. However the grey colored box doesn't reach the full length of the page width.
\documentclass[letterpaper,11pt]{article}
...
5
votes
2answers
82 views
Getting a particular kind of page border using background package
I am doing my project report using latex, and the format requires a particular kind of page border around each page. (Its a black thick box enclosing a thin box).
I saw this question,
Multiple border ...
3
votes
1answer
97 views
Set the width of a fcolorbox
Hi a very basic question I'm sure, but is there a way to tell \fcolorbox in xcolor to draw the box of a certain width.
For example with \fbox I would do
\documentclass{article}
\usepackage{xcolor}
...
3
votes
1answer
71 views
lstlisting in a box?
My problem is that I am trying to write a document with coloured sections for examples. Examples can contain code listings. Somehow I can't seem to combine a background colouring with a listing, or ...
1
vote
1answer
89 views
Set background color of a box with predefined width
I would like to have something like a minipage with colored background, i.e. a box where you can predefine the width and the background color. My attempt
\colorbox{green}{\begin{minipage}{\slwidth}
...
4
votes
2answers
58 views
How can I set the color of an \sbox / \usebox?
In the following code, I want to produce a coloured shape, for example a \rule{1em}{1em}. If I use the \rule as is, it works as expected. However, putting it in an \sbox somehow breaks colouring and I ...
3
votes
2answers
73 views
Why does xcolor not like \fbox (or vice versa)?
This document would not compile and a rather cryptic ! Illegal unit of measure (pt inserted) pops up. Here's the MnWE:
\documentclass{article}
\usepackage{xcolor}
\renewcommand{\fboxrule}{0.9pt}
...
8
votes
1answer
344 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")?
3
votes
2answers
225 views
multicols within colorbox
i'm trying to get a gray background for an entire multicols environment and get errors with this "minimal" working example:
\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
...
4
votes
2answers
320 views
Remove space before colorbox
I've made the command
\newcommand{\pink}[1]{\colorbox{red!20}{#1}}
to highlight in pink. It works fine for words and sentences, but if I want to highlight a subpart of a word, e.g.
laugh\pink{ing}
...
6
votes
1answer
286 views
Page header with gray background and without margin
After finishing my thesis in LaTeX (I am an absolute newcomer) I've been asked to format it in a specific design matching a doc-file I received.
I've managed to change titles and fonts and margins ...
11
votes
2answers
350 views
How to create Multilevel Colored Boxes using tcolorbox/any other package?
tcolorbox Manual provides the following example:
Can anybody please suggest me how to create exactly this type of box - The no. of rows to add must be flexible(It seems that tcolorbox has no option ...
5
votes
1answer
319 views
Equations in fancy boxes
I've checked the post here, where the package empheq is used for embedding equations into coloured boxes.
With that idea, I wrote in my file the following:
% in the preambule
\usepackage{empheq}
...
5
votes
1answer
216 views
How to Create Colored Text Boxes with DIFFERENT colors using “\leftbar” command?
I am using the following code to generate a Colored Box in Latex:
\renewenvironment{leftbar}[1][\hsize]%
{%
\def\FrameCommand%
{%
...
7
votes
3answers
521 views
How to construct a coloured box with rounded corners
Here is the specs of the box.
Color of the bar rule should be:
\definecolor{mycolor}{rgb}{0.122, 0.435, 0.698}
Radius of the 4 corners of the box: 4pt
Thick line = 0.5pt
Text should be 6pt ...
3
votes
1answer
497 views
How to keep transparent fcolor box?
I am using \fcolorbox on a background that is itself colored; I don't need color inside the box, and I want its background to be transparent so that the background color shows through. The ...
19
votes
3answers
3k views
How to highlight an entire paragraph?
I'd like to highlight paragraphs such that the highlight color appears as one whole rectangle underlying the entire paragraph. I have looked around but nothing gives me the desired effect so far.
For ...
2
votes
1answer
282 views
Background color of breakable box: removing thin blank lines
The purpose of the mybox environment in the following document is to
typeset a box in a yellow background. The box may be split by page
breaks. The algorithm used is similar to the one found in the ...
3
votes
1answer
300 views
Color box with outline but some difference
\begin{boxedlaw}{6.4in}
\colorbox[HTML]{F8E0E0}{
\begin{minipage}[c]{380px}
\begin{center}
\begine{verbatim}
\# define LM_ENCA 18 //Port0
\# define LM_ENCB 17 ...
6
votes
1answer
472 views
LuaTeX colored boxes with rounded corners
What is the simplest way to make coloured boxes with rounded corners in luatex?
With xelatex I used pstricks and it was simple, but with luatex it is not working.
9
votes
2answers
2k views
How to highlight important parts (with a gray background)
In the below link
http://www.math.uiowa.edu/~goodman/algebrabook.dir/bookmt.pdf
the author highlights anything which is important using a greyish color background. For example, if you see ...
7
votes
3answers
5k views
Change border color of \fbox [duplicate]
Possible Duplicate:
Is there an \arrayrulecolor-like command to change the rule color of \fbox?
I'm using an \fbox to have a border around a minipage.
\fbox{
...
2
votes
2answers
124 views
Smaller font sizes in boitecoloriee environment gives bad result
The boites package defines environments that allow page breaks inside framed boxes whose edges may be variously fancy. The bundle includes a few examples (shaded box, box with a wavy line on its side, ...
18
votes
1answer
541 views
Caption parbox 6.0 pt too wide
For my listings, I use this caption setup:
\usepackage{caption}
\DeclareCaptionFont{white}{\color{white}}
\DeclareCaptionFormat{listing}{\colorbox{gray}{\parbox{\textwidth}{#1#2#3}}}
...
7
votes
3answers
2k views
Best way to create colored text boxes
I am retyping some old exams into LaTeX, and I encountered the page below
Now with some clever commands, and whatnot I was able to create something almost identical. Though the spacing is a tad ...
8
votes
3answers
2k views
A version of colorbox that works inside math environments
I'd like to highlight particular parts of an amsmath environment. Here's a minimal working example:
\documentclass{article}
\usepackage{amsmath,color}
\newcommand{\abs}[1]{\lvert#1\rvert}
...
3
votes
2answers
1k views
Draw box with colored background and linebreaks which adjusts to the text width?
I want to draw labels on a photograph. The labels will only contain 1..3 words, and sometimes there shall be a linebreak, e. g.
Big House \newline
(empty)
Is it possible to create a box which draws ...
6
votes
1answer
1k views
Rounded corner colored box around figure
I'm trying to get Rounded corner grey-colored box around figures.
One solution would be to use
\usepackage{float}
\floatstyle{boxed}
\restylefloat{figure}
but this results in black box around a ...
8
votes
4answers
3k views
Colored box in new environment
I have a problem, I'm fairly new to LaTeX but I think I got the basics.
My problem is that wants to create a environment that can create a minipage with a background color and some text in it.
I can ...
5
votes
1answer
4k views
\colorbox{color}{text} without increasing the height and width of the cell in a table
When using \colorbox{color}{text} to put background color for the text in a table, the text with background color seems to take more space and makes the respective cell higher and wider. Is there a ...
10
votes
3answers
7k views
How to draw a colored framebox without filling the background?
I like to draw a \fbox{..} which is colored. The xcolor package gives
\fcolorbox{<frame color>}{<background color>}{<text>}
But this forces me to set a background color. I like ...
5
votes
1answer
389 views
How to put fixed-height shading around text (inline)?
I have a chunk of code in an alltt environment and I want to highlight elements that are auto-generated (two colours for different methods):
\newcommand{\gen}[1]{\colorbox{DGray}{#1}}
...
4
votes
2answers
1k views
How to access toc entries with titletoc
I'm bit lost with the content of titletoc.sty. I'd like to access toc entries, meaning chapter title, section title and so on to put them in a colorbox. I think it is somewhere in the ...
2
votes
2answers
1k views
6
votes
3answers
815 views
amsthm environment and colorbox
I'd like to customize the amsthm command a little bit but I cannot find the relevant lines in the (undocumented?) .sty.
How can I put a colorbox on the name of the environment
...
8
votes
5answers
2k views
Set \strut height
I'm using quite a few \colorbox and \colorfbox in a document but they weren't sitting at the same heights (because some words contained g and this seemed to push the box down.
The solution I found ...
5
votes
3answers
4k views
Change border color of a \boxed equation?
I recently asked this question. The solution worked for me but I have a problem. cropped images are as small as possible. I would like to have a gif that bounds to borders of box of the equation. so I ...
5
votes
1answer
2k views
Preparing a beamer poster: how to create a border box?
I am preparing a poster with LaTeX using beamerposter, following the examples of the beamerposter site. In these examples, the title is themed with a background color. I would like to have the title ...
9
votes
2answers
993 views
How do I backcolor in verbatim?
I have some code I want to typeset as verbatim (lstlisting would be ok as well) - but I want to highlight some parts of it via a different background color, i.e. something like this:
\begin{verbatim}
...
4
votes
1answer
1k views
Apply gradient (shading) background to algorithm listing
Background
A number of source files are included within floating algorithm boxes. The source files are PNG images with a transparent background. The document is edited using LyX.
Problem
The source ...
5
votes
2answers
6k views
Colored fancy boxes
I am trying to produce some fancy boxes. I have found the fancybox package that does the boxes I want.
What I can't find now is: How do I change their background color?
I would also like to make the ...
12
votes
1answer
5k views
Changing style of alert environment in beamer
I would like to specify a background color in the alert environment. I can, for example, use
\setbeamercolor{alerted text}{fg=blue}
to change the colour of the alterted text to blue, but this
...
3
votes
2answers
460 views
Is there an \arrayrulecolor-like command to change the rule color of \fbox?
The question has been written above.
8
votes
3answers
7k views
Height of colorbox
I'm trying to "highlight" two parts of a sentence by using a \colorbox like so:
\colorbox{red}{This is} \colorbox{blue}{a great sentence.}
The problem is that in the second part the height colorbox ...
2
votes
1answer
3k views
beamer: How to change border size of beamercolorbox?
Is it possible to style a border of a "beamercolorbox"? Like in the theme Szeged, but with ONE thin line above the footer instead of the two thick lines.
10
votes
1answer
4k views
Relative padding of a minipage's paragraph
Background
Created a custom command for rendering quotations (epigraphs).
Problem
The text in the following image has no space at the border:
The word "and" is flush with the right-margin.
Code
...
4
votes
1answer
973 views
Change float background colour
Background
Including images within Algorithm floats. The images are trimmed to size automatically by a batch file.
Problem
In the following portion of the PDF, Listing 1.1 has a lot of space to the ...
1
vote
1answer
290 views
Moving a framed environment to the left
I want to move the following remark environment, which nicely splits over pages :), towards the left so that it is not centered anymore. I have been unsuccessfully trying for a while: would you please ...
113
votes
6answers
23k views
Remove ugly borders around clickable cross-references and hyperlinks
I know that I can use hyperref to make cross-references and hyperlinks clickable. That makes the clickable areas outlined in fluorescent green, however. How can I make the green boxes go away?



