On 02/25/2012 01:43 PM, Paul Johnson wrote:
I'm generating a lot of slide shows for my statistics class. Sometimes
I forget to run the followup program
to create a compressed version of the presentation. It want to make
that automatic.[1]
When I export a document in pdf from a Beamer slides project, I also
want this shell program to run.
It automatically creates another pdf document that is 4 slides on one page.
#!/bin/bash
pdfnup --nup 2x2 --suffix '2x2' --frame true --batch $1
pdfnup is from package called "pdfjam" on Debian Linux. The output is
awesome, quick, convenient.
I am reading the LyX customization manual about copiers, but I just
can't understand it!
I don't want to destroy the existing copy behavior that writes the PDF
output to the document folder, I just want that additional command to run. But
I don't want this 2x2 PDF type for all PDF I create, just for the Beamer slide
projects.
Copiers are tied to formats, so you will need to create a new format
first. Call it "PDF (beamer)", or something of the sort. When you do,
you can assign a copier program. The copier will have to be responsible
for the actual copying, as well as the conversion you want. Write a
little shell script that takes two arguments, the input file and its
output location. So something like:
#!/bin/bash
INFILE="$1";
OUTFILE="$2";
if [ -z "$OUTFILE" ]; then exit 1; fi
pdfnup -nup 2x2 --suffix 2x2' --frame true --output "$OUTFILE" --batch "$1";
Save it somewhere in your path, say to /home/you/bin/pdfcopier.sh, make
it executable, and then enter
pdfcopier.sh "$$i" "$$o"
into the copier field for your new format.
Richard