From 82e14921eab1a3c28918c08088a8100535241645 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 11 Jan 2006 23:51:57 +0000 Subject: trunk/Master/texmf-dist/source/latex/cooking git-svn-id: svn://tug.org/texlive/trunk@201 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/cooking/COPYING | 339 ++++++++++++ Master/texmf-dist/source/latex/cooking/cooking.dtx | 602 +++++++++++++++++++++ Master/texmf-dist/source/latex/cooking/cooking.ins | 54 ++ 3 files changed, 995 insertions(+) create mode 100644 Master/texmf-dist/source/latex/cooking/COPYING create mode 100644 Master/texmf-dist/source/latex/cooking/cooking.dtx create mode 100644 Master/texmf-dist/source/latex/cooking/cooking.ins (limited to 'Master') diff --git a/Master/texmf-dist/source/latex/cooking/COPYING b/Master/texmf-dist/source/latex/cooking/COPYING new file mode 100644 index 00000000000..e77696ae8dd --- /dev/null +++ b/Master/texmf-dist/source/latex/cooking/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/Master/texmf-dist/source/latex/cooking/cooking.dtx b/Master/texmf-dist/source/latex/cooking/cooking.dtx new file mode 100644 index 00000000000..20deca5ac41 --- /dev/null +++ b/Master/texmf-dist/source/latex/cooking/cooking.dtx @@ -0,0 +1,602 @@ +% \iffalse +% +% cooking.dtx +% Docstrip archive, run through LaTeX. +% +% Copyright (C) 1999 Axel Reichert +% See the files README and COPYING. +% +% \fi +% +% \changes{v0.9b}{1999-06-24}{First release} +% +% \CheckSum{116} +% +%% \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 \~} +% +% \DeclareRobustCommand*{\env}[1]{\texttt{#1}} +% \DeclareRobustCommand*{\file}[1]{\texttt{#1}} +% \DeclareRobustCommand*{\mail}[1]{\texttt{#1}} +% \DeclareRobustCommand*{\option}[1]{\texttt{#1}} +% \DeclareRobustCommand*{\package}[1]{\texttt{#1}} +% \DeclareRobustCommand*{\person}[1]{\textsc{#1}} +% \DeclareRobustCommand*{\smiley}{\texttt{(-:}} +% \DeclareRobustCommand*{\source}[1]{\texttt{#1}} +% \DeclareRobustCommand*{\winkey}{\texttt{(-;}} +% +% \title{\file{cooking.sty}} +% \author{% +% Axel Reichert \\ +% \mail{axel.reichert@gmx.de}% +% } +% \date{1999-06-24} +% \maketitle +% \begin{abstract} +% \noindent +% \file{cooking.sty} is a package for typesetting cooking +% recipes. See the files~\file{README} and~\file{COPYING} for +% additional information and~\file{kraut.tex} for an example. +% \end{abstract} +% +% \tableofcontents +% +% +% \section{Introduction} +% +% Quite regularly in the german or international newsgroup someone +% is asking for a style file or document class to typeset recipes. +% As I really like to cook in my spare time (you know, when I am +% not writing packages), I started with some macros inspired by the +% layout of the well-known german cookbook published +% by~\person{Dr.\,Oetker}~\cite{Gromzik:1996}. +% +% Most books start a recipe with a list of ingredients, after that +% a few paragraphs describing what to do. Thus it is difficult to +% find the continuation of the recipe, what to do next, because you +% have put the recipe aside while you were performing the current +% step. Some books typeset the ingredients in bold face or use +% enumerations with numbered steps. In this way the recipe gets +% more structured and it is easier to understand what to do in +% which order. +% +% An even better solution is to use a two-column layout: Each +% ingredient appears in the left-hand column, what to do with it is +% written in the right-hand column. The right column is less wide +% than the usual width of the text, this makes quick browsing of +% the recipe easier, like in newspapers. Also, there is no need +% for a list of ingredients, you just read the left column. This +% layout is used in~\cite{Gromzik:1996} and also recommended in the +% popular german textbook on typography by~\person{Willberg} +% and~\person{Forssman}~\cite{Willberg:1997}. +% +% +% \section{What You Need} +% +% Not much: +% \begin{enumerate} +% \item \LaTeXe{} (at least the 1994/12/01~release) +% \item Only for the example file: +% \begin{enumerate} +% \item The \package{babel}~package +% \item The \package{textcomp}~package and the companion fonts +% \end{enumerate} +% Both packages nowadays are ``required'' parts of~\LaTeXe{} and +% included with every good distribution. +% \end{enumerate} +% +% +% \section{Loading} +% +% Load the package with: +%\begin{verbatim} +% \usepackage{cooking} +%\end{verbatim} +% +% +% \section{Options} +% +% \DescribeMacro{bf} +% There are two package options that can be used to change the font +% of the ingredients: +% \DescribeMacro{it} +%\begin{verbatim} +% \usepackage[bf]{cooking} +%\end{verbatim} +% which uses bold face and +%\begin{verbatim} +% \usepackage[it]{cooking} +%\end{verbatim} +% which uses italic fonts. The latter is the default and can thus +% be omitted. +% +% \DescribeMacro{nopage} +% There are two further package options controlling the page breaks +% between recipes: +% \DescribeMacro{newpage} +%\begin{verbatim} +% \usepackage[nopage]{cooking} +%\end{verbatim} +% allows recipes anywhere on the page, whereas +%\begin{verbatim} +% \usepackage[newpage]{cooking} +%\end{verbatim} +% forces a new page after each recipe. The latter is the default. +% +% +% \section{Usage} +% +% \DescribeMacro{recipe} +% Recipes are written inside \env{recipe}~environments, which +% requires one argument, the recipe title: +%\begin{verbatim} +% \begin{recipe}{} +% +% \end{recipe} +%\end{verbatim} +% \DescribeMacro{\ingredient} +% The text of the recipe usually consists of various ingredients +% and the corresponding step: +%\begin{verbatim} +% \ingredient{} +% \ingredient{} +% \ingredient{} +% \ingredient{} +% ... +%\end{verbatim} +% Note that there is no need to specify a step. In this way it is +% possible to list several ingredients, e.\,g.\ spices. The step +% can be divided into paragraphs by blank lines, as usual. +% +% \DescribeMacro{\energy} +% All these commands take one mandatory argument and do what you +% \DescribeMacro{\sidedish} +% would expect: They typeset the energy content (in~kJ), recommend a +% \DescribeMacro{\hint} +% sidedish, give a hint, typeset the preparation time and propose +% \DescribeMacro{\preparationtime} +% modifications of the recipe. They can only be used inside the +% \env{recipe}~environment. +% \DescribeMacro{\modification} +%\begin{verbatim} +% \energy{3500} +% \sidedish{Potatoes} +% \hint{Always use fresh vegetables} +% \preparationtime{30 minutes} +% \modification{You can also use beef instead of pork} +%\end{verbatim} +% However, the ``standard''~text of these commands is written in +% german, so foreign users have to adapt them. This is explained +% in the next section. +% +% \DescribeMacro{\pagestyle} +% The package also provides a new pagestyle that suits to the +% layout of the recipes. You can select this pagestyle with: +%\begin{verbatim} +% \pagestyle{recipe} +%\end{verbatim} +% +% +% \section{Customization} +% +% \DescribeMacro{\recipemargin} +% A crucial point of the layout chosen for the recipes is the width +% of the column used for the ingredients (more precisely: the +% horizontal position of the start of the right-hand column). The +% default value of~|0.35\columnwidth| is pretty good, but this of +% course depends on the font used, the verbosity used to describe +% the ingredients etc. So you can change the width as usual +% in~\LaTeX{} like this: +%\begin{verbatim} +% \setlength{\recipemargin}{5cm} +%\end{verbatim} +% Absolute measures like this, however, should be avoided, because +% they are less flexible if you change the page margins or the font +% size. +% +% \DescribeMacro{\ingredientfont} +% The font used for the ingredients can be changed, not only via +% package options mentioned in section~``Loading'': +%\begin{verbatim} +% \renewcommand*{\ingredientfont}{\scshape} +%\end{verbatim} +% Of course, this would be a very bad choice, because a caps and +% small caps font needs by far too much space for a reasonable line +% breaking in the ingredients column. +% +% \DescribeMacro{\recipeendhook} +% If you neither want each recipe on a new page nor recipe after +% recipe, you can set up a hook that is executed at the end of each +% recipe. A simple example would be: +%\begin{verbatim} +% \renewcommand*{\recipeendhook}{\hrulefill} +%\end{verbatim} +% +% \DescribeMacro{\recipetitlefont} +% Normally the recipe title is typeset larger, ragged right and +% with the same font as the ingredients. Feel free to change +% it. Some typographical remarks: Many people like bold face for +% the ingredients and the title. In my opinion it is however not +% necessary to emphasize these things so strongly. The two-colomn +% layout makes the distinction between ingredient and step an easy +% one and the title already looks different because of size +% \emph{and} shape. Bold face does not further help the +% reader. And in almost all cases you should use the same font for +% title and ingredients. Less is more. OK. And now something for +% you strange guys out there: \winkey +%\begin{verbatim} +% \renewcommand*{\recipetitlefont}{% +% \centering\tiny\ttfamily\itshape +% } +%\end{verbatim} +% +% \DescribeMacro{\recipetitle} +% If you do not like the layout of the recipe title at all, you can +% redefine the \cmd{\recipetitle}~command, which is used internally +% by the \env{recipe}~environment and takes one mandatory argument, +% the recipe title as passed to the \env{recipe}~environment. As +% usual, a stupid example: +%\begin{verbatim} +% \renewcommand*{\recipetitle}[1]{\marginpar{#1}} +%\end{verbatim} +% +% \DescribeMacro{\energy, ...} +% As an example for the customization of these little commands, I +% will provide an english translation of the default definitions: +%\begin{verbatim} +% \renewcommand*{\energy}[1]{% +% \item #1\,kJ per helping% +% } +% \renewcommand*{\sidedish}[1]{% +% \item[Sidedish] #1% +% } +% \renewcommand*{\hint}[1]{% +% \item[Hint] #1% +% } +% \renewcommand*{\preparationtime}[1]{% +% \item[Preparation time] #1% +% } +% \renewcommand*{\modification}[1]{% +% \item[Modification] #1% +% } +%\end{verbatim} +% +% +% \section{Example} +% +% Run the example file~\file{kraut.tex} through~\LaTeX. Sorry, it +% is written in german. My knowledge of the english language is +% too poor, I am not able to translate a recipe.\footnote{Perhaps +% you agree: In my humble opinion this is one of the most +% difficult problems when learning a language. Remember yourself +% explaining famous dishes of your country to those strange foreign +% exchange students? \winkey} +% +% However, if you can get hold of a german-speaking person, you +% definitely should, the recipe is really worth it. But be +% prepared: Even native speakers sometimes do not know the meaning +% of~``Rauchenden''. A synonym is~``Landj\"ager'' +% or~``Schinkenmettwurst''. ``Semmelbr\"osel'' could also be +% replaced by~``Paniermehl''. \smiley +% +% And, of course: If you tried the dish, please send me a mail. I +% am very interested in opinions about it. +% +% \section{Implementation} +% +% +% \iffalse +%<*driver> +\documentclass[12pt,a4paper]{ltxdoc} +\begin{document} + \DocInput{cooking.dtx} +\end{document} +% +% \fi +% \StopEventually{% +% \addcontentsline{toc}{section}{References} +% \begin{thebibliography}{1} +% \bibitem{Goossens:1994} +% \textsc{Goossens, M.; Mittelbach, F.; Samarin, A.}: \emph{Der +% \LaTeX-Begleiter}. \newblock Addison-Wesley, Bonn, 1st edn., +% 1994. +% \bibitem{Gromzik:1996} +% \textsc{Gromzik, J.; Reich, C.; Sander, C.} (ed.): +% \emph{Dr.~Oetker Schulkochbuch -- Das Original}. \newblock +% Ceres, Bielefeld, 1996. +% \bibitem{Willberg:1997} +% \textsc{Willberg, H.\,P.; Forssman, F.}: +% \emph{Lesetypographie}. \newblock Schmidt, Mainz, 1997. +% \end{thebibliography} +% } +% \iffalse +%<*package> +% \fi +% +% +% \subsection{Identification} +% +% This package uses the \source{*}-form +% of~\cmd{\DeclareRobustCommand}, so it will not work with the very +% first \LaTeXe~release. +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e}[1994/12/01]% +% \end{macrocode} +% The package identifies itself with its release date, a version +% number, and a short description. +% \begin{macrocode} +\ProvidesPackage{cooking}[% + 1999/06/24 v0.9b Cooking recipes% +]% +% \end{macrocode} +% +% +% \subsection{Initialization} +% +% \begin{macro}{\recipemargin} +% This initializes the position of the main axis of the layout. The +% value~``0.35'' is chosen such that the left column looks not too +% ragged but does not occupy too much space. Trust my experience. +% \winkey +% \begin{macrocode} +\newlength{\recipemargin}% +\setlength{\recipemargin}{0.35\columnwidth}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ingredientfont} +% This initializes the font used for ingredients. The default +% value will be set later by means of package options. +% \begin{macrocode} +\DeclareRobustCommand*{\ingredientfont}{\@empty}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\recipeendhook} +% This is the command to be executed after every recipe. Its +% default value will be set later by means of package options. +% \begin{macrocode} +\DeclareRobustCommand*{\recipeendhook}{\@empty}% +% \end{macrocode} +% \end{macro} +% +% +% \subsection{Option Declaration} +% +% \begin{macro}{bf} +% \begin{macro}{it} +% These options change the font used for ingredients. +% \begin{macrocode} +\DeclareOption{bf}{% + \renewcommand*{\ingredientfont}{\bfseries}% +}% +\DeclareOption{it}{% + \renewcommand*{\ingredientfont}{\itshape}% +}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{nopage} +% \begin{macro}{newpage} +% These options set up the hook that is executed at the end of each +% recipe. +% \begin{macrocode} +\DeclareOption{nopage}{% + \renewcommand*{\recipeendhook}{\@empty}% +}% +\DeclareOption{newpage}{% + \renewcommand*{\recipeendhook}{\newpage}% +}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% +% \subsection{Option Processing} +% +% By default, italics are used for the ingredients and each recipe +% starts on a new page. If you specify contradicting options +% like~\option{[it,bf]}, the last one ``wins''. +% \begin{macrocode} +\ExecuteOptions{it,newpage}% +\ProcessOptions*% +% \end{macrocode} +% +% +% \subsection{Defining Commands} +% +% \begin{macro}{\recipetitlefont} +% Normally, the title of the recipe is typeset with the font used +% also for the ingredients. It should be sufficient to use one +% font for both kinds of text. +% \begin{macrocode} +\DeclareRobustCommand*{\recipetitlefont}{% + \raggedright\large\ingredientfont +}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\recipetitle} +% This command is used for the title of the recipe. There is no +% need to use it directly because it will be called by the +% \env{recipe}~environment automatically. Nevertheless I decided +% not to make it an internal command because you will hack it +% anyway. \winkey +% \begin{macrocode} +\DeclareRobustCommand*{\recipetitle}{% + \@startsection{recipetitle}{1}{\recipemargin}% + {3.5ex plus 1ex minus 0.2ex}{2.3ex plus 0.2ex}% + {\recipetitlefont}*% +}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\energy} +% \begin{macro}{\sidedish} +% \begin{macro}{\hint} +% \begin{macro}{\preparationtime} +% \begin{macro}{\modification} +% These commands will probably be redefined by everyone, even +% german users. They are meant as examples for logical markup. +% \begin{macrocode} +\DeclareRobustCommand*{\energy}[1]{% + \item Pro Portion ca.~#1\,kJ% +}% +\DeclareRobustCommand*{\sidedish}[1]{\item[Beilage] #1}% +\DeclareRobustCommand*{\hint}[1]{\item[Tip] #1}% +\DeclareRobustCommand*{\preparationtime}[1]{% + \item[Zubereitungszeit] #1% +}% +\DeclareRobustCommand*{\modification}[1]{% + \item[Abwandlung] #1% +}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macro}{\ingredient} +% \cmd{\item}~commands are used for nearly everything. In order to +% obtain a clearer logical markup, ingredients are typeset with +% this command. It takes one mandatory argument, guess what: the +% ingredient. The extra level of grouping makes life easier if you +% want to use my \package{units} or \package{nicefrac}~package for +% the ingredients. \smiley +% \begin{macrocode} +\DeclareRobustCommand*{\ingredient}[1]{\item[{#1}]}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@make@ingredient} +% If the ingredient takes more than one line, the description of +% what to do with it continues on the bottom-most line of the +% ingredient column. By means of~|\hspace{0pt}| hyphenation of the +% very first word in the ingredient column is +% enabled~\cite[p.\,134]{Goossens:1994}. +% \begin{macrocode} +\DeclareRobustCommand*{\@make@ingredient}[1]{% + \begin{minipage}[b]{\labelwidth}% + \vspace{\parsep}% + \raggedleft\ingredientfont\hspace{0pt}#1% + \end{minipage}% +}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{recipe} +% This is the environment used for all the recipes. It takes one +% mandatory argument, the title of the recipe, which is typeset +% immediatly. +% \begin{macrocode} +\newenvironment{recipe}[1]{% + \recipetitle{#1}% +% \end{macrocode} +% The recipe is typeset as a list. The left-hand column contains +% the ingredients, the right-hand column the things to do with +% these ingredients. The vertical spacing is quite compact. +% \begin{macrocode} + \begin{list}% + {}% + {% + \setlength{\topsep}{0ex}% + \setlength{\partopsep}{0ex}% + \setlength{\leftmargin}{\recipemargin}% + \setlength{\labelwidth}{\recipemargin}% + \setlength{\labelsep}{1em}% + \addtolength{\labelwidth}{-\labelsep}% + \setlength{\itemsep}{0ex}% + \renewcommand*{\makelabel}[1]{% + \@make@ingredient{##1}% + }% +% \end{macrocode} +% At the end of the environment the hook is executed. +% \begin{macrocode} + }% +}{% + \end{list}% +% \recipeendhook +}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ps@recipe} +% The package also defines a pagestyle for recipes. It uses the +% axis defined by~\cmd{\recipemargin} because a centered page +% number does not work well with this layout. +% \begin{macrocode} +\DeclareRobustCommand*{\ps@recipe}{% + \let\@mkboth\@gobbletwo + \let\@oddhead\@empty + \let\@evenhead\@empty + \renewcommand*{\@oddfoot}{% + \normalfont\hspace{\recipemargin}\thepage\hfill + }% + \let\@evenfoot\@oddfoot +}% +% \end{macrocode} +% \end{macro} +% \iffalse +% +% \fi +% \Finale +% \iffalse +%<*testfile> +\documentclass[12pt,a4paper]{article} +\usepackage[german]{babel} +\usepackage{cooking,textcomp} +\pagestyle{recipe} +\begin{document} +\begin{recipe}{Ungarischer Sauerkrautauf"|lauf (6~Portionen)} +\ingredient{30\,g~Butter oder Margarine} zerlassen. +\ingredient{500\,g~Sauerkraut} lo"cker zupfen, kurze Zeit im Fett + erhitzen. +\ingredient{125\,ml~Wasser} +\ingredient{2~kleine Lorbeerbl"atter} hinzuf"ugen, mit +\ingredient{Salz} +\ingredient{frisch gemahlenem Pfeffer} +\ingredient{1~Prise Zu"cker} w"urzen, das Sauerkraut gar d"unsten lassen + (es darf keine Br"uhe mehr vorhanden sein). + + Das Sauerkraut mit Salz, Pfeffer und Zu"cker abschme"cken. +\ingredient{500\,ml~Wasser} mit +\ingredient{125\,g~Langkornreis (parboiled)} in den Topf geben, einige + Minuten quellen lassen. +\ingredient{1/2\,TL~Salz} zuf"ugen, Reis auf h"ochster Stufe zum Kochen + bringen, etwa 2~Minuten kochen lassen. Herdplatte ausschalten und den + Topf mit einem De"ckel bede"cken. Reis 15~Minuten quellen lassen, bis er + das Wasser aufgenommen hat. + + Abtropfen lassen, mit kaltem Wasser "ubergie"sen, zum Auf"|lo"ckern + umr"uhren. +\ingredient{1~mittelgro"se Zwiebel} abziehen, w"urfeln. +\ingredient{20\,g~Margarine} zerlassen, +\ingredient{500\,g~Gehacktes (halb Rind"~, halb Schweinefleisch)} mit + Salz und Pfeffer w"urzen, mit den Zwiebelw"ur"-feln in dem Fett unter + st"andigem R"uhren anbraten, dabei die Fleischkl"umpchen mit einer Gabel + zerdr"u"cken, dann den Reis unterheben. +\ingredient{2~Rauchenden (200\,g)} waschen, in Scheiben + schneiden. Sauerkraut, Gehacktes, Rauchenden abwechselnd lagenweise in + eine gefettete Auf"|lauf"|form schichten, die oberste Schicht soll aus + Sauerkraut bestehen. +\ingredient{1~Becher (150\,g) Cr\`eme fra\^\i che} mit +\ingredient{250\,ml~Schlagsahne} verr"uhren, "uber den Auf"|lauf gie"sen, + mit +\ingredient{20\,g~Semmelbr"oseln} bestreuen. +\ingredient{25\,g~Butter} in Fl"ockchen darauf setzen. Die Form auf + dem Rost in den Backofen schieben. Ober"~/""Unterhitze: + 220\,\textcelsius, Hei"sluft: 200\,\textcelsius. +\item[Backzeit] Etwa 30~Minuten +\sidedish{Br"otchen, Bier} +\energy{3\,300} +\end{recipe} +\end{document} +% +% \fi +\endinput diff --git a/Master/texmf-dist/source/latex/cooking/cooking.ins b/Master/texmf-dist/source/latex/cooking/cooking.ins new file mode 100644 index 00000000000..306a291797d --- /dev/null +++ b/Master/texmf-dist/source/latex/cooking/cooking.ins @@ -0,0 +1,54 @@ +% +% cooking.ins +% Batch file, run through LaTeX. +% +% Copyright (C) 1999 Axel Reichert +% See the files README and COPYING. +% +\input docstrip.tex +% +\declarepreamble\package + +LaTeX package for cooking recipes + +Copyright (C) 1999 Axel Reichert +See the files README and COPYING. + +\endpreamble +% +\declarepreamble\testfile + +LaTeX sample file for the cooking package + +Copyright (C) 1999 Axel Reichert +See the files README and COPYING. + +\endpreamble +% +\keepsilent +% +\generate{% + \usepreamble\package + \file{cooking.sty}{\from{cooking.dtx}{package}}% + \usepreamble\testfile + \file{kraut.tex}{\from{cooking.dtx}{testfile}}% +}% +% +\Msg{**************************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by LaTeX:} +\Msg{*} +\Msg{* \space\space cooking.sty} +\Msg{*} +\Msg{* To produce the documentation and an example, run the} +\Msg{* following files through LaTeX:} +\Msg{*} +\Msg{* \space\space cooking.dtx (three times)} +\Msg{* \space\space kraut.tex} +\Msg{*} +\Msg{* Happy TeXing!} +\Msg{*} +\Msg{**************************************************************} +% +\endbatchfile -- cgit v1.2.3