summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/xcookybooky
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-03-04 23:39:00 +0000
committerKarl Berry <karl@freefriends.org>2015-03-04 23:39:00 +0000
commit573282f0f4fef0d96cba479ecb98d96e585b9e54 (patch)
treeef69c49aa05a3f4433bcd181fe7ae92db15f7055 /Master/texmf-dist/tex/latex/xcookybooky
parent363972203ff0e9b7cdcc2686cefbe401e392899b (diff)
xcookybooky (4mar15)
git-svn-id: svn://tug.org/texlive/trunk@36435 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/xcookybooky')
-rw-r--r--Master/texmf-dist/tex/latex/xcookybooky/xcookybooky.sty66
1 files changed, 55 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/latex/xcookybooky/xcookybooky.sty b/Master/texmf-dist/tex/latex/xcookybooky/xcookybooky.sty
index 0963e9bca8b..6e6a70fc4a7 100644
--- a/Master/texmf-dist/tex/latex/xcookybooky/xcookybooky.sty
+++ b/Master/texmf-dist/tex/latex/xcookybooky/xcookybooky.sty
@@ -20,7 +20,7 @@
%% LaTeX version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{xcookybooky}
- [2015/02/03 v1.4 Easy typesetting (potentially long) recipes with pictures]
+ [2015/03/03 v1.5 Easy typesetting (potentially long) recipes with pictures]
\newif\ifHandwrittenFont@required
\HandwrittenFont@requiredfalse
\DeclareOption{handwritten}
@@ -319,6 +319,34 @@
}
}{}
+\IfLanguagePatterns{portuguese}
+{% Portuguese
+ \setHeadlines
+ {% translation
+ inghead = Ingredientes,
+ prephead = Prepara\c{c}\~{a}o,
+ hinthead = Dica,
+ continuationhead = Continua\c{c}\~{a}o,
+ continuationfoot = Continua na pr\'{o}xima p\'{a}gina,
+ portionvalue = Por\c{c}\~{o}es,
+ calory = Valor Cal\'{o}rico
+ }
+}{}
+
+\IfLanguagePatterns{brazil}
+{% Portuguese PT-BR
+ \setHeadlines
+ {% translation
+ inghead = Ingredientes,
+ prephead = Prepara\c{c}\~{a}o,
+ hinthead = Dica,
+ continuationhead = Continua\c{c}\~{a}o,
+ continuationfoot = Continua na pr\'{o}xima p\'{a}gina,
+ portionvalue = Por\c{c}\~{o}es,
+ calory = Valor Cal\'{o}rico
+ }
+}{}
+
\define@key{recipelengths}{pictureheight}[6cm]{\def\xcb@pictureheight{#1}}
\define@key{recipelengths}{bigpicturewidth}[0.60\textwidth]{\def\xcb@bigpicturewidth{#1}}
\define@key{recipelengths}{smallpicturewidth}[0.35\textwidth]{\def\xcb@smallpicturewidth{#1}}
@@ -366,15 +394,16 @@
\setkeys{picture}{#1}
}
-\newcommand*{\ingredients}[1]
-{%
+\newcommand*{\ingredients}[2][\empty]
+{% The optional argument contains the number of lines
+ \def\xcb@ingredientslines{#1}
\def\xcb@ingredients
{%
\xcb@name@inghead
\\[1em]
{\xcb@fontsize@ing\color{\xcb@color@ing}
\begin{tabulary}{\xcb@ingredientswidth}{rL}
- #1
+ #2
\end{tabulary}}
}
}
@@ -714,16 +743,31 @@
\xcb@introduction
%% THIRD BLOCK
- \begin{wraptable}{r}{\xcb@ingredientswidth}
- {
- \vspace{-1em} % same height of ingredients and preparation
- \xcb@hook@preingredients
+ \ifthenelse{\equal{\xcb@ingredientslines}{\empty}}%
+ {%
+ \begin{wraptable}{r}{\xcb@ingredientswidth}
+ {% No line number given by the user
+ \vspace{-1em} % same height of ingredients and preparation
+ \xcb@hook@preingredients
- \xcb@ingredients
+ \xcb@ingredients
- \xcb@hook@postingredients
+ \xcb@hook@postingredients
+ }
+ \end{wraptable}
+ }
+ {%
+ \begin{wraptable}[\xcb@ingredientslines]{r}{\xcb@ingredientswidth}
+ {% Use the given line number by the user
+ \vspace{-1em} % same height of ingredients and preparation
+ \xcb@hook@preingredients
+
+ \xcb@ingredients
+
+ \xcb@hook@postingredients
+ }
+ \end{wraptable}
}
- \end{wraptable}
\xcb@hook@prepreparation
\xcb@preparation