[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff-commit] groff/contrib/pdfmark ChangeLog pdfroff.man pdf...
From: |
Keith Marshall |
Subject: |
[Groff-commit] groff/contrib/pdfmark ChangeLog pdfroff.man pdf... |
Date: |
Fri, 14 Jul 2006 23:48:35 +0000 |
CVSROOT: /cvsroot/groff
Module name: groff
Changes by: Keith Marshall <keithmarshall> 06/07/14 23:48:35
Modified files:
contrib/pdfmark: ChangeLog pdfroff.man pdfroff.sh
Log message:
* pdfroff.sh (PDFWRITE): Local shell variable replaced...
(PDFROFF_POSTPROCESSOR_COMMAND): by this new environment
variable...
(GROFF_GHOSTSCRIPT_INTERPRETER): with this bound to it.
(PDFROFF_COLLATE, PDFROFF_KILL_NULL_PAGES): New environment
variables.
(--no-kill-null-pages): New command line option; implement it,
and...
(--help): Add description for it.
* pdfroff.man (PDFROFF_POSTPROCESSOR_COMMAND): Document it.
(PDFROFF_COLLATE, PDFROFF_KILL_NULL_PAGES): Document them.
(--no-kill-null-pages): Document it.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/pdfmark/ChangeLog?cvsroot=groff&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/pdfmark/pdfroff.man?cvsroot=groff&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/pdfmark/pdfroff.sh?cvsroot=groff&r1=1.10&r2=1.11
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/contrib/pdfmark/ChangeLog,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- ChangeLog 12 Jun 2006 05:58:34 -0000 1.17
+++ ChangeLog 14 Jul 2006 23:48:35 -0000 1.18
@@ -1,3 +1,23 @@
+2006-07-14 Keith Marshall <address@hidden>
+
+ * pdfroff.sh (PDFWRITE): Local shell variable replaced...
+ (PDFROFF_POSTPROCESSOR_COMMAND): by this new environment variable...
+ (GROFF_GHOSTSCRIPT_INTERPRETER): with this bound to it.
+ (PDFROFF_COLLATE, PDFROFF_KILL_NULL_PAGES): New environment variables.
+ (--no-kill-null-pages): New command line option; implement it, and...
+ (--help): Add description for it.
+
+ * pdfroff.man (PDFROFF_POSTPROCESSOR_COMMAND): Document it.
+ (PDFROFF_COLLATE, PDFROFF_KILL_NULL_PAGES): Document them.
+ (--no-kill-null-pages): Document it.
+
+2006-07-14 Zvezdan Petkovic <address@hidden>
+
+ * pdfroff.sh (--emit-ps): New command line option; implement it.
+ (--help): Add description for it.
+
+ * pdfroff.man (--emit-ps): Document it.
+
2006-06-11 Werner LEMBERG <address@hidden>
* pdfroff.man: Add `.ig' block after NAME section to make mandb
Index: pdfroff.man
===================================================================
RCS file: /cvsroot/groff/groff/contrib/pdfmark/pdfroff.man,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- pdfroff.man 14 Jul 2006 23:35:37 -0000 1.6
+++ pdfroff.man 14 Jul 2006 23:48:35 -0000 1.7
@@ -103,6 +103,7 @@
.opta W name
.opt -emit-ps
.opt -no-toc-relocation
+.opt -no-kill-null-pages
.opte -stylesheet name
.optx -pdf-output name
.optx -reference-dictionary name
@@ -344,6 +345,22 @@
when processing any document which lacks an automatically
generated table of contents.
.TP
+.B \-\-no\-kill\-null\-pages
+While preparing for simulation of the manual collation step,
+which is traditionally required to relocate of a
+.I "table of contents
+to the start of a document,
+.B pdfroff
+will accumulate a number of empty page descriptions
+into the intermediate
+.I PostScript
+output stream.
+During the final collation step,
+these empty pages are normally discarded from the finished document;
+this option forces
+.B pdfroff
+to leave them in place.
+.TP
.BI \-\-pdf\-output= name
Specifies the name to be used for the resultant PDF document;
if unspecified, the PDF output is written to standard output.
@@ -401,6 +418,113 @@
to modify the behaviour of
.BR pdfroff .
.TP
+.B PDFROFF_COLLATE
+Specifies the program to be used
+for collation of the finshed PDF document.
+.IP
+This collation step may be required to move
+.I tables of contents
+to the start of the finished PDF document,
+when formatting with traditional macro packages,
+which print them at the end.
+However,
+users should not normally need to specify
+.BR PDFROFF_COLLATE ,
+(and indeed,
+are not encouraged to do so).
+If unspecified,
+.B pdfroff
+will use
+.BI sed (@MAN1EXT@)
+by default,
+which will normally suffice.
+.IP
+If
+.B PDFROFF_COLLATE
+.I is
+specified,
+then it must act as a filter,
+accepting a list of file name arguments,
+and write its output to the
+.I stdout
+stream,
+whence it is piped to the
+.BR PDFROFF_POSTPROCESSOR_COMMAND ,
+to produce the finished PDF output.
+.IP
+When specifying
+.BR PDFROFF_COLLATE ,
+it will normally be necessary to also specify
+.BR PDFROFF_KILL_NULL_PAGES .
+.IP
+.B PDFROFF_COLLATE
+is ignored,
+if
+.B pdfroff
+is invoked with the
+.I \-\-no\-kill\-null\-pages
+option.
+.TP
+.B PDFROFF_KILL_NULL_PAGES
+Sepcifies options to be passed to the
+.B PDFROFF_COLLATE
+program.
+.IP
+It should not normally be necessary to specify
+.BR PDFROFF_KILL_NULL_PAGES .
+The internal default is a
+.BI sed (@MAN1EXT@)
+script,
+which is intended to remove completely blank pages
+from the collated output stream,
+and which should be appropriate in most applications of
+.BR pdfroff .
+However,
+if any alternative to
+.BI sed (@MAN1EXT@)
+is specified for
+.BR PDFROFF_COLLATE ,
+then it is likely that a corresponding alternative specification for
+.B PDFROFF_KILL_NULL_PAGES
+will be required.
+.IP
+As in the case of
+.BR PDFROFF_COLLATE ,
+.B PDFROFF_KILL_NULL_PAGES
+is ignored,
+if
+.B pdfroff
+is invoked with the
+.I \-\-no\-kill\-null\-pages
+option.
+.TP
+.B PDFROFF_POSTPROCESSOR_COMMAND
+Specifies the command to be used for the final document conversion
+from PostScript intermediate output to PDF.
+It must behave as a filter,
+writing its output to the
+.I stdout
+stream,
+and must accept an arbitrary number of
+.I files ...
+arguments,
+with the special case of
+.I \-
+representing the
+.I stdin
+stream.
+.IP
+If unspecified,
+.B PDFROFF_POSTPROCESSOR_COMMAND
+defaults to:
+.RS 2
+.IP
+.I
+.ad l
+.nohy gs \-dBATCH \-dQUIET \-dNOPAUSE \-sDEVICE=pdfwrite \-sOutputFile=\-
+.ad
+.RE
+.TP
.B GROFF_TMPDIR
Identifies the directory in which
.B pdfroff
@@ -425,6 +549,14 @@
.B groff
PostScript output to PDF.
If
+.B PDFROFF_POSTPROCESSOR_COMMAND
+is specified,
+then the command name it specifies is
+.I implicitly
+assigned to
+.BR GROFF_GHOSTSCRIPT_INTERPRETER ,
+overriding any explicit setting specified in the environment.
+If
.B GROFF_GHOSTSCRIPT_INTERPRETER
is not specified, then
.B pdfroff
Index: pdfroff.sh
===================================================================
RCS file: /cvsroot/groff/groff/contrib/pdfmark/pdfroff.sh,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- pdfroff.sh 14 Jul 2006 23:35:37 -0000 1.10
+++ pdfroff.sh 14 Jul 2006 23:48:35 -0000 1.11
@@ -126,6 +126,16 @@
exit 1
fi
#
+# Identify the postprocessor command, for writing PDF output.
+# (May be forced, by defining PDFROFF_POSTPROCESSOR_COMMAND in the environment;
+# if this is not set, leave blank to use the built in default).
+#
+ if test -n "${PDFROFF_POSTPROCESSOR_COMMAND}"
+ then
+ GROFF_GHOSTSCRIPT_INTERPRETER=`set command
${PDFROFF_POSTPROCESSOR_COMMAND};
+ echo $2`
+ fi
+#
# Set up temporary/intermediate file locations.
#
WRKFILE=${GROFF_TMPDIR=${TMPDIR-${TMP-${TEMP-"."}}}}/pdf$$.tmp
@@ -152,7 +162,7 @@
help reference-dictionary no-reference-dictionary
stylesheet pdf-output no-pdf-output
version report-progress no-toc-relocation
- emit-ps keep-temporary-files
+ emit-ps keep-temporary-files no-kill-null-pages
"
# Parse the command line, to identify 'pdfroff' specific options.
# Collect all other parameters into new argument and file lists,
@@ -209,13 +219,15 @@
the default GhostScript PDF writer.
--pdf-output=name
- Write the PDF output stream to file 'name'; if this
option
- is unspecified, standard output is used for PDF output.
+ Write the PDF, (or PostScript), output stream to file
+ 'name'; if this option is unspecified, standard output
+ is used for PDF, (or PostScript), output.
--no-pdf-output
- Suppress the generation of PDF output entirely; use this
- with the --reference-dictionary option, if processing a
- document stream to produce only a reference dictionary.
+ Suppress the generation of PDF, (or PostScript), output
+ entirely; use this with the --reference-dictionary
option,
+ if processing a document stream to produce only a
+ reference dictionary.
--no-reference-dictionary
Suppress the generation of a '$CMD' reference dictionary
@@ -244,6 +256,11 @@
normally required to position the table of contents at
the
start of a PDF document.
+ --no-kill-null-pages
+ Suppress the 'null page' elimination filter, which is
used
+ to remove the excess blank pages produced by the
collation
+ algorithm used for 'toc-relocation'.
+
--keep-temporary-files
Suppress the normal clean up of temporary files, which
is
scheduled when 'pdfroff' completes.
@@ -266,7 +283,7 @@
;;
--emit-ps)
- PDFWRITE="$CAT"
+ PDFROFF_POSTPROCESSOR_COMMAND="$CAT"
;;
--pdf-output)
@@ -292,6 +309,10 @@
--no-toc-relocation)
TC_DATA="" TOC_FORMAT="" BODY_FORMAT=""
;;
+
+ --no-kill-null-pages)
+ PDFROFF_COLLATE="$CAT" PDFROFF_KILL_NULL_PAGES=""
+ ;;
#
# any other non-null match must have matched more than one defined
case,
# so report the ambiguity, and bail out.
@@ -575,10 +596,10 @@
# PostScript intermediate files into a single PDF output file.
#
$SAY >&2 $n "Writing PDF output ..$c"
- if test -z "$PDFWRITE"
+ if test -z "$PDFROFF_POSTPROCESSOR_COMMAND"
then
- PDFWRITE="$GS -dQUIET -dBATCH -dNOPAUSE -sDEVICE=pdfwrite
- -sOutputFile="${PDF_OUTPUT-"-"}
+ PDFROFF_POSTPROCESSOR_COMMAND="$GS -dQUIET -dBATCH -dNOPAUSE
+ -sDEVICE=pdfwrite -sOutputFile="${PDF_OUTPUT-"-"}
elif test -n "$PDF_OUTPUT"
then
@@ -587,7 +608,7 @@
#
# (This 'sed' script is a hack, to eliminate redundant blank pages).
#
- $SED '
+ ${PDFROFF_COLLATE-"$SED"} ${PDFROFF_KILL_NULL_PAGES-'
:again
/%%EndPageSetup/b finish
/%%Page:/{
@@ -598,8 +619,8 @@
:finish
N
/^%%Page:.*0 *Cg *EP/d
- ' $TC_DATA $BD_DATA | $PDFWRITE $CS_DATA -
+ '} $TC_DATA $BD_DATA | $PDFROFF_POSTPROCESSOR_COMMAND $CS_DATA -
$SAY >&2 ". done"
#
#
------------------------------------------------------------------------------
-# $RCSfile: pdfroff.sh,v $ $Revision: 1.10 $: end of file
+# $RCSfile: pdfroff.sh,v $ $Revision: 1.11 $: end of file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Groff-commit] groff/contrib/pdfmark ChangeLog pdfroff.man pdf...,
Keith Marshall <=