无法使用 xcookybooky 生成文档

无法使用 xcookybooky 生成文档

我正在尝试使用包创建自己的食谱xcookybooky。我的代码是

\documentclass{article}

\usepackage{tikz} % for creating the lines for the hint
\usepackage{graphicx}
\usepackage{xcolor}
%\usepackage[clock, misc, weather]{ifsym} % Symbolpackage e.g. \Interval, \Wecker etc
\usepackage{cookingsymbols} % Cookings symbols e.g. \Oven, \Dish etc
\usepackage{emerald} % Handwritten Fonts
\usepackage{wrapfig} % To wrap the tabular with the ingredients
\usepackage{ifthen}
\usepackage{xkeyval}
\usepackage{lettrine} % numbering the preparation steps
\usepackage{fancyhdr}
\usepackage{units}
\usepackage{eso-pic} % for background pictures
\usepackage{picture} % for modfifying the position of the bg pictures
\usepackage{tabularx} % line breaks in tabular
\usepackage{xcookybooky}

\begin{document}
\begin{recipe}
        [
preparationtime = 30 min,
bakingtime = 1 hour,
bakingtemperature = \unit[225]{C},
portion = 4 portions,
calory = 4 kj,
source = My neighbour Sarah
]{Currywurst}
        \graph{
small = strawberry,
smallpicturewidth = 0.3\textwidth,
big = strawberrycake,
bigpicturewidth = 0.6\textwidth,
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ingredients{
2 Tafeln & dunkle Schokolade (über \unit[70]{\%})\\
3 & Eier\\
\unit[200]{ml} & Sahne\\
\unit[40]{g} & Zucker\\
\unit[50]{g} & Butter
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\preparation{
\step This is the first step for cooking a brilliant meal.
\step The second step follows...
\step and so on
\step Enjoy your meal!
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setRecipeLengths{
preparationwidth = 0.60\textwidth,
ingredientswidth = 0.35\textwidth,
pictureheight = 6cm,
bigpicturewidth = 0.6\textwidth,
smallpicturewidth = 0.35\textwidth
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setRecipeSizes{
recipename = \fontsize{25pt}{30pt},
ing = \normalsize,
inghead = \normalsize,
prep = \normalsize,
prephead = \normalsize,
hint = \normalsize,
hinthead = \Large
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setRecipenameFont{
%pbsi
%fau
%fwb
%fjd % default when using the option handwritten
cmr % default
}{T1}{m}{n}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setHeadlines{
inghead = Ingredients,
prephead = Preparation,
hinthead = Hint,
calory = energy content,
continuationhead = Continuation,
continuationfoot = Continuation on next page
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setBackgroundPicture
[%
x = 2cm,
y = -1cm,
width=\paperwidth-3cm,
height,
orientation=pagecenter
]{pic/bg_transparent} % filepath
\end{recipe}
\end{document}

当我编译它时,我收到 4 个错误,并且没有产生任何输出。以下代码行来自日志。

LaTeX Font Info:    Try loading font information for T1+ cmr  on input line 95.
(C:\Users\thanos\AppData\Roaming\MiKTeX\2.9\tex\generic\tex-ewd\t1.tex
! Undefined control sequence.
l.5 \headline
             {\bf \title}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! I can't find file `dotnot{'.
<to be read again> 
                   protect 
l.5 \headline{\bf
                  \title}
Please type another input file name
! Emergency stop.
<to be read again> 
                   protect 
l.5 \headline{\bf
                  \title}
*** (job aborted, file error in nonstop mode)

我发现字体出了点问题,T1但我不知道是什么问题。如果我从文档中删除相关行,错误是 104...

还存在一个与之相关的错误,dotnot但该包cookingsymbols似乎运行良好。

对于可能存在什么问题,您有什么想法吗?

答案1

按照@SeanAllred 的评论:\unit[225]{C}需要用括号括起来,因为它是一个 keyval 参数:

[...]
bakingtemperature = {\unit[225]{C}},
[...]

相关内容