mirror of
https://expo.survex.com/repositories/expoweb/.git/
synced 2026-02-14 10:28:26 +00:00
Bierbook and Seshbook tex files recreated from scratch to work directly with pdflatex rather than a roundabout route.
Procedurally generate tables from an external list of names.
This commit is contained in:
@@ -1,125 +1,159 @@
|
||||
%%
|
||||
%% CUCC Expo Sesh Book
|
||||
%%
|
||||
\documentclass[a4paper,12pt,twoside]{book}
|
||||
|
||||
\documentclass[a5paper,10pt]{bb}
|
||||
\usepackage{bierbook-style}
|
||||
% All required packages should be included in bierbook-style
|
||||
|
||||
%\usepackage{pstricks}
|
||||
\usepackage{tabularx}
|
||||
%\usepackage{color}
|
||||
%\usepackage{calc}
|
||||
\usepackage[left=15mm,right=15mm,top=8mm,bottom=20mm]{geometry}
|
||||
%\usepackage{palatino}
|
||||
%\usepackage{grid}
|
||||
%\usepackage{graphpap}
|
||||
%\usepackage{auto-pst-pdf}
|
||||
|
||||
\setlength{\parskip}{1.5ex}
|
||||
\setlength{\parindent}{0pt}
|
||||
|
||||
%\setlength{\unitlength}{9.5pt}
|
||||
|
||||
\usepackage{color}
|
||||
\definecolor{hrulecol}{gray}{0.5}
|
||||
\definecolor{textcol}{gray}{0}
|
||||
|
||||
\usepackage{colortbl}
|
||||
\arrayrulecolor{hrulecol}
|
||||
|
||||
\newcommand{\seshattendees}{%
|
||||
\renewcommand{\arraystretch}{1.5}
|
||||
\begin{tabularx}{\textwidth}{X|l|l}
|
||||
{\bf Attendee}&{\bf Amount owed}&{\bf Amount paid}\\\hline\hline
|
||||
&&\\\hline&&\\\hline&&\\\hline&&\\\hline&&\\\hline&&\\\hline&&\\\hline
|
||||
&&\\\hline&&\\\hline&&\\\hline&&\\\hline&&\\\hline&&\\\hline&&\\\hline
|
||||
&&\\\hline&&\\\hline&&\\\hline&&\\\hline&&\\\hline&&\\\hline&&\\\hline
|
||||
&&\\\hline\hline\raggedleft{\bf Totals}&&
|
||||
\end{tabularx}}
|
||||
\color{textcol}
|
||||
|
||||
\newcommand{\seshdetails}{%
|
||||
|
||||
Please record details of who consumed what, and costs, below.
|
||||
|
||||
\color{hrulecol}
|
||||
\vspace{7.8ex} \hrule \vspace{6ex} \hrule \vspace{6ex} \hrule \vspace{6ex} \hrule
|
||||
\vspace{6ex} \hrule \vspace{6ex} \hrule \vspace{6ex} \hrule \vspace{6ex} \hrule
|
||||
\vspace{6ex} \hrule \vspace{6ex} \hrule \vspace{6ex} \hrule \vspace{6ex} \hrule
|
||||
\vspace{6ex} \hrule \vspace{6ex} \hrule \vspace{6ex} \hrule \vspace{6ex} \hrule
|
||||
\vspace{6ex} \hrule \vspace{6ex} \hrule
|
||||
\color{textcol}
|
||||
\newcommand{\expotitle}{
|
||||
% makes the title page
|
||||
\thispagestyle{empty}
|
||||
\centering
|
||||
\ \vspace{3cm}
|
||||
{\Large Cambridge University Caving Club}
|
||||
\bigskip
|
||||
\vspace{5mm}\\
|
||||
{\Huge \bf Expo \the\year}
|
||||
\vspace{2cm}\\
|
||||
\textgoth{\fontsize{100}{120}\selectfont Sesh Book}
|
||||
\vspace{6 cm}\\
|
||||
The Sesh Book is intended to be taken to every sesh at the Gasthof, so the Bier Book can
|
||||
remain in the Potato Hut.
|
||||
For each sesh, the table recording attendees, amount owed and amount paid is the primary reference for the treasurer and should be completed accurately. The totals give a quick check that everything has been accounted for.
|
||||
The space on the opposite page can be used for recording the details of what each person had, and
|
||||
for tallies etc. Any other details that might make it easier for the treasurer to decipher the receipt
|
||||
should also be noted.
|
||||
\vfill
|
||||
\clearpage
|
||||
}
|
||||
|
||||
\newcommand{\expoheading}[1]{
|
||||
% provides the formatting for a title of a section
|
||||
\vspace{10pt}
|
||||
{\LARGE #1}
|
||||
\vspace{20pt}
|
||||
}
|
||||
|
||||
\newcommand{\sesh}[1]{
|
||||
% argument is the number of the sesh
|
||||
% longtable
|
||||
\begin{longtable}{p{10cm}|p{2cm}|p{2cm}}
|
||||
\multicolumn{3}{l}{\expoheading{Sesh #1 - \ldots/\ldots/\the\year}} \\
|
||||
Attendee \and Amount Owed \and Amount Paid \\
|
||||
\toprule
|
||||
\endhead
|
||||
%
|
||||
\bottomrule
|
||||
Totals \and \and \\
|
||||
\endfoot
|
||||
%
|
||||
\setcounter{seshlines}{0}
|
||||
\whiledo{\value{seshlines}<26}{
|
||||
\and \and \\
|
||||
\midrule
|
||||
\stepcounter{seshlines}
|
||||
}
|
||||
%
|
||||
\and \and \\
|
||||
%
|
||||
\end{longtable}
|
||||
\clearpage
|
||||
\begin{longtable}{p{14cm}}
|
||||
\expoheading{Sesh #1 - Notes} \\
|
||||
Please use this page to record details of the sesh, who ordered what, how much individual items cost, to avoid clutter on the opposite table.\\
|
||||
\end{longtable}
|
||||
\clearpage
|
||||
}
|
||||
|
||||
\newcommand{\dinnerlist}{
|
||||
% no arguments required
|
||||
% longtable, generated from the list of names
|
||||
% uses dinnerline for each line
|
||||
\openin\namesread=names.txt
|
||||
\setcounter{linecount}{0}
|
||||
\begin{longtable}{l|p{3cm}|p{3cm}|p{3cm}|l}
|
||||
\multicolumn{5}{l}{\expoheading{Expo Dinner}} \\
|
||||
\multicolumn{5}{p{\textwidth}}{Please record people's dinner choices here in advance of the expo dinner.}
|
||||
\vspace{1cm}\\
|
||||
Name \and Starter \and Main \and Desert \and Notes \\
|
||||
\toprule
|
||||
\endfirsthead
|
||||
Name \and Starter \and Main \and Desert \and Notes \\
|
||||
\toprule
|
||||
\endhead
|
||||
\bottomrule
|
||||
\endfoot
|
||||
%
|
||||
\stepcounter{linecount}
|
||||
\whiledo{\value{linecount}<\value{maxlines}}{
|
||||
\stepcounter{linecount}
|
||||
\read\namesread to \currentname
|
||||
\dinnerline{\currentname}
|
||||
\midrule
|
||||
}
|
||||
%
|
||||
\read\namesread to \currentname
|
||||
\dinnerline{\currentname}
|
||||
%
|
||||
\end{longtable}
|
||||
\clearpage
|
||||
}
|
||||
|
||||
\newcommand{\dinnerline}[1]{
|
||||
% argument is the name on the line
|
||||
% boxes are a tikz grid
|
||||
\begin{tikzpicture}
|
||||
\pgfmathsetmacro{\wvar}{0.4}
|
||||
\node at (0,0.6*\wvar) [anchor=east] {#1};
|
||||
\node at (0,0) {};
|
||||
\node at (0,2*\wvar) {};
|
||||
\end{tikzpicture}
|
||||
\and
|
||||
\and
|
||||
\and
|
||||
\and
|
||||
\\
|
||||
}
|
||||
|
||||
\newcommand{\blankpage}[1]{
|
||||
% for creating a double page with nothing but a title
|
||||
% longtable to consistent formatting
|
||||
\begin{longtable}{p{\textwidth}}
|
||||
\expoheading{#1} \\
|
||||
\vspace{\textheight} \\
|
||||
\end{longtable}
|
||||
}
|
||||
% \begin{tabularx}{\textwidth}{p{2.5cm}|X|l}
|
||||
% {\bf Who}&{\bf What}&{\bf Cost}\\\hline
|
||||
% &&\\&&\\&&\\&&\\&&\\&&\\&&\\&&\\&&\\
|
||||
% &&\\&&\\&&\\&&\\&&\\&&\\&&\\&&\\&&\\
|
||||
% &&\\&&\\&&\\&&\\&&\\&&\\&&\\&&\\&&
|
||||
% \end{tabularx}}
|
||||
|
||||
\newcommand{\sesh}[1]{\chapter{Sesh #1 ~ --- ~ ~.~.~/~.~.~.~/2014}
|
||||
\seshattendees\newpage\seshdetails}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\newfont{\gothic}{ygoth scaled \magstep5}
|
||||
\thispagestyle{empty}
|
||||
\begin{center}
|
||||
\ \vspace{3cm}\\
|
||||
{\Large Cambridge University Caving Club}\bigskip\\
|
||||
\vspace{5mm}
|
||||
{\Huge \bf Expo 2014}\\
|
||||
\vspace{2cm}
|
||||
{\Huge Sesh Book}\\
|
||||
\vspace{4cm}
|
||||
\vfill
|
||||
\end{center}
|
||||
\newread\namesread
|
||||
\newcounter{maxlines}
|
||||
\newcounter{linecount}
|
||||
\def\and{&}
|
||||
|
||||
\openin\namesread=names.txt
|
||||
\loop\unless\ifeof\namesread
|
||||
\read\namesread to \currentname
|
||||
\stepcounter{maxlines}
|
||||
\repeat
|
||||
\addtocounter{maxlines}{-1}
|
||||
|
||||
\expotitle
|
||||
|
||||
\newpage
|
||||
|
||||
\ \vspace{12cm}\\
|
||||
Revision 1, 10 July 2014.
|
||||
\newpage
|
||||
\newcounter{seshcount}
|
||||
\newcounter{seshlines}
|
||||
\stepcounter{seshcount}
|
||||
\def\and{&}
|
||||
\whiledo{\value{seshcount}<21}{
|
||||
\sesh{\theseshcount}
|
||||
\stepcounter{seshcount}
|
||||
}
|
||||
|
||||
\ \vspace{6 cm}\\
|
||||
The Sesh Book is intended to be taken to every sesh at the Gasthof, so the Bier Book can
|
||||
remain in the Potato Hut.
|
||||
\blankpage{Sesh Quotes}
|
||||
\blankpage{}
|
||||
\blankpage{}
|
||||
|
||||
For each sesh, the table recording attendees, amount owed and amount paid is the primary reference
|
||||
for the treasurer and should be completed accurately. The totals give a quick check that everything
|
||||
has been accounted for.
|
||||
\dinnerlist
|
||||
|
||||
The space on the opposite page can be used for recording the details of what each person had, and
|
||||
for tallies etc. Any other details that might make it easier for the treasurer to decipher the receipt
|
||||
should also be noted.
|
||||
|
||||
\sesh{1}
|
||||
\sesh{2}
|
||||
\sesh{3}
|
||||
\sesh{4}
|
||||
\sesh{5}
|
||||
\sesh{6}
|
||||
\sesh{7}
|
||||
\sesh{8}
|
||||
\sesh{9}
|
||||
\sesh{10}
|
||||
\sesh{11}
|
||||
\sesh{12}
|
||||
\sesh{13}
|
||||
\sesh{14}
|
||||
\sesh{15}
|
||||
\sesh{16}
|
||||
\sesh{17}
|
||||
\sesh{18}
|
||||
\sesh{19}
|
||||
\sesh{20}
|
||||
|
||||
\chapter{Sesh Quotes}
|
||||
|
||||
\newpage\ \newpage
|
||||
\newpage\ \newpage
|
||||
\newpage\ \newpage
|
||||
\newpage\ \newpage
|
||||
\newpage\ \newpage
|
||||
\newpage\ \newpage
|
||||
\newpage\ \newpage
|
||||
\end{document}
|
||||
\end{document}
|
||||
Reference in New Issue
Block a user