![如何制作如下图所示的框架?](https://linux22.com/image/368611/%E5%A6%82%E4%BD%95%E5%88%B6%E4%BD%9C%E5%A6%82%E4%B8%8B%E5%9B%BE%E6%89%80%E7%A4%BA%E7%9A%84%E6%A1%86%E6%9E%B6%EF%BC%9F.png)
答案1
以下是一项建议:
\documentclass{article}
\usepackage{tikz}
\newcommand{\Scroll}[3]{\begin{tikzpicture}
\draw[-] (0.25,0) -- (#1,0);
\draw[domain=90:450,smooth,variable=\x] plot ({0.5*cos(\x)*(sqrt(90/\x))},
({0.25*(sin(\x)*(sqrt(90/\x))-1)}+#2);
\filldraw[fill=gray,domain=270:450,smooth,variable=\x] plot ({0.5*cos(\x)*(sqrt(90/\x))},
({0.25*(sin(\x)*(sqrt(90/\x))-1)}+#2) -- (0,{0.25*(-sqrt(1/3)-1)+#2});
\draw[-] (0,#2) -- (#1,#2);
\draw[domain=180:360,smooth,variable=\x] plot ({0.5*cos(\x)*(sqrt(90/\x))},
({0.25*(sin(\x)*(sqrt(90/\x))-1)});
\draw ({-0.5*(sqrt(1/2)},-0.25) -- ({-0.5*(sqrt(1/2)},#2-0.25);
\draw (0.25,-0.25) -- (0.25,#2-0.25);
\draw (0,{0.25*(-sqrt(1/3)-1)+#2}) -- (0,{0.25*(sqrt(1/5)-1)+#2});
\draw[domain=-90:350,smooth,variable=\x] plot ({0.5*cos(\x)*(sqrt(90/(\x+180)))+#1},
({0.25*(sin(\x)*(sqrt(90/(\x+180)))+1)}+#2);
\draw ({-0.25+#1},0.25+#2) -- ({-0.25+#1},#2);
\filldraw[fill=gray,domain=-60:350,smooth,variable=\x] plot ({0.5*cos(\x)*(sqrt(90/(\x+180)))+#1},
({0.25*(sin(\x)*(sqrt(90/(\x+180)))+1)}+#2);
\draw[domain=-90:00,smooth,variable=\x] plot ({0.5*cos(\x)*(sqrt(90/(\x+180)))+#1},
({0.25*(sin(\x)*(sqrt(90/(\x+180)))+1)});
\draw ({0.25*sqrt(2)+#1},0.25) -- ({0.25*sqrt(2)+#1},#2+0.25);
\pgfmathsetmacro{\cardwidth}{#1 cm-2cm}
\node[text width=\cardwidth,align=center](scrolltext) at (#1/2,#2-1){
\begin{minipage}{#1 cm}
#3
\end{minipage}};
\end{tikzpicture}
}
\begin{document}
\Scroll{6}{4}{<ho v\`{a} t\^{e}n th\'{i} sinh>\\
Ng\`{a}y sinh}
\end{document}
该\Scroll
命令接受三个参数:\Scroll{width}{height}{text}
。在此版本中,width
和height
是数字(而不是长度)。