Missing control sequence inserted. \end{tabulary} error in revtex4-2 template aps - latex

I am writing a paper in APS journal template : revtex4-2, when I import my table I have this error :
Missing control sequence inserted. \end{tabulary}. But this table has no problem in other template for example IEEE. I dont know how fix it. I really appreciate any help.
\documentclass[aps,pra,twocolumn,floatfix,footinbib,notitlepage,superscriptaddress,groupaddress,showpacs]{revtex4-2}
\usepackage{graphicx,graphics,times,bm,bbm,bbold,amssymb,amsmath,amsfonts,dsfont,hyperref,mathrsfs,color,caption,subcaption,cancel}
\usepackage{adjustbox}
\usepackage{tabularx}
\usepackage{tabulary}
\usepackage{graphicx}% Include figure files
\usepackage{dcolumn}% Align table columns on decimal point
\usepackage{bm}
\begin{document}
\preprint{AIP/123-QED}
%\title[Sample title]{Sample Title:\\with Forced Linebreak\footnote{Error!}}% Force line breaks with \\
\title[]
\author{}
\affiliation{}
\author{}
\affiliation{}
\email{}
\date{\today}
\begin{abstract}
\end{abstract}
% \keywords{}
% \maketitle
\section{Introduction}\label{sec:introduction}
\section{Theoretical Analysis}
\begin{table}[h!]
\centering
\caption{List of Parameters Values }
\label{table:1}
\begin{adjustbox}{max width=8.5 cm}
\begin{tabulary}{\columnwidth}{#{}llr#{}}
\toprule
\textbf{Parameters} & \textbf{Values} & \textbf{Units}\\
\midrule
$\lambda$ & 1550 & $nm$ \\
\bottomrule
\end{tabulary}
\end{adjustbox}
\end{table}.
\end{document}
%
% ****** End of file aipsamp.tex ******

I suggest the new and much more flexible tabularray package instead.
Also don't scale content which contains text, this will result in an suboptimal result. If in your real document, you must make the table smaller, use a smaller font size instead of scaling it with adjustbox.
(you should really clean up your preamble and remove duplicates and outdated packages)
\documentclass[aps,pra,twocolumn,floatfix,footinbib,notitlepage,superscriptaddress,groupaddress,showpacs]{revtex4-2}
\usepackage{graphicx,graphics,times,bm,bbm,bbold,amssymb,amsmath,amsfonts,dsfont,hyperref,mathrsfs,color,caption,subcaption,cancel}
\usepackage{adjustbox}
\usepackage{tabularx}
\usepackage{tabulary}
\usepackage{graphicx}% Include figure files
\usepackage{dcolumn}% Align table columns on decimal point
\usepackage{bm}
\usepackage{tabularray}
\UseTblrLibrary{booktabs}
\begin{document}
\preprint{AIP/123-QED}
%\title[Sample title]{Sample Title:\\with Forced Linebreak\footnote{Error!}}% Force line breaks with \\
\title[]
\author{}
\affiliation{}
\author{}
\affiliation{}
\email{}
\date{\today}
\begin{abstract}
\end{abstract}
% \keywords{}
% \maketitle
\section{Introduction}\label{sec:introduction}
\section{Theoretical Analysis}
\begin{table}[h!]
\centering
\caption{List of Parameters Values }
\label{table:1}
% \begin{adjustbox}{max width=8.5 cm}
\begin{tblr}{width=0.8\linewidth,colspec={#{}X[l]X[l]X[r]#{}}}
\toprule
\textbf{Parameters} & \textbf{Values} & \textbf{Units}\\
\midrule
$\lambda$ & 1550 & $nm$ \\
\bottomrule
\end{tblr}
% \end{adjustbox}
\end{table}
\end{document}
%
% ****** End of file aipsamp.tex ******

Related

How to decrease header level in Overleaf for table of figures + tables?

I'm trying to figure out how to change my list of figures and tables so it refers to figures and tables on a section level. My document type is article in overleaf.
My current code looks as follows:
\documentclass{article}
\begin{document}
\maketitle
\section{Abstract}
\newpage
\tableofcontents
\newpage
\addcontentsline{toc}{section}{\listfigurename}
\listoffigures
\newpage
\addcontentsline{toc}{section}{\listtablename}
\listoftables
\newpage
\section{Introduction}
\section{3}
\section{4}
\begin{table}[H]
\renewcommand{\arraystretch}{2}
\centering
\begin{tabular}{ p{6cm}p{6cm}}
\toprule
\textbf{Variables} & \textbf{Description} \\ \midrule
\textit{F\_27608, R\_27730} & The amount of cheese and yogurt ordered weekly. \\
\textit{Year} & Year of the observation. \\
\textit{Winter, Spring, Summer, Autumn} & Season of the observation. \\
\textit{Week} & Week of the observation. \\
\textit{Lag1, Lag2, Lag3, Lag4, Lag5} & Lagged order amounts for prior periods. \\
\textit{Price} & Mean price of the product for the specific observation. \\
\textit{Fut1, Fut2, Fut3, Fut4, Fut5} & Future price of the product. \\
\textit{PromoScale} & Level of expected increase in orders caused by promotion. \\
\textit{PromoScale(L1, L2, L3)} & Lagged PromoScale values for prior periods \\
\textit{PromoScale(F1, F2, F3)} & Future PromosSale values. \\ \bottomrule
\end{tabular}
\caption{Feature space cheese and yogurt}
\end{table}
See picture:
List of tables
How do i make it so that these tables say 4.1 and 4.2 in the list of tables? (the code only shows one table for reference)
You can use \counterwithin{figure}{section} to number a counter within a section:
\documentclass{article}
\counterwithin{figure}{section}
\counterwithin{table}{section}
\begin{document}
\section{Abstract}
\newpage
\tableofcontents
\newpage
\addcontentsline{toc}{section}{\listfigurename}
\listoffigures
\newpage
\addcontentsline{toc}{section}{\listtablename}
\listoftables
\newpage
\section{Introduction}
\section{3}
\section{4}
\begin{table}[htbp]
\caption{Feature space cheese and yogurt}
\end{table}
\end{document}

Underline Rows in Only One Column of Multirow Multicolumn Table with ONLY Two Columns

I am trying to make a multicolumn, multirow table with two columns and 5 rows. I want each row in the second column only underlined. Obviously, \bottomrule underlines both columns, as does \hline. \hline also throws a \noalign error. Neither \cline{2-2}, \cline{2-3}, nor \cline{2} work. Both \cline{2-2} and \cline{2} underline both columns, and \cline{2-3} throws an Extra alignment tab error.
I have tried many different package combinations without luck, and I want the final document to be simple for school teachers to use (Grades 1 - 12.)
\documentclass[12pt]{article}
\usepackage[text={7.25in,10in}]{geometry}
\usepackage{multirow}
\usepackage[latin1]{inputenc}
\usepackage[pdftex]{hyperref}
%------------------------------%
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{float}
\usepackage{array}
\begin{document}
\begin{table}[H]
\begin{tabular}{ll}
\toprule
\multicolumn{2}{l}{Learning Standard(s): }\begin{minipage}{5.5in} CCSS # \end{minipage}\\
\bottomrule
\multicolumn{2}{l}{Lesson Objective(s): }\begin{minipage}{5.5in}\par The learner will be able to . . . \end{minipage}\\
\bottomrule
%------problem begins here-----
\multicolumn{2}{l|}{\multirow{5}{*}{\rotatebox{90}{Lesson Activities}}}\begin{minipage}
{6in}Demonstration:\end{minipage}\\
\multicolumn{2}{l|}{}\begin{minipage}{6in}Guided Practice: \end{minipage}\\
\multicolumn{2}{l|}{}\begin{minipage}{6in}Individual Practice:\end{minipage}\\
\multicolumn{2}{l|}{}\begin{minipage}{6in}Formative Assessment: \end{minipage}\\
\multicolumn{2}{l|}{}\begin{minipage}{6in}Other/Notes: \end{minipage}\\
%-----problem ends here-----
\toprule
\multicolumn{2}{l}{Lesson Resources: }\begin{minipage}{5.5in} \end{minipage}\\
\bottomrule
\multicolumn{2}{l}{Lesson Close: }\begin{minipage}{5.5in} \end{minipage}\\
\bottomrule
\end{tabular}
\end{table}
\end{document}
I am expecting something like the following.
_______________________
| |_______________|
| |_______________|
| |_______________|
| |_______________|
|_____|_______________|
you must not use # in your table without escaping it
latin1 input encoding is most probably wrong. Double check if your file really is encoded in latin1, this would be very unusual this century
don't specify a driver to hyperref - in the best case it is unnecessary because hyperref will automatically detect it, in all other case it will simply be wrong
if you want to have the rule only in one column, then you should actually use more than one column and not bake everything together into a single column
have a look at the tabularray package, this would make your table way less painful
\documentclass[12pt]{article}
\usepackage[text={7.25in,10in}]{geometry}
\usepackage{multirow}
%\usepackage[latin1]{inputenc}
\usepackage[]{hyperref}
%------------------------------%
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{float}
\usepackage{array}
\begin{document}
\begin{table}[H]
\begin{tabular}{p{1in}l}
\toprule
\multicolumn{2}{l}{Learning Standard(s): }\begin{minipage}{5.5in} CCSS \# \end{minipage}\\
\bottomrule
\multicolumn{2}{l}{Lesson Objective(s): }\begin{minipage}{5.5in}\par The learner will be able to . . . \end{minipage}\\
\bottomrule
%------problem begins here-----
\multirow{5}{*}{\rotatebox{90}{Lesson Activities}} & Demonstration:\\ \cmidrule{2-2}
& Guided Practice: \\ \cmidrule{2-2}
& Individual Practice:\\ \cmidrule{2-2}
& Formative Assessment: \\ \cmidrule{2-2}
& Other/Notes: \\
%-----problem ends here-----
\toprule
\multicolumn{2}{l}{Lesson Resources: }\begin{minipage}{5.5in} \end{minipage}\\
\bottomrule
\multicolumn{2}{l}{Lesson Close: }\begin{minipage}{5.5in} \end{minipage}\\
\bottomrule
\end{tabular}
\end{table}
\end{document}

LaTeX booktabs horizontal oveflow

I am new to LaTeX and I want to create a quite simple table (in german). As you can see in my code, it has to contain 5 rows and 5 columns. My problem is that the table is too large for my page and it overflows on the right side of the page. I don't want to rotate the table, so it should use hyphenation to use the given space better.
\documentclass[12pt]{article}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{color}
\usepackage[a4paper,lmargin={3cm},rmargin={2cm},
tmargin={2cm},bmargin = {2cm}]{geometry}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{graphicx}
\usepackage{csquotes}
\usepackage{mathptmx}
\usepackage{booktabs}
\MakeOuterQuote{"}
\linespread{1.5}
\begin{document}
\end{document}
\begin{table}[h]
\centering
\caption{Übersicht aller Umfragen zur Landtagswahl in Sachsen-Anhalt im April/Mai 2021.}
\begin{tabular}{l l l l l}
\toprule
Durchgeführt von:
& Erhebungszeitraum
& Datum der Veröffentlichung
& Erhebungsmethode(n)
& Veröffentlicht von:\\
\midrule
infratest dimap
& 16. – 21.April 2021
& 23.April 2021
& zufallsbasierte Telefon- und Onlineinterviews
& mrd.de \\
Forsa
& 20. – 27.April 2021
& 29.April 2021
& k.A.
& welt.de \\
Insa
& 17. – 23.Mai 2021
& 26.Mai 2021
& k.A.
& bild.de \\
infratest dimap
& 25. – 26.Mai 2021
& 27. Mai 2021
& zufallsbasierte Telefon- und Onlineinterviews
& tagesschau.de \\
Mannheimer Forschungsgruppe Wahlen
& 25. – 27.Mai 2021
& 28.Mai 2021
& zufallsbasierte Telefoninterviews
& zdf.de \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
I think a similar problem is described here, but to be honest; my table is much simpler (no multicolumns and no math-symbols), so I have some problems to find the right code to solve my problem.
Thank you very much for reading my question! :)
To get line breaks you'll need a column type of fixed with, e.g. p{<some width>} or you can use the tabularx package to automatically determine the width of the columns.
However even with line breaks, the table will still look awfully crowded. You can safe a bit more space by giving the months as numbers instead of words and adding #{} before/after the first/last column.
\documentclass[12pt]{article}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{color}
\usepackage[a4paper,lmargin={3cm},rmargin={2cm},
tmargin={2cm},bmargin = {2cm}]{geometry}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{graphicx}
\usepackage{csquotes}
\usepackage{mathptmx}
\usepackage{booktabs}
\usepackage{tabularx}
\MakeOuterQuote{"}
\linespread{1.5}
\begin{document}
\begin{table}[h]
\centering
\caption{Übersicht aller Umfragen zur Landtagswahl in Sachsen-Anhalt im April/Mai 2021.}
\begin{tabularx}{\linewidth}{#{} *5{>{\raggedright\arraybackslash}X} #{}}
\toprule
Durchgeführt von:
& Erhebungs\-zeitraum
& Datum der Veröffentlichung
& Erhebungs\-methode(n)
& Veröffentlicht von:\\
\midrule
infratest dimap
& 16. – 21.4.2021
& 23.4.2021
& zufallsbasierte Telefon- und Onlineinterviews
& mrd.de \\
Forsa
& 20.–27.4.2021
& 29.4.2021
& k.A.
& welt.de \\
Insa
& 17.–23.5.2021
& 26.5.2021
& k.A.
& bild.de \\
infratest dimap
& 25.–26.5.2021
& 27.5.2021
& zufallsbasierte Telefon- und Onlineinterviews
& tagesschau.de \\
Mannheimer Forschungsgruppe Wahlen
& 25.–27.5.2021
& 28.5.2021
& zufallsbasierte Telefoninterviews
& zdf.de \\
\bottomrule
\end{tabularx}
\end{table}
\end{document}

Making a letter head for certificate page of thesis

I am trying to make a letter head to make a certificate to put in a thesis. I have posted the MWE below.
There are 2 issues I need help with
The cell alignment of the letterhead, is not proper. I am not sure how to correct it.
I need the double lines to be in red colour, I wasn't able to get it.
The final output should be something like this image
enter image description here
\documentclass[12 pt,a4 paper]{article}
\usepackage[top=1cm,left=1in,right=1 in,bottom=1in]{geometry}
\usepackage{times}
\usepackage{graphicx}
\usepackage{marvosym}
\usepackage[onehalfspacing]{setspace}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{fancyhdr}
\usepackage{xcolor}
\pagestyle{fancy}
\usepackage{multirow}
\fancyhf{}
\noindent
\makebox[0pt][l]{\rule[.7ex]{\linewidth}{#1}}%
\rule[.3ex]{\linewidth}{#1}}
\begin{document}
\pagestyle{empty}
\vspace{12 mm}
\begin{tabular}{c c c}
\multicolumn{1}{r}{{\Large Bangalore}} & \multirow{1}{*}{\includegraphics[width=0.175\linewidth]{BUB_Emblem}} & \multicolumn{1}{l}{{\Large University}}\\
%\multicolumn{1}{r}{\Huge{Bangalore}} & \multirow{1}{*}{\includegraphics[width=0.15\linewidth]{BUB_Emblem}} & \multicolumn{1}{l}{\Huge{University}}\\
\large{Dr Vijaykumar H Doddamani} & & \multicolumn{1}{l}{Department of Physics} \\
\multicolumn{1}{r}{M.Sc., M. Phil., PhD} && \multicolumn{1}{l}{Ph. Off: 080-22961471/84} \\
&&\multicolumn{1}{l}{Fax: 080-23219295}\\
\multicolumn{1}{l}{\textbf{\large Professor}} & & \multicolumn{1}{l}{Mobile : 9481300346} \\
\multicolumn{1}{l}{Email: drvkd#gmail.com} & Jnanabharathi Campus & \multicolumn{1}{l}{Mobile : 9448673274} \\
\multicolumn{1}{r}{profvijaykumarhd#bub.ernet.in} & Bengaluru - 560 056 & \multicolumn{1}{l}{WhatsApp :9741716744} \\
%
\end{tabular}
\vskip2mm
\vspace{2mm}
\doublerule[1pt]
\end{document}
With this code, This is the output I am getting.
enter image description here
I have put in the arrows and comments in this imagearrows and comments for width alinment
\documentclass[12 pt,a4 paper]{article}
\usepackage[top=1cm,left=1in,right=1 in,bottom=1in]{geometry}
\usepackage[table]{xcolor}
\usepackage{times}
\usepackage{graphicx}
\usepackage{marvosym}
\usepackage[onehalfspacing]{setspace}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{multirow}
\fancyhf{}
\newcommand{\doublerule}[1][.4pt]{%
\noindent%
\makebox[0pt][l]{\rule[.7ex]{\linewidth}{#1}}%
\rule[.3ex]{\linewidth}{#1}}
\begin{document}
\pagestyle{empty}
\vspace{12 mm}
\centerline{%
\makebox[\paperwidth]{%
\begin{tabular}{#{\hspace{.08\paperwidth}} p{.32\paperwidth} p{.2\paperwidth} p{.32\paperwidth} #{\hspace{.08\paperwidth}} }
\multicolumn{1}{#{}r#{}}{\Large Bangalore} & \centering\multirow{1}{*}{\includegraphics[width=.9\linewidth]{example-image-duck}} & \Large University\\
\multicolumn{1}{#{}r#{}}{\large Dr Vijaykumar H Doddamani} & & Department of Physics\\
\multicolumn{1}{#{}r#{}}{M.Sc., M. Phil., PhD} && Ph. Off: 080-22961471/84 \\
&&Fax: 080-23219295\\
\textbf{\large Professor} & & Mobile : 9481300346 \\
Email: drvkd#gmail.com & \centering Jnanabharathi Campus & Mobile : 9448673274 \\
\hphantom{Email:} profvijaykumarhd#bub.ernet.in & \centering Bengaluru - 560 056 & WhatsApp :9741716744 \\[2mm]
\arrayrulecolor{red}\hline\hline
\end{tabular}%
}}
\end{document}

Using xcookybooky in LaTeX, I have many ingredients, but it does go into the next page

I'm trying to write a recipe in LaTeX using xcookybooky. The current recipe (lasagne) has way too many ingredients, and it cannot fit in one page. Unfortunately, the ingredient list does not split over two pages, the text simply goes out of the page.
The LaTeX code in and of itself is simply a very long ingredients list made in a recipe environment.
Does anyone know how to fix this?
Thanks
Edit: I see the picture I was trying to add did not appear. Instead I'll copy some of the code in. This compiles as it should for me, although the ingredients list still goes out of the page.
\documentclass[
a4paper,
11pt
]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{lmodern}
\usepackage[ngerman, english]{babel}
\usepackage{textcomp}
\usepackage{gensymb}
\usepackage{nicefrac}
\usepackage[
nowarnings,
]
{xcookybooky}
\DeclareRobustCommand{\textcelcius}{\ensuremath{^{\circ}\mathrm{C}}}
\setcounter{secnumdepth}{1}
\renewcommand*{\recipesection}[2][]
{
\subsection[#1]{#2}
}
\renewcommand{\subsectionmark}[1]
{
}
\usepackage{hyperref}
\begin{document}
\begin{recipe}
[%
preparationtime = {\unit[1]{h}},
bakingtime={\unit[20-25]{min}},
bakingtemperature={\protect\bakingtemperature{
fanoven=\unit[175]{\textcelcius}}},
portion = {\portion{6}},
]
{Spinach Lasagne}
\graph
{
%small=Recipes/MainCourses/BBQChicken/Small.jpg,
big=Recipes/Vegetarian/SpinachLasagne/Big.jpg
}
\ingredients
{
\textbf{Sauce}\\
2 & chopped onions\\
\unit[2]{tbsp} & Olive oil\\
3 & chopped cloves of garlic\\
\unit[2]{tsps} & dried thyme\\
4 & grated carrots\\
3 & grated celery leaves\\
1 & grated squash\\
1 & grated aubergine\\
\unit[250]{g} & mushrooms\\
\unit[1]{dL} & tomato paste\\
\unit[1]{can} & chopped tomatoes\\
To taste & salt and pepper\\
\\
\textbf{Spinach}\\
\unit[500]{g} & frozen spinach\\
\unit[1]{dL} & cream\\
1 & onion\\
1 & clove of garlic\\
\unit[2]{tbsp} & oil\\
To taste & salt \& pepper \& fresh basil\\
\\
\textbf{Mornay}\\
\unit[2]{tbsp} & butter\\
\unit[2]{tbsp} & flour\\
\unit[3]{dL} & milk\\
\unit[125]{g} & fresh mozzarella\\
To taste & salt \& pepper \& nutmeg\\
\\
\unit[250]{g} & Lasagne plates\\
Enough & mozzarella
}
\end{recipe}
\end{document}
It is documented in the xcookybooky manual that lines breaks within the ingredients list are not possible due to technical reasons.
However you could temporarily reimplement the recipe and ingredients macros like this:
\documentclass[
a4paper,
11pt
]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{lmodern}
\usepackage[ngerman, english]{babel}
\usepackage{textcomp}
\usepackage{gensymb}
\usepackage{paracol}
\usepackage{supertabular}
\usepackage{lipsum}
\usepackage{nicefrac}
\usepackage[
nowarnings,
]
{xcookybooky}
\DeclareRobustCommand{\textcelcius}{\ensuremath{^{\circ}\mathrm{C}}}
\setcounter{secnumdepth}{1}
\renewcommand*{\recipesection}[2][]
{
\subsection[#1]{#2}
}
\renewcommand{\subsectionmark}[1]
{
}
\usepackage{hyperref}
\begin{document}
\begingroup
\makeatletter
\renewenvironment{recipe}[2][]
{% initialisation
\setkeys{recipe}{preparationtime, bakingtime, bakingtemperature, portion, calory, source}
\setkeys{picture}{small, big, smallpicturewidth=\xcb#smallpicturewidth, bigpicturewidth=\xcb#bigpicturewidth} % load the default values
\def\xcb#hook#pregraph{}
\def\xcb#hook#pretitle{}
\def\xcb#introduction{}
\def\xcb#hook#prepreparation{}
\preparation{}
\def\xcb#hook#postpreparation{}
\def\xcb#hook#preingredients{}
\ingredients{}
\def\xcb#hook#postingredients{}
\def\xcb#suggestion{}
\def\xcb#hint{}
\def\xcb#recipename{#2}
\setkeys{recipe}{#1} % reading the optional parameters
\setcounter{xcb#newpagefoot}{1}
\setcounter{xcb#newpagehead}{\value{page}}
}
{% this part is executed at \end{recipe}
%% FIRST BLOCK
\xcb#hook#pregraph
\if#twoside
\ifodd\arabic{page}
\begin{minipage}[T]{\xcb#picture#bigwidth}
\xcb#picture#big
\end{minipage}
\hfill
\begin{minipage}[T]{\xcb#picture#smallwidth}
\xcb#picture#small
\end{minipage}
\else
\begin{minipage}[T]{\xcb#picture#smallwidth}
\xcb#picture#small
\end{minipage}
\hfill
\begin{minipage}[T]{\xcb#picture#bigwidth}
\xcb#picture#big
\end{minipage}
\fi
\else
\begin{minipage}[T]{\xcb#picture#bigwidth}
\xcb#picture#big
\end{minipage}
\hfill
\begin{minipage}[T]{\xcb#picture#smallwidth}
\xcb#picture#small
\end{minipage}
\fi
%% SECOND BLOCK
\xcb#hook#pretitle
\recipesection[\normalsize\xcb#recipename]%
{\hspace{-1em}\textcolor{\xcb#color#recipename}{\xcb#font#recipename\xcb#recipename}}
\xcb#cmd#recipeoverview
\xcb#introduction
%% THIRD BLOCK
\columnratio{0.66}
\begin{paracol}{2}
\xcb#hook#prepreparation
\xcb#preparation
\xcb#hook#postpreparation
\xcb#suggestion
\vfill
\xcb#cmd#wrapfill
\xcb#hint
\setcounter{xcb#newpagefoot}{0}
\switchcolumn
\xcb#hook#preingredients
\xcb#ingredients
\xcb#hook#postingredients
\end{paracol}
}
\renewcommand*{\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{supertabular}{r>{\raggedright\arraybackslash}p{3cm}}
#2
\end{supertabular}}
}
}
\makeatother
\begin{recipe}
[%
preparationtime = {\unit[1]{h}},
bakingtime={\unit[20-25]{min}},
bakingtemperature={\protect\bakingtemperature{
fanoven=\unit[175]{\textcelcius}}},
portion = {\portion{6}},
]
{Spinach Lasagne}
\graph
{
%small=Recipes/MainCourses/BBQChicken/Small.jpg,
big=example-image
}
\ingredients
{
\textbf{Sauce}\\
2 & chopped onions\\
\unit[2]{tbsp} & Olive oil\\
3 & chopped cloves of garlic\\
\unit[2]{tsps} & dried thyme\\
4 & grated carrots\\
3 & grated celery leaves\\
1 & grated squash\\
1 & grated aubergine\\
\unit[250]{g} & mushrooms\\
\unit[1]{dL} & tomato paste\\
\unit[1]{can} & chopped tomatoes\\
To taste & salt and pepper\\
\\
\textbf{Spinach}\\
\unit[500]{g} & frozen spinach\\
\unit[1]{dL} & cream\\
1 & onion\\
1 & clove of garlic\\
\unit[2]{tbsp} & oil\\
To taste & salt \& pepper \& fresh basil\\
\\
\textbf{Mornay}\\
\unit[2]{tbsp} & butter\\
\unit[2]{tbsp} & flour\\
\unit[3]{dL} & milk\\
\unit[125]{g} & fresh mozzarella\\
To taste & salt \& pepper \& nutmeg\\
\\
\unit[250]{g} & Lasagne plates\\
Enough & mozzarella\\
}
\preparation{
\step \lipsum[2]
\step \lipsum[2]
\step \lipsum[2]
\step \lipsum[2]
\step \lipsum[2]
\step \lipsum[2]
}
\end{recipe}
\endgroup
\end{document}
Caveats:
the width of the ingredients column is hard coded. Change p{3cm} to whatever value is suitable for you
the preparations column won't wrap around the ingredients.

Resources