# Tag Info

0

With grid inside a new tcolorbox: \documentclass[a4paper]{article} % DINA4 (210 × 297 [mm]) \usepackage[%showframe=true, width=16cm, height=26cm, ]{geometry} \pagestyle{empty} \usepackage{tikz} \usetikzlibrary{calc} \usepackage[most]{tcolorbox} \begin{document} \begin{tcolorbox}[ height=6cm, sharp corners, after skip=0pt, enhanced, remember, finish={% \...

1

There are differences between how the width of a tcolorbox environment and a \draw grid are determined. In a tcolorbox environment, its total natural width is exactly \linewidth. Here the entire left and right rules are drawn within that width. In a \draw (0, 0) grid (1, 1);, its total width is "1cm + line width", because tikz draws a line with ...

1

Such irregular structure can be easily obtained with a tcbposter (also from tcolorbox package like tcbraster). Altough a poster is supposed to have a regular structure, it's possible to change height, width and placement for all boxes. It's even possible to define boxes which height is defined by the space between other boxes. Following code shows how to ...

3

The option specifying height of first row is named raster row 1, not row 1. Option tcb/raster row m is documented in documentation of tcolorbox, section 15.4. \documentclass{article} \usepackage[showframe=true]{geometry} \usepackage[most]{tcolorbox} \tcbset{ SymbolStyle/.style={boxrule=4pt,colframe=blue}, NoGaps/.style={boxsep=0pt, left=0pt, right=0pt, ...

1

The gap between box frame and box contents of a tcolorbox environment is controlled by options left, right, top, and bottom, respectively. They are shown in tcolorbox's documentation, sec. 2 and documented in sec. 4.7.4. With each of them set to 0pt, you get \documentclass{article} \usepackage[showframe=true, ]{geometry} \usepackage[most]{tcolorbox} \tcbset{...

0

Please control arc with the help of -- arc=0mm,outer arc=1mm, \begin{tcolorbox} [arc=0mm,outer arc=1mm, boxrule=0mm,toprule=0mm,bottomrule=0mm,left=1mm,right=1mm,leftrule=5pt, titlerule=0mm,toptitle=0mm,bottomtitle=0mm,top=0mm, colframe=blue!50!black,colback=blue!5!white,coltitle=blue!50!black, ] This is a tcolorbox! \...

4

You can replace the frame code so that only the left border is drawn, which removes the artefacts and allows you to have the sharp internal corners: \documentclass{article} \usepackage[skins]{tcolorbox} \newtcolorbox{blueleftbox}{% enhanced, boxrule=0pt, leftrule=5pt, sharp corners=west, frame code={ \fill[blue] ([xshift=5pt]frame.north ...

4

Among other solutions, you could use a \tcbposter with three boxes. For tcbposter look at section 20 in tcolorbox documentation. \documentclass{article} %%% \usepackage{geometry} \geometry{ paperheight=842pt, paperwidth=595pt, margin=0pt, } \setlength{\parindent}{0cm} \usepackage[most]{tcolorbox} \definecolor{theme}{HTML}{333d4f} \...

1

After reading the LuaTeX reference, I realize that it is possible to directly \input from Lua strings. The key is to override find_read_file and open_read_file callbacks, which allows us to write our own back-end for \input commands. For details, please see the code below. \documentclass{article} \usepackage[T1]{fontenc} \usepackage{verbatim} \usepackage{...

5

set attach boxed title to top left to get a boxed title on the top left. rule above the title and the custom title box is drawn in boxed title style={overlay={...}} rule above the frame and shade below the title is drawn in overlay unbroken={...} left rule is drawn by borderline west=... shadow is controled by drop fuzzy shadow \documentclass{article} \...

2

Straight from the book -- http://mirror.iopb.res.in/tex-archive/macros/latex/contrib/tcolorbox/tcolorbox.pdf \documentclass[11pt]{article} \usepackage{amsmath,amssymb} \usepackage{varioref} \usepackage{tcolorbox} \tcbuselibrary{skins} \usepackage{cleveref} \newtcolorbox{YetAnotherTheorem}[1]% {enhanced,arc=0mm,outer arc=0mm, boxrule=0mm,toprule=1mm,...

1

You can play with add to width and right or left dimensions to include the margin notes inside the tcolorbox frames. \documentclass{article} \usepackage{lipsum} \usepackage[most]{tcolorbox} \usepackage{lmodern} \usepackage{marginnote} \begin{document} \begin{tcolorbox}[add to width=3cm, right=3.4cm] \lipsum[2]\marginnote{this is a margin note} \lipsum[1] \...

2

Based on your MWE: \documentclass[border=3mm]{standalone} \usepackage{enumitem} \setlist[itemize]{nosep, leftmargin=*} \usepackage[most]{tcolorbox} \usetikzlibrary{arrows.meta, matrix, positioning} \usepackage[none]{hyphenat} \begin{document} \newtcolorbox{GreenBox}[2][]{% enhanced, colback = ...

12

Useful libraries The arrows.meta tikzlibrary, along with shadows.blur (for the rectangles and arrows) and shapes, can do things you were missing. Here's what I got Does this look somewhat close to what was desired ? Differences from the original Intentionally I kept these simple, rather than accurately mimicking the target : The box widths were made ...

4

Look at this. I hope it helps you. I put some comments to guide with instructions. Sorry for not using the tcolorbox as you requested. I found it easier the way below. IMHO, it may simplify your work. Edit: I rewrote the code to become cleaner. Hope this looks better now! \documentclass[10pt, border=20pt]{standalone} \usepackage[dvipsnames]{xcolor} \...

6

A tcbraster to start with: \documentclass[10pt]{standalone} \usepackage{enumitem} \setlist[itemize]{leftmargin=*, itemsep = 0em} \usepackage[none]{hyphenat} \usepackage{tikz} \usetikzlibrary{matrix, shapes, arrows, positioning} \usepackage[most]{tcolorbox} \begin{document} \tcbset{ innerbox/.style={enhanced, fonttitle=\bfseries, ...

1

You can setup the chars with the literate key of listings: \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{pmboxdraw} \usepackage{newunicodechar} \newunicodechar{└}{\textSFii} \newunicodechar{├}{\textSFviii} \newunicodechar{─}{\textSFx} \usepackage{tcolorbox} %\tcbuselibrary{listingsutf8,breakable,skins} \...

3

Suprisingly, I have not encountered this situation before. As commented before, there seems to be to much shrinkable space inside the box. The break algorithm detects that the box cannot be broken further, but the resulting last box seems to be too large to fit on the page (not really true here). So, the bounding box for the last box part is made smaller to ...

0

I've not found a way to prevent the overlap from happening, but I have figured out how to know if it occurs (kind of). The idea is to call \pdfsavepos so that \pdflastypos knows the end of the tcolorbox and the beginning of what comes after. Then we can compare them and type out a warning if something is wrong. The only downside is that using the tcolorbox ...

4

tcolorbox with enhanced skin can be remember(ed) as to be referenced later on inside a tikzpicture. This way there's no need for a tcolorbox inside a TikZ node unless you need special positioning between boxes. Following code shows an example with OP's code. GreenBox definition has been changed to accept an optional parameter and making box title mandatory. \...

2

Second attempt It seems to be controlled by middle and boxsep. If we set them both to be zero the we get: It's not immediately clear to me that this is better than the previous manual adjustment. First, there is a faint hint of a yellow line above the subtitle line. Secondly, as explained on page 11 of the manual, boxsep is added all over the place, which ...

0

The frame hidden option accomplishes what you are asking. Take a look at the documentation of this option (screenshot here) See minimal working example below (screenshot here) \documentclass{article} \usepackage[skins, listings]{tcolorbox} \usepackage{lipsum, showframe} \begin{document} \lipsum[1][1-4] \begin{tcblisting}{ bicolor, colback = blue!10!white,...

1

You can change the order in the graphics pages key: \documentclass[a4paper]{article} \usepackage{geometry} \usepackage[final]{pdfpages} \usepackage{graphicx} \pagestyle{empty} \usepackage[skins,raster]{tcolorbox} \begin{document} \begin{tcbraster}[% raster columns=2, colframe = white, raster height=\textheight,raster equal skip=0pt,blank, ...

0

By default a tcbraster equally divides its total width (linewidth by default) between its columns. This is the reason for your wider than expected central box. You can force the width for a particular box with raster force size=false and some add to width on a particular box. But in this case you have to manually compute all widths in order to distribute the ...

2

Try this: \documentclass{article} \usepackage[many]{tcolorbox} \newtcbtheorem[number within=chapter]{TcbAlgorithm}{Algorithm}{ colback=blue!5, colframe=blue!5, coltitle=red, }{thm} \usepackage[noend]{algpseudocode} \usepackage{algorithm} \usepackage{xpatch} \xpatchcmd\algorithmic {\labelwidth 1.2em} {\labelwidth .7em} {}{\fail} \begin{document} ...

2

I change overlay={\bclampe} to overlay={ \node[inner sep=0pt, xshift=.85cm, anchor=center] at ($(frame.north west)!.5!(frame.south west)$) {\bclampe}; } where xshift=.85cm is half the value of leftrule=1.7cm. Full example \documentclass{article} \usepackage[tikz]{bclogo} \usepackage[most]{tcolorbox} \usepackage{varwidth} \usetikzlibrary{calc} \...

0

The simple answer is to use tcolorbox instead of \tcbox, as follows: \begin{tcolorbox} \begin{small} \begin{concmath} first line\\ % here a new line is expected in the box. second line. \end{concmath} \end{small} \end{tcolorbox}

2

Use option tikznode. It is documented near the end of tcolorbox documentation, sec. 4.12. For example, \documentclass{article} \usepackage{tcolorbox} \usepackage{tikz} \begin{document} \tcbox[tikznode]{% \small text \\ text } \end{document} Update With \tcbox[tikznode]{% \begin{small} \begin{concmath} first line\\ % ...

Top 50 recent answers are included