答案1
除了插入文本外,制作图形非常简单。circledsteps
在这里特别有用,因为它允许我们避免嵌套tikzpicture
s 而不引入\savebox
,并且它非常灵活。
\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{positioning}
\usepackage{circledsteps}
\colorlet{dred}{red!70!black}
\begin{document}
\begin{tikzpicture}
\node[font=\Huge\bfseries,align=center,rounded corners=3pt,
path picture={
\draw[draw=dred,rounded corners=15pt,line width=3mm]
([yshift=-1.51mm]path picture bounding box.south west)
rectangle ([xshift=1.51mm,yshift=1.51mm]path picture bounding box.north east);
},inner sep=1em] (MPSI){%
MPSI\\
\Circled[outer color=dred,fill color=dred,inner color=white,
inner ysep=12pt,inner xsep=12pt]{4}};
\node[right=1ex of MPSI.south east,anchor=south west,path picture={
\draw[draw=dred,rounded corners=12pt,line width=1.5mm]
([yshift=-1.5mm]path picture bounding box.north west)
-- ([yshift=-1.5mm]path picture bounding box.north east)
([yshift=1.5mm]path picture bounding box.south west)
-- ([yshift=1.5mm]path picture bounding box.south east);
},inner ysep=3mm,font=\large\bfseries,text width=23em,align=center,
label={[anchor=south east,text=dred,font=\small,
inner sep=1pt]north east:Lyc\'ee Omar Ibn Al-Khattab -- Meknes}]{
Devoir Suveill\'e n\textsuperscript{\textsf{o}}8 de Mathematiques\\[1em]
{\normalsize La Samedi 21 Mars 2020\hfill Dur\'ee: 4 heures}\\
};
\end{tikzpicture}
\end{document}