I use pdfroff a lot. I also use gpresent a lot. I process most of my writing using a set of makefiles to automate a task.
The problem is that gpresent _needs_ PostScript input, while pdfroff removes PostScript and leaves PDF only. That doesn't help, because it's an exception to the rules in my makefiles. For gpresent I would have to use regular groff and "home cooked" PDF markup macros (which I had for quite a time, but pdfroff is much better). To cut a long story short, I defined PDFROFF in my makefiles as pdfroff2. Pdfroff2 is a slightly changed pdfroff script. I also have defined PDFROFFOPTS ?= --no-toc-relocation --leave-postscript-only So I always simply use ${PDFROFF} ${PDFROFFOPTS} ... The patch against 1.19.2 that creates pdfroff2 is attached below. Keith is this acceptable to you? Can it become a part of a regular pdfroff? Best regards, Zvezdan Petkovic
--- pdfroff Sat May 27 21:52:40 2006 +++ pdfroff2 Sat May 27 21:58:18 2006 @@ -145,6 +145,7 @@ help reference-dictionary no-reference-dictionary stylesheet pdf-output no-pdf-output version report-progress no-toc-relocation + leave-postscript-only " # Parse the command line, to identify 'pdfroff' specific options. # Collect all other parameters into new argument and file lists, @@ -266,6 +267,10 @@ --no-toc-relocation) TC_DATA="" TOC_FORMAT="" BODY_FORMAT="" ;; + + --leave-postscript-only) + LEAVE_POSTSCRIPT_ONLY="YES" + ;; # # any other non-null match must have matched more than one defined case, # so report the ambiguity, and bail out. @@ -541,15 +546,22 @@ # In all cases, a final 'groff' pass is required, to format the document body. # $SAY >&2 $n "Formatting document ... body section ..$c" - eval $STREAM $GROFF_STYLE $BODY_FORMAT $REFCOPY $INPUT_FILES > $BD_DATA - $SAY >&2 ". done" + if test -n "$LEAVE_POSTSCRIPT_ONLY" + then + eval $STREAM $GROFF_STYLE $BODY_FORMAT $REFCOPY $INPUT_FILES + $SAY >&2 ". done" + exit 0 + else + eval $STREAM $GROFF_STYLE $BODY_FORMAT $REFCOPY $INPUT_FILES > $BD_DATA + $SAY >&2 ". done" + fi # # Finally ... # Invoke GhostScript as a PDF writer, to bind all of the generated # PostScript intermediate files into a single PDF output file. # $SAY >&2 $n "Writing PDF output ..$c" - PDFWRITE="$GS -dQUIET -dBATCH -dNOPAUSE -sDEVICE=pdfwrite" + PDFWRITE="$GS -dSAFER -dQUIET -dBATCH -dNOPAUSE -sDEVICE=pdfwrite" # # (This 'sed' script is a hack, to eliminate redundant blank pages). #
_______________________________________________ Groff mailing list Groff@gnu.org http://lists.gnu.org/mailman/listinfo/groff