There are many alternatives when it comes to setting up a format for
making slides/handouts/teaching material using LaTeX with beamer.

There are issues with the setup and styling and how best to manage
that.

There are also the issues of creating all the different formats
required: slides for projector, slides for transparencies, handouts in
article format, possibly handouts in n-up format.

There is also the Makefile.  I prefer to not need to edit this at all
when starting a new project: minimum setup time => greater productivity.

The aim is to select a technique that offers the most flexibility with
the easiest setup and the least amount of work to start a new
presentation/workshop.

I think that inputting the header is a good idea; keeping all the
style information in one place (probably the root directory of the
class, e.g., in ~/tafe/pc-hardware for each presentation that exists
in its own directory below.) Perhaps it is better to do all this in a
separate class file.  For now, input a header.  Can rewrite this as a
class if the mood takes me.

The method I used before: (OLD)
===============================

* a separate header for each of beamer, trans and article document
  classes.  (That is clearly grossly inefficient and can be replaced
  with one header).

* One source file (good!)

* Makefile edits source xxx-slide.tex into xxx-slide-trans.tex and
  xxx-slide-handout.tex

Alternative suggested in Beamer manual: (BM)
============================================

* one main file

* one stub file that \inputs the main file, uses appropriate
  document class and uses the appropriate main package

* no header or separate class file, so let's modify to add one.

Modified OLD (MO)
=================

* One header file used for all: beamer-slide-header.tex

* One source file for all: xxx-slides.tex

* Makefile edits source file for each output type.
  * xxx-trans.tex
  * xxx-handout.tex

Modified BM (MB)
=================

* One header file used for all: beamer-slide-header.tex

* One main source file for all: xxx-slides.tex

* Makefile creates the stub files if they don't exist by editing
  templates in the upper directory:
  * xxx-beamer.tex
  * xxx-trans.tex
  * xxx-handout-a5.tex

* It also copies ../template/template.tex to xxx.tex

* Or a little Perl program creates a new project from a template given
  a name (and title?).

Advantages, disadvantages of input header in xxx.tex
----------------------------------------------------

Only one place to modify if decide to use a different scheme (such as
creating packages)

Advantages, disadvantages of input header in stub files
-------------------------------------------------------

If header replaced by class file, then options are set in the header.


The header is input in xxx.tex.  Rationale: specify in only one place.
Make stubs simpler, less trouble to maintain.  Can use packages,
create variables before input the header as well as after.

Advantages/Disadvantages Of Each Method
=======================================

OLD
---

Advantages:
-----------

* Am familiar with it

Disadvantages:
--------------

* Maintaining 3 header files is stupid duplication

BM
---

Advantages:
-----------

* Makefile can be really simple

* Very easy for others to understand (important for collaboration)

Disadvantages:
--------------

* Need tailor each stub file to the project by putting correct name
  for inputting: prefer to automate this.

MB
---

Advantages:
-----------

* Easy for others to understand

* Easy to automate with Makefile or (for Makefile challenged
  collaborators) do manually

Disadvantages:
--------------

MO
---

Advantages:
-----------

* Easy for me (Makefile needs slight modification)

Disadvantages:
--------------

* Others may not understand it very well, and those who do not
  understand sed and make will probably be unable to understand how it
  works without being told explicitly: not so good for collaboration.

OTHER USEFUL TECHNIQUES
=======================

* Allow Makefile to build PDF via ps to use pstricks outside of a
  special environment.  Put a list of files to which this applies
  (empty by default)

* Use ps4pdf (see /usr/share/texmf/doc/latex/ps4pdf/) to use psfrag
  with direct PDF output

CREATING THE TWO-UP HANDOUTS
============================

Currently I do:

xxx-slide.tex ->[sed]-> xxx-slide-handout-a5.tex ->[pdflatex]->
xxx-slide-handout-a5.pdf ->[pdftops]-> xxx-slide-handout-a5.ps
->[psnup -Pa5 -pa4 -2]-> xxx-slide-handout.ps ->[ps2pdf14
-dPDFsettings=/prepress]-> xxx-slide-handout.pdf

* This *may* reduce the quality of output (though I am not sure).

* Consider pdfnup, pdfjoin, pdf90 from the pdfjam package.

* Consider avoiding the workflow:
  xxx-slide.tex ->[sed]-> xxx-slide-handout-a5.tex ->[pdflatex]-> 
  xxx-slide-handout-a5.pdf ->[pdftops]-> xxx-slide-handout-a5.ps
  ->[psnup -Pa5 -pa4 -2]-> xxx-slide-handout.ps ->[ps2pdf14
  -dPDFsettings=/prepress]-> xxx-slide-handout.pdf

  * Instead, try using pgfpages.  From the beamer manual:

    The pgfpages can do all sorts of tricks with pages. The most
important one for printing beamer slides is the following command:

\usepackage{pgfpages}
\pgfpagesuselayout{resize}[a4paper,border shrink=5mm,landscape]

    This says "Resize all pages to landscape A4 pages, no matter what
their original size was, but shrink the pages by 5mm, so that there is
a bit of a border around everything." Naturally, instead of a4paper
you can also use letterpaper or any of the other standard paper
sizes. For further options and details see the documentation of
pgfpages.

    The second thing you might wish to do is to put several slides on
a single page. This can be done as follows:

\usepackage{pgfpages}
\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]

    This says "Put two pages on one page and then resize everything so
that it fits on A4 paper." Note that this time we do not need
landscape as the resulting page is, after all, not in landscape mode.

pgfpages is documented in chapter 16 of the pgfmanual, where is
written the important warning:
Another word of caution: using pgfpages will produce wrong page
numbers in the .aux file.

The solution is to uncomment the following two lines only after first
creating the .aux file by commenting out the following two lines:

\pgfpagesuselayout{2 on 1}[a4paper,landscape]
\nofiles

==============

My conclusion is that pgfpages may be a little bit of trouble to
automate (considering that I already have automated my current clumsy
system!)

It is also a bit of trouble to handle manually, as people may not like
the need to add comments the first run, then remove them for
subsequent runs.  Seems pdfnup may be the better way to go, though it
is less ubiquitous than just pgfpages alone.

With pdfnup, I can do:

xxx-handout-a5.tex ->[pdflatex]-> xxx-handout-a5.pdf
->[pdfnup] -> xxx-handout.pdf

All the sed-ing is handled inside pdfnup itself, which I can fix if it
breaks.

I can add a note on how to use pgfpages manually if a person has
trouble using pdfnup which depends on a Bourne-compatible shell with
various POSIX utilities

PROPOSED SETUP: BM
==================

top directory for the project (i.e., for teaching one subject)
contains:

Makefile

and a directory template which holds the following stub files:

template-handout-a5.tex
template-trans.tex
template-beamer.tex

and 
Makefile.template
template.tex
beamer-slide-header.tex

Note that template.tex inputs beamer-slide-header at the top of
itself, from the current directory.

To start a new topic, in top level directory do:

make xxx

This will create a directory xxx
and into it copy template.tex as xxx.tex,
template-handout-a5.tex as xxx-handout-a5.tex,
template-trans.tex as xxx-trans.tex
template-beamer.tex as xxx-beamer.tex
Makefile.template as Makefile,

editing each file to replace the text "template" with "xxx".
The directory will also contain a symbolic link to
../template/beamer-slide-header.tex

OTHER TOP LEVEL MAKE TARGETS
============================

in top level directory, just doing "make" with no target, or doing
"make all" will build the source in each directory, and "make clean"
will run make clean in each subdirectory, and "make distclean" will
run make distclean in each subdirectory.

Of course, this does not include template directory.
