Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to create a bar menu for a student place I am part of. Now since we are studying CS, mathematics and or physics of course he have to use latex to create our barmenus or drinking lists. An example of a page is given below

enter image description here

Now the question is how to make the process of creating the menu easier. At the moment I am using 'floatrow', to be able to use sidecaptions. What I want to achieve is to have some simple way to write in drinkrecipies and images. The menu should have these features.

  • Left aligned recipies, (Not right as in the image).
  • The blue spacing should be at least 0.5 cm on each side.
  • The red spacing should be as large as possible.
  • The green spacing should be small, but not zero.
  • The ability to have text written in boxes beneath the images.
  • The figures should be aligned vertically

Like shown in the image above =) If I try to change my MWE to avoid the \raggedright of the text, every spacing is inconsistent. I used the floatrow package, but any answer does not need to use this!

\documentclass[12pt,a4paper]{article}

\usepackage[landscape,        
        left=0.1cm,
        right=1cm,
        top=1cm,
        bottom=0cm]{geometry}
\usepackage{microtype,lmodern,fixltx2e}      % Småfikser og typografiske forbedringer
\usepackage{amsfonts,mathtools}               % Matematikk.
\usepackage[utf8]{inputenc}                  % Norske symboler æ,ø,å
\usepackage[norsk]{babel}                    % Norsk innholdsfortegnelse, og overskrifter

\usepackage{caption,subcaption}
\usepackage{floatrow}

\captionsetup[subfigure]{font = large,labelformat=brace,format=hang,justification=rightlast}
\floatsetup[figure]{style=plain}
\floatsetup[subfigure]{heightadjust=all,framearound=all,capbesideposition={left,center},capbesidesep=none}

\newcommand\rightlast{\leftskip0ptplus1fil
\rightskip0ptplus-1fil\parfillskip0ptplus1fil}
\DeclareCaptionJustification{rightlast}{\rightlast}

\begin{document}
\centering

\thisfloatsetup{capposition=beside,capbesideposition={left,center},
capbesidewidth=5cm} 
%
\section*{\LARGE $\mathbb{R}$ealfagskjelleren - Barkart - Side 1}
%
\vspace*{0.5cm}
%
\begin{figure}[H]
\ffigbox
    {\begin{subfloatrow}
        \fcapside[\FBwidth+2cm]{\caption*{%
        \textbf{\Large Sure Føtter} \\ 
                 Cointreau:  2 cl  \\
              Jägermeister:  2 cl  \\
                      Lime:  2 cl  \\ 
                 Coca Cola:\phantom{   2 cl} \\
                                   \\
                      Pris: 35 kr}  
        }{\includegraphics[scale=0.33]{SureFotter.jpg}}
        \fcapside[\FBwidth+2cm]{\caption*{%
        \textbf{\Large Kvit Russer}\\
                     Vodka:  2 cl  \\
            Kahlua/Amarula:  2 cl  \\
                     Fløte:  2 cl  \\ 
                                   \\
                      Pris: 35 kr} 
        }{\includegraphics[scale=0.125]{WhiteRussian.jpg}}

        \fcapside[\FBwidth+2cm]{\caption*{
        \textbf{\Large Crocodile}\\
                 Lys Rom:  2 cl  \\
                  Midori:  2 cl  \\
                    Lime:\phantom{   2 cl} \\
                  Sprite:\phantom{   2 cl} \\
                                 \\
                      Pris: 35 kr}      
        }{\includegraphics[scale=0.33]{Crocodile2.jpg}}
    \end{subfloatrow}   

    \renewlengthtocommand\settowidth\Mylen{100000\subfloatrowsep}\vskip\Mylen

    \begin{subfloatrow}
        \fcapside[\FBwidth+2cm]{{\caption*{
        \textbf{\Large Silver Salute}\\
                 Vodka:  1 cl  \\
             Cointreau:  2 cl  \\
              Blå Bols:  3 cl  \\
                                 \\
                      Pris: 40 kr}  
        }}{\includegraphics[scale=0.85]{SilverSalute2.jpg}}
        \fcapside[\FBwidth+2cm]{\caption*{
        \textbf{\Large Majoren}\\
          Captain Morgan:  2 cl  \\
            Jägermeister:  2 cl  \\
               Ingefærøl:\phantom{   2 cl} \\
                  Sitron:\phantom{   2 cl} \\
                                 \\
                      Pris: 35 kr}      
        }{\includegraphics[scale=0.35]{Major3.jpg}}
        \fcapside[\FBwidth+2cm]{\caption*{
        \textbf{\Large EPIC}    \\
               Baccardi:  2 cl  \\
               Blå bols:  1 cl  \\
            Mickey Finn:  1 cl  \\
                 Passoã:  1 cl  \\
                  Sprite:\phantom{   2 cl} \\
                                 \\
                      Pris: 40 kr}          
        }{\includegraphics[scale=0.15]{EPIC3.jpg}\hspace*{10cm}}%
    \end{subfloatrow}}

\end{figure}
\end{document}

Like I said, I have no idea how to get consistent spacings using the floatrow package. But if the menu can be created easier using another package, and offer consistent spacing I am all for that =) The floatrow-package have too many options.

The images used

share|improve this question
    
Why did you add a bounty? –  Marco Daniel Apr 14 '13 at 12:17

1 Answer 1

up vote 16 down vote accepted
+300

Here's one possibility. Since your images must go in specific places, I think that it's better not to use floating environments. I propose a different approach, using boxes (in this case, minipages) to place the information:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[norsk]{babel}   
\usepackage[landscape,        
        left=1.5cm,
        right=1cm,
        top=3cm,
        bottom=0cm]{geometry}
\usepackage{graphicx}
\usepackage{microtype,fixltx2e}
\usepackage{fourier}
\usepackage{tikz}
\usepackage{etoolbox}

\newtoggle{client}

\newsavebox\mybox

\newcommand\tikzmark[1]{%
  \tikz[remember picture,overlay] \coordinate (#1);}

\colorlet{framecolor}{cyan!80!black}% color for frames (clients version)
\colorlet{ingrcolor}{orange!80!black}% color for frames around directions (bartenders version)

\setlength\parindent{0pt}

\newlength\framewd
\newlength\frameht
\newlength\legendwd
\newlength\descht
\newlength\imagewd
\newlength\rowsep% vertical spacing between rows
\setlength\framewd{7cm}% width of each frame
\setlength\legendwd{4cm}% with for ingredients
\setlength\imagewd{3cm}% width for image
\setlength\frameht{4.5cm}% height of the frame, without directions
\setlength\descht{1.5cm}% height of box for directions

\newcommand\framecon[5]{%
\begin{minipage}[t][\frameht][t]{\framewd}
\begin{minipage}[c][\frameht][t]{\framewd}
\begin{minipage}[c][\frameht][t]{\legendwd}
\vfill
{\bfseries\Large#1}\par\bigskip
\begin{tabular}{@{}r@{:\ }l@{}} 
  #2
  \multicolumn{2}{c}{} \\ 
  \fritem{Pris}{#3}
\end{tabular}%
\end{minipage}%
\begin{minipage}[c][\frameht][c]{\imagewd}
  \vfill
  \includegraphics[width=3cm]{#4}
\end{minipage}%
\end{minipage}%
\begin{lrbox}{\mybox}
  \begin{minipage}[c][\descht][t]{\dimexpr\framewd-20pt\relax}
  #5
  \end{minipage}%
\end{lrbox}%
\iftoggle{client}
  {}
  {\par\bigskip
    \tikz[remember picture]
    \node[rectangle,draw=ingrcolor,ultra thick,rounded corners,inner sep=8pt] 
      {\usebox\mybox};%
  }%
\par\vskip20pt\mbox{}\hfill\tikzmark{b}%
\end{minipage}%
\iftoggle{client}
  {%
  \begin{tikzpicture}[remember picture, overlay]
  \draw[rounded corners=8pt,line width=1.5pt,draw=framecolor]
  (b) -|
  ([xshift=\the\dimexpr-\framewd-1em\relax,yshift=\the\dimexpr\frameht+\descht\relax]b);
  \end{tikzpicture}
  }%
  {}
}

\newcommand\fritem[2]{#1&#2\\}

\begin{document}

\settoggle{client}{false}% for the bartender
%\settoggle{client}{true}% for the clients
\iftoggle{client}{\setlength\rowsep{6cm}}{\setlength\rowsep{3cm}}

\framecon{Sure Føtter}{%
  \fritem{Cointreau}{2 cl}
  \fritem{Jägermeister}{2 cl}
  \fritem{Lime}{2 cl}
  \fritem{Coca Cola}{}}{35kr}{11}{%
Shake vodka og likør med is i en cocktail shaker. -- Si til et højt glas med et par isterninger. -- Fyld op med orange juice.}\hfill
\framecon{Kvit Russer}{%
  \fritem{Vodka}{2 cl}
  \fritem{Kahlua/Amarula}{2 cl}
  \fritem{Fløte}{2 cl}}{35 kr}{12}{%
Alle ingredienser unntatt epleskive ristes godt i en shaker med knust is. -- Siles og serveres i et avkjølt cocktailglass. -- Pyntes med epleskive.}\hfill 
\framecon{Crocodile}{%
  \fritem{Lys Rom}{2 cl}
  \fritem{Midori}{2 cl}
  \fritem{Lime}{}
  \fritem{Sprite}{}}{35 kr}{13}{%
Shake vodka og likør med is i en cocktail shaker. -- Si til et højt glas med et par isterninger. -- Fyld op med orange juice.}

\vspace{\rowsep}

\framecon{Silver Salute}{%
  \fritem{Vodka}{1 cl}
  \fritem{Cointreau}{2 cl}
  \fritem{Blå Bols}{3 cl}}{40 kr}{21}{%
Alle ingredienser unntatt mørk rom ristes godt i en shaker med knust is. -- Serveres i et avkjølt collinsglass. -- Mørk rom helles forsiktig øverst i glasset. -- Pyntes med limeskive.}\hfill 
\framecon{Majoren}{%
  \fritem{Vodka}{1 cl}
  \fritem{Cointreau}{2 cl}
  \fritem{Blå Bols}{3 cl}}{40 kr}{22}{%
Alle ingredienser unntatt mørk rom ristes godt i en shaker med knust is. -- Serveres i et avkjølt collinsglass. -- Mørk rom helles forsiktig øverst i glasset. -- Pyntes med limeskive.}\hfill 
\framecon{Epic}{%
  \fritem{Baccardi}{2 cl}
  \fritem{Blå bols}{1 cl}
  \fritem{Mickey Finn}{1 cl}
  \fritem{Passoã}{1 cl}
  \fritem{Sprite}{}}{40 kr}{23}{%
Alle ingredienser unntatt mørk rom ristes godt i en shaker med knust is. -- Serveres i et avkjølt collinsglass. -- Mørk rom helles forsiktig øverst i glasset. -- Pyntes med limeskive.} 

\end{document}

The version for the clients (without preparation directions):

enter image description here

and simply by setting the toggle to false, you get the version for bartenders (with preparation directions):

enter image description here

How the code works

  • The main command is \framecon with five mandatory arguments:

    \framecon{<name>}{<ingredients>}{<price>}{<image-file>}{<prep. directions>}
    
  • To write the ingredients, an additional \fitem command was defined:

    \fritem{<ingredient>}{<quantity>}
    

    So, for example, the entry for "EPIC" in my example is:

    \framecon{Epic}{%
      \fritem{Baccardi}{2 cl}
      \fritem{Blå bols}{1 cl}
      \fritem{Mickey Finn}{1 cl}
      \fritem{Passoã}{1 cl}
      \fritem{Sprite}{}}{40 kr}{23}{%
    Alle ingredienser unntatt mørk rom ristes godt i en shaker med knust is. -- Serveres i et avkjølt collinsglass. -- Mørk rom helles forsiktig øverst i glasset. -- Pyntes med limeskive.} 
    
  • Setting the client toggle to true, the clients version is produced, and setting it to false, one gets the bartenders' version.

For less than four images per row, one could insert \hfills to produce the desired alignment:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[norsk]{babel}   
\usepackage[landscape,        
        left=1.5cm,
        right=1cm,
        top=3cm,
        bottom=0cm]{geometry}
\usepackage{graphicx}
\usepackage{microtype,fixltx2e}
\usepackage{fourier}
\usepackage{tikz}
\usepackage{etoolbox}

\newtoggle{client}

\newsavebox\mybox

\newcommand\tikzmark[1]{%
  \tikz[remember picture,overlay] \coordinate (#1);}

\colorlet{framecolor}{cyan!80!black}% color for frames (clients version)
\colorlet{ingrcolor}{orange!80!black}% color for frames around directions (bartenders version)

\setlength\parindent{0pt}

\newlength\framewd
\newlength\frameht
\newlength\legendwd
\newlength\descht
\newlength\imagewd
\newlength\rowsep% vertical spacing between rows
\setlength\framewd{7cm}% width of each frame
\setlength\legendwd{4cm}% with for ingredients
\setlength\imagewd{3cm}% width for image
\setlength\frameht{4.5cm}% height of the frame, without directions
\setlength\descht{1.5cm}% height of box for directions

\newcommand\framecon[5]{%
\begin{minipage}[t][\frameht][t]{\framewd}
\begin{minipage}[c][\frameht][t]{\framewd}
\begin{minipage}[c][\frameht][t]{\legendwd}
\vfill
{\bfseries\Large#1}\par\bigskip
\begin{tabular}{@{}r@{:\ }l@{}} 
  #2
  \multicolumn{2}{c}{} \\ 
  \fritem{Pris}{#3}
\end{tabular}%
\end{minipage}%
\begin{minipage}[c][\frameht][c]{\imagewd}
  \vfill
  \includegraphics[width=3cm]{#4}
\end{minipage}%
\end{minipage}%
\begin{lrbox}{\mybox}
  \begin{minipage}[c][\descht][t]{\dimexpr\framewd-20pt\relax}
  #5
  \end{minipage}%
\end{lrbox}%
\iftoggle{client}
  {}
  {\par\bigskip
    \tikz[remember picture]
    \node[rectangle,draw=ingrcolor,ultra thick,rounded corners,inner sep=8pt] 
      {\usebox\mybox};%
  }%
\par\vskip20pt\mbox{}\hfill\tikzmark{b}%
\end{minipage}%
\iftoggle{client}
  {%
  \begin{tikzpicture}[remember picture, overlay]
  \draw[rounded corners=8pt,line width=1.5pt,draw=framecolor]
  (b) -|
  ([xshift=\the\dimexpr-\framewd-1em\relax,yshift=\the\dimexpr\frameht+\descht\relax]b);
  \end{tikzpicture}
  }%
  {}
}

\newcommand\fritem[2]{#1&#2\\}

\begin{document}

\settoggle{client}{false}% for the bartender
%\settoggle{client}{true}% for the clients
\iftoggle{client}{\setlength\rowsep{6cm}}{\setlength\rowsep{3cm}}

\hfill\framecon{Sure Føtter}{%
  \fritem{Cointreau}{2 cl}
  \fritem{Jägermeister}{2 cl}
  \fritem{Lime}{2 cl}
  \fritem{Coca Cola}{}}{35kr}{11}{%
Shake vodka og likør med is i en cocktail shaker. -- Si til et højt glas med et par isterninger. -- Fyld op med orange juice.}\hfill
\framecon{Kvit Russer}{%
  \fritem{Vodka}{2 cl}
  \fritem{Kahlua/Amarula}{2 cl}
  \fritem{Fløte}{2 cl}}{35 kr}{12}{%
Alle ingredienser unntatt epleskive ristes godt i en shaker med knust is. -- Siles og serveres i et avkjølt cocktailglass. -- Pyntes med epleskive.}\hfill\null

\vspace{\rowsep}

\hfill\framecon{Silver Salute}{%
  \fritem{Vodka}{1 cl}
  \fritem{Cointreau}{2 cl}
  \fritem{Blå Bols}{3 cl}}{40 kr}{21}{%
Alle ingredienser unntatt mørk rom ristes godt i en shaker med knust is. -- Serveres i et avkjølt collinsglass. -- Mørk rom helles forsiktig øverst i glasset. -- Pyntes med limeskive.}\hfill 
\framecon{Majoren}{%
  \fritem{Vodka}{1 cl}
  \fritem{Cointreau}{2 cl}
  \fritem{Blå Bols}{3 cl}}{40 kr}{22}{%
Alle ingredienser unntatt mørk rom ristes godt i en shaker med knust is. -- Serveres i et avkjølt collinsglass. -- Mørk rom helles forsiktig øverst i glasset. -- Pyntes med limeskive.}\hfill\null

\end{document}

enter image description here

share|improve this answer
    
I like it so far! Thanks a bunch for your answer =) 2cl: Vodka, 2 cl: Kahlua, and so forth^^ Any reason why the text in tabular mode does not look as pleasing as the text in caption? The green squares are not supposed to be descriptions but information to the bartenders on how to mix the drinks. So we really are aiming to have two sets of menu's. One in front and one behind the bar =) –  N3buchadnezzar Apr 12 '13 at 14:42
    
@N3buchadnezzar I've updated my answer with an improved version; in particular, using a simple toggle you get two different versions: one for the clients, the other one for the bartenders. –  Gonzalo Medina Apr 12 '13 at 16:42
    
I really like it! But how are one to account for large images? (A dirty fix will suffice for me) i.imgur.com/dKhRfqz.jpg i.imgur.com/2L55Qwx.jpg oh, and how do I handle pages with less than 3 images? (say 2:2) –  N3buchadnezzar Apr 13 '13 at 13:07
    
I figured out all of these things on my own =D The only problem remaining is to center the figures when there are less than 4 images on each row. –  N3buchadnezzar Apr 13 '13 at 13:39
    
@N3buchadnezzar please see my updated answer. Is it something like that what you want? –  Gonzalo Medina Apr 13 '13 at 22:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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