我想在环境中添加阴影角度(如tikz
节点:)。可以吗?shading angle=45
tcolorbox
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[dvipsnames,svgnames]{xcolor}
\usepackage{lipsum}
\usepackage{tcolorbox}
\tcbuselibrary{skins}
\newtcolorbox{boxed}{enhanced,
interior style={left color=SpringGreen,right color=Dandelion},frame hidden,width=0.8\textwidth,center,drop shadow}
%\tcbset{boxed/.style={shading angle=120}}
\begin{document}
\begin{boxed}
\lipsum[1]
\end{boxed}
\end{document}
答案1
你的意思是这样的吗:
如果这是您想要的,那么您只需要添加shading angle=45
以下规范boxed
:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[dvipsnames,svgnames]{xcolor}
\usepackage{lipsum}
\usepackage{tcolorbox}
\tcbuselibrary{skins}
\newtcolorbox{boxed}{
enhanced,
interior style={left color=SpringGreen,
right color=Dandelion,
shading angle=45},
frame hidden,width=0.8\textwidth,center,drop shadow
}
\begin{document}
\begin{boxed}
\lipsum[1]
\end{boxed}
\end{document}