我怎样才能用 Latex 制作一份餐厅菜单,(1) 与图片中的菜单类似(图片来自优雅菜单网站)
(2)有这个框架(框架的代码由“cfr”在“使用 pgfornament 围绕页面的边框”中)?
这是带装饰的外部框架的代码:
\documentclass{article}
\usepackage[paper=a4paper, verbose, centering]{geometry}
\usepackage{pgfornament}
\newcommand{\corner}[1]{%
\begin{tikzpicture}[remember picture, overlay]
\node[anchor=north west] at (current page.north west){%
\pgfornament[width=2cm]{#1}};
\node[anchor=north east] at (current page.north east){%
\pgfornament[width=2cm,symmetry=v]{#1}};
\node[anchor=south west] at (current page.south west){%
\pgfornament[width=2cm,symmetry=h]{#1}};
\node[anchor=south east] at (current page.south east){%
\pgfornament[width=2cm,symmetry=c]{#1}};
\end{tikzpicture}%
}
\newcommand{\cornerplus}[2]{%
\begin{tikzpicture}[remember picture, overlay]
\node[anchor=north west] at (current page.north west){%
\pgfornament[width=2cm]{#1}};
\node[anchor=north east] at (current page.north east){%
\pgfornament[width=2cm,symmetry=v]{#1}};
\node[anchor=south west] at (current page.south west){%
\pgfornament[width=2cm,symmetry=h]{#1}};
\node[anchor=south east] at (current page.south east){%
\pgfornament[width=2cm,symmetry=c]{#1}};
\node[anchor=north] at (current page.north){%
\pgfornament[width=6.5cm,symmetry=h]{#2}};
\node[anchor=south] at (current page.south){%
\pgfornament[width=6.5cm]{#2}};
\end{tikzpicture}%
}
\newcommand{\pt}[1]{%
\begin{tikzpicture}[remember picture, overlay]
\node[anchor=north] at (current page.north){%
\pgfornament[symmetry=h]{#1}};
\node[anchor=south] at (current page.south){%
\pgfornament[symmetry=h]{#1}};
\end{tikzpicture}%
}
\title{}
\author{}
\date{}
\usepackage{kantlipsum,titling}% for demo only
\begin{document}
\maketitle\cornerplus{61}{85}\thispagestyle{empty}
\end{document}
答案1
您的页面框架代码给我留下了深刻的印象。
您的问题似乎是如何布局菜单项。以下内容可能会给出如何做到这一点的提示。
% menuprob.tex SE 643006
\documentclass{article}
\usepackage[paper=a4paper, verbose, centering]{geometry}
\usepackage{pgfornament}
\newcommand{\corner}[1]{%
\begin{tikzpicture}[remember picture, overlay]
\node[anchor=north west] at (current page.north west){%
\pgfornament[width=2cm]{#1}};
\node[anchor=north east] at (current page.north east){%
\pgfornament[width=2cm,symmetry=v]{#1}};
\node[anchor=south west] at (current page.south west){%
\pgfornament[width=2cm,symmetry=h]{#1}};
\node[anchor=south east] at (current page.south east){%
\pgfornament[width=2cm,symmetry=c]{#1}};
\end{tikzpicture}%
}
\newcommand{\cornerplus}[2]{%
\begin{tikzpicture}[remember picture, overlay]
\node[anchor=north west] at (current page.north west){%
\pgfornament[width=2cm]{#1}};
\node[anchor=north east] at (current page.north east){%
\pgfornament[width=2cm,symmetry=v]{#1}};
\node[anchor=south west] at (current page.south west){%
\pgfornament[width=2cm,symmetry=h]{#1}};
\node[anchor=south east] at (current page.south east){%
\pgfornament[width=2cm,symmetry=c]{#1}};
\node[anchor=north] at (current page.north){%
\pgfornament[width=6.5cm,symmetry=h]{#2}};
\node[anchor=south] at (current page.south){%
\pgfornament[width=6.5cm]{#2}};
\end{tikzpicture}%
}
\newcommand{\pt}[1]{%
\begin{tikzpicture}[remember picture, overlay]
\node[anchor=north] at (current page.north){%
\pgfornament[symmetry=h]{#1}};
\node[anchor=south] at (current page.south){%
\pgfornament[symmetry=h]{#1}};
\end{tikzpicture}%
}
\title{}
\author{}
\date{}
\usepackage{kantlipsum,titling}% for demo only
\begin{document}
\maketitle\cornerplus{61}{85}\thispagestyle{empty}
\begin{center}
{\huge \textbf{MENU}}
Please inform your server \ldots
\end{center}
\begin{center}
\textbf{Hors d'oevres}
\textsc{assorted cheeses \& artisan crackers}
\end{center}
\end{document}
就您而言,您必须指定菜单中相关项目的字体和大小。抱歉,我无法提供帮助。