New answers tagged

0 votes

tcolorbox overflowing text when using parbox=false

By using parbox=false, a customized \@parboxrestore is used for that tcolorbox. % default definition in latex2e kernel % $ latexdef -s \@arrayparboxrestore % latex.ltx, line 11974: \def\@...
user avatar
  • 21.7k
9 votes

How to define new key properties in l3keys

There isn't an official way to add new properties. As properties are available for all key creation, and thus form part of the language, adding new ones requires careful consideration. (The team did ...
user avatar
  • 243k
2 votes

How to define new key properties in l3keys

This is clearly extremely bad style (in other words, don’t do this), but I think it’s the only way to accomplish what you want. \documentclass{article} \begin{document} \newcommand\somemacro[1]{\...
user avatar
  • 11.1k
3 votes
Accepted

Most efficient way to fill an area under a curve in TikZ

You draw your function (thick blue line) in two parts: as plot of function on domain=:10 (defined in picture preamble) and from its end as straight line from its end to coordinate (11,0.75) Pattern ...
user avatar
  • 255k
2 votes
Accepted

How to redefine the same command differently over multiple theorems

If the command is used inside a tcolorbox you can use its colors into a command. It can be independent of the specific box \documentclass[a4paper, 11pt]{article} \usepackage[T1]{fontenc} \...
user avatar
  • 128k
3 votes
Accepted

tcbset error with optional color arguments and `attach boxed title`

titlebox is a known key of tcolorbox. By overwriting it you are confusing the code. You are also missing the enhanced key. \documentclass[a4paper, 11pt]{report} \usepackage[many]{tcolorbox} \tcbset{ ...
user avatar
1 vote

How can I have two different background colors in one tcolorbox title?

You can use only TeX primitive commands \hbox, \vbox, \hrule, \vrule, \setbox, \kern etc. You need not use the tcolorbox package in this case. Advantage: all is controlled by you. \documentclass{...
user avatar
  • 53.5k
1 vote

How can I have two different background colors in one tcolorbox title?

Tikz library tikzmark should be the ultimate solution but I didn't succeed. Here's a lengthy way: a costumed \xcolorbox[<options>]{<color>}{<text>} similar to \colorbox but through &...
user avatar
  • 21.7k
3 votes
Accepted

How can I have two different background colors in one tcolorbox title?

You need load the skin library, use enhanced option and create your own title frame box. Fill the whole title region with white color first. Then fill the left side until the words 'Example X.XX' to ...
user avatar
  • 4,213
1 vote
Accepted

Drawing a customized frame using tcolorbox or tikz

In case you want something simple \documentclass[tikz, border=1cm]{standalone} \begin{document} \begin{tikzpicture} \node[draw=orange, line width=6pt, inner sep=0.5cm, postaction={draw=yellow, line ...
user avatar
4 votes

Drawing a customized frame using tcolorbox or tikz

I think use tcolorbox could be better. However you can write the your own frame code using tikz: \documentclass{article} \usepackage{showframe} \usepackage{lipsum} \usepackage{tikz} \usetikzlibrary{...
user avatar
  • 4,213
1 vote

Drawing a customized frame using tcolorbox or tikz

Just to start,try this code: \documentclass[10pt,a4paper]{article} \usepackage{tikz} \usetikzlibrary{ decorations.markings} \begin{document} \begin{tikzpicture} \filldraw[fill=gray!20,...
user avatar
1 vote
Accepted

A practical way to color pairs of brackets

It is an ugly method, but it will works: \documentclass{article} %%%%%%%%MATHS%%%%%%%%%%%%% \usepackage{amsmath} \usepackage{breqn} \usepackage{amsfonts} \usepackage{xcolor} \begin{document} \...
user avatar
  • 11k
2 votes
Accepted

Centering a text while using wrapfigure

There is an optional parameter to wrapfigure to indicate the number of narrow lines. With \begin{wrapfigure}[4]{L}{0.35\textwidth} you get
user avatar
1 vote

Why is some vertical space added around text in a tcolorbox while textcolor or itemize are active?

Well color can affect spacing as it adds whatsits. And if you use \textcolor instead of \color you additionally start a paragraph. With lualatex can use use luacolor, that avoids parts of the problem. ...
user avatar
4 votes
Accepted

Theorem with tcolorbox

Not sure this is what you like, I don't know Arabic rules: \documentclass[12pt,a4paper]{book} \usepackage[arabic]{minitoc} \usepackage[most]{tcolorbox} \usepackage[pdfstartview=FitH,citecolor=red,...
user avatar
  • 54.2k
0 votes

how to set value of an option by the value of another option in tcolorbox

You could define a macro for width, and \dimexpr use that macro for leftrightskip. Like this: \documentclass{article} \usepackage{showframe} \usepackage{tcolorbox} \newlength{\tcbwd} \setlength{\tcbwd}...
user avatar
  • 4,213
5 votes

tcolorbox inside tabularray leading to [0]s

tabularray redefines \pagebreak and \nopagebreak when they are seen inside tblr environment, but forgets to allow an optional argument. By default tcolorbox passes \pagebreak[0] to its option before, ...
user avatar
  • 21.7k
7 votes

tcolorbox inside tabularray leading to [0]s

Use the nobeforeafter key to suppress the code before and after the tcolorbox. (Personally I prefer the raster library of tcolorbox to align tcolorboxes). \documentclass{report} \usepackage{tabularray}...
user avatar
2 votes

Lost bullets in a custom environment

In definition for environment Material, you can determine if its optional argument is empty or not, and only use \begin{itemize}[#1] if #1 is non empty. For example \usepackage{etoolbox} % already ...
user avatar
  • 21.7k
3 votes
Accepted

Lost bullets in a custom environment

By using \begin{itemize}[% #1 ] the text (#1) becomes the label, so no bullets. (try with *~#1 to see what happens). A correct definition would be ... \subsubsection{Material} ...
user avatar
4 votes
Accepted

drawing colored balls in urn

Here is another possibility: Code: \documentclass[svgnames]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath,amssymb,amsfonts,tikz} \usepackage[paperheight=5in,paperwidth=10in,left=2cm,right=...
user avatar
  • 772
3 votes

drawing colored balls in urn

Let's consider them as two tikzpictures. \documentclass{article} \usepackage{amsmath,amssymb,tikz} \usepackage[paperheight=5in,paperwidth=10in,left=2cm,right=1cm,top=1.5cm,bottom=2.5cm]{geometry} \...
user avatar

Top 50 recent answers are included