On Monday 08 November 2010 15:38:18 Venable wrote:
> Hi all,
> 
> I frequently want to produce three almost-identical PDF versions of
> the same underlying set of beamer slides:
> 
> presentation-notes.pdf, which is a handout (specify handout in
> Document Settings - Class Options - Custom field) but in which I
> include various noteitems to myself (Document Settings - LaTeX
> Preamble: \setbeameroption{show notes})
> 
> presentation-handout.pdf, which, like the notes, is in handout form
> but suppresses the notes, i.e. comments out or removes
> \setbeameroption{show notes} from the preamble
> 
> presentation-slides.pdf which also has no note items but is not a
> handout  (specify handout in Document Settings - Class Options -
> Custom field).
> 
> This is somewhat tedious to do by hand - save-as, change name, change
> the preamble, change the purpose in the Document Class, save again,
> export to pdf - and I have made a few version control mistakes.
> 
> Is it possible to automate this via a command sequence, module or some
> sort of script?
> 
> I have fiddled around but have been stymied by (a) the paucity of
> simple, annotated examples of LFUN command sequences, scripts and the
> like and (b) my own incompetence. Primarily the latter.
> 
> Many thanks in advance.
> 

You could do this the way I personalize eBooks. Put the variable stuff in 
variables (LaTeX commands) within the LyX file's document preamble. Then run a 
script that runs three scripts. Each script does the following:

1) Copy the source doc to a temporary filename
2) Tweak the appropriate variables in the temporary file
3) Run LyX --export PDF on the tempfile
4) Do an appropriate rename on the resulting PDF
5) Delete the temp files and all compilation files
6) Pull up the PDF in a veiwer to make sure it's what you want.

I'd anticipate this could be done by one ultra simple shellscript and three 
fairly simple shellscripts. Once you're sure all scripts always do the right 
thing, you can take out the viewing and have them consecutively execute. It 
would probably take a couple minutes -- a trip to the water fountain.

HTH

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt

Reply via email to