# Increase fuzzy shadow steps for tcolorbox

Is there a way to increase the number of steps for the fuzzy-shadow option of tcolorbox?

The shadow has about the size and feather-range I am looking for but seems a bit ragged.

Can the number of steps the fuzzy shadow uses be increased?

MWE:

\documentclass[10pt,twoside]{article}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage[most]{tcolorbox}
\usepackage{tikz}

\definecolor{bgtan}{HTML}{F7F2E5}
\pagecolor{bgtan}

\newtcolorbox{paperbox}[1][]{
frame hidden,
enhanced,
boxrule=0pt,
boxsep=0.25ex,
arc=0mm,
borderline north={1pt}{-0.5pt}{black},
borderline south={1pt}{-0.5pt}{black},
colback=black!20!white,
colframe=black!20!white,
#1
}

\begin{document}
\begin{paperbox}
\lipsum[1]
\end{paperbox}

\end{document}

• Using 0.2mm instead of 0.4mm is no option? You're using -4pt as vertical size, perhaps you should switch to 0.4pt as step size to get 10 'shadows' – user31729 Mar 7 '16 at 18:57
• A fuzzy shadow consists of a fixed number of 10 simple shadow entities. As Christian Hupfer wrote, the step size can be made smaller to get a more smooth (but smaller) appearance. Another possibility would be to use a combination of several shadow options (more than 10) to create a smoother shadow. – Thomas F. Sturm Mar 8 '16 at 7:06
• @ThomasF.Sturm: People might address you to provide a key etc. to remove the fixed number of shadows here (well, people, not me ;-)) – user31729 Mar 8 '16 at 9:47

As far as I've understood the step argument of fuzzy shadow is a shrink offset and the vertical shift divided by the step size should give the number of individual shadows being drawn.

If the shift is given in pt, it's perhaps better to provide the same length unit for the step as well.

I've used 0.4pt to provide for 10 'shadows':

\documentclass[10pt,twoside]{article}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage[most]{tcolorbox}
\usepackage{tikz}

\definecolor{bgtan}{HTML}{F7F2E5}
\pagecolor{bgtan}

\newtcolorbox{paperbox}[1][]{
frame hidden,
enhanced,
boxrule=0pt,
boxsep=0.25ex,
arc=0mm,
borderline north={1pt}{-0.5pt}{black},
borderline south={1pt}{-0.5pt}{black},
colback=black!20!white,
colframe=black!20!white,
#1
}

\begin{document}
\begin{paperbox}
\lipsum[1]
\end{paperbox}

\end{document}


• Using units consistantly is a good hint but as far as I understand - also from the comments to my original question - this approach doesn't actually change the number of shades: It is always fixed at 10 - right? – Cathode Mar 10 '16 at 20:15
• @Cathode: Yes, I know now, but I had the impression that it had changed. Perhaps Thomas Sturm will update his package soon and this fixed number might be variable then – user31729 Mar 10 '16 at 20:21

As pointed out by Thomas F. Sturm in a comment to the original question the number of shades generated by fuzzy shadow is currently fixed at 10.

Generating more steps is possible by using multiple shadow enteties manually.