答案1
在此示例中,我使用了 tcolorbox 和 xstring。以下是一些有用的字体: 字体目录。
\documentclass[x11names]{article}
\usepackage{tcolorbox}
\usepackage{xstring}
\usepackage{pbsi}
\usepackage[T1]{fontenc}
\newcommand{\exampleBox}[2]{
\begin{tcolorbox}[
colframe=Blue2,
colback=white,
top=2pt,
bottom=2pt,
left=2pt,
right=2pt,
boxrule=1pt
]
\StrSplit{#1}{1}{\firstLetter}{\otherLetters}
\textcolor{RoyalBlue4}{
\bsifamily\Huge\MakeUppercase\firstLetter}%
\textcolor{black}{
\hspace{-2.2ex}
\fontfamily{phv}\bfseries\Large
\scshape\underline{ \textcolor{RoyalBlue1}{\otherLetters}}}
\vspace{2ex}
#2
\end{tcolorbox}
}
\begin{document}
\exampleBox{writing about mathematics}{
\textcolor{Blue2}{\textbf{Extending the example}}
bla bla bla...
}
\end{document}
希望能够帮助到您。