Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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 ...

2
votes
1answer
50 views

Framing a colored box with an image

I have a color box (made with tcolorbox) that holds text, and I want to frame it. Unfortunately, I'm copying a style so I can't use a normal border. The border I want is only on the sides of the box ...
1
vote
1answer
70 views

Fix space between running head and box using tcolorbox

Good day! Here I am trying to fix the space between running head last page of the breaking box. Here I am using enlarge top at break by=10pt because as per style continue should come at the top of the ...
1
vote
1answer
41 views

Resize the box in relation to the text contained inside

Two questions: How can I reduce the size of the box? How I can reduce the box in relation to the text contained in the box? Here my MWE. \documentclass[12pt,a4paper,oneside]{book} \usepackage[...
1
vote
1answer
33 views

A visible box on the right hand side of the document

How can I get a small box at the right hand side of the document as in the figure below: My initial attempt failed: \begin{flushright} \begin{tcolorbox} \textbf{Date:11/12/2018}\\ \textbf{Time: 2:...
3
votes
2answers
42 views

Customize counter using tcolorbox?

By now I've spend a lot of hours to find a way to customize the "Counter" inside tcolorbox package. I wanted to put a definition in a tcolorbox as below. In order to get this formation for ...
2
votes
1answer
28 views

Algorithm inside a tcolorbox: how to put a label to the algorithm but the caption as title of tcolorbox?

This question comes after a question about algorithms inside tcolorboxes. Before the question, is better to explain what I have now. I have a file with the algorithm that is q-learning.tex. \...
1
vote
0answers
32 views

tcolorbox listing in XeLaTex compiler

I want to write a document whose main language is Arabic with listings by using the package \usepackage{polyglossia} \documentclass[14pt]{extarticle} \usepackage[listings,minted,breakable,skins]{...
2
votes
0answers
21 views

Shade text background without affecting mdframeds or tcolorboxes

I have some text with tcolorboxes interspersed with normal paragraphs. Everything looks lovely so far, even when the tcolorboxes have to break across pages (using the breakable option). However, I ...
1
vote
1answer
30 views

In memoir and XeLaTeX, I attempted to control the environment of minted to break across pages, but the codes did not work

I use the class memoir and the packages minted and compile in XeLaTeX. Based on the questions How to let minted break across pages but keep the caption together with the end of listing? and Breaking ...
0
votes
1answer
24 views

Error in tcolorbox Missing \endcsname inserted

I am trying to a fancy theorem type for my notes. I like tcolorbox examples. But the one that I like most is giving me an error. Missing \endcsname inserted. This one is on page 360 of the ...
0
votes
0answers
22 views

creating theorems using newtcbtheorem and have them over multiple pages

I've stumbled upon this great question and answer was given by @Andrew, but I'm wondering: looking at the code and all if it's at all possible to have the theorems or even the lemmas or definitions ...
1
vote
0answers
31 views

Tcbtheorem with crosslinking

I had created a document with problems. Some feature I implemented is a click on the problem number, which leads to the answer at the end of the document and vice versa (look MWE). My ...
3
votes
2answers
75 views

How to write a pseudo-algorithm with algorithm2e package inside a tcolorbox environment?

I've recently seen in the second edition of Reinforcement Learning: an introduction by Sutton and Barto an appealing way to display pseudo-algorithms. In the following an example image. I think that ...
0
votes
1answer
49 views

A butterfly-shaped text box

I'm working with beamer and I would like to create a fly-shaped colored text box like in the cover of the tcolorbox manual. The first page of the manual actually features the code for that cover page ...
4
votes
3answers
68 views

Strange behaviour using center, tcolorbox, listings and enumerate

I have a problem compiling the following minimal example: \documentclass{article} \usepackage{listings} \usepackage{tcolorbox} \begin{document} \begin{center} \begin{tcolorbox} \begin{...
0
votes
0answers
22 views

How to solve the first letter being hidden in mdframed?

The first letter of each box is hidden. How I can solve that ? Thank you. \documentclass[12pt,a4paper]{article} \usepackage[utf8]{vietnam} \usepackage[framemethod=TikZ]{mdframed} \...
3
votes
2answers
43 views

Left frame tcolotbox disappears when broken up by new page

In the code given below, if there is a page break for the tcolorbox, the left grey line that I wanted, disappears. If however, the tcolorbox is not broken, the left line is present. Can you help me ...
1
vote
1answer
25 views

Hangindent in Custom Environment created with tcolorbox's many Option

I wish I could be more specific, but being that I don't understand all of the underlying stuff that's happening, my question will have to be vague (hence the awkward title, I'll edit it to be more ...
0
votes
2answers
27 views

Issue with tabularx and hbox options in tcolorbox

I'm having a problem with formatting a tcolorbox so that it contains a table and its width fits the width of the table. A MWE of my code is as follows: \documentclass{standalone} \usepackage{booktabs}...
3
votes
2answers
30 views

Paragraph breaks inside tcolorbox

I have a document full of nicely formatted and separated paragraphs (each separated by two line breaks in the source), which is working nicely. Now I'd like to put some of them into a tcolorbox. But ...
4
votes
1answer
47 views

Tcolorbox: breakable inlined box

I'd like to have a breakable inlined box in order to emphasis some text. Any idea how to do that, if possible with tcolorbox? Thanks! MWE: \documentclass[12pt]{article} \usepackage[utf8]{inputenc} \...
4
votes
0answers
37 views

Tcolorbox: fit does not strictly start at the top

I don't know why, but when I use the fit option in tcolorbox, the fit is a bit "too high", and above the other text by a few px. Any idea why? Thanks! Zoom: MWE \documentclass[12pt]{article} \...
3
votes
1answer
57 views

Poster, tcolorbox, and small math font size

I don't know why, but the math equation looks very small in my tcolorbox poster. Any idea why? Thanks! MWE: \documentclass[12pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} % To ...
1
vote
1answer
27 views

Tcolorbox: Outer style doesn't work

I am trying define different styles for nested tcolorboxes as in the following example. However the outer style doesn't seem to apply. Furthermore in my example "Alice" appears in the inner box and ...
3
votes
1answer
61 views

Subtitle position of a tcolorbox

Writing a thesis (in french), I use many boxes to frame some date. Luckily, tcolor is quite powerful to make some nice ones. But I have a little problem with \tcbsubtitle to distinguish (or add with ...
1
vote
1answer
44 views

Inspiration of how to quote an e-mail correspondence

I am looking for a good way to typeset a e-mail correspondence (maybe including multiple levels of quotations). In an e-mail program this may look like this: this or this one I am not looking of ...
0
votes
0answers
45 views

Right way to address class/package incompatibility?

I've encountered an incompatibility between a class file and a package (specific details below). I have tracked down the problem to the point that I can add one \let inside a longer \def in the ...
2
votes
1answer
22 views

How to define a macro in \tcbset

I want to make up a style(named myset/.code) of tcolorbox with three arguments. In this style, a macro will be re-defined. Please look at the following MWE. Yet it can not be compiled. I think ...
2
votes
1answer
78 views

Figure is oversized horizontally in tcolorbox

I insert a figure into tcbitemize environment of tcolorbox. The figure width is set to \textwidth. So the figure should be fully in box. In fact however, I get a horizontally oversized figure, that is ...
2
votes
2answers
36 views

Reduce margin around tcolorbox

How to go about getting the text to have minimal spacing to the outline of a tcolorbox: I would like to know how to adjust this spacing shown in red. Thank you! CODE \documentclass{article} \...
3
votes
2answers
36 views

Blank lines in argument cause failure

For some reasons, \NewDocumentCommand from xparse package other than \newcommand from Latex has to be used to construct my macro. Yet I find in some situations blank lines in arguments of my macro ...
1
vote
1answer
40 views

How to call the content of \tcbitem of tcbitemize environment in tcolorbox

How to call the content of \tcbitem of tcbitemize environment in tcolorbox in its option part. Example code like this: \documentclass{article} \usepackage[most]{tcolorbox} \begin{document} \tcbset{...
11
votes
3answers
416 views

Why can't I put a comma in a \newtcolorbox?

When I try to put a "," in the mybox environment, I get the error: ! Package pgfkeys Error: I do not know the key '/tcb/FM and PM and Narrowband F M' and I am going to ignore it. Perhaps you ...
0
votes
1answer
22 views

tcolorbox \newtcbtheorem “label separator” option

I use tcolorbox to definie new theorem styles. This is one example : \documentclass{article} \usepackage[many]{tcolorbox} \tcbuselibrary{theorems} \newtcbtheorem{remarq}{Remarque}{% breakable,...
0
votes
0answers
11 views

Frame problem when moving to new page

So how do I do this frame on condition that when the end of the attribute moves to another page automatically as in the example
1
vote
1answer
44 views

Math: align* inside Tcolorbox

I'm framing certain elements in my document with the framed and the empheq- packages. However, since i wanted a uniform way to just use one environment, i figured using tcolorbox would be the ...
0
votes
1answer
18 views

How to make up a style in tcbitemize of tcolorbox to get an effect as like “s” option in \makebox

I'd like to make up a style in tcolorbox to get an effect as like "s" option in \makebox. code example like this: \documentclass{article} \usepackage[most]{tcolorbox} \begin{document} \tcbset{style ...
0
votes
0answers
25 views

Figure file name as item of tcbitemize enviroment in tcolorbox

I want to insert a figure as a item of tcbitemize enviroment in tcolorbox. The following code does work: \newcommand{\ff}[2][]{% \tcbitem[#1]\includegraphics[width=1.0\textwidth]{#2} } usage ...
4
votes
1answer
106 views

Text after tcolorbox Overlapping with Figure inside wrapfig

I've been trying to use wrapfig inside a tcolorbox environment that has an amount of text that will not cover the height of the figure inside the environment. The following code resulted in the text ...
1
vote
1answer
41 views

Consecutive numbering in theorem enviroments, inside framed boxes

I want to write propositions, lemmas, theorems, corollaries inside the chosen boxes and definitions NOT inside boxes, all of them with consecutive numbering. I searched for similar posts and I found ...
1
vote
1answer
56 views

How to make these types of rounded rectangular headings?

I'm stuck on how to format the boxes in code like below: The adding and indented icon and the green upper-right-hand-corner text "Update" are the issues confusing me how to format.
1
vote
1answer
56 views

How to make this rectangle with an image on the left?

Here are two examples of the formatting I'm trying to recreate: I'm trying to recreate this style as closely as possible (including the slight shadow), but I don't know the font. I'd also like the ...
1
vote
1answer
38 views

tcolorbox options in nested style fail to work

Please see the picture and code for my question. \documentclass{article} \usepackage[most]{tcolorbox} \begin{document} % define a new style named selfsetcontainer by container/.code \...
1
vote
0answers
33 views

Same item indent for flushleft inside tcolorbox

I want to use itemize (or enumerate) where some items use an environment that basically amounts to flushleft inside a tcolorbox. They get another indent for the item marker, as seen for #4 here. I can ...
-2
votes
1answer
66 views

Bottom and and top rule when box break using tcolorbox package

Here I want box breaking with continued text and top and bottom rule when its breaking to next pages. Could you please help in this case. Here I attached the required output image. \documentclass{...
16
votes
3answers
1k views

How to make boxes like these?

I'd like to have custom commands for making boxes that look like the Wolfram|Alpha entities in Mathematica notebooks: \LinguisticAssistant{france} \Entity{France}{country} I've done the work of ...
1
vote
1answer
52 views

Why does a definition of macro containing multi raster column n/.style fail in \tcbset of tcolorbox

I make up a macro \allcw which contains some definition of raster column width style like this: raster column 1/.style={width=2em},raster column 2/.style={width=6em},raster column 3/.style={width=12em}...
1
vote
1answer
63 views

Unwanted newline after a tcolorbox

How to avoid new line jump after each tcolorbox ? \documentclass[10pt,a5paper,landscape]{article} \usepackage{pgffor,luacode,array,tcolorbox,bm,geometry} \geometry{margin=1.5cm} \pagestyle{empty} \...
3
votes
2answers
114 views

Getting errors while trying to box a colored text + math with less than 6 lines of code

First time Latex user here I am trying to box a text plus math using the following code \documentclass[]{article} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{xcolor} \begin{document} \...
0
votes
0answers
28 views

How do I get tcolorbox to start at the current location

I am using tcolorbox to create framed text in a multicols environment. Even though my frame is defined as breakable LaTeX tries to start frames at the top of a column which can result in very awkward ...