11
votes
Accepted
How to calculate the total width of a (tabularray) table and pass this length to other packages such tikz or tcolorbox?
You could use the \settowidth macro to measure the width of your table. To avoid having to code the table twice, you could use a savebox and use it once to typeset your table and another time to ...
9
votes
Accepted
How to put tcolorbox around whole picture?
By using \begin{picture}(0,0) you are basically setting the size of the picture to 0. You could either choose a suitable size for the picture (might require changing some of the coordinates...) or, as ...
8
votes
Accepted
Object-Z state schema notation
The package objectz is quite old but seems to work well with a modern LaTeX. I know nothing about this language (notation,...?) so I may be using the wrong semantic markup, but if you know the ...
8
votes
Accepted
Package minted and tcolorbox produces LaTeX Error: Command \gather already defined
This is because of package lineno. The current version patches environment gather even, if it has not been defined before. So amsmath cannot be loaded after lineno any longer. So, because tcolorbox ...
8
votes
Accepted
How to put a gray box around text that splits at page break
tcolorbox provides library breakable for automatically breaking boxes:
\documentclass{article}
\usepackage{tcolorbox}
\tcbuselibrary{breakable}
\usepackage{mwe}
\begin{document}
\lipsum[1]
\begin{...
8
votes
Accepted
Centered equation with raggeredleft text
"The customer is always right" is an old truism. However, this rule does have some exceptions.
The OP's request is just such case: By placing the word "or" on the same line as -- ...
8
votes
Accepted
How can I make these specific modifications using tcolorbox
I think, what you're after is something like this:
\documentclass{article}
\usepackage{tcolorbox}
\tcbuselibrary{skins, breakable}
\definecolor{ChapterBackground}{HTML}{101010}
\definecolor{...
7
votes
Accepted
Transparent tcolorbox so I can see my watermark
If you look at "Drawing Scheme" section in tcolorbox documentation, you will see that the frame around a tcolorbox is not a frame but a filled rectangle which is later on covered by the ...
7
votes
Object-Z state schema notation
A possible solution with tcolorbox. As it uses nested boxes, it won't be breakable between pages.
\documentclass{article}
\usepackage[most]{tcolorbox}
\usepackage{amsmath, amssymb}
\newtcolorbox{...
7
votes
Accepted
How to insert right curly bracket for several lines of text (no math)?
I would make use of \tikzmarks and use them also to draw the three arrows. You can use the remember as option provided by the tcolorbox package to refer to boxes later in your code. Boxes need to be ...
7
votes
Accepted
Is it possible to fill the second column with a grid automatically?
This is a solution with tcolorbox and equal height group option. All boxes with same equal height group label have same height after two compilations. The right column box can be automatically filled ...
7
votes
Accepted
How can I move a tcolorbox to the right side of the page?
You can use options before and after to print it inside a flushright environment:
\documentclass[a4paper]{article}
\usepackage{tcolorbox}
\usepackage{fontawesome5}
\usepackage{lipsum}
% --------------...
6
votes
Customize package between book/article classes
you can check for document class, by name but more general is to check for \chapter
\@ifundefined{chapter}
{no chapter version}
{chapter version}
6
votes
Tcolorbox: rounded corners for title box
The title box can be a tcolorbox so you can apply similar options:
\documentclass{article}
\usepackage[most]{tcolorbox}
\usepackage{tikz, adjustbox}
\usepackage{xcolor}
\definecolor{background_color}{...
6
votes
Accepted
Tcolorbox: rounded corners for title box
You can decide on a corner-by-corner basis if it should be rounded or sharp like this:
\documentclass{article}
\usepackage[most]{tcolorbox}
\usepackage{tikz, adjustbox}
\usepackage{xcolor}
\...
6
votes
Accepted
Make the width of text in a tcb the same as ```\textwidth```
You can use the oversize option:
\documentclass{article}
\usepackage{lipsum}
\usepackage{tcolorbox}
\begin{document}
\lipsum[2]
\begin{tcolorbox}[oversize]
\lipsum[2]
\end{tcolorbox}
\end{...
6
votes
Accepted
How to fix the style of a tcolorbox based on the tcbcounter?
With this new pgfkeys key
/utils/if odd={<num expr>}{<key lists if true>}{<key lists if false>}
you can use
/utils/if odd={\value{tcb@cnt@mybox}+1}{colback=red!20}{colback=blue!20}
...
6
votes
Accepted
How to split a box horizontally in tcolorbox?
You could use the same approach as in https://tex.stackexchange.com/a/433142/36296 and use subtitles:
\documentclass{article}
\usepackage{lipsum}
\usepackage[most]{tcolorbox}
\usepackage{tikz}
\...
6
votes
Accepted
tcolorbox failing to float to bottom of page
article sets \renewcommand\bottomfraction{.3} so bottom floats can not be more than 30% of the page, you could increase that or the ! float option says to ignore the constraints, so
\documentclass[...
6
votes
Accepted
Understanding \RemoveFromHook with label
You cannot remove a tcolorbox label because there is none. Using \ShowHook{env/myitemize/after} tells you that (note that the "Code chunks" part is empty):
-> The generic hook 'env/...
5
votes
Accepted
Align equations and boxes in itemize environment
Here is a possibility with the fleqn environment of nccmath:
\documentclass[
pdftex,a4paper,11pt,oneside,fleqn,
bibliography=totoc,listof=totoc,
headlines=2.1,headsepline,
...
5
votes
Accepted
\hspace{50pt} no effect in the title of a tcolorbox
Instead of \hspace{50pt} you should use \hspace*{50pt}:
\documentclass[12pt,addpoints]{exam}
\usepackage[most]{tcolorbox}% Design für Boxen
\newtcbox{\blank}[1][red]{
on line,
height=2em,
arc=7pt,...
5
votes
Accepted
Tabularray table when is wraped by a tcolorbox spreads inside right margin overrides page borders. How can I fix it?
\tcbox creates
a colored box which is fitted to the width of the given ⟨box content⟩.
It doesn't make sense to combine this with a X column which tries to stretch a column to fit a table to the ...
5
votes
Why does removing this empty line increase spacing?
Your issue here is an improper definition of \secondline that has a spurious space before the tcolorbox starts. In short, use this definition:
\newcommand\secondline{% <----- See https://tex....
5
votes
Accepted
Why does removing this empty line increase spacing?
You have asked "why". I try to explain this.
The LaTeX macro tblr opens horizontal mode without indentation (does \noindent) and puts here a box with given contents with the width equal to \...
5
votes
Accepted
How to create a tcolorbox with fancy title box and with left and bottom borderlines
Your question is not clear, but I think you want something like this:
\documentclass[12pt,a4paper]{article}
\usepackage{tcolorbox}
\usepackage{amsmath,amssymb}
\xdefinecolor{myblue}{RGB}{102, 53, ...
5
votes
Accepted
How to get equation number outside of the tcolorbox?
An extrude right by=<negative length> attempt:
\documentclass{article}
\usepackage{mathtools,amssymb,amsthm}
\usepackage[skins]{tcolorbox}
\colorlet{myLColor}{blue!50}
\newtagform{enforce ...
5
votes
How to start the equation numbering in the new box with $1$ again?
You should define a special counters for equations inside the boxes. It's not difficult to replace the equation counter with the special counter, that's reset at each example environment.
I also add ...
4
votes
Object-Z state schema notation
This looks like a combination of box drawing characters like │─┌├└ and \obeyspaces:
\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage{pmboxdraw}
\begin{document}
\obeyspaces\noindent%
┌─...
4
votes
Accepted
Remove thin black frame around standalone image
You can add frame hidden to the comment style:
% !TeX program = txs:///arara
% arara: pdflatex: {synctex: on, interaction: nonstopmode, shell: yes}
\documentclass[12pt]{article}
\usepackage[most]{...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
tcolorbox × 2246tikz-pgf × 196
listings × 111
environments × 103
beamer × 89
color × 86
boxes × 77
minted × 74
spacing × 67
page-breaking × 61
theorems × 61
tables × 50
mdframed × 50
vertical-alignment × 49
table-of-contents × 48
cross-referencing × 44
horizontal-alignment × 38
counters × 38
footnotes × 37
macros × 35
formatting × 34
hyperref × 34
xetex × 33
cleveref × 32
numbering × 31