			Notes on compiling and binding
			        Tim Kovacs
			    22 September 2012

-- Compile this with pdflatex (twice, to help ensure the thumb indexes appear)

-- This does not compile on my ubuntu latex distribution 
   (pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian) or icy's
   pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6))
   - The problem is with a single line in this file marked: % DOES NOT COMPILE UNDER LINUX
   - It does compile with pdflatex from MacTex-2012 http://www.tug.org/mactex/

-- Making an A4 version is simple. Making an A5 version is more complex.

-- A4 vs. A5 versions
   - compiling with pdflatex produces an A4 version, suitable for onscreen viewing or printing
   - to produce an A5 booklet version, postprocess the A4 PDF file using the pdfbook utility
     (see pdfbook-source) with the command:
     ./pdfbook -2 booklet.pdf a5.pdf
   - this is still prined on A4 paper, but each page only takes 1/2 of one side of A4
   - the A5 version takes half as many sheets of paper and has the
     page order changed so it can be folded into an A5 size booklet
     and stapled along the fold, or cut along the fold and bound in
     some other way (e.g. wire or glue)
   - the A5 version is not suitable for viewing online as the page order has been changed
     and only makes sense when it's bound
   - For how to convert to A5 with latex (as opposed to pdflatex) see
     http://kom.aau.dk/net/guides/latex.html

-- Binding A5 versions
   - There are kinds of binding: 
     - staple binding: fold the A4 sheets in half and staple along the folds
     - other bindings: cut the A4 sheets in half and bind them with glue, wire etc.
   - staple binding has constraints that cutting does not, because with cutting you
     can throw away some pages without throwing away others

   - when staple binding the A5 version must be printed double-sided,
     otherwise the booklet would be twice as long, half the pages
     would be blank, and it would alternate between blank and
     not-blank pages

   - When staple binding, the file must be a multiple of 4 pages.
     - A double-sided A4 sheet has 4xA5 pages on it
     - this means the booklet's page length is either a multiple of 4 or there are some
       blank pages. Any blank pages should occur just before local-info.tex. This means
       they must be inserted explicitly. Otherwise they'll appear at the very end (the
       back cover), just because we've printed all the contents on earlier pages.
     - The \aFourVersion{} command removes a couple of "notes" pages near the end in order
       to make the length a multiple of 4.

   - If cutting the pages then we can discard blank sheets. In this
     case the length only needs to be a multiple of 2, not 4.
     

Design notes
------------

-- Each session file (e.g. session-tue1.tex) is included twice, once
without abstracts and then once with abstracts.

In between, some latex commands are redefined so that the abstracts do
or do not get included. Redefining the latex commands is messy, and we
need to do it twice for every day (except the first when we use the
default and then define them once).

A cleaner approach would have been to have separate .tex files with
and without abstracts. To avoid updating both manually, a script could
be used to copy the version with abstracts to a new version and strip
out the abstracts. This would also simplify the .sty file as instead
of having e.g. 3 commands for session headers, we'd only need 2. The 3
are:

sessionHeader
sessionHeaderNoAbstract
sessionHeaderWithAbstract

The first only calls one of the others. If we handled the versions
with and without abstracts in separate files, then the script which
generates the version without abstracts could also replace calls to
sessionHeaderWithAbstracts to sessionHeaderNoAbstracts.


-- An extension to the above is possible. To give an overview of what
was going on in a room, we generated a version of each session as an
A4 page, to post next to the room's entrance. This was done by copying
the files in sessions/ and editing them. That would have been easier
if each session had its own file, but several are lumped into one
file. It could also perhaps have been done by using a script to
process the session file.
