2

i am making a menu, and i've stumble on a formatting issue. The way it works now is that

"Name (empty space) price"

I would like it to be

"Name.......Price"

still taking up the same width as now.

Anyone have a solution?

\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
    If the currency is €, then 69,- is a little steep for pasta ;). – Henri Menke Apr 28 '14 at 11:05
  • its Kr. :D thats 1€ / 7,5 kr. :-) – Steffen Hvid Apr 28 '14 at 11:11
  • I have tried to make an exstra column and used \dotfill , but now there is a gap between the dots and (maybe column spacing or padding) anyone know how change that? – Steffen Hvid Apr 28 '14 at 11:44
1

To fill the first column with dots after the content use the tabu-preamble

\begin{tabu} to \textwidth {X<{\dotfill}@{}r}

MWE

\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}

Output

enter image description here

0
\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}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.