{tcolorbox} provides an environment for colored and framed text boxes with a heading line. Optionally, such a box can be split in an upper and a lower part. The package can be used for the setting of LaTeX examples where one part of the box displays the source code and the other part shows the ...

learn more… | top users | synonyms

4
votes
1answer
30 views

How was this tip box produced?

I presume Drew Neil (of Vimcasts.org fame) used some TeX typesetting engine (XeLaTeX?) to typeset his excellent book, Practical Vim. See a screenshot below. I really like the way his "tip boxes" ...
6
votes
1answer
41 views

Thumb index for parts

I found this script but couldn't manage to adjust it for parts. Here's what I got so far: \documentclass{book} \usepackage{background} \usetikzlibrary{calc} \usepackage{ifthen} \usepackage{lipsum} ...
4
votes
1answer
62 views

Resize tikzfigure in tcolorbox depending on height of tcolorbox

in my book I got many different type of boxes so I made some macros placing the boxes automatically according to their arguments. That's one of them. So far I made some boxes that have big "+" and ...
5
votes
1answer
34 views

Reduce source code of different tcolorbox macros

in my book I have a lot of tcolorboxes to use. They are slightly different so I added a macro that decides depending on the arguments, which tcolorbox to draw. Obviously that produces a LOT of source ...
6
votes
1answer
94 views

Draw a rectangle behind tcolorbox

I'd like to draw a rounded rectangle behind an existing tcolorbox. The result should look like this: That's what I've got so far: \documentclass{book} \usepackage[many]{tcolorbox} ...
3
votes
0answers
42 views

What are the differences between mdframed vs. tcolorbox [duplicate]

I am familiar with the mdframed package and its usefulness when content crosses page boundaries. But lately, I have seen quite a few questions about the tcolorbox package and don't know much about it ...
6
votes
3answers
44 views

Different format for fonttitle and counter in tcolorbox

I am wondering how can one format the counter and the title differently within tcolorbox. By using fonttitle=\small\bfseries, the results is a bold counter and bold name of the definition e.g. ...
13
votes
2answers
155 views

How to align `tcolorbox` at the top?

I want to align Some text with Lead Programmer like this: But the leftrulebox (a tcolorbox) inside the description environment doesn't align properly. The following code gives this: The code: ...
3
votes
1answer
70 views

Using position arguments with starred tcolorbox environment

The {tcolorbox}* environment is interpreting position arguments in a way I would not anticipate. When I include the *, the placement is unexpected--\begin{VocabBox}*[b]... does not get placed at the ...
5
votes
1answer
79 views

Very simple tcolorbox with picture in header

I try to add picture.png in header of tcolorbox. I want to place this picture in bottom title belt. This is my box: \newtcolorbox{SimpleBox}{ breakable, enhanced, colback=red!0!white, ...
3
votes
1answer
76 views

How do I draw a box with tcolorbox

I'm trying to draw something like the following: Code for desired effect without using tcolorbox \documentclass{article} \usepackage[margin=0.5in,showframe]{geometry} ...
4
votes
2answers
50 views

Outer margin of tcolorbox

I would like to be able to set outer margins in a tcolorbox environment. Something similar to the options leftmargin and rightmargin of the mdframed environment. Is it possible? It seems to have ...
6
votes
2answers
62 views

Adding an Image inside tcolorbox

I have a quick question regarding LaTeX's ability to add a small image inside a tcolorbox. What I am trying to accomplish is an entire line with a red color fill and left aligned white text and an ...
1
vote
0answers
28 views

Maple code in comment create with tcolorbox package

i have 4 questions: Insert a char like ‎\sqcup‎ between 'Hello' and 'World' in the "Hello‎ World"? How can i change code environment so that comment (not in mathmode) is sensitive for Maple keyword, ...
3
votes
1answer
62 views

tcolorbox Spanning Two Columns in {paracol} Environment

The paracol environment allows figures to span two columns by using an asterisk in the figure's environment declaration: \begin{figure*} ... \end{figure*}. I'm not familiar with the guts of why that ...
1
vote
0answers
31 views

Increasing counter ten by ten in Tcolorbox… and refer good?

I'm writing a book of probability in arabic, using polyglossia, and I want to increase the counter of some of my boxes ten by ten (the cause of this is that the arabic letters are numeroted with ...
1
vote
1answer
38 views

insert Maple code in comment with mathmode create with tcolorbox package

see this code: \documentclass[svgnames,12pt]{report} \usepackage{amsmath,amsfonts,amssymb,amsthm} \usepackage{tcolorbox} \tcbuselibrary{listings,skins,theorems} \lstdefinelanguage{Maple}% ...
5
votes
1answer
69 views

How do I create a verbatim box with \newtcbinputlisting?

I want define a command like \maplebox; for example the command \maplebox{\latex}. Why does the following code not compile? \documentclass{article} \usepackage[svgnames]{xcolor} ...
6
votes
2answers
141 views

Coloured boxes inside latex

I want to make coloured boxes with different colours and i cannot understand the function of the mybox{} order. I attach an example that may helps you. I write the code ...
4
votes
1answer
72 views

define environment in tcolorbox with math mode in lower

I want define an environment in tcolorbox. 6 questions: Why when i want use math lower and ams align* ‎lower‎ for set the lower part to mathematical mode with font \displaystyle, i have error? Why ...
6
votes
4answers
149 views

How to add rule in color box?

I am new to latex i want to add rule in top and bottom of the color box, My sample code is, \documentclass{article} \usepackage{graphicx,xcolor,lipsum} \begin{document} ...
4
votes
1answer
66 views

too much space between two environment create with tcolorbox

i want write a maple book, see this example code in that book: ‎\documentclass{article}‎ ‎\usepackage{tcolorbox,fancyvrb}‎ ‎\tcbuselibrary{skins,breakable}‎‎ ‎‎ ...
3
votes
1answer
84 views

Adjust width of tcolorbox to contains long Equation

My work based on that subject Create Beamer-Theorem like boxes i want all long equations be inside a box and the width to be adjust based on the content also the my box can't be split on different ...
0
votes
2answers
62 views

background framed box with newenvironment “encadre”

I want to use a floating framed box that could be nicely placed in the text. \fbox needs to be placed by hand. I wrote this code which was exactly what I want to get...but with a floating object. ...
5
votes
2answers
140 views

graphic in tcblisting

I'm using the package tcolorbox to create a file with examples Latex, I have reviewed the options tcblisting environment and use these: text outside listing listing outside text listing above text ...
7
votes
1answer
79 views

Using shortcut with argument in tcolorbox

I want to do something like this: \documentclass{article} \usepackage[ngerman]{isodate} %for printing the date \usepackage[dvipsnames]{xcolor} %for color names \usepackage{tcolorbox} ...
9
votes
2answers
159 views

Beamer: highlighting text with colored background through which surrounding text can be seen

On some slides I'd like to highlight some text by using a colored background, like so: I've exaggerated the width of the border around the text in this example to indicate the effect I want. I ...
6
votes
1answer
83 views

Listing within tcolorbox: how to adjust width to the natural listing width?

I would like to create a tcolorbox whose width is computed based on the longest line I have in listed code. I know it is possible to adjust the width with respect to the title. Is it also possible to ...
8
votes
2answers
130 views

How do I control parskip within a tcolorbox?

I am using the tcolorbox to provide some beautiful frames around certain parts of my document; I use the parskip to give nice spacing between paragraphs. When I have more than one paragraph inside a ...
4
votes
1answer
84 views

tcolorbox minted library with python3 non-determinism

Later versions of the package tcolorbox allows formatting source code with its minted library (which uses the minted package). When a document is compiled, a temporary file with extension .pyg is ...
4
votes
1answer
134 views

tikz node with listing environment

I'm trying to create a c++ class hierarchy. Each node in the hierarchy is a class description with code listing in it and multiple nodes are connected by lines and arrows depicting the hierarchy. I'm ...
7
votes
1answer
249 views

Does some one know how to create a specific kind of block on Beamer?

I would like to create a block in Beamer exactly as the one illustrated below. Does someone know how to do it?
3
votes
1answer
162 views

How can I add my tcolorbox to my table of contents?

I've got many tcolorboxes in my document and I want to add one to my table of contents. A test code: \documentclass[10pt,a4paper,twoside,spanish]{scrbook} \setlength{\parskip}{\medskipamount} ...
7
votes
2answers
176 views

tcolorbox: option for “listing outside (but ABOVE) text”

The tcblisting environment provided by the tcolorbox package allows one to display LaTeX codes in the lower part of a tcbox and the output in the upper part of the same tcbox, using the text and ...
2
votes
0answers
113 views

pgfkeys error in tcolorbox

I am trying to duplicate part of an example code given in the tcolorbox package documentation on page 13. It looks like this: \documentclass{article} \usepackage{tcolorbox} \tcbuselibrary{skins} ...
3
votes
1answer
131 views

Color background for chapter titles which stretches horizontally to the margins

I'm working on my chapter titles. I like them to have a background which stretches to the edge of the page. The drawbacks of the minimal document below are: The TOC also has the background, too. ...
2
votes
0answers
54 views

Why is newtcbtheorem not working while tcbmaketheorem does? [closed]

EDIT: It was simply a matter of outdated package versions. On a mac there are those useful commands sudo tlmgr update –self and after that sudo tlmgr update –all. The following throws the error ...
4
votes
2answers
136 views

tcolorbox listing error using beamers begin{frame}

I've just started using the tcolorbox package for slides for a LaTeX course. It works nicely to box LaTeX code, interacting with the listings package. However, I ran into trouble when I tried to make ...
2
votes
1answer
132 views

Alternate colback and colbacklower in tcblisting

I have written a new environment based on tcblisting from package tcolorbox. I want the background color for code always in "gray" and the background color of the text compiled in "white". He held ...
9
votes
2answers
335 views

Framed box, over framed text with image

Hi all, I'm a newby in LaTeX but after researching online, I have seen that it is possible to create boxes and frames adjusted to text and images. I am trying to achieve something like the image, ...
14
votes
1answer
198 views

Tabular inside tcolorbox breaks beamer \pause?

Consider the following code: \documentclass{beamer} \usepackage{tcolorbox} \begin{document} \begin{frame} some text before \pause \begin{tcolorbox} \begin{tabular}{cc} cell1 & ...
5
votes
2answers
120 views

Setting package option from the command line

I want to compile a document that uses the tcolorbox package in two different ways: with the option /tcb/lowerbox set to visible, so that the lower part of the tcolorbox environment is typeset with ...
5
votes
2answers
170 views

How to typeset a frame with the title across the boundary?

How could I typeset a frame like: ? I've always used mdframed or tcolorbox to typeset frames but I cannot find mention of such functionality. Is there a simple way of achieving this effect with ...
3
votes
1answer
139 views

Remove colon from title bar in tcolorbox theorem without a title

I am using the tcolorbox package (version 2.32, as provided by texlive 2013 on my gentoo linux system) to define a new theorem-like environment for typesetting tasks. When the title is omitted, the ...
4
votes
1answer
186 views

Creating a marginal tcolorbox from inside an other tcolorbox

I have created a new tcbtheoremlike this: \usepackage[breakable, theorems, skins]{tcolorbox} \tcbset{enhanced} \newtcbtheorem [number within = chapter] {myexample} {examples} { ...
26
votes
3answers
456 views

What are the relative strong and weak points between tcolorbox and mdframed?

I think practically we will not use both tcolorbox and mdframed in a single input file. Correct me if I am wrong. So we have to choose either tcolorbox or mdframed. However, without knowing the strong ...
3
votes
2answers
107 views

newenviroment error: Extra }, or forgotten \endgroup \begin{gbox}

\noindent \colorbox{gray!25}{ \begin{minipage}{\textwidth} \vskip0.5cm \leftskip0.5cm \rightskip0.5cm Text Here! \\\end{minipage}} Code above works fine, but I don't ...
3
votes
2answers
134 views

tcolorbox: \newtcbtheorem referencing

Using \newtcbtheorem, how do we reference the created environment? \documentclass{article} \usepackage[most]{tcolorbox} \tcbuselibrary{theorems} \usepackage{cleveref} \crefname{exa}{example}{Example} ...
5
votes
1answer
103 views

How do I cause a faded out version of certain lines of code and highlight a few. (See example)

I need to know how the first 4 lines of code, are faded, the and how the Ck and Ck' are made with different colors. It'd be of great help if I could get the code for just saw the first 4-5 lines. ...
9
votes
2answers
184 views

tcolorbox: designing a definition with \tcbmaketheorem

I want to make a tcolorbox that says Definition: in the title and that is it. \documentclass{article} \usepackage[most]{tcolorbox} \tcbuselibrary{theorems} % defi enviro ...