% \iffalse meta-comment % % Copyright (C) 2014 by Sven Harder % ----------------------------------- % % This file may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. % The latest version of this license is in: % % http://www.latex-project.org/lppl.txt % % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. % % This work has the LPPL maintenance status `maintained'. % % The current maintainer of this work is Sven Harder. % % This work consists of the files cookingsymbols.dtx and cookingsymbols.ins % and the derived files cookingsymbols.sty and cookingsymbols.mf. % % \fi % % \iffalse %\NeedsTeXFormat{LaTeX2e} %\ProvidesPackage{cookingsymbols} %[2014/12/28 v1.1 symbols for recipes by Sven Harder] % %<*driver> \documentclass{ltxdoc} \usepackage{cookingsymbols} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{booktabs} \usepackage{mflogo} \EnableCrossrefs \CodelineIndex \RecordChanges \addtolength{\oddsidemargin}{-1cm} \setcounter{IndexColumns}{2} \setcounter{GlossaryColumns}{2} \usepackage{hyperref} \hypersetup{% pdfauthor = {Sven Harder}, pdftitle = {cookingsymbols documentation}, colorlinks = {true}, linkcolor = {blue}, urlcolor = {blue}, citecolor = {blue}, filecolor = {blue} } \begin{document} \DocInput{cookingsymbols.dtx} \end{document} % % \fi % % \CheckSum{47} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z % Digits \0\1\2\3\4\5\6\7\8\9 % Exclamation \! Double quote \" Hash (number) \# % Dollar \$ Percent \% Ampersand \& % Acute accent \' Left paren \( Right paren \) % Asterisk \* Plus \+ Comma \, % Minus \- Point \. Solidus \/ % Colon \: Semicolon \; Less than \< % Equals \= Greater than \> Question mark \? % Commercial at \@ Left bracket \[ Backslash \\ % Right bracket \] Circumflex \^ Underscore \_ % Grave accent \` Left brace \{ Vertical bar \| % Right brace \} Tilde \~} % % % \changes{v1.0}{2011/11/02}{Initial version} % \changes{v1.1}{2014/12/28}{Update of the documentation} % % \GetFileInfo{cookingsymbols.sty} % % \DoNotIndex{\#,\$,\%,\&,\@,\\,\{,\},\^,\_,\~,\ } % \DoNotIndex{\@ne} % \DoNotIndex{\advance,\begingroup,\catcode,\closein} % \DoNotIndex{\closeout,\day,\def,\edef,\else,\empty,\endgroup} % \DoNotIndex{\begin,\end,\equal,beginchar,endchar} % % \title{The \textsf{cookingsymbols} package\thanks{This document % corresponds to \textsf{cookingsymbols}~\fileversion, % dated \filedate.}} % \author{Sven Harder \\ \texttt{sven\_one1@gmx.de}} % % \maketitle % \begin{abstract} % This package is intended to support mainly developers of recipe templates with often used symbols. The symbols are build by using \MF. % \end{abstract} % % \vspace{3em} % % \PrintChanges % % \newpage % \tableofcontents % \newpage % % \section{Introduction} % This package includes 11 symbols. They are original created, when I was searching for symbols for typesetting recipes. However, I didn't find any symbols, so I decided to create my own ones. This is the result ;) % % At the end of creating these symbols, I realized that \MF\ is out of date. But at this time, I had no time to create the same symbols as vector based fonts. This is still a task for the future. % % \section{Symbols} % The following symbols are created by this package and are available by these macros. \textbf{Important:} The symbols are enhanced for a better view (by \textbackslash Large). % \begin{center} % \begin{tabular}[h]{rl} % \bf Macro & \bf Symbol \\ % \toprule % \textbackslash Oven & \Large\Oven \\ % \textbackslash Topbottomheat & \Large\Topbottomheat \\ % \textbackslash Topheat & \Large\Topheat\\ % \textbackslash Bottomheat & \Large\Bottomheat\\ % \textbackslash Fanoven & \Large\Fanoven\\ % \textbackslash Gasstove & \Large\Gasstove\\ % \textbackslash Dish & \Large\Dish\\ % \textbackslash Knife & \Large\Knife\\ % \textbackslash Fork & \Large\Fork\\ % \textbackslash Spoon & \Large\Spoon\\ % \textbackslash Gloves & \Large\Gloves\\ % \end{tabular} % \end{center} % And now have fun with these new symbols! % % \StopEventually{\PrintIndex\addcontentsline{toc}{section}{\indexname}} % % \section{Implementation} % % \subsection{cookingsymbols.sty} % The following content can be found in the derived file \textsf{cookingsymbols.sty}. It includes the macros for an easy access and the definition of the (new) font. % \begin{macrocode} %<*package> \DeclareFontFamily{U}{cookingsymbols}{} \DeclareFontShape{U}{cookingsymbols}{m}{n}{<-> cookingsymbols}{} \DeclareFontShape{U}{cookingsymbols}{bx}{n}{<-> sub cookingsymbols/m/n }{} \newcommand{\Oven}{{\usefont{U}{cookingsymbols}{m}{n}\symbol{0}}} \newcommand{\Topbottomheat}{{\usefont{U}{cookingsymbols}{m}{n}\symbol{1}}} \newcommand{\Topheat}{{\usefont{U}{cookingsymbols}{m}{n}\symbol{2}}} \newcommand{\Bottomheat}{{\usefont{U}{cookingsymbols}{m}{n}\symbol{3}}} \newcommand{\Fanoven}{{\usefont{U}{cookingsymbols}{m}{n}\symbol{4}}} \newcommand{\Gasstove}{{\usefont{U}{cookingsymbols}{m}{n}\symbol{5}}} \newcommand{\Dish}{{\usefont{U}{cookingsymbols}{m}{n}\symbol{6}}} \newcommand{\Knife}{{\usefont{U}{cookingsymbols}{m}{n}\symbol{7}}} \newcommand{\Fork}{{\usefont{U}{cookingsymbols}{m}{n}\symbol{8}}} \newcommand{\Spoon}{{\usefont{U}{cookingsymbols}{m}{n}\symbol{9}}} \newcommand{\Gloves}{{\usefont{U}{cookingsymbols}{m}{n}\symbol{10}}} % % \end{macrocode} % % \subsection{cookingsymbols.mf} % The following content can be found in the derived file \textsf{cookingsymbols.mf}. In this file the symbols are defined by using \MF. % \begin{macrocode} %<*mf> mode_setup; font_coding_scheme = "cookingsymbols for recipes"; font_identifier = "cookingsymbols"; u#:=0.68pt#; define_pixels(u); font_size 10pt#; %design_size=10pt#; linewidth=0.4pt; thinpen.w := 0.5linewidth; pen normalpen, thinpen; normalpen := pencircle scaled 1linewidth; thinpen := pencircle scaled thinpen.w; % \end{macrocode} % % \subsubsection{Oven} % \begin{macrocode} %% oven symbol "Oven"; beginchar(0,10u#,10u#,0); pickup pencircle scaled 0.75 linewidth; % Umrandung y1=y2; y3=y4; x1=x4; x2=x3; x2-x1=w; y2-y3=h; z4=(0u, 0u); draw z1--z2--z3--z4--cycle; % Ofenklappe r:=1u; % Radius z5=z4+(r+0.7u, 0.7u); x5=x8; x6=x7; x9=x12; x10=x11; y5=y12; y6=y11; y7=y10; y8=y9; z6=z5+(-r, r); z8=z7+(r,r); z10=z9+(r,-r); x11-x6=w-1.4u; % Breite y8-y5=6.3u; % Höhe fill z5{left}..z6{up}..z7{up}..z8{right}..z9{right}..z10{down}..z11{down}..z12{left}..cycle; % Ofengriff b:=3.2u; % Breite vom Griff h1:=0.5u; % Höhe z14=z8+((x9-x8)/2-b/2, -0.8u); x14=x13; x15=x16; x16=x13+b; y14=y13+h1; y15=y14; y16=y13; unfill z13--z14--z15--z16--cycle; % Display b:=2.8u; % Breite vom Display h1:=1.05u; % Höhe z17=z1+(0.8u, -1u); x18=x19; x20=x17; y18=y17; y19=y20; x18-x17=b; y18-y19=h1; fill z17--z18--z19--z20--cycle; % Knöpfe r:=0.48u; % Radius der Knöpfe b:=1.3u; % Abstand der Knöpfe untereinander h1:=y19+(y18-y19)/2; x:=x18+0.8u; x21=x23; y24=y22; z24=(x,h1); z23=(x+r,h1-r); x22=x24+2*r; y21=y23+2*r; %fill z21..z22..z23..z24..cycle; for i=0 upto 3: fill (z21+(i*1b,0))..(z22+(i*b,0))..(z23+(i*b,0))..(z24+(i*b,0))..cycle; endfor %labels(range 1 thru 24); endchar; % \end{macrocode} % % \subsubsection{Top and bottom heat} % \begin{macrocode} %% top and bottomheat symbol "Topbottomheat"; beginchar(1,11u#,10u#,0); pickup normalpen; % Umrandung ra:=1.0u; % Radius der Umrandung y1=y4; y2=y3; y5=y8; y6=y7; x1=x8; x2=x7; x3=x6; x4=x5; z2=z1+(ra,ra); z4=z3+(ra,-ra); z8=z7+(-ra,ra); x4-x1=w; y2-y7=h; z8=(0,ra); draw z1{up}..z2{right}..z3{right}..z4{down}..z5{down}..z6{left}..z7{left}..z8{up}..cycle; % Stäbe pickup pensquare scaled 1.15linewidth; % Oberhitze xa:=1.4u; % Abstand zum Rand ya:=1.85u; z9=(xa, (y2-y7)-ya); x10=(x4-x1)-xa; y10=y9; draw z9..z10; % Unterhitze x11=x9;x12=x10; y11=ya; y12=y11; draw z11..z12; %labels(range 1 thru 12); endchar; % \end{macrocode} % % \subsubsection{Top heat} % This is nearly the same definition as \textsf{Topbottomheat}, except there is only one rod. % \begin{macrocode} %% top heat symbol "Topheat"; beginchar(2,11u#,10u#,0); pickup normalpen; % Umrandung ra:=1.0u; % Radius der Umrandung y1=y4; y2=y3; y5=y8; y6=y7; x1=x8; x2=x7; x3=x6; x4=x5; z2=z1+(ra,ra); z4=z3+(ra,-ra); z8=z7+(-ra,ra); x4-x1=w; y2-y7=h; z8=(0,ra); draw z1{up}..z2{right}..z3{right}..z4{down}..z5{down}..z6{left}..z7{left}..z8{up}..cycle; % Stäbe pickup pensquare scaled 1.15linewidth; % Oberhitze xa:=1.4u; % Abstand zum Rand ya:=1.85u; z9=(xa, (y2-y7)-ya); x10=(x4-x1)-xa; y10=y9; draw z9..z10; endchar; % \end{macrocode} % % \subsubsection{Bottom heat} % This is nearly the same definition as \textsf{Topbottomheat}, except there is only one rod. % \begin{macrocode} %% bottom heat symbol "Bottomheat"; beginchar(3,11u#,10u#,0); pickup normalpen; % Umrandung ra:=1.0u; % Radius der Umrandung y1=y4; y2=y3; y5=y8; y6=y7; x1=x8; x2=x7; x3=x6; x4=x5; z2=z1+(ra,ra); z4=z3+(ra,-ra); z8=z7+(-ra,ra); x4-x1=w; y2-y7=h; z8=(0,ra); draw z1{up}..z2{right}..z3{right}..z4{down}..z5{down}..z6{left}..z7{left}..z8{up}..cycle; % Stäbe pickup pensquare scaled 1.15linewidth; % Oberhitze xa:=1.4u; % Abstand zum Rand ya:=1.85u; z9=(xa, (y2-y7)-ya); x10=(x4-x1)-xa; y10=y9; % Unterhitze x11=x9;x12=x10; y11=ya; y12=y11; draw z11..z12; endchar; % \end{macrocode} % % \subsubsection{Fanoven} % \begin{macrocode} %% fanoven symbol "Fanoven"; beginchar(4,11u#,10u#,0); pickup normalpen; % Umrandung ra:=1.0u; % Radius der Umrandung y1=y4; y2=y3; y5=y8; y6=y7; x1=x8; x2=x7; x3=x6; x4=x5; z2=z1+(ra,ra); z4=z3+(ra,-ra); z8=z7+(-ra,ra); x4-x1=w; y2-y7=h; z8=(0,ra); draw z1{up}..z2{right}..z3{right}..z4{down}..z5{down}..z6{left}..z7{left}..z8{up}..cycle; % Propeller z15=(w/2,(h/2)-1.05u); % Rotationspunkt a:=1.3; % Skalierungsfaktor z9=z15+a*(0.95u,2.66u); %z9=z15+(0.8u,3u); y10=y9; x10=w-x9; z11=z9 rotatedaround(z15,120); z12=z10 rotatedaround(z15,120); z13=z9 rotatedaround(z15,-120); z14=z10 rotatedaround(z15,-120); z16=z15 + a*(0,4u); z17=z16 rotatedaround(z15,120); z18=z16 rotatedaround(z15,-120); fill z9{dir 90}..z16{dir 180}..z10{dir 270}..z13{dir -30}..z18{dir 60}..z14{dir 150}..z11{dir 210}..z17{dir 300}..z12{dir 30}..cycle; %labels(range 1 thru 18); endchar; % \end{macrocode} % % \subsubsection{Gasstove} % \begin{macrocode} %% gasstove symbol "Gasstove"; beginchar(5,11u#,10u#,0); pickup normalpen; % Umrandung ra:=1.0u; % Radius der Umrandung y1=y4; y2=y3; y5=y8; y6=y7; x1=x8; x2=x7; x3=x6; x4=x5; z2=z1+(ra,ra); z4=z3+(ra,-ra); z8=z7+(-ra,ra); x4-x1=w; y2-y7=h; z8=(0,ra); draw z1{up}..z2{right}..z3{right}..z4{down}..z5{down}..z6{left}..z7{left}..z8{up}..cycle; % Flamme z9=(w/2,1.0u); % Ursprung z10=(w/2,9u); % Endpunkt z11=z9+(-1.4u, 3.1u); x12=w-x11;y12=y11; %z12=z9+(1.5u, 3.5u); fill z9{dir 135}..z11{up}..z10{dir 70}--cycle; %fill z9{dir 145}..z10{dir 65}--cycle; fill z9{dir 45}..z12{up}..z10{dir 110}--cycle; % Innere Flamme z13=z9+(0,0.7u); % Urspung z14=z13+(0, 3.7u); % Endpunkt z15=z9+(-0.5u,2.1u); z16=z9+(0.5u, 2.1u); unfill z13{dir 130}..z15{up}..z14{dir 65}--cycle; unfill z13{dir 60}..z16{up}..z14{dir 115}--cycle; %labels(range 1 thru 16); endchar; % \end{macrocode} % % \subsubsection{Dish} % This is the definition of two circles (with different radii). % \begin{macrocode} %% dish symbol "Dish"; beginchar(6,10u#,10u#,0); pickup normalpen; ra:=0.5h; x1=x3;y4=y2; z4=(0,ra); z3=(ra,0); x2=x4+2*ra; y1=y3+2*ra; draw z1..z2..z3..z4..cycle; ri:=3.7u; x5=x7;y8=y6; z8=(ra-ri,ra); z7=(ra,ra-ri); y6=0.5*(y5-y7) + (ra-ri); x5=0.5*(x6-x8) + (ra-ri); draw z5..z6..z7..z8..cycle; % labels(range 1 thru 8); endchar; % \end{macrocode} % % \subsubsection{Knife} % \begin{macrocode} %% knife symbol "Knife"; beginchar(7,1.7u#,10u#,0); pickup normalpen; b:=0.8u; % Breite des Stiels z1=(w, 0u); x2=x1-b; y2=y1; z5=(x2,4.8u); z6=z5+(-0.85u, 2u); x7=x1; y7=y1+10u; fill z1--z2--z5{dir 150}..z6{up}..z7--cycle; %labels(range 1 thru 11); endchar; % \end{macrocode} % % \subsubsection{Fork} % \begin{macrocode} %% fork symbol "Fork"; beginchar(8,2u#,10u#,0); pickup normalpen; b:=0.8u; % Breite des Stiels zb:=0.2u; % Zackenbreite za=0.4u; % Zackenabstand z1=(w/2+b/2, 0u); x2=x1-b; y2=y1; x3=x2; y3=y2+6u; x4=x1; y4=y3; fill z1--z2--z3--z4--cycle; x5=x3-(4*zb+3*za)/2 +b/2; y5=y3+1.9u; x6=x5; y6=y5+2.1u; x7=x6+zb; y7=y6; x8=x7; y8=y5; x9=x8+za; y9=y8; x10=x9; y10=y6; x11=x10+zb; y11=y10; x12=x11; y12=y9; x13=x12+za; y13=y12; x14=x13; y14=y6; x15=x14+zb; y15=y14; x16=x15; y16=y5; x17=x16+za; y17=y16; x18=x17; y18=y6; x19=x18+zb; y19=y18; x20=x19; y20=y5; fill z3{dir 130}..z5{up}--z6--z7--z8--z9--z10--z11--z12--z13--z14--z15--z16--z17--z18--z19--z20{down}..z4{dir 230}..cycle; %labels(range 1 thru 20); endchar; % \end{macrocode} % % \subsubsection{Spoon} % \begin{macrocode} %% spoon symbol "Spoon"; beginchar(9, 3.4u#, 10u#,0); pickup normalpen; b:=0.8u; % Breite des Stiels % Stiel z1=(w/2+b/2, 0u); x2=x1-b; y2=y1; x3=x2; y3=y2+5.74u; x4=x1; y4=y3; fill z1--z2--z3--z4--cycle; % Oberteil x5=x3-1.0u; x6=x4+(x3-x5); y5=y6=y3+(y7-y3)/2 - 0.2u; % halbe Breite z7=(x3+(x4-x3)/2, y3+4u); % y: maximale Ausdehnung draw z7{dir -170}..z5{down}..(x3+(x4-x3)/2, y3){dir -10}; draw (x3+(x4-x3)/2, y3){dir 10}..z6{up}..z7{dir 170};%..(z7-(b/2, 0)); %labels(range 1 thru 12); endchar; % \end{macrocode} % % \subsubsection{Gloves} % \begin{macrocode} %% gloves symbol "Gloves"; beginchar(10,10.4u#,10u#,0); pickup thinpen; a:=1.05; % Skalierungsfaktor breite:=a*4.3u; % Breite unten am Handschuh hoehe:=a*1.8u; z5=a*(3.3u-0.4u, 3u); % Rotationspunkt 1. Handschuh z9=z5 + a*(-0.55u, 0.1u); % Rotationspunkt 2. Handschuh alpha:=-37; % Rotationswinkel -37 beta:=-26; % Verschiebung des zweiten Handschuhs bzgl. des oberen % Oberer Handschuh z4=(0.8u, 1u); x1=x4; x2=x3; y1=y2; y3=y4; x2-x1=breite; y1-y4=hoehe; fill z1--z2--z3--z4--cycle rotatedaround(z5, alpha); % Daumen z7=z1 + a*(0.5thinpen.w+0.2u, 3.5u); z6=z7 + a*(-1.2u, 1.3u); draw ((z1+(0.5thinpen.w,0)){up}..z6{dir 75}..z7{dir -80}) rotatedaround(z5, alpha); % Oberer Rand/Begrenzung z8=z1 + ((x2-x1)/2 + a*0.2u, a*8.2u); draw (z7{dir 90}..z8{right}..(z2+(-0.5thinpen.w,0)){dir -90}) rotatedaround(z5, alpha); % Zweiter Handschuh fill z1--(z1-(-a*0.8u, (y1-y4)/2+a*0.6u))--z4--cycle rotatedaround(z9, alpha+beta); fill z4--z2--z3--cycle rotatedaround(z9, alpha+beta); %z10=z1 + a*(1u, 7.55u); % Schnittpunkt der beiden Handschuhe z10=z1 + a*(1u, 7.75u); draw (z10..z8{right}..z2{dir -90}) rotatedaround(z9, alpha+beta); % 'Weißer' Trennstrich z11=z3 - (0, 0.5thinpen.w); x12=x1; y12=y11; unfill (z4--z3--z11--z12--cycle) rotatedaround(z5, alpha); %labels(range 1 thru 20); endchar; end % % \end{macrocode} % % \Finale \endinput