Stack Exchange Network

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

1
vote
2answers
43 views

How to put a line above the lower part of tcolorbox

How can I cover the top side of the light gray part with the same line that encloses the box? \documentclass{article} \usepackage[many]{tcolorbox} \usepackage{lipsum} % -- \begin{document} \begin{...
0
votes
0answers
22 views

restrict text inside tcolorbox

I have defined a tcolorbox as: \tcbset{% outerlayer/.style={% enhanced, sharpish corners=all, colbacktitle=dcol, coltitle=white, coltext=dcol, ...
3
votes
0answers
21 views

Alignment of an un-numbered multicolumn tcolorbox listing

Consider the following code: % Preamble \documentclass[letterpaper, 10pt]{article} \usepackage{calc} \usepackage{xcolor} \usepackage{listings} \usepackage{multicol} \usepackage[most]{tcolorbox} \...
0
votes
0answers
14 views

Equalise spacing before and after tcolorbox environment

I don't like tampering with the AMStheorem default theorem styles (theorem, definition and remark), I find they fit my needs well. In this instance, I am using tcolorbox to draw boxes around ...
0
votes
0answers
19 views

Box format of Definition and Example in Tex

When I search for a material, I found this material have these two logical boxes (Definition 1.2 and Example 1.2). How can I create these two boxes ? Any help is appreciated.
3
votes
1answer
50 views

Edge of rotated image when using tcolorbox and tikz

I'm using tikz to draw a square and tcolorbox skins to fill the square with an image. The problem is when I try to rotate the image. \documentclass[margin=5cm]{standalone} \usepackage{tikz} \...
2
votes
1answer
31 views

Conflicts using package tcolorbox and titleformat

I am trying to use tcolorbox to highlight some words in a paper so I use this: \usepackage{tikz,lipsum,lmodern} \usepackage[most]{tcolorbox} \tcbuselibrary{listings,breakable} \newtcbox{\mybox}[2][]{...
2
votes
2answers
31 views

Column width as necessary in tcolorbox tables

I am trying to make nice looking table with some data. Everything is fine except the width of column is fixed. I have tried many solutions but nothing works. How can the width of the column is change ...
0
votes
1answer
25 views

Problem with lstlistings inside tcolorbox

i have defined my new command: % sets for lstlisting \lstset{ basicstyle=\small\ttfamily, columns=flexible, breaklines=true, frame=single, rulecolor=\color{colorCodeBorder} } \newcommand{\mynote}[1]{...
5
votes
2answers
219 views

Housemarks (superimposed & combined letters, heraldry)

I am trying to typeset three housemarks from a manuscript (see also images): V + R superimposed A + B combined A and H + S combined However, it's turning out to be harder than I thought. I have the ...
3
votes
2answers
135 views

Writing exercices in a specific style

Addendum: I've written exercises with a simple box but I want to turn in the picture below style.Here's the code: \documentclass[11pt]{book} \usepackage[top=2cm, bottom=2.5cm, left=2.5cm, right=2....
2
votes
1answer
46 views

todo notes inside tcolorbox

\documentclass{article} \usepackage{tikz,lipsum,lmodern} \usepackage[most]{tcolorbox} \usepackage[colorinlistoftodos]{todonotes} \begin{document} \listoftodos[Notes] Note is here\todo{Sample note!} \...
0
votes
1answer
70 views

How can i make a breakable box

I want to customize this code \documentclass{article} \usepackage[most]{tcolorbox} \usepackage{lipsum} \newtcolorbox{topbox}[2][]{ title=#2, enhanced, breakable, enlarge top initially ...
0
votes
0answers
21 views

Inline DeclareTotalTCBox Using tColorBox

My goal is to have inline code embedded in text using \DeclareTotalTCBox. The problem is that the box is not breakable (even though I used the breakable option). I looked at the manual (v 4.20) page ...
0
votes
0answers
30 views

How can i customise the breakable box

In my example below, I have a problem with my breakable box, he does not want to ride. \documentclass[12pt,a4paper,oneside,openright]{book} \usepackage[utf8]{inputenc} \usepackage[frenchb]{...
2
votes
1answer
29 views

Define Code block macro based on tcblisting

I want to define a code block macro that is used like this: \begin{codeblock}[bash] # This is a comment sudo apt-get install texlive \end{codeblock} or even better: \codeblock[bash]{ # This ...
3
votes
2answers
60 views

Tcolor box Dotted box

How to draw dotted box(like rounded dot) in tcolorbox instead of square line boxes, I tried but output shown like square line not rounded dot? Please find my MWE files: \documentclass{book} \...
0
votes
0answers
33 views

How can I make the same space in a breakable box [closed]

How can I make a space of the same size in a breakable box where the space in (1) is the same as the space in (2)? See picture below.
1
vote
2answers
29 views

Colouring citep/citet/citeauthor differently and based on environment

I'm writing my thesis report in which citations inserted through citep en citet are blue, and the output of the citeauthor-command is the regular text color. I've achieved this using a combination of ...
0
votes
1answer
51 views

Changing background paper

I’ve written this paper using tcolorbox with a coloured background. I want to use a background like in the image below.Can someone give a hand. Here is my code: \documentclass{book} \usepackage{...
4
votes
1answer
146 views

How can I make a picture like this?

I want to make a document with exercises and solutions in a breakable box like this picture: Here is a minimal example which reproduces my problem : \documentclass[12pt,a4paper,twoside,openright]{...
1
vote
1answer
49 views

Two listings side-by-side in TColorBox

I have two requests: I am trying to compare two codes side by side using tcolorbox. The problem is that I am not able to put them both with code format (i.e., one is in plaintext and the other is in ...
0
votes
1answer
33 views

TColorBox Environment with Optional Title

I am trying to make an environment that allows the display of code snippet with title as optional parameter. The MWE provided fixes the issue if two different environments were created. I would like ...
5
votes
1answer
113 views

How to apply the “glow” effect to a rectangle with tcolorbox?

From page 195 of the tcolorbox manual, I can apply a "glow" effect on a circle: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tcolorbox} \tcbuselibrary{skins} \usetikzlibrary{...
0
votes
0answers
42 views

Create a document exercises with solution

I used the example of the documentation tcolorbox but I do not find where I can put the solutions of the exercises, I think that there is something that connects the solution to the statement, so that ...
0
votes
1answer
41 views

Centering lstlisting using tcolorbox Inside Enumerate Environment

I am trying to center a lstlisting environment using tcolorbox (as suggested here). The method does work normally but doesn't render as expected in enumerate environment as shown below: I have tried ...
1
vote
1answer
62 views

Tcolorbox and tikz package for colored page [closed]

Bonjour. How to code these two pages in latex using tikz package.
1
vote
2answers
58 views

Is there any way to draw box outside margin?

I am looking to create a box outside page margin with some text in it. Is there any way to manually position the box. I want desire output as follows:
3
votes
1answer
40 views

tcolorbox styles deriving from each other [duplicate]

The listing package allow to easily define styles and environment that derives from each other, which is very practical to avoid to copy and paste a lot of code. I am trying to see how to do the same ...
1
vote
1answer
92 views

Scattered Poems Within Text Using Xepersian

I want the scattered poems used over various sections or chapters ( or for example inside separate boxes) to be treated as a single unit and their lengths be adjusted together. what should I do? *I ...
0
votes
0answers
33 views

How can unite the footnote enumeration in the main text and tcolorbox?

I want a uniform footnote enumeration in the following code. For example, if the whole text has 4 footnote, 2 in the main text and 2 in the box generated by tcolorbox, I want all footnotes appear in ...
1
vote
2answers
92 views

How can I create such a form and write text inside it?

How can I create such a form and write text inside it?
3
votes
2answers
102 views

Tcolorbox tcbcol@back and tcbcol@frame are undefined in 4.20

Tcolorbox tcbcol@back and tcbcol@frame are undefined in new version (4.20) of package. What one should to use instead?
5
votes
1answer
83 views

How to draw curly braces on minted and tcolorbox?

I have the code below to generate minted code inside box (credit:Ignasi). That format (code inside box) is heavely needed in my previous report paper. \documentclass[12pt,a4paper,oneside]{report} \...
0
votes
1answer
37 views

Transparency option in tcolorbox

Good day! Here I want transparent background in tcolorbox, when box comes inside the box or page color applied case. Here I used yellow color background box, so I required yellow background, I can't ...
0
votes
0answers
27 views

algorithm with vertical line

i created the following algorithm but i am not satisfied with the output.So i was wondering is there a way to add vertical lines in my algorithm but also keep the same structure and be able to put it ...
0
votes
2answers
52 views

hfill for 2. row of itemize

i want to character(x x x) or (y y y) or (z z z) that always located in position of Ending of 2.rows. i used \hfill but it don't work. My Example working code: \documentclass{article} \usepackage{...
1
vote
1answer
25 views

Automatically append text to a \newtcolorbox environment

I'd like a way to style a tcolorbox generated environment such that some arbitrary text is always append to its body.
1
vote
0answers
40 views

Set the database in a genealogytree

Like in this question, I'm trying to fill a genealogytree with datas from an external source, thanks to the datatool package. But I can't figure how to tell genealogytree how to correctly recognize ...
1
vote
1answer
31 views

Tcolorbox: Margin between upper and lower part

Which option controls the vertical spacing between upper and lower part inside the box? \documentclass{article} \usepackage{tcolorbox} \begin{document} \begin{tcolorbox} This is another \textbf{...
2
votes
1answer
51 views

How to produce an alphabetical list of elements [tcolorboxes]

I am compiling a private song book using a tcolorbox for each song. The tcolorbox package provides a nice interface for automatic numbering and creation of a list-of-tcolorboxes and even integrating ...
2
votes
1answer
60 views

error from pgflibraryfadings when adding tcolorbox with new tex4ht tikz driver. TL 2019

Just installed fresh TL 2019. I was trying the new tikz driver for tex4ht. I found this error. Here is a MWE. This error only shows up in tex4ht and not in lualatex and it shows up only when adding ...
3
votes
2answers
74 views

Four corners equal edges in tcolorbox

How to update four equal small adjacent line in both vertical and horizontal line in my existing MWE file, screenshot attached for your reference: \documentclass{book} \RequirePackage[breakable,...
1
vote
1answer
42 views

Tcolorbox dashed line gap

How to decrease gap of dashed line in borderline option using tcolorbox, please find my MWE file: \documentclass{book} \RequirePackage[breakable,hooks]{tcolorbox} \tcbuselibrary{breakable,skins} \...
4
votes
1answer
179 views

How to replace the “space symbol” (squat-u) in listings?

Instead of this output with a "squat-u" space symbol I would like to replace it with e.g. $\cdot$. It is no problem to replace the default symbol for tabs but not for spaces?? \documentclass{article}...
5
votes
1answer
100 views

Help to reproduce a tcolorbox with a decoration

I'm trying to reproduce this box but with the rhombus at the right of the oval box. I don't know how to create the rhombus and how to place it that way. \documentclass{article} \usepackage[T1]{...
1
vote
1answer
24 views

Define an environment from tcbhighmath

Let's assume that I have defined very carefully the parameters of the highlight math style from the tcolorbox package. I would like to define an environment \newenvironment{equationbox}{% \begin{...
4
votes
1answer
43 views

Changing a tcolorbox listing option based on the number of lines of its listing

Consider the following code which produces listings: % ---------------------------------------------------------------------------- % % Preamble \documentclass[12pt]{article} % -----------------------...
1
vote
1answer
52 views

format box around text like this?

Can you help me format like this. Thank you so much! Problem 1. Let ACB be a right-angled triangle with right angle CAB… (Problem is a counter)
5
votes
1answer
189 views

Problem with vertical alignment of a multicolumn listing in a tcolorbox

TLDR: current remaining questions are at the bottom of the post Consider the following test code: % ---------------------------------------------------------------------------- % % Files \begin{...