Skip to main content

Questions tagged [tcolorbox]

{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 output. Another common use case is the setting of theorems. The package supports saving and reuse of source code and text parts.

Filter by
Sorted by
Tagged with
1 vote
0 answers
31 views

tcolorbox: align baselines with side by side

According to the tcolorbox documentation, the key sidebyside align=top aligns the baseline of the left-handed and right-handed side of a tcolorbox. But with \begin{tcolorbox}[sidebyside, sidebyside ...
jlab's user avatar
  • 3,891
2 votes
3 answers
57 views

Unwanted space in tcbraster

I've run into undesirable behavior with tcolorbox that I cannot understand, and am hoping someone here can give insight into what's going on. If I compile the following (for me using pdflatex 2023) ...
alex.jordan's user avatar
  • 2,211
0 votes
1 answer
15 views

Keep track of theorem number in colored boxes

I have the following: \newcommand{\thmbox}[2]{ \begin{tcolorbox}[colback=blue!5!white,colframe=blue!75!black,title={#1}] {#2} \begin{theorem} uhhh \end{...
stone327's user avatar
2 votes
1 answer
81 views

What does \vphantom{dlg} do in the tcolorbox documentation?

I tried replicating the inline tcolorbox with a rotated title as shown in the tcolorbox documentation like what was asked in this question. It is not difficult to find the code, which is shown below. ...
Stochastic Adventure's user avatar
3 votes
1 answer
56 views

Record some tcolorbox in order to print at the end of each chapter

At the end of each chapter I'd like to redisplay all the boxes called meth with tcblower part, and in the chapter itself hide tcblower part. How can I do this? I've seen that there's a record option ...
jowe_19's user avatar
  • 971
0 votes
2 answers
50 views

\tcolorboxenvironment with parameters

Context Hi. I am using \tcolorboxenvironment to customize a theorem enviroment created with thmtools (as explained in pages 22 or 400 of the documentation). This is what I have so far in my preamble: \...
asterisk's user avatar
1 vote
2 answers
115 views

Nesting two environments

The snippet below has been obtained nesting two environments taken from amsthm and tcolorbox. I would like to redefine the environment theorem to produce the same output (I can only modify the ...
Primo Petri's user avatar
1 vote
0 answers
32 views

Small breakable tcolorbox in multicol creates an empty column

I have a small breakable tcolorbox in a multicol environment. The box is small enough to not need to be broken. When it follows a title or another box, if the flow of text places them just at the ...
Paul Zehner's user avatar
0 votes
0 answers
10 views

tcblistof issue with macro inside tcolorbox title

I write a lot of reports (minutes). Each report can contains a lot of subjects. For a better tracking, each subjet is attached with a unique persisent number. I managed to do so thanks to this subject ...
Atiroocky's user avatar
3 votes
0 answers
50 views

Is there a bug in tcolorbox with `\tcb\ams align`?

I try to use the option keys /tcb/ams align and /tcb/ams gather (and alike) from the theorems library in a tcolorbox. If there is no lower part all is ok! But with a lower part there is an issue! I ...
Hafid Boukhoulda's user avatar
3 votes
1 answer
45 views

tcolorbox in a multicol environment sometimes breaks in the wrong place

When I put several tcolorbox boxes in a multicol environment, sometimes they break in the wrong place. In the example below, in the second column, the break in the first box needn't be there. Likewise ...
Chris's user avatar
  • 95
1 vote
1 answer
66 views

How to create two or more \tcolorboxenvironment for the same environment?

I have created a \proof environment with \tcolorboxenvironment, according to the following preamble and code snippet: \documentclass{report} \usepackage[margin=1in]{geometry} \usepackage[...
Bml's user avatar
  • 117
1 vote
1 answer
60 views

Special characters in \lstinline cause an error when used in tcbox

I am trying to create a tcolorbox style for LaTeX listings. Although listings styles work as desired, using \tcbox command with \ Improper alphabetic constant Using { and } bracks causes the ...
Al-Motasem Aldaoudeyeh's user avatar
0 votes
0 answers
36 views

Tabularray with footnotes inside a tcolorbox/ minipage

This question is related to Tabularray with footnotes and the new thing is that my tblr-tables are sometimes inside of tcolorboxes. The style of the numbering then goes wrong and counting up the ...
Michael.H's user avatar
  • 107
-1 votes
0 answers
33 views

Creating new keys in tcolorbox to assist transition from mdframed

I want to start using tcolorbox instead of mdfamed, but my beamer slides already contain a lot of slides with style=, frametitle= as options. It is possible with a LaTeX editor to replace mdframed ...
Al-Motasem Aldaoudeyeh's user avatar
2 votes
1 answer
44 views

How to make tcolorbox with 3 segments?

How to make the tcolorbox with 3 segments? The below code creates 2 segments. But I need 3 segments with custom width and no margins for body of the text. Guide me to get my requirement. Thanks. ...
user1999109's user avatar
0 votes
1 answer
38 views

Parsing contents of tcolorbox inside parbox

I want result similar to the above, except that I want it be done without explictly using \parbox \documentclass[11pt, a4paper]{book} \usepackage{fancyhdr} \pagestyle{empty} \usepackage[a4paper]{...
Al-Motasem Aldaoudeyeh's user avatar
1 vote
0 answers
33 views

un-breakable tcolorbox inside a tcolorbox [closed]

I am trying to write a environment that resembles a theater play. As stated in here, it is not possible to include a breakable tcolorbox inside another tcolorbox, so I decided to separate every ...
farrate's user avatar
  • 11
0 votes
1 answer
38 views

Using parbox inside marginnote misaligns the baseline

The desired output is as in the second one, but I still want the flexbility of tcolorbox when placing margin notes My MWE \documentclass[11pt, a4paper,draft]{book} \usepackage{fancyhdr} \pagestyle{...
Al-Motasem Aldaoudeyeh's user avatar
4 votes
1 answer
49 views

Fit tcolorbox to table

I am trying to make the tcolorbox to fit its content, a table, and not to span to textwidth . I've look through a lot of questions (1,2,3,4) but nothing seem to work, i tried tabularx too. Unless I ...
G. Bay's user avatar
  • 2,111
3 votes
1 answer
74 views

How to set a phantom box in tcolorbox?

I am trying to create a phantombox (i.e., a box whose contents and size are exactly the same as they are if its contents were not inside tcolorbox environment). If I combine two contents to check, I ...
Al-Motasem Aldaoudeyeh's user avatar
3 votes
1 answer
79 views

Clash between breakable tcolorbox with tikz externalize

I have a custom theorem-like environment created using tcolorbox. The environment may need to encompass many pages, so I am using the breakable option when creating it. However, I noticed an error ...
Guilherme Fraga's user avatar
0 votes
1 answer
28 views

Changing rows in the same tcbox

I am using the tcolorbox, tcbox; and I would like to have the \\ or \newline (ability of changing rows) within the tccheckbox that I defined below. But I could not make it successfully. Any way to fix ...
wonderich's user avatar
  • 2,437
1 vote
2 answers
87 views

Save tcolorbox text height and reuse in another one

Here is a small example of a situation. \documentclass{minimal} \usepackage[most]{tcolorbox} \newlength{\mylength} \begin{document} \begin{tcolorbox}[text height=50pt] \tcbtextheight \global\...
MB4E's user avatar
  • 1,106
-1 votes
2 answers
78 views

How to add colors in boxes and arrows?

My code is complete, I just want the image to be more pretty by adding colors in boxes and arrows. here's the code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes....
Maryam's user avatar
  • 53
1 vote
1 answer
61 views

How to put a text inside a box within a boxed environment?

I have the following LaTeX code, which makes use of a boxed environment. I want to put some of the text within a dashed and normal box, but it throws an error. Any ideas how to achieve this? \...
pixel's user avatar
  • 1,370
1 vote
1 answer
45 views

Custom \newtcblisting with "listing and listing" option?

From the manual, I see there is "listing and comment" option as seen in the following example. Update: with full code \documentclass{standalone} \usepackage{xcolor} \usepackage[most]{...
user2501235's user avatar
2 votes
0 answers
47 views

tcolorbox in multicols extra vertical space between color boxes

I am currently writing checklists using tcolorbox package. For readability and space saving I want to use a 2-column format. I use a parbox to simulate a table because tabular (and derivative) do not ...
renard's user avatar
  • 762
1 vote
2 answers
78 views

Tcolorbox remove part of box border

So, I want to remove small part of the border in my tcolorbox. Here is an example: If possible, I'd also like to have a small white outline around "Some title here" as showed in the picture....
Vebjorn's user avatar
  • 1,884
0 votes
1 answer
60 views

How can I get the title in tcolorbox partly framed and not framed?

So, I'm trying to make a box with the tcolorbox package that has some of the title in a colored box and some of it not inside the box. What I want is for the definition X.Y part of the title to be ...
Vebjorn's user avatar
  • 1,884
0 votes
1 answer
28 views

Image and text in tcolorbox; How to make the text span remainder of interior width?

I have an image and text inside a tcolorbox. I'd like to make the text fill the remaining horizontal interior space that the image doesn't fill. Here is a MWE: \documentclass[11pt, twocolumn]{book} \...
dnh37's user avatar
  • 181
0 votes
0 answers
21 views

Wrong numbering of figures and figures+subfigures with tcolorbox

I have 3 new environments based on tcolorbox, Figure, SFigure and Subfigure. When I use environment Figure, the first 2 boxes are numbered 1.1 and 1.2. Then when I use SFigure with Subfigure, the next ...
Fuji San's user avatar
  • 225
2 votes
1 answer
46 views

How to prevent breakable tcolorbox ending up on next page without breaking?

I am having a problem with a tcolorbox directly under a heading, which is moved to the next page instead of breaking. This only occurs for very specific heights of the box. Also I've only been able to ...
ProodjePindakaas's user avatar
1 vote
1 answer
48 views

How to make a tcolobox stick the bottom of the page ? (and why \vfill is not perfectly working?)

I have created a MWE where one can picture my issue. \documentclass[12pt]{article} \usepackage[ left =0cm, right =0cm, top =0cm, bottom =0cm, paperwidth = 521pt, ...
OursPolaire's user avatar
3 votes
1 answer
74 views

How to put text in a vertical direction inside a tcolorbox?

I have a grid of tcolorbox cells and i want to have a first vertical and horizontal bar with labels in the same style. I have managed to edit some examples from online, but am currently stuck on how ...
SamVV's user avatar
  • 33
3 votes
1 answer
26 views

Change order of words in LaTeX tcolorbox or tcbtheorem

Along my work I have faced with the following problem: I would like to create a theorem environment with \newtcbtheorem, but the text need to be in Hungarian language. The original command creates the ...
István Andorfi's user avatar
2 votes
2 answers
139 views

How to position two tcolorboxes next to each other on the same line and adjust the distance between them? [duplicate]

I have the following situation, where I have produced two boxes with text inside using the package tcolorbox: \documentclass[a4paper,12pt]{article} \usepackage[english]{babel} \usepackage[most]{...
Wild Feather's user avatar
0 votes
0 answers
25 views

tcolorbox breaks text apart

I was wondering how I could make the tcolorbox not break apart the text the way it is right now. I thought about wrapping the tcolorbox inside a figure but I couldn't get it to work. The white space ...
Pablo's user avatar
  • 77
1 vote
1 answer
32 views

Missing numbring theorem with reflabel in TcolorBox

The number of section does not appear when need referring label. This the code that use, see also the picture \documentclass[a4paper,11pt,reqno]{amsart} \usepackage{hyperref} \usepackage[T1]{...
Hariz Khaled's user avatar
4 votes
3 answers
177 views

tcolorbox and logic formats

I asked chatGPT4 to reproduce something like this with the tcolorbox and bussproofs packages: However, the code it gave me doesn't quite do the trick. I've been trying to change it but no success so ...
Pablo's user avatar
  • 77
1 vote
1 answer
42 views

Wrapping minted-Enviroment in a ocg-Enviroment

I cannot wrap my minted-Environment, which is wrapped in a tcolorbox into an ocg-Environment. The wrapping of the minted-Environment into the tcolorbox is working fine. Does anyone more competent than ...
TrizZm4ster's user avatar
4 votes
1 answer
64 views

Unwanted line extension after tcolorbox in longtable

I am using tcolorboxes inside the longtable environment. This worked well, but with a recent (or maybe not so recent) change in one of the packages, an extension to the lontable-line after a tcolorbox ...
Manuel's user avatar
  • 363
3 votes
1 answer
181 views

Generating a Visible Barcode to a Darkened Back Cover

This post pertains to the proper way to apply a pst-barcode to the back cover of the book. See, for example, Generating ISBN Barcodes The reason for this question is as follows. Consider the code: \...
DDS's user avatar
  • 9,776
0 votes
0 answers
59 views

Delimit beginning/end of a text section (not being in a box) using visual objects, glued to text at page break

Context I'm creating a LaTeX class for popular mathematic articles in which images play a central role. As a result, the following requirements have been set for: the online versions of articles (...
Denis Bitouzé's user avatar
1 vote
1 answer
270 views

Colored box paragraph that stays on text grid

Is there any straightforward way to produce this kind of output with the distance between the baseline of the last line before the box and the baseline of the first line within the box as well as the ...
keth-tex's user avatar
  • 452
1 vote
1 answer
52 views

How add frame subtitle with equal height inside a tcolorbox

i am using tcolorbox to do two column and then itemize inside. All work fine, but when I add subtitles with the command tcbsubtitle the frames not equal, it is adjusted by the height of the words. ...
Darío's user avatar
  • 471
1 vote
0 answers
57 views

A 3D shape and text inside a TikZ box

I have made this so far but I m not able to add those spheres or cubes under that TikZ box and write inside of them. Also I couldn't create the arrows. \documentclass[ border=1cm]{standalone} \...
BROK's user avatar
  • 119
0 votes
0 answers
50 views

how to land some pixel before my link text

I use this code for creating a link inside my text: \begin{tcolorbox}[adjusted title=\hyperlink{1_1}{\TaI},halign=justify] \AaI \\ \vspace{1ex} \noindent \MaI \end{tcolorbox} ...
RenatoP's user avatar
  • 851
0 votes
1 answer
55 views

Put table directly under the example title

Right now, there is a table in the light blue space. I want to put this table in the darker blue box above it, just under the example. I also do not want any indent. This is what I have so far. \...
user292225's user avatar
3 votes
1 answer
61 views

How to have restatable tcolorbox theorem environments, while avoiding labels being multiply defined

I have a document where I would like to define a theorem early on, and then restate the same theorem later on when it comes time to prove it. Normally this could be done using the thm-restate package. ...
Naysh's user avatar
  • 187

1
2 3 4 5
48