我正在制作菜单,遇到了格式问题。现在它的工作方式是
“名称(空白处)价格”
我希望如此
“名称......价格”
仍然占用与现在相同的宽度。
有人有解决方案吗?
\documentclass[a4paper]{leaflet}
\usepackage[top=1.5in, bottom=1.5in, left=1.4in, right=1.4in]{geometry}
\usepackage{fancybox}
\usepackage{tabu}
\usepackage{booktabs}% for better rules in the table
\begin{document}
\ovalbox{
\begin{tabu} to \textwidth {Xr}
Pasta Bolognaise & 69,- \\
Paste Carbonara & 69,-
\end{tabu}
}
\end{document}
答案1
要在内容后用点填充第一列,请使用tabu
-preamble
\begin{tabu} to \textwidth {X<{\dotfill}@{}r}
平均能量损失
\documentclass[a4paper]{leaflet}
\usepackage[top=1.5in, bottom=1.5in, left=1.4in, right=1.4in]{geometry}
\usepackage{fancybox}
\usepackage{tabu}
\usepackage{booktabs}% for better rules in the table
\begin{document}
\ovalbox{
\begin{tabu} to \textwidth {X<{\dotfill}@{}r}
Pasta Bolognaise & 69,- \\
Paste Carbonara & 69,-
\end{tabu}
}
\end{document}
输出
答案2
\documentclass[a5paper]{leaflet}
\usepackage[top=1.5in, bottom=1.5in, left=1.4in, right=1.4in]{geometry}
\usepackage{fancybox,pict2e}
\begin{document}
\ovalbox{%
\parbox{\dimexpr\linewidth-2\fboxsep-2\fboxrule}{%
Pasta \dotfill Bolognaise 69,00 \\
Paste \dotfill Carbonara 69,50}%
}
\end{document}