0

enter image description hereI'm writing a restaurant menu and i have problems with the left margins of this page, in particular in the paragraph 'Wine'. If I omit \vfill, the code overlaps the two paragraphs but it puts them with the same left margin; whereas creating vertical space with vfill it changes the second paragraph's margin. Can somebody help me?

\documentclass[12pt,italian]{article}
\usepackage{geometry}
\geometry{a4paper,top=2.5cm,bottom=2cm,left=2cm,right=2cm,bindingoffset=5mm}
\usepackage[utf8x]{inputenc}
\usepackage[italian]{babel}
\usepackage{xcolor} 
\usepackage{graphicx}
\usepackage{fourier}
\usepackage{eurosym}
\pagestyle{empty}
\begin{document}
    \begin{minipage}[c][0.5\textheight][c]{\textwidth}{
    \begin{center}
        \LARGE{ \underline{SECONDI} \\
            \color{red}{\underline{MAIN COUSES}}}
    \end{center}
    \vspace{.015\textheight}
    Tagliata di pollo con rucola e grana \hfill{12.00 \euro}
    \newline
    \textcolor{red}{Thinly cut grilled chicken with rocket salad and parmesan cheese}
    \newline
    Ossobuco alla fiorentina con patate arrosto \hfill{16.00 \euro}
    \newline
    \textcolor{red}{Florence’s traditional braised veal shanks with roasted potatoes}
    \newline
    Trancio di salmone alla paprika dolce, patate fritte, pomodoro e melanzane grigliate \hfill{15.00 \euro}
    \newline
    \textcolor{red}{Salmon with sweet paprika, french fries and grilled tomato and eggplant}
    \newline
    Bistecca alla Fiorentina per due persone \hfill{4.00 \euro \hspace{0.001\textwidth} all'etto}
    \newline
    \textcolor{red}{Fiorentina Steak (40,00€ per kilogram)}
    \newline
    Tagliata di manzo con rucola e grana \hfill{16.00 \euro}
    \newline
    \textcolor{red}{Thinly cut grilled steak with rocket salad and parmesan cheese}
    \newline
    Spezzatino di cinghiale e triangoli di polenta fritta \hfill{18.00 \euro}
    \newline
    \textcolor{red}{Wild boar stew with fried polenta}
    \newline
    Trippa alla Fiorentina \hfill{13.00 \euro}
    \newline
    \textcolor{red}{Florence’s traditional tripe}
    \newline
    Spezzatino di manzo con concentrato di melograno, noci e riso pilaf  
    \hfill{18.00 \euro}
    \newline
    \textcolor{red}{Beef stew with pomegranate concentrate, nuts and white rice}
}
   \end{minipage}
   \vspace{.02\textheight}
    \begin{minipage}[c][0.35\textheight][c]{\textwidth}{
    \begin{center}
        \LARGE{ \underline{CONTORNI} \\
            \color{red}{\underline{SIDE DISHES}}}
    \end{center}
    \vspace{.015\textheight}
    Patatine fritte* \raisebox{0ex}{\resizebox{!}{2ex}{\includegraphics{veg.jpg}}}\hfill{4.00 \euro}
    \newline
    \textcolor{red}{French fries*}
    \newline
    Fagioli cannellini\raisebox{0ex}{\resizebox{!}{2ex}{\includegraphics{veg.jpg}}}\hfill{4.00 \euro}
    \newline
    \textcolor{red}{White beans}
    \newline
    Insalata mista con pomodoro \raisebox{0ex}{\resizebox{!}{2ex}{\includegraphics{veg.jpg}}}\hfill{4.50 \euro}
    \newline
    \textcolor{red}{Mixed Salad with tomatoes}
    \newline
    Patate arrosto*\raisebox{0ex}{\resizebox{!}{2ex}{\includegraphics{veg.jpg}}}\hfill{5.00 \euro}
    \newline
    \textcolor{red}{Roasted potatoes}
    \newline
    Verdure lesse\raisebox{0ex}{\resizebox{!}{2ex}{\includegraphics{veg.jpg}}}\hfill{6.00 \euro}
    \newline
    \textcolor{red}{Boiled Vegetables}
    \newline
    Verdure grigliate \raisebox{0ex}{\resizebox{!}{2ex}{\includegraphics{veg.jpg}}}\hfill{6.00 \euro}
    \newline
    \textcolor{red}{Grilled Vegetables}
    \newline
    Insalatona (insalata verde, mozzarella, pomodoro, tonno, olive) \hfill{8.50 \euro}
    \newline
    \textcolor{red}{Special Salad (green salad, mozzarella, tuna, olive, tomato)}
}
\end{minipage}
\begin{minipage}[b][0.1\textheight][b]{\textwidth}{
    COPERT0 2.00 \euro A PERSONA
    \newline
    \textcolor{red}{COVER 2.00 \euro PER PERSON}}
\end{minipage}
 \begin{minipage}[t][0.5\textheight][t]{\textwidth}{
    \begin{center}
        \LARGE{ \underline{BEVANDE} \\
            \color{red}{\underline{DRINKS}}}
    \end{center}
    \vspace{.015\textheight}
Acqua minerale (500 ml) \hfill{1.50 \euro}
\newline
\textcolor{red}{Mineral water (500 ml)}
\newline
Acqua minerale (1000 ml) \hfill{2.50 \euro}
\newline
\textcolor{red}{Mineral water (1000 ml)}
\newline
Succo di Frutta (Arancia-pesca) \hfill{3.00 \euro}
\newline
\textcolor{red}{Fruit juice (orange, peach)}
\newline
Pepsi piccola \hfill{3.00 \euro}
\newline
\textcolor{red}{Small pepsi}
\newline
Pepsi media \hfill{4.00 \euro}
\newline
\textcolor{red}{Medium pepsi}
\newline
Lattine (coca-fanta-sprite-schweppes-chinò) \hfill{3.00 \euro}
\newline
\textcolor{red}{Can (coca-fanta-sprite-schweppes-chinò) }
\newline
Thè bottiglie (500 ml, pesca-limone) \hfill{3.50 \euro}
\newline
\textcolor{red}{Tea bottle (500 ml, peach-lemon)}
\newline
Birra piccola (200 ml) \hfill{3.00 \euro}
\newline
\textcolor{red}{Small draught  beer (200 ml)}
\newline
Birra media (400 ml) \hfill{5.00 \euro}
\newline
\textcolor{red}{Medium draught  beer (400 ml)}
\newline
Birra Heineken (330 ml) \hfill{5.00 \euro}
\newline
Birra Moretti (330 ml) \hfill{5.00 \euro}
\newline
Birra  Beck’s  (330 ml)\hfill{5.00 \euro}
\newline
Corona extra (330 ml)\hfill{5.00 \euro}
\newline
Tenent’s  (330 ml)\hfill{6.00 \euro}
\newline
Birra analcolica\hfill{5.00 \euro}
\newline
\textcolor{red}{Nonalcoholic beer}
}
\end{minipage}
\vfill
\begin{minipage}[b][0.3\textheight][b]{\textwidth}{
    \begin{center}
        \LARGE{ \underline{VINO} \\
            \color{red}{\underline{WINE}}}
    \end{center}
    \vspace{.015\textheight}
Vino della casa (Chianti, 500 ml)\hfill{7.50 \euro}
\newline
\textcolor{red}{Wine of the house (Chianti, 500 ml)}
\newline
Chianti (375 ml)\hfill{9.00 \euro}
\newline
Col di Sasso (375 ml)\hfill{10.00 \euro}
\newline
Le Rime bianco (Chardonnay \& Pinot Grigio) (375 ml)\hfill{10.00 \euro}
\newline
Rosso Montalcino (375ml)\hfill{18.00 \euro}
\newline
Pinot Rosè (750 ml) \hfill{16.00 \euro}
\newline
Prosecco Brut (750 ml)\hfill{17.00 \euro}
\newline
Le Rime bianco (Chardonnay \& Pinot Grigio) (750 ml)\hfill{18.00 \euro}
\newline
Col di Sasso (Gabernet Sauvignon \& Sangiovese) (750 ml)\hfill{18.00 \euro}
\newline
Chianti (750 ml)\hfill{16.00 \euro}
\newline
Rosso Montalcino (750 ml)\hfill{28.00 \euro}
\newline                       
Brunello Montalcino (375 ml)\hfill{28.00 \euro} 
\newline
Brunello Montalcino   (750 ml)  \hfill{48.00 \euro}
\newline
}
\end{minipage}
 \end{document}
1

You can get rid of quite a lot of clutter in your input by eliminating unnecessary { } braces.

If you want everything on the page centered, you can use the \centering macro.

You don't need to put the text of a minipage inside { }. You don't really need to specify the height of the minipages here either. Just let them be as tall as they want to be. You don't need to use [t] and [b] either - presumably you thought that would anchor them to the top and bottom of the page (which is not what they actually do!) but in any case the \vfill macro will fill up all the unused vertical space and push the second minipage to the bottom.

But, if you use the tabularx environment instead of minipages, you can also get rid of the repetitive \hfills, \euros, and \newlines and simplify the input quite a lot.

Note, the @{} specifications in the formatting of the tabularx aren't really necessary, but without them the table would be slightly narrower because by default there are left and right margins around the table. I put them in just to reproduce "exactly" what your original input was trying to do.

Note, the \LARGE text is now put inside a { } group, to stop the large size "leaking" into the rest of the document. In the original version the \begin(center} and \end{center} (which are unnecessary after using \centering) did that.

I added a bit of vertical space between the English and Italian headings, which looks better IMO.

Personally I would probably have put something like \newcommand{\UK}[1]{\textcolor{red}{#1}} in the preamble, and then \UK{Mineral water (500 ml)} instead of \textcolor{red}{Mineral water (500 ml) etc in the rest of the input. "Don't repeat yourself unnecessarily" is a good principle to follow.

\documentclass[12pt,italian]{article}
\usepackage{geometry}
\geometry{a4paper,top=2.5cm,bottom=2cm,left=2cm,right=2cm,bindingoffset=5mm}
\usepackage[utf8x]{inputenc}
\usepackage[italian]{babel}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{fourier}
\usepackage{eurosym}
\usepackage{tabularx}
\pagestyle{empty}
\begin{document}

\centering

{\LARGE{\underline{BEVANDE} \\[4pt]
        \color{red}{\underline{DRINKS}}}}

\vspace{.015\textheight}
\begin{tabularx}{\textwidth}{@{}Xr<{ \euro}@{}}
Acqua minerale (500 ml)                     & 1.50 \\
\textcolor{red}{Mineral water (500 ml)} \\
Acqua minerale (1000 ml)                    & 2.50 \\
\textcolor{red}{Mineral water (1000 ml)} \\
Succo di Frutta (Arancia-pesca)             & 3.00 \\
\textcolor{red}{Fruit juice (orange, peach)} \\
Pepsi piccola                               & 3.00 \\
\textcolor{red}{Small pepsi} \\
Pepsi media                                 & 4.00 \\
\textcolor{red}{Medium pepsi} \\
Lattine (coca-fanta-sprite-schweppes-chinò) & 3.00 \\
\textcolor{red}{Can (coca-fanta-sprite-schweppes-chinò)} \\
Thè bottiglie (500 ml, pesca-limone)        & 3.50 \\
\textcolor{red}{Tea bottle (500 ml, peach-lemon)} \\
Birra piccola (200 ml)                      & 3.00 \\
\textcolor{red}{Small draught  beer (200 ml)} \\
Birra media (400 ml)                        & 5.00 \\
\textcolor{red}{Medium draught  beer (400 ml)} \\
Birra Heineken (330 ml)                     & 5.00 \\
Birra Moretti (330 ml)                      & 5.00 \\
Birra  Beck’s  (330 ml)                     & 5.00 \\
Corona extra (330 ml)                       & 5.00 \\
Tenent’s  (330 ml)                          & 6.00 \\
Birra analcolica                            & 5.00 \\
\textcolor{red}{Nonalcoholic beer}
\end{tabularx}

\vfill
{\LARGE{\underline{VINO} \\[4pt]
        \color{red}{\underline{WINE}}}}

\vspace{.015\textheight}
\begin{tabularx}{\textwidth}{@{}Xr<{ \euro}@{}}
Vino della casa (Chianti, 500 ml)                        & 7.50 \\
\textcolor{red}{Wine of the house (Chianti, 500 ml)} \\
Chianti (375 ml)                                         & 9.00 \\
Col di Sasso (375 ml)                                    & 10.00 \\
Le Rime bianco (Chardonnay \& Pinot Grigio) (375 ml)     & 10.00 \\
Rosso Montalcino (375ml)                                 & 18.00 \\
Pinot Rosè (750 ml)                                      & 16.00 \\
Prosecco Brut (750 ml)                                   & 17.00 \\
Le Rime bianco (Chardonnay \& Pinot Grigio) (750 ml)     & 18.00 \\
Col di Sasso (Gabernet Sauvignon \& Sangiovese) (750 ml) & 18.00 \\
Chianti (750 ml)                                         & 16.00 \\
Rosso Montalcino (750 ml)                                & 28.00 \\
Brunello Montalcino (375 ml)                             & 28.00 \\
Brunello Montalcino (750 ml)                             & 48.00
\end{tabularx}
\end{document}
0

I'm not entirely sure what you mean, since when I try your code I get this output:

left margins are all the same

where all the left margins are the same.

If your problem is that the left margin is larger than the right one, that is because the minipages as a whole are indented when they are on a new paragraph (and if you omit \vfill in your code the second minipage "Wine" is not counted as starting a new paragraph and not indented).

If that's indeed what you mean then I suggest using \noindent before the minipages or setting indentation to 0 in the whole document using \setlength{\parindent}{0pt} in the preamble.

This is what your document looks like without indentation:

menu without indentation

  • You're right @TivV, but in the whole document it doesn't work as you can see from the pic that I've uploaded.. – S Moini Oct 14 '18 at 12:36
  • @SMoini Sorry, but we can only debug the input that you show us! We can't guess what was in the rest of the document and somehow know that this was not the first page unless you tell us that! – alephzero Oct 14 '18 at 12:57

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.