Skip to main content
13 votes
Accepted

How to set circled enumerate with different colours connected with lines

I propose a solution based on tcolorbox; the enumerate environment is modified into lenumerate which takes two arguments: the color and the distance from the text left margin to the vertical segment ...
Daniel N's user avatar
  • 6,142
13 votes

How to reproduce this kind of wavy line?

One possible approach using the bclogo package: \documentclass{article} \usepackage[tikz]{bclogo} \usepackage[bitstream-charter]{mathdesign} \usepackage{lipsum} \begin{document} \begin{bclogo}[logo=...
samcarter_is_at_topanswers.xyz's user avatar
9 votes

How can I draw the shapes with gradient colors as shown in the below figure?

You can use \shade to get the basic effect. \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \fill[blue!10] (0,0) rectangle (12,4); \shade[left color=blue!30, right ...
Sandy G's user avatar
  • 46.6k
8 votes

Wide equations have too much vertical space above them

Vertical space before an equation depends on its length and the length of the previous line. The corresponding skips are \abovedisplayskip and \abovedisplayshortskip. In your case, setting \setlength\...
jlab's user avatar
  • 3,986
8 votes

Wide equations have too much vertical space above them

(La)TeX is not really at ease when a single equation out of context has to be displayed. I suggest to define a specific environment for such cases, so you can force the “line before the display” (that ...
egreg's user avatar
  • 1.1m
8 votes
Accepted

How to position two tcolorboxes next to each other on the same line and adjust the distance between them?

You can use the before and after options: \documentclass{article} \usepackage{tcolorbox} \begin{document} \begin{tcolorbox}[colback=black!8,width=3cm,halign=center,after=\hspace{1cm}] Males \end{...
hair-splitter's user avatar
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
  • 14.1k
7 votes

How to position two tcolorboxes next to each other on the same line and adjust the distance between them?

By adopting the example from the documentation p.14. \documentclass[a4paper,12pt]{article} \usepackage{tcolorbox} \usepackage{showframe} \begin{document} \tcbset{colback=black!8!white,colframe=black, ...
pascal974's user avatar
  • 5,377
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
6 votes

Vertical spacing in tcolorbox

You could use \strut to ensure that your text always has the maximum height and then reduce the top and bottom margins as you want: \documentclass{article} \usepackage{tcolorbox} \newtcolorbox{test}{...
samcarter_is_at_topanswers.xyz's user avatar
6 votes

Colored box paragraph that stays on text grid

Using the Lua buildpage_filter callback, we can get the vertical position of every line, and insert a kern right before it if it isn't perfectly aligned with the grid. \documentclass{book} %%%%%%%%%%%...
Max Chernoff's user avatar
  • 7,461
6 votes
Accepted

How to put text in a vertical direction inside a tcolorbox?

Quick hack: Use the enhanced, rotate=90 options to let tcolorbox rotate the boxes and then use tikz={xshift=...} to fix the alignment \documentclass{article} \usepackage{graphicx} % Required for ...
samcarter_is_at_topanswers.xyz's user avatar
5 votes

White Knockout text printed in box ground when Black separation removed in Acrobat

With the pdfmanagement (that you load with \DocumentMetadata) you can do something like this: \DocumentMetadata{} \documentclass{book} \ExplSyntaxOn \pdfmanagement_add:nnn { Page / Resources / ...
Ulrike Fischer's user avatar
5 votes
Accepted

How to indent the first line only in tcolorbox

You've set the \parindent to be 17pt, but you really only want this to make room for the numbered title box. So you really need \parindent=0pt and then a manual indent in the first paragraph. You can ...
Alan Munn's user avatar
  • 220k
5 votes
Accepted

Tcolorbox automatically indents the text after the equation

You can change the code inserted by the after key so that is not longer issues a \par, either by setting it to an empty value or to some space: \documentclass{report} \usepackage{lipsum} \usepackage[...
Ulrike Fischer's user avatar
5 votes
Accepted

Help Recreating Equation Format

Here is my attempt with tikz: \documentclass[12pt]{article} \usepackage{tikz} \usetikzlibrary{shapes} \usepackage{amsmath} \tikzset{mystyle/.style={minimum height=2cm,rounded corners=3mm,anchor=base, ...
Andrey L.'s user avatar
  • 1,834
5 votes
Accepted

Remove first \tcbline in tcolorbox environment if there is no preceding text

An attempt which skips the \tcbline* in \proofpart if the first paragraph in upper part has not been started yet. \documentclass{article} \usepackage{amsthm} \usepackage[many]{tcolorbox} \newif\...
muzimuzhi Z's user avatar
5 votes
Accepted

Precise hyperref target in tcolorbox

You can enlarge the amount hyperref raises the anchor: \documentclass{article} \usepackage[most]{tcolorbox} \usepackage[colorlinks=true]{hyperref} \NewTColorBox[auto counter]{thmboxB}{O{} O{}}{% ...
Ulrike Fischer's user avatar
5 votes
Accepted

Generating a Visible Barcode to a Darkened Back Cover

Explicitly set a background colour and define the background limits by invoking pst-barcode as follows: \psbarcode{0-89555-821-1}{backgroundcolor=FFFFFF borderleft=15 borderright=15 bordertop=14 ...
Terry Burton's user avatar
5 votes
Accepted

tcolorbox and logic formats

You should provide complete MWE, from your code fragment is not clear which package you use and how you imagine that inrefer should be formulated (standard proof package not support showed result). So ...
Zarko's user avatar
  • 300k
5 votes
Accepted

Record some tcolorbox in order to print at the end of each chapter

You can define a dedicated style, such as \tcbset{% first use/.style={ saveto=\jobname_meth-\thetcbcounter.tex, record={% \string\begin{meth}{}{}% \string\input{\jobname_meth-\...
jlab's user avatar
  • 3,986
5 votes
Accepted

Command to disable all tcolorboxes without deleting / commenting out them in source code?

You can use \RenewDocumentEnvironment with the +b argument specifier to redefine {tcolorbox}. This seems to work also with environments defined by \newtcolorbox. \documentclass{article} \usepackage{...
campa's user avatar
  • 31.9k
4 votes
Accepted

\section doesn't work within a tcolorbox

Sophanatprime read my problem over at github and presented a solution with a selfcreated package at the tcolorbox issues. After manually installing their package, \usepackage[tcolorbox]{updatemarks} ...
Sk1nk's user avatar
  • 125
4 votes

tcolorbox/tcblisting: Draft mode erases boxes' content

When you pass draft to the document class, it also forwards it to the listings package (loaded by the most option of tcolorbox) which suppresses the printing of all listings. You can get around this ...
mbert's user avatar
  • 4,541
4 votes
Accepted

How to frame inline text with a box?

Like this: Code: \documentclass{article} \usepackage{amsmath} \usepackage{amsthm} \theoremstyle{plain} \newtheorem{theorem}{Theorem}[section] \begin{document} \begin{theorem} Bla ...
Raffaele Santoro's user avatar
4 votes
Accepted

tcolorboxes in beamer

For your definition of \tcolorbox style you need to load tcolorbox package with option many or breakable and skins. After adding many option and compose your code fragments into MWE (Minimal Working ...
Zarko's user avatar
  • 300k
4 votes

How can I have a figure with caption inside a tcolorbox?

\captionof from caption package is your friend. \documentclass{article} % \usepackage{xcolor} % auto loaded by tcolorbox \usepackage[most]{tcolorbox} % \usepackage{multido} \usepackage[strut=off]{...
muzimuzhi Z's user avatar
4 votes

Caption outside tcolorbox

Hope this is the one you expects: \documentclass{book} \usepackage{tcolorbox} \usepackage{listings} \usepackage[labelfont=bf,font=footnotesize]{caption} \captionsetup{format=plain} \usepackage{capt-...
MadyYuvi's user avatar
  • 13.9k
4 votes

Adjust a colored box to the text

Just drop the option squareand use the option hbox for adjusting the width of the box to the text, e.g.: \documentclass{article} \usepackage[most]{tcolorbox} \begin{document} \begin{tcolorbox}[...
BanDoP's user avatar
  • 693
4 votes
Accepted

Change command depending on the tcolorbox it's in

You can define \kw to select a custom color for the text which you can then (re-)define inside the relevant tcolorbox using the code option: \documentclass{article} \usepackage{tcolorbox} \...
Jasper Habicht's user avatar

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