35 votes
Accepted

Create fancy environment in Tikz

The tcolorbox package is very flexible and you can do almost anything in it. This solution auto numbers the boxes, resetting numbers every section heading. There's no bottom rule (as in your question),...
David Purton's user avatar
  • 25.7k
20 votes
Accepted

Inspired beautiful box from Indesign

Here's one way to do it with Tikz. I only tested it with regular text, but being a node, it should work with other graphic elements as well. Edit: I have applied a fix for your equation (and possible ...
Alenanno's user avatar
  • 37.1k
20 votes
Accepted

inline tcolorbox with rotated title

Copied from tcolorbox's documentation: \documentclass{article} \usepackage{lipsum} \usepackage[skins]{tcolorbox} \usepackage{hyperref} \newtcbox{\mylib}{enhanced,nobeforeafter,tcbox raise base,...
Phelype Oleinik's user avatar
19 votes

tcolorbox without background color (transparent)

Thanks to flav. Transparent background in tcolorbox is only possible with the skin key standard jigsaw. Otherwise there is no effect of the key opacityback=0 \documentclass{article} \usepackage{...
Tobias's user avatar
  • 888
18 votes
Accepted

How to make boxes like these?

It's been a while since I've used pstricks, so I'll leave that for someone else to address. Also, I'm not fluent in using tcolorbox. So, that too I'll leave for someone else. But, I will show how ...
A.Ellett's user avatar
  • 50.1k
17 votes

Creating a multi-line colored box in LaTeX

This is another tcolorbox solution which uses the skins and xparse libraries. xparse is used to define a new command \namebox{<first names>}{<last name>}{<content of right hand box e....
cfr's user avatar
  • 189k
16 votes

Create a box using the tcolorbox package or any other? (image)

The following might give you an idea on how to start: \documentclass{article} \usepackage[most]{tcolorbox} \newtcolorbox{mybox}{ enhanced, boxrule=0pt,frame hidden, borderline west={4pt}{0pt}{green!...
leandriis's user avatar
  • 62.3k
16 votes
Accepted

Color box with rounded corners

tcolorbox, with use in math environment(s): \documentclass[dvipsnames]{article} \usepackage[most]{tcolorbox} \colorlet{LightLavender}{Lavender!40!} \tcbset{on line, boxsep=4pt, left=0pt,right=...
Zarko's user avatar
  • 289k
16 votes
Accepted

How to define a boxed environment using tcolorbox like the following picture?

\documentclass{article} \usepackage[many]{tcolorbox} \newtcolorbox{note}[1][\linewidth]{ width = #1, sharp corners, boxed title style={boxrule=0pt,colframe=white}, attach boxed title to top left={...
Fran's user avatar
  • 78.9k
16 votes
Accepted

Writing exercices in a certain fashion

\documentclass{article} \usepackage{amsmath,amssymb} \usepackage{nccmath} \usepackage{tcolorbox} \tcbuselibrary{skins} \usetikzlibrary{decorations.pathmorphing, positioning} \newcounter{mycounter} \...
leandriis's user avatar
  • 62.3k
16 votes

Box design with tikz

You can use the tcolorbox package. Here a short example to get you started how to draw these "handdrawn" lines: \documentclass{article} \usepackage[most]{tcolorbox} \usepackage{emerald} \...
samcarter_is_at_topanswers.xyz's user avatar
15 votes
Accepted

How to create theorem boxes

This can be quite easily achieved with tcolorbox: \documentclass{article} \usepackage{amsmath} \usepackage{cleveref} \usepackage[most]{tcolorbox} \newtcbtheorem{Theorem}{Theorem}{ enhanced, sharp ...
JP-Ellis's user avatar
  • 8,829
15 votes

Multi-page tcolorbox with complete box on each page

Update (09/Feb/2023) This is an alternative to my original answer (below) which is easier to apply. At least we don't need to know TiKZ commands to solve the problem. The enhanced skin applied to ...
Ignasi's user avatar
  • 135k
15 votes
Accepted

Paragraph breaks inside tcolorbox

You can set the parbox key to false: \documentclass{article} \usepackage{tcolorbox} \usepackage{lipsum} \setlength{\parskip}{1em} \begin{document} \begin{tcolorbox}[parbox=false] \lipsum[1] \...
Ulrike Fischer's user avatar
14 votes

Inspired beautiful box from Indesign

Following code shows how to define these boxes with tcolorbox instead of TiKZ (like in Alenanno's solution). This way boxes can break between pages. \documentclass[a4paper]{article} \usepackage{...
Ignasi's user avatar
  • 135k
14 votes

tcolorbox package returns "missing \pdf@unescapehex" warning

Using listingsutf8 with XeLaTeX is usually not a good idea. The most option loads the tcolorbox libraries loaded by many together with listingsutf8 external magazine vignette poster and you ...
egreg's user avatar
  • 1.1m
14 votes

tabularx inside tcolorbox not centered properly

Since line breaking inside the cells is neither expected nor desirable, and since the natural widths of the four columns are quite different, using a tabularx environment seems wrong. I suggest you ...
Mico's user avatar
  • 490k
13 votes

tcolorbox without background color (transparent)

You must use enhanced : \documentclass{article} \usepackage{pagecolor} \pagecolor{yellow} \usepackage{tcolorbox} \tcbuselibrary{skins} \begin{document} \begin{tcolorbox}[enhanced, title=Title, ...
flav's user avatar
  • 4,644
13 votes
Accepted

tcolorbox: using self defined colors

The value of the colback option is the name of the color, not the \color command. \documentclass{article} \usepackage{tcolorbox} \definecolor{my-blue}{cmyk}{0.80, 0.13, 0.14, 0.04, 1.00} \begin{...
gernot's user avatar
  • 48.3k
13 votes
Accepted

theorems and definitions boxes (numbering should be chapter-wise)

\documentclass{book} \usepackage{amsmath} \usepackage{cleveref} \usepackage[most]{tcolorbox} \newtcbtheorem[number within=chapter]{Theorem}{}{ enhanced, sharp corners, attach ...
Georg's user avatar
  • 1,566
13 votes
Accepted

How does LaTeX specify colors?

A general answer to your question would be to study the xcolor documentation. The package allows for all sorts of colour mixing. Specific to your inquiry, read the introductory section 1.1 Purpose of ...
Werner's user avatar
  • 595k

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