PDF export (via manually running latex)
This commit is contained in:
3
extras/pdf-export/.gitignore
vendored
Normal file
3
extras/pdf-export/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/pdf-de.pdf
|
||||
/pdf-en.pdf
|
||||
/setup-builddir.tex
|
||||
43
extras/pdf-export/fonts/Crimson - SIL Open Font License.txt
Executable file
43
extras/pdf-export/fonts/Crimson - SIL Open Font License.txt
Executable file
@@ -0,0 +1,43 @@
|
||||
Copyright (c) 2010, Sebastian Kosch (sebastian@aldusleaf.org), with Reserved Font Name "Crimson Text".
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
BIN
extras/pdf-export/fonts/Crimson-Bold.otf
Executable file
BIN
extras/pdf-export/fonts/Crimson-Bold.otf
Executable file
Binary file not shown.
BIN
extras/pdf-export/fonts/Crimson-BoldItalic.otf
Executable file
BIN
extras/pdf-export/fonts/Crimson-BoldItalic.otf
Executable file
Binary file not shown.
BIN
extras/pdf-export/fonts/Crimson-Italic.otf
Executable file
BIN
extras/pdf-export/fonts/Crimson-Italic.otf
Executable file
Binary file not shown.
BIN
extras/pdf-export/fonts/Crimson-Roman.otf
Executable file
BIN
extras/pdf-export/fonts/Crimson-Roman.otf
Executable file
Binary file not shown.
BIN
extras/pdf-export/fonts/Crimson-Semibold.otf
Executable file
BIN
extras/pdf-export/fonts/Crimson-Semibold.otf
Executable file
Binary file not shown.
BIN
extras/pdf-export/fonts/Crimson-SemiboldItalic.otf
Executable file
BIN
extras/pdf-export/fonts/Crimson-SemiboldItalic.otf
Executable file
Binary file not shown.
93
extras/pdf-export/fonts/FiraSans - SIL Open Font License.txt
Executable file
93
extras/pdf-export/fonts/FiraSans - SIL Open Font License.txt
Executable file
@@ -0,0 +1,93 @@
|
||||
Copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A.
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
BIN
extras/pdf-export/fonts/FiraSans-Light.ttf
Executable file
BIN
extras/pdf-export/fonts/FiraSans-Light.ttf
Executable file
Binary file not shown.
BIN
extras/pdf-export/fonts/FiraSans-LightItalic.ttf
Executable file
BIN
extras/pdf-export/fonts/FiraSans-LightItalic.ttf
Executable file
Binary file not shown.
BIN
extras/pdf-export/fonts/FiraSans-Medium.ttf
Executable file
BIN
extras/pdf-export/fonts/FiraSans-Medium.ttf
Executable file
Binary file not shown.
BIN
extras/pdf-export/fonts/FiraSans-MediumItalic.ttf
Executable file
BIN
extras/pdf-export/fonts/FiraSans-MediumItalic.ttf
Executable file
Binary file not shown.
BIN
extras/pdf-export/fonts/FiraSans-Regular.ttf
Executable file
BIN
extras/pdf-export/fonts/FiraSans-Regular.ttf
Executable file
Binary file not shown.
69
extras/pdf-export/misc/icon-time.pdf
Normal file
69
extras/pdf-export/misc/icon-time.pdf
Normal file
@@ -0,0 +1,69 @@
|
||||
%PDF-1.5
|
||||
%<25><><EFBFBD><EFBFBD>
|
||||
3 0 obj
|
||||
<< /Length 4 0 R
|
||||
/Filter /FlateDecode
|
||||
>>
|
||||
stream
|
||||
x<EFBFBD>UPKRD1<08><>\@$B8<42>G<EFBFBD><47><EFBFBD>q<EFBFBD>\<5C><><EFBFBD>^<5E><>ge<67><65>n<EFBFBD><6E>w!<21><><EFBFBD><EFBFBD><EFBFBD>w<EFBFBD><77>oq%P"<22><>DM+<2B>1<EFBFBD><0C>f<EFBFBD><66><EFBFBD>nO<6E><4F><EFBFBD><EFBFBD><08>-<2D>.<2E><>6<EFBFBD><36>`<60><19>E<EFBFBD>U7<55>,<2C>R<EFBFBD><52><EFBFBD>h<15>{<7B>Um q<05><>&
|
||||
h2<68><32><EFBFBD>`)V0<56><30><11>4<EFBFBD><16>Ps<50><<3C>wLwL<77><4C><EFBFBD>,<2C>=<3D>t<EFBFBD><74><EFBFBD><1E>r<05><>j<EFBFBD>y<EFBFBD>DL<1D>;tgd
|
||||
<EFBFBD>b<EFBFBD><EFBFBD><EFBFBD>f3<EFBFBD>u<><75><16><>.<2E><>n1N<31><4E>f4.<2E><>*<2A>j<EFBFBD>㶪 mW<>]Ң1<D2A2>0aQ<61><51><EFBFBD>{12to Ց-/ޕ<>3<03><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>3<EFBFBD>M<EFBFBD><11>
|
||||
<EFBFBD>pP
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?w<>
|
||||
endstream
|
||||
endobj
|
||||
4 0 obj
|
||||
273
|
||||
endobj
|
||||
2 0 obj
|
||||
<<
|
||||
/ExtGState <<
|
||||
/a0 << /CA 1 /ca 1 >>
|
||||
>>
|
||||
>>
|
||||
endobj
|
||||
5 0 obj
|
||||
<< /Type /Page
|
||||
/Parent 1 0 R
|
||||
/MediaBox [ 0 0 1000 1000 ]
|
||||
/Contents 3 0 R
|
||||
/Group <<
|
||||
/Type /Group
|
||||
/S /Transparency
|
||||
/I true
|
||||
/CS /DeviceRGB
|
||||
>>
|
||||
/Resources 2 0 R
|
||||
>>
|
||||
endobj
|
||||
1 0 obj
|
||||
<< /Type /Pages
|
||||
/Kids [ 5 0 R ]
|
||||
/Count 1
|
||||
>>
|
||||
endobj
|
||||
6 0 obj
|
||||
<< /Creator (cairo 1.12.18 (http://cairographics.org))
|
||||
/Producer (cairo 1.12.18 (http://cairographics.org))
|
||||
>>
|
||||
endobj
|
||||
7 0 obj
|
||||
<< /Type /Catalog
|
||||
/Pages 1 0 R
|
||||
>>
|
||||
endobj
|
||||
xref
|
||||
0 8
|
||||
0000000000 65535 f
|
||||
0000000675 00000 n
|
||||
0000000387 00000 n
|
||||
0000000015 00000 n
|
||||
0000000365 00000 n
|
||||
0000000459 00000 n
|
||||
0000000740 00000 n
|
||||
0000000869 00000 n
|
||||
trailer
|
||||
<< /Size 8
|
||||
/Root 7 0 R
|
||||
/Info 6 0 R
|
||||
>>
|
||||
BIN
extras/pdf-export/misc/icon-yield.pdf
Normal file
BIN
extras/pdf-export/misc/icon-yield.pdf
Normal file
Binary file not shown.
BIN
extras/pdf-export/misc/logo.pdf
Normal file
BIN
extras/pdf-export/misc/logo.pdf
Normal file
Binary file not shown.
14
extras/pdf-export/pdf-de.tex
Normal file
14
extras/pdf-export/pdf-de.tex
Normal file
@@ -0,0 +1,14 @@
|
||||
\documentclass[a4paper,12pt,twoside]{article}
|
||||
\usepackage[ngerman]{babel}
|
||||
\include{setup}
|
||||
\include{setup-builddir} % load \def\builddir{}
|
||||
|
||||
\def\tIngredients{Zutaten}
|
||||
\def\tRecipe{Rezept}
|
||||
\def\tPagePrefix{S.}
|
||||
|
||||
\begin{document}
|
||||
\makefrontmatter
|
||||
\graphicspath{{\builddir/de/}}
|
||||
\include{\builddir/de/pdf-export}
|
||||
\end{document}
|
||||
14
extras/pdf-export/pdf-en.tex
Normal file
14
extras/pdf-export/pdf-en.tex
Normal file
@@ -0,0 +1,14 @@
|
||||
\documentclass[letter,12pt,twoside]{article}
|
||||
\usepackage[english]{babel}
|
||||
\include{setup}
|
||||
\include{setup-builddir} % load \def\builddir{}
|
||||
|
||||
\def\tIngredients{Ingredients}
|
||||
\def\tRecipe{recipe}
|
||||
\def\tPagePrefix{p.}
|
||||
|
||||
\begin{document}
|
||||
\makefrontmatter
|
||||
\graphicspath{{\builddir/en/}}
|
||||
\include{\builddir/en/pdf-export}
|
||||
\end{document}
|
||||
174
extras/pdf-export/setup.tex
Normal file
174
extras/pdf-export/setup.tex
Normal file
@@ -0,0 +1,174 @@
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage{geometry} % margin width
|
||||
\usepackage{graphicx} % includegraphics
|
||||
\usepackage{xcolor} % colors
|
||||
\usepackage{sidenotes} % margin figure, etc.
|
||||
\usepackage{enumitem} % setlist[description]
|
||||
\usepackage{titleps} % footer page number
|
||||
\usepackage{tocloft} % \cftbeforesecskip
|
||||
\usepackage{ragged2e} % \RaggedRight
|
||||
\usepackage{fontspec} % \setmainfont, \setsansfont, \setmonofont
|
||||
|
||||
\definecolor{red2}{HTML}{AA203A}
|
||||
\definecolor{red3}{HTML}{EE6A84}
|
||||
\usepackage{xurl}
|
||||
\PassOptionsToPackage{hyphens}{url}
|
||||
\usepackage{hyperref}
|
||||
\renewcommand{\UrlFont}{\normalfont}
|
||||
|
||||
%% Use this if the font is _not_ installed on the system
|
||||
%% but it requires the download of the additional fonts package
|
||||
%% \setmonofont[Path=fonts/]{FiraSans-Light}
|
||||
\setmainfont[
|
||||
Path = fonts/,
|
||||
BoldFont = Crimson-Bold,
|
||||
ItalicFont = Crimson-Italic,
|
||||
BoldItalicFont = Crimson-BoldItalic
|
||||
]{Crimson-Roman}
|
||||
\setsansfont[
|
||||
Path = fonts/,
|
||||
Scale = 0.95,
|
||||
BoldFont = FiraSans-Medium,
|
||||
ItalicFont = FiraSans-LightItalic,
|
||||
BoldItalicFont = FiraSans-MediumItalic
|
||||
]{FiraSans-Regular}
|
||||
|
||||
%% Use this if the font is installed on the system
|
||||
%% this does not require additional fonts package
|
||||
% \setmainfont[
|
||||
% BoldFont = {Fira Sans Medium},
|
||||
% ItalicFont = {Fira Sans Light Italic},
|
||||
% BoldItalicFont = {Fira Sans Medium Italic}
|
||||
% ]{Fira Sans Regular}
|
||||
% \setmainfont[
|
||||
% BoldFont = {Crimson Bold},
|
||||
% ItalicFont = {Crimson Italic},
|
||||
% BoldItalicFont = {Crimson Bold Italic}
|
||||
% ]{Crimson Roman}
|
||||
|
||||
% Defines & Geometry
|
||||
\def\marginwidth{60mm}
|
||||
\def\marginsep{8.2mm}
|
||||
\def\marginwoverflow{67mm} % -1.2mm for makebox
|
||||
% space before \paragraph
|
||||
\setlength{\parindent}{0pt}
|
||||
% space between paragraphs
|
||||
\setlength{\parskip}{0.4\baselineskip}
|
||||
\geometry{
|
||||
head=13.6pt,
|
||||
top=2cm,
|
||||
bottom=2cm,
|
||||
inner=2cm,
|
||||
outer=2cm,
|
||||
marginparsep=\marginsep,
|
||||
marginparwidth=\marginwidth,
|
||||
includemp,
|
||||
% showframe
|
||||
}
|
||||
% \renewcommand{\footnotesep}{2.5ex}
|
||||
\renewcommand{\footnoterule}{
|
||||
\kern -2pt
|
||||
\hrule width \textwidth height .2pt
|
||||
\kern 1.8pt}
|
||||
% spacing before & after
|
||||
\makeatletter
|
||||
% footer
|
||||
\renewcommand\@makefntext[1]{\noindent\makebox[0.5em][l]{\@makefnmark}#1}
|
||||
% subsubsection
|
||||
\renewcommand{\subsubsection}{%
|
||||
\@startsection{subsubsection}{3}%
|
||||
{\z@}{-2ex \@plus -1ex \@minus -1ex}{.2ex \@plus 1ex \@minus .2ex}%
|
||||
{\normalfont\large\bfseries}%
|
||||
}
|
||||
% paragraph
|
||||
\renewcommand{\paragraph}{%
|
||||
\@startsection{paragraph}{4}%
|
||||
{\z@}{1.5ex \@plus 1ex \@minus .2ex}{-.75em}%
|
||||
{\normalfont\normalsize\bfseries}%
|
||||
}
|
||||
\makeatother
|
||||
% adjust description environment
|
||||
\setlist[description,enumerate,itemize]{%
|
||||
topsep=0.7\baselineskip,
|
||||
itemsep=0pt,
|
||||
% itemindent=-2em,
|
||||
% listparindent=-2em,
|
||||
% leftmargin=0em,
|
||||
font={\sffamily}
|
||||
}
|
||||
\setlist[enumerate,itemize]{leftmargin=1em,topsep=0\baselineskip,parsep=0pt}
|
||||
\widowpenalty10000
|
||||
\clubpenalty10000
|
||||
% disable section numbering
|
||||
\setcounter{secnumdepth}{0}
|
||||
\setcounter{tocdepth}{1}
|
||||
% \titleformat*{\section}{\LARGE\bfseries} # titlesec
|
||||
\setlength{\cftbeforesecskip}{0.2em} % spacing in TOC
|
||||
|
||||
% Footer page numbering
|
||||
\renewpagestyle{plain}{%
|
||||
\setfoot[{\makebox[-\marginwoverflow][r]{\thepage}}][][]{}{}{{\makebox[-\marginwoverflow][l]{\thepage}}}
|
||||
}
|
||||
\pagestyle{plain}
|
||||
|
||||
% \graphicspath{{../src/content/}}
|
||||
|
||||
\newcommand{\makefrontmatter}{
|
||||
\begin{titlepage}
|
||||
\newgeometry{top=2.5cm,bottom=2.5cm,left=4cm,right=4cm}
|
||||
\centering
|
||||
\vspace*{.06\textheight}
|
||||
\includegraphics[width=54mm]{misc/logo.pdf}\par
|
||||
\vspace*{.06\textheight}
|
||||
{\huge\sf recipe lekture}
|
||||
\vfill
|
||||
\today
|
||||
\end{titlepage}
|
||||
|
||||
% \thispagestyle{empty}
|
||||
\pagenumbering{roman}
|
||||
\tableofcontents
|
||||
\clearpage
|
||||
\pagenumbering{arabic}
|
||||
\setcounter{page}{1}
|
||||
}
|
||||
|
||||
% Custom commands
|
||||
\newcommand{\meta}[2]{%
|
||||
\vspace{-0.75em}%
|
||||
~\includegraphics[height=2ex]{misc/icon-time}\enspace\ifx\relax#1\relax—\else#1\fi%
|
||||
\quad%
|
||||
\includegraphics[height=2ex]{misc/icon-yield}\enspace\ifx\relax#2\relax—\else#2\fi%
|
||||
\vspace{1em}%
|
||||
}
|
||||
\newcommand{\footer}[2]{%
|
||||
\ifx\relax#1\relax\else{%
|
||||
\enlargethispage{5.75ex}
|
||||
\let\thefootnote\relax\footnotetext{%
|
||||
\hspace{-.6em} Source: %
|
||||
\ifx\relax#2\relax#1\else\href{#1}{#2}\fi%
|
||||
}\fi%
|
||||
}
|
||||
}
|
||||
|
||||
\newcommand{\newrecipe}[2]{\clearpage\section{#2}\label{#1}}
|
||||
\newcommand{\ingGroup}[1]{\vspace{.2ex}\item{\bfseries\color{red2}\hspace{-1em} #1}}
|
||||
\newcommand{\ingName}[1]{{\color{red3}#1}}
|
||||
\newcommand{\ingDetail}[1]{\emph{\footnotesize,#1}}
|
||||
\newcommand{\pagelink}[1]{\tRecipe \tPagePrefix\,{\color{red2}\pageref{#1}}}
|
||||
\newcommand{\recipelink}[2]{#2 (\tPagePrefix\,\pageref{#1})}
|
||||
\newcommand{\external}[2]{#2\footnote{\href{#1}{#1}}}
|
||||
% \newcommand{\external}[2]{#2\footnote{\url{#1}}}
|
||||
|
||||
\newenvironment{ingredients}[1]{
|
||||
\begin{marginfigure}
|
||||
\small
|
||||
\ifx\relax#1\relax\else\includegraphics[width=\marginwidth]{#1}\fi
|
||||
% \subsection*{\sffamily\tIngredients:}
|
||||
\begin{description}
|
||||
\RaggedRight\sffamily
|
||||
}{
|
||||
\end{description}
|
||||
\end{marginfigure}
|
||||
}
|
||||
Reference in New Issue
Block a user