两个问题:
- 我怎样才能减小盒子的尺寸?
- 我怎样才能缩小框与框中包含的文本的关系?
这是我的 MWE。
\documentclass[12pt,a4paper,oneside]{book}
\usepackage[lmargin=.8cm, rmargin=.7cm, bmargin=2cm,
marginparwidth=5.5cm, marginparsep=2em]{geometry}
\usepackage[svgnames]{xcolor}
\usepackage[most]{tcolorbox}
\begin{document}
\tcbset{enhanced,colback=LightGoldenrodYellow,
boxrule=1.1pt, colframe=LightGoldenrodYellow,fonttitle=\bfseries,halign=center,valign=center}
\begin{tcolorbox}[
lifted shadow={1mm}{-2mm}{3mm}{0.1mm}%
{black!50!white}]
\textbf{SVILUPPO IN MULTIPOLI \\DI POTENZIALI NEWTONIANI \\E COULOMBIANI}
\end{tcolorbox}
\end{document}
答案1
使用 \tcbox:
\documentclass[12pt,a4paper,oneside]{book}
\usepackage[lmargin=.8cm, rmargin=.7cm, bmargin=2cm,
marginparwidth=5.5cm, marginparsep=2em]{geometry}
\usepackage[svgnames]{xcolor}
\usepackage[most]{tcolorbox}
\begin{document}
\begin{center}
\tcbset{enhanced,
colback=LightGoldenrodYellow,
boxrule=1.1pt,
colframe=LightGoldenrodYellow,
fonttitle=\bfseries,
halign=center,valign=center}
\tcbox[lifted shadow={1mm}{-2mm}{3mm}{0.1mm}%
{black!50!white}]
{\Huge\begin{tabular}{@{}c@{}}\textbf{SVILUPPO IN MULTIPOLI} \\\textbf{DI POTENZIALI NEWTONIANI} \\\textbf{E COULOMBIANI}\end{tabular}}
\end{center}
\end{document}