\documentclass[a4paper,12pt,twoside]{book}

\usepackage{bierbook-style}
% All required packages should be included in bierbook-style

\newcommand{\expotitle}{
	% makes the title page
	\thispagestyle{empty}
	\centering
	\ 
	\vspace{3cm}\\
	{\Large Cambridge University Caving Club}
	\vspace{3cm}\\
	{\Huge \bf Expo \the\year}
	\vspace{3cm}\\
	\textgoth{\fontsize{100}{120}\selectfont Sesh Book}
	\vspace{6cm}\\
	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 Ordered \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 Attending? \and Allergies? \and Dessert \and Notes \\
\toprule
\endfirsthead
Name \and Attending? \and Allergies? \and Dessert \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}
\midrule
%
\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{document}

\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

\newcounter{seshcount}
\newcounter{seshlines}
\stepcounter{seshcount}
\def\and{&}
\whiledo{\value{seshcount}<21}{
	\sesh{\theseshcount}
	\stepcounter{seshcount}
}

\blankpage{Sesh Quotes}
\blankpage{}
\blankpage{}

\dinnerlist

\end{document}
