diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/mensa-tex/README.md | 7 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/mensa-tex/mensa-tex-doc.pdf | bin | 0 -> 67735 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/mensa-tex/mensa-tex-doc.tex | 554 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/mensa-tex/mensa-tex.cls | 518 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpkg-ctan-check | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc | 1 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/mensa-tex.tlpsrc | 0 |
7 files changed, 1081 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/mensa-tex/README.md b/Master/texmf-dist/doc/latex/mensa-tex/README.md new file mode 100644 index 00000000000..2628673cd3c --- /dev/null +++ b/Master/texmf-dist/doc/latex/mensa-tex/README.md @@ -0,0 +1,7 @@ +# mensa-tex +A LaTeX class for typesetting school cafeteria menus consisting of two lunches (with dessert) and dinner + +This work, consisting of the files `mensa-tex.cls` and `mensa-tex-doc.tex`, is licensed under the LPPL, Version 1.3c (or, at your option, any later version) +Current maintainer of the work is Sebastian Friedl. + +mensa-tex requires LaTeX2e and depends on the packages `array`, `colortbl`, `datetime2`, `datetime2-calc`, `geometry`, `graphicx`, `lmodern`, `textcomp` and `xcolor` diff --git a/Master/texmf-dist/doc/latex/mensa-tex/mensa-tex-doc.pdf b/Master/texmf-dist/doc/latex/mensa-tex/mensa-tex-doc.pdf Binary files differnew file mode 100644 index 00000000000..f843ff1961e --- /dev/null +++ b/Master/texmf-dist/doc/latex/mensa-tex/mensa-tex-doc.pdf diff --git a/Master/texmf-dist/doc/latex/mensa-tex/mensa-tex-doc.tex b/Master/texmf-dist/doc/latex/mensa-tex/mensa-tex-doc.tex new file mode 100644 index 00000000000..3edd579cf23 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mensa-tex/mensa-tex-doc.tex @@ -0,0 +1,554 @@ +%% This is file 'mensa-tex-doc.tex', Version 2017-09-23 +%% Copyright 2017 Sebastian Friedl <sfr682k@t-online.de> +%% +%% This work may be distributed and/or modified under the conditions of the LaTeX Project +%% Public License, either version 1.3c of this license or (at your option) any later version. +%% The latest version of this license is available at +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX version 2008-05-04 or later. +%% +%% This work has the LPPL maintenance status 'maintained'. +%% Author: Sebastian Friedl +%% Current maintainer of this work is Sebastian Friedl +%% +%% This work consists of the files mensa-tex.cls and mensa-tex-doc.tex +%% +%% --------------------------------------------------------------------------------------------------------------------------------------------- +%% +%% A LaTeX class for typesetting school cafeteria menus consisting of two lunches (with dessert) and dinner +%% +%% --------------------------------------------------------------------------------------------------------------------------------------------- +%% +%% Please report bugs and other problems as well as suggestions for improvements to the following email address: sfr682k@t-online.de +%% +%% --------------------------------------------------------------------------------------------------------------------------------------------- + + +% !TeX spellcheck = en_US +% !TeX program=lualatex + + + +\documentclass[11pt]{ltxdoc} + +\usepackage[utopia]{mathdesign} +\usepackage[no-math]{fontspec} + +\usepackage{polyglossia} +\setdefaultlanguage{english} +\usepackage[english]{selnolig} + +\usepackage{array} +\usepackage{csquotes} +\usepackage{hyperref} +\usepackage{multicol} +\usepackage{textcomp} +\usepackage{xcolor} + + +\parindent 0pt + +\setmainfont[Numbers=OldStyle]{erewhon} +\setsansfont[Numbers=OldStyle,Scale=MatchLowercase]{Source Sans Pro} +\setmonofont[Numbers=OldStyle,Scale=MatchLowercase]{Source Code Pro} + +\usepackage[left=4.50cm,right=2.75cm,top=3.25cm,bottom=2.75cm,nohead]{geometry} + +\hyphenation{} + +\title{The \texttt{mensa-tex} class \\ {\large\url{https://github.com/SFr682k/mensa-tex}}} +\author{Sebastian Friedl \\ \href{mailto:sfr682k@t-online.de}{\ttfamily sfr682k@t-online.de}} +\date{2017/09/23} + +\hypersetup{pdftitle={The mensa-tex class},pdfauthor={Sebastian Friedl}} + +\begin{document} + \maketitle + \thispagestyle{empty} + + \begin{center} \itshape + \enquote{I can't go to a restaurant and order food \\ because I keep looking at the fonts on the menu} \\ + --- \textsc{\upshape Donald E. Knuth} --- + \end{center} + + \medskip + \begin{abstract} + \noindent% + A \LaTeX\ class for typesetting school cafeteria menus consisting of two lunches (with dessert) and dinner + \end{abstract} + + + \tableofcontents + + \clearpage + + + + \subsection*{Dependencies and other requirements} + \addcontentsline{toc}{subsection}{Dependencies and other requirements} + The \texttt{mensa-tex} class requires \LaTeXe\ and the following packages: + \begin{multicols}{3}\ttfamily\centering + array \\ colortbl \\ datetime2 \\ datetime2-calc \\ geometry \\ graphicx \\ lmodern \\ textcomp \\ xcolor + \end{multicols} + + + \subsection*{License} + \begin{small} + \addcontentsline{toc}{subsection}{License} + \textcopyright\ 2017 Sebastian Friedl + + \smallskip + This work may be distributed and/or modified under the conditions of the \LaTeX\ Project Public License, either version 1.3c of this license or (at your option) any later version. + + \smallskip + The latest version of this license is available at \url{http://www.latex-project.org/lppl.txt} and version 1.3c or later is part of all distributions of \LaTeX\ version 2008-05-04 or later. + + \smallskip + This work has the LPPL maintenance status \enquote*{maintained}. The current maintainer of this work is Sebastian Friedl. \\ + This work consists of the following files: + \begin{itemize} \itemsep 0pt + \item \texttt{mensa-tex.cls} and + \item \texttt{mensa-tex-doc.tex} + \end{itemize} + \end{small} + + + \subsection*{Call for cooperation} + \addcontentsline{toc}{subsection}{Call for cooperation} + Please report bugs and other problems as well as suggestions for improvements by using the \href{https://github.com/SFr682k/mensa-tex/issues}{issue tracker on GitHub} or sending an email to \href{mailto:sfr682k@t-online.de}{\texttt{sfr682k@t-online.de}}. + + + \clearpage + + + + % DOCUMENTATION PART ---------------------------------------------------------------------- + + \section{Using the \texttt{\textbackslash documentclass} command} \label{sec:docclass} + Using this class is as easy as using the \verb|\documentclass{mensa-tex}| command. + + \bigskip + Following class options are available: + \begin{itemize} + \item[\texttt{app}] Use a layout optimized for small screens using DIN/ISO A6 paper + \item[\texttt{en-GB}] Use an English localization, British variant \textit{(default)} + \item[\texttt{en-US}] Use an English localization, American variant + \item[\texttt{german}] Use a German localization + \end{itemize} + + + + \section{Creating a menu} + This section deals with creating a menu using \texttt{mensa-tex}. \\ + \textit{\color{red} All the commands described in this section are to be used inside the preamble} since the menu gets created instantly when using \verb|\begin{document}|. + + \subsection{Setting up the basic information} + The basic information consists of the name of the cafeteria, the institute (or school) it is located at and the image used on the single pages. \\ + It can be set by using the following commands: + + \medskip + \DescribeMacro{\mensaname} + This command is used to declare the name of the cafeteria -- maybe something like \verb|\mensaname{Food Corner}| \textit{(default is the plain old boring \enquote{Mensa})}. \\ + You may want to change the font size by using arbitrary \LaTeX\ font size commands. + + \medskip + \DescribeMacro{\institute} + Sets the name of the institute the cafeteria is located at -- for example, you can insert \verb|\institute{University of LOL}| in your preamble if your cafeteria is located at some institute called the \enquote{University of LOL}. \\ + Note that information about the institute is only printed when using the normal layout. + + \medskip + \DescribeMacro{\setimage} + Add an image to your diet plans using this command. \\ + Note that you \textit{have} to declare the image by using the \verb|\includegraphics| inside \verb|\setimage| (e.~g.~\verb|\setimage{\includegraphics[width=\linewidth]{path/to/picture}}|). \\ + The space available for the image depends on the used layout (see table \ref{tab:image-sizes}). + + \begin{table}[b]\centering\sffamily\small\renewcommand{\arraystretch}{1.25} + \begin{tabular}{r*{2}{|>{\centering\ttfamily}m{.25\textwidth}<{\arraybackslash}}} + & \textsf{normal layout} & app \textsf{layout} \tabularnewline\hline\hline + width & \verb|.50\textwidth| \newline $\approx$ \verb|9.0cm| & \verb|.58\textwidth| \newline $\approx$ \verb|4.9cm| \tabularnewline\hline + height & \verb|.15\textheight| \newline $\approx$ \verb|4.0cm| & \verb|.15\textheight| \newline $\approx$ \verb|1.9cm| + \end{tabular} + + \rmfamily + \caption{Available space for the header image} + \label{tab:image-sizes} + \end{table} + + + \subsection{Adding food} + For adding information about the food, the commands described in this subsection are provided. + + \medskip + \DescribeMacro{\startdate} + This commands defines the \enquote{start date}, the date of the first entry \textit{(the start date's weekday mostly happens to be a Monday)}. The start date has to be present in \textsf{YYYY-MM-DD} format, e.~g.~\verb|\startdate{2007-01-01}| \textit{(Default is 2001-01-01)}. + + \medskip + \DescribeMacro{\monday}\DescribeMacro{\tuesday}\DescribeMacro{\wednesday}\DescribeMacro{\thursday}\DescribeMacro{\friday} + Use these five commands to insert food into the empty diet. \\ + Every single command requires the same four arguments: + \begin{multicols}{4} + \begin{enumerate}\itemsep0pt + \item Menu I + \item Menu II + \item Dessert + \item Lunch + \end{enumerate} + \end{multicols} + + For example, to obtain Monday's menu consisting of + \begin{multicols}{2} + \begin{tabbing} + \hspace{2cm}\=\kill + Menu I: \> Fish and chips \\ + Menu II: \> Crispy fried chicken \\ + Dessert: \> Chocolate fudge \\ + Lunch: \> DIY hamburgers + \end{tabbing} + \end{multicols} + you have to write \\ + \verb|\monday{Fish and chips}% <-- % is required when| \\\nopagebreak[4] + \verb| {Crispy fried chicken}% commands are continued| \\\nopagebreak[4] + \verb| {Chocolate fudge}% in the following line| \\\nopagebreak[4] + \verb| {DIY hamburgers}| + + \smallskip + It is possible to insert the command listed above without line breaks, however, doing so will result in the source being less human--readable. + + \smallskip + Due to the menu being implemented in a \texttt{tabular} environment, you have to use \verb|\linebreak| instead of \,\verb|\\|\, to produce additional lines. \\ + Possible, additional hyphenations not found by \LaTeX\ can be marked by manually inserting discretionary hyphens (\verb|\-|) (e.~g.~\verb|hyphen\-ation|). + + + \subsection{Adding additional information} + \subsubsection{Remarks at the bottom of the page} \label{sec:remarks} + Some people may want to insert some remarks or annotations at the bottom of the page. \\ + These remarks are defined using two commands, depending on the used layout. + + \medskip + \DescribeMacro{\longremarks} + This command defines the remarks used for the normal layout. \\ + They may be quite short (like \verb|\longremarks{Try it!}|) or very, very long. + + \medskip + \DescribeMacro{\shortremarks} + This command defines the remarks used for the \texttt{app}--Layout \\ + Maybe, you should reduce the font size by inserting arbitrary \LaTeX\ font size commands (e.~g.~\verb|\shortremarks{\footnotesize Now using a smaller font size}|) + + + \subsubsection{Remarks for additive ingredients} + When food contains additive ingredients, these additive ingredients are usually indicated by adding superscript figures. \\ + You have to insert the legend manually by using remarks (see section \ref{sec:remarks}). + + \medskip + \DescribeMacro{\sup} + This command is a shortcut providing access to the \verb|\textsuperscript| command. \\ + It can be used to produce a superscript 4 with \verb|\sup{4}|. + + + \subsubsection{Symbols for vegetarian and vegan food} + Due to the recent development I decided to declare symbols for labeling vegetarian and vegan food. \\ + However, you have to insert the legend manually by using remarks (see section \ref{sec:remarks}). + + \medskip + \DescribeMacro{\vgt} + Produces a symbol consisting of one green leaf ({\color{green!50!black}\textleaf}) for labeling vegetarian food + + \medskip + \DescribeMacro{\vgn} + Produces a symbol consisting of two green leaves ({\color{green!50!black}\textleaf\textleaf}) for labeling vegan food + + \medskip + Since the leaf symbol is obtained by loading the \texttt{textcomp} package and using the \verb|{\rmfamily\textleaf}| command, please avoid packages loading another roman font not supporting this symbol. This should not be a big limitation since the class only uses sans--serif fonts. \\ + Otherwise, \verb|\vgt| and \verb|\vgn| have to be redefined. + + + \subsection{Using fancy colors} + To avoid a very boring look of the menu, some parts can be highlighted by using colors. \\ + The class defines three colors: one for the background of certain boxes, another one for the text inside these boxes and a third one for structure text. + + \subsubsection{Changing colors} + Colors can be changed globally by using three commands. The colors themselves are described using the normal syntax of the \texttt{xcolor} package. + + \medskip + \DescribeMacro{\setbgcolor} + Changes the background color of certain boxes (e.~g. \verb|\setbgcolor{blue}|) + + \medskip + \DescribeMacro{\setcolorfg} + Changes the color of text inside these colored boxes (e.~g. \verb|\setcolorfg{white}|) + + \medskip + \DescribeMacro{\setctextcolor} + Changes the color of structure text (e.~g. \verb|\setctextcolor{red}|) + + + \subsubsection{A short note about color selection} + Please ensure, that the colors set with \verb|\setbgcolor| and \verb|\setcolorfg| are distinctive enough from each other. \verb|\setbgcolor{black}| and \verb|\setcolorfg{black!85}| are usually a very, very bad choice when being used together. \\ + Also, a clear difference between \verb|\setctextcolor| and the background of the sheet of paper is recommended. + + + \subsubsection{Using class--defined colors in normal text} + The colors defined with \verb|\setbgcolor|, \verb|\setcolorfg| and \verb|\setctextcolor| can be used with \verb|\color| and other color commands. \\ + The corresponding defined colors are called \verb|\bgcolor|, \verb|\colorfg| and \verb|\ctextcolor|. + + \medskip + Examples: \verb|\color{\bgcolor}|, \verb|\color{\colorfg}| and \verb|\color{\ctextcolor}| + + + + \section{How to add support for other languages} + Currently, the class natively supports English (GB/US) and German. \\ + However, with the instructions in this section, you are able to define additional localizations yourself. \\ + It is recommended to select the localization closest to your localization by using the class options described in section \ref{sec:docclass} \textit{before} redefining commands (see the examples in table \ref{tab:locals-example}). \\ + Code described in this section is to be placed \textit{before} the \verb|\begin{document}| command. \\ + Only redefine commands when necessary. + + % TODO: Table with example of pre-defined localizations + \begin{table}\centering\sffamily\renewcommand{\arraystretch}{1.25} + \begin{tabular}{r*{3}{|>{\centering}p{.2\textwidth}<{\arraybackslash}}} + & \texttt{en-GB} & \texttt{en-US} & \texttt{german} \tabularnewline \hline\hline + \verb|\menuname| & \multicolumn{2}{c|}{Menu} & Menü \tabularnewline \hline + \verb|\dessertname| & \multicolumn{2}{c|}{Dessert} & Dessert \tabularnewline \hline + \verb|\dinnername| & \multicolumn{2}{c|}{Dinner} & Abendessen \tabularnewline \hline + \verb|\dietname| & \multicolumn{2}{c|}{Weekly menu} & Speiseplan vom \tabularnewline \hline + \verb|\shortdate| & 18/09/17 & 09/18/17 & 18.09. \tabularnewline \hline + \verb|\dowshortdate| & Monday, 18/09/17 & Monday, 09/18/17 & Montag, 18.09.17 \tabularnewline \hline + \verb|\longdate| & 18/09/2017 & 09/18/2017 & 18.09.2017 \tabularnewline \hline + \verb|\daterange| & 18/09/17\,--\,22/09/17 & 09/18/17\,--\,09/22/17 & 18.09.\,--\,22.09.2017 + \end{tabular} + + \rmfamily + \caption{Examples for natively supported localizations} + \label{tab:locals-example} + \end{table} + + + + + \subsection{Weekday names} + Weekday names are stored in the \verb|\wdayname| and \verb|\swdayname| commands. \\ + To modify them, copy the code printed below into your preamble and replace the English weekday names (and their abbreviations) with the appropriate form of your localization (but leave the \verb|%|s untouched) + + \medskip + \verb|% Weekday names| \\ + \verb|\renewcommand{\wdayname}[1]{%| \\ + \verb| \ifcase\DTMfetchdow{#1}| \\ + \verb| Monday%| \\ + \verb| \or| \\ + \verb| Tuesday%| \\ + \verb| \or| \\ + \verb| Wednesday%| \\ + \verb| \or| \\ + \verb| Thursday%| \\ + \verb| \or| \\ + \verb| Friday%| \\ + \verb| \or| \\ + \verb| Saturday%| \\ + \verb| \or| \\ + \verb| Sunday%| \\ + \verb| \fi| \\ + \verb|}| + + \bigskip + \verb|% Short weekday names| \\ + \verb|\renewcommand{\swdayname}[1]{%| \\ + \verb| \ifcase\DTMfetchdow{#1}| \\ + \verb| Mon%| \\ + \verb| \or| \\ + \verb| Tue%| \\ + \verb| \or| \\ + \verb| Wed%| \\ + \verb| \or| \\ + \verb| Thu%| \\ + \verb| \or| \\ + \verb| Fri%| \\ + \verb| \or| \\ + \verb| Sat%| \\ + \verb| \or| \\ + \verb| Sun%| \\ + \verb| \fi| \\ + \verb|}| + + + \subsection{Keywords} + There are four keywords stored in separate commands. \\ + To modify them, copy the code printed below into your preamble and replace the English words by vocabulary appropriate for your localization. + + \medskip + \verb|\def\menuname{Menu}| \\ + \verb|\def\dessertname{Dessert}| \\ + \verb|\def\dinnername{Dinner}| \\ + \verb|\def\dietname{Weekly menu}| + + + \subsection{Date formats} + This part is probably the most complicated one when defining own localizations. \\ + Basically, there are four commands that may be redefined: + \begin{itemize} + \item \verb|\shortdate| \\ + The short form of the date (e.~g. 10/11) + + \item \verb|\dowshortdate| \\ + The short form of the date, including the weekday (e.~g. Sat., 10/11) + + \item \verb|\longdate| \\ + The long form of the date (e.~g. 10/11/2012) + + \item \verb|\daterange| \\ + A range between two dates (e.~g. 10/11--14/11/2012) + \end{itemize} + + \medskip + When redefining these commands, you have to assemble the templates available for day, month and year in an order matching the localization. + + \subsubsection*{Date templates} + \begin{itemize} + \item[\sffamily\bfseries DD] + \verb|\DTMtwodigits{\DTMfetchday{#1}}| \\ + Prints the day using two digits \\ + If the day consists of only one digit, a zero is inserted (e.~g. 01 instead of 1) + + \item[\sffamily\bfseries D] + \verb|\DTMfetchday{#1}| \\ + Prints the day using one or two digits + \end{itemize} + + \subsubsection*{Month templates} + \begin{itemize} + \item[\sffamily\bfseries MM] + \verb|\DTMtwodigits{\DTMfetchmonth{#1}}| \\ + Prints the month using two digits + + \item[\sffamily\bfseries M] + \verb|\DTMfetchmonth{#1}| \\ + Prints the month using one or two digits + \end{itemize} + + \subsubsection*{Year templates} + \begin{itemize} + \item[\sffamily\bfseries YYYY] + \verb|\DTMfetchyear{#1}| \\ + Prints the year using as many digits as required + + \item[\sffamily\bfseries YY] + \verb|\DTMtwodigits{\DTMfetchyear{#1}}| \\ + Prints the year using two digits + \end{itemize} + + \subsubsection*{Inserting weekday names} + \begin{tabular}{>{\sffamily\bfseries}rl} + \enquote{normal} weekday names: & \verb|\wdayname{#1}| \\ + short weekday names: & \verb|\swdayname{#1}| + \end{tabular} + + \subsubsection*{Redefining commands using templates} + Now, you only have to redefine the commands. Use the following basic structure: \\ + \verb|\renewcommand{ %% COMMAND %% }[1]{%| \\ + \verb| %% INSERT THE TEMPLATE COMBINATIONS HERE %%| \\ + \verb|}| + + \bigskip + The templates listed above can be combined suitable. \\ + For example, if you want the long date to be displayed in the \textsf{YYYY-MM-DD} format, the following code does the trick: \\ + \verb|\renewcommand{\longdate}[1]{%| \\\nopagebreak[4] + \verb| \DTMfetchyear{#1}% The YYYY template| \\\nopagebreak[4] + \verb| -% Year/month separator| \\\nopagebreak[4] + \verb| \DTMtwodigits{\DTMfetchmonth{#1}}% The MM template| \\\nopagebreak[4] + \verb| -% Month/day separator| \\\nopagebreak[4] + \verb| \DTMtwodigits{\DTMfetchday{#1}}% The DD template| \\\nopagebreak[4] + \verb|}| \pagebreak[0] + + \medskip + The same principle applies to redefinitions of \verb|\shortdate| and \verb|\dowshortdate|. \\ + The \verb|%|s avoid spaces after templates and separators when inserting line breaks. + + \medskip + If you have already redefined \verb|\shortdate| and \verb|\longdate|, you may reuse these definitions when redefining \verb|\dowshortdate|, for example: \\ + \verb|\renewcommand{\dowshortdate}[1]{%| \\\nopagebreak[4] + \verb| \wdayname{#1}% Insert the weekday| \\\nopagebreak[4] + \verb| ,~% Weekday/day seperator (~ = space)| \\\nopagebreak[4] + \verb| \shortdate{#1}% Use the short day template| \\\nopagebreak[4] + \verb|}| \pagebreak[0] + + \bigskip + \textit{Redefining the} \verb|\daterange| \textit{command is special} since it requires two arguments. \\ + Here, you have to use \dots + \begin{itemize} + \item + {\ttfamily\#1} for commands and templates referring to the start date and + + \item + {\ttfamily\#2} for commands and templates referring to the end date + \end{itemize} + + For example, a working redefinition of \verb|\daterange| can be achieved with this code: \\ + \verb|\renewcommand{\daterange}[2]{% <-- »[2]« instead of »[1]«!!| \\\nopagebreak[4] + \verb| \shortdate{#1}% Start date| \\\nopagebreak[4] + \verb| \,--\,% Seperator: -- with spaces| \\\nopagebreak[4] + \verb| \shortdate{#2}% End date: #2 inst. of #1| \\\nopagebreak[4] + \verb|}| + + + + \section{A working example} + \verb|\documentclass[en-US]{mensa-tex}| \\ + + \verb|\usepackage[american]{babel}| \\ + \verb|\usepackage[utf8]{inputenc}| \\ + + \verb|\setbgcolor{blue}| \\ + \verb|\setcolorfg{white}| \\ + \verb|\setctextcolor{red}| \\ + + + + \verb|\institute{Some university far, far away}| \\ + \verb|\mensaname{Café}| \\ + + \verb|\setimage{\includegraphics[width=.95\linewidth]{cafe-logo}}| \\[\bigskipamount] + + + \verb|\startdate{2017-09-18}| \\ + + \verb|\monday{Scrambled Eggs \linebreak\vgt}%| \\ + \verb| {Curry Potato Salad with Peas, Mint \& Red Onion \linebreak\vgn}%| \\ + \verb| {Ice Cream}%| \\ + \verb| {Turkey Burger}| \\ + + \verb|\tuesday{Philly Cheese Steak\sup{1)}}%| \\ + \verb| {Sesame Noodles \linebreak\vgn}%| \\ + \verb| {Donuts}%| \\ + \verb| {Orzo Pasta}| \\ + + \verb|\wednesday{-/-}{-/-}{-/-}{-/-}| \\ + + \verb|\thursday{Buffalo Wings}%| \\ + \verb| {Vegetarian Eggrolls \linebreak\vgt}%| \\ + \verb| {Sacher Cake}%| \\ + \verb| {Chicken Tortilla}| \\ + + \verb|\friday{Pastrami Melt}%| \\ + \verb| {Grilled Cheese \linebreak\vgt}%| \\ + \verb| {Tiramisu}%| \\ + \verb| {Salmon Burger}| \\[\bigskipamount] + + \verb|\longremarks{%| \\ + \verb| {\color{\ctextcolor}| \\ + \verb| Due to a training course of our staff, the café is closed| \\ + \verb| on Wednesday, 09/20/17.}| \\ + + \verb| \medskip| \\ + \verb| In our efforts to sustain a seasonal menu, sometimes| \\ + \verb| substitutions may be required, and menu items may change| \\ + \verb| without notice.| \\ + + \verb| \bigskip| \\ + \verb| \textbf{Key:} \quad| \\ + \verb| \vgt: vegetarian \quad| \\ + \verb| \vgn: vegan \quad| \\ + \verb| \sup{1)}: spicy| \\ + \verb|}| \\ + + \verb|\begin{document}| \\ + \verb|\end{document}| +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/mensa-tex/mensa-tex.cls b/Master/texmf-dist/tex/latex/mensa-tex/mensa-tex.cls new file mode 100644 index 00000000000..21bb6dd8561 --- /dev/null +++ b/Master/texmf-dist/tex/latex/mensa-tex/mensa-tex.cls @@ -0,0 +1,518 @@ +%% This is file 'mensa-tex.cls', Version 2017-09-23 +%% Copyright 2017 Sebastian Friedl <sfr682k@t-online.de> +%% +%% This work may be distributed and/or modified under the conditions of the LaTeX Project +%% Public License, either version 1.3c of this license or (at your option) any later version. +%% The latest version of this license is available at +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX version 2008-05-04 or later. +%% +%% This work has the LPPL maintenance status 'maintained'. +%% Author: Sebastian Friedl +%% Current maintainer of this work is Sebastian Friedl +%% +%% This work consists of the files mensa-tex.cls and mensa-tex-doc.tex +%% +%% --------------------------------------------------------------------------------------------------------------------------------------------- +%% +%% A LaTeX class for typesetting school cafeteria menus consisting of two lunches (with dessert) and dinner +%% +%% --------------------------------------------------------------------------------------------------------------------------------------------- +%% +%% Please report bugs and other problems as well as suggestions for improvements to the following email address: sfr682k@t-online.de +%% +%% --------------------------------------------------------------------------------------------------------------------------------------------- + + + +\ProvidesClass{mensa-tex}[2017/09/23 mensa-tex - a class for typesetting simple school cafeteria menus] + + +% Requires LaTeX2e +\NeedsTeXFormat{LaTeX2e} + +% Basic class: article instead of KOMA-Skript classes (-> less dependencies :D) +\LoadClass[12pt]{article} + + + +% OPTION DECLARATIONS ------------------------------------------------------------------------------------------------------- + +% Print or App version +\newif\if@print +\@printtrue +\DeclareOption{app}{\@printfalse} + +% Use English localization +\newif\if@english +\newif\if@engb +\newif\if@enus +\@englishtrue +\@engbtrue +\@enusfalse +\DeclareOption{en-GB}{% + \@germanfalse + \@englishtrue + \@engbtrue + \@enusfalse} +\DeclareOption{en-US}{% + \@germanfalse + \@englishtrue + \@engbfalse + \@enustrue} + +% Use German localization +\newif\if@german +\@germanfalse +\DeclareOption{german}{% + \@englishfalse + \@germantrue} + +\ProcessOptions + + + +% REQUIRED PACKAGES --------------------------------------------------------------------------------------------------------- + +% Required packages: more features for tables, scaleboxes, more color features and extra symbols +\RequirePackage{array} +\RequirePackage{graphicx} +\RequirePackage[table]{xcolor} +\RequirePackage{textcomp} + +% Date-specific stuff +\RequirePackage{datetime2} +\RequirePackage{datetime2-calc} + +% lmodern is better than cm, but has quite the same look +\RequirePackage{lmodern} + +% Page size and layout: depending on the usage +\if@print \RequirePackage[a4paper,left=1.5cm,right=1.5cm,top=1.5cm,bottom=1.5cm,ignorehead,ignorefoot]{geometry} +\else \RequirePackage[a6paper,left=1cm,right=1cm,top=1cm,bottom=1cm,ignorehead,ignorefoot]{geometry} +\fi + +% No head- and footline +\pagestyle{empty} + +% No indent of the first paragraph +\parindent0pt + +% Uses sans-serif fonts (i. e. Latin Modern Sans) +\renewcommand{\familydefault}{\sfdefault} + + + +% COMMON DEFINITIONS -------------------------------------------------------------------------------------------------------- + +% Storage for the mensa's name +\def\mensaname{} +\def\insertmensaname{Mensa} +\renewcommand{\mensaname}[1]{% + \def\insertmensaname{#1}} + +% Storage for the institute's name +\def\institute{} +\def\insertinstitute{} +\renewcommand{\institute}[1]{% + \def\insertinstitute{#1}} + +% Short syntax for printing the weekday in the table +\def\printday{} +\renewcommand{\printday}[1]{% + \begin{minipage}[b][2.5cm][c]{.75cm}\centering + \swdayname{#1} + \end{minipage}} + +% Shorthand for superscripts +\def\sup{} +\renewcommand{\sup}[1]{\textsuperscript{#1}} + +% Defines a column with horizontal and vertical centered cells +\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}} + +% Defines symbols for vegetarian and vegan food +\def\vgt{{\rmfamily\color{green!50!black}\textleaf}} +\def\vgn{{\rmfamily\color{green!50!black}\textleaf\textleaf}} + + + +% VARIABLES ----------------------------------------------------------------------------------------------------------------- + +% Commands for the dates +\def\startdate{} +\renewcommand{\startdate}[1]{% + \DTMsavedate{monday}{#1} + \DTMsavedate{tuesday}{#1+1} + \DTMsavedate{wednesday}{#1+2} + \DTMsavedate{thursday}{#1+3} + \DTMsavedate{friday}{#1+4} +} + +% Avoids errors when the user forgets to set the start date +\startdate{2001-01-01} + +% Commands and variables for Monday +\def\monday{} +\def\mondayI{} +\def\mondayII{} +\def\mondayA{} +\def\mondayD{} + +% Commands and variables for Tuesday +\def\tuesday{} +\def\tuesdayI{} +\def\tuesdayII{} +\def\tuesdayA{} +\def\tuesdayD{} + +% Commands and variables for Wednesday +\def\wednesday{} +\def\wednesdayI{} +\def\wednesdayII{} +\def\wednesdayA{} +\def\wednesdayD{} + +% Commands and variables for Thursday +\def\thursday{} +\def\thursdayI{} +\def\thursdayII{} +\def\thursdayA{} +\def\thursdayD{} + +% Commands and variables for Friday +\def\friday{} +\def\fridayI{} +\def\fridayII{} +\def\fridayA{} +\def\fridayD{} + +% Variables for the remarks +\def\insertlongremarks{} +\def\insertshortremarks{} + +% Color variables and commands to change them +\def\bgcolor{} +\def\colorfg{} +\def\ctextcolor{} +\def\setbgcolor{} +\def\setcolorfg{} +\def\setctextcolor{} +\renewcommand{\setbgcolor}[1]{\def\bgcolor{#1}} +\renewcommand{\setcolorfg}[1]{\def\colorfg{#1}} +\renewcommand{\setctextcolor}[1]{\def\ctextcolor{#1}} + +% Default colors +\def\bgcolor{white} +\def\colorfg{black} +\def\ctextcolor{black} + +% The image +\def\image{~} +\def\setimage{} +\renewcommand{\setimage}[1]{\def\image{#1}} + + + +% COMMANDS FOR VARIABLE MANAGEMENT ------------------------------------------------------------------------------------------ + +\renewcommand{\monday}[4]{% + \def\mondayI{#1} + \def\mondayII{#2} + \def\mondayD{#3} + \def\mondayA{#4} +} + +\renewcommand{\tuesday}[4]{% + \def\tuesdayI{#1} + \def\tuesdayII{#2} + \def\tuesdayD{#3} + \def\tuesdayA{#4} +} + +\renewcommand{\wednesday}[4]{% + \def\wednesdayI{#1} + \def\wednesdayII{#2} + \def\wednesdayD{#3} + \def\wednesdayA{#4} +} + +\renewcommand{\thursday}[4]{% + \def\thursdayI{#1} + \def\thursdayII{#2} + \def\thursdayD{#3} + \def\thursdayA{#4} +} + +\renewcommand{\friday}[4]{% + \def\fridayI{#1} + \def\fridayII{#2} + \def\fridayD{#3} + \def\fridayA{#4} +} + +\def\longremarks{} +\renewcommand{\longremarks}[1]{\def\insertlongremarks{#1}} + +\def\shortremarks{} +\renewcommand{\shortremarks}[1]{\def\insertshortremarks{#1}} + + + +% REQUIRED IN CONJUNCTION WITH datetime2 - ENGLISH (regionless) LOCALIZATION ------------------------------------------------ + +\if@english + % English weekday names + \def\wdayname{} + \renewcommand{\wdayname}[1]{% + \ifcase\DTMfetchdow{#1} + Monday% + \or + Tuesday% + \or + Wednesday% + \or + Thursday% + \or + Friday% + \or + Saturday% + \or + Sunday% + \fi + } + + % German short weekday names + \def\swdayname{} + \renewcommand{\swdayname}[1]{% + \ifcase\DTMfetchdow{#1} + Mon% + \or + Tue% + \or + Wed% + \or + Thu% + \or + Fri% + \or + Sat% + \or + Sun% + \fi + } + + % English menu name + \def\menuname{Menu} + \def\dessertname{Dessert} + \def\dinnername{Dinner} + \def\dietname{Weekly menu} +\fi + + + +% REQUIRED IN CONJUNCTION WITH datetime2 - ENGLISH (GB) LOCALIZATION -------------------------------------------------------- + +\if@engb + % Print the short version of a saved date + \def\shortdate{} + \renewcommand{\shortdate}[1]{\DTMtwodigits{\DTMfetchday{#1}}/\DTMtwodigits{\DTMfetchmonth{#1}}/\DTMtwodigits{\DTMfetchyear{#1}}} + + % Print the short version of a saved date with the day of week + \def\dowshortdate{} + \renewcommand{\dowshortdate}[1]{\wdayname{#1},~\shortdate{#1}} + + % Print the long version of a saved date with the day of week + \def\longdate{} + \renewcommand{\longdate}[1]{\DTMtwodigits{\DTMfetchday{#1}}/\DTMtwodigits{\DTMfetchmonth{#1}}/\DTMfetchyear{#1}} + + % Print a range of dates + \def\daterange{} + \renewcommand{\daterange}[2]{\shortdate{#1}\,--\,\shortdate{#2}} +\fi + + + +% REQUIRED IN CONJUNCTION WITH datetime2 - ENGLISH (US) LOCALIZATION -------------------------------------------------------- + +\if@enus + % Print the short version of a saved date + \def\shortdate{} + \renewcommand{\shortdate}[1]{\DTMtwodigits{\DTMfetchmonth{#1}}/\DTMtwodigits{\DTMfetchday{#1}}/\DTMtwodigits{\DTMfetchyear{#1}}} + + % Print the short version of a saved date with the day of week + \def\dowshortdate{} + \renewcommand{\dowshortdate}[1]{\wdayname{#1},~\shortdate{#1}} + + % Print the long version of a saved date with the day of week + \def\longdate{} + \renewcommand{\longdate}[1]{\DTMtwodigits{\DTMfetchmonth{#1}}/\DTMtwodigits{\DTMfetchday{#1}}/\DTMfetchyear{#1}} + + % Print a range of dates + \def\daterange{} + \renewcommand{\daterange}[2]{\shortdate{#1}\,--\,\shortdate{#2}} +\fi + + + +% REQUIRED IN CONJUNCTION WITH datetime2 - GERMAN LOCALIZATION -------------------------------------------------------------- + +\if@german + % German weekday names + \def\wdayname{} + \renewcommand{\wdayname}[1]{% + \ifcase\DTMfetchdow{#1} + Montag% + \or + Dienstag% + \or + Mittwoch% + \or + Donnerstag% + \or + Freitag% + \or + Samstag% + \or + Sonntag% + \fi + } + + % German short weekday names + \def\swdayname{} + \renewcommand{\swdayname}[1]{% + \ifcase\DTMfetchdow{#1} + Mo% + \or + Di% + \or + Mi% + \or + Do% + \or + Fr% + \or + Sa% + \or + So% + \fi + } + + % German menu name + \def\menuname{Men\"u} + \def\dessertname{Dessert} + \def\dinnername{Abendessen} + \def\dietname{Speiseplan vom} + + % Print the short version of a saved date + \def\shortdate{} + \renewcommand{\shortdate}[1]{\DTMtwodigits{\DTMfetchday{#1}}.\DTMtwodigits{\DTMfetchmonth{#1}}.} + + % Print the short version of a saved date with the day of week + \def\dowshortdate{} + \renewcommand{\dowshortdate}[1]{\wdayname{#1},~\shortdate{#1}} + + % Print the long version of a saved date with the day of week + \def\longdate{} + \renewcommand{\longdate}[1]{\DTMtwodigits{\DTMfetchday{#1}}.\DTMtwodigits{\DTMfetchmonth{#1}}.\DTMfetchyear{#1}} + + % Print a range of dates + \def\daterange{} + \renewcommand{\daterange}[2]{\shortdate{#1}\,--\,\longdate{#2}} +\fi + + + +% MENU FOR THE WHOLE WEEK --------------------------------------------------------------------------------------------------- + +\if@print + \AtBeginDocument{% + \begin{center} \huge + \color{\ctextcolor}\insertinstitute + \end{center} + % + \bigskip\bigskip + \begin{minipage}[b][.15\textheight][b]{.5\textwidth} \LARGE + \image + \end{minipage} + \begin{minipage}[b][.15\textheight][c]{.48\textwidth}\flushright\huge\color{\ctextcolor} + \scalebox{2}{\Huge \insertmensaname} \\[\bigskipamount] + \dietname \\ + \daterange{monday}{friday} + \end{minipage} + + \setlength{\arrayrulewidth}{1.25pt} + \begin{center} + \rowcolors{2}{\bgcolor!20}{white} + \begin{tabular}{|>{\bfseries}M{0.95cm}*{2}{|M{5cm}}*2{|M{2.4cm}}|} + \hline + \rowcolor{\bgcolor} \vbox to .5cm {} &% + \bfseries{\color{\colorfg} \menuname{} 1} &% + \bfseries{\color{\colorfg} \menuname{} 2} &% + \bfseries{\color{\colorfg} \dessertname{}} &% + \bfseries{\color{\colorfg} \dinnername{}} \tabularnewline \hline + % + \printday{monday} & \mondayI & \mondayII & \mondayD & \mondayA \tabularnewline \hline + \printday{tuesday} & \tuesdayI & \tuesdayII & \tuesdayD & \tuesdayA \tabularnewline \hline + \printday{wednesday} & \wednesdayI & \wednesdayII & \wednesdayD & \wednesdayA \tabularnewline \hline + \printday{thursday} & \thursdayI & \thursdayII & \thursdayD & \thursdayA \tabularnewline \hline + \printday{friday} & \fridayI & \fridayII & \fridayD & \fridayA \tabularnewline \hline + \end{tabular} + \end{center} + + \vfill + {\insertlongremarks}} +\fi + + + +% MENUS FOR MULTIPLE DAYS (when setting the "app" option) ------------------------------------------------------------------- + +\if@print\else + \def\daypage{} + \renewcommand{\daypage}[5]{{% Double braces, otherwise changes on a single page will apply to the whole document + \clearpage + \begin{minipage}[b][.15\textheight][b]{.58\textwidth} + \image + \end{minipage} + \begin{minipage}[b][.15\textheight][b]{.4\textwidth} \flushright + {\LARGE\color{\ctextcolor} \insertmensaname} \\ + {\footnotesize\color{\ctextcolor} #1} \\\vspace{\medskipamount} + \end{minipage} + + \small + \medskip + \begin{minipage}[t][.15\textheight][t]{\textwidth} \centering + \colorbox{\bgcolor}{\hbox to .975\textwidth{\hfill\color{\colorfg}\bfseries \menuname{} 1 \hfill}} \\[\smallskipamount] + #2 + \end{minipage} + \begin{minipage}[t][.15\textheight][t]{\textwidth} \centering + \colorbox{\bgcolor}{\hbox to .975\textwidth{\hfill\color{\colorfg}\bfseries \menuname{} 2 \hfill}} \\[\smallskipamount] + #3 + \end{minipage} + \begin{minipage}[t][.15\textheight][t]{\textwidth} \centering + \colorbox{\bgcolor}{\hbox to .975\textwidth{\hfill\color{\colorfg}\bfseries \dessertname{} \hfill}} \\[\smallskipamount] + #4 + \end{minipage} + \begin{minipage}[t][.15\textheight][t]{\textwidth} \centering + \colorbox{\bgcolor}{\hbox to .975\textwidth{\hfill\color{\colorfg}\bfseries \dinnername{} \hfill}} \\[\smallskipamount] + #5 + \end{minipage} + + \vfill + {\insertshortremarks}} + } + + \AtBeginDocument{% + \daypage{\dowshortdate{monday}}{\mondayI}{\mondayII}{\mondayD}{\mondayA} + \daypage{\dowshortdate{tuesday}}{\tuesdayI}{\tuesdayII}{\tuesdayD}{\tuesdayA} + \daypage{\dowshortdate{wednesday}}{\wednesdayI}{\wednesdayII}{\wednesdayD}{\wednesdayA} + \daypage{\dowshortdate{thursday}}{\thursdayI}{\thursdayII}{\thursdayD}{\thursdayA} + \daypage{\dowshortdate{friday}}{\fridayI}{\fridayII}{\fridayD}{\fridayA} + } +\fi + + + +% END OF FILE --------------------------------------------------------------------------------------------------------------- +\endinput
\ No newline at end of file diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index d994dd1549d..8684ca92290 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -410,7 +410,7 @@ my @TLP_working = qw( mdframed mdputu mdsymbol mdwtools media9 medstarbeamer meetingmins memdesign memexsupp memoir MemoirChapStyles memory mendex-doc mentis - menu menukeys merriweather + mensa-tex menu menukeys merriweather metafont-beginners metago metalogo metaobj metaplot metapost-examples metatex metatype1 metauml method metre metrix diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc index 900097bcd0c..5e81de02064 100644 --- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc @@ -658,6 +658,7 @@ depend medstarbeamer depend meetingmins depend memexsupp depend memory +depend mensa-tex depend menu depend menukeys depend method diff --git a/Master/tlpkg/tlpsrc/mensa-tex.tlpsrc b/Master/tlpkg/tlpsrc/mensa-tex.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/Master/tlpkg/tlpsrc/mensa-tex.tlpsrc |