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 ...
samcarter_is_at_topanswers.xyz's user avatar
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 ...
samcarter_is_at_topanswers.xyz's user avatar
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 ...
mbert's user avatar
  • 2,615
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 ...
cabohah's user avatar
  • 8,338
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{...
cabohah's user avatar
  • 8,338
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 -- ...
Mico's user avatar
  • 490k
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{...
Jasper Habicht's user avatar
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 ...
Ignasi's user avatar
  • 135k
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{...
Ignasi's user avatar
  • 135k
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 ...
Jasper Habicht's user avatar
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 ...
Ignasi's user avatar
  • 135k
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} % --------------...
cabohah's user avatar
  • 8,338
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}
David Carlisle's user avatar
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}{...
Ignasi's user avatar
  • 135k
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} \...
samcarter_is_at_topanswers.xyz's user avatar
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{...
samcarter_is_at_topanswers.xyz's user avatar
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} ...
muzimuzhi Z's user avatar
  • 25.5k
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} \...
samcarter_is_at_topanswers.xyz's user avatar
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[...
David Carlisle's user avatar
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/...
Phelype Oleinik's user avatar
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, ...
Bernard's user avatar
  • 270k
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,...
Zarko's user avatar
  • 290k
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 ...
Ulrike Fischer's user avatar
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....
Werner's user avatar
  • 595k
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 \...
wipet's user avatar
  • 69.7k
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, ...
Ignasi's user avatar
  • 135k
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 ...
muzimuzhi Z's user avatar
  • 25.5k
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 ...
egreg's user avatar
  • 1.1m
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% ┌─...
Marijn's user avatar
  • 35.7k
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]{...
samcarter_is_at_topanswers.xyz's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible