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.

It seems to me that there is too much vertical space between individual recipes or between recipe and its hint. Is there a way to make it narrower?

Imgur

MWE:

\documentclass[a4paper]{article}
\usepackage{graphicx}
\usepackage{ifxetex,ifluatex}
\usepackage{xcookybooky}
\usepackage{textcomp}

%%% Fix the setting by xcookybooky
\AtBeginDocument{
  \setRecipenameFont{\familydefault}{\encodingdefault}{b}{n}
}

\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage[czech]{babel}
\else % if luatex or xelatex
  \usepackage{fontspec}
  \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
  \ifluatex
    \usepackage[czech]{babel}
  \fi
  \ifxetex
    \usepackage{polyglossia}
    \setmainlanguage{czech}
  \fi
\fi

\IfFileExists{microtype.sty}{\usepackage{microtype}}{}

\ifxetex
  \usepackage[setpagesize=false, % page size defined by xetex
              unicode=false, % unicode breaks when used with xetex
              xetex]{hyperref}
\else
  \usepackage[unicode=true]{hyperref}
\fi
\hypersetup{linkcolor=black}

%\setromanfont{Georgia}
%\setRecipenameFont{Georgia}{T1}{m}{n}
\setRecipeColors{recipename=black}
\title{Recepty}
\author{Václav Zeman a Ludmila Zemanová}
\date{\today}

\setHeadlines{
  inghead = Ingredience,
  prephead = Příprava,
  hinthead = Tip,
  calory = energetický obsah,
  continuationhead = Pokračování,
  continuationfoot = ...pokračování na další stránce...
}


\begin{document}
\begin{recipe}[
  source = babička Řepská
  ]{Bábovka}
  \ingredients{
    \unit[40]{dkg} & polohrubá mouka \\
    \unit[15]{dkg} & cukr \\
    \unit[10]{dkg} & tuk \\
    \unit[1]{ks} & prášek do pečiva
  }
  \preparation{
    \step Dát do mísy a zadělat mlékem. Těsto musí být hodně řídké.
  }
\end{recipe}

\begin{recipe}[
  bakingtime = 40 minut,
  bakingtemperature = 190~°C
  ]{Bábovka -- bez vajec a bez mléka}
  \ingredients{
    \unit[300]{g} & polohrubá mouka \\
    \unit[150]{g} & moučkový cukr \\
    \unit[100]{g} & Hera nebo máslo \\
    \unit[1]{ks} & vanilkový cukr \\
    \unit[1]{ks} & prášek do pečiva \\
    \unit[150]{ml} & vlažná voda \\
    \unit[1]{hrst} & rozinek a posekaných ořechů
  }
  \preparation{
    \step Smícháme všechny sypké suroviny včetně rozinek a ořechů.   
    \step Přilijeme vodu a vlažný rozpuštěný tuk, důkladně promícháme a nalijeme do vymazané a vysypané formy.
    \step Pečeme při 190~°C asi 40 minut. Zkoušíme špejlí.
  }
\end{recipe}

\begin{recipe}[
  bakingtime = 40 minut,
  bakingtemperature = 190~°C
  ]{Bábovka -- variace předchozího receptu}
  \ingredients{
    \unit[300]{g} & polohrubá mouka \\
    \unit[100]{g} & cukr krystal \\
    \unit[100]{g} & Hera nebo máslo \\
    \unit[1]{ks} & vanilkový cukr \\
    \unit[1]{ks} & prášek do pečiva \\
    \unit[150]{ml} & vlažná voda \\
    \unit[1]{lžíce} & olej \\
    \unit[1]{hrst} & rozinky, nasekané ořechy nebo kandované ovoce
  }
  \preparation{
    \step Smícháme všechny sypké suroviny včetně rozinek a ořechů.   
    \step Přilijeme vodu a vlažný rozpuštěný tuk, důkladně promícháme
    a nalijeme do vymazané a vysypané formy.
    \step Pečeme při 190~°C asi 40 minut. Zkoušíme špejlí.
  }
\end{recipe}

\end{document}
share|improve this question
    
Please add a MWE. –  Marco Daniel Jun 4 '13 at 19:35
    
@MarcoDaniel: Done. –  Václav Zeman Jun 4 '13 at 19:50
    
Looking at the example in the docs, this looks deliberate to me –  Joseph Wright Aug 17 '13 at 15:57

1 Answer 1

If you read page 20 of the xcookybooky manual:

The following command is needed, if more ingredients than preparation (steps) are inserted. In this case the wrapfigure package behaves in a strange way. The result is that the hint is also floating around the ingredients, although the "box" is already closed. This command repairs this effect.

In both your MWE and the screenshot you are showing (I'm saying that, because the two are different) the ingredients are always more than your preparation steps. Indeed, when I tried adding steps, the vertical gap got smaller. Now, I don't really know how to actually add the commands mentioned in the manual, this goes beyond my knowledge, but this should guide you towards the solution (or others may contribute).

share|improve this answer

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.