如何制作如下图所示的框架?

如何制作如下图所示的框架?

在哪里可以找到或如何制作像下图这样具有可选宽度和高度的框架?在此处输入图片描述

答案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}。在此版本中,widthheight是数字(而不是长度)。

相关内容