Have ppt_printout_ps.vbs take the printer name as an argument. default tip
authorShingo W. Kagami
Sun, 19 Sep 2010 05:55:48 +0900
changeset 5105778ace30a
parent 4 8b90d57759c9
Have ppt_printout_ps.vbs take the printer name as an argument.
Misc. changes in Makefile.sample.
tex/Makefile.sample
tex/ppt_printout_ps.vbs
     1.1 --- a/tex/Makefile.sample	Mon Sep 13 03:54:21 2010 +0900
     1.2 +++ b/tex/Makefile.sample	Sun Sep 19 05:55:48 2010 +0900
     1.3 @@ -6,16 +6,18 @@
     1.4  
     1.5  PRN2EPS = c:/cygwin/home/swk/lib/tex/prn2eps.pl
     1.6  PPTPRINT = c:/cygwin/home/swk/lib/tex/ppt_printout_ps.vbs
     1.7 +PRINTER = "Generic PostScript Writer"
     1.8  
     1.9  dvi: $(TARGET).dvi
    1.10  pdf: $(TARGET).pdf
    1.11  
    1.12 -# $(TARGET).pdf: $(TARGET).dvi
    1.13 +#$(TARGET).pdf: $(TARGET).dvi
    1.14  #	dvipsk -Pdl $(TARGET).dvi
    1.15  #	-pdfclose --file $(TARGET).pdf
    1.16  #	cygstart $(TARGET).ps
    1.17  #	@while test ! -e $(TARGET).pdf; do echo -n .; sleep 2; done
    1.18  #	rm $(TARGET).ps
    1.19 +#	pdfopen --file $(TARGET).pdf --back
    1.20  
    1.21  $(TARGET).pdf: $(TARGET).dvi
    1.22  	-pdfclose --file $(TARGET).pdf
    1.23 @@ -27,10 +29,10 @@
    1.24  #	jbibtex $(TARGET)
    1.25  #	platex $(TARGET)
    1.26  	platex $(TARGET)
    1.27 -	grep Warning $(TARGET).log
    1.28 +	-grep Warning $(TARGET).log
    1.29  
    1.30  %.md5: %.prn
    1.31  	$(PRN2EPS) $<
    1.32  
    1.33  %.prn: %.ppt
    1.34 -	wscript $(PPTPRINT) `cygpath -wa $<` `cygpath -wa $*.prn` > $*.note.txt
    1.35 +	wscript $(PPTPRINT) $(PRINTER) `cygpath -wa $<` `cygpath -wa $*.prn` > $*.note.txt
     2.1 --- a/tex/ppt_printout_ps.vbs	Mon Sep 13 03:54:21 2010 +0900
     2.2 +++ b/tex/ppt_printout_ps.vbs	Sun Sep 19 05:55:48 2010 +0900
     2.3 @@ -1,10 +1,12 @@
     2.4 +Dim printer
     2.5  Dim filein
     2.6  Dim fileout
     2.7 -If WScript.Arguments.Count <> 2 then
     2.8 +If WScript.Arguments.Count <> 3 then
     2.9     WScript.quit
    2.10  End If
    2.11 -filein = WScript.Arguments.item(0)
    2.12 -fileout = WScript.Arguments.item(1)
    2.13 +printer = WScript.Arguments.item(0)
    2.14 +filein = WScript.Arguments.item(1)
    2.15 +fileout = WScript.Arguments.item(2)
    2.16  
    2.17  Dim pptApp
    2.18  Dim pptPres
    2.19 @@ -19,7 +21,7 @@
    2.20   .PrintColorType = ppPrintColor
    2.21   .FitToPage = msoFalse
    2.22   .FrameSlides = msoFalse
    2.23 - .ActivePrinter = "Generic PostScript Writer"
    2.24 + .ActivePrinter = printer
    2.25   .PrintInBackground = False 
    2.26  End With
    2.27  pptPres.PrintOut , , fileout