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),...
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 ...
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,...
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{...
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 ...
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....
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!...
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=...
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={...
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}
\...
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}
\...
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 ...
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 ...
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]
\...
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{...
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 ...
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 ...
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,
...
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{...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
tcolorbox × 2242tikz-pgf × 196
listings × 111
environments × 103
beamer × 88
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
footnotes × 37
counters × 37
macros × 34
formatting × 34
hyperref × 34
xetex × 33
cleveref × 32
numbering × 31