使用 tcolorbox 在阴影框中渐变

使用 tcolorbox 在阴影框中渐变

我的代码如下:

\documentclass{book}
\usepackage[skins]{tcolorbox}%
\tcbuselibrary{breakable}%
\tcbuselibrary{hooks}%%

\begin{document}

\begin{tcolorbox}[shadow={4mm}{-3mm}{0mm}{black!23!white},enhanced,colback=black!7,frame style=,title=Problem 1. Simulating the Luria-Delbr\"{u}ck Experiment over One Generation]
Write a program to simulate just one generation of the LD experiment - stochastically.  Simulate $C=500$ cultures each of which has $N=1000$ cells and $\mu=10^{-3}$, i.e.,  a very high mutation rate.   What is the distribution of resistant mutants that you observe across all the cultures?  Are they similar or dissimilar to each other?  Specify your measurement of $c(m)$, i.e., the number of cultures with m resistant mutants.  Is this distribution well fit by a Poisson distribution?  If so, what is the best fit shape parameter of the Poisson density function and how does that relate to the microscopic value of mutation you used to generate the output?  Finally, to what extent are the fluctuations ``large'' or ``small''?
\end{tcolorbox}

\end{document}

输出

在此处输入图片描述

我需要将应用于color gradientshadow color即阴影从开始black 23%到结束的white颜色。请指教。

我正在XeLaTeX使用MikTeX2.9Windows10

答案1

一种可能性是使用drop fuzzy shadow

\documentclass{book}
\usepackage[skins]{tcolorbox}%
\tcbuselibrary{breakable}%
\tcbuselibrary{hooks}%%

\begin{document}

\begin{tcolorbox}[
  enhanced,
  colback=black!7,
  frame style=,
  title=Problem 1. Simulating the Luria-Delbr\"{u}ck Experiment over One Generation,
  drop fuzzy shadow=black!80
]
Write a program to simulate just one generation of the LD experiment - stochastically.  Simulate $C=500$ cultures each of which has $N=1000$ cells and $\mu=10^{-3}$, i.e.,  a very high mutation rate.   What is the distribution of resistant mutants that you observe across all the cultures?  Are they similar or dissimilar to each other?  Specify your measurement of $c(m)$, i.e., the number of cultures with m resistant mutants.  Is this distribution well fit by a Poisson distribution?  If so, what is the best fit shape parameter of the Poisson density function and how does that relate to the microscopic value of mutation you used to generate the output?  Finally, to what extent are the fluctuations ``large'' or ``small''?
\end{tcolorbox}

\end{document}

在此处输入图片描述

相关内容