This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Data on PDF vs PS (Was Re: Online docs page should ..) [With prelim patch]
- To: gcc at gcc dot gnu dot org
- Subject: Data on PDF vs PS (Was Re: Online docs page should ..) [With prelim patch]
- From: Jan Vroonhof <vroonhof at math dot ethz dot ch>
- Date: 20 Dec 1999 21:56:58 +0100
[Example at http://www.math.ethz.ch/~vroonhof/gcc.pdf.gz ]
I was browsing the archives of this list and happen to hit on the
discussion about including PDF files on the web site. It seems to me
there was a lack of knowledge of the state of the art of producing PDF
files with free software [apologies if I am misreading those messages]
In particular
1. PDF files [produced with free software] are large and low quality.
2. PDF files [ ..] currently do not offer hyperlinks so are of no
extra value.
3. Producing those PDF files is somehow difficult.
In my opinion these are misconceptions, so I hope the data provided in
this message will clear some stuff up. Feel free to do with it what
you like. A preliminary patch for a "make pdf" target is included at
the end.
Ad 1. Unless you run a current Ghostscript beta, it indeed produces
bloated PDF files. However, for processing texinfo, it is the wrong
tool for the job.
Using pdftex + texinfo.tex from texinfo 4.0 gives (this is the "make
pdf" target in the patch below.)
gcc.pdf 2201833 bytes
gcc.pdf.gz 1497979 bytes
(without hyperlinks gcc.pdf.gz gives about 1380000 bytes)
make dvi + dvips -Pwww (includes scalable fonts)
gcc.ps 3374213 bytes
gcc.ps.gz 1237542 bytes
Both file types are fully scalable. In my experience PDF files
are easier to deal with on non-unix platforms.
Ad 2. With Texinfo 4.0, the pdf files are fully linked, see
http://www.math.ethz.ch/~vroonhof/gcc.pdf.gz
for an example.
Ad 3. On a modern TeX installation (i.e. teTeX 1.0) producing PDF
instead of dvi is a matter of running pdftex instead of normal tex.
Below is an only partially tested patch that provides "make pdf"
support for the core gcc. It could probably be improved by reducing
the code duplication between the dvi and tex cases.
Such a patch would be useful regardless of what gets put on the
website.
diff -ur gcc-2.95.2.old/Makefile.in gcc-2.95.2/Makefile.in
--- gcc-2.95.2.old/Makefile.in Wed Jun 23 00:44:42 1999
+++ gcc-2.95.2/Makefile.in Mon Dec 20 20:18:20 1999
@@ -961,6 +961,7 @@
do-clean \
do-distclean \
do-dvi \
+ do-pdf \
do-info \
do-install-info \
do-installcheck \
@@ -1019,12 +1020,13 @@
# Here are the targets which correspond to the do-X targets.
-.PHONY: info installcheck dvi install-info
+.PHONY: info installcheck dvi pdf install-info
.PHONY: clean distclean mostlyclean maintainer-clean realclean
.PHONY: local-clean local-distclean local-maintainer-clean
info: do-info
installcheck: do-installcheck
dvi: do-dvi
+pdf: do-pdf
# Make sure makeinfo is built before we do a `make info'.
do-info: all-texinfo
diff -ur gcc-2.95.2.old/etc/Makefile.in gcc-2.95.2/etc/Makefile.in
--- gcc-2.95.2.old/etc/Makefile.in Sat May 16 01:52:29 1998
+++ gcc-2.95.2/etc/Makefile.in Mon Dec 20 20:23:25 1999
@@ -33,6 +33,7 @@
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
+TEXI2PDF = texi2pdf
# Where to find texinfo.tex to format documentation with TeX.
TEXIDIR = $(srcdir)/../texinfo
@@ -42,6 +43,7 @@
INFOFILES = standards.info
DVIFILES = standards.dvi
+PDFFILES = standards.pdf
all:
@@ -59,15 +61,19 @@
dvi: $(DVIFILES)
+pdf: $(PDFFILES)
+
standards.info: $(srcdir)/standards.texi $(srcdir)/make-stds.texi
$(MAKEINFO) --no-split -I$(srcdir) -o standards.info $(srcdir)/standards.texi
standards.dvi: $(srcdir)/standards.texi
TEXINPUTS=$(TEXIDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/standards.texi
+standards.pdf: $(srcdir)/standards.texi
+ TEXINPUTS=$(TEXIDIR):$$TEXINPUTS $(TEXI2PDF) $(srcdir)/standards.texi
clean:
- rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
+ rm -f *.aux *.cp *.cps *.dvi *.pdf *.fn *.fns *.ky *.kys *.log
rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
mostlyclean: clean
diff -ur gcc-2.95.2.old/gcc/Makefile.in gcc-2.95.2/gcc/Makefile.in
--- gcc-2.95.2.old/gcc/Makefile.in Fri Aug 13 09:46:55 1999
+++ gcc-2.95.2/gcc/Makefile.in Mon Dec 20 20:03:21 1999
@@ -2290,6 +2290,20 @@
texindex cpp.??
TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex cpp.texi
+pdf: gcc.pdf cpp.pdf lang.pdf
+
+gcc.pdf: $(srcdir)/gcc.texi $(srcdir)/extend.texi $(srcdir)/install.texi \
+ $(srcdir)/invoke.texi $(srcdir)/md.texi $(srcdir)/rtl.texi \
+ $(srcdir)/tm.texi $(srcdir)/gcov.texi
+ TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS pdftex gcc.texi
+ texindex gcc.??
+ TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS pdftex gcc.texi
+
+cpp.pdf: $(srcdir)/cpp.texi
+ TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS pdftex cpp.texi
+ texindex cpp.??
+ TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS pdftex cpp.texi
+
INSTALL: $(srcdir)/install1.texi $(srcdir)/install.texi
cd $(srcdir); $(MAKEINFO) -D INSTALLONLY \
diff -ur gcc-2.95.2.old/gcc/ch/Make-lang.in gcc-2.95.2/gcc/ch/Make-lang.in
--- gcc-2.95.2.old/gcc/ch/Make-lang.in Fri Jun 25 10:26:19 1999
+++ gcc-2.95.2/gcc/ch/Make-lang.in Mon Dec 20 20:44:27 1999
@@ -106,6 +106,7 @@
CHILL.start.encap: chill
CHILL.rest.encap:
CHILL.dvi: chill.dvi
+CHILL.pdf: chill.pdf
CHILL.info: ch/chill.info
@@ -119,6 +120,14 @@
TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex chill.texi
# FIXME: Not sure languages should do this.
cp ch/chill.dvi chill.dvi
+
+chill.pdf: $(srcdir)/ch/chill.texi $(srcdir)/extend.texi $(srcdir)/invoke.texi $(srcdir)/md.texi $(srcdir)/rtl.texi $(srcdir)/tm.texi
+ cd ch ; \
+ TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS pdftex chill.texi ; \
+ texindex chill.?? ; \
+ TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS pdftex chill.texi
+# FIXME: Not sure languages should do this.
+ cp ch/chill.pdf chill.pdf
#
# Install hooks:
# cc1chill is installed elsewhere as part of $(COMPILERS).
@@ -168,7 +177,7 @@
CHILL.extraclean:
CHILL.maintainer-clean:
-rm -f ch/TAGS
- -rm -f ch/chill.info* ch/chill.dvi ch/chill.??s ch/chill.*aux
+ -rm -f ch/chill.info* ch/chill.dvi ch/chill.pdf ch/chill.??s ch/chill.*aux
# CYGNUS LOCAL: Delete locally created file.
-rm -f ch/hash.h
#
diff -ur gcc-2.95.2.old/gcc/ch/Makefile.in gcc-2.95.2/gcc/ch/Makefile.in
--- gcc-2.95.2.old/gcc/ch/Makefile.in Wed Mar 31 09:47:58 1999
+++ gcc-2.95.2/gcc/ch/Makefile.in Mon Dec 20 20:44:59 1999
@@ -61,6 +61,7 @@
SHELL = /bin/sh
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
+TEXI2PDF = texi2pdf
# Define this as & to perform parallel make on a Sequent.
# Note that this has some bugs, and it seems currently necessary
diff -ur gcc-2.95.2.old/gcc/configure.in gcc-2.95.2/gcc/configure.in
--- gcc-2.95.2.old/gcc/configure.in Wed Oct 13 09:58:02 1999
+++ gcc-2.95.2/gcc/configure.in Mon Dec 20 20:45:38 1999
@@ -4226,7 +4226,7 @@
rm -f Make-hooks
touch Make-hooks
target_list="all.build all.cross start.encap rest.encap \
- info dvi \
+ info dvi pdf \
install-normal install-common install-info install-man \
uninstall distdir \
mostlyclean clean distclean extraclean maintainer-clean \
diff -ur gcc-2.95.2.old/gcc/cp/Make-lang.in gcc-2.95.2/gcc/cp/Make-lang.in
--- gcc-2.95.2.old/gcc/cp/Make-lang.in Tue Apr 27 01:50:36 1999
+++ gcc-2.95.2/gcc/cp/Make-lang.in Mon Dec 20 20:31:09 1999
@@ -132,6 +132,7 @@
c++.info:
c++.dvi:
+c++.pdf:
# C++ language-support library pieces for libgcc.
tinfo.o: cc1plus$(exeext) $(srcdir)/cp/tinfo.cc
diff -ur gcc-2.95.2.old/gcc/cp/Makefile.in gcc-2.95.2/gcc/cp/Makefile.in
--- gcc-2.95.2.old/gcc/cp/Makefile.in Sun Jul 25 23:27:38 1999
+++ gcc-2.95.2/gcc/cp/Makefile.in Mon Dec 20 20:31:31 1999
@@ -68,6 +68,7 @@
SHELL = /bin/sh
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
+TEXI2PDF = texi2pdf
# Define this as & to perform parallel make on a Sequent.
# Note that this has some bugs, and it seems currently necessary
diff -ur gcc-2.95.2.old/gcc/f/Make-lang.in gcc-2.95.2/gcc/f/Make-lang.in
--- gcc-2.95.2.old/gcc/f/Make-lang.in Mon Jun 7 08:44:57 1999
+++ gcc-2.95.2/gcc/f/Make-lang.in Mon Dec 20 20:48:33 1999
@@ -52,7 +52,7 @@
# Tell GNU make to ignore these if they exist.
.PHONY: F77 f77 f77.all.build f77.all.cross \
- f77.start.encap f77.rest.encap f77.info f77.dvi \
+ f77.start.encap f77.rest.encap f77.info f77.dvi f77.pdf\
f77.install-normal \
f77.install-common f77.install-info f77.install-man \
f77.uninstall f77.mostlyclean f77.clean f77.distclean \
@@ -250,6 +250,26 @@
TEXINPUTS=$(srcdir)/f:$$TEXINPUTS tex $(srcdir)/f/g77.texi; \
mv g77.dvi f; \
else true; fi
+
+f/g77.pdf: $(srcdir)/f/g77.texi $(srcdir)/f/bugs.texi \
+ $(srcdir)/f/ffe.texi \
+ $(srcdir)/f/g77install.texi $(srcdir)/f/news.texi \
+ $(srcdir)/f/intdoc.texi $(srcdir)/f/root.texi
+ case "$(LANGUAGES)" in \
+ *[fF]77*) touch lang-f77;; \
+ *) rm -f lang-f77;; \
+ esac
+# `tex2dvi' was used below, but the Texinfo 3.12 one won't work properly
+# with the include files from $(srcdir). This use of TEXINPUTS may not
+# be universally valid. `$(TEX)' should be used if it gets defined in
+# gcc/Makefile.in.
+ if [ -f lang-f77 ]; then \
+ TEXINPUTS=$(srcdir)/f:$$TEXINPUTS pdftex $(srcdir)/f/g77.texi; \
+ texindex g77.??; \
+ TEXINPUTS=$(srcdir)/f:$$TEXINPUTS pdftex $(srcdir)/f/g77.texi; \
+ mv g77.dvi f; \
+ else true; fi
+
# This dance is all about producing accurate documentation for g77's
# intrinsics with minimum fuss. f/ansify appends "\n\" to C strings
diff -ur gcc-2.95.2.old/gcc/f/Makefile.in gcc-2.95.2/gcc/f/Makefile.in
--- gcc-2.95.2.old/gcc/f/Makefile.in Wed Dec 16 22:16:32 1998
+++ gcc-2.95.2/gcc/f/Makefile.in Mon Dec 20 20:46:32 1999
@@ -64,6 +64,7 @@
SHELL = /bin/sh
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
+TEXI2DVI = texi2pdf
# Define this as & to perform parallel make on a Sequent.
# Note that this has some bugs, and it seems currently necessary
Only in gcc-2.95.2/gcc/intl: #Makefile.in#
Only in gcc-2.95.2: pdfs