From 44686714a168a1117a294067e0d9943947aeeb7d Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Mon, 15 Jun 2009 15:12:22 +0000 Subject: reorganize texk/dvipng git-svn-id: svn://tug.org/texlive/trunk@13752 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/dvipng/ChangeLog.TL | 29 + Build/source/texk/dvipng/Makefile.am | 91 +-- Build/source/texk/dvipng/Makefile.am.demo | 112 --- Build/source/texk/dvipng/Makefile.in | 767 ++++++++---------- Build/source/texk/dvipng/Makefile.in-1.12 | 168 ---- Build/source/texk/dvipng/Makefile.in.orig | 51 +- Build/source/texk/dvipng/Makefile.in.work | 56 -- Build/source/texk/dvipng/acinclude.m4.orig | 77 -- Build/source/texk/dvipng/aclocal.m4 | 2 + Build/source/texk/dvipng/aclocal.m4-1.12 | 237 ------ Build/source/texk/dvipng/aclocal.m4.orig | 237 ++++++ Build/source/texk/dvipng/color.c | 8 +- Build/source/texk/dvipng/config.h.in | 9 + Build/source/texk/dvipng/configure | 367 ++++++++- Build/source/texk/dvipng/configure.ac-1.12 | 227 ------ Build/source/texk/dvipng/configure.ac.demo | 174 ----- Build/source/texk/dvipng/configure.ac.orig | 241 +++--- Build/source/texk/dvipng/configure.ac.work | 91 --- Build/source/texk/dvipng/doc/Makefile.am | 61 ++ Build/source/texk/dvipng/doc/Makefile.in | 769 ++++++++++++++++++ Build/source/texk/dvipng/doc/dvipng.1 | 508 ++++++++++++ Build/source/texk/dvipng/doc/dvipng.help | 42 + Build/source/texk/dvipng/doc/dvipng.info | 1083 ++++++++++++++++++++++++++ Build/source/texk/dvipng/doc/dvipng.texi | 940 ++++++++++++++++++++++ Build/source/texk/dvipng/doc/install.texi | 203 +++++ Build/source/texk/dvipng/doc/macros.texi | 61 ++ Build/source/texk/dvipng/doc/readme.texi | 161 ++++ Build/source/texk/dvipng/doc/texi2pod.pl | 444 +++++++++++ Build/source/texk/dvipng/draw.c | 2 +- Build/source/texk/dvipng/dvi.c | 8 +- Build/source/texk/dvipng/dvipng-1.12-patches | 353 +++++++++ Build/source/texk/dvipng/dvipng.1 | 508 ------------ Build/source/texk/dvipng/dvipng.help | 42 - Build/source/texk/dvipng/dvipng.info | 1083 -------------------------- Build/source/texk/dvipng/dvipng.test | 17 + Build/source/texk/dvipng/dvipng.texi | 940 ---------------------- Build/source/texk/dvipng/enc.c | 2 +- Build/source/texk/dvipng/font.c | 8 +- Build/source/texk/dvipng/fontmap.c | 8 +- Build/source/texk/dvipng/ft.c | 2 +- Build/source/texk/dvipng/help/Makefile.am | 26 + Build/source/texk/dvipng/help/Makefile.in | 409 ++++++++++ Build/source/texk/dvipng/install.texi | 203 ----- Build/source/texk/dvipng/m4/gs-device.m4 | 51 +- Build/source/texk/dvipng/macros.texi | 61 -- Build/source/texk/dvipng/papersiz.c | 2 +- Build/source/texk/dvipng/pk.c | 8 +- Build/source/texk/dvipng/ppagelist.c | 2 +- Build/source/texk/dvipng/readme.texi | 161 ---- Build/source/texk/dvipng/set.c | 2 +- Build/source/texk/dvipng/sfd.c | 2 +- Build/source/texk/dvipng/special.c | 10 +- Build/source/texk/dvipng/t1.c | 2 +- Build/source/texk/dvipng/texi2pod.pl | 444 ----------- 54 files changed, 6274 insertions(+), 5298 deletions(-) delete mode 100644 Build/source/texk/dvipng/Makefile.am.demo delete mode 100644 Build/source/texk/dvipng/Makefile.in-1.12 delete mode 100644 Build/source/texk/dvipng/Makefile.in.work delete mode 100644 Build/source/texk/dvipng/acinclude.m4.orig delete mode 100644 Build/source/texk/dvipng/aclocal.m4-1.12 create mode 100644 Build/source/texk/dvipng/aclocal.m4.orig delete mode 100644 Build/source/texk/dvipng/configure.ac-1.12 delete mode 100644 Build/source/texk/dvipng/configure.ac.demo delete mode 100644 Build/source/texk/dvipng/configure.ac.work create mode 100644 Build/source/texk/dvipng/doc/Makefile.am create mode 100644 Build/source/texk/dvipng/doc/Makefile.in create mode 100644 Build/source/texk/dvipng/doc/dvipng.1 create mode 100644 Build/source/texk/dvipng/doc/dvipng.help create mode 100644 Build/source/texk/dvipng/doc/dvipng.info create mode 100644 Build/source/texk/dvipng/doc/dvipng.texi create mode 100644 Build/source/texk/dvipng/doc/install.texi create mode 100644 Build/source/texk/dvipng/doc/macros.texi create mode 100644 Build/source/texk/dvipng/doc/readme.texi create mode 100755 Build/source/texk/dvipng/doc/texi2pod.pl delete mode 100644 Build/source/texk/dvipng/dvipng.1 delete mode 100644 Build/source/texk/dvipng/dvipng.help delete mode 100644 Build/source/texk/dvipng/dvipng.info create mode 100755 Build/source/texk/dvipng/dvipng.test delete mode 100644 Build/source/texk/dvipng/dvipng.texi create mode 100644 Build/source/texk/dvipng/help/Makefile.am create mode 100644 Build/source/texk/dvipng/help/Makefile.in delete mode 100644 Build/source/texk/dvipng/install.texi delete mode 100644 Build/source/texk/dvipng/macros.texi delete mode 100644 Build/source/texk/dvipng/readme.texi delete mode 100755 Build/source/texk/dvipng/texi2pod.pl (limited to 'Build/source/texk') diff --git a/Build/source/texk/dvipng/ChangeLog.TL b/Build/source/texk/dvipng/ChangeLog.TL index a9ba125f2ec..882578501c7 100644 --- a/Build/source/texk/dvipng/ChangeLog.TL +++ b/Build/source/texk/dvipng/ChangeLog.TL @@ -1,5 +1,34 @@ Changes for teTeX / TeX Live. +2009-06-12 Peter Breitenlohner + + * help/Makefile.am: do not even try to rebuild doc/dvipng.help + unless dvipng$(EXEEXT) has been rebuilt. + +2009-06-09 Peter Breitenlohner + + Avoid warnings when compiling with 'gcc --Wmissing-prototypes'. + * color.c (NewColor, LoadColornameFile, ClearXColorPrologue, + LoadXColorPrologue): declare as static. + * draw.c (DrawPage): declare as static. + * dvi.c (DVIInit, SkipPage, InitPage, DelPageList): declare as + static. + * enc.c (InitEncoding): declare as static. + * font.c (ActualFactor, kpse_find_t1_or_tt, FontFind, DoneFont): + declare as static. + * fontmap.c (newword, find_format, SearchPSFontMap, + ReadPSFontMap): declare as static. + * ft.c (UnLoadFT): declare as static. + * papersiz.c (myatodim): declare as static. + * pk.c (getnyb, pk_packed_num, skip_specials, UnLoadPK): declare + as static. + * ppagelist.c (ListPage): declare as static. + * set.c (ChangeColor): declare as static. + * sfd.c (ReadSubfont): declare as static. + * special.c (PSCodeInit, writepscode, ps2png, rescale, + newpsheader): declare as static. + * t1.c (UnLoadT1): declare as static. + 2009-03-25 Peter Breitenlohner * dvipng-1.12-patches (new): patches applied to dvipng-1.12. diff --git a/Build/source/texk/dvipng/Makefile.am b/Build/source/texk/dvipng/Makefile.am index e4363a484e4..7f6af504800 100644 --- a/Build/source/texk/dvipng/Makefile.am +++ b/Build/source/texk/dvipng/Makefile.am @@ -30,8 +30,19 @@ ACLOCAL_AMFLAGS = -I ../../m4 -I m4 INCLUDES = $(KPATHSEA_INCLUDES) $(FREETYPE2_INCLUDES) $(GD_INCLUDES) INCLUDES += $(T1LIB_INCLUDES) $(LIBPNG_INCLUDES) $(ZLIB_INCLUDES) -AM_CPPFLAGS = +AM_CFLAGS = $(WARNING_CFLAGS) +DVIPS = dvips -Ppdf + +TEXI2HTML = texi2html + +# In order that `make distcheck' succeeds, we must not attempt to rebuild +# dvipng.info if dvipng.help has not changed, Thus we delegate rebuilding +# dvipng.help and dvipng.info, if necessary, to subdirectories. +SUBDIRS = . help doc + +## #################################### The program +## bin_PROGRAMS = dvipng dvipng_SOURCES = \ @@ -81,77 +92,49 @@ LDADD += $(T1LIB_LIBS) $(LIBPNG_LIBS) $(ZLIB_LIBS) ## Rebuild libz @ZLIB_RULE@ -info_TEXINFOS = dvipng.texi -dvipng_TEXINFOS = readme.texi install.texi macros.texi dvipng.help - -dist_man1_MANS = dvipng.1 -dvipng.1: dvipng.texi readme.texi - $(srcdir)/texi2pod.pl -D man $(srcdir)/dvipng.texi | \ - sed -es/@//g -es/previewlatex/preview-latex/g -es/{}//g > dvipng.pod - pod2man --center="User commands" --release="$(PACKAGE_STRING)" \ - dvipng.pod > dvipng.1 - rm dvipng.pod - -## Make sure INSTALL and README exist -## -EXTRA_DIST = ChangeLog.0 ChangeLog.TL INSTALL README RELEASE - -INSTALL: install.texi - -$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ - -D rawfile --no-headers --no-validate --no-number-sections \ - -o $@ $< - -README: readme.texi - -$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ - -D rawfile --no-headers --no-validate --no-number-sections \ - -o $@ $< - -dist_noinst_SCRIPTS = texi2pod.pl - if have_gif - install-exec-hook: cd $(DESTDIR)$(bindir) && \ rm -f dvigif$(EXEEXT) && \ $(LN_S) dvipng$(EXEEXT) dvigif$(EXEEXT) - -install-data-hook: - cd $(DESTDIR)$(man1dir) && \ - rm -f dvigif.1 && \ - $(LN_S) dvipng.1 dvigif.1 - uninstall-hook: rm -f $(DESTDIR)$(bindir)/dvigif$(EXEEXT) - rm -f $(DESTDIR)$(man1dir)/dvigif.1 - endif have_gif -## Not yet used +## #################################### The test ## -EXTRA_DIST += test_dvipng.tex +test: test_dvipng.dvi dvipng$(EXEEXT) + ./dvipng -T tight -strict test_dvipng + echo View the result e.g. with xv test_dvipng\*.png -## Not used -## -EXTRA_DIST += miktex.h miktex.mak +test_dvipng.dvi: test_dvipng.tex + latex $(srcdir)/test_dvipng.tex + +TESTS = dvipng.test + +EXTRA_DIST = dvipng.test test_dvipng.tex -## Patches applied to dvipng-$(DVIPNG_VERSION) distribution +CLEANFILES = missfont.log test_dvipng.aux test_dvipng.dvi test_dvipng.log test_dvipng*.png + +## #################################### Maintainer targets +## +## Make sure INSTALL and README exist ## -EXTRA_DIST += dvipng-$(DVIPNG_VERSION)-patches +EXTRA_DIST += ChangeLog.0 INSTALL README RELEASE -## Original files from dvipng-$(DVIPNG_VERSION) +## Not used ## -EXTRA_DIST += \ - Makefile.in-$(DVIPNG_VERSION) \ - aclocal.m4-$(DVIPNG_VERSION) \ - configure.ac-$(DVIPNG_VERSION) +EXTRA_DIST += miktex.h miktex.mak -## Eventually use these macro files +## #################################### Build as part of the TeX Live tree ## -EXTRA_DIST += m4/gs-device.m4 +EXTRA_DIST += ChangeLog.TL -## Eventually delete these files +## Patches applied to the dvipng-1.12 distribution ## -EXTRA_DIST += Makefile.in.orig acinclude.m4.orig configure.ac.orig +EXTRA_DIST += dvipng-1.12-patches -EXTRA_DIST += Makefile.am.demo Makefile.in.work configure.ac.demo configure.ac.work +## Original files from the dvipng distribution +## +EXTRA_DIST += Makefile.in.orig aclocal.m4.orig configure.ac.orig diff --git a/Build/source/texk/dvipng/Makefile.am.demo b/Build/source/texk/dvipng/Makefile.am.demo deleted file mode 100644 index 34cd6377e3f..00000000000 --- a/Build/source/texk/dvipng/Makefile.am.demo +++ /dev/null @@ -1,112 +0,0 @@ -# Makefile.am - -#************************************************************************ -# -# Part of the dvipng distribution -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301 USA. -# -# Copyright (C) 2002-2005 Jan-Åke Larsson -# -#************************************************************************ - -AUTOMAKE_OPTIONS = foreign - -ACLOCAL_AMFLAGS = -I m4 - -dist_man1_MANS = dvipng.1 -dvipng.1: dvipng.texi readme.texi - $(srcdir)/texi2pod.pl -D man $(srcdir)/dvipng.texi | \ - sed -es/@//g -es/previewlatex/preview-latex/g -es/{}//g > dvipng.pod - pod2man --center="User commands" --release="$(PACKAGE_STRING)" \ - dvipng.pod > dvipng.1 - rm dvipng.pod - -info_TEXINFOS = dvipng.texi -dvipng_TEXINFOS = readme.texi install.texi macros.texi help.texi -help.texi: dvipng - -./dvipng | \ - sed -e's/ (dvipng) / /' -e's,/lt-dvipng ,/dvipng ,' \ - -e's,^This is .*/dvipng ,This is ./dvipng ,' \ - -e's,^Usage: .*/dvipng ,Usage: ./dvipng ,' > help.tmp - ( test -r help.texi && diff help.tmp help.texi ) \ - || cp help.tmp help.texi - rm -f help.tmp - -EXTRA_DIST = ChangeLog.0 RELEASE miktex.h miktex.mak test_dvipng.tex \ - texi2pod.pl - -INSTALL: install.texi - -$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \ - -D rawfile --no-headers --no-validate --no-number-sections \ - -I$(srcdir) $(srcdir)/install.texi --output $(srcdir)/INSTALL - -README: readme.texi - -$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \ - -D rawfile --no-headers --no-validate --no-number-sections \ - -I$(srcdir) $(srcdir)/readme.texi --output $(srcdir)/README - -bin_PROGRAMS = dvipng -dvipng_SOURCES = dvipng.c color.c draw.c dvi.c font.c misc.c pk.c \ - set.c special.c papersiz.c ppagelist.c vf.c -if USE_T1 -dvipng_SOURCES += t1.c -endif USE_T1 -if USE_FT2 -dvipng_SOURCES += sfd.c ft.c enc.c fontmap.c tfm.c -else !USE_FT2 -if USE_T1 -dvipng_SOURCES += enc.c fontmap.c tfm.c -endif USE_T1 -endif !USE_FT2 - -# Use $(KPATHSEA_CPPFLAGS) etc. as part of AM_CPPFLAGS or prog_am_lt_CPPFLAGS, -# not as part of CPPFLAGS -- CPPFLAGS is for the user. -AM_CPPFLAGS = $(KPATHSEA_CPPFLAGS) $(ZLIB_CPPFLAGS) $(T1LIB_CPPFLAGS) \ - $(LIBPNG_CPPFLAGS) $(FREETYPE2_CPPFLAGS) $(GD_CPPFLAGS) - -# Use $(KPATHSEA_LDADD) etc. as part of LDADD or prog_am_lt_LDADD -LDADD = $(GD_LDADD) $(FREETYPE2_LDADD) $(LIBPNG_LDADD) \ - $(T1LIB_LDADD) $(ZLIB_LDADD) $(KPATHSEA_LDADD) - -dvipng_DEPENDENCIES = $(KPATHSEA_DEPS) $(ZLIB_DEPS) $(T1LIB_DEPS) \ - $(LIBPNG_DEPS) $(FREETYPE2_DEPS) - -noinst_HEADERS = commands.h dvipng.h - -if WITH_DVIGIF -install-exec-hook: - (cd $(DESTDIR)$(bindir) && rm -f dvigif && $(LN_S) dvipng dvigif) - -install-data-hook: - (cd $(DESTDIR)$(man1dir) && rm -f dvigif.1 && $(LN_S) dvipng.1 dvigif.1) - -uninstall-hook: - rm -f $(DESTDIR)$(bindir)/dvigif $(DESTDIR)$(man1dir)/dvigif.1 - -else !WITH_DVIGIF -install-exec-hook: -install-data-hook: -uninstall-hook: -endif !WITH_DVIGIF - -TESTS = test_dvipng - -CLEANFILES = test_dvipng.log test_dvipng.aux test_dvipng.dvi test_dvipng*.png - -# Do not create dvipng.info for distribution (depends on configure options). -dist-info: -DISTCLEANFILES = dvipng.info* help.texi diff --git a/Build/source/texk/dvipng/Makefile.in b/Build/source/texk/dvipng/Makefile.in index c5c85166d26..0e61e9008d2 100644 --- a/Build/source/texk/dvipng/Makefile.in +++ b/Build/source/texk/dvipng/Makefile.in @@ -15,7 +15,6 @@ @SET_MAKE@ - VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -40,16 +39,14 @@ bin_PROGRAMS = dvipng$(EXEEXT) @have_ft2_TRUE@am__append_2 = ft.c sfd.c @have_ft2_or_t1_TRUE@am__append_3 = enc.c fontmap.c tfm.c subdir = . -DIST_COMMON = README $(am__configure_deps) $(dist_man1_MANS) \ - $(dist_noinst_SCRIPTS) $(dvipng_TEXINFOS) \ +DIST_COMMON = README $(am__configure_deps) \ $(srcdir)/../../build-aux/config.guess \ $(srcdir)/../../build-aux/config.sub \ $(srcdir)/../../build-aux/depcomp \ $(srcdir)/../../build-aux/install-sh \ $(srcdir)/../../build-aux/ltmain.sh \ $(srcdir)/../../build-aux/missing \ - $(srcdir)/../../build-aux/mkinstalldirs \ - $(srcdir)/../../build-aux/texinfo.tex $(srcdir)/Makefile.am \ + $(srcdir)/../../build-aux/mkinstalldirs $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure ../../build-aux/config.guess \ ../../build-aux/config.sub ../../build-aux/depcomp \ @@ -58,13 +55,15 @@ DIST_COMMON = README $(am__configure_deps) $(dist_man1_MANS) \ ../../build-aux/texinfo.tex ../../build-aux/ylwrap COPYING \ COPYING.LESSER ChangeLog INSTALL ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/makeinfo.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/gs-device.m4 \ + $(top_srcdir)/m4/makeinfo.m4 \ $(top_srcdir)/../../m4/kpse-common.m4 \ $(top_srcdir)/../../m4/kpse-freetype2-flags.m4 \ $(top_srcdir)/../../m4/kpse-gd-flags.m4 \ $(top_srcdir)/../../m4/kpse-kpathsea-flags.m4 \ $(top_srcdir)/../../m4/kpse-libpng-flags.m4 \ $(top_srcdir)/../../m4/kpse-t1lib-flags.m4 \ + $(top_srcdir)/../../m4/kpse-warnings.m4 \ $(top_srcdir)/../../m4/kpse-zlib-flags.m4 \ $(top_srcdir)/../../m4/libtool.m4 \ $(top_srcdir)/../../m4/ltoptions.m4 \ @@ -80,8 +79,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/../../build-aux/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" \ - "$(DESTDIR)$(man1dir)" +am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am__dvipng_SOURCES_DIST = color.c commands.h draw.c dvi.c dvipng.c \ dvipng.h font.c misc.c papersiz.c pk.c ppagelist.c set.c \ @@ -98,7 +96,6 @@ am_dvipng_OBJECTS = color.$(OBJEXT) draw.$(OBJEXT) dvi.$(OBJEXT) \ dvipng_OBJECTS = $(am_dvipng_OBJECTS) dvipng_LDADD = $(LDADD) am__DEPENDENCIES_1 = -SCRIPTS = $(dist_noinst_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/../../build-aux/depcomp am__depfiles_maybe = depfiles @@ -114,45 +111,23 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(dvipng_SOURCES) DIST_SOURCES = $(am__dvipng_SOURCES_DIST) -INFO_DEPS = $(srcdir)/dvipng.info -TEXINFO_TEX = $(top_srcdir)/../../build-aux/texinfo.tex -am__TEXINFO_TEX_DIR = $(top_srcdir)/../../build-aux -DVIS = dvipng.dvi -PDFS = dvipng.pdf -PSS = dvipng.ps -HTMLS = dvipng.html -TEXINFOS = dvipng.texi -TEXI2DVI = texi2dvi -TEXI2PDF = $(TEXI2DVI) --pdf --batch -MAKEINFOHTML = $(MAKEINFO) --html -AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) -DVIPS = dvips -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -man1dir = $(mandir)/man1 -NROFF = nroff -MANS = $(dist_man1_MANS) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -160,6 +135,31 @@ am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print @@ -183,7 +183,6 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ -DVIPNG_VERSION = @DVIPNG_VERSION@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ @@ -198,6 +197,7 @@ GD_DEPEND = @GD_DEPEND@ GD_INCLUDES = @GD_INCLUDES@ GD_LIBS = @GD_LIBS@ GREP = @GREP@ +GS = @GS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ @@ -207,6 +207,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ KPATHSEA_LIBS = @KPATHSEA_LIBS@ +KPSEWHICH = @KPSEWHICH@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -244,6 +245,7 @@ T1LIB_DEPEND = @T1LIB_DEPEND@ T1LIB_INCLUDES = @T1LIB_INCLUDES@ T1LIB_LIBS = @T1LIB_LIBS@ VERSION = @VERSION@ +WARNING_CFLAGS = @WARNING_CFLAGS@ ZLIB_DEPEND = @ZLIB_DEPEND@ ZLIB_INCLUDES = @ZLIB_INCLUDES@ ZLIB_LIBS = @ZLIB_LIBS@ @@ -329,7 +331,14 @@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I ../../m4 -I m4 INCLUDES = $(KPATHSEA_INCLUDES) $(FREETYPE2_INCLUDES) $(GD_INCLUDES) \ $(T1LIB_INCLUDES) $(LIBPNG_INCLUDES) $(ZLIB_INCLUDES) -AM_CPPFLAGS = +AM_CFLAGS = $(WARNING_CFLAGS) +DVIPS = dvips -Ppdf +TEXI2HTML = texi2html + +# In order that `make distcheck' succeeds, we must not attempt to rebuild +# dvipng.info if dvipng.help has not changed, Thus we delegate rebuilding +# dvipng.help and dvipng.info, if necessary, to subdirectories. +SUBDIRS = . help doc dvipng_SOURCES = color.c commands.h draw.c dvi.c dvipng.c dvipng.h \ font.c misc.c papersiz.c pk.c ppagelist.c set.c special.c vf.c \ $(am__append_1) $(am__append_2) $(am__append_3) @@ -337,22 +346,16 @@ dvipng_DEPENDENCIES = $(KPATHSEA_DEPEND) $(FREETYPE2_DEPEND) \ $(GD_DEPEND) $(T1LIB_DEPEND) $(LIBPNG_DEPEND) $(ZLIB_DEPEND) LDADD = $(KPATHSEA_LIBS) $(FREETYPE2_LIBS) $(GD_LIBS) $(T1LIB_LIBS) \ $(LIBPNG_LIBS) $(ZLIB_LIBS) -info_TEXINFOS = dvipng.texi -dvipng_TEXINFOS = readme.texi install.texi macros.texi dvipng.help -dist_man1_MANS = dvipng.1 -EXTRA_DIST = ChangeLog.0 ChangeLog.TL INSTALL README RELEASE \ - test_dvipng.tex miktex.h miktex.mak \ - dvipng-$(DVIPNG_VERSION)-patches Makefile.in-$(DVIPNG_VERSION) \ - aclocal.m4-$(DVIPNG_VERSION) configure.ac-$(DVIPNG_VERSION) \ - m4/gs-device.m4 Makefile.in.orig acinclude.m4.orig \ - configure.ac.orig Makefile.am.demo Makefile.in.work \ - configure.ac.demo configure.ac.work -dist_noinst_SCRIPTS = texi2pod.pl +TESTS = dvipng.test +EXTRA_DIST = dvipng.test test_dvipng.tex ChangeLog.0 INSTALL README \ + RELEASE miktex.h miktex.mak ChangeLog.TL dvipng-1.12-patches \ + Makefile.in.orig aclocal.m4.orig configure.ac.orig +CLEANFILES = missfont.log test_dvipng.aux test_dvipng.dvi test_dvipng.log test_dvipng*.png all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-am + $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -.SUFFIXES: .c .dvi .html .info .lo .o .obj .pdf .ps .texi +.SUFFIXES: .c .lo .o .obj am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @@ -506,186 +509,75 @@ clean-libtool: distclean-libtool: -rm -f libtool config.lt -.texi.info: - restore=: && backupdir="$(am__leading_dot)am$$$$" && \ - am__cwd=`pwd` && $(am__cd) $(srcdir) && \ - rm -rf $$backupdir && mkdir $$backupdir && \ - if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ - for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ - if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ - done; \ - else :; fi && \ - cd "$$am__cwd"; \ - if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ - -o $@ $<; \ - then \ - rc=0; \ - $(am__cd) $(srcdir); \ - else \ - rc=$$?; \ - $(am__cd) $(srcdir) && \ - $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ - fi; \ - rm -rf $$backupdir; exit $$rc - -.texi.dvi: - TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ - MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ - $(TEXI2DVI) $< - -.texi.pdf: - TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ - MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ - $(TEXI2PDF) $< - -.texi.html: - rm -rf $(@:.html=.htp) - if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ - -o $(@:.html=.htp) $<; \ - then \ - rm -rf $@; \ - if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ - mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \ - else \ - if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ - rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ - exit 1; \ - fi -$(srcdir)/dvipng.info: dvipng.texi $(dvipng_TEXINFOS) -dvipng.dvi: dvipng.texi $(dvipng_TEXINFOS) -dvipng.pdf: dvipng.texi $(dvipng_TEXINFOS) -dvipng.html: dvipng.texi $(dvipng_TEXINFOS) -.dvi.ps: - TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ - $(DVIPS) -o $@ $< - -uninstall-dvi-am: - @$(NORMAL_UNINSTALL) - @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ - rm -f "$(DESTDIR)$(dvidir)/$$f"; \ - done - -uninstall-html-am: - @$(NORMAL_UNINSTALL) - @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ - rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ - done - -uninstall-info-am: - @$(PRE_UNINSTALL) - @if test -d '$(DESTDIR)$(infodir)' && \ - (install-info --version && \ - install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ - list='$(INFO_DEPS)'; \ - for file in $$list; do \ - relfile=`echo "$$file" | sed 's|^.*/||'`; \ - echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ - if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ - then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ - done; \ - else :; fi - @$(NORMAL_UNINSTALL) - @list='$(INFO_DEPS)'; \ - for file in $$list; do \ - relfile=`echo "$$file" | sed 's|^.*/||'`; \ - relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ - (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ - echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ - rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ - else :; fi); \ - done - -uninstall-pdf-am: - @$(NORMAL_UNINSTALL) - @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ - done - -uninstall-ps-am: - @$(NORMAL_UNINSTALL) - @list='$(PSS)'; test -n "$(psdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ - rm -f "$(DESTDIR)$(psdir)/$$f"; \ - done - -dist-info: $(INFO_DEPS) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - list='$(INFO_DEPS)'; \ - for base in $$list; do \ - case $$base in \ - $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ esac; \ - if test -f $$base; then d=.; else d=$(srcdir); fi; \ - base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ - for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ - if test -f $$file; then \ - relfile=`expr "$$file" : "$$d/\(.*\)"`; \ - test -f "$(distdir)/$$relfile" || \ - cp -p $$file "$(distdir)/$$relfile"; \ - else :; fi; \ - done; \ - done - -mostlyclean-aminfo: - -rm -rf dvipng.aux dvipng.cp dvipng.cps dvipng.fn dvipng.ky dvipng.log \ - dvipng.pg dvipng.tmp dvipng.toc dvipng.tp dvipng.tps \ - dvipng.vr - -clean-aminfo: - -test -z "dvipng.dvi dvipng.pdf dvipng.ps dvipng.html" \ - || rm -rf dvipng.dvi dvipng.pdf dvipng.ps dvipng.html - -maintainer-clean-aminfo: - @list='$(INFO_DEPS)'; for i in $$list; do \ - i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ - echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ - rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ - done -install-man1: $(dist_man1_MANS) - @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -697,10 +589,23 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) mkid -fID $$unique tags: TAGS -TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ @@ -719,7 +624,7 @@ TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ fi; \ fi ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -739,20 +644,99 @@ GTAGS: distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ else :; fi + +distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -784,9 +768,34 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-info + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ @@ -902,21 +911,23 @@ distcleancheck: distclean $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am -check: check-am -all-am: Makefile $(INFO_DEPS) $(PROGRAMS) $(SCRIPTS) $(MANS) config.h -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \ + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-recursive +all-am: Makefile $(PROGRAMS) config.h +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-am +installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ @@ -925,6 +936,7 @@ install-strip: mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) @@ -934,189 +946,104 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." @have_gif_FALSE@install-exec-hook: -@have_gif_FALSE@install-data-hook: @have_gif_FALSE@uninstall-hook: -clean: clean-am +clean: clean-recursive -clean-am: clean-aminfo clean-binPROGRAMS clean-generic clean-libtool \ - mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags -dvi: dvi-am +dvi: dvi-recursive -dvi-am: $(DVIS) +dvi-am: -html: html-am +html: html-recursive -html-am: $(HTMLS) +html-am: -info: info-am +info: info-recursive -info-am: $(INFO_DEPS) +info-am: -install-data-am: install-info-am install-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: -install-dvi-am: $(DVIS) - @$(NORMAL_INSTALL) - test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)" - @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \ - done install-exec-am: install-binPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am +install-html: install-html-recursive -install-html-am: $(HTMLS) - @$(NORMAL_INSTALL) - test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" - @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ - for p in $$list; do \ - if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ - $(am__strip_dir) \ - if test -d "$$d$$p"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ - $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ - echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ - $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ - else \ - list2="$$list2 $$d$$p"; \ - fi; \ - done; \ - test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ - done; } -install-info: install-info-am - -install-info-am: $(INFO_DEPS) - @$(NORMAL_INSTALL) - test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ - for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - esac; \ - if test -f $$file; then d=.; else d=$(srcdir); fi; \ - file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ - for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ - $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ - if test -f $$ifile; then \ - echo "$$ifile"; \ - else : ; fi; \ - done; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done - @$(POST_INSTALL) - @if (install-info --version && \ - install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ - list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ - for file in $$list; do \ - relfile=`echo "$$file" | sed 's|^.*/||'`; \ - echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ - install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ - done; \ - else : ; fi -install-man: install-man1 +install-html-am: -install-pdf: install-pdf-am +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: -install-pdf-am: $(PDFS) - @$(NORMAL_INSTALL) - test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)" - @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done -install-ps: install-ps-am - -install-ps-am: $(PSS) - @$(NORMAL_INSTALL) - test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)" - @list='$(PSS)'; test -n "$(psdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf ./$(DEPDIR) -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-aminfo \ - maintainer-clean-generic +maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive -mostlyclean-am: mostlyclean-aminfo mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool -pdf: pdf-am +pdf: pdf-recursive -pdf-am: $(PDFS) +pdf-am: -ps: ps-am +ps: ps-recursive -ps-am: $(PSS) +ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-dvi-am uninstall-html-am \ - uninstall-info-am uninstall-man uninstall-pdf-am \ - uninstall-ps-am +uninstall-am: uninstall-binPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -uninstall-man: uninstall-man1 - -.MAKE: all install-am install-data-am install-exec-am install-strip \ - uninstall-am - -.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ - clean-aminfo clean-binPROGRAMS clean-generic clean-libtool \ - ctags dist dist-all dist-bzip2 dist-gzip dist-info dist-lzma \ +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check-am \ + ctags-recursive install-am install-exec-am install-strip \ + tags-recursive uninstall-am + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-TESTS check-am clean \ + clean-binPROGRAMS clean-generic clean-libtool ctags \ + ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-lzma \ dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ - install-data-am install-data-hook install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-hook install-html \ - install-html-am install-info install-info-am install-man \ - install-man1 install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-aminfo \ - maintainer-clean-generic mostlyclean mostlyclean-aminfo \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-exec-hook install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS uninstall-dvi-am uninstall-hook \ - uninstall-html-am uninstall-info-am uninstall-man \ - uninstall-man1 uninstall-pdf-am uninstall-ps-am + pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-hook @KPATHSEA_RULE@ @@ -1125,36 +1052,20 @@ uninstall-man: uninstall-man1 @T1LIB_RULE@ @LIBPNG_RULE@ @ZLIB_RULE@ -dvipng.1: dvipng.texi readme.texi - $(srcdir)/texi2pod.pl -D man $(srcdir)/dvipng.texi | \ - sed -es/@//g -es/previewlatex/preview-latex/g -es/{}//g > dvipng.pod - pod2man --center="User commands" --release="$(PACKAGE_STRING)" \ - dvipng.pod > dvipng.1 - rm dvipng.pod - -INSTALL: install.texi - -$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ - -D rawfile --no-headers --no-validate --no-number-sections \ - -o $@ $< - -README: readme.texi - -$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ - -D rawfile --no-headers --no-validate --no-number-sections \ - -o $@ $< @have_gif_TRUE@install-exec-hook: @have_gif_TRUE@ cd $(DESTDIR)$(bindir) && \ @have_gif_TRUE@ rm -f dvigif$(EXEEXT) && \ @have_gif_TRUE@ $(LN_S) dvipng$(EXEEXT) dvigif$(EXEEXT) - -@have_gif_TRUE@install-data-hook: -@have_gif_TRUE@ cd $(DESTDIR)$(man1dir) && \ -@have_gif_TRUE@ rm -f dvigif.1 && \ -@have_gif_TRUE@ $(LN_S) dvipng.1 dvigif.1 - @have_gif_TRUE@uninstall-hook: @have_gif_TRUE@ rm -f $(DESTDIR)$(bindir)/dvigif$(EXEEXT) -@have_gif_TRUE@ rm -f $(DESTDIR)$(man1dir)/dvigif.1 + +test: test_dvipng.dvi dvipng$(EXEEXT) + ./dvipng -T tight -strict test_dvipng + echo View the result e.g. with xv test_dvipng\*.png + +test_dvipng.dvi: test_dvipng.tex + latex $(srcdir)/test_dvipng.tex # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/Build/source/texk/dvipng/Makefile.in-1.12 b/Build/source/texk/dvipng/Makefile.in-1.12 deleted file mode 100644 index 0e2ce2eaa00..00000000000 --- a/Build/source/texk/dvipng/Makefile.in-1.12 +++ /dev/null @@ -1,168 +0,0 @@ -# Makefile is generated by 'configure' from Makefile.in - -#************************************************************************ -# -# Part of the dvipng distribution -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this program. If not, see -# . -# -# Copyright (C) 2002-2008 Jan-Åke Larsson -# -#************************************************************************ - -PACKAGE_STRING="@PACKAGE_STRING@" - -CC = @CC@ -CFLAGS = @CFLAGS@ -Wall -CPPFLAGS = @CPPFLAGS@ -I. -LN_S = @LN_S@ - -LIBS = @LIBS@ -LDFLAGS = @LDFLAGS@ - -srcdir = @srcdir@ -VPATH = @srcdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -infodir = @infodir@ -mandir = @mandir@ -DESTDIR= -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -MKINSTALLDIRS = $(srcdir)/mkinstalldirs - -MAKEINFO=@MAKEINFO@ @MAKEINFO_MACROS@ -INSTALL_INFO=@INSTALL_INFO@ -TEX=tex -TEXIDVI=texi2dvi -TEXIHTML=texi2html -DVIPS=dvips -TEXIFILES = dvipng.texi readme.texi install.texi macros.texi dvipng.help - -objects = dvipng.o color.o draw.o dvi.o font.o misc.o pk.o \ - set.o special.o papersiz.o ppagelist.o \ - vf.o @PSFONTS_O@ - -all: dvipng docs - -install: @INSTALL_BIN_TARGET@ @INSTALL_BIN_TARGET@-docs - -####################################### The program - -dvipng: $(objects) - $(CC) $(LDFLAGS) $(objects) -o dvipng $(LIBS) - -$(objects): dvipng.h commands.h config.h - -install-dvipng: dvipng - -$(MKINSTALLDIRS) $(DESTDIR)$(bindir) - $(INSTALL) dvipng $(DESTDIR)$(bindir) - -install-dvigif: install-dvipng - (cd $(DESTDIR)$(bindir) && rm -f dvigif && $(LN_S) dvipng dvigif) - -####################################### The documentation - -docs: dvipng.dvi dvipng.info - -dvipng.dvi: $(TEXIFILES) - -$(TEXIDVI) -I $(srcdir) $(srcdir)/dvipng.texi - -dvipng.ps: dvipng.dvi - $(DVIPS) -Ppdf dvipng.dvi - -dvipng.info: $(TEXIFILES) dvipng.help - -$(MAKEINFO) -I$(srcdir) $(srcdir)/dvipng.texi - -dvipng.help: dvipng - -./dvipng > dvipng.tmp - ( test -r dvipng.help && diff dvipng.tmp dvipng.help ) \ - || cp dvipng.tmp dvipng.help - rm -f dvipng.tmp - -www: $(TEXIFILES) dvipng.help - texi2html -split chapter -nosec-nav -subdir html \ - -I $(srcdir) $(srcdir)/dvipng.texi - (cd html; for i in *; do \ - sed -e "s/Jan-A/Jan-\Å\;/g" $$i > ../www/$$i; \ - done) - cp www/dvipng.html www/index.html - rm -rf html - -dvipng_mono.html: $(TEXIFILES) dvipng.help - texi2html --monolithic -nomenu -nosec_nav -o dvipng_mono.html \ - -I $(srcdir) $(srcdir)/dvipng.texi - -install-docs: docs - -$(MKINSTALLDIRS) $(DESTDIR)$(infodir) - for x in dvipng.info* ; do \ - $(INSTALL_DATA) $$x $(DESTDIR)$(infodir) ; \ - done - -$(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) dvipng.info - -$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1 - $(INSTALL_DATA) $(srcdir)/dvipng.1 $(DESTDIR)$(mandir)/man1 - -install-dvipng-docs: install-docs - -install-dvigif-docs: install-docs - (cd $(DESTDIR)$(mandir)/man1 && rm -f dvigif.1 && $(LN_S) dvipng.1 dvigif.1) - -####################################### The test - -test: test_dvipng.dvi dvipng - ./dvipng -T tight -strict test_dvipng - echo View the result e.g. with xv test_dvipng\*.png - -test_dvipng.dvi: test_dvipng.tex - latex $(srcdir)/test_dvipng.tex - -####################################### The cleaning up - -clean: - rm -f *.o dvipng *.help *.info* *dvipng.dvi *.aux *.log - rm -f *dvipng.ps *.cp *.fn *.ky *~ \#*\# \ - *.tp *.vr *.pg *.toc *.tp *.bak *.cps *.kys *.tps \ - *.fns *.vrs *.pgs *.html *.tmp - -distclean: clean - rm -f Makefile - rm -f config.status config.log config.cache c-auto.h - -####################################### Maintainer targets - -INSTALL: install.texi - -$(MAKEINFO) -D rawfile --no-headers --no-validate \ - --no-number-sections \ - -I$(srcdir) $(srcdir)/install.texi --output INSTALL - -README: readme.texi - -$(MAKEINFO) -D rawfile --no-headers --no-validate \ - --no-number-sections \ - -I$(srcdir) $(srcdir)/readme.texi --output README - -dvipng.1: dvipng.texi readme.texi - texi2pod.pl -D man $(srcdir)/dvipng.texi | \ - sed -es/@//g -es/previewlatex/preview-latex/g -es/{}//g > dvipng.pod - pod2man --center="User commands" --release=$(PACKAGE_STRING)\ - dvipng.pod > dvipng.1 - rm dvipng.pod - -dist: INSTALL README dvipng.1 distclean - -# SunOS make suffix rule wierdness -.cps.h: - diff --git a/Build/source/texk/dvipng/Makefile.in.orig b/Build/source/texk/dvipng/Makefile.in.orig index 5889f504fc0..0e2ce2eaa00 100644 --- a/Build/source/texk/dvipng/Makefile.in.orig +++ b/Build/source/texk/dvipng/Makefile.in.orig @@ -1,9 +1,5 @@ # Makefile is generated by 'configure' from Makefile.in -# Adapted for dvipng-1.9 / teTeX by Thomas Esser. -# Adapted for dvipng-1.10 / TeX live by Peter Breitenlohner. -# All settings here are our fault, don't blame the dvipng maintainers for it. - #************************************************************************ # # Part of the dvipng distribution @@ -28,48 +24,12 @@ PACKAGE_STRING="@PACKAGE_STRING@" -@SET_MAKE@ - -FREETYPE2DIR = ../../libs/freetype2 -FREETYPE2SRCDIR = $(srcdir)/$(FREETYPE2DIR) -FREETYPE2CPPFLAGS = @FREETYPE2CPPFLAGS@ -FREETYPE2DEP = @FREETYPE2DEP@ -LDFREETYPE2 = @LDFREETYPE2@ - -GDDIR=../../libs/gd -GDSRCDIR=$(srcdir)/$(GDDIR) -GDCPPFLAGS = @GDCPPFLAGS@ -GDDEP = @GDDEP@ -LDGD = @LDGD@ - -LIBT1DIR=../../libs/t1lib -LIBT1SRCDIR=$(srcdir)/$(LIBT1DIR) -LIBT1CPPFLAGS = @LIBT1CPPFLAGS@ -LIBT1DEP = @LIBT1DEP@ -LDLIBT1 = @LDLIBT1@ - -LIBPNGDIR=../../libs/libpng -LIBPNGSRCDIR=$(srcdir)/$(LIBPNGDIR) -LIBPNGCPPFLAGS = @LIBPNGCPPFLAGS@ -LIBPNGDEP = @LIBPNGDEP@ -LDLIBPNG = @LDLIBPNG@ - -ZLIBDIR=../../libs/zlib -ZLIBSRCDIR=$(srcdir)/$(ZLIBDIR) -ZLIBCPPFLAGS = @ZLIBCPPFLAGS@ -ZLIBDEP = @ZLIBDEP@ -LDZLIB = @LDZLIB@ - -lib_cppflags = $(GDCPPFLAGS) $(FREETYPE2CPPFLAGS) $(LIBT1CPPFLAGS) \ - $(LIBPNGCPPFLAGS) $(ZLIBCPPFLAGS) -I.. -I$(srcdir)/.. -lib_libs = $(LDGD) $(LDFREETYPE2) $(LDLIBT1) $(LDLIBPNG) $(LDZLIB) - CC = @CC@ CFLAGS = @CFLAGS@ -Wall -CPPFLAGS = @CPPFLAGS@ -I. $(lib_cppflags) +CPPFLAGS = @CPPFLAGS@ -I. LN_S = @LN_S@ -LIBS = $(lib_libs) @LIBS@ +LIBS = @LIBS@ LDFLAGS = @LDFLAGS@ srcdir = @srcdir@ @@ -128,8 +88,7 @@ dvipng.ps: dvipng.dvi dvipng.info: $(TEXIFILES) dvipng.help -$(MAKEINFO) -I$(srcdir) $(srcdir)/dvipng.texi -dvipng.help: misc.c - $(MAKE) dvipng +dvipng.help: dvipng -./dvipng > dvipng.tmp ( test -r dvipng.help && diff dvipng.tmp dvipng.help ) \ || cp dvipng.tmp dvipng.help @@ -150,10 +109,10 @@ dvipng_mono.html: $(TEXIFILES) dvipng.help install-docs: docs -$(MKINSTALLDIRS) $(DESTDIR)$(infodir) - for x in $(srcdir)/dvipng.info* ; do \ + for x in dvipng.info* ; do \ $(INSTALL_DATA) $$x $(DESTDIR)$(infodir) ; \ done - -$(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) $(srcdir)/dvipng.info + -$(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) dvipng.info -$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1 $(INSTALL_DATA) $(srcdir)/dvipng.1 $(DESTDIR)$(mandir)/man1 diff --git a/Build/source/texk/dvipng/Makefile.in.work b/Build/source/texk/dvipng/Makefile.in.work deleted file mode 100644 index c4cf3c5426c..00000000000 --- a/Build/source/texk/dvipng/Makefile.in.work +++ /dev/null @@ -1,56 +0,0 @@ -#************************************************************************ - -CFLAGS = @CFLAGS@ -Wall - -TEXIHTML=texi2html - -all: dvipng docs - -####################################### The documentation - -docs: dvipng.dvi dvipng.info - -dvipng.dvi: $(TEXIFILES) - -$(TEXIDVI) -I $(srcdir) $(srcdir)/dvipng.texi - -dvipng.ps: dvipng.dvi - $(DVIPS) -Ppdf dvipng.dvi - -dvipng.info: $(TEXIFILES) dvipng.help - -$(MAKEINFO) -I$(srcdir) $(srcdir)/dvipng.texi - -dvipng.help: dvipng - -./dvipng > dvipng.tmp - ( test -r dvipng.help && diff dvipng.tmp dvipng.help ) \ - || cp dvipng.tmp dvipng.help - rm -f dvipng.tmp - -www: $(TEXIFILES) dvipng.help - texi2html -split chapter -nosec-nav -subdir html \ - -I $(srcdir) $(srcdir)/dvipng.texi - (cd html; for i in *; do \ - sed -e "s/Jan-A/Jan-\Å\;/g" $$i > ../www/$$i; \ - done) - cp www/dvipng.html www/index.html - rm -rf html - -dvipng_mono.html: $(TEXIFILES) dvipng.help - texi2html --monolithic -nomenu -nosec_nav -o dvipng_mono.html \ - -I $(srcdir) $(srcdir)/dvipng.texi - -####################################### The test - -test: test_dvipng.dvi dvipng - ./dvipng -T tight -strict test_dvipng - echo View the result e.g. with xv test_dvipng\*.png - -test_dvipng.dvi: test_dvipng.tex - latex $(srcdir)/test_dvipng.tex - -####################################### Maintainer targets - -dist: INSTALL README dvipng.1 distclean - -# SunOS make suffix rule wierdness -.cps.h: - diff --git a/Build/source/texk/dvipng/acinclude.m4.orig b/Build/source/texk/dvipng/acinclude.m4.orig deleted file mode 100644 index 8c2c9eab9df..00000000000 --- a/Build/source/texk/dvipng/acinclude.m4.orig +++ /dev/null @@ -1,77 +0,0 @@ -# acinclude.m4 extracted from aclocal.m4 of dvipng release 1.10. - -# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -dnl -dnl MAKEINFO_CHECK_MACRO( MACRO, [ACTION-IF-FOUND -dnl [, ACTION-IF-NOT-FOUND]]) -dnl -AC_DEFUN([MAKEINFO_CHECK_MACRO], -[if test -n "$MAKEINFO" -a "$makeinfo" != ":"; then - AC_MSG_CHECKING([for @$1{}]) - echo \\\\input texinfo > conftest.texi - echo @$1{test} >> conftest.texi - if $MAKEINFO conftest.texi > /dev/null 2> /dev/null; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - ifelse([$3], , :, [$3]) - fi - rm -f conftest.texi conftest.info -fi -]) - -dnl -dnl MAKEINFO_CHECK_MACROS( MACRO ... [, ACTION-IF-FOUND -dnl [, ACTION-IF-NOT-FOUND]]) -dnl -AC_DEFUN([MAKEINFO_CHECK_MACROS], -[for ac_macro in $1; do - MAKEINFO_CHECK_MACRO($ac_macro, $2, - [MAKEINFO_MACROS="-D no-$ac_macro $MAKEINFO_MACROS" - $3])dnl - done -AC_SUBST(MAKEINFO_MACROS) -]) - - -dnl -dnl Check devices for GS -dnl AC_GS_HAS_DEVICE(DEVICE,ACTION-IF-FAILED) -dnl -AC_DEFUN([AC_GS_HAS_DEVICE], - [AC_MSG_CHECKING([whether $GS has the $1 device]) - if $GS -h | grep $1 >/dev/null; then - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - $2 - fi -]) - -dnl -dnl GS_CHECK_DEVICES -dnl -AC_DEFUN([GS_CHECK_DEVICES], - [GS_WARN="" - AC_GS_HAS_DEVICE(pngalpha, - [GS_WARN="Your EPS inclusions will be cropped to the - boundingbox, and rendered on an opaque background. - Upgrade GhostScript to avoid this." - AC_GS_HAS_DEVICE(png16m, - [GS_WARN="Your EPS inclusions may not work. - Upgrade/install GhostScript to avoid this."])]) - if test -n "$GS_WARN"; then - AC_MSG_WARN([$GS_WARN]) - fi -]) diff --git a/Build/source/texk/dvipng/aclocal.m4 b/Build/source/texk/dvipng/aclocal.m4 index 1c3941966dc..a7725766726 100644 --- a/Build/source/texk/dvipng/aclocal.m4 +++ b/Build/source/texk/dvipng/aclocal.m4 @@ -989,6 +989,7 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +m4_include([m4/gs-device.m4]) m4_include([m4/makeinfo.m4]) m4_include([../../m4/kpse-common.m4]) m4_include([../../m4/kpse-freetype2-flags.m4]) @@ -996,6 +997,7 @@ m4_include([../../m4/kpse-gd-flags.m4]) m4_include([../../m4/kpse-kpathsea-flags.m4]) m4_include([../../m4/kpse-libpng-flags.m4]) m4_include([../../m4/kpse-t1lib-flags.m4]) +m4_include([../../m4/kpse-warnings.m4]) m4_include([../../m4/kpse-zlib-flags.m4]) m4_include([../../m4/libtool.m4]) m4_include([../../m4/ltoptions.m4]) diff --git a/Build/source/texk/dvipng/aclocal.m4-1.12 b/Build/source/texk/dvipng/aclocal.m4-1.12 deleted file mode 100644 index 0cd4eddf92e..00000000000 --- a/Build/source/texk/dvipng/aclocal.m4-1.12 +++ /dev/null @@ -1,237 +0,0 @@ -# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*- - -# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -# Configure paths for FreeType2 -# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor - -dnl AC_CHECK_FT2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for FreeType2, and define FT2_CFLAGS and FT2_LIBS -dnl -AC_DEFUN(AC_CHECK_FT2, -[dnl -dnl Get the cflags and libraries from the freetype-config script -dnl -AC_ARG_WITH(ft-prefix, -[ --with-ft-prefix=PREFIX - Prefix where FreeType is installed (optional)], - ft_config_prefix="$withval", ft_config_prefix="") -AC_ARG_WITH(ft-exec-prefix, -[ --with-ft-exec-prefix=PREFIX - Exec prefix where FreeType is installed (optional)], - ft_config_exec_prefix="$withval", ft_config_exec_prefix="") -AC_ARG_ENABLE(freetypetest, -[ --disable-freetypetest Do not try to compile and run - a test FreeType program], - [], enable_fttest=yes) - -if test x$ft_config_exec_prefix != x ; then - ft_config_args="$ft_config_args --exec-prefix=$ft_config_exec_prefix" - if test x${FT2_CONFIG+set} != xset ; then - FT2_CONFIG=$ft_config_exec_prefix/bin/freetype-config - fi -fi -if test x$ft_config_prefix != x ; then - ft_config_args="$ft_config_args --prefix=$ft_config_prefix" - if test x${FT2_CONFIG+set} != xset ; then - FT2_CONFIG=$ft_config_prefix/bin/freetype-config - fi -fi -AC_PATH_PROG(FT2_CONFIG, freetype-config, no) - -min_ft_version=ifelse([$1], ,6.1.0,$1) -AC_MSG_CHECKING(for FreeType - version >= $min_ft_version) -no_ft="" -if test "$FT2_CONFIG" = "no" ; then - no_ft=yes -else - FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags` - FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs` - ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - ft_config_minor_version=`$FT2_CONFIG $ft_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - ft_config_micro_version=`$FT2_CONFIG $ft_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - ft_min_major_version=`echo $min_ft_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - ft_min_minor_version=`echo $min_ft_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - ft_min_micro_version=`echo $min_ft_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test x$enable_fttest = xyes ; then - ft_config_is_lt="" - if test $ft_config_major_version -lt $ft_min_major_version ; then - ft_config_is_lt=yes - else - if test $ft_config_major_version -eq $ft_min_major_version ; then - if test $ft_config_minor_version -lt $ft_min_minor_version ; then - ft_config_is_lt=yes - else - if test $ft_config_minor_version -eq $ft_min_minor_version ; then - if test $ft_config_micro_version -lt $ft_min_micro_version ; then - ft_config_is_lt=yes - fi - fi - fi - fi - fi - if test x$ft_config_is_lt = xyes ; then - no_ft=yes - else - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $FT2_CFLAGS" - LIBS="$FT2_LIBS $LIBS" -dnl -dnl Sanity checks for the results of freetype-config to some extent -dnl - AC_TRY_RUN([ -#include -#include FT_FREETYPE_H -#include -#include - -int -main() -{ - FT_Library library; - FT_Error error; - - error = FT_Init_FreeType(&library); - - if (error) - return 1; - else - { - FT_Done_FreeType(library); - return 0; - } -} -],, no_ft=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi # test $ft_config_version -lt $ft_min_version - fi # test x$enable_fttest = xyes -fi # test "$FT2_CONFIG" = "no" -if test x$no_ft = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) -else - AC_MSG_RESULT(no) - if test "$FT2_CONFIG" = "no" ; then - echo "*** The freetype-config script installed by FreeType 2 could not be found." - echo "*** If FreeType 2 was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the FT2_CONFIG environment variable to the" - echo "*** full path to freetype-config." - else - if test x$ft_config_is_lt = xyes ; then - echo "*** Your installed version of the FreeType 2 library is too old." - echo "*** If you have different versions of FreeType 2, make sure that" - echo "*** correct values for --with-ft-prefix or --with-ft-exec-prefix" - echo "*** are used, or set the FT2_CONFIG environment variable to the" - echo "*** full path to freetype-config." - else - echo "*** The FreeType test program failed to run. If your system uses" - echo "*** shared libraries and they are installed outside the normal" - echo "*** system library path, make sure the variable LD_LIBRARY_PATH" - echo "*** (or whatever is appropiate for your system) is correctly set." - fi - fi - FT2_CFLAGS="" - FT2_LIBS="" - ifelse([$3], , :, [$3]) -fi -AC_SUBST(FT2_CFLAGS) -AC_SUBST(FT2_LIBS) -]) - - -dnl -dnl MAKEINFO_CHECK_MACRO( MACRO, [ACTION-IF-FOUND -dnl [, ACTION-IF-NOT-FOUND]]) -dnl -AC_DEFUN(MAKEINFO_CHECK_MACRO, -[if test -n "$MAKEINFO" -a "$makeinfo" != ":"; then - AC_MSG_CHECKING([for @$1{}]) - echo \\\\input texinfo > conftest.texi - echo @$1{test} >> conftest.texi - if $MAKEINFO conftest.texi > /dev/null 2> /dev/null; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - ifelse([$3], , :, [$3]) - fi - rm -f conftest.texi conftest.info -fi -]) - -dnl -dnl MAKEINFO_CHECK_MACROS( MACRO ... [, ACTION-IF-FOUND -dnl [, ACTION-IF-NOT-FOUND]]) -dnl -AC_DEFUN(MAKEINFO_CHECK_MACROS, -[for ac_macro in $1; do - MAKEINFO_CHECK_MACRO($ac_macro, $2, - [MAKEINFO_MACROS="-D no-$ac_macro $MAKEINFO_MACROS" - $3])dnl - done -AC_SUBST(MAKEINFO_MACROS) -]) - - -dnl -dnl Check for enc, cmap, sfd formats -dnl -AC_DEFUN(AC_HAS_KPSE_ENC_FORMATS, - [AC_MSG_CHECKING([for kpse_enc_format]) - AC_TRY_COMPILE([ - #include - #include ], - [kpse_enc_format;kpse_cmap_format;kpse_sfd_format], - [AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KPSE_ENC_FORMATS, 1, - [Define to 1 if your kpathsea has kpse_enc_format])], - [AC_MSG_RESULT(no)])]) - - -dnl -dnl Check devices for GS -dnl AC_GS_HAS_DEVICE(DEVICE,ACTION-IF-FAILED) -dnl -AC_DEFUN(AC_GS_HAS_DEVICE, - [AC_MSG_CHECKING([whether $GS has the $1 device]) - if $GS -h | grep $1 >/dev/null; then - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - $2 - fi -]) - -dnl -dnl GS_CHECK_DEVICES -dnl -AC_DEFUN(GS_CHECK_DEVICES, - [GS_WARN="" - AC_GS_HAS_DEVICE(pngalpha, - [GS_WARN="Your EPS inclusions will be cropped to the - boundingbox, and rendered on an opaque background. - Upgrade GhostScript to avoid this." - AC_GS_HAS_DEVICE(png16m, - [GS_WARN="Your EPS inclusions may not work. - Upgrade/install GhostScript to avoid this."])]) - if test -n "$GS_WARN"; then - AC_MSG_WARN([$GS_WARN]) - fi -]) diff --git a/Build/source/texk/dvipng/aclocal.m4.orig b/Build/source/texk/dvipng/aclocal.m4.orig new file mode 100644 index 00000000000..0cd4eddf92e --- /dev/null +++ b/Build/source/texk/dvipng/aclocal.m4.orig @@ -0,0 +1,237 @@ +# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*- + +# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# Configure paths for FreeType2 +# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor + +dnl AC_CHECK_FT2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl Test for FreeType2, and define FT2_CFLAGS and FT2_LIBS +dnl +AC_DEFUN(AC_CHECK_FT2, +[dnl +dnl Get the cflags and libraries from the freetype-config script +dnl +AC_ARG_WITH(ft-prefix, +[ --with-ft-prefix=PREFIX + Prefix where FreeType is installed (optional)], + ft_config_prefix="$withval", ft_config_prefix="") +AC_ARG_WITH(ft-exec-prefix, +[ --with-ft-exec-prefix=PREFIX + Exec prefix where FreeType is installed (optional)], + ft_config_exec_prefix="$withval", ft_config_exec_prefix="") +AC_ARG_ENABLE(freetypetest, +[ --disable-freetypetest Do not try to compile and run + a test FreeType program], + [], enable_fttest=yes) + +if test x$ft_config_exec_prefix != x ; then + ft_config_args="$ft_config_args --exec-prefix=$ft_config_exec_prefix" + if test x${FT2_CONFIG+set} != xset ; then + FT2_CONFIG=$ft_config_exec_prefix/bin/freetype-config + fi +fi +if test x$ft_config_prefix != x ; then + ft_config_args="$ft_config_args --prefix=$ft_config_prefix" + if test x${FT2_CONFIG+set} != xset ; then + FT2_CONFIG=$ft_config_prefix/bin/freetype-config + fi +fi +AC_PATH_PROG(FT2_CONFIG, freetype-config, no) + +min_ft_version=ifelse([$1], ,6.1.0,$1) +AC_MSG_CHECKING(for FreeType - version >= $min_ft_version) +no_ft="" +if test "$FT2_CONFIG" = "no" ; then + no_ft=yes +else + FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags` + FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs` + ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + ft_config_minor_version=`$FT2_CONFIG $ft_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + ft_config_micro_version=`$FT2_CONFIG $ft_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + ft_min_major_version=`echo $min_ft_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + ft_min_minor_version=`echo $min_ft_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + ft_min_micro_version=`echo $min_ft_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test x$enable_fttest = xyes ; then + ft_config_is_lt="" + if test $ft_config_major_version -lt $ft_min_major_version ; then + ft_config_is_lt=yes + else + if test $ft_config_major_version -eq $ft_min_major_version ; then + if test $ft_config_minor_version -lt $ft_min_minor_version ; then + ft_config_is_lt=yes + else + if test $ft_config_minor_version -eq $ft_min_minor_version ; then + if test $ft_config_micro_version -lt $ft_min_micro_version ; then + ft_config_is_lt=yes + fi + fi + fi + fi + fi + if test x$ft_config_is_lt = xyes ; then + no_ft=yes + else + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $FT2_CFLAGS" + LIBS="$FT2_LIBS $LIBS" +dnl +dnl Sanity checks for the results of freetype-config to some extent +dnl + AC_TRY_RUN([ +#include +#include FT_FREETYPE_H +#include +#include + +int +main() +{ + FT_Library library; + FT_Error error; + + error = FT_Init_FreeType(&library); + + if (error) + return 1; + else + { + FT_Done_FreeType(library); + return 0; + } +} +],, no_ft=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi # test $ft_config_version -lt $ft_min_version + fi # test x$enable_fttest = xyes +fi # test "$FT2_CONFIG" = "no" +if test x$no_ft = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) +else + AC_MSG_RESULT(no) + if test "$FT2_CONFIG" = "no" ; then + echo "*** The freetype-config script installed by FreeType 2 could not be found." + echo "*** If FreeType 2 was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the FT2_CONFIG environment variable to the" + echo "*** full path to freetype-config." + else + if test x$ft_config_is_lt = xyes ; then + echo "*** Your installed version of the FreeType 2 library is too old." + echo "*** If you have different versions of FreeType 2, make sure that" + echo "*** correct values for --with-ft-prefix or --with-ft-exec-prefix" + echo "*** are used, or set the FT2_CONFIG environment variable to the" + echo "*** full path to freetype-config." + else + echo "*** The FreeType test program failed to run. If your system uses" + echo "*** shared libraries and they are installed outside the normal" + echo "*** system library path, make sure the variable LD_LIBRARY_PATH" + echo "*** (or whatever is appropiate for your system) is correctly set." + fi + fi + FT2_CFLAGS="" + FT2_LIBS="" + ifelse([$3], , :, [$3]) +fi +AC_SUBST(FT2_CFLAGS) +AC_SUBST(FT2_LIBS) +]) + + +dnl +dnl MAKEINFO_CHECK_MACRO( MACRO, [ACTION-IF-FOUND +dnl [, ACTION-IF-NOT-FOUND]]) +dnl +AC_DEFUN(MAKEINFO_CHECK_MACRO, +[if test -n "$MAKEINFO" -a "$makeinfo" != ":"; then + AC_MSG_CHECKING([for @$1{}]) + echo \\\\input texinfo > conftest.texi + echo @$1{test} >> conftest.texi + if $MAKEINFO conftest.texi > /dev/null 2> /dev/null; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + ifelse([$3], , :, [$3]) + fi + rm -f conftest.texi conftest.info +fi +]) + +dnl +dnl MAKEINFO_CHECK_MACROS( MACRO ... [, ACTION-IF-FOUND +dnl [, ACTION-IF-NOT-FOUND]]) +dnl +AC_DEFUN(MAKEINFO_CHECK_MACROS, +[for ac_macro in $1; do + MAKEINFO_CHECK_MACRO($ac_macro, $2, + [MAKEINFO_MACROS="-D no-$ac_macro $MAKEINFO_MACROS" + $3])dnl + done +AC_SUBST(MAKEINFO_MACROS) +]) + + +dnl +dnl Check for enc, cmap, sfd formats +dnl +AC_DEFUN(AC_HAS_KPSE_ENC_FORMATS, + [AC_MSG_CHECKING([for kpse_enc_format]) + AC_TRY_COMPILE([ + #include + #include ], + [kpse_enc_format;kpse_cmap_format;kpse_sfd_format], + [AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KPSE_ENC_FORMATS, 1, + [Define to 1 if your kpathsea has kpse_enc_format])], + [AC_MSG_RESULT(no)])]) + + +dnl +dnl Check devices for GS +dnl AC_GS_HAS_DEVICE(DEVICE,ACTION-IF-FAILED) +dnl +AC_DEFUN(AC_GS_HAS_DEVICE, + [AC_MSG_CHECKING([whether $GS has the $1 device]) + if $GS -h | grep $1 >/dev/null; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + $2 + fi +]) + +dnl +dnl GS_CHECK_DEVICES +dnl +AC_DEFUN(GS_CHECK_DEVICES, + [GS_WARN="" + AC_GS_HAS_DEVICE(pngalpha, + [GS_WARN="Your EPS inclusions will be cropped to the + boundingbox, and rendered on an opaque background. + Upgrade GhostScript to avoid this." + AC_GS_HAS_DEVICE(png16m, + [GS_WARN="Your EPS inclusions may not work. + Upgrade/install GhostScript to avoid this."])]) + if test -n "$GS_WARN"; then + AC_MSG_WARN([$GS_WARN]) + fi +]) diff --git a/Build/source/texk/dvipng/color.c b/Build/source/texk/dvipng/color.c index 5d3a23ab37b..f3430ca616d 100644 --- a/Build/source/texk/dvipng/color.c +++ b/Build/source/texk/dvipng/color.c @@ -54,7 +54,7 @@ void initcolor() cstack[1].blue=0; } -struct colorname * NewColor(char* prefix, int nprefix, +static struct colorname * NewColor(char* prefix, int nprefix, char* name, int nname, char* model, int nmodel, char* values, int nvalues) @@ -92,7 +92,7 @@ struct colorname * NewColor(char* prefix, int nprefix, #define FINDPSNAMEEND(s,n) n=0; while(s conftest.$ac_ext - (eval echo "\"\$as_me:4396: $ac_compile\"" >&5) + (eval echo "\"\$as_me:4413: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4399: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:4416: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4402: output\"" >&5) + (eval echo "\"\$as_me:4419: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -5605,7 +5622,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5608 "configure"' > conftest.$ac_ext + echo '#line 5625 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -6960,6 +6977,21 @@ fi done +# Check whether --enable-compiler-warnings was given. +if test "${enable_compiler_warnings+set}" = set; then + enableval=$enable_compiler_warnings; +fi +case $enable_compiler_warnings in + no | min | yes | max) : ;; + *) if test "x$enable_maintainer_mode" = xyes; then + enable_compiler_warnings=yes +else + enable_compiler_warnings=min +fi + ;; +esac + + if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output @@ -7551,11 +7583,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7554: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7586: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7558: \$? = $ac_status" >&5 + echo "$as_me:7590: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7890,11 +7922,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7893: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7925: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7897: \$? = $ac_status" >&5 + echo "$as_me:7929: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7995,11 +8027,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7998: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8030: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8002: \$? = $ac_status" >&5 + echo "$as_me:8034: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8050,11 +8082,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8053: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8085: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8057: \$? = $ac_status" >&5 + echo "$as_me:8089: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -10850,7 +10882,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10853 "configure" +#line 10885 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10946,7 +10978,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10949 "configure" +#line 10981 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12949,8 +12981,44 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi +{ $as_echo "$as_me:$LINENO: checking what warning flags to pass to the C compiler" >&5 +$as_echo_n "checking what warning flags to pass to the C compiler... " >&6; } +if test "${kpse_cv_warning_cflags+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "x$enable_compiler_warnings" = xno; then + kpse_cv_warning_cflags= +elif test "x$GCC" = xyes; then + kpse_cv_warning_cflags="-Wall -Wunused" + if test "x$enable_compiler_warnings" != xmin; then + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wmissing-prototypes -Wmissing-declarations" + case `$CC -dumpversion` in + 3.4.* | 4.*) kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wdeclaration-after-statement" ;; +esac + + if test "x$enable_compiler_warnings" != xyes; then + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wimplicit -Wparentheses -Wreturn-type" + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wswitch -Wtrigraphs -Wshadow -Wpointer-arith" + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wcast-qual -Wcast-align -Wwrite-strings" + case `$CC -dumpversion` in + 3.4.* | 4.*) kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wold-style-definition" ;; +esac + + fi + fi +else + : # FIXME: warning flags for non-gcc compilers +fi +fi +{ $as_echo "$as_me:$LINENO: result: $kpse_cv_warning_cflags" >&5 +$as_echo "$kpse_cv_warning_cflags" >&6; } +WARNING_CFLAGS=$kpse_cv_warning_cflags + + + +# Configure options for dvipng also shown at the TeX Live top-level. ## texk/dvipng/ac/dvipng.ac: configure.ac fragment for the TeX Live subdirectory texk/dvipng/ ## configure options for dvipng # Check whether --enable-debug was given. @@ -12988,12 +13056,137 @@ _ACEOF fi +# Checks for programs. +# For a native TeX Live build '--with-gs' is ignored. +if test "x$enable_native_texlive_build" = xyes; then + with_gs= +fi + +case $with_gs in + "" | yes | no) # Extract the first word of "gs", so it can be a program name with args. +set dummy gs; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_GS+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$GS"; then + ac_cv_prog_GS="$GS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_GS="gs" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +GS=$ac_cv_prog_GS +if test -n "$GS"; then + { $as_echo "$as_me:$LINENO: result: $GS" >&5 +$as_echo "$GS" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + ;; + *) # Extract the first word of ""$with_gs"", so it can be a program name with args. +set dummy "$with_gs"; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_GS+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $GS in + [\\/]* | ?:[\\/]*) + ac_cv_path_GS="$GS" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GS="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +GS=$ac_cv_path_GS +if test -n "$GS"; then + { $as_echo "$as_me:$LINENO: result: $GS" >&5 +$as_echo "$GS" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + ;; +esac + +if test -n "$GS"; then + GS_WARN= +{ $as_echo "$as_me:$LINENO: checking whether $GS has the pngalpha device" >&5 +$as_echo_n "checking whether $GS has the pngalpha device... " >&6; } +if $GS -h | grep pngalpha >/dev/null; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + GS_WARN="Your EPS inclusions will be cropped to the + boundingbox, and rendered on an opaque background. + Upgrade GhostScript to avoid this." + { $as_echo "$as_me:$LINENO: checking whether $GS has the png16m device" >&5 +$as_echo_n "checking whether $GS has the png16m device... " >&6; } +if $GS -h | grep png16m >/dev/null; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + GS_WARN="Your EPS inclusions may not work. + Upgrade/install GhostScript to avoid this." +fi + +fi + +if test -n "$GS_WARN"; then + { $as_echo "$as_me:$LINENO: WARNING: $GS_WARN" >&5 +$as_echo "$as_me: WARNING: $GS_WARN" >&2;} +fi + +else + { $as_echo "$as_me:$LINENO: WARNING: Cannot find GhostScript in your PATH" >&5 +$as_echo "$as_me: WARNING: Cannot find GhostScript in your PATH" >&2;} + GS=gs +fi + cat >>confdefs.h <<_ACEOF -#define GS_PATH "gs" +#define GS_PATH "$GS" _ACEOF +# Checks for libraries. { $as_echo "$as_me:$LINENO: checking for library containing pow" >&5 $as_echo_n "checking for library containing pow... " >&6; } if test "${ac_cv_search_pow+set}" = set; then @@ -13169,6 +13362,7 @@ if test "$ac_res" != no; then fi +# Checks for header files. { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then @@ -13860,6 +14054,7 @@ _ACEOF fi +# Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if test "${ac_cv_c_const+set}" = set; then @@ -14369,6 +14564,7 @@ _ACEOF esac +# Checks for library functions. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5 @@ -16606,6 +16802,7 @@ done fi +# Documentation-related checks. # Extract the first word of "makeinfo", so it can be a program name with args. set dummy makeinfo; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -16710,6 +16907,131 @@ fi +# SELFAUTO +# When dvipng is built as part of the TeX Live tree, the option +# '--enable-texlive-build' is automatically passed from the top-level. +# In that case we silently assume '--disable-selfauto-set'. +test "x$enable_texlive_build" = xyes && enable_selfauto_set=no +# Check whether --enable-selfauto-set was given. +if test "${enable_selfauto_set+set}" = set; then + enableval=$enable_selfauto_set; if test "$enableval" = yes ; then + { $as_echo "$as_me:$LINENO: checking for \$SELFAUTOLOC" >&5 +$as_echo_n "checking for \$SELFAUTOLOC... " >&6; } + SELFAUTOLOC=`kpsewhich -expand-var=\\\$SELFAUTOLOC` + +cat >>confdefs.h <<_ACEOF +#define ENV_SELFAUTOLOC "SELFAUTOLOC=$SELFAUTOLOC" +_ACEOF + + { $as_echo "$as_me:$LINENO: result: $SELFAUTOLOC" >&5 +$as_echo "$SELFAUTOLOC" >&6; } + { $as_echo "$as_me:$LINENO: checking for \$SELFAUTODIR" >&5 +$as_echo_n "checking for \$SELFAUTODIR... " >&6; } + SELFAUTODIR=`kpsewhich -expand-var=\\\$SELFAUTODIR` + +cat >>confdefs.h <<_ACEOF +#define ENV_SELFAUTODIR "SELFAUTODIR=$SELFAUTODIR" +_ACEOF + + { $as_echo "$as_me:$LINENO: result: $SELFAUTODIR" >&5 +$as_echo "$SELFAUTODIR" >&6; } + { $as_echo "$as_me:$LINENO: checking for \$SELFAUTOPARENT" >&5 +$as_echo_n "checking for \$SELFAUTOPARENT... " >&6; } + SELFAUTOPARENT=`kpsewhich -expand-var=\\\$SELFAUTOPARENT` + +cat >>confdefs.h <<_ACEOF +#define ENV_SELFAUTOPARENT "SELFAUTOPARENT=$SELFAUTOPARENT" +_ACEOF + + { $as_echo "$as_me:$LINENO: result: $SELFAUTOPARENT" >&5 +$as_echo "$SELFAUTOPARENT" >&6; } + fi +else + { $as_echo "$as_me:$LINENO: checking for texmf.cnf" >&5 +$as_echo_n "checking for texmf.cnf... " >&6; } + TEXMF_CNF=`kpsewhich texmf.cnf` + { $as_echo "$as_me:$LINENO: result: $TEXMF_CNF" >&5 +$as_echo "$TEXMF_CNF" >&6; } + # Extract the first word of "kpsewhich", so it can be a program name with args. +set dummy kpsewhich; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_KPSEWHICH+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $KPSEWHICH in + [\\/]* | ?:[\\/]*) + ac_cv_path_KPSEWHICH="$KPSEWHICH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_KPSEWHICH="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +KPSEWHICH=$ac_cv_path_KPSEWHICH +if test -n "$KPSEWHICH"; then + { $as_echo "$as_me:$LINENO: result: $KPSEWHICH" >&5 +$as_echo "$KPSEWHICH" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + { $as_echo "$as_me:$LINENO: checking for psfonts.map" >&5 +$as_echo_n "checking for psfonts.map... " >&6; } + cp $KPSEWHICH . + PSFONTS_MAP=`./kpsewhich psfonts.map` + rm -f ./kpsewhich + if test -n "$PSFONTS_MAP"; then + { $as_echo "$as_me:$LINENO: result: $PSFONTS_MAP" >&5 +$as_echo "$PSFONTS_MAP" >&6; } + else + { $as_echo "$as_me:$LINENO: result: not found from outside the texmf tree" >&5 +$as_echo "not found from outside the texmf tree" >&6; } + { $as_echo "$as_me:$LINENO: checking for \$SELFAUTO in texmf.cnf" >&5 +$as_echo_n "checking for \$SELFAUTO in texmf.cnf... " >&6; } + if grep SELFAUTO "$TEXMF_CNF" > /dev/null 2> /dev/null; then + { $as_echo "$as_me:$LINENO: result: yes +*************************************************************** +texmf.cnf is using \$SELFAUTO... variables. If you are going to +install dvipng outside the texmf tree, you may need to use +--enable-selfauto-set. To find out, do 'make ; make test'. If the test +is unsuccessful, add the mentioned switch and rebuild. +***************************************************************" >&5 +$as_echo "yes +*************************************************************** +texmf.cnf is using \$SELFAUTO... variables. If you are going to +install dvipng outside the texmf tree, you may need to use +--enable-selfauto-set. To find out, do 'make ; make test'. If the test +is unsuccessful, add the mentioned switch and rebuild. +***************************************************************" >&6; } + else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi + fi +fi + + +# We have to check properties of libraries, either installed (system) +# libraries or unistalled (possibly libtool) ones from the TeX Live tree. +# Thus we can not use, e.g., AC_CHECK_LIB(LIB, FUNCTION) + ## _KPSE_INIT: Initialize TL infrastructure kpse_BLD=`(cd "./../../." && pwd)` kpse_SRC=`(cd "$srcdir/../../." && pwd)` @@ -18334,7 +18656,7 @@ ${top_builddir}/../../libs/gd/gd.h: fi - +# Checks for more libraries. kpse_save_CPPFLAGS=$CPPFLAGS kpse_save_LIBS=$LIBS @@ -18772,6 +19094,8 @@ fi fi +# We need enc, cmap, and sfd formats. +# Introduced together with opentype format (Dec 2003). { $as_echo "$as_me:$LINENO: checking whether kpathsea declares the kpse_opentype_format" >&5 $as_echo_n "checking whether kpathsea declares the kpse_opentype_format... " >&6; } if test "${kpse_cv_have_opentype_format+set}" = set; then @@ -19058,6 +19382,7 @@ else fi +# Checks for more header files. @@ -19376,6 +19701,7 @@ fi done +# Checks for more library functions. @@ -19496,9 +19822,6 @@ CPPFLAGS=$kpse_save_CPPFLAGS LIBS=$kpse_save_LIBS -DVIPNG_VERSION=1.12 - - { $as_echo "$as_me:$LINENO: result: ** Configuration summary for $PACKAGE_STRING: @@ -19547,7 +19870,7 @@ $as_echo " ac_config_headers="$ac_config_headers config.h" -ac_config_files="$ac_config_files Makefile" +ac_config_files="$ac_config_files Makefile help/Makefile doc/Makefile" cat >confcache <<\_ACEOF @@ -20472,6 +20795,8 @@ do "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "help/Makefile") CONFIG_FILES="$CONFIG_FILES help/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} diff --git a/Build/source/texk/dvipng/configure.ac-1.12 b/Build/source/texk/dvipng/configure.ac-1.12 deleted file mode 100644 index 509591c93ba..00000000000 --- a/Build/source/texk/dvipng/configure.ac-1.12 +++ /dev/null @@ -1,227 +0,0 @@ -# configure.ac - -#************************************************************************ -# -# Part of the dvipng distribution -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this program. If not, see -# . -# -# Copyright (C) 2002-2009 Jan-Åke Larsson -# -#************************************************************************ - -# Process this file with autoconf to produce a configure script. -AC_INIT([dvipng], [1.12], [dvipng@nongnu.org]) -AC_CONFIG_SRCDIR([dvipng.c]) - -AC_ARG_ENABLE(debug, - AC_HELP_STRING([--disable-debug],[Compile without debug (-d) option]), - [ if test "$enableval" = yes ; then - AC_DEFINE(DEBUG, 1, [Define as 1 to get the debug (-d) option.]) - fi ], - [ enable_debug="yes"; - AC_DEFINE(DEBUG, 1, [Define as 1 to get the debug (-d) option.])]) -AC_ARG_ENABLE(timing, - AC_HELP_STRING([--enable-timing],[Output execution time of dvipng]), - [ if test "$enableval" = yes ; then - AC_DEFINE(TIMING, 1, [Define as 1 to get execution time output.]) - fi ]) - -# Checks for programs. -AC_SET_MAKE -AC_PROG_CC -AC_PROG_INSTALL -AC_PROG_LN_S -AC_ARG_WITH(gs, - AC_HELP_STRING([--with-gs=/PATH/TO/gs],[Hard-wire the location of GhostScript]), - [if test "x$withval" != xno ; then - AC_PATH_PROG(GS,["$withval"]) - AC_DEFINE_UNQUOTED(GS_PATH, "$GS", [Define as the path to GhostScript.]) - GS_CHECK_DEVICES - fi], - [AC_CHECK_PROG(GS,gs,gs) - AC_DEFINE_UNQUOTED(GS_PATH, "gs", [Define as the path to GhostScript.]) - if test -n "$GS"; then - GS_CHECK_DEVICES - else - AC_MSG_WARN([Cannot find GhostScript in your PATH]) - fi -]) - -# Checks for libraries. -AC_CHECK_LIB(m, pow) -AC_CHECK_LIB(z, deflate) -AC_CHECK_LIB(gen, basename) -AC_CHECK_LIB([png], [png_read_image],, - [AC_MSG_ERROR([cannot find/use libpng])]) -AC_CHECK_LIB([gd], [gdImageCreate],, - [AC_MSG_ERROR([cannot find/use libgd -This drawing library can be downloaded at http://www.boutell.com/gd])]) -AC_CHECK_LIB([kpathsea], [kpse_set_progname],, - AC_MSG_ERROR([cannot find/use libkpathsea])) -AC_CHECK_LIB([t1], [T1_InitLib]) -PSFONTS_O="" -if test "$ac_cv_lib_t1_T1_InitLib" = yes; then - PSFONTS_O="t1.o" -fi -AC_SUBST(PSFONTS_O) - -# Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS([gd.h png.h kpathsea/kpathsea.h],, - [AC_MSG_ERROR([cannot find/use $ac_header])]) -AC_CHECK_HEADERS([t1lib.h]) -AC_CHECK_FT2(,[CFLAGS="$FT2_CFLAGS $CFLAGS" - LIBS="$FT2_LIBS $LIBS" - PSFONTS_O="$PSFONTS_O sfd.o ft.o" - AC_DEFINE(HAVE_FT2, 1, [Define to 1 if you have freetype2]) - ac_have_freetype2="yes"], - [ac_have_freetype2="no"]) -if test -n "$PSFONTS_O"; then - PSFONTS_O="$PSFONTS_O enc.o fontmap.o tfm.o" -fi -AC_HEADER_SYS_WAIT -AC_HEADER_TIME -AC_HEADER_STDBOOL -AC_CHECK_HEADERS([fcntl.h sys/time.h]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_PID_T -AC_TYPE_SIZE_T -if test "$ac_cv_header_inttypes_h" = "yes"; then - # Sometimes we want to use gcc -ansi -pedantic as a portability test - # The typedef of int64_t is not in the system header file in that - # case. Then, #define int64_t as "long long", which is non-ansi, but - # is present in most modern compilers. Using a #define rather than a - # typedef can be a problem, but in dvipng int64_t is only used as - # typecast, and there are no problems. autoconf 2.13 equivalent: - # AC_CHECK_TYPE(int64_t, long long) - # AC_CHECK_TYPE(uint64_t, unsigned long long) - AC_CHECK_TYPE([int64_t],, - [AC_DEFINE_UNQUOTED([int64_t], [long long], - [Define to `long long' if - does not define it.])]) - AC_CHECK_TYPE([uint64_t],, - [AC_DEFINE_UNQUOTED([uint64_t], [unsigned long long], - [Define to `unsigned long long' if - does not define it.])]) -fi -AC_HAS_KPSE_ENC_FORMATS - - -# Checks for library functions. -AC_FUNC_ALLOCA -AC_FUNC_FORK -AC_FUNC_MALLOC -AC_FUNC_MMAP -AC_FUNC_STRTOD -AC_FUNC_VPRINTF -AC_CHECK_FUNCS([dup2 memset munmap pow putenv strchr strrchr strtol strstr]) -if test "$enable_timing" = "yes"; then - AC_CHECK_FUNCS([ftime gettimeofday]) -fi -AC_CHECK_FUNCS([gdImageCreateTrueColor gdImageCreateFromJpeg gdImagePngEx gdImageCreateFromPngPtr gdImageGif FT_Library_Version]) -if test "$ac_cv_func_gdImageGif" = "yes"; then - INSTALL_BIN_TARGET="install-dvigif" -else - INSTALL_BIN_TARGET="install-dvipng" -fi -AC_SUBST(INSTALL_BIN_TARGET) - -# Documentation-related checks -AC_PATH_PROG(MAKEINFO, makeinfo, :) -MAKEINFO_CHECK_MACROS(acronym env option) -AC_PATH_PROG(INSTALL_INFO, install-info, :, $PATH /usr/sbin /sbin) - -# SELFAUTO -AC_ARG_ENABLE(selfauto-set, - AC_HELP_STRING([--enable-selfauto-set], - [This option will make the final binary explicitly set the - $SELFAUTO... variables to make it look as dvipng is installed in the - main texmf tree, even if it isn't. This is necessary when texmf.cnf - only uses $SELFAUTO... variables and dvipng is not installed in the - texmf tree. Otherwise, dvipng may not be able to find virtual - fonts, or psfonts.map. To find out, first build the binary and do - 'make test'. If the test fails, you need this switch.]), - [ if test "$enableval" = yes ; then - AC_MSG_CHECKING([for \$SELFAUTOLOC]) - SELFAUTOLOC=`kpsewhich -expand-var=\\\$SELFAUTOLOC` - AC_DEFINE_UNQUOTED(ENV_SELFAUTOLOC,["SELFAUTOLOC=$SELFAUTOLOC"], - [The environment setting for $SELFAUTOLOC]) - AC_MSG_RESULT([$SELFAUTOLOC]) - AC_MSG_CHECKING([for \$SELFAUTODIR]) - SELFAUTODIR=`kpsewhich -expand-var=\\\$SELFAUTODIR` - AC_DEFINE_UNQUOTED(ENV_SELFAUTODIR,["SELFAUTODIR=$SELFAUTODIR"], - [The environment setting for $SELFAUTODIR]) - AC_MSG_RESULT([$SELFAUTODIR]) - AC_MSG_CHECKING([for \$SELFAUTOPARENT]) - SELFAUTOPARENT=`kpsewhich -expand-var=\\\$SELFAUTOPARENT` - AC_DEFINE_UNQUOTED(ENV_SELFAUTOPARENT,["SELFAUTOPARENT=$SELFAUTOPARENT"], - [The environment setting for $SELFAUTOPARENT]) - AC_MSG_RESULT([$SELFAUTOPARENT]) - fi ], - [AC_MSG_CHECKING([for texmf.cnf]) - TEXMF_CNF=`kpsewhich texmf.cnf` - AC_MSG_RESULT([$TEXMF_CNF]) - AC_PATH_PROG(KPSEWHICH, kpsewhich) - AC_MSG_CHECKING([for psfonts.map]) - cp $KPSEWHICH . - PSFONTS_MAP=`./kpsewhich psfonts.map` - rm -f ./kpsewhich - if test -n "$PSFONTS_MAP"; then - AC_MSG_RESULT([$PSFONTS_MAP]) - else - AC_MSG_RESULT([not found from outside the texmf tree]) - AC_MSG_CHECKING([for \$SELFAUTO in texmf.cnf]) - if grep SELFAUTO "$TEXMF_CNF" > /dev/null 2> /dev/null; then - AC_MSG_RESULT([yes -*************************************************************** -texmf.cnf is using \$SELFAUTO... variables. If you are going to -install dvipng outside the texmf tree, you may need to use ---enable-selfauto-set. To find out, do 'make ; make test'. If the test -is unsuccessful, add the mentioned switch and rebuild. -***************************************************************]) - else - AC_MSG_RESULT([no]) - fi - fi]) - -AC_MSG_RESULT([ -** Configuration summary for $PACKAGE_STRING: - - The -d (debug) switch is enabled: $enable_debug - Your gd is new enough (>=2.0) to enable - the --truecolor switch, full alpha - transparency, proper rescaling of - included bitmaps, and jpeg inclusion: $ac_cv_func_gdImageCreateTrueColor - Your gd has jpeg inclusion enabled: $ac_cv_func_gdImageCreateFromJpeg - Your gd is new enough (>=2.0.12) to - enable transparent backgrounds for EPS - inclusion and the -z (compression) - switch: $ac_cv_func_gdImagePngEx - Your gd is new enough (>=2.0.21) to - allow image creation from memory $ac_cv_func_gdImageCreateFromPngPtr - Your gd is new enough (>=2.0.28) to - enable gif inclusion and output - (dvigif): $ac_cv_func_gdImageGif - FreeType font rendering available: $ac_have_freetype2 - Support for subfonts (CJK-LaTeX): $ac_have_freetype2 - T1lib font rendering available: $ac_cv_lib_t1_T1_InitLib -]) - -AC_CONFIG_HEADER([config.h]) -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT diff --git a/Build/source/texk/dvipng/configure.ac.demo b/Build/source/texk/dvipng/configure.ac.demo deleted file mode 100644 index 952d52a3c03..00000000000 --- a/Build/source/texk/dvipng/configure.ac.demo +++ /dev/null @@ -1,174 +0,0 @@ -# -*- Autoconf -*- -# configure.ac -# Process this file with autoconf to produce a configure script. - -#************************************************************************ -# -# Part of the dvipng distribution -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301 USA. -# -# Copyright (C) 2002-2006 Jan-Åke Larsson -# -#************************************************************************ - -AC_PREREQ(2.60) -AC_INIT([dvipng-demo], [1.9], [dvipng@nongnu.org]) -AC_CONFIG_AUX_DIR([cf]) -AC_CONFIG_SRCDIR([dvipng.c]) -AC_CONFIG_HEADERS([config.h]) - -AM_INIT_AUTOMAKE[]dnl using automake - -AC_ARG_ENABLE(debug, - AC_HELP_STRING([--disable-debug],[Compile without debug (-d) option]), - [ if test "$enableval" = yes ; then - AC_DEFINE(DEBUG, 1, [Define as 1 to get the debug (-d) option.]) - fi ], - [ enable_debug="yes"; - AC_DEFINE(DEBUG, 1, [Define as 1 to get the debug (-d) option.])]) -AC_ARG_ENABLE(timing, - AC_HELP_STRING([--enable-timing],[Output execution time of dvipng]), - [ if test "$enableval" = yes ; then - AC_DEFINE(TIMING, 1, [Define as 1 to get execution time output.]) - fi ]) - -# Checks for programs. -AC_SET_MAKE -AC_PROG_CC -AC_PROG_INSTALL - -AC_PROG_LIBTOOL[]dnl using libtool to link executables - -AC_ARG_WITH(gs, - AC_HELP_STRING([--with-gs=/PATH/TO/gs],[Hard-wire the location of GhostScript]), - [if test "x$withval" = xno ; then - GS=no - else - AC_PATH_PROG(GS,["$withval"]) - fi], - [AC_CHECK_PROG(GS,gs,gs) - if test -z "$GS"; then - GS="gs" - AC_MSG_WARN([Cannot find GhostScript in your PATH]) - fi -]) -AC_DEFINE_UNQUOTED(GS_PATH, "$GS", [Define as the path to GhostScript.]) -GS_WARN="" -xx_GS_HAS_DEVICE(pngalpha, - [GS_WARN="Your EPS inclusions will be cropped to the - boundingbox, and rendered on an opaque background. - Upgrade GhostScript to avoid this." - xx_GS_HAS_DEVICE(png16m, - [GS_WARN="Your EPS inclusions may not work. - Upgrade/install GhostScript to avoid this."])]) -if test -n "$GS_WARN"; then - AC_MSG_WARN([$GS_WARN]) -fi - -# Checks for libraries and header files. -AC_SEARCH_LIBS([pow], [m]) -AC_SEARCH_LIBS([basename], [gen]) - -KPSE_INIT([dvipng])[]dnl initialize kpathsea.m4 -ENABLE_TETEX_BUILD[]dnl Kpathsea is required -KPSE_CHECK_ZLIB[]dnl Zlib is required (sorry, Libpng requires Zlib) -KPSE_CHECK_LIBPNG[]dnl Libpng is required -dnl KPSE_CHECK_FREETYPE2[]dnl Freetype2 is required -KPSE_WITH_FREETYPE2[]dnl Freetype2 is optional -KPSE_CHECK_GD[]dnl Gd is required -KPSE_WITH_T1LIB[]dnl T1lib is optional - -AM_CONDITIONAL([USE_T1], [test "$have_t1lib" = yes]) -AM_CONDITIONAL([USE_FT2], [test "$have_freetype2" = yes]) - -AC_HEADER_STDC -AC_HEADER_SYS_WAIT -AC_HEADER_TIME -AC_HEADER_STDBOOL -AC_CHECK_HEADERS([fcntl.h sys/time.h]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_PID_T -AC_TYPE_SIZE_T -if test "$ac_cv_header_inttypes_h" = "yes"; then - # Sometimes we want to use gcc -ansi -pedantic as a portability test - # The typedef of int64_t is not in the system header file in that - # case. Then, #define int64_t as "long long", which is non-ansi, but - # is present in most modern compilers. Using a #define rather than a - # typedef can be a problem, but in dvipng int64_t is only used as - # typecast, and there are no problems. autoconf 2.13 equivalent: - # AC_CHECK_TYPE(int64_t, long long) - # AC_CHECK_TYPE(uint64_t, unsigned long long) - AC_CHECK_TYPE([int64_t],, - [AC_DEFINE_UNQUOTED([int64_t], [long long], - [Define to `long long' if - does not define it.])]) - AC_CHECK_TYPE([uint64_t],, - [AC_DEFINE_UNQUOTED([uint64_t], [unsigned long long], - [Define to `unsigned long long' if - does not define it.])]) -fi - - -# Checks for library functions. -AC_FUNC_ALLOCA -AC_FUNC_FORK -AC_FUNC_MALLOC -AC_FUNC_MMAP -AC_FUNC_STRTOD -AC_FUNC_VPRINTF -AC_CHECK_FUNCS([dup2 memset munmap pow putenv strchr strrchr strtol strstr]) -if test "$enable_timing" = "yes"; then - AC_CHECK_FUNCS([ftime gettimeofday]) -fi -KPSE_CHECK_FUNCS([gdImageCreateTrueColor gdImagePngEx gdImageGif gdImageJpeg FT_Library_Version]) -AM_CONDITIONAL([WITH_DVIGIF], [test "$ac_cv_func_gdImageGif" = yes]) - -# Documentation-related checks -AC_PATH_PROG(MAKEINFO, makeinfo, :) -MAKEINFO_CHECK_MACROS(acronym env option) -AC_PATH_PROG(INSTALL_INFO, install-info, :, $PATH /usr/sbin /sbin) - -KPSE_SELFAUTO[]dnl handle SELFAUTO variables. -AC_SUBST([TEXMFMAIN]) -AC_SUBST([enable_selfauto_set]) - -AC_MSG_RESULT([ -** Configuration summary for $PACKAGE_STRING: - - The -d (debug) switch is enabled: $enable_debug - Your gd is new enough (>=2.0) to enable - the --truecolor switch, full alpha - transparency, and proper rescaling of - included bitmaps: $ac_cv_func_gdImageCreateTrueColor - Your gd was built with jpeg inclusion: $ac_cv_func_gdImageJpeg - Your gd is new enough (>=2.0.12) to - enable transparent backgrounds for EPS - inclusion and the -z (compression) - switch: $ac_cv_func_gdImagePngEx - Your gd is new enough (>=2.0.28) to - enable gif inclusion and output - (dvigif): $ac_cv_func_gdImageGif - FreeType font rendering available: $have_freetype2 - Support for subfonts (CJK-LaTeX): $have_freetype2 - T1lib font rendering available: $have_t1lib -]) - -AC_CONFIG_FILES([Makefile]) -AC_CONFIG_FILES([test_dvipng], [chmod a+x test_dvipng]) -AC_OUTPUT diff --git a/Build/source/texk/dvipng/configure.ac.orig b/Build/source/texk/dvipng/configure.ac.orig index da5aaf0a479..509591c93ba 100644 --- a/Build/source/texk/dvipng/configure.ac.orig +++ b/Build/source/texk/dvipng/configure.ac.orig @@ -1,9 +1,5 @@ # configure.ac -# Adapted for dvipng-1.9 / teTeX by Thomas Esser. -# Adapted for dvipng-1.10 / TeX live by Peter Breitenlohner. -# All settings here are our fault, don't blame the dvipng maintainers for it. - #************************************************************************ # # Part of the dvipng distribution @@ -22,12 +18,12 @@ # License along with this program. If not, see # . # -# Copyright (C) 2002-2008 Jan-Åke Larsson +# Copyright (C) 2002-2009 Jan-Åke Larsson # #************************************************************************ # Process this file with autoconf to produce a configure script. -AC_INIT([dvipng], [1.11], [dvipng@nongnu.org]) +AC_INIT([dvipng], [1.12], [dvipng@nongnu.org]) AC_CONFIG_SRCDIR([dvipng.c]) AC_ARG_ENABLE(debug, @@ -44,123 +40,100 @@ AC_ARG_ENABLE(timing, fi ]) # Checks for programs. -AC_PROG_MAKE_SET +AC_SET_MAKE AC_PROG_CC AC_PROG_INSTALL AC_PROG_LN_S AC_ARG_WITH(gs, AC_HELP_STRING([--with-gs=/PATH/TO/gs],[Hard-wire the location of GhostScript]), - [if test "x$withval" = xno ; then - GS=no - else + [if test "x$withval" != xno ; then AC_PATH_PROG(GS,["$withval"]) + AC_DEFINE_UNQUOTED(GS_PATH, "$GS", [Define as the path to GhostScript.]) GS_CHECK_DEVICES fi], [AC_CHECK_PROG(GS,gs,gs) + AC_DEFINE_UNQUOTED(GS_PATH, "gs", [Define as the path to GhostScript.]) if test -n "$GS"; then GS_CHECK_DEVICES else - GS="gs" AC_MSG_WARN([Cannot find GhostScript in your PATH]) fi ]) -AC_DEFINE_UNQUOTED(GS_PATH, "$GS", [Define as the path to GhostScript.]) -ac_cv_lib_t1_T1_InitLib=yes +# Checks for libraries. +AC_CHECK_LIB(m, pow) +AC_CHECK_LIB(z, deflate) +AC_CHECK_LIB(gen, basename) +AC_CHECK_LIB([png], [png_read_image],, + [AC_MSG_ERROR([cannot find/use libpng])]) +AC_CHECK_LIB([gd], [gdImageCreate],, + [AC_MSG_ERROR([cannot find/use libgd +This drawing library can be downloaded at http://www.boutell.com/gd])]) +AC_CHECK_LIB([kpathsea], [kpse_set_progname],, + AC_MSG_ERROR([cannot find/use libkpathsea])) +AC_CHECK_LIB([t1], [T1_InitLib]) PSFONTS_O="" if test "$ac_cv_lib_t1_T1_InitLib" = yes; then PSFONTS_O="t1.o" fi AC_SUBST(PSFONTS_O) -ac_have_freetype2="yes" # we have ft2 -if test "$ac_have_freetype2" = yes; then - # Have to set compiler and linker flags in Makefile.in, it seems. +# Checks for header files. +AC_HEADER_STDC +AC_CHECK_HEADERS([gd.h png.h kpathsea/kpathsea.h],, + [AC_MSG_ERROR([cannot find/use $ac_header])]) +AC_CHECK_HEADERS([t1lib.h]) +AC_CHECK_FT2(,[CFLAGS="$FT2_CFLAGS $CFLAGS" + LIBS="$FT2_LIBS $LIBS" PSFONTS_O="$PSFONTS_O sfd.o ft.o" AC_DEFINE(HAVE_FT2, 1, [Define to 1 if you have freetype2]) - AC_DEFINE(HAVE_FT_LIBRARY_VERSION) -fi - + ac_have_freetype2="yes"], + [ac_have_freetype2="no"]) if test -n "$PSFONTS_O"; then PSFONTS_O="$PSFONTS_O enc.o fontmap.o tfm.o" fi -AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_HEADER_TIME AC_HEADER_STDBOOL -AC_CHECK_HEADERS([inttypes.h fcntl.h sys/time.h]) +AC_CHECK_HEADERS([fcntl.h sys/time.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_PID_T AC_TYPE_SIZE_T - -#if test "$ac_cv_header_inttypes_h" = yes; then +if test "$ac_cv_header_inttypes_h" = "yes"; then # Sometimes we want to use gcc -ansi -pedantic as a portability test # The typedef of int64_t is not in the system header file in that # case. Then, #define int64_t as "long long", which is non-ansi, but # is present in most modern compilers. Using a #define rather than a - # typedef can be a problem, but in dvipng int64_t only is used as - # typecast, and there are no problems. + # typedef can be a problem, but in dvipng int64_t is only used as + # typecast, and there are no problems. autoconf 2.13 equivalent: + # AC_CHECK_TYPE(int64_t, long long) + # AC_CHECK_TYPE(uint64_t, unsigned long long) + AC_CHECK_TYPE([int64_t],, + [AC_DEFINE_UNQUOTED([int64_t], [long long], + [Define to `long long' if + does not define it.])]) + AC_CHECK_TYPE([uint64_t],, + [AC_DEFINE_UNQUOTED([uint64_t], [unsigned long long], + [Define to `unsigned long long' if + does not define it.])]) +fi +AC_HAS_KPSE_ENC_FORMATS -# MY_CHECK_TYPE(int64_t, long long) -# MY_CHECK_TYPE(uint64_t, unsigned long long) -#fi # Checks for library functions. AC_FUNC_ALLOCA +AC_FUNC_FORK +AC_FUNC_MALLOC AC_FUNC_MMAP +AC_FUNC_STRTOD AC_FUNC_VPRINTF AC_CHECK_FUNCS([dup2 memset munmap pow putenv strchr strrchr strtol strstr]) if test "$enable_timing" = "yes"; then AC_CHECK_FUNCS([ftime gettimeofday]) fi - -AC_SEARCH_LIBS([pow], [m]) -AC_SEARCH_LIBS([basename], [gen]) - -# Documentation-related checks -AC_PATH_PROG(MAKEINFO, makeinfo, :) -MAKEINFO_CHECK_MACROS(acronym env option) -AC_PATH_PROG(INSTALL_INFO, install-info, :, $PATH /usr/sbin /sbin) - -sinclude(../../libs/zlib/withenable.ac) -sinclude(../../libs/zlib/zlib.ac) -sinclude(../../libs/libpng/withenable.ac) -sinclude(../../libs/libpng/libpng.ac) -sinclude(../../libs/t1lib/withenable.ac) -sinclude(../../libs/t1lib/t1lib.ac) -sinclude(../../libs/freetype2/withenable.ac) -sinclude(../../libs/freetype2/freetype2.ac) -sinclude(../../libs/gd/withenable.ac) -sinclude(../../libs/gd/gd.ac) -sinclude(../kpathsea/withenable.ac) - -if test "$with_system_freetype2" = yes; then - OLD_LIBS=$LIBS - LIBS="$LDFREETYPE2 $LIBS" - AC_CHECK_FUNCS([FT_Library_Version]) - LIBS=$OLD_LIBS -else - AC_DEFINE([HAVE_FT_LIBRARY_VERSION]) -fi - -if test "$with_system_gd" = yes; then - OLD_LIBS=$LIBS - LIBS="$LDGD $LIBS" - AC_CHECK_FUNCS([gdImageCreateTrueColor gdImageCreateFromJpeg gdImagePngEx gdImageCreateFromPngPtr gdImageGif]) - LIBS=$OLD_LIBS -else - AC_DEFINE([HAVE_GDIMAGECREATETRUECOLOR]) - AC_DEFINE([HAVE_GDIMAGEPNGEX]) - AC_DEFINE([HAVE_GDIMAGECREATEFROMPNGPTR]) - ac_cv_func_gdImageGif=yes - AC_DEFINE([HAVE_GDIMAGEGIF]) -fi - -AC_DEFINE([HAVE_GD_H]) -AC_DEFINE([HAVE_LIBGD]) - +AC_CHECK_FUNCS([gdImageCreateTrueColor gdImageCreateFromJpeg gdImagePngEx gdImageCreateFromPngPtr gdImageGif FT_Library_Version]) if test "$ac_cv_func_gdImageGif" = "yes"; then INSTALL_BIN_TARGET="install-dvigif" else @@ -168,49 +141,87 @@ else fi AC_SUBST(INSTALL_BIN_TARGET) -AC_DEFINE([HAVE_T1LIB_H], 1, - [Define to 1 if you have the header file.]) -AC_DEFINE([HAVE_LIBT1], 1, - [Define to 1 if you have the `t1' library (-lt1).]) - -AC_DEFINE([HAVE_PNG_H], 1, - [Define to 1 if you have the header file.]) -AC_DEFINE([HAVE_LIBPNG], 1, - [Define to 1 if you have the `png' library (-lpng).]) - -AC_DEFINE([HAVE_LIBZ]) - -# Allow shared or static libkpathsea -LIBS="-L../kpathsea/.libs -lkpathsea $LIBS" -AC_DEFINE([HAVE_KPATHSEA_KPATHSEA_H], 1, - [Define to 1 if you have the header file.]) -AC_DEFINE([HAVE_KPSE_ENC_FORMATS], 1, - [Define to 1 if your kpathsea has kpse_enc_format.]) -AC_DEFINE([HAVE_LIBKPATHSEA], 1, - [Define to 1 if you have the `kpathsea' library (-lkpathsea).]) +# Documentation-related checks +AC_PATH_PROG(MAKEINFO, makeinfo, :) +MAKEINFO_CHECK_MACROS(acronym env option) +AC_PATH_PROG(INSTALL_INFO, install-info, :, $PATH /usr/sbin /sbin) -# -# Check for ApplicationServices framework (Mac OS X) -# -AC_DEFUN([AC_HAS_APP_SERVICES], [ - _cppflags=$CPPFLAGS _ldflags=$LDFLAGS - AC_MSG_CHECKING([for Mac OS X ApplicationServices framework]) - AC_TRY_COMPILE( - [ -#include - ], [ -ATSFontRef fontRef; - ], - [ AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_APP_SERVICES, 1, [Define if you have ApplicationServices (Mac OS X)]) - LIBS="$LIBS -framework ApplicationServices" - ], - [ AC_MSG_RESULT(no) ] - ) +# SELFAUTO +AC_ARG_ENABLE(selfauto-set, + AC_HELP_STRING([--enable-selfauto-set], + [This option will make the final binary explicitly set the + $SELFAUTO... variables to make it look as dvipng is installed in the + main texmf tree, even if it isn't. This is necessary when texmf.cnf + only uses $SELFAUTO... variables and dvipng is not installed in the + texmf tree. Otherwise, dvipng may not be able to find virtual + fonts, or psfonts.map. To find out, first build the binary and do + 'make test'. If the test fails, you need this switch.]), + [ if test "$enableval" = yes ; then + AC_MSG_CHECKING([for \$SELFAUTOLOC]) + SELFAUTOLOC=`kpsewhich -expand-var=\\\$SELFAUTOLOC` + AC_DEFINE_UNQUOTED(ENV_SELFAUTOLOC,["SELFAUTOLOC=$SELFAUTOLOC"], + [The environment setting for $SELFAUTOLOC]) + AC_MSG_RESULT([$SELFAUTOLOC]) + AC_MSG_CHECKING([for \$SELFAUTODIR]) + SELFAUTODIR=`kpsewhich -expand-var=\\\$SELFAUTODIR` + AC_DEFINE_UNQUOTED(ENV_SELFAUTODIR,["SELFAUTODIR=$SELFAUTODIR"], + [The environment setting for $SELFAUTODIR]) + AC_MSG_RESULT([$SELFAUTODIR]) + AC_MSG_CHECKING([for \$SELFAUTOPARENT]) + SELFAUTOPARENT=`kpsewhich -expand-var=\\\$SELFAUTOPARENT` + AC_DEFINE_UNQUOTED(ENV_SELFAUTOPARENT,["SELFAUTOPARENT=$SELFAUTOPARENT"], + [The environment setting for $SELFAUTOPARENT]) + AC_MSG_RESULT([$SELFAUTOPARENT]) + fi ], + [AC_MSG_CHECKING([for texmf.cnf]) + TEXMF_CNF=`kpsewhich texmf.cnf` + AC_MSG_RESULT([$TEXMF_CNF]) + AC_PATH_PROG(KPSEWHICH, kpsewhich) + AC_MSG_CHECKING([for psfonts.map]) + cp $KPSEWHICH . + PSFONTS_MAP=`./kpsewhich psfonts.map` + rm -f ./kpsewhich + if test -n "$PSFONTS_MAP"; then + AC_MSG_RESULT([$PSFONTS_MAP]) + else + AC_MSG_RESULT([not found from outside the texmf tree]) + AC_MSG_CHECKING([for \$SELFAUTO in texmf.cnf]) + if grep SELFAUTO "$TEXMF_CNF" > /dev/null 2> /dev/null; then + AC_MSG_RESULT([yes +*************************************************************** +texmf.cnf is using \$SELFAUTO... variables. If you are going to +install dvipng outside the texmf tree, you may need to use +--enable-selfauto-set. To find out, do 'make ; make test'. If the test +is unsuccessful, add the mentioned switch and rebuild. +***************************************************************]) + else + AC_MSG_RESULT([no]) + fi + fi]) + +AC_MSG_RESULT([ +** Configuration summary for $PACKAGE_STRING: + + The -d (debug) switch is enabled: $enable_debug + Your gd is new enough (>=2.0) to enable + the --truecolor switch, full alpha + transparency, proper rescaling of + included bitmaps, and jpeg inclusion: $ac_cv_func_gdImageCreateTrueColor + Your gd has jpeg inclusion enabled: $ac_cv_func_gdImageCreateFromJpeg + Your gd is new enough (>=2.0.12) to + enable transparent backgrounds for EPS + inclusion and the -z (compression) + switch: $ac_cv_func_gdImagePngEx + Your gd is new enough (>=2.0.21) to + allow image creation from memory $ac_cv_func_gdImageCreateFromPngPtr + Your gd is new enough (>=2.0.28) to + enable gif inclusion and output + (dvigif): $ac_cv_func_gdImageGif + FreeType font rendering available: $ac_have_freetype2 + Support for subfonts (CJK-LaTeX): $ac_have_freetype2 + T1lib font rendering available: $ac_cv_lib_t1_T1_InitLib ]) -AC_HAS_APP_SERVICES - -AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_HEADER([config.h]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/Build/source/texk/dvipng/configure.ac.work b/Build/source/texk/dvipng/configure.ac.work deleted file mode 100644 index ed645fa2a89..00000000000 --- a/Build/source/texk/dvipng/configure.ac.work +++ /dev/null @@ -1,91 +0,0 @@ -# configure.ac - -# Process this file with autoconf to produce a configure script. -AC_INIT([dvipng], [1.12], [dvipng@nongnu.org]) -AC_CONFIG_SRCDIR([dvipng.c]) - - -# Checks for programs. -AC_SET_MAKE -AC_PROG_CC -AC_PROG_INSTALL -AC_PROG_LN_S -AC_ARG_WITH(gs, - AC_HELP_STRING([--with-gs=/PATH/TO/gs],[Hard-wire the location of GhostScript]), - [if test "x$withval" != xno ; then - AC_PATH_PROG(GS,["$withval"]) - AC_DEFINE_UNQUOTED(GS_PATH, "$GS", [Define as the path to GhostScript.]) - GS_CHECK_DEVICES - fi], - [AC_CHECK_PROG(GS,gs,gs) - AC_DEFINE_UNQUOTED(GS_PATH, "gs", [Define as the path to GhostScript.]) - if test -n "$GS"; then - GS_CHECK_DEVICES - else - AC_MSG_WARN([Cannot find GhostScript in your PATH]) - fi -]) - -# Checks for libraries. - -# Checks for header files. - -# Checks for typedefs, structures, and compiler characteristics. - -# Checks for library functions. - -# Documentation-related checks - -# SELFAUTO -AC_ARG_ENABLE(selfauto-set, - AC_HELP_STRING([--enable-selfauto-set], - [This option will make the final binary explicitly set the - $SELFAUTO... variables to make it look as dvipng is installed in the - main texmf tree, even if it isn't. This is necessary when texmf.cnf - only uses $SELFAUTO... variables and dvipng is not installed in the - texmf tree. Otherwise, dvipng may not be able to find virtual - fonts, or psfonts.map. To find out, first build the binary and do - 'make test'. If the test fails, you need this switch.]), - [ if test "$enableval" = yes ; then - AC_MSG_CHECKING([for \$SELFAUTOLOC]) - SELFAUTOLOC=`kpsewhich -expand-var=\\\$SELFAUTOLOC` - AC_DEFINE_UNQUOTED(ENV_SELFAUTOLOC,["SELFAUTOLOC=$SELFAUTOLOC"], - [The environment setting for $SELFAUTOLOC]) - AC_MSG_RESULT([$SELFAUTOLOC]) - AC_MSG_CHECKING([for \$SELFAUTODIR]) - SELFAUTODIR=`kpsewhich -expand-var=\\\$SELFAUTODIR` - AC_DEFINE_UNQUOTED(ENV_SELFAUTODIR,["SELFAUTODIR=$SELFAUTODIR"], - [The environment setting for $SELFAUTODIR]) - AC_MSG_RESULT([$SELFAUTODIR]) - AC_MSG_CHECKING([for \$SELFAUTOPARENT]) - SELFAUTOPARENT=`kpsewhich -expand-var=\\\$SELFAUTOPARENT` - AC_DEFINE_UNQUOTED(ENV_SELFAUTOPARENT,["SELFAUTOPARENT=$SELFAUTOPARENT"], - [The environment setting for $SELFAUTOPARENT]) - AC_MSG_RESULT([$SELFAUTOPARENT]) - fi ], - [AC_MSG_CHECKING([for texmf.cnf]) - TEXMF_CNF=`kpsewhich texmf.cnf` - AC_MSG_RESULT([$TEXMF_CNF]) - AC_PATH_PROG(KPSEWHICH, kpsewhich) - AC_MSG_CHECKING([for psfonts.map]) - cp $KPSEWHICH . - PSFONTS_MAP=`./kpsewhich psfonts.map` - rm -f ./kpsewhich - if test -n "$PSFONTS_MAP"; then - AC_MSG_RESULT([$PSFONTS_MAP]) - else - AC_MSG_RESULT([not found from outside the texmf tree]) - AC_MSG_CHECKING([for \$SELFAUTO in texmf.cnf]) - if grep SELFAUTO "$TEXMF_CNF" > /dev/null 2> /dev/null; then - AC_MSG_RESULT([yes -*************************************************************** -texmf.cnf is using \$SELFAUTO... variables. If you are going to -install dvipng outside the texmf tree, you may need to use ---enable-selfauto-set. To find out, do 'make ; make test'. If the test -is unsuccessful, add the mentioned switch and rebuild. -***************************************************************]) - else - AC_MSG_RESULT([no]) - fi - fi]) - diff --git a/Build/source/texk/dvipng/doc/Makefile.am b/Build/source/texk/dvipng/doc/Makefile.am new file mode 100644 index 00000000000..0753c9c460a --- /dev/null +++ b/Build/source/texk/dvipng/doc/Makefile.am @@ -0,0 +1,61 @@ +## Makefile.am for the TeX Live subdirectory texk/dvipng/doc/ +## +## Copyright (C) 2009 Peter Breitenlohner +## You may freely use, modify and/or distribute this file. +# +## #################################### Documentation +## +info_TEXINFOS = dvipng.texi +dvipng_TEXINFOS = readme.texi install.texi macros.texi dvipng.help + +dist_noinst_SCRIPTS = texi2pod.pl + +dist_man1_MANS = dvipng.1 +dvipng.1: dvipng.texi readme.texi + $(srcdir)/texi2pod.pl -D man $(srcdir)/dvipng.texi | \ + sed -es/@//g -es/previewlatex/preview-latex/g -es/{}//g > dvipng.pod + pod2man --center="User commands" --release="$(PACKAGE_STRING)" \ + dvipng.pod > dvipng.1 + rm dvipng.pod + +www: dvipng.texi $(dvipng_TEXINFOS) + $(mkdir_p) www + $(TEXI2HTML) -split chapter -nosec-nav -subdir html \ + -I $(srcdir) $(srcdir)/dvipng.texi + (cd html; for i in *; do \ + sed -e "s/Jan-A/Jan-\Å\;/g" $$i > ../www/$$i; \ + done) + cp www/dvipng.html www/index.html + rm -rf html + +dvipng_mono.html: dvipng.texi $(dvipng_TEXINFOS) + $(TEXI2HTML) --monolithic -nomenu -nosec_nav -o dvipng_mono.html \ + -I $(srcdir) $(srcdir)/dvipng.texi + +distclean-local: + rm -rf www + rm -f dvipng_mono.html + +if have_gif +install-data-hook: + cd $(DESTDIR)$(man1dir) && \ + rm -f dvigif.1 && \ + $(LN_S) dvipng.1 dvigif.1 +uninstall-hook: + rm -f $(DESTDIR)$(man1dir)/dvigif.1 +endif have_gif + +## #################################### Maintainer targets +## +am-local: ../INSTALL ../README RELEASE + +../INSTALL: install.texi + -$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -D rawfile --no-headers --no-validate --no-number-sections \ + -o $@ $< + +../README: readme.texi + -$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -D rawfile --no-headers --no-validate --no-number-sections \ + -o $@ $< + diff --git a/Build/source/texk/dvipng/doc/Makefile.in b/Build/source/texk/dvipng/doc/Makefile.in new file mode 100644 index 00000000000..e31e9676632 --- /dev/null +++ b/Build/source/texk/dvipng/doc/Makefile.in @@ -0,0 +1,769 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = doc +DIST_COMMON = $(dist_man1_MANS) $(dist_noinst_SCRIPTS) \ + $(dvipng_TEXINFOS) $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gs-device.m4 \ + $(top_srcdir)/m4/makeinfo.m4 \ + $(top_srcdir)/../../m4/kpse-common.m4 \ + $(top_srcdir)/../../m4/kpse-freetype2-flags.m4 \ + $(top_srcdir)/../../m4/kpse-gd-flags.m4 \ + $(top_srcdir)/../../m4/kpse-kpathsea-flags.m4 \ + $(top_srcdir)/../../m4/kpse-libpng-flags.m4 \ + $(top_srcdir)/../../m4/kpse-t1lib-flags.m4 \ + $(top_srcdir)/../../m4/kpse-warnings.m4 \ + $(top_srcdir)/../../m4/kpse-zlib-flags.m4 \ + $(top_srcdir)/../../m4/libtool.m4 \ + $(top_srcdir)/../../m4/ltoptions.m4 \ + $(top_srcdir)/../../m4/ltsugar.m4 \ + $(top_srcdir)/../../m4/ltversion.m4 \ + $(top_srcdir)/../../m4/lt~obsolete.m4 \ + $(top_srcdir)/ac/dvipng.ac $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/../../build-aux/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SCRIPTS = $(dist_noinst_SCRIPTS) +SOURCES = +DIST_SOURCES = +INFO_DEPS = $(srcdir)/dvipng.info +TEXINFO_TEX = $(top_srcdir)/../../build-aux/texinfo.tex +am__TEXINFO_TEX_DIR = $(top_srcdir)/../../build-aux +DVIS = dvipng.dvi +PDFS = dvipng.pdf +PSS = dvipng.ps +HTMLS = dvipng.html +TEXINFOS = dvipng.texi +TEXI2DVI = texi2dvi +TEXI2PDF = $(TEXI2DVI) --pdf --batch +MAKEINFOHTML = $(MAKEINFO) --html +AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) +DVIPS = dvips +am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +man1dir = $(mandir)/man1 +NROFF = nroff +MANS = $(dist_man1_MANS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_MAKEINFOFLAGS = @AM_MAKEINFOFLAGS@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FREETYPE2_DEPEND = @FREETYPE2_DEPEND@ +FREETYPE2_INCLUDES = @FREETYPE2_INCLUDES@ +FREETYPE2_LIBS = @FREETYPE2_LIBS@ +FT2_CONFIG = @FT2_CONFIG@ +GD_DEPEND = @GD_DEPEND@ +GD_INCLUDES = @GD_INCLUDES@ +GD_LIBS = @GD_LIBS@ +GREP = @GREP@ +GS = @GS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_INFO = @INSTALL_INFO@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ +KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ +KPATHSEA_LIBS = @KPATHSEA_LIBS@ +KPSEWHICH = @KPSEWHICH@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBPNG_DEPEND = @LIBPNG_DEPEND@ +LIBPNG_INCLUDES = @LIBPNG_INCLUDES@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POW_LIB = @POW_LIB@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +T1LIB_DEPEND = @T1LIB_DEPEND@ +T1LIB_INCLUDES = @T1LIB_INCLUDES@ +T1LIB_LIBS = @T1LIB_LIBS@ +VERSION = @VERSION@ +WARNING_CFLAGS = @WARNING_CFLAGS@ +ZLIB_DEPEND = @ZLIB_DEPEND@ +ZLIB_INCLUDES = @ZLIB_INCLUDES@ +ZLIB_LIBS = @ZLIB_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# +info_TEXINFOS = dvipng.texi +dvipng_TEXINFOS = readme.texi install.texi macros.texi dvipng.help +dist_noinst_SCRIPTS = texi2pod.pl +dist_man1_MANS = dvipng.1 +all: all-am + +.SUFFIXES: +.SUFFIXES: .dvi .html .info .pdf .ps .texi +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign doc/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +.texi.info: + restore=: && backupdir="$(am__leading_dot)am$$$$" && \ + am__cwd=`pwd` && $(am__cd) $(srcdir) && \ + rm -rf $$backupdir && mkdir $$backupdir && \ + if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ + for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ + if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ + done; \ + else :; fi && \ + cd "$$am__cwd"; \ + if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $@ $<; \ + then \ + rc=0; \ + $(am__cd) $(srcdir); \ + else \ + rc=$$?; \ + $(am__cd) $(srcdir) && \ + $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ + fi; \ + rm -rf $$backupdir; exit $$rc + +.texi.dvi: + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ + $(TEXI2DVI) $< + +.texi.pdf: + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ + $(TEXI2PDF) $< + +.texi.html: + rm -rf $(@:.html=.htp) + if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $(@:.html=.htp) $<; \ + then \ + rm -rf $@; \ + if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ + mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \ + else \ + if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ + rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ + exit 1; \ + fi +$(srcdir)/dvipng.info: dvipng.texi $(dvipng_TEXINFOS) +dvipng.dvi: dvipng.texi $(dvipng_TEXINFOS) +dvipng.pdf: dvipng.texi $(dvipng_TEXINFOS) +dvipng.html: dvipng.texi $(dvipng_TEXINFOS) +.dvi.ps: + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + $(DVIPS) -o $@ $< + +uninstall-dvi-am: + @$(NORMAL_UNINSTALL) + @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ + rm -f "$(DESTDIR)$(dvidir)/$$f"; \ + done + +uninstall-html-am: + @$(NORMAL_UNINSTALL) + @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ + rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ + done + +uninstall-info-am: + @$(PRE_UNINSTALL) + @if test -d '$(DESTDIR)$(infodir)' && \ + (install-info --version && \ + install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ + list='$(INFO_DEPS)'; \ + for file in $$list; do \ + relfile=`echo "$$file" | sed 's|^.*/||'`; \ + echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ + if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ + then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ + done; \ + else :; fi + @$(NORMAL_UNINSTALL) + @list='$(INFO_DEPS)'; \ + for file in $$list; do \ + relfile=`echo "$$file" | sed 's|^.*/||'`; \ + relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ + (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ + echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ + rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ + else :; fi); \ + done + +uninstall-pdf-am: + @$(NORMAL_UNINSTALL) + @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ + done + +uninstall-ps-am: + @$(NORMAL_UNINSTALL) + @list='$(PSS)'; test -n "$(psdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ + rm -f "$(DESTDIR)$(psdir)/$$f"; \ + done + +dist-info: $(INFO_DEPS) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + list='$(INFO_DEPS)'; \ + for base in $$list; do \ + case $$base in \ + $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ + esac; \ + if test -f $$base; then d=.; else d=$(srcdir); fi; \ + base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ + for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ + if test -f $$file; then \ + relfile=`expr "$$file" : "$$d/\(.*\)"`; \ + test -f "$(distdir)/$$relfile" || \ + cp -p $$file "$(distdir)/$$relfile"; \ + else :; fi; \ + done; \ + done + +mostlyclean-aminfo: + -rm -rf dvipng.aux dvipng.cp dvipng.cps dvipng.fn dvipng.ky dvipng.log \ + dvipng.pg dvipng.tmp dvipng.toc dvipng.tp dvipng.tps \ + dvipng.vr + +clean-aminfo: + -test -z "dvipng.dvi dvipng.pdf dvipng.ps dvipng.html" \ + || rm -rf dvipng.dvi dvipng.pdf dvipng.ps dvipng.html + +maintainer-clean-aminfo: + @list='$(INFO_DEPS)'; for i in $$list; do \ + i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ + echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ + rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ + done +install-man1: $(dist_man1_MANS) + @$(NORMAL_INSTALL) + test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" + @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \ + { for i in $$list; do echo "$$i"; done; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + test -z "$$files" || { \ + echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @list='$(MANS)'; if test -n "$$list"; then \ + list=`for p in $$list; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ + if test -n "$$list" && \ + grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ + echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ + grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ + echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ + echo " typically \`make maintainer-clean' will remove them" >&2; \ + exit 1; \ + else :; fi; \ + else :; fi + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-info +check-am: all-am +check: check-am +all-am: Makefile $(INFO_DEPS) $(SCRIPTS) $(MANS) +installdirs: + for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +@have_gif_FALSE@install-data-hook: +@have_gif_FALSE@uninstall-hook: +clean: clean-am + +clean-am: clean-aminfo clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-local + +dvi: dvi-am + +dvi-am: $(DVIS) + +html: html-am + +html-am: $(HTMLS) + +info: info-am + +info-am: $(INFO_DEPS) + +install-data-am: install-info-am install-man + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-data-hook +install-dvi: install-dvi-am + +install-dvi-am: $(DVIS) + @$(NORMAL_INSTALL) + test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)" + @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \ + done +install-exec-am: + +install-html: install-html-am + +install-html-am: $(HTMLS) + @$(NORMAL_INSTALL) + test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" + @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ + for p in $$list; do \ + if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ + $(am__strip_dir) \ + if test -d "$$d$$p"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ + $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ + echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ + else \ + list2="$$list2 $$d$$p"; \ + fi; \ + done; \ + test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ + done; } +install-info: install-info-am + +install-info-am: $(INFO_DEPS) + @$(NORMAL_INSTALL) + test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ + for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + esac; \ + if test -f $$file; then d=.; else d=$(srcdir); fi; \ + file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ + for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ + $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ + if test -f $$ifile; then \ + echo "$$ifile"; \ + else : ; fi; \ + done; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done + @$(POST_INSTALL) + @if (install-info --version && \ + install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ + list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ + for file in $$list; do \ + relfile=`echo "$$file" | sed 's|^.*/||'`; \ + echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ + install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ + done; \ + else : ; fi +install-man: install-man1 + +install-pdf: install-pdf-am + +install-pdf-am: $(PDFS) + @$(NORMAL_INSTALL) + test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)" + @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done +install-ps: install-ps-am + +install-ps-am: $(PSS) + @$(NORMAL_INSTALL) + test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)" + @list='$(PSS)'; test -n "$(psdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-aminfo \ + maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: $(PDFS) + +ps: ps-am + +ps-am: $(PSS) + +uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ + uninstall-man uninstall-pdf-am uninstall-ps-am + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-hook +uninstall-man: uninstall-man1 + +.MAKE: install-am install-data-am install-strip uninstall-am + +.PHONY: all all-am check check-am clean clean-aminfo clean-generic \ + clean-libtool dist-info distclean distclean-generic \ + distclean-libtool distclean-local distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-data-hook install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-man1 \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-aminfo \ + maintainer-clean-generic mostlyclean mostlyclean-aminfo \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am uninstall-dvi-am uninstall-hook \ + uninstall-html-am uninstall-info-am uninstall-man \ + uninstall-man1 uninstall-pdf-am uninstall-ps-am + +dvipng.1: dvipng.texi readme.texi + $(srcdir)/texi2pod.pl -D man $(srcdir)/dvipng.texi | \ + sed -es/@//g -es/previewlatex/preview-latex/g -es/{}//g > dvipng.pod + pod2man --center="User commands" --release="$(PACKAGE_STRING)" \ + dvipng.pod > dvipng.1 + rm dvipng.pod + +www: dvipng.texi $(dvipng_TEXINFOS) + $(mkdir_p) www + $(TEXI2HTML) -split chapter -nosec-nav -subdir html \ + -I $(srcdir) $(srcdir)/dvipng.texi + (cd html; for i in *; do \ + sed -e "s/Jan-A/Jan-\Å\;/g" $$i > ../www/$$i; \ + done) + cp www/dvipng.html www/index.html + rm -rf html + +dvipng_mono.html: dvipng.texi $(dvipng_TEXINFOS) + $(TEXI2HTML) --monolithic -nomenu -nosec_nav -o dvipng_mono.html \ + -I $(srcdir) $(srcdir)/dvipng.texi + +distclean-local: + rm -rf www + rm -f dvipng_mono.html + +@have_gif_TRUE@install-data-hook: +@have_gif_TRUE@ cd $(DESTDIR)$(man1dir) && \ +@have_gif_TRUE@ rm -f dvigif.1 && \ +@have_gif_TRUE@ $(LN_S) dvipng.1 dvigif.1 +@have_gif_TRUE@uninstall-hook: +@have_gif_TRUE@ rm -f $(DESTDIR)$(man1dir)/dvigif.1 + +am-local: ../INSTALL ../README RELEASE + +../INSTALL: install.texi + -$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -D rawfile --no-headers --no-validate --no-number-sections \ + -o $@ $< + +../README: readme.texi + -$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -D rawfile --no-headers --no-validate --no-number-sections \ + -o $@ $< + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/Build/source/texk/dvipng/doc/dvipng.1 b/Build/source/texk/dvipng/doc/dvipng.1 new file mode 100644 index 00000000000..4cb549ebeb5 --- /dev/null +++ b/Build/source/texk/dvipng/doc/dvipng.1 @@ -0,0 +1,508 @@ +.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "DVIPNG 1" +.TH DVIPNG 1 "2009-06-07" "dvipng 1.12" "User commands" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +dvipng \- A DVI\-to\-PNG translator +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +dvipng [options] filename +.PP +dvipng [options] [filename] \- +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +This program makes \s-1PNG\s0 and/or \s-1GIF\s0 graphics from \s-1DVI\s0 files as obtained +from TeX and its relatives. +.PP +If \s-1GIF\s0 support is enabled, \s-1GIF\s0 output is chosen by using the +\&\fBdvigif\fR binary or with the \fB\-\-gif\fR option. +.PP +The benefits of \fBdvipng\fR/\fBdvigif\fR include +.IP "\(bu" 4 +Speed. It is a very fast bitmap-rendering code for \s-1DVI\s0 files, which +makes it suitable for generating large amounts of images on-the-fly, +as needed in preview-latex, WeBWorK and others. +.IP "\(bu" 4 +It does not read the postamble, so it can be started before TeX +finishes. There is a \fB\-\-follow\fR switch that makes dvipng wait at +end-of-file for further output, unless it finds the \s-1POST\s0 marker that +indicates the end of the \s-1DVI\s0. +.IP "\(bu" 4 +Interactive query of options. dvipng can read options interactively +through stdin, and all options are usable. It is even possible to change +the input file through this interface. +.IP "\(bu" 4 +Supports \s-1PK\s0, \s-1VF\s0, PostScript Type1, and TrueType fonts, subfonts (i.e., +as used in CJK-LaTeX), color specials, and inclusion of PostScript, +\&\s-1PNG\s0, \s-1JPEG\s0 or \s-1GIF\s0 images. +.IP "\(bu" 4 +and more... +.SH "OPTIONS" +.IX Header "OPTIONS" +Many of the parameterless options listed here can be turned off by +suffixing the option with a zero (\fB0\fR); for instance, to turn off +page reversal, use \fB\-r0\fR. Such options are marked with a trailing +\&\fB*\fR. +.IP "\fB\-\fR" 4 +.IX Item "-" +Read additional options from standard input after processing the command +line. +.IP "\fB\-\-help\fR" 4 +.IX Item "--help" +Print a usage message and exit. +.IP "\fB\-\-version\fR" 4 +.IX Item "--version" +Print the version number and exit. +.IP "\fB\-bd\fR \fInum\fR" 4 +.IX Item "-bd num" +.PD 0 +.IP "\fB\-bd\fR \fIcolor_spec\fR" 4 +.IX Item "-bd color_spec" +.IP "\fB\-bd '\fR\fInum\fR\fB \fR\fIcolor_spec\fR\fB'\fR" 4 +.IX Item "-bd 'num color_spec'" +.PD +Set the pixel width of the transparent border (default 0). Using this +option will make the image edges transparent, but it only affects pixels +with the background color. Giving a \fIcolor_spec\fR will set the +fallback color, to be used in viewers that cannot handle transparency +(the default is the background color). The color spec should be in +TeX color \especial syntax, e.g., 'rgb 1.0 0.0 0.0'. Setting the +fallback color makes the default border width 1 px. +.IP "\fB\-\-bdpi\fR \fInum\fR" 4 +.IX Item "--bdpi num" +Set the base (Metafont) resolution, both horizontal and vertical, to +\&\fInum\fR dpi (dots per inch). This option is necessary when manually +selecting Metafont mode with the \-\-mode option (see below). +.IP "\fB\-bg\fR \fIcolor_spec\fR" 4 +.IX Item "-bg color_spec" +Choose background color for the images. This option will be ignored if +there is a background color \especial in the \s-1DVI\s0. The color spec should +be in TeX color \especial syntax, e.g., 'rgb 1.0 0.0 0.0'. You can +also specify 'Transparent' or 'transparent' which will give you a +transparent background with the normal background as a fallback color. A +capitalized 'Transparent' will give a full-alpha transparency, while an +all-lowercase 'transparent' will give a simple fully transparent +background with non-transparent antialiased pixels. The latter would be +suitable for viewers who cannot cope with a true alpha channel. \s-1GIF\s0 +images do not support full alpha transparency, so in case of \s-1GIF\s0 output, +both variants will use the latter behaviour. +.IP "\fB\-d\fR \fInum\fR" 4 +.IX Item "-d num" +Set the debug flags, showing what dvipng (thinks it) is doing. This will +work unless dvipng has been compiled without the \f(CW\*(C`DEBUG\*(C'\fR option +(not recommended). Set the flags as you need them, use \fB\-d \-1\fR as +the first option for maximum output. +.IP "\fB\-D\fR \fInum\fR" 4 +.IX Item "-D num" +Set the output resolution, both horizontal and vertical, to \fInum\fR +dpi (dots per inch). +.Sp +One may want to adjust this to fit a certain text font size (e.g., on +a web page), and for a text font height of \fIfont_px\fR pixels (in +Mozilla) the correct formula is +.Sp +.Vb 1 +\& = * 72.27 / 10 [px * TeXpt/in / TeXpt] +.Ve +.Sp +The last division by ten is due to the standard font height 10pt in +your document, if you use 12pt, divide by 12. Unfortunately, some +proprietary browsers have font height in pt (points), not pixels. You +have to rescale that to pixels, using the screen resolution (default +is usually 96 dpi) which means the formula is +.Sp +.Vb 1 +\& = * 96 / 72 [pt * px/in / (pt/in)] +.Ve +.Sp +On some high-res screens, the value is instead 120 dpi. Good luck! +.IP "\fB\-\-depth*\fR" 4 +.IX Item "--depth*" +Report the depth of the image. This only works reliably when the +LaTeX style \fIpreview.sty\fR from preview-latex is used with +the \fBactive\fR option. It reports the number of pixels from the +bottom of the image to the baseline of the image. This can be used for +vertical positioning of the image in, e.g., web documents, where one +would use (Cascading StyleSheets 1) +.Sp +.Vb 1 +\& +.Ve +.Sp +The depth is a negative offset in this case, so the minus sign is +necessary, and the unit is pixels (px). +.IP "\fB\-\-dvinum*\fR" 4 +.IX Item "--dvinum*" +Set this option to make the output page number be the TeX page +numbers rather than the physical page number. See the \fB\-o\fR switch. +.IP "\fB\-fg\fR \fIcolor_spec\fR" 4 +.IX Item "-fg color_spec" +Choose foreground color for the images. This option will be ignored if +there is a foreground color \especial in the \s-1DVI\s0. The color spec should +be in TeX color \especial syntax, e.g., 'rgb 1.0 0.0 0.0'. +.IP "\fB\-\-follow*\fR" 4 +.IX Item "--follow*" +Wait for data at end-of-file. One of the benefits of dvipng is that it +does not read the postamble, so it can be started before TeX +finishes. This switch makes dvipng wait at end-of-file for further +output, unless it finds the \s-1POST\s0 marker that indicates the end of the +\&\s-1DVI\s0. This is similar to \fBtail \-f\fR but for DVI-to-PNG conversion. +.IP "\fB\-\-freetype*\fR" 4 +.IX Item "--freetype*" +Enable/disable FreeType font rendering (default on). This option is +available if the FreeType2 font library was present at compilation time. +If this is the case, dvipng will have direct support for PostScript +Type1 and TrueType fonts internally, rather than using \fBgsftopk\fR +for rendering the fonts. If you have PostScript versions of Computer +Modern installed, there will be no need to generate bitmapped variants +on disk of these. Then, you can render images at different (and unusual) +resolutions without cluttering the disk with lots of bitmapped fonts. +Note that if you have both FreeType and T1lib on your system, FreeType +will be preferred by dvipng. If you for some reason would want to use +T1lib rendering, use this option. +.IP "\fB\-\-gamma\fR \fInum\fR" 4 +.IX Item "--gamma num" +Control the interpolation of colors in the greyscale anti-aliasing +color palette. Default value is 1.0. For 0 < \fInum\fR < 1, the +fonts will be lighter (more like the background), and for \fInum\fR > +1, the fonts will be darker (more like the foreground). +.IP "\fB\-\-gif*\fR" 4 +.IX Item "--gif*" +The images are output in the \s-1GIF\s0 format, if \s-1GIF\s0 support is enabled. +This is the default for the \fBdvigif\fR binary, which only will be +available when \s-1GIF\s0 support is enabled. \s-1GIF\s0 images are palette images +(see the \fB\-\-palette\fR option) and does not support true alpha +channels (see the \fB\-\-bg\fR option). See also the \fB\-\-png\fR +option. +.IP "\fB\-\-height*\fR" 4 +.IX Item "--height*" +Report the height of the image. This only works reliably when the +LaTeX style \fIpreview.sty\fR from preview-latex is used with +the \fBactive\fR option. It reports the number of pixels from the top +of the image to the baseline of the image. The total height of the +image is obtained as the sum of the values reported from +\&\fB\-\-height\fR and \fB\-\-depth\fR. +.IP "\fB\-l [=]\fR\fInum\fR" 4 +.IX Item "-l [=]num" +The last page printed will be the first one numbered \fInum\fR. Default +is the last page in the document. If \fInum\fR is prefixed by an equals +sign, then it (and the argument to the \fB\-p\fR option, if specified) +is treated as a physical (absolute) page number, rather than a value to +compare with the TeX \fB\ecount0\fR values stored in the \s-1DVI\s0 file. +Thus, using \fB\-l =9\fR will end with the ninth page of the document, +no matter what the pages are actually numbered. +.IP "\fB\-\-mode\fR \fImode\fR" 4 +.IX Item "--mode mode" +Use \fImode\fR as the Metafont device name for the \s-1PK\s0 fonts (both for +path searching and font generation). This needs to be augmented with the +base device resolution, given with the \fB\-\-bdpi\fR option. See the +file <\fBftp://ftp.tug.org/tex/modes.mf\fR> for a list of resolutions and +mode names for most devices. +.IP "\fB\-M*\fR" 4 +.IX Item "-M*" +Turns off automatic \s-1PK\s0 font generation (\fImktexpk\fR). This will have +no effect when using PostScript fonts, since no \s-1PK\s0 font generation will +be done anyway. +.IP "\fB\-\-noghostscript*\fR" 4 +.IX Item "--noghostscript*" +This switch prohibits the internal call to GhostScript for displaying +PostScript specials. \fB\-\-noghostscript0\fR turns the call back on. +.IP "\fB\-\-nogssafer*\fR" 4 +.IX Item "--nogssafer*" +Normally, if GhostScript is used to render PostScript specials, the +GhostScript interpreter is run with the option \fB\-dSAFER\fR. The +\&\fB\-\-nogssafer\fR option runs GhostScript without \fB\-dSAFER\fR. The +\&\fB\-dSAFER\fR option in Ghostscript disables PostScript operators such +as deletefile, to prevent possibly malicious PostScript programs from +having any effect. +.IP "\fB\-o\fR \fIname\fR" 4 +.IX Item "-o name" +Send output to the file \fIname\fR. A single occurrence of \fB\f(CB%d\fB\fR or +\&\fB\f(CB%01d\fB\fR, ..., \fB\f(CB%09d\fB\fR will be exchanged for the physical +page number (this can be changed, see the \fB\-\-dvinum\fR switch). The +default output filename is \fIfile\fR\fB\f(CB%d\fB.png\fR where the input \s-1DVI\s0 +file was \fIfile\fR\fB.dvi\fR. +.IP "\fB\-O\fR \fIx\-offset\fR\fB,\fR\fIy\-offset\fR" 4 +.IX Item "-O x-offset,y-offset" +Move the origin by \fIx\-offset\fR,\fIy\-offset\fR, a comma-separated +pair of dimensions such as \fB.1in,\-.3cm\fR. +The origin of the page is shifted from the default position +(of one inch down, one inch to the right from the upper left corner of +the paper) by this amount. +.IP "\fB\-p [=]\fR\fInum\fR" 4 +.IX Item "-p [=]num" +The first page printed will be the first one numbered \fInum\fR. Default +is the first page in the document. If \fInum\fR is prefixed by an +equals sign, then it (and the argument to the \fB\-l\fR option, if +specified) is treated as a physical (absolute) page number, rather than +a value to compare with the TeX \fB\ecount0\fR values stored in the +\&\s-1DVI\s0 file. Thus, using \fB\-p =3\fR will start with the third page of +the document, no matter what the pages are actually numbered. +.IP "\fB\-\-palette*\fR" 4 +.IX Item "--palette*" +Starting from \fBdvipng\fR 1.8, the output \s-1PNG\s0 will be a truecolor +png when an external image is included, to avoid unnecessary delay and +quality reduction, and enable the \s-1EPS\s0 translator to draw on a +transparent background and outside of the boundingbox. This switch +will force palette (256\-color) output and make \fBdvipng\fR revert to +the old behaviour, where included images were opaque and always +clipped to the boundingbox. This will also override the +\&\fB\-\-truecolor\fR switch if present. +.IP "\fB\-\-picky*\fR" 4 +.IX Item "--picky*" +No images are output when a warning occurs. Normally, dvipng will +output an image in spite of a warning, but there may be something +missing in this image. One reason to use this option would be if you +have a more complete but slower fallback converter. Mainly, this is +useful for failed figure inclusion and unknown \especial occurrences, +but warnings will also occur for missing or unknown color specs and +missing \s-1PK\s0 fonts. +.IP "\fB\-\-png*\fR" 4 +.IX Item "--png*" +The images are output in the \s-1PNG\s0 format. This is the default for the +\&\fBdvipng\fR binary. See also the \fB\-\-gif\fR option. +.IP "\fB\-pp\fR \fIfirstpage\fR\fB\-\fR\fIlastpage\fR" 4 +.IX Item "-pp firstpage-lastpage" +Print pages \fIfirstpage\fR through \fIlastpage\fR; but not quite +equivalent to \fB\-p\fR \fIfirstpage\fR \fB\-l\fR \fIlastpage\fR. For example, +when rendering a book, there may be several instances of a page in the +\&\s-1DVI\s0 file (one in \f(CW\*(C`\efrontmatter\*(C'\fR, one in \f(CW\*(C`\emainmatter\*(C'\fR, and one +in \f(CW\*(C`\ebackmatter\*(C'\fR). In case of several pages matching, \fB\-pp\fR +\&\fIfirstpage\fR\fB\-\fR\fIlastpage\fR will render \fIall\fR pages that +matches the specified range, while \fB\-p\fR \fIfirstpage\fR \fB\-l\fR +\&\fIlastpage\fR will render the pages from the \fIfirst\fR occurrence +of \fIfirstpage\fR to the \fIfirst\fR occurrence of \fIlastpage\fR. +This is the (undocumented) behaviour of dvips. In dvipng you can give +both kinds of options, in which case you get all pages that matches the +range in \fB\-pp\fR between the pages from \fB\-p\fR to \fB\-l\fR. Also +multiple \fB\-pp\fR options accumulate, unlike \fB\-p\fR and \fB\-l\fR. +The \fB\-\fR separator can also be \fB:\fR. Note that \fB\-pp \-1\fR +will be interpreted as \*(L"all pages up to and including 1\*(R", if you want a +page numbered \-1 (only the table of contents, say) put \fB\-pp \-1\-\-1\fR, +or more readable, \fB\-pp \-1:\-1\fR. +.IP "\fB\-q*\fR" 4 +.IX Item "-q*" +Run quietly. Don't chatter about pages converted, etc. to standard +output; report no warnings (only errors) to standard error. +.IP "\fB\-Q\fR \fInum\fR" 4 +.IX Item "-Q num" +Set the quality to \fInum\fR. That is, choose the number of antialiasing +levels for \s-1PK\s0 and T1lib rendering to be \fInum\fR*\fInum\fR+1. The default +value is 4 which gives 17 levels of antialiasing for antialiased fonts +from these two. If FreeType is available, its rendering is unaffected by +this option. +.IP "\fB\-r*\fR" 4 +.IX Item "-r*" +Toggle output of pages in reverse/forward order. By default, the first +page in the \s-1DVI\s0 is output first. +.IP "\fB\-\-strict*\fR" 4 +.IX Item "--strict*" +The program exits when a warning occurs. Normally, dvipng will output +an image in spite of a warning, but there may be something missing in +this image. One reason to use this option would be if you have a more +complete but slower fallback converter. See the \fB\-\-picky\fR option +above for a list of when warnings occur. +.IP "\fB\-T\fR \fIimage_size\fR" 4 +.IX Item "-T image_size" +Set the image size to \fIimage_size\fR which can be either of +\&\fBbbox\fR, \fBtight\fR, or a comma-separated pair of dimensions +\&\fIhsize\fR,\fIvsize\fR such as \fB.1in,.3cm\fR. The default is +\&\fBbbox\fR which produces a \s-1PNG\s0 that includes all ink put on the page +and in addition the \s-1DVI\s0 origin, located 1in from the top and 1in from +the left edge of the paper. This usually gives whitespace above and to +the left in the produced image. The value \fBtight\fR will make dvipng +only include all ink put on the page, producing neat images. +.IP "\fB\-\-t1lib*\fR" 4 +.IX Item "--t1lib*" +Enable/disable T1lib font rendering (default on). This option is +available if the T1lib font library was present at compilation time. If +this is the case, dvipng will have direct support for PostScript Type1 +fonts internally, rather than using \fBgsftopk\fR for rendering the +fonts. If you have PostScript versions of Computer Modern installed, +there will be no need to generate bitmapped variants on disk of these. +Then, you can render images at different (and unusual) resolutions +without cluttering the disk with lots of bitmapped fonts. Note that if +you have both FreeType and T1lib on your system FreeType will be +preferred by dvipng, and if you for some reason rather want to use +T1lib, give the option \fB\-\-freetype0\fR (see above). +.IP "\fB\-\-truecolor*\fR" 4 +.IX Item "--truecolor*" +This will make \fBdvipng\fR generate truecolor output. Note that +truecolor output is automatic if you include an external image in your +\&\s-1DVI\s0, e.g., via a PostScript special (i.e., the \fBgraphics\fR or +\&\fBgraphicx\fR package). This switch is overridden by the +\&\fB\-\-palette\fR switch. +.IP "\fB\-v*\fR" 4 +.IX Item "-v*" +Enable verbose operation. This will currently indicate what fonts is +used, in addition to the usual output. +.IP "\fB\-x\fR \fInum\fR" 4 +.IX Item "-x num" +Set the x magnification ratio to \fInum\fR/1000. Overrides +the magnification specified in the \s-1DVI\s0 file. Must be between 10 and +100000. It is recommended that you use standard magstep values (1095, +1200, 1440, 1728, 2074, 2488, 2986, and so on) to help reduce the total +number of \s-1PK\s0 files generated. \fInum\fR may be a real number, not an +integer, for increased precision. +.IP "\fB\-z\fR \fInum\fR" 4 +.IX Item "-z num" +Set the \s-1PNG\s0 compression level to \fInum\fR. This option is enabled if +your \fBlibgd\fR is new enough. The default compression level is 1, +which selects maximum speed at the price of slightly larger PNGs. For an +older \fBlibgd\fR, the hard-soldered value 5 is used. The include file +\&\fBpng.h\fR says +\&\*(L"Currently, valid values range from 0 \- 9, corresponding directly to +the zlib compression levels 0 \- 9 (0 \- no compression, 9 \- \*(R"maximal\*(L" +compression). Note that tests have shown that zlib compression levels +3\-6 usually perform as well as level 9 for \s-1PNG\s0 images, and do +considerably fewer calculations. In the future, these values may not +correspond directly to the zlib compression levels.\*(R" +.SH "NOTES" +.IX Header "NOTES" +The full manual is accessible in the info format, on most systems by typing +.PP +.Vb 1 +\& info dvipng +.Ve +.SH "COPYRIGHT" +.IX Header "COPYRIGHT" +This program is released under the \s-1GNU\s0 Lesser General Public License +version 3, see the \s-1COPYING\s0 file in the dvipng distribution or +<\fBhttp://www.gnu.org/licenses/gpl.html\fR>. +.PP +Copyright (c) 2002\-2008 Jan-AAke Larsson diff --git a/Build/source/texk/dvipng/doc/dvipng.help b/Build/source/texk/dvipng/doc/dvipng.help new file mode 100644 index 00000000000..7beed0f8981 --- /dev/null +++ b/Build/source/texk/dvipng/doc/dvipng.help @@ -0,0 +1,42 @@ +This is ./dvipng 1.12 Copyright 2002-2008 Jan-Ake Larsson + +Usage: ./dvipng [OPTION]... FILENAME[.dvi] +Options are chosen to be similar to dvips' options where possible: + -d # Debug (# is the debug bitmap, 1 if not given) + -D # Output resolution + -l # Last page to be output + -o f Output file, '%d' is pagenumber + -O c Image offset + -p # First page to be output + -pp #,#.. Page list to be output + -q* Quiet operation + -T c Image size (also accepts '-T bbox' and '-T tight') + -v* Verbose operation + - Interactive query of options + +These do not correspond to dvips options: + -bd # Transparent border width in dots + -bd s Transparent border fallback color (TeX-style color) + -bg s Background color (TeX-style color or 'Transparent') + --depth* Output the image depth on stdout + --dvinum* Use TeX page numbers in output filenames + -fg s Foreground color (TeX-style color) + --follow* Wait for data at end-of-file + --freetype* FreeType font rendering (default on) + --gamma # Control color interpolation + --gif Output GIF images (dvigif default) + --height* Output the image height on stdout + --noghostscript* Don't use ghostscript for PostScript specials + --nogssafer* Don't use -dSAFER in ghostscript calls + --palette* Force palette output + --picky When a warning occurs, don't output image + --png Output PNG images (dvipng default) + --strict When a warning occurs, exit + --t1lib* T1lib font rendering (default on) + --truecolor* Truecolor output + -Q # Quality (T1lib and PK subsampling) + -z # PNG compression level + + # = number f = file s = string * = suffix, '0' to turn off + c = comma-separated dimension pair (e.g., 3.2in,-32.1cm) + diff --git a/Build/source/texk/dvipng/doc/dvipng.info b/Build/source/texk/dvipng/doc/dvipng.info new file mode 100644 index 00000000000..7e25b004068 --- /dev/null +++ b/Build/source/texk/dvipng/doc/dvipng.info @@ -0,0 +1,1083 @@ +This is dvipng.info, produced by makeinfo version 4.13 from dvipng.texi. + +INFO-DIR-SECTION TeX +START-INFO-DIR-ENTRY +* DVI-to-PNG: (dvipng). Translating TeX DVI files to Portable Network Graphics (PNG). +* dvipng: (dvipng). A DVI-to-PNG translator. +END-INFO-DIR-ENTRY + + +File: dvipng.info, Node: Top, Next: Introduction, Up: (dir) + +dvipng +****** + +This manual documents dvipng, a program to translate a DVI (DeVice +Independent) file into PNG (Portable Network Graphics). + + This file documents dvipng version 1.12 + + Corrections or perhaps rewrites of sections are _very welcome_. + + Jan-AAke Larsson + +* Menu: + +* Introduction:: Introduction +* Installation:: How to compile and install dvipng +* Basic usage:: First things first +* Command-line options:: Advanced usage +* Graphics:: Including PostScript and/or bitmaps +* Color:: Using color with dvipng +* Diagnosing problems:: Problems? +* Credits:: People who have contributed +* Copying:: GNU Lesser General Public License +* Index:: General index + + +File: dvipng.info, Node: Introduction, Next: Installation, Prev: Top, Up: Top + +1 Introduction +************** + +This program makes PNG and/or GIF graphics from DVI files as obtained +from TeX and its relatives. + + If GIF support is enabled, GIF output is chosen by using the +`dvigif' binary or with the `--gif' option. + + It is intended to produce anti-aliased screen-resolution images as +fast as is possible. The target audience is people who need to generate +and regenerate many images again and again. The primary target is the +preview-latex (X)Emacs package, a package to preview formulas from +within (X)Emacs. Yes, you get to see your formulas in the (X)Emacs +buffer, see `http://www.gnu.org/software/auctex/preview-latex.html'. + + Another example is WeBWorK, an internet-based method for delivering +homework problems to students over the internet, giving students +instant feedback as to whether or not their answers are correct, see +`http://webwork.math.rochester.edu'. + + A more recent addition to the dvipng-using applications out there is +MediaWiki, the software behind Wikipedia and many other wikis out +there. Dvipng is used to render mathematical formulae from version +1.8.0 of MediaWiki, see `http://www.mediawiki.org'. + + Other applications may also benefit, like web applications as +latex2html and WYSIWYG editors like LyX. + + The benefits of `dvipng'/`dvigif' include + + * Speed. It is a very fast bitmap-rendering code for DVI files, which + makes it suitable for generating large amounts of images + on-the-fly, as needed in preview-latex, WeBWorK and others. + + * It does not read the postamble, so it can be started before TeX + finishes. There is a `--follow' switch that makes dvipng wait at + end-of-file for further output, unless it finds the POST marker + that indicates the end of the DVI. + + * Interactive query of options. dvipng can read options interactively + through stdin, and all options are usable. It is even possible to + change the input file through this interface. + + * Supports PK, VF, PostScript Type1, and TrueType fonts, subfonts + (i.e., as used in CJK-LaTeX), color specials, and inclusion of + PostScript, PNG, JPEG or GIF images. + + * and more... + + + +File: dvipng.info, Node: Installation, Next: Basic usage, Prev: Introduction, Up: Top + +2 Installation +************** + +Installing dvipng should be simple: merely `./configure', `make', and +`make install'. + +* Menu: + +* Prerequisites:: +* Configure:: +* Build/install:: +* Installation outside the texmf tree:: +* Advice for non-privileged users:: + + +File: dvipng.info, Node: Prerequisites, Next: Configure, Up: Installation + +2.1 Prerequisites +================= + + * The GD Graphics Draw library, libgd + + The drawing library `libgd' is necessary, and is downloadable at + `http://www.boutell.com/gd', and there are binary packages for + most operating systems from their respective distributors. In any + case, the latest version of the library installs using `autoconf' + so it should not be difficult for you to install it from source, + and then proceed with installing dvipng. + + * The path-searching library kpathsea + + Kpathsea is most likely included in your LaTeX installation, but it + may happen that ./configure does not find it; see below. If you do + not have it, download it from `http://www.ctan.org' and compile it. + I have no experience with this, so I cannot help much here. + + * The font-rendering library FreeType 2 + + While not strictly necessary, a recent FreeType 2 is recommended + since dvipng currently will produce better-quality images when + this library is available. To take advantage of this, you should + have at least FreeType 2.1.9. + + FreeType 2 will enable direct support for PostScript and TrueType + fonts, so that dvipng will not need to generate bitmapped variants + on disk of the TeX fonts since modern TeX distributions include + PostScript versions of them. Then, you can render images at + different (and unusual) resolutions without cluttering the disk + with lots of bitmapped fonts. + + Finally, it will enable subfont support in dvipng. That is, if you + want to render CJK-LaTeX characters, you must have FreeType 2 + installed. + + * The font-rendering library T1lib + + An alternative to FreeType 2 is T1lib, but this will enable only + PostScript fonts in dvipng and will not include subfont support. + Also here, you can render images at different (and unusual) + resolutions without cluttering the disk with lots of bitmapped + fonts. If both FreeType 2 and T1lib are present, FreeType will be + internally preferred by dvipng but T1lib can be chosen at runtime. + + * libpng and libz + + To be able to compress and write PNG files to disk, dvipng (or + really libgd) uses libpng which in turn uses libz. These should be + available on any modern system, if not, download them and install + them. + + * The `texinfo' package + + This is needed for building the documentation. + + +File: dvipng.info, Node: Configure, Next: Build/install, Prev: Prerequisites, Up: Installation + +2.2 Configure +============= + +The first step is to configure the source code, telling it where +various files will be. To do so, run + + ./configure OPTIONS + + (Note: if you have fetched dvipng from CVS rather than a regular +release, you will have to first generate `./configure' by running +`autoconf' 2.53 or later.) + + On many machines, you will not need to specify any options, but if +`configure' cannot determine something on its own, you'll need to help +it out. For a list of the options type + + ./configure --help + + On some machines, the libraries will be installed in directories that +are not in the linker's search path. This will generate an error when +running `./configure', indicating that it cannot find libgd or +libkpathsea (most likely). You then need to specify the path to the +respective library's object files. They are typically called e.g., +`libgd.a' or `libgd.so'. If they are located in e.g., `/sw/local/lib', +do + + ./configure LDFLAGS=-L/sw/local/lib + + If the library is available as a shared object file (`.so'), the +runtime linker may also need to be told where to find the library, then +use + + ./configure LDFLAGS='-L/sw/local/lib -R/sw/local/lib' + + When either of these is necessary, it is likely that the C header +files are also installed in directories that are not in the C +preprocessor's search path. This will also generate an error when +running `./configure', indicating that it cannot find e.g., `gd.h' or +`kpathsea.h' (most likely). You then need to specify the path to the +respective library's C header files. If they are located in e.g., +`/sw/local/include', do + + ./configure CPPFLAGS=-I/sw/local/include + + On my SUN Solaris workstation, I had to combine this into + + ./configure CPPFLAGS='-I/sw/local/include -I/sw/tex/teTeX/1.0/include'\ + LDFLAGS='-L/sw/local/lib -R/sw/local/lib -L/sw/tex/teTeX/1.0/lib/' + +where the backslash denotes a continuation of the line. + + +File: dvipng.info, Node: Build/install, Next: Installation outside the texmf tree, Prev: Configure, Up: Installation + +2.3 Build/install +================= + +Once `configure' has been run, simply enter + + make + +at the prompt to compile the C code, and build the documentation files. +To install the files into the locations chosen earlier, type + + make install + +You may need special privileges to install, e.g., if you are installing +into system directories. + + +File: dvipng.info, Node: Installation outside the texmf tree, Next: Advice for non-privileged users, Prev: Build/install, Up: Installation + +2.4 Installation outside the texmf tree +======================================= + +In some cases, a dvipng binary installed outside the texmf tree will +not be able to find virtual fonts, or the PostScript font maps +(normally used by dvips). This may be because _only_ $SELFAUTOLOC, +$SELFAUTODIR, and $SELFAUTOPARENT are used in the texmf tree +configuration file `texmf.cnf'. If so, give the switch +`--enable-selfauto-set' to `./configure'. This will make dvipng adjust +these three internally so that kpathsea thinks that dvipng _is_ +installed in the texmf tree. + + +File: dvipng.info, Node: Advice for non-privileged users, Prev: Installation outside the texmf tree, Up: Installation + +2.5 Installation for non-privileged users +========================================= + +Often people without system administration privileges want to install +software for their private use. In that case you need to specify more +options to the `configure' script, usually this is done by using the +`--prefix' option to the `configure' script, and let it point to the +personal home directory. In that way, resulting binaries will be +installed under the `bin' subdirectory of your home directory, manual +pages under `man' and so on. That way, it is reasonably easy to +maintain a bunch of additional packages, since the prefix argument is +supported by most `configure' scripts. + + You'll have to add something like `/home/myself/bin' to your `PATH' +shell variable, if it isn't there already, and similarly set the +`INFOPATH' and `MANPATH' variables to be able to access the +documentation. + + +File: dvipng.info, Node: Basic usage, Next: Command-line options, Prev: Installation, Up: Top + +3 Basic usage of dvipng +*********************** + +To use dvipng at its simplest, simply type + + dvipng foo + +where `foo.dvi' is the output of TeX that you want to convert to PNG +format. If there are four pages in `foo.dvi', those pages will be +output as `foo1.png', `foo2.png', `foo3.png', and `foo4.png', +respectively. + + If you have enabled the PostScript font support (via FreeType or +T1lib), fonts will be rendered as they are needed. Otherwise, if you +use fonts that have not been used on your system before, they may be +automatically generated; this process can take a few minutes, so +progress reports appear by default. The next time the same font is +used, it will have been saved on disk, so rendering will go much +faster. (If dvipng tries to endlessly generate the same fonts over and +over again, something is wrong. *Note Unable to generate fonts: +(kpathsea)Unable to generate fonts.) + + Many options are available (see the next section). For a brief +summary of available options, just type + + dvipng --help + + +File: dvipng.info, Node: Command-line options, Next: Graphics, Prev: Basic usage, Up: Top + +4 Command-line options +********************** + +dvipng has a plethora of command line options. Reading through this +section will give a good idea of the capabilities of the driver. + +* Menu: + +* Option summary:: Quick listing, from dvipng --help. +* Option details:: More information about each option. + + +File: dvipng.info, Node: Option summary, Next: Option details, Up: Command-line options + +4.1 Option summary +================== + +Here is a handy summary of the options; it is printed out when you run +dvipng with no arguments or with the standard `--help' option. + + This is ./dvipng 1.12 Copyright 2002-2008 Jan-Ake Larsson + + Usage: ./dvipng [OPTION]... FILENAME[.dvi] + Options are chosen to be similar to dvips' options where possible: + -d # Debug (# is the debug bitmap, 1 if not given) + -D # Output resolution + -l # Last page to be output + -o f Output file, '%d' is pagenumber + -O c Image offset + -p # First page to be output + -pp #,#.. Page list to be output + -q* Quiet operation + -T c Image size (also accepts '-T bbox' and '-T tight') + -v* Verbose operation + - Interactive query of options + + These do not correspond to dvips options: + -bd # Transparent border width in dots + -bd s Transparent border fallback color (TeX-style color) + -bg s Background color (TeX-style color or 'Transparent') + --depth* Output the image depth on stdout + --dvinum* Use TeX page numbers in output filenames + -fg s Foreground color (TeX-style color) + --follow* Wait for data at end-of-file + --freetype* FreeType font rendering (default on) + --gamma # Control color interpolation + --gif Output GIF images (dvigif default) + --height* Output the image height on stdout + --noghostscript* Don't use ghostscript for PostScript specials + --nogssafer* Don't use -dSAFER in ghostscript calls + --palette* Force palette output + --picky When a warning occurs, don't output image + --png Output PNG images (dvipng default) + --strict When a warning occurs, exit + --t1lib* T1lib font rendering (default on) + --truecolor* Truecolor output + -Q # Quality (T1lib and PK subsampling) + -z # PNG compression level + + # = number f = file s = string * = suffix, '0' to turn off + c = comma-separated dimension pair (e.g., 3.2in,-32.1cm) + + +File: dvipng.info, Node: Option details, Prev: Option summary, Up: Command-line options + +4.2 Option details +================== + +Many of the parameterless options listed here can be turned off by +suffixing the option with a zero (`0'); for instance, to turn off page +reversal, use `-r0'. Such options are marked with a trailing `*'. + +`-' + Read additional options from standard input after processing the + command line. + +`--help' + Print a usage message and exit. + +`--version' + Print the version number and exit. + +`-bd NUM' + +`-bd COLOR_SPEC' + +`-bd 'NUM COLOR_SPEC'' + Set the pixel width of the transparent border (default 0). Using + this option will make the image edges transparent, but it only + affects pixels with the background color. Giving a COLOR_SPEC will + set the fallback color, to be used in viewers that cannot handle + transparency (the default is the background color). The color spec + should be in TeX color \special syntax, e.g., 'rgb 1.0 0.0 0.0'. + Setting the fallback color makes the default border width 1 px. + *Note Color::. + +`--bdpi NUM' + Set the base (Metafont) resolution, both horizontal and vertical, + to NUM dpi (dots per inch). This option is necessary when manually + selecting Metafont mode with the -mode option (see below). + +`-bg COLOR_SPEC' + Choose background color for the images. This option will be + ignored if there is a background color \special in the DVI. The + color spec should be in TeX color \special syntax, e.g., 'rgb 1.0 + 0.0 0.0'. You can also specify 'Transparent' or 'transparent' + which will give you a transparent background with the normal + background as a fallback color. A capitalized 'Transparent' will + give a full-alpha transparency, while an all-lowercase + 'transparent' will give a simple fully transparent background with + non-transparent antialiased pixels. The latter would be suitable + for viewers who cannot cope with a true alpha channel. GIF images + do not support full alpha transparency, so in case of GIF output, + both variants will use the latter behaviour. *Note Color::. + +`-d NUM' + Set the debug flags, showing what dvipng (thinks it) is doing. + This will work unless dvipng has been compiled without the `DEBUG' + option (not recommended). Set the flags as you need them, use `-d + -1' as the first option for maximum output. *Note Debug options::. + +`-D NUM' + Set the output resolution, both horizontal and vertical, to NUM + dpi (dots per inch). + + One may want to adjust this to fit a certain text font size (e.g., + on a web page), and for a text font height of FONT_PX pixels (in + Mozilla) the correct formula is + DPI = FONT_PX * 72.27 / 10 [px * TeXpt/in / TeXpt] + The last division by ten is due to the standard font height 10pt in + your document, if you use 12pt, divide by 12. Unfortunately, some + proprietary browsers have font height in pt (points), not pixels. + You have to rescale that to pixels, using the screen resolution + (default is usually 96 dpi) which means the formula is + FONT_PX = FONT_PT * 96 / 72 [pt * px/in / (pt/in)] + On some high-res screens, the value is instead 120 dpi. Good luck! + +`--depth*' + Report the depth of the image. This only works reliably when the + LaTeX style `preview.sty' from preview-latex is used with the + `active' option. It reports the number of pixels from the bottom + of the image to the baseline of the image. This can be used for + vertical positioning of the image in, e.g., web documents, where + one would use (Cascading StyleSheets 1) + + The depth is a negative offset in this case, so the minus sign is + necessary, and the unit is pixels (px). + +`--dvinum*' + Set this option to make the output page number be the TeX page + numbers rather than the physical page number. See the `-o' switch. + +`-fg COLOR_SPEC' + Choose foreground color for the images. This option will be + ignored if there is a foreground color \special in the DVI. The + color spec should be in TeX color \special syntax, e.g., 'rgb 1.0 + 0.0 0.0'. *Note Color::. + +`--follow*' + Wait for data at end-of-file. One of the benefits of dvipng is + that it does not read the postamble, so it can be started before + TeX finishes. This switch makes dvipng wait at end-of-file for + further output, unless it finds the POST marker that indicates the + end of the DVI. This is similar to `tail -f' but for DVI-to-PNG + conversion. + +`--freetype*' + Enable/disable FreeType font rendering (default on). This option is + available if the FreeType2 font library was present at compilation + time. If this is the case, dvipng will have direct support for + PostScript Type1 and TrueType fonts internally, rather than using + `gsftopk' for rendering the fonts. If you have PostScript versions + of Computer Modern installed, there will be no need to generate + bitmapped variants on disk of these. Then, you can render images + at different (and unusual) resolutions without cluttering the disk + with lots of bitmapped fonts. Note that if you have both FreeType + and T1lib on your system, FreeType will be preferred by dvipng. If + you for some reason would want to use T1lib rendering, use this + option. + +`--gamma NUM' + Control the interpolation of colors in the greyscale anti-aliasing + color palette. Default value is 1.0. For 0 < NUM < 1, the fonts + will be lighter (more like the background), and for NUM > 1, the + fonts will be darker (more like the foreground). + +`--gif*' + The images are output in the GIF format, if GIF support is enabled. + This is the default for the `dvigif' binary, which only will be + available when GIF support is enabled. GIF images are palette + images (see the `--palette' option) and does not support true alpha + channels (see the `--bg' option). See also the `--png' option. + +`--height*' + Report the height of the image. This only works reliably when the + LaTeX style `preview.sty' from preview-latex is used with the + `active' option. It reports the number of pixels from the top of + the image to the baseline of the image. The total height of the + image is obtained as the sum of the values reported from + `--height' and `--depth'. + +`-l [=]NUM' + The last page printed will be the first one numbered NUM. Default + is the last page in the document. If NUM is prefixed by an equals + sign, then it (and the argument to the `-p' option, if specified) + is treated as a physical (absolute) page number, rather than a + value to compare with the TeX `\count0' values stored in the DVI + file. Thus, using `-l =9' will end with the ninth page of the + document, no matter what the pages are actually numbered. + +`--mode MODE' + Use MODE as the Metafont device name for the PK fonts (both for + path searching and font generation). This needs to be augmented + with the base device resolution, given with the `--bdpi' option. + See the file `ftp://ftp.tug.org/tex/modes.mf' for a list of + resolutions and mode names for most devices. *Note Unable to + generate fonts: (kpathsea)Unable to generate fonts. + +`-M*' + Turns off automatic PK font generation (`mktexpk'). This will have + no effect when using PostScript fonts, since no PK font generation + will be done anyway. + +`--noghostscript*' + This switch prohibits the internal call to GhostScript for + displaying PostScript specials. `--noghostscript0' turns the call + back on. + +`--nogssafer*' + Normally, if GhostScript is used to render PostScript specials, the + GhostScript interpreter is run with the option `-dSAFER'. The + `--nogssafer' option runs GhostScript without `-dSAFER'. The + `-dSAFER' option in Ghostscript disables PostScript operators such + as deletefile, to prevent possibly malicious PostScript programs + from having any effect. + +`-o NAME' + Send output to the file NAME. A single occurrence of `%d' or + `%01d', ..., `%09d' will be exchanged for the physical page number + (this can be changed, see the `--dvinum' switch). The default + output filename is `FILE%d.png' where the input DVI file was + `FILE.dvi'. + +`-O X-OFFSET,Y-OFFSET' + Move the origin by X-OFFSET,Y-OFFSET, a comma-separated pair of + dimensions such as `.1in,-.3cm'. The origin of the page is + shifted from the default position (of one inch down, one inch to + the right from the upper left corner of the paper) by this amount. + +`-p [=]NUM' + The first page printed will be the first one numbered NUM. Default + is the first page in the document. If NUM is prefixed by an + equals sign, then it (and the argument to the `-l' option, if + specified) is treated as a physical (absolute) page number, rather + than a value to compare with the TeX `\count0' values stored in the + DVI file. Thus, using `-p =3' will start with the third page of + the document, no matter what the pages are actually numbered. + +`--palette*' + Starting from `dvipng' 1.8, the output PNG will be a truecolor png + when an external image is included, to avoid unnecessary delay and + quality reduction, and enable the EPS translator to draw on a + transparent background and outside of the boundingbox. This switch + will force palette (256-color) output and make `dvipng' revert to + the old behaviour, where included images were opaque and always + clipped to the boundingbox. This will also override the + `--truecolor' switch if present. + +`--picky*' + No images are output when a warning occurs. Normally, dvipng will + output an image in spite of a warning, but there may be something + missing in this image. One reason to use this option would be if + you have a more complete but slower fallback converter. Mainly, + this is useful for failed figure inclusion and unknown \special + occurrences, but warnings will also occur for missing or unknown + color specs and missing PK fonts. + +`--png*' + The images are output in the PNG format. This is the default for + the `dvipng' binary. See also the `--gif' option. + +`-pp FIRSTPAGE-LASTPAGE' + Print pages FIRSTPAGE through LASTPAGE; but not quite equivalent + to `-p FIRSTPAGE -l LASTPAGE'. For example, when rendering a book, + there may be several instances of a page in the DVI file (one in + `\frontmatter', one in `\mainmatter', and one in `\backmatter'). + In case of several pages matching, `-pp FIRSTPAGE-LASTPAGE' will + render _all_ pages that matches the specified range, while `-p + FIRSTPAGE -l LASTPAGE' will render the pages from the _first_ + occurrence of FIRSTPAGE to the _first_ occurrence of LASTPAGE. + This is the (undocumented) behaviour of dvips. In dvipng you can + give both kinds of options, in which case you get all pages that + matches the range in `-pp' between the pages from `-p' to `-l'. + Also multiple `-pp' options accumulate, unlike `-p' and `-l'. The + `-' separator can also be `:'. Note that `-pp -1' will be + interpreted as "all pages up to and including 1", if you want a + page numbered -1 (only the table of contents, say) put `-pp -1--1', + or more readable, `-pp -1:-1'. + +`-q*' + Run quietly. Don't chatter about pages converted, etc. to standard + output; report no warnings (only errors) to standard error. + +`-Q NUM' + Set the quality to NUM. That is, choose the number of antialiasing + levels for PK and T1lib rendering to be NUM*NUM+1. The default + value is 4 which gives 17 levels of antialiasing for antialiased + fonts from these two. If FreeType is available, its rendering is + unaffected by this option. + +`-r*' + Toggle output of pages in reverse/forward order. By default, the + first page in the DVI is output first. + +`--strict*' + The program exits when a warning occurs. Normally, dvipng will + output an image in spite of a warning, but there may be something + missing in this image. One reason to use this option would be if + you have a more complete but slower fallback converter. See the + `--picky' option above for a list of when warnings occur. + +`-T IMAGE_SIZE' + Set the image size to IMAGE_SIZE which can be either of `bbox', + `tight', or a comma-separated pair of dimensions HSIZE,VSIZE such + as `.1in,.3cm'. The default is `bbox' which produces a PNG that + includes all ink put on the page and in addition the DVI origin, + located 1in from the top and 1in from the left edge of the paper. + This usually gives whitespace above and to the left in the + produced image. The value `tight' will make dvipng only include + all ink put on the page, producing neat images. + +`--t1lib*' + Enable/disable T1lib font rendering (default on). This option is + available if the T1lib font library was present at compilation + time. If this is the case, dvipng will have direct support for + PostScript Type1 fonts internally, rather than using `gsftopk' for + rendering the fonts. If you have PostScript versions of Computer + Modern installed, there will be no need to generate bitmapped + variants on disk of these. Then, you can render images at + different (and unusual) resolutions without cluttering the disk + with lots of bitmapped fonts. Note that if you have both FreeType + and T1lib on your system FreeType will be preferred by dvipng, and + if you for some reason rather want to use T1lib, give the option + `--freetype0' (see above). + +`--truecolor*' + This will make `dvipng' generate truecolor output. Note that + truecolor output is automatic if you include an external image in + your DVI, e.g., via a PostScript special (i.e., the `graphics' or + `graphicx' package). This switch is overridden by the `--palette' + switch. + +`-v*' + Enable verbose operation. This will currently indicate what fonts + is used, in addition to the usual output. + +`-x NUM' + Set the x magnification ratio to NUM/1000. Overrides the + magnification specified in the DVI file. Must be between 10 and + 100000. It is recommended that you use standard magstep values + (1095, 1200, 1440, 1728, 2074, 2488, 2986, and so on) to help + reduce the total number of PK files generated. NUM may be a real + number, not an integer, for increased precision. + +`-z NUM' + Set the PNG compression level to NUM. This option is enabled if + your `libgd' is new enough. The default compression level is 1, + which selects maximum speed at the price of slightly larger PNGs. + For an older `libgd', the hard-soldered value 5 is used. The + include file `png.h' says + + Currently, valid values range from 0 - 9, corresponding + directly to the zlib compression levels 0 - 9 (0 - no + compression, 9 - "maximal" compression). Note that tests have + shown that zlib compression levels 3-6 usually perform as + well as level 9 for PNG images, and do considerably fewer + calculations. In the future, these values may not correspond + directly to the zlib compression levels. + + +File: dvipng.info, Node: Graphics, Next: Color, Prev: Command-line options, Up: Top + +5 Graphics +********** + +`dvipng' attempts to handle graphics as included by the `graphicx' and +`graphics' packages, without the need of specifying a driver to these +packages. This means that it recognizes the encapsulated postscript +inclusion meant for `dvips', but is also able (from version 1.8) to +include bitmapped graphics, see the details below. + +* Menu: + +* Encapsulated PostScript:: An internal call to GhostScript +* Bitmapped graphics:: PNG, JPEG and GIF + + +File: dvipng.info, Node: Encapsulated PostScript, Next: Bitmapped graphics, Up: Graphics + +5.1 Encapsulated PostScript +=========================== + +When an EPS file is included, a call to GhostScript is performed to +produce a bitmapped image that can be included. The default is to +produce an image with transparent background, at the same size as the +DVI page currently being converted to PNG, and include that as +foreground on the PNG. Of course, if the image is to be cropped, that +is done. The included image will be a truecolor image, so for maximum +performance the output PNG will be in truecolor mode as well. + + This conversion needs the `pngalpha' output device to be present in +your copy of GhostScript. If that device is not present, or you use the +`--palette' switch or request GIF output, the fallback is to use the +`png16m' device to produce a cropped opaque image for inclusion. Other +relevant switches are `--noghostscript' and `--nogssafer'. *Note Option +details::. + + The most common problem with including graphics is an incorrect +bounding box. Complain to whoever wrote the software that generated the +file if the bounding box is indeed incorrect. An adjusted boundingbox +can be specified in the `\includegraphics' call, as in this example +(using `graphicx'): + + \includegraphics[bb=10 20 100 200]{imagename.eps} + + +File: dvipng.info, Node: Bitmapped graphics, Prev: Encapsulated PostScript, Up: Graphics + +5.2 Bitmapped graphics +====================== + +dvipng can include PNG, JPEG and GIF graphics. When including such +images via `\includegraphics' you need to specify the bounding box +since TeX itself cannot read them from the files in question. The +bounding box size should be given as `0 0 w h' in pixels, e.g., if the +file `imagename.png' is 300x400 pixels, the inclusion would read + + \includegraphics[bb=0 0 300 400]{imagename.png} + + The default size is the image size in bp ("big points" in TeX +nomenclature or PostScript points as other people have it, 72 per inch). +That is, default resolution will be 72 dpi for included bitmaps, which +is the default size in the few other bitmap-capable drivers that are +known to me (dvipdfm and PDFLaTeX). + + If you want 100 dpi you need to specify the width accordingly. You +just divide your image width by 100: a 135 pixel wide image at 100 dpi +will take up 1.35 inches. If you want 200 dpi you divide by 200, and so +on. Simple, eh? The example above at 200 dpi would be 1.5 inches wide: + + \includegraphics[bb=0 0 300 400,witdh=1.5in]{imagename.png} + + +File: dvipng.info, Node: Color, Next: Diagnosing problems, Prev: Graphics, Up: Top + +6 Color +******* + +To support color, dvipng recognizes a certain set of specials as +generated by the `color' and `xcolor' style files. These specials start +with the keyword `color' or the keyword `background', followed by a +color specification. + +* Menu: + +* Color specifications:: +* Color specials:: + + +File: dvipng.info, Node: Color specifications, Next: Color specials, Up: Color + +6.1 Color specifications +======================== + +The color specification supported by dvipng is by-value or by-name. The +by-value spec starts with the name of a color model (one of `rgb', +`hsb', `cmy', `cmyk', or `gray') followed by the appropriate number of +parameters. Thus, the color specification `rgb 0.3 0.4 0.5' would +correspond to the color that is `0.3 0.4 0.5' in its red, blue and +green values. The color model used internally in dvipng is `RGB' +(discretized to 256 levels), for details on the formulas used in +conversion, see the `xcolor' documentation. + + By-name color specifications are single (case-dependent) words and +are compared with color names defined in `dvipsnam.def' (from the +`graphics' bundle), `svgnam.def' and `xcolor.sty' (from the `xcolor' +bundle). See the `xcolor' documentation for a list of names and the +corresponding colors. + + On the command-line, the name `Transparent' can also be used as an +argument to `--bg' to choose transparent background. *Note Option +details::. + + +File: dvipng.info, Node: Color specials, Prev: Color specifications, Up: Color + +6.2 Color specials +================== + +We will describe `background' first, since it is the simplest. The +`background' keyword must be followed by a color specification. That +color specification is used as a fill color for the background. The +last `background' special on a page is the one that gets used, and is +used for the whole of the page image. (This is possible because the +prescan phase of dvipng notices all of the color specials so that the +appropriate information can be written out during the second phase.) + + The `color' special itself has three forms. The first is just +`color' followed by a color specification. In this case, the current +global color is set to that color; the color stack must be empty when +such a command is executed. + + The second form is `color push' followed by a color specification. +This saves the current color on the color stack and sets the color to be +that given by the color specification. This is the most common way to +set a color. + + The final form of the `color' special is just `color pop', with no +color specification; this says to pop the color last pushed on the +color stack from the color stack and set the current color to be that +color. + + dvipng correctly handles these color specials across pages, even when +the pages are rendered repeatedly or in reverse order. + + +File: dvipng.info, Node: Diagnosing problems, Next: Credits, Prev: Color, Up: Top + +7 Diagnosing problems +********************* + +You've gone through all the trouble of installing dvipng, carefully read +all the instructions in this manual, and still can't get something to +work. The following sections provide some helpful hints if you find +yourself in such a situation. + +* Menu: + +* Contact information:: Who to ask. +* Debug options:: Getting diagnostics. + + +File: dvipng.info, Node: Contact information, Next: Debug options, Up: Diagnosing problems + +7.1 Contact information +======================= + +Bug reports should be sent to . + + Questions, suggestions for new features, pleas for help, and/or +praise should go to . For more information on this +mailing list, send a message with just the word `help' as subject or +body to or look at +`http://lists.nongnu.org/mailman/listinfo/dvipng'. + + Offers to support further development will be appreciated. For +developer access, ask on . + + For details on the TeX path-searching library, and `mktexpk' +problems, *note Common problems: (kpathsea)Common problems. + + +File: dvipng.info, Node: Debug options, Prev: Contact information, Up: Diagnosing problems + +7.2 Debug options +================= + +The `-d' flag to dvipng helps in tracking down certain errors. The +parameter to this flag is an integer that tells what errors are +currently being tracked. To track a certain class of debug messages, +simply provide the appropriate number given below; if you wish to track +multiple classes, sum the numbers of the classes you wish to track. To +track all classes, you can use `-1'. + + Some of these debugging options are actually provided by Kpathsea +(*note Debugging: (kpathsea)Debugging.). + + The classes are: +1 + Normal dvi op-codes + +2 + Virtual fonts + +4 + PK fonts + +8 + TFM files + +16 + Glyph rendering + +32 + FreeType calls + +64 + Encoding loads + +128 + Color specials + +256 + GhostScript specials + +512 + T1lib calls + +1024 + Kpathsea `stat' calls + +2048 + Kpathsea hash table lookups + +4096 + Kpathsea path element expansion + +8192 + Kpathsea path searches + + + +File: dvipng.info, Node: Credits, Next: Copying, Prev: Diagnosing problems, Up: Top + +8 Credits +********* + +A number of persons have contributed, if I forget to mention someone, I +apologize. First and foremost we have David Kastrup whose preview-latex +project provided the incentive to write this program. There is also a +number of people who have contributed by reporting bugs and suggesting +improvements as the thing has evolved. These include but is perhaps not +limited to (in semi-random order): Thomas Esser (teTeX), Christian +Schenk (MIKTeX), Brian R Furry (debian package), Angus Leeming (LyX), +Thomas Boutell (libgd), John Jones (first user report), Uwe Kern +(xcolor), Karl Berry (TeX Live), David Harvey (hinting in Freetype), +Neal Harmon, Alan Shutko, Reiner Stieb, Nick Alcock, Adam Buchbinder, +Svend Tollak Munkejord, James Longstreet, Bernhard Simon, Bob McElrath, +Georg Schwarz, Jason Farmer, Brian V. Smith, Samuel Hathaway, Thomas R. +Shemanske, Stephen Gibson, Christian Ridderstro"m, Ezra Peisach, +William H Wheeler, Thomas Klausner, Harald Koenig, Adrian Bunk, Kevin +Smith, Jason Riedy, Wolfram Krause, Reinhard Kotucha, and Takeshi Abe. + + +File: dvipng.info, Node: Copying, Next: Index, Prev: Credits, Up: Top + +9 Copying +********* + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU Lesser General Public License as published +by the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + + This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser +General Public License for more details. + + You should have received a copy of the GNU Lesser General Public +License along with this program. If not, see +. + + + +Copyright (C) 2002-2008 Jan-AAke Larsson + + +File: dvipng.info, Node: Index, Prev: Copying, Up: Top + +Index +***** + +[index] +* Menu: + +* -dSAFER: Option details. (line 167) +* absolute page number, and -l: Option details. (line 140) +* absolute page number, and -p: Option details. (line 188) +* antialiasing levels, number of: Option details. (line 242) +* background color (option): Option details. (line 40) +* base resolution, setting: Option details. (line 35) +* baseline reporting: Option details. (line 76) +* color specifications: Color specifications. + (line 6) +* command-line options: Command-line options. + (line 6) +* compilation: Installation. (line 6) +* compression: Option details. (line 303) +* configuration, of dvipng: Installation. (line 6) +* dark fonts: Option details. (line 119) +* debugging <1>: Diagnosing problems. (line 6) +* debugging: Option details. (line 54) +* depth reporting: Option details. (line 76) +* exit on erroneous images: Option details. (line 253) +* first page printed: Option details. (line 188) +* follow mode: Option details. (line 97) +* font generation, avoiding: Option details. (line 157) +* forcing palette output: Option details. (line 197) +* foreground color (option): Option details. (line 91) +* FreeType font rendering: Option details. (line 105) +* fuzzy images: Option details. (line 119) +* gamma: Option details. (line 119) +* GhostScript and -dSAFER: Option details. (line 167) +* GhostScript, turning off: Option details. (line 162) +* GIF image format: Option details. (line 125) +* height reporting: Option details. (line 132) +* installation, of dvipng: Installation. (line 6) +* invoking dvipng: Basic usage. (line 6) +* last page printed: Option details. (line 140) +* light fonts: Option details. (line 119) +* magnification, overriding DVI: Option details. (line 295) +* Metafont mode, specifying: Option details. (line 149) +* mktexpk, avoiding: Option details. (line 157) +* mode name, specifying: Option details. (line 149) +* no erroneous images: Option details. (line 207) +* offset pages: Option details. (line 182) +* option, details of: Option details. (line 6) +* options, dvipng: Command-line options. + (line 6) +* options, reading from standard input: Option details. (line 11) +* options, summary: Option summary. (line 6) +* output resolution, setting: Option details. (line 60) +* output, redirecting: Option details. (line 175) +* page range: Option details. (line 220) +* page, first printed: Option details. (line 188) +* page, last printed: Option details. (line 140) +* physical page number, and -l: Option details. (line 140) +* physical page number, and -p: Option details. (line 188) +* PNG image format: Option details. (line 216) +* PostScript inclusion problems: Encapsulated PostScript. + (line 21) +* problems: Diagnosing problems. (line 6) +* quality: Option details. (line 242) +* quiet operation: Option details. (line 238) +* reverse pagination: Option details. (line 249) +* silent operation: Option details. (line 238) +* standard input, reading options from: Option details. (line 11) +* standard output, output to: Option details. (line 175) +* T1lib font rendering: Option details. (line 270) +* transparent border fallback color: Option details. (line 25) +* transparent border width: Option details. (line 25) +* trouble: Diagnosing problems. (line 6) +* truecolor output: Option details. (line 284) +* warnings, suppressing: Option details. (line 238) + + + +Tag Table: +Node: Top297 +Node: Introduction1192 +Node: Installation3431 +Node: Prerequisites3778 +Node: Configure6268 +Node: Build/install8307 +Node: Installation outside the texmf tree8775 +Node: Advice for non-privileged users9482 +Node: Basic usage10490 +Node: Command-line options11617 +Node: Option summary12041 +Node: Option details14350 +Node: Graphics29729 +Node: Encapsulated PostScript30294 +Node: Bitmapped graphics31637 +Node: Color32837 +Node: Color specifications33225 +Node: Color specials34324 +Node: Diagnosing problems35736 +Node: Contact information36219 +Node: Debug options36960 +Node: Credits37995 +Node: Copying39157 +Node: Index39937 + +End Tag Table diff --git a/Build/source/texk/dvipng/doc/dvipng.texi b/Build/source/texk/dvipng/doc/dvipng.texi new file mode 100644 index 00000000000..6b4c6a99df3 --- /dev/null +++ b/Build/source/texk/dvipng/doc/dvipng.texi @@ -0,0 +1,940 @@ +\input texinfo +@setfilename dvipng.info +@settitle A DVI-to-PNG translator +@ifset man +@c man begin SYNOPSIS +dvipng [options] filename + +dvipng [options] [filename] - +@c man end +@end ifset + +@set version 1.12 +@set month-year February 2009 + +@c Put everything in one index (arbitrarily chosen to be the concept index). +@syncodeindex fn cp +@syncodeindex ky cp +@syncodeindex pg cp +@syncodeindex vr cp + +@include macros.texi +@iftex +@tolerance 10000 @emergencystretch 3em +@end iftex + +@dircategory TeX +@direntry +* DVI-to-PNG: (dvipng). Translating TeX DVI files to Portable Network Graphics (PNG). +* dvipng: (dvipng). A DVI-to-PNG translator. +@end direntry + +@finalout +@titlepage +@title dvipng +@subtitle A DVI-to-PNG Translator +@subtitle Version @value{version} + + +@author by Jan-@AA{}ke Larsson. +@page +@vskip 0pt plus 1filll +Copyright @copyright{} 2002-2008 Jan-@AA{}ke Larsson + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +@ignore +Permission is granted to process this file through TeX and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual). +@end ignore + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided also that the +section entitled ``Copying'' is included exactly as in the original, and +provided that the entire resulting derived work is distributed under the +terms of a permission notice identical to this one. + +Permission is granted to copy and distribute translations of this manual +into another language, under the above conditions for modified versions, +except that this permission notice may be stated in a translation +approved by the Free Software Foundation. +@end titlepage +@page + +@c @summarycontents +@contents + +@ifnottex +@node Top +@top dvipng + +This manual documents dvipng, a program to translate a DVI (DeVice +Independent) file into PNG (Portable Network Graphics). + +This file documents dvipng version @value{version} + +Corrections or perhaps rewrites of sections are @emph{very welcome}. + +Jan-@AA{}ke Larsson + +@end ifnottex + +@menu +* Introduction:: Introduction +* Installation:: How to compile and install dvipng +* Basic usage:: First things first +* Command-line options:: Advanced usage +* Graphics:: Including PostScript and/or bitmaps +* Color:: Using color with dvipng +* Diagnosing problems:: Problems? +* Credits:: People who have contributed +* Copying:: GNU Lesser General Public License +* Index:: General index +@end menu + + + +@node Introduction +@chapter Introduction + +@c man begin DESCRIPTION +@include readme.texi +@c man end + +@node Installation +@chapter Installation + +@cindex configuration, of dvipng +@cindex compilation +@cindex installation, of dvipng + +@include install.texi + +@node Basic usage +@chapter Basic usage of dvipng + +@cindex invoking dvipng + +To use dvipng at its simplest, simply type + +@example +dvipng foo +@end example + +@noindent +where @file{foo.dvi} is the output of @TeX{} that you want to convert to +PNG format. If there are four pages in @file{foo.dvi}, those pages will +be output as @file{foo1.png}, @file{foo2.png}, @file{foo3.png}, and +@file{foo4.png}, respectively. + +If you have enabled the PostScript font support (via FreeType or T1lib), +fonts will be rendered as they are needed. Otherwise, if you use fonts +that have not been used on your system before, they may be automatically +generated; this process can take a few minutes, so progress reports +appear by default. The next time the same font is used, it will have +been saved on disk, so rendering will go much faster. (If dvipng tries +to endlessly generate the same fonts over and over again, something is +wrong. @xref{Unable to generate fonts,,, kpathsea, Kpathsea}.) + +Many options are available (see the next section). For a brief summary +of available options, just type + +@example +dvipng --help +@end example + +@node Command-line options +@chapter Command-line options + +@cindex command-line options +@cindex options, dvipng + +dvipng has a plethora of command line options. Reading through this +section will give a good idea of the capabilities of the driver. + +@menu +* Option summary:: Quick listing, from dvipng --help. +* Option details:: More information about each option. +@end menu + + +@node Option summary +@section Option summary + +@cindex options, summary +Here is a handy summary of the options; it is printed out when you run +dvipng with no arguments or with the standard @samp{--help} option. + +@example +@include dvipng.help +@end example + + +@node Option details +@section Option details + +@cindex option, details of +@c man begin OPTIONS + +Many of the parameterless options listed here can be turned off by +suffixing the option with a zero (@samp{0}); for instance, to turn off +page reversal, use @samp{-r0}. Such options are marked with a trailing +@samp{*}. + +@table @samp +@item - +@cindex options, reading from standard input +@cindex standard input, reading options from +Read additional options from standard input after processing the command +line. + +@item --help +Print a usage message and exit. + +@item --version +Print the version number and exit. + +@item -bd @var{num} +@item -bd @var{color_spec} +@item -bd '@var{num} @var{color_spec}' +@cindex transparent border width +@cindex transparent border fallback color +Set the pixel width of the transparent border (default 0). Using this +option will make the image edges transparent, but it only affects pixels +with the background color. Giving a @var{color_spec} will set the +fallback color, to be used in viewers that cannot handle transparency +(the default is the background color). The color spec should be in +@TeX{} color \special syntax, e.g., 'rgb 1.0 0.0 0.0'. Setting the +fallback color makes the default border width 1 px. @xref{Color}. + +@item --bdpi @var{num} +@cindex base resolution, setting +Set the base (Metafont) resolution, both horizontal and vertical, to +@var{num} dpi (dots per inch). This option is necessary when manually +selecting Metafont mode with the --mode option (see below). + +@item -bg @var{color_spec} +@cindex background color (option) +Choose background color for the images. This option will be ignored if +there is a background color \special in the DVI. The color spec should +be in @TeX{} color \special syntax, e.g., 'rgb 1.0 0.0 0.0'. You can +also specify 'Transparent' or 'transparent' which will give you a +transparent background with the normal background as a fallback color. A +capitalized 'Transparent' will give a full-alpha transparency, while an +all-lowercase 'transparent' will give a simple fully transparent +background with non-transparent antialiased pixels. The latter would be +suitable for viewers who cannot cope with a true alpha channel. GIF +images do not support full alpha transparency, so in case of GIF output, +both variants will use the latter behaviour. @xref{Color}. + +@item -d @var{num} +@cindex debugging +Set the debug flags, showing what dvipng (thinks it) is doing. This will +work unless dvipng has been compiled without the @code{DEBUG} option +(not recommended). Set the flags as you need them, use @samp{-d -1} as +the first option for maximum output. @xref{Debug options}. + +@item -D @var{num} +@cindex output resolution, setting +Set the output resolution, both horizontal and vertical, to @var{num} +dpi (dots per inch). + +One may want to adjust this to fit a certain text font size (e.g., on +a web page), and for a text font height of @var{font_px} pixels (in +Mozilla) the correct formula is +@example +@var{dpi} = @var{font_px} * 72.27 / 10 [px * @TeX{}pt/in / @TeX{}pt] +@end example +The last division by ten is due to the standard font height 10pt in +your document, if you use 12pt, divide by 12. Unfortunately, some +proprietary browsers have font height in pt (points), not pixels. You +have to rescale that to pixels, using the screen resolution (default +is usually 96 dpi) which means the formula is +@example +@var{font_px} = @var{font_pt} * 96 / 72 [pt * px/in / (pt/in)] +@end example +On some high-res screens, the value is instead 120 dpi. Good luck! + +@item --depth* +@cindex baseline reporting +@cindex depth reporting +Report the depth of the image. This only works reliably when the +@LaTeX{} style @file{preview.sty} from @previewlatex{} is used with +the @samp{active} option. It reports the number of pixels from the +bottom of the image to the baseline of the image. This can be used for +vertical positioning of the image in, e.g., web documents, where one +would use (Cascading StyleSheets 1) +@example + +@end example +The depth is a negative offset in this case, so the minus sign is +necessary, and the unit is pixels (px). + +@item --dvinum* +Set this option to make the output page number be the @TeX{} page +numbers rather than the physical page number. See the @samp{-o} switch. + +@ignore +@item -e @var{num} +@cindex maxdrift +@cindex accuracy in positioning +@cindex positioning accuracy +Maximum drift in pixels of each character from its `true' +resolution-independent position on the page. The default value of this +parameter is resolution dependent (it is the number of entries in the +list [100, 200, 300, 400, 500, 600, 800, 1000, 1200, 1600, 2000, 2400, +2800, 3200, @dots{}] that are less than or equal to the resolution in +dots per inch). Allowing individual characters to `drift' from their +correctly rounded positions by a few pixels, while regaining the true +position at the beginning of each new word, improves the spacing of +letters in words. + +@item -f* +@cindex filter, running as a +@cindex standard I/O +@cindex pipes, not readable +@vindex PRINTER@r{, avoided with @samp{-f}} +Run as a filter. Read the DVI file from standard input and write the +PostScript to standard output. The standard input must be seekable, so +it cannot be a pipe. If your input must be a pipe, write a shell script +that copies the pipe output to a temporary file and then points dvipng at +this file. This option also disables the automatic reading of the +@code{PRINTER} environment variable; use @samp{-P$PRINTER} after the +@samp{-f} to read it anyway. It also turns off the automatic sending of +control-D if it was turned on with the @samp{-F} option or in the +configuration file; use @samp{-F} after the @samp{-f} to send it anyway. + +@item -k* +@cindex cropmarks +Print crop marks. This option increases the paper size (which should be +specified, either with a paper size special or with the @samp{-T} +option) by a half inch in each dimension. It translates each page by a +quarter inch and draws cross-style crop marks. It is mostly useful with +typesetters that can set the page size automatically. This works by +downloading @file{crop.pro}. +@end ignore + +@item -fg @var{color_spec} +@cindex foreground color (option) +Choose foreground color for the images. This option will be ignored if +there is a foreground color \special in the DVI. The color spec should +be in @TeX{} color \special syntax, e.g., 'rgb 1.0 0.0 0.0'. +@xref{Color}. + +@item --follow* +@cindex follow mode +Wait for data at end-of-file. One of the benefits of dvipng is that it +does not read the postamble, so it can be started before @TeX{} +finishes. This switch makes dvipng wait at end-of-file for further +output, unless it finds the POST marker that indicates the end of the +DVI. This is similar to @samp{tail -f} but for DVI-to-PNG conversion. + +@item --freetype* +@cindex FreeType font rendering +Enable/disable FreeType font rendering (default on). This option is +available if the FreeType2 font library was present at compilation time. +If this is the case, dvipng will have direct support for PostScript +Type1 and TrueType fonts internally, rather than using @samp{gsftopk} +for rendering the fonts. If you have PostScript versions of Computer +Modern installed, there will be no need to generate bitmapped variants +on disk of these. Then, you can render images at different (and unusual) +resolutions without cluttering the disk with lots of bitmapped fonts. +Note that if you have both FreeType and T1lib on your system, FreeType +will be preferred by dvipng. If you for some reason would want to use +T1lib rendering, use this option. + +@item --gamma @var{num} +@cindex gamma +@cindex dark fonts +@cindex light fonts +@cindex fuzzy images +Control the interpolation of colors in the greyscale anti-aliasing +color palette. Default value is 1.0. For 0 < @var{num} < 1, the +fonts will be lighter (more like the background), and for @var{num} > +1, the fonts will be darker (more like the foreground). + +@item --gif* +@cindex GIF image format +The images are output in the GIF format, if GIF support is enabled. +This is the default for the @samp{dvigif} binary, which only will be +available when GIF support is enabled. GIF images are palette images +(see the @samp{--palette} option) and does not support true alpha +channels (see the @samp{--bg} option). See also the @samp{--png} +option. + +@item --height* +@cindex baseline reporting +@cindex height reporting +Report the height of the image. This only works reliably when the +@LaTeX{} style @file{preview.sty} from @previewlatex{} is used with +the @samp{active} option. It reports the number of pixels from the top +of the image to the baseline of the image. The total height of the +image is obtained as the sum of the values reported from +@samp{--height} and @samp{--depth}. + +@item -l [=]@var{num} +@cindex last page printed +@cindex page, last printed +@cindex physical page number, and @samp{-l} +@cindex absolute page number, and @samp{-l} +The last page printed will be the first one numbered @var{num}. Default +is the last page in the document. If @var{num} is prefixed by an equals +sign, then it (and the argument to the @samp{-p} option, if specified) +is treated as a physical (absolute) page number, rather than a value to +compare with the @TeX{} @samp{\count0} values stored in the DVI file. +Thus, using @samp{-l =9} will end with the ninth page of the document, +no matter what the pages are actually numbered. + +@item --mode @var{mode} +@cindex mode name, specifying +@cindex Metafont mode, specifying +Use @var{mode} as the Metafont device name for the PK fonts (both for +path searching and font generation). This needs to be augmented with the +base device resolution, given with the @samp{--bdpi} option. See the +file @url{ftp://ftp.tug.org/tex/modes.mf} for a list of resolutions and +mode names for most devices. @xref{Unable to generate fonts,,, kpathsea, +Kpathsea}. + +@item -M* +@cindex font generation, avoiding +@pindex mktexpk@r{, avoiding} +@c this description repeated in kpathsea.texi +Turns off automatic PK font generation (@file{mktexpk}). This will have +no effect when using PostScript fonts, since no PK font generation will +be done anyway. +@ignore +@flindex missfont.log +If @code{mktexpk}, the invocation is appended to a file +@file{missfont.log} (by default) in the current directory. You can then +execute the log file to create the missing files after fixing the +problem. +@vindex TEXMFOUTPUT +@vindex MISSFONT_LOG +If the current directory is not writable and the environment variable or +configuration file value @samp{TEXMFOUTPUT} is set, its value is used. +Otherwise, nothing is written. The name @samp{missfont.log} is +overridden by the @samp{MISSFONT_LOG} environment variable or +configuration file value. +@end ignore + +@item --noghostscript* +@cindex GhostScript, turning off +This switch prohibits the internal call to GhostScript for displaying +PostScript specials. @samp{--noghostscript0} turns the call back on. + +@item --nogssafer* +@cindex GhostScript and -dSAFER +@cindex -dSAFER +Normally, if GhostScript is used to render PostScript specials, the +GhostScript interpreter is run with the option @samp{-dSAFER}. The +@samp{--nogssafer} option runs GhostScript without @samp{-dSAFER}. The +@samp{-dSAFER} option in Ghostscript disables PostScript operators such +as deletefile, to prevent possibly malicious PostScript programs from +having any effect. + +@item -o @var{name} +@cindex output, redirecting +@cindex standard output, output to +Send output to the file @var{name}. A single occurrence of @samp{%d} or +@samp{%01d}, @dots{}, @samp{%09d} will be exchanged for the physical +page number (this can be changed, see the @samp{--dvinum} switch). The +default output filename is @samp{@var{file}%d.png} where the input DVI +file was @samp{@var{file}.dvi}. + +@item -O @var{x-offset},@var{y-offset} +@cindex offset pages +Move the origin by @var{x-offset},@var{y-offset}, a comma-separated +pair of dimensions such as @samp{.1in,-.3cm}. +@c (@pxref{papersize special}). +The origin of the page is shifted from the default position +(of one inch down, one inch to the right from the upper left corner of +the paper) by this amount. + +@item -p [=]@var{num} +@cindex first page printed +@cindex page, first printed +@cindex physical page number, and @samp{-p} +@cindex absolute page number, and @samp{-p} +The first page printed will be the first one numbered @var{num}. Default +is the first page in the document. If @var{num} is prefixed by an +equals sign, then it (and the argument to the @samp{-l} option, if +specified) is treated as a physical (absolute) page number, rather than +a value to compare with the @TeX{} @samp{\count0} values stored in the +DVI file. Thus, using @samp{-p =3} will start with the third page of +the document, no matter what the pages are actually numbered. + +@item --palette* +@cindex forcing palette output +Starting from @samp{dvipng} 1.8, the output PNG will be a truecolor +png when an external image is included, to avoid unnecessary delay and +quality reduction, and enable the EPS translator to draw on a +transparent background and outside of the boundingbox. This switch +will force palette (256-color) output and make @samp{dvipng} revert to +the old behaviour, where included images were opaque and always +clipped to the boundingbox. This will also override the +@samp{--truecolor} switch if present. + +@item --picky* +@cindex no erroneous images +No images are output when a warning occurs. Normally, dvipng will +output an image in spite of a warning, but there may be something +missing in this image. One reason to use this option would be if you +have a more complete but slower fallback converter. Mainly, this is +useful for failed figure inclusion and unknown \special occurrences, +but warnings will also occur for missing or unknown color specs and +missing PK fonts. + +@item --png* +@cindex PNG image format +The images are output in the PNG format. This is the default for the +@samp{dvipng} binary. See also the @samp{--gif} option. + +@item -pp @var{firstpage}-@var{lastpage} +@cindex page range +Print pages @var{firstpage} through @var{lastpage}; but not quite +equivalent to @samp{-p @var{firstpage} -l @var{lastpage}}. For example, +when rendering a book, there may be several instances of a page in the +DVI file (one in @code{\frontmatter}, one in @code{\mainmatter}, and one +in @code{\backmatter}). In case of several pages matching, @samp{-pp +@var{firstpage}-@var{lastpage}} will render @emph{all} pages that +matches the specified range, while @samp{-p @var{firstpage} -l +@var{lastpage}} will render the pages from the @emph{first} occurrence +of @var{firstpage} to the @emph{first} occurrence of @var{lastpage}. +This is the (undocumented) behaviour of dvips. In dvipng you can give +both kinds of options, in which case you get all pages that matches the +range in @samp{-pp} between the pages from @samp{-p} to @samp{-l}. Also +multiple @samp{-pp} options accumulate, unlike @samp{-p} and @samp{-l}. +The @samp{-} separator can also be @samp{:}. Note that @samp{-pp -1} +will be interpreted as "all pages up to and including 1", if you want a +page numbered -1 (only the table of contents, say) put @samp{-pp -1--1}, +or more readable, @samp{-pp -1:-1}. + +@item -q* +@cindex quiet operation +@cindex silent operation +@cindex warnings, suppressing +Run quietly. Don't chatter about pages converted, etc.@: to standard +output; report no warnings (only errors) to standard error. + +@item -Q @var{num} +@cindex antialiasing levels@r{, number of} +@cindex quality +Set the quality to @var{num}. That is, choose the number of antialiasing +levels for PK and T1lib rendering to be @var{num}*@var{num}+1. The default +value is 4 which gives 17 levels of antialiasing for antialiased fonts +from these two. If FreeType is available, its rendering is unaffected by +this option. + +@item -r* +@cindex reverse pagination +Toggle output of pages in reverse/forward order. By default, the first +page in the DVI is output first. + +@ignore +@item -R +@cindex security +@cindex shell command execution, disabling +@cindex absolute filenames, disabling +@cindex pipes, disabling output to +Run securely. This disables shell command execution in @code{\special} +(via @samp{`}, @pxref{Dynamic creation of graphics}) and config files +(via the @samp{E} option, @pxref{Configuration file commands}), pipes as +output files, and opening of any absolute filenames. + +@item -t @var{papertype} +@cindex paper type +@cindex media +@cindex letter papertype +@cindex legal papertype +@cindex ledger papertype +@cindex a4 papertype +@cindex a3 papertype +@cindex landscape papertype +Set the paper type to @var{papertype}. +@c usually defined in one of the +@c configuration files, along with the appropriate PostScript code to +@c select it (@pxref{Config file paper sizes}). +You can also specify a @var{papertype} of @samp{landscape}, which +rotates a document by 90 degrees. To rotate a document whose paper type +is not the default, you can use the @samp{-t} option twice, once for the +paper type, and once for @samp{landscape}. +@end ignore + +@item --strict* +@cindex exit on erroneous images +The program exits when a warning occurs. Normally, dvipng will output +an image in spite of a warning, but there may be something missing in +this image. One reason to use this option would be if you have a more +complete but slower fallback converter. See the @samp{--picky} option +above for a list of when warnings occur. + +@item -T @var{image_size} +Set the image size to @var{image_size} which can be either of +@samp{bbox}, @samp{tight}, or a comma-separated pair of dimensions +@var{hsize},@var{vsize} such as @samp{.1in,.3cm}. The default is +@samp{bbox} which produces a PNG that includes all ink put on the page +and in addition the DVI origin, located 1in from the top and 1in from +the left edge of the paper. This usually gives whitespace above and to +the left in the produced image. The value @samp{tight} will make dvipng +only include all ink put on the page, producing neat images. +@c (@pxref{papersize special}). +@c This option overrides any papersize special in the DVI file. + +@item --t1lib* +@cindex T1lib font rendering +Enable/disable T1lib font rendering (default on). This option is +available if the T1lib font library was present at compilation time. If +this is the case, dvipng will have direct support for PostScript Type1 +fonts internally, rather than using @samp{gsftopk} for rendering the +fonts. If you have PostScript versions of Computer Modern installed, +there will be no need to generate bitmapped variants on disk of these. +Then, you can render images at different (and unusual) resolutions +without cluttering the disk with lots of bitmapped fonts. Note that if +you have both FreeType and T1lib on your system FreeType will be +preferred by dvipng, and if you for some reason rather want to use +T1lib, give the option @samp{--freetype0} (see above). + +@item --truecolor* +@cindex truecolor output +This will make @samp{dvipng} generate truecolor output. Note that +truecolor output is automatic if you include an external image in your +DVI, e.g., via a PostScript special (i.e., the @samp{graphics} or +@samp{graphicx} package). This switch is overridden by the +@samp{--palette} switch. + +@item -v* +Enable verbose operation. This will currently indicate what fonts is +used, in addition to the usual output. + +@item -x @var{num} +@cindex magnification, overriding DVI +Set the @math{x} magnification ratio to @math{@var{num}/1000}. Overrides +the magnification specified in the DVI file. Must be between 10 and +100000. It is recommended that you use standard magstep values (1095, +1200, 1440, 1728, 2074, 2488, 2986, and so on) to help reduce the total +number of PK files generated. @var{num} may be a real number, not an +integer, for increased precision. + +@item -z @var{num} +@cindex compression +Set the PNG compression level to @var{num}. This option is enabled if +your @samp{libgd} is new enough. The default compression level is 1, +which selects maximum speed at the price of slightly larger PNGs. For an +older @samp{libgd}, the hard-soldered value 5 is used. The include file +@samp{png.h} says +@ifclear man +@quotation +Currently, valid values range from 0 - 9, corresponding directly to the +zlib compression levels 0 - 9 (0 - no compression, 9 - "maximal" +compression). Note that tests have shown that zlib compression levels +3-6 usually perform as well as level 9 for PNG images, and do +considerably fewer calculations. In the future, these values may not +correspond directly to the zlib compression levels. +@end quotation +@end ifclear +@ifset man +``Currently, valid values range from 0 - 9, corresponding directly to +the zlib compression levels 0 - 9 (0 - no compression, 9 - "maximal" +compression). Note that tests have shown that zlib compression levels +3-6 usually perform as well as level 9 for PNG images, and do +considerably fewer calculations. In the future, these values may not +correspond directly to the zlib compression levels.'' +@end ifset +@end table +@c man end + +@node Graphics +@chapter Graphics + +@samp{dvipng} attempts to handle graphics as included by the +@samp{graphicx} and @samp{graphics} packages, without the need of +specifying a driver to these packages. This means that it recognizes +the encapsulated postscript inclusion meant for @samp{dvips}, but is +also able (from version 1.8) to include bitmapped graphics, see the +details below. + +@menu +* Encapsulated PostScript:: An internal call to GhostScript +* Bitmapped graphics:: PNG, JPEG and GIF +@end menu + +@node Encapsulated PostScript +@section Encapsulated PostScript + +When an EPS file is included, a call to GhostScript is performed to +produce a bitmapped image that can be included. The default is to +produce an image with transparent background, at the same size as the +DVI page currently being converted to PNG, and include that as +foreground on the PNG. Of course, if the image is to be cropped, that +is done. The included image will be a truecolor image, so for maximum +performance the output PNG will be in truecolor mode as well. + +This conversion needs the @samp{pngalpha} output device to be present +in your copy of GhostScript. If that device is not present, or you use +the @samp{--palette} switch or request GIF output, the fallback is to +use the @samp{png16m} device to produce a cropped opaque image for +inclusion. Other relevant switches are @samp{--noghostscript} and +@samp{--nogssafer}. @xref{Option details}. + +@cindex PostScript inclusion problems +The most common problem with including graphics is an incorrect +bounding box. Complain to whoever wrote the software that generated +the file if the bounding box is indeed incorrect. An adjusted +boundingbox can be specified in the @samp{\includegraphics} call, as +in this example (using @samp{graphicx}): + +@example +\includegraphics[bb=10 20 100 200]@{imagename.eps@} +@end example + + +@node Bitmapped graphics +@section Bitmapped graphics + +dvipng can include PNG, JPEG and GIF graphics. When including such +images via @samp{\includegraphics} you need to specify the bounding +box since @TeX{} itself cannot read them from the files in question. +The bounding box size should be given as @samp{0 0 w h} in pixels, +e.g., if the file @samp{imagename.png} is 300x400 pixels, the +inclusion would read + +@example +\includegraphics[bb=0 0 300 400]@{imagename.png@} +@end example + +The default size is the image size in bp (``big points'' in TeX +nomenclature or PostScript points as other people have it, 72 per inch). +That is, default resolution will be 72 dpi for included bitmaps, which +is the default size in the few other bitmap-capable drivers that are +known to me (dvipdfm and PDFLaTeX). + +If you want 100 dpi you need to specify the width accordingly. You +just divide your image width by 100: a 135 pixel wide image at 100 dpi +will take up 1.35 inches. If you want 200 dpi you divide by 200, and +so on. Simple, eh? The example above at 200 dpi would be 1.5 inches +wide: + +@example +\includegraphics[bb=0 0 300 400,witdh=1.5in]@{imagename.png@} +@end example + +@node Color +@chapter Color + +To support color, dvipng recognizes a certain set of specials as +generated by the @samp{color} and @samp{xcolor} style files. These +specials start with the keyword @samp{color} or the keyword +@samp{background}, followed by a color specification. + +@menu +* Color specifications:: +* Color specials:: +@end menu + + +@node Color specifications +@section Color specifications + +@cindex color specifications + +The color specification supported by dvipng is by-value or by-name. The +by-value spec starts with the name of a color model (one of @samp{rgb}, +@samp{hsb}, @samp{cmy}, @samp{cmyk}, or @samp{gray}) followed by the +appropriate number of parameters. Thus, the color specification +@samp{rgb 0.3 0.4 0.5} would correspond to the color that is @samp{0.3 +0.4 0.5} in its red, blue and green values. The color model used +internally in dvipng is @samp{RGB} (discretized to 256 levels), for +details on the formulas used in conversion, see the @samp{xcolor} +documentation. + +By-name color specifications are single (case-dependent) words and are +compared with color names defined in @samp{dvipsnam.def} (from the +@samp{graphics} bundle), @samp{svgnam.def} and @samp{xcolor.sty} (from +the @samp{xcolor} bundle). See the @samp{xcolor} documentation for a +list of names and the corresponding colors. + +On the command-line, the name @samp{Transparent} can also be used as +an argument to @samp{--bg} to choose transparent background. +@xref{Option details}. + +@node Color specials +@section Color specials + +We will describe @samp{background} first, since it is the simplest. The +@samp{background} keyword must be followed by a color specification. +That color specification is used as a fill color for the background. The +last @samp{background} special on a page is the one that gets used, and +is used for the whole of the page image. (This is possible because the +prescan phase of dvipng notices all of the color specials so that the +appropriate information can be written out during the second phase.) + +The @samp{color} special itself has three forms. The first is just +@samp{color} followed by a color specification. In this case, the +current global color is set to that color; the color stack must be empty +when such a command is executed. + +The second form is @samp{color push} followed by a color specification. +This saves the current color on the color stack and sets the color to be +that given by the color specification. This is the most common way to +set a color. + +The final form of the @samp{color} special is just @samp{color pop}, +with no color specification; this says to pop the color last pushed on +the color stack from the color stack and set the current color to be +that color. + +dvipng correctly handles these color specials across pages, even when +the pages are rendered repeatedly or in reverse order. + +@node Diagnosing problems +@chapter Diagnosing problems + +@cindex problems +@cindex trouble +@cindex debugging + +You've gone through all the trouble of installing dvipng, carefully read +all the instructions in this manual, and still can't get something to +work. The following sections provide some helpful hints if you find +yourself in such a situation. + +@menu +* Contact information:: Who to ask. +* Debug options:: Getting diagnostics. +@end menu + +@node Contact information +@section Contact information + +Bug reports should be sent to +@email{dvipng@@nongnu.org}. + +Questions, suggestions for new features, pleas for help, and/or praise +should go to @email{dvipng@@nongnu.org}. For more information on this +mailing list, send a message with just the word `help' as subject or +body to @email{dvipng-request@@nongnu.org} or look at +@url{http://lists.nongnu.org/mailman/listinfo/dvipng}. + +Offers to support further development will be appreciated. For developer +access, ask on @email{dvipng@@nongnu.org}. + +For details on the @TeX{} path-searching library, and @code{mktexpk} +problems, @pxref{Common problems,,, kpathsea, Kpathsea}. + + +@node Debug options +@section Debug options + +The @samp{-d} flag to dvipng helps in tracking down certain errors. The +parameter to this flag is an integer that tells what errors are +currently being tracked. To track a certain class of debug messages, +simply provide the appropriate number given below; if you wish to track +multiple classes, sum the numbers of the classes you wish to track. To +track all classes, you can use @code{-1}. + +Some of these debugging options are actually provided by Kpathsea +(@pxref{Debugging, , , kpathsea, Kpathsea}). + +The classes are: +@table @asis +@item 1 +Normal dvi op-codes +@item 2 +Virtual fonts +@item 4 +PK fonts +@item 8 +TFM files +@item 16 +Glyph rendering +@item 32 +FreeType calls +@item 64 +Encoding loads +@item 128 +Color specials +@item 256 +GhostScript specials +@item 512 +T1lib calls +@item 1024 +Kpathsea @code{stat} calls +@item 2048 +Kpathsea hash table lookups +@item 4096 +Kpathsea path element expansion +@item 8192 +Kpathsea path searches +@ignore +@item 16384 +@end ignore + +@end table + +@node Credits +@chapter Credits + +A number of persons have contributed, if I forget to mention someone, +I apologize. First and foremost we have David Kastrup whose +@previewlatex{} project provided the incentive to write this program. +There is also a number of people who have contributed by reporting +bugs and suggesting improvements as the thing has evolved. These +include but is perhaps not limited to (in semi-random order): Thomas +Esser (te@TeX{}), Christian Schenk (MIK@TeX{}), Brian R Furry (debian +package), Angus Leeming (LyX), Thomas Boutell (libgd), John Jones +(first user report), Uwe Kern (xcolor), Karl Berry (@TeX{} Live), +David Harvey (hinting in Freetype), Neal Harmon, Alan Shutko, Reiner +Stieb, Nick Alcock, Adam Buchbinder, Svend Tollak Munkejord, James +Longstreet, Bernhard Simon, Bob McElrath, Georg Schwarz, Jason Farmer, +Brian V. Smith, Samuel Hathaway, Thomas R. Shemanske, Stephen Gibson, +Christian Ridderstr@"om, Ezra Peisach, William H Wheeler, Thomas +Klausner, Harald Koenig, Adrian Bunk, Kevin Smith, Jason Riedy, +Wolfram Krause, Reinhard Kotucha, and Takeshi Abe. + +@ifset man +@c man begin NOTES +The full manual is accessible in the info format, on most systems by typing +@example +info dvipng +@end example +@c man end +@c man begin COPYRIGHT +This program is released under the GNU Lesser General Public License +version 3, see the COPYING file in the dvipng distribution or +@url{http://www.gnu.org/licenses/gpl.html}. + +Copyright @copyright{} 2002-2008 Jan-@AA{}ke Larsson +@c man end +@end ifset + +@node Copying +@chapter Copying + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this program. If not, see +. + +@sp 2 +@noindent +Copyright @copyright{} 2002-2008 Jan-@AA{}ke Larsson + +@node Index +@unnumbered Index + +@printindex cp +@bye + diff --git a/Build/source/texk/dvipng/doc/install.texi b/Build/source/texk/dvipng/doc/install.texi new file mode 100644 index 00000000000..c58f9af6013 --- /dev/null +++ b/Build/source/texk/dvipng/doc/install.texi @@ -0,0 +1,203 @@ +@c install.texi +@c +@c Part of the dvipng distribution + +@include macros.texi +@ifset rawfile +@chapter Installing dvipng + +@end ifset +@c ----------------------- +Installing dvipng should be simple: merely @code{./configure}, +@code{make}, and @code{make install}. + +@ifclear rawfile +@menu +* Prerequisites:: +* Configure:: +* Build/install:: +* Installation outside the texmf tree:: +* Advice for non-privileged users:: +@end menu +@end ifclear + +@node Prerequisites +@section Prerequisites + +@itemize @bullet +@item The GD Graphics Draw library, libgd + +The drawing library @samp{libgd} is necessary, and is downloadable at +@uref{http://www.boutell.com/gd}, and there are binary packages for +most operating systems from their respective distributors. In any +case, the latest version of the library installs using @samp{autoconf} +so it should not be difficult for you to install it from source, and +then proceed with installing dvipng. + +@item The path-searching library kpathsea + +Kpathsea is most likely included in your @LaTeX{} installation, but it +may happen that ./configure does not find it; see below. If you do not +have it, download it from @uref{http://www.ctan.org} and compile it. +I have no experience with this, so I cannot help much here. + +@item The font-rendering library FreeType 2 + +While not strictly necessary, a recent FreeType 2 is recommended since +dvipng currently will produce better-quality images when this library is +available. To take advantage of this, you should have at least FreeType +2.1.9. + +FreeType 2 will enable direct support for PostScript and TrueType fonts, +so that dvipng will not need to generate bitmapped variants on disk of +the @TeX{} fonts since modern @TeX{} distributions include PostScript +versions of them. Then, you can render images at different (and unusual) +resolutions without cluttering the disk with lots of bitmapped fonts. + +Finally, it will enable subfont support in dvipng. That is, if you want +to render CJK-@LaTeX{} characters, you must have FreeType 2 installed. + +@item The font-rendering library T1lib + +An alternative to FreeType 2 is T1lib, but this will enable only +PostScript fonts in dvipng and will not include subfont support. Also +here, you can render images at different (and unusual) resolutions +without cluttering the disk with lots of bitmapped fonts. If both +FreeType 2 and T1lib are present, FreeType will be internally +preferred by dvipng but T1lib can be chosen at runtime. + +@item libpng and libz + +To be able to compress and write PNG files to disk, dvipng (or really +libgd) uses libpng which in turn uses libz. These should be available on +any modern system, if not, download them and install them. + +@item The @code{texinfo} package + +This is needed for building the documentation. +@end itemize + +@node Configure +@section Configure + +The first step is to configure the source code, telling it where +various files will be. To do so, run + +@example +./configure @var{options} +@end example + +(Note: if you have fetched dvipng from CVS rather than a regular +release, you will have to first generate @file{./configure} by running +@code{autoconf} 2.53 or later.) + +On many machines, you will not need to specify any options, but if +@code{configure} cannot determine something on its own, you'll need to +help it out. For a list of the options type + +@example +./configure --help +@end example + +On some machines, the libraries will be installed in directories that +are not in the linker's search path. This will generate an error when +running @file{./configure}, indicating that it cannot find libgd or +libkpathsea (most likely). You then need to specify the path to the +respective library's object files. They are typically called e.g., +@file{libgd.a} or @file{libgd.so}. If they are located in e.g., +@file{/sw/local/lib}, do + +@example +./configure LDFLAGS=-L/sw/local/lib +@end example + +If the library is available as a shared object file (@file{.so}), the +runtime linker may also need to be told where to find the library, +then use + +@example +./configure LDFLAGS='-L/sw/local/lib -R/sw/local/lib' +@end example + +When either of these is necessary, it is likely that the C header +files are also installed in directories that are not in the C +preprocessor's search path. This will also generate an error when +running @file{./configure}, indicating that it cannot find e.g., +@file{gd.h} or @file{kpathsea.h} (most likely). You then need to +specify the path to the respective library's C header files. If they +are located in e.g., @file{/sw/local/include}, do + +@example +./configure CPPFLAGS=-I/sw/local/include +@end example + +On my SUN Solaris workstation, I had to combine this into + +@example +./configure CPPFLAGS='-I/sw/local/include -I/sw/tex/teTeX/1.0/include'\ + LDFLAGS='-L/sw/local/lib -R/sw/local/lib -L/sw/tex/teTeX/1.0/lib/' +@end example + +@noindent +where the backslash denotes a continuation of the line. + +@node Build/install +@section Build/install + +Once @file{configure} has been run, simply enter + +@example +make +@end example + +@noindent +at the prompt to compile the C code, and build the documentation files. +To install the files into the locations chosen earlier, type + +@example +make install +@end example + +@noindent +You may need special privileges to install, e.g., if you are installing +into system directories. + +@node Installation outside the texmf tree +@section Installation outside the texmf tree + +In some cases, a dvipng binary installed outside the texmf tree will +not be able to find virtual fonts, or the PostScript font maps +(normally used by dvips). This may be because @emph{only} +$SELFAUTOLOC, $SELFAUTODIR, and $SELFAUTOPARENT are used in the texmf +tree configuration file @samp{texmf.cnf}. If so, give the switch +@samp{--enable-selfauto-set} to @samp{./configure}. This will make +dvipng adjust these three internally so that kpathsea thinks that +dvipng @emph{is} installed in the texmf tree. + +@node Advice for non-privileged users +@section Installation for non-privileged users + +Often people without system administration privileges want to install +software for their private use. In that case you need to specify more +options to the @file{configure} script, usually this is done by using +the @samp{--prefix} option to the @file{configure} script, and let it +point to the personal home directory. In that way, resulting binaries +will be installed under the @file{bin} subdirectory of your home +directory, manual pages under @file{man} and so on. That way, it is +reasonably easy to maintain a bunch of additional packages, since the +prefix argument is supported by most @file{configure} scripts. + +You'll have to add something like @file{/home/myself/bin} to your +@code{PATH} shell variable, if it isn't there already, and similarly +set the @code{INFOPATH} and @code{MANPATH} variables to be able to +access the documentation. + +@ifset rawfile +@section Copying + +This program is released under the GNU Lesser General Public License +version 3, see the COPYING file in the dvipng distribution or +@url{http://www.gnu.org/licenses/}. + +Copyright @copyright{} 2002-2009 Jan-@AA{}ke Larsson +@end ifset diff --git a/Build/source/texk/dvipng/doc/macros.texi b/Build/source/texk/dvipng/doc/macros.texi new file mode 100644 index 00000000000..3c90a59eb15 --- /dev/null +++ b/Build/source/texk/dvipng/doc/macros.texi @@ -0,0 +1,61 @@ +@ignore +macros.texi + +Part of the dvipng distribution + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this program. If not, see +. + +Copyright @copyright{} 2002-2008 Jan-@AA{}ke Larsson +@end ignore + +@ifclear macros +@set macros +@macro AUCTeX {} +AUC@TeX{} +@end macro +@ifnottex +@macro LaTeX {} +La@TeX{} +@end macro +@macro previewlatex {} +preview-latex +@end macro +@ifset no-acronym +@clear no-acronym +@macro acronym {text} +@sc{\text\} +@end macro +@end ifset +@ifset no-env +@clear no-env +@macro env {text} +@code{\text\} +@end macro +@end ifset +@ifset no-option +@clear no-option +@macro option {text} +@samp{\text\} +@end macro +@end ifset +@end ifnottex +@tex +\gdef\LaTeX{L\kern-.36em\raise.3ex\hbox{\sc{a}}\kern-.15em\TeX} +\gdef\previewlatex{Preview-\LaTeX} +\ifx\acronym\undefined \gdef\acronym#1{{\smallcaps \lowercase{#1}}} \fi +\ifx\env\undefined \global\let\env=\code \fi +\ifx\option\undefined \global\let\option=\samp \fi +@end tex +@end ifclear diff --git a/Build/source/texk/dvipng/doc/readme.texi b/Build/source/texk/dvipng/doc/readme.texi new file mode 100644 index 00000000000..378333376ae --- /dev/null +++ b/Build/source/texk/dvipng/doc/readme.texi @@ -0,0 +1,161 @@ +@c readme.texi +@c +@c Part of the dvipng distribution + +@ifclear man +@include macros.texi +@ifset rawfile +@chapter dvipng + +@end ifset +@end ifclear +@c ----------------------- + +This program makes PNG and/or GIF graphics from DVI files as obtained +from @TeX{} and its relatives. + +If GIF support is enabled, GIF output is chosen by using the +@samp{dvigif} binary or with the @samp{--gif} option. + +@ifclear man + +It is intended to produce anti-aliased screen-resolution images as fast +as is possible. The target audience is people who need to generate and +regenerate many images again and again. The primary target is the +@previewlatex{} (X)Emacs package, a package to preview formulas from +within (X)Emacs. Yes, you get to see your formulas in the (X)Emacs +buffer, see @url{http://www.gnu.org/software/auctex/preview-latex.html}. + +Another example is WeBWorK, an internet-based method for delivering +homework problems to students over the internet, giving students +instant feedback as to whether or not their answers are correct, see +@url{http://webwork.math.rochester.edu}. + +A more recent addition to the dvipng-using applications out there is +MediaWiki, the software behind Wikipedia and many other wikis out +there. Dvipng is used to render mathematical formulae from version +1.8.0 of MediaWiki, see @url{http://www.mediawiki.org}. + +Other applications may also benefit, like web applications as latex2html +and WYSIWYG editors like LyX. + +@ifset rawfile +@section Benefits of dvipng +@end ifset +@end ifclear + +The benefits of @samp{dvipng}/@samp{dvigif} include + +@itemize @bullet +@item +Speed. It is a very fast bitmap-rendering code for DVI files, which +makes it suitable for generating large amounts of images on-the-fly, +as needed in @previewlatex{}, WeBWorK and others. + +@item +It does not read the postamble, so it can be started before @TeX{} +finishes. There is a @samp{--follow} switch that makes dvipng wait at +end-of-file for further output, unless it finds the POST marker that +indicates the end of the DVI. + +@item +Interactive query of options. dvipng can read options interactively +through stdin, and all options are usable. It is even possible to change +the input file through this interface. + +@item +Supports PK, VF, PostScript Type1, and TrueType fonts, subfonts (i.e., +as used in CJK-@LaTeX{}), color specials, and inclusion of PostScript, +PNG, JPEG or GIF images. + +@item +and more... + +@end itemize + +@ifset rawfile +@section Installation + +Read @file{INSTALL}, included in the distribution. + +@section Usage + +To use dvipng at its simplest, simply type + +@example +dvipng foo +@end example + +@noindent +where @file{foo.dvi} is the output of @TeX{} that you want to convert to +PNG format. If there are four pages in @file{foo.dvi}, those pages will +be output as @file{foo1.png}, @file{foo2.png}, @file{foo3.png}, and +@file{foo4.png}, respectively. + +Many options are available (see the info manual). For a brief summary +of available options, just type + +@example +dvipng --help +@end example + +@section Availability + +The dvipng package is available at Savannah, the GNU project site. Since +dvipng is not part of the GNU project, although released under the GNU +GPL, the web address is +@url{http://savannah.nongnu.org/projects/dvipng}. Instructions for +anonymous CVS access can be found at +@url{http://savannah.nongnu.org/cvs/?group=dvipng}. + +@section Contacts + +Bug reports should be sent to @email{dvipng@@nongnu.org}. + +Questions, suggestions for new features, pleas for help, and/or praise +should go to @email{dvipng@@nongnu.org}. For more information on this +mailing list, send a message with just the word `help' as subject or +body to @email{dvipng-request@@nongnu.org} or look at +@url{http://lists.nongnu.org/mailman/listinfo/dvipng}. + +Offers to support further development will be appreciated. For developer +access, ask on @email{dvipng@@nongnu.org}. + +@section Copying + +This program is released under the GNU Lesser General Public License +version 3, see the COPYING file in the dvipng distribution or +@url{http://www.gnu.org/licenses/}. + +Copyright @copyright{} 2002-2009 Jan-@AA{}ke Larsson + +@section Todo + +@itemize @bullet +@item +Use gs interpreter library for speed and possibly for functionality. + +@item +Add more color models for xcolor compatibility + +@item +Fix T1lib and PK rendering so it is on par with Freetype. + +@item +Enable a named pipe as DVI + +@item +Further speed improvements. + +@item +Other output specials and source specials. + +@item +Clean internal structures. Overhaul file handling. + +@item +Fix the SELFAUTO stuff at runtime rather than at build time +@end itemize + + +@end ifset diff --git a/Build/source/texk/dvipng/doc/texi2pod.pl b/Build/source/texk/dvipng/doc/texi2pod.pl new file mode 100755 index 00000000000..9c6d8cc2792 --- /dev/null +++ b/Build/source/texk/dvipng/doc/texi2pod.pl @@ -0,0 +1,444 @@ +#! /usr/bin/env perl + +# Copyright (C) 1999, 2000, 2001, 2003, 2007 Free Software +# Foundation, Inc. + +# This file is part of GCC. + +# GCC is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. + +# GCC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with GCC. If not, see . + +# This does trivial (and I mean _trivial_) conversion of Texinfo +# markup to Perl POD format. It's intended to be used to extract +# something suitable for a manpage from a Texinfo document. + +use warnings; + +$output = 0; +$skipping = 0; +%sects = (); +$section = ""; +@icstack = (); +@endwstack = (); +@skstack = (); +@instack = (); +$shift = ""; +%defs = (); +$fnno = 1; +$inf = ""; +$ibase = ""; + +while ($_ = shift) { + if (/^-D(.*)$/) { + if ($1 ne "") { + $flag = $1; + } else { + $flag = shift; + } + $value = ""; + ($flag, $value) = ($flag =~ /^([^=]+)(?:=(.+))?/); + die "no flag specified for -D\n" + unless $flag ne ""; + die "flags may only contain letters, digits, hyphens, dashes and underscores\n" + unless $flag =~ /^[a-zA-Z0-9_-]+$/; + $defs{$flag} = $value; + } elsif (/^-/) { + usage(); + } else { + $in = $_, next unless defined $in; + $out = $_, next unless defined $out; + usage(); + } +} + +if (defined $in) { + $inf = gensym(); + open($inf, "<$in") or die "opening \"$in\": $!\n"; + $ibase = $1 if $in =~ m|^(.+)/[^/]+$|; +} else { + $inf = \*STDIN; +} + +if (defined $out) { + open(STDOUT, ">$out") or die "opening \"$out\": $!\n"; +} + +while(defined $inf) { +while(<$inf>) { + # Certain commands are discarded without further processing. + /^\@(?: + [a-z]+index # @*index: useful only in complete manual + |need # @need: useful only in printed manual + |(?:end\s+)?group # @group .. @end group: ditto + |page # @page: ditto + |node # @node: useful only in .info file + |(?:end\s+)?ifnottex # @ifnottex .. @end ifnottex: use contents + )\b/x and next; + + chomp; + + # Look for filename and title markers. + /^\@setfilename\s+([^.]+)/ and $fn = $1, next; + /^\@settitle\s+([^.]+)/ and $tl = postprocess($1), next; + + # Identify a man title but keep only the one we are interested in. + /^\@c\s+man\s+title\s+([A-Za-z0-9-]+)\s+(.+)/ and do { + if (exists $defs{$1}) { + $fn = $1; + $tl = postprocess($2); + } + next; + }; + + # Look for blocks surrounded by @c man begin SECTION ... @c man end. + # This really oughta be @ifman ... @end ifman and the like, but such + # would require rev'ing all other Texinfo translators. + /^\@c\s+man\s+begin\s+([A-Z]+)\s+([A-Za-z0-9-]+)/ and do { + $output = 1 if exists $defs{$2}; + $sect = $1; + next; + }; + /^\@c\s+man\s+begin\s+([A-Z]+)/ and $sect = $1, $output = 1, next; + /^\@c\s+man\s+end/ and do { + $sects{$sect} = "" unless exists $sects{$sect}; + $sects{$sect} .= postprocess($section); + $section = ""; + $output = 0; + next; + }; + + # handle variables + /^\@set\s+([a-zA-Z0-9_-]+)\s*(.*)$/ and do { + $defs{$1} = $2; + next; + }; + /^\@clear\s+([a-zA-Z0-9_-]+)/ and do { + delete $defs{$1}; + next; + }; + + next unless $output; + + # Discard comments. (Can't do it above, because then we'd never see + # @c man lines.) + /^\@c\b/ and next; + + # End-block handler goes up here because it needs to operate even + # if we are skipping. + /^\@end\s+([a-z]+)/ and do { + # Ignore @end foo, where foo is not an operation which may + # cause us to skip, if we are presently skipping. + my $ended = $1; + next if $skipping && $ended !~ /^(?:ifset|ifclear|ignore|menu|iftex|copying)$/; + + die "\@end $ended without \@$ended at line $.\n" unless defined $endw; + die "\@$endw ended by \@end $ended at line $.\n" unless $ended eq $endw; + + $endw = pop @endwstack; + + if ($ended =~ /^(?:ifset|ifclear|ignore|menu|iftex)$/) { + $skipping = pop @skstack; + next; + } elsif ($ended =~ /^(?:example|smallexample|display)$/) { + $shift = ""; + $_ = ""; # need a paragraph break + } elsif ($ended =~ /^(?:itemize|enumerate|[fv]?table)$/) { + $_ = "\n=back\n"; + $ic = pop @icstack; + } else { + die "unknown command \@end $ended at line $.\n"; + } + }; + + # We must handle commands which can cause skipping even while we + # are skipping, otherwise we will not process nested conditionals + # correctly. + /^\@ifset\s+([a-zA-Z0-9_-]+)/ and do { + push @endwstack, $endw; + push @skstack, $skipping; + $endw = "ifset"; + $skipping = 1 unless exists $defs{$1}; + next; + }; + + /^\@ifclear\s+([a-zA-Z0-9_-]+)/ and do { + push @endwstack, $endw; + push @skstack, $skipping; + $endw = "ifclear"; + $skipping = 1 if exists $defs{$1}; + next; + }; + + /^\@(ignore|menu|iftex|copying)\b/ and do { + push @endwstack, $endw; + push @skstack, $skipping; + $endw = $1; + $skipping = 1; + next; + }; + + next if $skipping; + + # Character entities. First the ones that can be replaced by raw text + # or discarded outright: + s/\@copyright\{\}/(c)/g; + s/\@dots\{\}/.../g; + s/\@enddots\{\}/..../g; + s/\@([.!? ])/$1/g; + s/\@[:-]//g; + s/\@bullet(?:\{\})?/*/g; + s/\@TeX\{\}/TeX/g; + s/\@pounds\{\}/\#/g; + s/\@minus(?:\{\})?/-/g; + s/\\,/,/g; + + # Now the ones that have to be replaced by special escapes + # (which will be turned back into text by unmunge()) + s/&/&/g; + s/\@\@/&at;/g; + s/\@\{/{/g; + s/\@\}/}/g; + + # Inside a verbatim block, handle @var specially. + if ($shift ne "") { + s/\@var\{([^\}]*)\}/<$1>/g; + } + + # POD doesn't interpret E<> inside a verbatim block. + if ($shift eq "") { + s//>/g; + } else { + s//>/g; + } + + # Single line command handlers. + + /^\@include\s+(.+)$/ and do { + push @instack, $inf; + $inf = gensym(); + $file = postprocess($1); + + # Try cwd and $ibase. + open($inf, "<" . $file) + or open($inf, "<" . $ibase . "/" . $file) + or die "cannot open $file or $ibase/$file: $!\n"; + next; + }; + + /^\@(?:section|unnumbered|unnumberedsec|center)\s+(.+)$/ + and $_ = "\n=head2 $1\n"; + /^\@subsection\s+(.+)$/ + and $_ = "\n=head3 $1\n"; + + # Block command handlers: + /^\@itemize(?:\s+(\@[a-z]+|\*|-))?/ and do { + push @endwstack, $endw; + push @icstack, $ic; + if (defined $1) { + $ic = $1; + } else { + $ic = '@bullet'; + } + $_ = "\n=over 4\n"; + $endw = "itemize"; + }; + + /^\@enumerate(?:\s+([a-zA-Z0-9]+))?/ and do { + push @endwstack, $endw; + push @icstack, $ic; + if (defined $1) { + $ic = $1 . "."; + } else { + $ic = "1."; + } + $_ = "\n=over 4\n"; + $endw = "enumerate"; + }; + + /^\@([fv]?table)\s+(\@[a-z]+)/ and do { + push @endwstack, $endw; + push @icstack, $ic; + $endw = $1; + $ic = $2; + $ic =~ s/\@(?:samp|strong|key|gcctabopt|env)/B/; + $ic =~ s/\@(?:code|kbd)/C/; + $ic =~ s/\@(?:dfn|var|emph|cite|i)/I/; + $ic =~ s/\@(?:file)/F/; + $_ = "\n=over 4\n"; + }; + + /^\@((?:small)?example|display)/ and do { + push @endwstack, $endw; + $endw = $1; + $shift = "\t"; + $_ = ""; # need a paragraph break + }; + + /^\@itemx?\s*(.+)?$/ and do { + if (defined $1) { + # Entity escapes prevent munging by the <> processing below. + $_ = "\n=item $ic\<$1\>\n"; + } else { + $_ = "\n=item $ic\n"; + $ic =~ y/A-Ya-y/B-Zb-z/; + $ic =~ s/(\d+)/$1 + 1/eg; + } + }; + + $section .= $shift.$_."\n"; +} +# End of current file. +close($inf); +$inf = pop @instack; +} + +die "No filename or title\n" unless defined $fn && defined $tl; + +$sects{NAME} = "$fn \- $tl\n"; +$sects{FOOTNOTES} .= "=back\n" if exists $sects{FOOTNOTES}; + +for $sect (qw(NAME SYNOPSIS DESCRIPTION OPTIONS ENVIRONMENT FILES + BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) { + if(exists $sects{$sect}) { + $head = $sect; + $head =~ s/SEEALSO/SEE ALSO/; + print "=head1 $head\n\n"; + print scalar unmunge ($sects{$sect}); + print "\n"; + } +} + +sub usage +{ + die "usage: $0 [-D toggle...] [infile [outfile]]\n"; +} + +sub postprocess +{ + local $_ = $_[0]; + + # @value{foo} is replaced by whatever 'foo' is defined as. + while (m/(\@value\{([a-zA-Z0-9_-]+)\})/g) { + if (! exists $defs{$2}) { + print STDERR "Option $2 not defined\n"; + s/\Q$1\E//; + } else { + $value = $defs{$2}; + s/\Q$1\E/$value/; + } + } + + # Formatting commands. + # Temporary escape for @r. + s/\@r\{([^\}]*)\}/R<$1>/g; + s/\@(?:dfn|var|emph|cite|i)\{([^\}]*)\}/I<$1>/g; + s/\@(?:code|kbd)\{([^\}]*)\}/C<$1>/g; + s/\@(?:gccoptlist|samp|strong|key|option|env|command|b)\{([^\}]*)\}/B<$1>/g; + s/\@sc\{([^\}]*)\}/\U$1/g; + s/\@file\{([^\}]*)\}/F<$1>/g; + s/\@w\{([^\}]*)\}/S<$1>/g; + s/\@(?:dmn|math)\{([^\}]*)\}/$1/g; + + # keep references of the form @ref{...}, print them bold + s/\@(?:ref)\{([^\}]*)\}/B<$1>/g; + + # Change double single quotes to double quotes. + s/''/"/g; + s/``/"/g; + + # Cross references are thrown away, as are @noindent and @refill. + # (@noindent is impossible in .pod, and @refill is unnecessary.) + # @* is also impossible in .pod; we discard it and any newline that + # follows it. Similarly, our macro @gol must be discarded. + + s/\(?\@xref\{(?:[^\}]*)\}(?:[^.<]|(?:<[^<>]*>))*\.\)?//g; + s/\s+\(\@pxref\{(?:[^\}]*)\}\)//g; + s/;\s+\@pxref\{(?:[^\}]*)\}//g; + s/\@noindent\s*//g; + s/\@refill//g; + s/\@gol//g; + s/\@\*\s*\n?//g; + + # @uref can take one, two, or three arguments, with different + # semantics each time. @url and @email are just like @uref with + # one argument, for our purposes. + s/\@(?:uref|url|email)\{([^\},]*)\}/<B<$1>>/g; + s/\@uref\{([^\},]*),([^\},]*)\}/$2 (C<$1>)/g; + s/\@uref\{([^\},]*),([^\},]*),([^\},]*)\}/$3/g; + + # Un-escape <> at this point. + s/<//g; + + # Now un-nest all B<>, I<>, R<>. Theoretically we could have + # indefinitely deep nesting; in practice, one level suffices. + 1 while s/([BIR])<([^<>]*)([BIR])<([^<>]*)>/$1<$2>$3<$4>$1 with bare ...; eliminate empty markup, B<>; + # shift white space at the ends of [BI]<...> expressions outside + # the expression. + s/R<([^<>]*)>/$1/g; + s/[BI]<>//g; + s/([BI])<(\s+)([^>]+)>/$2$1<$3>/g; + s/([BI])<([^>]+?)(\s+)>/$1<$2>$3/g; + + # Extract footnotes. This has to be done after all other + # processing because otherwise the regexp will choke on formatting + # inside @footnote. + while (/\@footnote/g) { + s/\@footnote\{([^\}]+)\}/[$fnno]/; + add_footnote($1, $fnno); + $fnno++; + } + + return $_; +} + +sub unmunge +{ + # Replace escaped symbols with their equivalents. + local $_ = $_[0]; + + s/</E/g; + s/>/E/g; + s/{/\{/g; + s/}/\}/g; + s/&at;/\@/g; + s/&/&/g; + return $_; +} + +sub add_footnote +{ + unless (exists $sects{FOOTNOTES}) { + $sects{FOOTNOTES} = "\n=over 4\n\n"; + } + + $sects{FOOTNOTES} .= "=item $fnno.\n\n"; $fnno++; + $sects{FOOTNOTES} .= $_[0]; + $sects{FOOTNOTES} .= "\n\n"; +} + +# stolen from Symbol.pm +{ + my $genseq = 0; + sub gensym + { + my $name = "GEN" . $genseq++; + my $ref = \*{$name}; + delete $::{$name}; + return $ref; + } +} diff --git a/Build/source/texk/dvipng/draw.c b/Build/source/texk/dvipng/draw.c index 4e91c5f9e93..699fdae9f90 100644 --- a/Build/source/texk/dvipng/draw.c +++ b/Build/source/texk/dvipng/draw.c @@ -284,7 +284,7 @@ void EndVFMacro(void) } -void DrawPage(dviunits hoffset, dviunits voffset) +static void DrawPage(dviunits hoffset, dviunits voffset) /* To be used after having read BOP and will exit cleanly when * encountering EOP. */ diff --git a/Build/source/texk/dvipng/dvi.c b/Build/source/texk/dvipng/dvi.c index 24814dbc3e4..a6dfc20fc51 100644 --- a/Build/source/texk/dvipng/dvi.c +++ b/Build/source/texk/dvipng/dvi.c @@ -56,7 +56,7 @@ static unsigned char fgetc_follow(FILE* fp) return (unsigned char)got; } -void DVIInit(struct dvi_data* dvi) +static void DVIInit(struct dvi_data* dvi) { int k; unsigned char* pre; @@ -277,7 +277,7 @@ uint32_t CommandLength(unsigned char* command) return(length); } -void SkipPage(struct dvi_data* dvi) +static void SkipPage(struct dvi_data* dvi) { /* Skip present page */ unsigned char* command; @@ -307,7 +307,7 @@ void SkipPage(struct dvi_data* dvi) DEBUG_PRINT(DEBUG_DVI,("SKIP CMD:\t%s", dvi_commands[*command])); } -struct page_list* InitPage(struct dvi_data* dvi) +static struct page_list* InitPage(struct dvi_data* dvi) { /* Find page start, return pointer to page_list entry if found */ struct page_list* tpagelistp=NULL; @@ -428,7 +428,7 @@ struct page_list* FindPage(struct dvi_data* dvi, int32_t pagenum, bool abspage) } -void DelPageList(struct dvi_data* dvi) +static void DelPageList(struct dvi_data* dvi) { struct page_list* temp; diff --git a/Build/source/texk/dvipng/dvipng-1.12-patches b/Build/source/texk/dvipng/dvipng-1.12-patches index 084678b57ca..edb933c19e6 100644 --- a/Build/source/texk/dvipng/dvipng-1.12-patches +++ b/Build/source/texk/dvipng/dvipng-1.12-patches @@ -184,3 +184,356 @@ diff -ur dvipng-1.12/tfm.c dvipng/tfm.c # include #endif +Index: color.c +=================================================================== +--- color.c (revision 13607) ++++ color.c (working copy) +@@ -54,7 +54,7 @@ + cstack[1].blue=0; + } + +-struct colorname * NewColor(char* prefix, int nprefix, ++static struct colorname * NewColor(char* prefix, int nprefix, + char* name, int nname, + char* model, int nmodel, + char* values, int nvalues) +@@ -92,7 +92,7 @@ + #define FINDPSNAMEEND(s,n) n=0; while(stype) { + case FONT_TYPE_PK: +Index: fontmap.c +=================================================================== +--- fontmap.c (revision 13607) ++++ fontmap.c (working copy) +@@ -30,7 +30,7 @@ + #endif + static struct psfontmap *psfontmap=NULL; + +-char* newword(char** buffer, char* end) ++static char* newword(char** buffer, char* end) + { + char *word,*pos=*buffer; + +@@ -55,7 +55,7 @@ + return(word); + } + +-char* find_format(char* name) ++static char* find_format(char* name) + { + /* Cater for both new (first case) and old (second case) kpathsea */ + char* format = +@@ -134,7 +134,7 @@ + return(newentry); + } + +-struct psfontmap *SearchPSFontMap(char* fontname, ++static struct psfontmap *SearchPSFontMap(char* fontname, + struct filemmap* search_mmap) + { + static char *pos=NULL,*end=NULL; +@@ -196,7 +196,7 @@ + #endif + } + +-void ReadPSFontMap(struct psfontmap *entry) ++static void ReadPSFontMap(struct psfontmap *entry) + { + char *pos,*end,*psname; + int nameno = 0; +Index: ft.c +=================================================================== +--- ft.c (revision 13607) ++++ ft.c (working copy) +@@ -145,7 +145,7 @@ + } + + +-void UnLoadFT(struct char_entry *ptr) ++static void UnLoadFT(struct char_entry *ptr) + { + if (ptr->data!=NULL) + free(ptr->data); +Index: papersiz.c +=================================================================== +--- papersiz.c (revision 13607) ++++ papersiz.c (working copy) +@@ -36,7 +36,7 @@ + * Advance the passed pointer as well. + */ + +-int32_t myatodim(char ** p) ++static int32_t myatodim(char ** p) + { + double tmp; /* double accuracy is enough, I think */ + int i=0; +Index: pk.c +=================================================================== +--- pk.c (revision 13607) ++++ pk.c (working copy) +@@ -35,7 +35,7 @@ + int repeatcount; + int poshalf; + +-unsigned char getnyb(unsigned char** pos) ++static unsigned char getnyb(unsigned char** pos) + { + if (poshalf == 0) { + poshalf=1; +@@ -46,7 +46,7 @@ + } + } + +-uint32_t pk_packed_num(unsigned char** pos) ++static uint32_t pk_packed_num(unsigned char** pos) + { + register int i; + uint32_t j; +@@ -77,7 +77,7 @@ + } + } + +-unsigned char* skip_specials(unsigned char* pos) ++static unsigned char* skip_specials(unsigned char* pos) + { + uint32_t i; + +@@ -384,7 +384,7 @@ + } + } + +-void UnLoadPK(struct char_entry *ptr) ++static void UnLoadPK(struct char_entry *ptr) + { + if (ptr->data!=NULL) + free(ptr->data); +Index: ppagelist.c +=================================================================== +--- ppagelist.c (revision 13607) ++++ ppagelist.c (working copy) +@@ -107,7 +107,7 @@ + return(false); + } + +-void ListPage(int32_t pslow, int32_t pshigh) ++static void ListPage(int32_t pslow, int32_t pshigh) + { + register struct pp_list *pl; + +Index: set.c +=================================================================== +--- set.c (revision 13607) ++++ set.c (working copy) +@@ -84,7 +84,7 @@ + } + + +-void ChangeColor(gdImagePtr imagep,int x1,int y1, ++static void ChangeColor(gdImagePtr imagep,int x1,int y1, + int x2,int y2,int color1,int color2) + /* In the given rectangle, change color1 to color2 */ + { +Index: sfd.c +=================================================================== +--- sfd.c (revision 13607) ++++ sfd.c (working copy) +@@ -25,7 +25,7 @@ + #include "dvipng.h" + struct subfont* subfontp=NULL; + +-struct subfont* ReadSubfont(char* sfdname, char *infix) ++static struct subfont* ReadSubfont(char* sfdname, char *infix) + { + char *pos,*max,*sfdfile=NULL; + struct subfont* sfdp=NULL; +Index: special.c +=================================================================== +--- special.c (revision 13607) ++++ special.c (working copy) +@@ -40,7 +40,7 @@ + + struct pscode* psheaderp=NULL; /* static, DVI-specific header list */ + +-void PSCodeInit(struct pscode *entry, char *special) ++static void PSCodeInit(struct pscode *entry, char *special) + { + entry->next=NULL; + entry->special=special; +@@ -91,7 +91,7 @@ + } + } + +-void writepscode(struct pscode* pscodep, FILE* psstream) ++static void writepscode(struct pscode* pscodep, FILE* psstream) + { + while (pscodep!=NULL) { + if (pscodep->code!=NULL) { +@@ -131,7 +131,7 @@ + } + + +-gdImagePtr ++static gdImagePtr + ps2png(struct pscode* pscodep, char *device, int hresolution, int vresolution, + int llx, int lly, int urx, int ury, int bgred, int bggreen, int bgblue) + { +@@ -274,7 +274,7 @@ + return psimage; + } + +-gdImagePtr ++static gdImagePtr + rescale(gdImagePtr psimage, int pngwidth, int pngheight) + { + gdImagePtr scaledimage=psimage; +@@ -305,7 +305,7 @@ + return(scaledimage); + } + +-void newpsheader(char* special) { ++static void newpsheader(char* special) { + struct pscode* tmp; + char* txt; + +Index: t1.c +=================================================================== +--- t1.c (revision 13607) ++++ t1.c (working copy) +@@ -164,7 +164,7 @@ + } + + +-void UnLoadT1(struct char_entry *ptr) ++static void UnLoadT1(struct char_entry *ptr) + { + if (ptr->data!=NULL) + free(ptr->data); diff --git a/Build/source/texk/dvipng/dvipng.1 b/Build/source/texk/dvipng/dvipng.1 deleted file mode 100644 index 7bc3889a947..00000000000 --- a/Build/source/texk/dvipng/dvipng.1 +++ /dev/null @@ -1,508 +0,0 @@ -.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sh \" Subsection heading -.br -.if t .Sp -.ne 5 -.PP -\fB\\$1\fR -.PP -.. -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.ie \nF \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. nr % 0 -. rr F -.\} -.el \{\ -. de IX -.. -.\} -.\" -.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). -.\" Fear. Run. Save yourself. No user-serviceable parts. -. \" fudge factors for nroff and troff -.if n \{\ -. ds #H 0 -. ds #V .8m -. ds #F .3m -. ds #[ \f1 -. ds #] \fP -.\} -.if t \{\ -. ds #H ((1u-(\\\\n(.fu%2u))*.13m) -. ds #V .6m -. ds #F 0 -. ds #[ \& -. ds #] \& -.\} -. \" simple accents for nroff and troff -.if n \{\ -. ds ' \& -. ds ` \& -. ds ^ \& -. ds , \& -. ds ~ ~ -. ds / -.\} -.if t \{\ -. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" -. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' -. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' -. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' -. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' -. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' -.\} -. \" troff and (daisy-wheel) nroff accents -.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' -.ds 8 \h'\*(#H'\(*b\h'-\*(#H' -.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] -.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' -.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' -.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] -.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] -.ds ae a\h'-(\w'a'u*4/10)'e -.ds Ae A\h'-(\w'A'u*4/10)'E -. \" corrections for vroff -.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' -. \" for low resolution devices (crt and lpr) -.if \n(.H>23 .if \n(.V>19 \ -\{\ -. ds : e -. ds 8 ss -. ds o a -. ds d- d\h'-1'\(ga -. ds D- D\h'-1'\(hy -. ds th \o'bp' -. ds Th \o'LP' -. ds ae ae -. ds Ae AE -.\} -.rm #[ #] #H #V #F C -.\" ======================================================================== -.\" -.IX Title "DVIPNG 1" -.TH DVIPNG 1 "2009-02-23" "dvipng 1.12" "User commands" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NAME" -dvipng \- A DVI\-to\-PNG translator -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -dvipng [options] filename -.PP -dvipng [options] [filename] \- -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -This program makes \s-1PNG\s0 and/or \s-1GIF\s0 graphics from \s-1DVI\s0 files as obtained -from TeX and its relatives. -.PP -If \s-1GIF\s0 support is enabled, \s-1GIF\s0 output is chosen by using the -\&\fBdvigif\fR binary or with the \fB\-\-gif\fR option. -.PP -The benefits of \fBdvipng\fR/\fBdvigif\fR include -.IP "\(bu" 4 -Speed. It is a very fast bitmap-rendering code for \s-1DVI\s0 files, which -makes it suitable for generating large amounts of images on-the-fly, -as needed in preview-latex, WeBWorK and others. -.IP "\(bu" 4 -It does not read the postamble, so it can be started before TeX -finishes. There is a \fB\-\-follow\fR switch that makes dvipng wait at -end-of-file for further output, unless it finds the \s-1POST\s0 marker that -indicates the end of the \s-1DVI\s0. -.IP "\(bu" 4 -Interactive query of options. dvipng can read options interactively -through stdin, and all options are usable. It is even possible to change -the input file through this interface. -.IP "\(bu" 4 -Supports \s-1PK\s0, \s-1VF\s0, PostScript Type1, and TrueType fonts, subfonts (i.e., -as used in CJK-LaTeX), color specials, and inclusion of PostScript, -\&\s-1PNG\s0, \s-1JPEG\s0 or \s-1GIF\s0 images. -.IP "\(bu" 4 -and more... -.SH "OPTIONS" -.IX Header "OPTIONS" -Many of the parameterless options listed here can be turned off by -suffixing the option with a zero (\fB0\fR); for instance, to turn off -page reversal, use \fB\-r0\fR. Such options are marked with a trailing -\&\fB*\fR. -.IP "\fB\-\fR" 4 -.IX Item "-" -Read additional options from standard input after processing the command -line. -.IP "\fB\-\-help\fR" 4 -.IX Item "--help" -Print a usage message and exit. -.IP "\fB\-\-version\fR" 4 -.IX Item "--version" -Print the version number and exit. -.IP "\fB\-bd\fR \fInum\fR" 4 -.IX Item "-bd num" -.PD 0 -.IP "\fB\-bd\fR \fIcolor_spec\fR" 4 -.IX Item "-bd color_spec" -.IP "\fB\-bd '\fR\fInum\fR\fB \fR\fIcolor_spec\fR\fB'\fR" 4 -.IX Item "-bd 'num color_spec'" -.PD -Set the pixel width of the transparent border (default 0). Using this -option will make the image edges transparent, but it only affects pixels -with the background color. Giving a \fIcolor_spec\fR will set the -fallback color, to be used in viewers that cannot handle transparency -(the default is the background color). The color spec should be in -TeX color \especial syntax, e.g., 'rgb 1.0 0.0 0.0'. Setting the -fallback color makes the default border width 1 px. -.IP "\fB\-\-bdpi\fR \fInum\fR" 4 -.IX Item "--bdpi num" -Set the base (Metafont) resolution, both horizontal and vertical, to -\&\fInum\fR dpi (dots per inch). This option is necessary when manually -selecting Metafont mode with the \-\-mode option (see below). -.IP "\fB\-bg\fR \fIcolor_spec\fR" 4 -.IX Item "-bg color_spec" -Choose background color for the images. This option will be ignored if -there is a background color \especial in the \s-1DVI\s0. The color spec should -be in TeX color \especial syntax, e.g., 'rgb 1.0 0.0 0.0'. You can -also specify 'Transparent' or 'transparent' which will give you a -transparent background with the normal background as a fallback color. A -capitalized 'Transparent' will give a full-alpha transparency, while an -all-lowercase 'transparent' will give a simple fully transparent -background with non-transparent antialiased pixels. The latter would be -suitable for viewers who cannot cope with a true alpha channel. \s-1GIF\s0 -images do not support full alpha transparency, so in case of \s-1GIF\s0 output, -both variants will use the latter behaviour. -.IP "\fB\-d\fR \fInum\fR" 4 -.IX Item "-d num" -Set the debug flags, showing what dvipng (thinks it) is doing. This will -work unless dvipng has been compiled without the \f(CW\*(C`DEBUG\*(C'\fR option -(not recommended). Set the flags as you need them, use \fB\-d \-1\fR as -the first option for maximum output. -.IP "\fB\-D\fR \fInum\fR" 4 -.IX Item "-D num" -Set the output resolution, both horizontal and vertical, to \fInum\fR -dpi (dots per inch). -.Sp -One may want to adjust this to fit a certain text font size (e.g., on -a web page), and for a text font height of \fIfont_px\fR pixels (in -Mozilla) the correct formula is -.Sp -.Vb 1 -\& = * 72.27 / 10 [px * TeXpt/in / TeXpt] -.Ve -.Sp -The last division by ten is due to the standard font height 10pt in -your document, if you use 12pt, divide by 12. Unfortunately, some -proprietary browsers have font height in pt (points), not pixels. You -have to rescale that to pixels, using the screen resolution (default -is usually 96 dpi) which means the formula is -.Sp -.Vb 1 -\& = * 96 / 72 [pt * px/in / (pt/in)] -.Ve -.Sp -On some high-res screens, the value is instead 120 dpi. Good luck! -.IP "\fB\-\-depth*\fR" 4 -.IX Item "--depth*" -Report the depth of the image. This only works reliably when the -LaTeX style \fIpreview.sty\fR from preview-latex is used with -the \fBactive\fR option. It reports the number of pixels from the -bottom of the image to the baseline of the image. This can be used for -vertical positioning of the image in, e.g., web documents, where one -would use (Cascading StyleSheets 1) -.Sp -.Vb 1 -\& -.Ve -.Sp -The depth is a negative offset in this case, so the minus sign is -necessary, and the unit is pixels (px). -.IP "\fB\-\-dvinum*\fR" 4 -.IX Item "--dvinum*" -Set this option to make the output page number be the TeX page -numbers rather than the physical page number. See the \fB\-o\fR switch. -.IP "\fB\-fg\fR \fIcolor_spec\fR" 4 -.IX Item "-fg color_spec" -Choose foreground color for the images. This option will be ignored if -there is a foreground color \especial in the \s-1DVI\s0. The color spec should -be in TeX color \especial syntax, e.g., 'rgb 1.0 0.0 0.0'. -.IP "\fB\-\-follow*\fR" 4 -.IX Item "--follow*" -Wait for data at end-of-file. One of the benefits of dvipng is that it -does not read the postamble, so it can be started before TeX -finishes. This switch makes dvipng wait at end-of-file for further -output, unless it finds the \s-1POST\s0 marker that indicates the end of the -\&\s-1DVI\s0. This is similar to \fBtail \-f\fR but for DVI-to-PNG conversion. -.IP "\fB\-\-freetype*\fR" 4 -.IX Item "--freetype*" -Enable/disable FreeType font rendering (default on). This option is -available if the FreeType2 font library was present at compilation time. -If this is the case, dvipng will have direct support for PostScript -Type1 and TrueType fonts internally, rather than using \fBgsftopk\fR -for rendering the fonts. If you have PostScript versions of Computer -Modern installed, there will be no need to generate bitmapped variants -on disk of these. Then, you can render images at different (and unusual) -resolutions without cluttering the disk with lots of bitmapped fonts. -Note that if you have both FreeType and T1lib on your system, FreeType -will be preferred by dvipng. If you for some reason would want to use -T1lib rendering, use this option. -.IP "\fB\-\-gamma\fR \fInum\fR" 4 -.IX Item "--gamma num" -Control the interpolation of colors in the greyscale anti-aliasing -color palette. Default value is 1.0. For 0 < \fInum\fR < 1, the -fonts will be lighter (more like the background), and for \fInum\fR > -1, the fonts will be darker (more like the foreground). -.IP "\fB\-\-gif*\fR" 4 -.IX Item "--gif*" -The images are output in the \s-1GIF\s0 format, if \s-1GIF\s0 support is enabled. -This is the default for the \fBdvigif\fR binary, which only will be -available when \s-1GIF\s0 support is enabled. \s-1GIF\s0 images are palette images -(see the \fB\-\-palette\fR option) and does not support true alpha -channels (see the \fB\-\-bg\fR option). See also the \fB\-\-png\fR -option. -.IP "\fB\-\-height*\fR" 4 -.IX Item "--height*" -Report the height of the image. This only works reliably when the -LaTeX style \fIpreview.sty\fR from preview-latex is used with -the \fBactive\fR option. It reports the number of pixels from the top -of the image to the baseline of the image. The total height of the -image is obtained as the sum of the values reported from -\&\fB\-\-height\fR and \fB\-\-depth\fR. -.IP "\fB\-l [=]\fR\fInum\fR" 4 -.IX Item "-l [=]num" -The last page printed will be the first one numbered \fInum\fR. Default -is the last page in the document. If \fInum\fR is prefixed by an equals -sign, then it (and the argument to the \fB\-p\fR option, if specified) -is treated as a physical (absolute) page number, rather than a value to -compare with the TeX \fB\ecount0\fR values stored in the \s-1DVI\s0 file. -Thus, using \fB\-l =9\fR will end with the ninth page of the document, -no matter what the pages are actually numbered. -.IP "\fB\-\-mode\fR \fImode\fR" 4 -.IX Item "--mode mode" -Use \fImode\fR as the Metafont device name for the \s-1PK\s0 fonts (both for -path searching and font generation). This needs to be augmented with the -base device resolution, given with the \fB\-\-bdpi\fR option. See the -file <\fBftp://ftp.tug.org/tex/modes.mf\fR> for a list of resolutions and -mode names for most devices. -.IP "\fB\-M*\fR" 4 -.IX Item "-M*" -Turns off automatic \s-1PK\s0 font generation (\fImktexpk\fR). This will have -no effect when using PostScript fonts, since no \s-1PK\s0 font generation will -be done anyway. -.IP "\fB\-\-noghostscript*\fR" 4 -.IX Item "--noghostscript*" -This switch prohibits the internal call to GhostScript for displaying -PostScript specials. \fB\-\-noghostscript0\fR turns the call back on. -.IP "\fB\-\-nogssafer*\fR" 4 -.IX Item "--nogssafer*" -Normally, if GhostScript is used to render PostScript specials, the -GhostScript interpreter is run with the option \fB\-dSAFER\fR. The -\&\fB\-\-nogssafer\fR option runs GhostScript without \fB\-dSAFER\fR. The -\&\fB\-dSAFER\fR option in Ghostscript disables PostScript operators such -as deletefile, to prevent possibly malicious PostScript programs from -having any effect. -.IP "\fB\-o\fR \fIname\fR" 4 -.IX Item "-o name" -Send output to the file \fIname\fR. A single occurrence of \fB\f(CB%d\fB\fR or -\&\fB\f(CB%01d\fB\fR, ..., \fB\f(CB%09d\fB\fR will be exchanged for the physical -page number (this can be changed, see the \fB\-\-dvinum\fR switch). The -default output filename is \fIfile\fR\fB\f(CB%d\fB.png\fR where the input \s-1DVI\s0 -file was \fIfile\fR\fB.dvi\fR. -.IP "\fB\-O\fR \fIx\-offset\fR\fB,\fR\fIy\-offset\fR" 4 -.IX Item "-O x-offset,y-offset" -Move the origin by \fIx\-offset\fR,\fIy\-offset\fR, a comma-separated -pair of dimensions such as \fB.1in,\-.3cm\fR. -The origin of the page is shifted from the default position -(of one inch down, one inch to the right from the upper left corner of -the paper) by this amount. -.IP "\fB\-p [=]\fR\fInum\fR" 4 -.IX Item "-p [=]num" -The first page printed will be the first one numbered \fInum\fR. Default -is the first page in the document. If \fInum\fR is prefixed by an -equals sign, then it (and the argument to the \fB\-l\fR option, if -specified) is treated as a physical (absolute) page number, rather than -a value to compare with the TeX \fB\ecount0\fR values stored in the -\&\s-1DVI\s0 file. Thus, using \fB\-p =3\fR will start with the third page of -the document, no matter what the pages are actually numbered. -.IP "\fB\-\-palette*\fR" 4 -.IX Item "--palette*" -Starting from \fBdvipng\fR 1.8, the output \s-1PNG\s0 will be a truecolor -png when an external image is included, to avoid unnecessary delay and -quality reduction, and enable the \s-1EPS\s0 translator to draw on a -transparent background and outside of the boundingbox. This switch -will force palette (256\-color) output and make \fBdvipng\fR revert to -the old behaviour, where included images were opaque and always -clipped to the boundingbox. This will also override the -\&\fB\-\-truecolor\fR switch if present. -.IP "\fB\-\-picky*\fR" 4 -.IX Item "--picky*" -No images are output when a warning occurs. Normally, dvipng will -output an image in spite of a warning, but there may be something -missing in this image. One reason to use this option would be if you -have a more complete but slower fallback converter. Mainly, this is -useful for failed figure inclusion and unknown \especial occurrences, -but warnings will also occur for missing or unknown color specs and -missing \s-1PK\s0 fonts. -.IP "\fB\-\-png*\fR" 4 -.IX Item "--png*" -The images are output in the \s-1PNG\s0 format. This is the default for the -\&\fBdvipng\fR binary. See also the \fB\-\-gif\fR option. -.IP "\fB\-pp\fR \fIfirstpage\fR\fB\-\fR\fIlastpage\fR" 4 -.IX Item "-pp firstpage-lastpage" -Print pages \fIfirstpage\fR through \fIlastpage\fR; but not quite -equivalent to \fB\-p\fR \fIfirstpage\fR \fB\-l\fR \fIlastpage\fR. For example, -when rendering a book, there may be several instances of a page in the -\&\s-1DVI\s0 file (one in \f(CW\*(C`\efrontmatter\*(C'\fR, one in \f(CW\*(C`\emainmatter\*(C'\fR, and one -in \f(CW\*(C`\ebackmatter\*(C'\fR). In case of several pages matching, \fB\-pp\fR -\&\fIfirstpage\fR\fB\-\fR\fIlastpage\fR will render \fIall\fR pages that -matches the specified range, while \fB\-p\fR \fIfirstpage\fR \fB\-l\fR -\&\fIlastpage\fR will render the pages from the \fIfirst\fR occurrence -of \fIfirstpage\fR to the \fIfirst\fR occurrence of \fIlastpage\fR. -This is the (undocumented) behaviour of dvips. In dvipng you can give -both kinds of options, in which case you get all pages that matches the -range in \fB\-pp\fR between the pages from \fB\-p\fR to \fB\-l\fR. Also -multiple \fB\-pp\fR options accumulate, unlike \fB\-p\fR and \fB\-l\fR. -The \fB\-\fR separator can also be \fB:\fR. Note that \fB\-pp \-1\fR -will be interpreted as \*(L"all pages up to and including 1\*(R", if you want a -page numbered \-1 (only the table of contents, say) put \fB\-pp \-1\-\-1\fR, -or more readable, \fB\-pp \-1:\-1\fR. -.IP "\fB\-q*\fR" 4 -.IX Item "-q*" -Run quietly. Don't chatter about pages converted, etc. to standard -output; report no warnings (only errors) to standard error. -.IP "\fB\-Q\fR \fInum\fR" 4 -.IX Item "-Q num" -Set the quality to \fInum\fR. That is, choose the number of antialiasing -levels for \s-1PK\s0 and T1lib rendering to be \fInum\fR*\fInum\fR+1. The default -value is 4 which gives 17 levels of antialiasing for antialiased fonts -from these two. If FreeType is available, its rendering is unaffected by -this option. -.IP "\fB\-r*\fR" 4 -.IX Item "-r*" -Toggle output of pages in reverse/forward order. By default, the first -page in the \s-1DVI\s0 is output first. -.IP "\fB\-\-strict*\fR" 4 -.IX Item "--strict*" -The program exits when a warning occurs. Normally, dvipng will output -an image in spite of a warning, but there may be something missing in -this image. One reason to use this option would be if you have a more -complete but slower fallback converter. See the \fB\-\-picky\fR option -above for a list of when warnings occur. -.IP "\fB\-T\fR \fIimage_size\fR" 4 -.IX Item "-T image_size" -Set the image size to \fIimage_size\fR which can be either of -\&\fBbbox\fR, \fBtight\fR, or a comma-separated pair of dimensions -\&\fIhsize\fR,\fIvsize\fR such as \fB.1in,.3cm\fR. The default is -\&\fBbbox\fR which produces a \s-1PNG\s0 that includes all ink put on the page -and in addition the \s-1DVI\s0 origin, located 1in from the top and 1in from -the left edge of the paper. This usually gives whitespace above and to -the left in the produced image. The value \fBtight\fR will make dvipng -only include all ink put on the page, producing neat images. -.IP "\fB\-\-t1lib*\fR" 4 -.IX Item "--t1lib*" -Enable/disable T1lib font rendering (default on). This option is -available if the T1lib font library was present at compilation time. If -this is the case, dvipng will have direct support for PostScript Type1 -fonts internally, rather than using \fBgsftopk\fR for rendering the -fonts. If you have PostScript versions of Computer Modern installed, -there will be no need to generate bitmapped variants on disk of these. -Then, you can render images at different (and unusual) resolutions -without cluttering the disk with lots of bitmapped fonts. Note that if -you have both FreeType and T1lib on your system FreeType will be -preferred by dvipng, and if you for some reason rather want to use -T1lib, give the option \fB\-\-freetype0\fR (see above). -.IP "\fB\-\-truecolor*\fR" 4 -.IX Item "--truecolor*" -This will make \fBdvipng\fR generate truecolor output. Note that -truecolor output is automatic if you include an external image in your -\&\s-1DVI\s0, e.g., via a PostScript special (i.e., the \fBgraphics\fR or -\&\fBgraphicx\fR package). This switch is overridden by the -\&\fB\-\-palette\fR switch. -.IP "\fB\-v*\fR" 4 -.IX Item "-v*" -Enable verbose operation. This will currently indicate what fonts is -used, in addition to the usual output. -.IP "\fB\-x\fR \fInum\fR" 4 -.IX Item "-x num" -Set the x magnification ratio to \fInum\fR/1000. Overrides -the magnification specified in the \s-1DVI\s0 file. Must be between 10 and -100000. It is recommended that you use standard magstep values (1095, -1200, 1440, 1728, 2074, 2488, 2986, and so on) to help reduce the total -number of \s-1PK\s0 files generated. \fInum\fR may be a real number, not an -integer, for increased precision. -.IP "\fB\-z\fR \fInum\fR" 4 -.IX Item "-z num" -Set the \s-1PNG\s0 compression level to \fInum\fR. This option is enabled if -your \fBlibgd\fR is new enough. The default compression level is 1, -which selects maximum speed at the price of slightly larger PNGs. For an -older \fBlibgd\fR, the hard-soldered value 5 is used. The include file -\&\fBpng.h\fR says -\&\*(L"Currently, valid values range from 0 \- 9, corresponding directly to -the zlib compression levels 0 \- 9 (0 \- no compression, 9 \- \*(R"maximal\*(L" -compression). Note that tests have shown that zlib compression levels -3\-6 usually perform as well as level 9 for \s-1PNG\s0 images, and do -considerably fewer calculations. In the future, these values may not -correspond directly to the zlib compression levels.\*(R" -.SH "NOTES" -.IX Header "NOTES" -The full manual is accessible in the info format, on most systems by typing -.PP -.Vb 1 -\& info dvipng -.Ve -.SH "COPYRIGHT" -.IX Header "COPYRIGHT" -This program is released under the \s-1GNU\s0 Lesser General Public License -version 3, see the \s-1COPYING\s0 file in the dvipng distribution or -<\fBhttp://www.gnu.org/licenses/gpl.html\fR>. -.PP -Copyright (c) 2002\-2008 Jan-AAke Larsson diff --git a/Build/source/texk/dvipng/dvipng.help b/Build/source/texk/dvipng/dvipng.help deleted file mode 100644 index ea97f477526..00000000000 --- a/Build/source/texk/dvipng/dvipng.help +++ /dev/null @@ -1,42 +0,0 @@ -This is ./dvipng 1.11 Copyright 2002-2008 Jan-Ake Larsson - -Usage: ./dvipng [OPTION]... FILENAME[.dvi] -Options are chosen to be similar to dvips' options where possible: - -d # Debug (# is the debug bitmap, 1 if not given) - -D # Output resolution - -l # Last page to be output - -o f Output file, '%d' is pagenumber - -O c Image offset - -p # First page to be output - -pp #,#.. Page list to be output - -q* Quiet operation - -T c Image size (also accepts '-T bbox' and '-T tight') - -v* Verbose operation - - Interactive query of options - -These do not correspond to dvips options: - -bd # Transparent border width in dots - -bd s Transparent border fallback color (TeX-style color) - -bg s Background color (TeX-style color or 'Transparent') - --depth* Output the image depth on stdout - --dvinum* Use TeX page numbers in output filenames - -fg s Foreground color (TeX-style color) - --follow* Wait for data at end-of-file - --freetype* FreeType font rendering (default on) - --gamma # Control color interpolation - --gif Output GIF images (dvigif default) - --height* Output the image height on stdout - --noghostscript* Don't use ghostscript for PostScript specials - --nogssafer* Don't use -dSAFER in ghostscript calls - --palette* Force palette output - --picky When a warning occurs, don't output image - --png Output PNG images (dvipng default) - --strict When a warning occurs, exit - --t1lib* T1lib font rendering (default on) - --truecolor* Truecolor output - -Q # Quality (T1lib and PK subsampling) - -z # PNG compression level - - # = number f = file s = string * = suffix, '0' to turn off - c = comma-separated dimension pair (e.g., 3.2in,-32.1cm) - diff --git a/Build/source/texk/dvipng/dvipng.info b/Build/source/texk/dvipng/dvipng.info deleted file mode 100644 index 731713a7518..00000000000 --- a/Build/source/texk/dvipng/dvipng.info +++ /dev/null @@ -1,1083 +0,0 @@ -This is dvipng.info, produced by makeinfo version 4.12 from dvipng.texi. - -INFO-DIR-SECTION TeX -START-INFO-DIR-ENTRY -* DVI-to-PNG: (dvipng). Translating TeX DVI files to Portable Network Graphics (PNG). -* dvipng: (dvipng). A DVI-to-PNG translator. -END-INFO-DIR-ENTRY - - -File: dvipng.info, Node: Top, Next: Introduction, Up: (dir) - -dvipng -****** - -This manual documents dvipng, a program to translate a DVI (DeVice -Independent) file into PNG (Portable Network Graphics). - - This file documents dvipng version 1.12 - - Corrections or perhaps rewrites of sections are _very welcome_. - - Jan-AAke Larsson - -* Menu: - -* Introduction:: Introduction -* Installation:: How to compile and install dvipng -* Basic usage:: First things first -* Command-line options:: Advanced usage -* Graphics:: Including PostScript and/or bitmaps -* Color:: Using color with dvipng -* Diagnosing problems:: Problems? -* Credits:: People who have contributed -* Copying:: GNU Lesser General Public License -* Index:: General index - - -File: dvipng.info, Node: Introduction, Next: Installation, Prev: Top, Up: Top - -1 Introduction -************** - -This program makes PNG and/or GIF graphics from DVI files as obtained -from TeX and its relatives. - - If GIF support is enabled, GIF output is chosen by using the -`dvigif' binary or with the `--gif' option. - - It is intended to produce anti-aliased screen-resolution images as -fast as is possible. The target audience is people who need to generate -and regenerate many images again and again. The primary target is the -preview-latex (X)Emacs package, a package to preview formulas from -within (X)Emacs. Yes, you get to see your formulas in the (X)Emacs -buffer, see `http://www.gnu.org/software/auctex/preview-latex.html'. - - Another example is WeBWorK, an internet-based method for delivering -homework problems to students over the internet, giving students -instant feedback as to whether or not their answers are correct, see -`http://webwork.math.rochester.edu'. - - A more recent addition to the dvipng-using applications out there is -MediaWiki, the software behind Wikipedia and many other wikis out -there. Dvipng is used to render mathematical formulae from version -1.8.0 of MediaWiki, see `http://www.mediawiki.org'. - - Other applications may also benefit, like web applications as -latex2html and WYSIWYG editors like LyX. - - The benefits of `dvipng'/`dvigif' include - - * Speed. It is a very fast bitmap-rendering code for DVI files, which - makes it suitable for generating large amounts of images - on-the-fly, as needed in preview-latex, WeBWorK and others. - - * It does not read the postamble, so it can be started before TeX - finishes. There is a `--follow' switch that makes dvipng wait at - end-of-file for further output, unless it finds the POST marker - that indicates the end of the DVI. - - * Interactive query of options. dvipng can read options interactively - through stdin, and all options are usable. It is even possible to - change the input file through this interface. - - * Supports PK, VF, PostScript Type1, and TrueType fonts, subfonts - (i.e., as used in CJK-LaTeX), color specials, and inclusion of - PostScript, PNG, JPEG or GIF images. - - * and more... - - - -File: dvipng.info, Node: Installation, Next: Basic usage, Prev: Introduction, Up: Top - -2 Installation -************** - -Installing dvipng should be simple: merely `./configure', `make', and -`make install'. - -* Menu: - -* Prerequisites:: -* Configure:: -* Build/install:: -* Installation outside the texmf tree:: -* Advice for non-privileged users:: - - -File: dvipng.info, Node: Prerequisites, Next: Configure, Up: Installation - -2.1 Prerequisites -================= - - * The GD Graphics Draw library, libgd - - The drawing library `libgd' is necessary, and is downloadable at - `http://www.boutell.com/gd', and there are binary packages for - most operating systems from their respective distributors. In any - case, the latest version of the library installs using `autoconf' - so it should not be difficult for you to install it from source, - and then proceed with installing dvipng. - - * The path-searching library kpathsea - - Kpathsea is most likely included in your LaTeX installation, but it - may happen that ./configure does not find it; see below. If you do - not have it, download it from `http://www.ctan.org' and compile it. - I have no experience with this, so I cannot help much here. - - * The font-rendering library FreeType 2 - - While not strictly necessary, a recent FreeType 2 is recommended - since dvipng currently will produce better-quality images when - this library is available. To take advantage of this, you should - have at least FreeType 2.1.9. - - FreeType 2 will enable direct support for PostScript and TrueType - fonts, so that dvipng will not need to generate bitmapped variants - on disk of the TeX fonts since modern TeX distributions include - PostScript versions of them. Then, you can render images at - different (and unusual) resolutions without cluttering the disk - with lots of bitmapped fonts. - - Finally, it will enable subfont support in dvipng. That is, if you - want to render CJK-LaTeX characters, you must have FreeType 2 - installed. - - * The font-rendering library T1lib - - An alternative to FreeType 2 is T1lib, but this will enable only - PostScript fonts in dvipng and will not include subfont support. - Also here, you can render images at different (and unusual) - resolutions without cluttering the disk with lots of bitmapped - fonts. If both FreeType 2 and T1lib are present, FreeType will be - internally preferred by dvipng but T1lib can be chosen at runtime. - - * libpng and libz - - To be able to compress and write PNG files to disk, dvipng (or - really libgd) uses libpng which in turn uses libz. These should be - available on any modern system, if not, download them and install - them. - - * The `texinfo' package - - This is needed for building the documentation. - - -File: dvipng.info, Node: Configure, Next: Build/install, Prev: Prerequisites, Up: Installation - -2.2 Configure -============= - -The first step is to configure the source code, telling it where -various files will be. To do so, run - - ./configure OPTIONS - - (Note: if you have fetched dvipng from CVS rather than a regular -release, you will have to first generate `./configure' by running -`autoconf' 2.53 or later.) - - On many machines, you will not need to specify any options, but if -`configure' cannot determine something on its own, you'll need to help -it out. For a list of the options type - - ./configure --help - - On some machines, the libraries will be installed in directories that -are not in the linker's search path. This will generate an error when -running `./configure', indicating that it cannot find libgd or -libkpathsea (most likely). You then need to specify the path to the -respective library's object files. They are typically called e.g., -`libgd.a' or `libgd.so'. If they are located in e.g., `/sw/local/lib', -do - - ./configure LDFLAGS=-L/sw/local/lib - - If the library is available as a shared object file (`.so'), the -runtime linker may also need to be told where to find the library, then -use - - ./configure LDFLAGS='-L/sw/local/lib -R/sw/local/lib' - - When either of these is necessary, it is likely that the C header -files are also installed in directories that are not in the C -preprocessor's search path. This will also generate an error when -running `./configure', indicating that it cannot find e.g., `gd.h' or -`kpathsea.h' (most likely). You then need to specify the path to the -respective library's C header files. If they are located in e.g., -`/sw/local/include', do - - ./configure CPPFLAGS=-I/sw/local/include - - On my SUN Solaris workstation, I had to combine this into - - ./configure CPPFLAGS='-I/sw/local/include -I/sw/tex/teTeX/1.0/include'\ - LDFLAGS='-L/sw/local/lib -R/sw/local/lib -L/sw/tex/teTeX/1.0/lib/' - -where the backslash denotes a continuation of the line. - - -File: dvipng.info, Node: Build/install, Next: Installation outside the texmf tree, Prev: Configure, Up: Installation - -2.3 Build/install -================= - -Once `configure' has been run, simply enter - - make - -at the prompt to compile the C code, and build the documentation files. -To install the files into the locations chosen earlier, type - - make install - -You may need special privileges to install, e.g., if you are installing -into system directories. - - -File: dvipng.info, Node: Installation outside the texmf tree, Next: Advice for non-privileged users, Prev: Build/install, Up: Installation - -2.4 Installation outside the texmf tree -======================================= - -In some cases, a dvipng binary installed outside the texmf tree will -not be able to find virtual fonts, or the PostScript font maps -(normally used by dvips). This may be because _only_ $SELFAUTOLOC, -$SELFAUTODIR, and $SELFAUTOPARENT are used in the texmf tree -configuration file `texmf.cnf'. If so, give the switch -`--enable-selfauto-set' to `./configure'. This will make dvipng adjust -these three internally so that kpathsea thinks that dvipng _is_ -installed in the texmf tree. - - -File: dvipng.info, Node: Advice for non-privileged users, Prev: Installation outside the texmf tree, Up: Installation - -2.5 Installation for non-privileged users -========================================= - -Often people without system administration privileges want to install -software for their private use. In that case you need to specify more -options to the `configure' script, usually this is done by using the -`--prefix' option to the `configure' script, and let it point to the -personal home directory. In that way, resulting binaries will be -installed under the `bin' subdirectory of your home directory, manual -pages under `man' and so on. That way, it is reasonably easy to -maintain a bunch of additional packages, since the prefix argument is -supported by most `configure' scripts. - - You'll have to add something like `/home/myself/bin' to your `PATH' -shell variable, if it isn't there already, and similarly set the -`INFOPATH' and `MANPATH' variables to be able to access the -documentation. - - -File: dvipng.info, Node: Basic usage, Next: Command-line options, Prev: Installation, Up: Top - -3 Basic usage of dvipng -*********************** - -To use dvipng at its simplest, simply type - - dvipng foo - -where `foo.dvi' is the output of TeX that you want to convert to PNG -format. If there are four pages in `foo.dvi', those pages will be -output as `foo1.png', `foo2.png', `foo3.png', and `foo4.png', -respectively. - - If you have enabled the PostScript font support (via FreeType or -T1lib), fonts will be rendered as they are needed. Otherwise, if you -use fonts that have not been used on your system before, they may be -automatically generated; this process can take a few minutes, so -progress reports appear by default. The next time the same font is -used, it will have been saved on disk, so rendering will go much -faster. (If dvipng tries to endlessly generate the same fonts over and -over again, something is wrong. *Note Unable to generate fonts: -(kpathsea)Unable to generate fonts.) - - Many options are available (see the next section). For a brief -summary of available options, just type - - dvipng --help - - -File: dvipng.info, Node: Command-line options, Next: Graphics, Prev: Basic usage, Up: Top - -4 Command-line options -********************** - -dvipng has a plethora of command line options. Reading through this -section will give a good idea of the capabilities of the driver. - -* Menu: - -* Option summary:: Quick listing, from dvipng --help. -* Option details:: More information about each option. - - -File: dvipng.info, Node: Option summary, Next: Option details, Up: Command-line options - -4.1 Option summary -================== - -Here is a handy summary of the options; it is printed out when you run -dvipng with no arguments or with the standard `--help' option. - - This is ./dvipng 1.11 Copyright 2002-2008 Jan-Ake Larsson - - Usage: ./dvipng [OPTION]... FILENAME[.dvi] - Options are chosen to be similar to dvips' options where possible: - -d # Debug (# is the debug bitmap, 1 if not given) - -D # Output resolution - -l # Last page to be output - -o f Output file, '%d' is pagenumber - -O c Image offset - -p # First page to be output - -pp #,#.. Page list to be output - -q* Quiet operation - -T c Image size (also accepts '-T bbox' and '-T tight') - -v* Verbose operation - - Interactive query of options - - These do not correspond to dvips options: - -bd # Transparent border width in dots - -bd s Transparent border fallback color (TeX-style color) - -bg s Background color (TeX-style color or 'Transparent') - --depth* Output the image depth on stdout - --dvinum* Use TeX page numbers in output filenames - -fg s Foreground color (TeX-style color) - --follow* Wait for data at end-of-file - --freetype* FreeType font rendering (default on) - --gamma # Control color interpolation - --gif Output GIF images (dvigif default) - --height* Output the image height on stdout - --noghostscript* Don't use ghostscript for PostScript specials - --nogssafer* Don't use -dSAFER in ghostscript calls - --palette* Force palette output - --picky When a warning occurs, don't output image - --png Output PNG images (dvipng default) - --strict When a warning occurs, exit - --t1lib* T1lib font rendering (default on) - --truecolor* Truecolor output - -Q # Quality (T1lib and PK subsampling) - -z # PNG compression level - - # = number f = file s = string * = suffix, '0' to turn off - c = comma-separated dimension pair (e.g., 3.2in,-32.1cm) - - -File: dvipng.info, Node: Option details, Prev: Option summary, Up: Command-line options - -4.2 Option details -================== - -Many of the parameterless options listed here can be turned off by -suffixing the option with a zero (`0'); for instance, to turn off page -reversal, use `-r0'. Such options are marked with a trailing `*'. - -`-' - Read additional options from standard input after processing the - command line. - -`--help' - Print a usage message and exit. - -`--version' - Print the version number and exit. - -`-bd NUM' - -`-bd COLOR_SPEC' - -`-bd 'NUM COLOR_SPEC'' - Set the pixel width of the transparent border (default 0). Using - this option will make the image edges transparent, but it only - affects pixels with the background color. Giving a COLOR_SPEC will - set the fallback color, to be used in viewers that cannot handle - transparency (the default is the background color). The color spec - should be in TeX color \special syntax, e.g., 'rgb 1.0 0.0 0.0'. - Setting the fallback color makes the default border width 1 px. - *Note Color::. - -`--bdpi NUM' - Set the base (Metafont) resolution, both horizontal and vertical, - to NUM dpi (dots per inch). This option is necessary when manually - selecting Metafont mode with the -mode option (see below). - -`-bg COLOR_SPEC' - Choose background color for the images. This option will be - ignored if there is a background color \special in the DVI. The - color spec should be in TeX color \special syntax, e.g., 'rgb 1.0 - 0.0 0.0'. You can also specify 'Transparent' or 'transparent' - which will give you a transparent background with the normal - background as a fallback color. A capitalized 'Transparent' will - give a full-alpha transparency, while an all-lowercase - 'transparent' will give a simple fully transparent background with - non-transparent antialiased pixels. The latter would be suitable - for viewers who cannot cope with a true alpha channel. GIF images - do not support full alpha transparency, so in case of GIF output, - both variants will use the latter behaviour. *Note Color::. - -`-d NUM' - Set the debug flags, showing what dvipng (thinks it) is doing. - This will work unless dvipng has been compiled without the `DEBUG' - option (not recommended). Set the flags as you need them, use `-d - -1' as the first option for maximum output. *Note Debug options::. - -`-D NUM' - Set the output resolution, both horizontal and vertical, to NUM - dpi (dots per inch). - - One may want to adjust this to fit a certain text font size (e.g., - on a web page), and for a text font height of FONT_PX pixels (in - Mozilla) the correct formula is - DPI = FONT_PX * 72.27 / 10 [px * TeXpt/in / TeXpt] - The last division by ten is due to the standard font height 10pt in - your document, if you use 12pt, divide by 12. Unfortunately, some - proprietary browsers have font height in pt (points), not pixels. - You have to rescale that to pixels, using the screen resolution - (default is usually 96 dpi) which means the formula is - FONT_PX = FONT_PT * 96 / 72 [pt * px/in / (pt/in)] - On some high-res screens, the value is instead 120 dpi. Good luck! - -`--depth*' - Report the depth of the image. This only works reliably when the - LaTeX style `preview.sty' from preview-latex is used with the - `active' option. It reports the number of pixels from the bottom - of the image to the baseline of the image. This can be used for - vertical positioning of the image in, e.g., web documents, where - one would use (Cascading StyleSheets 1) - - The depth is a negative offset in this case, so the minus sign is - necessary, and the unit is pixels (px). - -`--dvinum*' - Set this option to make the output page number be the TeX page - numbers rather than the physical page number. See the `-o' switch. - -`-fg COLOR_SPEC' - Choose foreground color for the images. This option will be - ignored if there is a foreground color \special in the DVI. The - color spec should be in TeX color \special syntax, e.g., 'rgb 1.0 - 0.0 0.0'. *Note Color::. - -`--follow*' - Wait for data at end-of-file. One of the benefits of dvipng is - that it does not read the postamble, so it can be started before - TeX finishes. This switch makes dvipng wait at end-of-file for - further output, unless it finds the POST marker that indicates the - end of the DVI. This is similar to `tail -f' but for DVI-to-PNG - conversion. - -`--freetype*' - Enable/disable FreeType font rendering (default on). This option is - available if the FreeType2 font library was present at compilation - time. If this is the case, dvipng will have direct support for - PostScript Type1 and TrueType fonts internally, rather than using - `gsftopk' for rendering the fonts. If you have PostScript versions - of Computer Modern installed, there will be no need to generate - bitmapped variants on disk of these. Then, you can render images - at different (and unusual) resolutions without cluttering the disk - with lots of bitmapped fonts. Note that if you have both FreeType - and T1lib on your system, FreeType will be preferred by dvipng. If - you for some reason would want to use T1lib rendering, use this - option. - -`--gamma NUM' - Control the interpolation of colors in the greyscale anti-aliasing - color palette. Default value is 1.0. For 0 < NUM < 1, the fonts - will be lighter (more like the background), and for NUM > 1, the - fonts will be darker (more like the foreground). - -`--gif*' - The images are output in the GIF format, if GIF support is enabled. - This is the default for the `dvigif' binary, which only will be - available when GIF support is enabled. GIF images are palette - images (see the `--palette' option) and does not support true alpha - channels (see the `--bg' option). See also the `--png' option. - -`--height*' - Report the height of the image. This only works reliably when the - LaTeX style `preview.sty' from preview-latex is used with the - `active' option. It reports the number of pixels from the top of - the image to the baseline of the image. The total height of the - image is obtained as the sum of the values reported from - `--height' and `--depth'. - -`-l [=]NUM' - The last page printed will be the first one numbered NUM. Default - is the last page in the document. If NUM is prefixed by an equals - sign, then it (and the argument to the `-p' option, if specified) - is treated as a physical (absolute) page number, rather than a - value to compare with the TeX `\count0' values stored in the DVI - file. Thus, using `-l =9' will end with the ninth page of the - document, no matter what the pages are actually numbered. - -`--mode MODE' - Use MODE as the Metafont device name for the PK fonts (both for - path searching and font generation). This needs to be augmented - with the base device resolution, given with the `--bdpi' option. - See the file `ftp://ftp.tug.org/tex/modes.mf' for a list of - resolutions and mode names for most devices. *Note Unable to - generate fonts: (kpathsea)Unable to generate fonts. - -`-M*' - Turns off automatic PK font generation (`mktexpk'). This will have - no effect when using PostScript fonts, since no PK font generation - will be done anyway. - -`--noghostscript*' - This switch prohibits the internal call to GhostScript for - displaying PostScript specials. `--noghostscript0' turns the call - back on. - -`--nogssafer*' - Normally, if GhostScript is used to render PostScript specials, the - GhostScript interpreter is run with the option `-dSAFER'. The - `--nogssafer' option runs GhostScript without `-dSAFER'. The - `-dSAFER' option in Ghostscript disables PostScript operators such - as deletefile, to prevent possibly malicious PostScript programs - from having any effect. - -`-o NAME' - Send output to the file NAME. A single occurrence of `%d' or - `%01d', ..., `%09d' will be exchanged for the physical page number - (this can be changed, see the `--dvinum' switch). The default - output filename is `FILE%d.png' where the input DVI file was - `FILE.dvi'. - -`-O X-OFFSET,Y-OFFSET' - Move the origin by X-OFFSET,Y-OFFSET, a comma-separated pair of - dimensions such as `.1in,-.3cm'. The origin of the page is - shifted from the default position (of one inch down, one inch to - the right from the upper left corner of the paper) by this amount. - -`-p [=]NUM' - The first page printed will be the first one numbered NUM. Default - is the first page in the document. If NUM is prefixed by an - equals sign, then it (and the argument to the `-l' option, if - specified) is treated as a physical (absolute) page number, rather - than a value to compare with the TeX `\count0' values stored in the - DVI file. Thus, using `-p =3' will start with the third page of - the document, no matter what the pages are actually numbered. - -`--palette*' - Starting from `dvipng' 1.8, the output PNG will be a truecolor png - when an external image is included, to avoid unnecessary delay and - quality reduction, and enable the EPS translator to draw on a - transparent background and outside of the boundingbox. This switch - will force palette (256-color) output and make `dvipng' revert to - the old behaviour, where included images were opaque and always - clipped to the boundingbox. This will also override the - `--truecolor' switch if present. - -`--picky*' - No images are output when a warning occurs. Normally, dvipng will - output an image in spite of a warning, but there may be something - missing in this image. One reason to use this option would be if - you have a more complete but slower fallback converter. Mainly, - this is useful for failed figure inclusion and unknown \special - occurrences, but warnings will also occur for missing or unknown - color specs and missing PK fonts. - -`--png*' - The images are output in the PNG format. This is the default for - the `dvipng' binary. See also the `--gif' option. - -`-pp FIRSTPAGE-LASTPAGE' - Print pages FIRSTPAGE through LASTPAGE; but not quite equivalent - to `-p FIRSTPAGE -l LASTPAGE'. For example, when rendering a book, - there may be several instances of a page in the DVI file (one in - `\frontmatter', one in `\mainmatter', and one in `\backmatter'). - In case of several pages matching, `-pp FIRSTPAGE-LASTPAGE' will - render _all_ pages that matches the specified range, while `-p - FIRSTPAGE -l LASTPAGE' will render the pages from the _first_ - occurrence of FIRSTPAGE to the _first_ occurrence of LASTPAGE. - This is the (undocumented) behaviour of dvips. In dvipng you can - give both kinds of options, in which case you get all pages that - matches the range in `-pp' between the pages from `-p' to `-l'. - Also multiple `-pp' options accumulate, unlike `-p' and `-l'. The - `-' separator can also be `:'. Note that `-pp -1' will be - interpreted as "all pages up to and including 1", if you want a - page numbered -1 (only the table of contents, say) put `-pp -1--1', - or more readable, `-pp -1:-1'. - -`-q*' - Run quietly. Don't chatter about pages converted, etc. to standard - output; report no warnings (only errors) to standard error. - -`-Q NUM' - Set the quality to NUM. That is, choose the number of antialiasing - levels for PK and T1lib rendering to be NUM*NUM+1. The default - value is 4 which gives 17 levels of antialiasing for antialiased - fonts from these two. If FreeType is available, its rendering is - unaffected by this option. - -`-r*' - Toggle output of pages in reverse/forward order. By default, the - first page in the DVI is output first. - -`--strict*' - The program exits when a warning occurs. Normally, dvipng will - output an image in spite of a warning, but there may be something - missing in this image. One reason to use this option would be if - you have a more complete but slower fallback converter. See the - `--picky' option above for a list of when warnings occur. - -`-T IMAGE_SIZE' - Set the image size to IMAGE_SIZE which can be either of `bbox', - `tight', or a comma-separated pair of dimensions HSIZE,VSIZE such - as `.1in,.3cm'. The default is `bbox' which produces a PNG that - includes all ink put on the page and in addition the DVI origin, - located 1in from the top and 1in from the left edge of the paper. - This usually gives whitespace above and to the left in the - produced image. The value `tight' will make dvipng only include - all ink put on the page, producing neat images. - -`--t1lib*' - Enable/disable T1lib font rendering (default on). This option is - available if the T1lib font library was present at compilation - time. If this is the case, dvipng will have direct support for - PostScript Type1 fonts internally, rather than using `gsftopk' for - rendering the fonts. If you have PostScript versions of Computer - Modern installed, there will be no need to generate bitmapped - variants on disk of these. Then, you can render images at - different (and unusual) resolutions without cluttering the disk - with lots of bitmapped fonts. Note that if you have both FreeType - and T1lib on your system FreeType will be preferred by dvipng, and - if you for some reason rather want to use T1lib, give the option - `--freetype0' (see above). - -`--truecolor*' - This will make `dvipng' generate truecolor output. Note that - truecolor output is automatic if you include an external image in - your DVI, e.g., via a PostScript special (i.e., the `graphics' or - `graphicx' package). This switch is overridden by the `--palette' - switch. - -`-v*' - Enable verbose operation. This will currently indicate what fonts - is used, in addition to the usual output. - -`-x NUM' - Set the x magnification ratio to NUM/1000. Overrides the - magnification specified in the DVI file. Must be between 10 and - 100000. It is recommended that you use standard magstep values - (1095, 1200, 1440, 1728, 2074, 2488, 2986, and so on) to help - reduce the total number of PK files generated. NUM may be a real - number, not an integer, for increased precision. - -`-z NUM' - Set the PNG compression level to NUM. This option is enabled if - your `libgd' is new enough. The default compression level is 1, - which selects maximum speed at the price of slightly larger PNGs. - For an older `libgd', the hard-soldered value 5 is used. The - include file `png.h' says - - Currently, valid values range from 0 - 9, corresponding - directly to the zlib compression levels 0 - 9 (0 - no - compression, 9 - "maximal" compression). Note that tests have - shown that zlib compression levels 3-6 usually perform as - well as level 9 for PNG images, and do considerably fewer - calculations. In the future, these values may not correspond - directly to the zlib compression levels. - - -File: dvipng.info, Node: Graphics, Next: Color, Prev: Command-line options, Up: Top - -5 Graphics -********** - -`dvipng' attempts to handle graphics as included by the `graphicx' and -`graphics' packages, without the need of specifying a driver to these -packages. This means that it recognizes the encapsulated postscript -inclusion meant for `dvips', but is also able (from version 1.8) to -include bitmapped graphics, see the details below. - -* Menu: - -* Encapsulated PostScript:: An internal call to GhostScript -* Bitmapped graphics:: PNG, JPEG and GIF - - -File: dvipng.info, Node: Encapsulated PostScript, Next: Bitmapped graphics, Up: Graphics - -5.1 Encapsulated PostScript -=========================== - -When an EPS file is included, a call to GhostScript is performed to -produce a bitmapped image that can be included. The default is to -produce an image with transparent background, at the same size as the -DVI page currently being converted to PNG, and include that as -foreground on the PNG. Of course, if the image is to be cropped, that -is done. The included image will be a truecolor image, so for maximum -performance the output PNG will be in truecolor mode as well. - - This conversion needs the `pngalpha' output device to be present in -your copy of GhostScript. If that device is not present, or you use the -`--palette' switch or request GIF output, the fallback is to use the -`png16m' device to produce a cropped opaque image for inclusion. Other -relevant switches are `--noghostscript' and `--nogssafer'. *Note Option -details::. - - The most common problem with including graphics is an incorrect -bounding box. Complain to whoever wrote the software that generated the -file if the bounding box is indeed incorrect. An adjusted boundingbox -can be specified in the `\includegraphics' call, as in this example -(using `graphicx'): - - \includegraphics[bb=10 20 100 200]{imagename.eps} - - -File: dvipng.info, Node: Bitmapped graphics, Prev: Encapsulated PostScript, Up: Graphics - -5.2 Bitmapped graphics -====================== - -dvipng can include PNG, JPEG and GIF graphics. When including such -images via `\includegraphics' you need to specify the bounding box -since TeX itself cannot read them from the files in question. The -bounding box size should be given as `0 0 w h' in pixels, e.g., if the -file `imagename.png' is 300x400 pixels, the inclusion would read - - \includegraphics[bb=0 0 300 400]{imagename.png} - - The default size is the image size in bp ("big points" in TeX -nomenclature or PostScript points as other people have it, 72 per inch). -That is, default resolution will be 72 dpi for included bitmaps, which -is the default size in the few other bitmap-capable drivers that are -known to me (dvipdfm and PDFLaTeX). - - If you want 100 dpi you need to specify the width accordingly. You -just divide your image width by 100: a 135 pixel wide image at 100 dpi -will take up 1.35 inches. If you want 200 dpi you divide by 200, and so -on. Simple, eh? The example above at 200 dpi would be 1.5 inches wide: - - \includegraphics[bb=0 0 300 400,witdh=1.5in]{imagename.png} - - -File: dvipng.info, Node: Color, Next: Diagnosing problems, Prev: Graphics, Up: Top - -6 Color -******* - -To support color, dvipng recognizes a certain set of specials as -generated by the `color' and `xcolor' style files. These specials start -with the keyword `color' or the keyword `background', followed by a -color specification. - -* Menu: - -* Color specifications:: -* Color specials:: - - -File: dvipng.info, Node: Color specifications, Next: Color specials, Up: Color - -6.1 Color specifications -======================== - -The color specification supported by dvipng is by-value or by-name. The -by-value spec starts with the name of a color model (one of `rgb', -`hsb', `cmy', `cmyk', or `gray') followed by the appropriate number of -parameters. Thus, the color specification `rgb 0.3 0.4 0.5' would -correspond to the color that is `0.3 0.4 0.5' in its red, blue and -green values. The color model used internally in dvipng is `RGB' -(discretized to 256 levels), for details on the formulas used in -conversion, see the `xcolor' documentation. - - By-name color specifications are single (case-dependent) words and -are compared with color names defined in `dvipsnam.def' (from the -`graphics' bundle), `svgnam.def' and `xcolor.sty' (from the `xcolor' -bundle). See the `xcolor' documentation for a list of names and the -corresponding colors. - - On the command-line, the name `Transparent' can also be used as an -argument to `--bg' to choose transparent background. *Note Option -details::. - - -File: dvipng.info, Node: Color specials, Prev: Color specifications, Up: Color - -6.2 Color specials -================== - -We will describe `background' first, since it is the simplest. The -`background' keyword must be followed by a color specification. That -color specification is used as a fill color for the background. The -last `background' special on a page is the one that gets used, and is -used for the whole of the page image. (This is possible because the -prescan phase of dvipng notices all of the color specials so that the -appropriate information can be written out during the second phase.) - - The `color' special itself has three forms. The first is just -`color' followed by a color specification. In this case, the current -global color is set to that color; the color stack must be empty when -such a command is executed. - - The second form is `color push' followed by a color specification. -This saves the current color on the color stack and sets the color to be -that given by the color specification. This is the most common way to -set a color. - - The final form of the `color' special is just `color pop', with no -color specification; this says to pop the color last pushed on the -color stack from the color stack and set the current color to be that -color. - - dvipng correctly handles these color specials across pages, even when -the pages are rendered repeatedly or in reverse order. - - -File: dvipng.info, Node: Diagnosing problems, Next: Credits, Prev: Color, Up: Top - -7 Diagnosing problems -********************* - -You've gone through all the trouble of installing dvipng, carefully read -all the instructions in this manual, and still can't get something to -work. The following sections provide some helpful hints if you find -yourself in such a situation. - -* Menu: - -* Contact information:: Who to ask. -* Debug options:: Getting diagnostics. - - -File: dvipng.info, Node: Contact information, Next: Debug options, Up: Diagnosing problems - -7.1 Contact information -======================= - -Bug reports should be sent to . - - Questions, suggestions for new features, pleas for help, and/or -praise should go to . For more information on this -mailing list, send a message with just the word `help' as subject or -body to or look at -`http://lists.nongnu.org/mailman/listinfo/dvipng'. - - Offers to support further development will be appreciated. For -developer access, ask on . - - For details on the TeX path-searching library, and `mktexpk' -problems, *note Common problems: (kpathsea)Common problems. - - -File: dvipng.info, Node: Debug options, Prev: Contact information, Up: Diagnosing problems - -7.2 Debug options -================= - -The `-d' flag to dvipng helps in tracking down certain errors. The -parameter to this flag is an integer that tells what errors are -currently being tracked. To track a certain class of debug messages, -simply provide the appropriate number given below; if you wish to track -multiple classes, sum the numbers of the classes you wish to track. To -track all classes, you can use `-1'. - - Some of these debugging options are actually provided by Kpathsea -(*note Debugging: (kpathsea)Debugging.). - - The classes are: -1 - Normal dvi op-codes - -2 - Virtual fonts - -4 - PK fonts - -8 - TFM files - -16 - Glyph rendering - -32 - FreeType calls - -64 - Encoding loads - -128 - Color specials - -256 - GhostScript specials - -512 - T1lib calls - -1024 - Kpathsea `stat' calls - -2048 - Kpathsea hash table lookups - -4096 - Kpathsea path element expansion - -8192 - Kpathsea path searches - - - -File: dvipng.info, Node: Credits, Next: Copying, Prev: Diagnosing problems, Up: Top - -8 Credits -********* - -A number of persons have contributed, if I forget to mention someone, I -apologize. First and foremost we have David Kastrup whose preview-latex -project provided the incentive to write this program. There is also a -number of people who have contributed by reporting bugs and suggesting -improvements as the thing has evolved. These include but is perhaps not -limited to (in semi-random order): Thomas Esser (teTeX), Christian -Schenk (MIKTeX), Brian R Furry (debian package), Angus Leeming (LyX), -Thomas Boutell (libgd), John Jones (first user report), Uwe Kern -(xcolor), Karl Berry (TeX Live), David Harvey (hinting in Freetype), -Neal Harmon, Alan Shutko, Reiner Stieb, Nick Alcock, Adam Buchbinder, -Svend Tollak Munkejord, James Longstreet, Bernhard Simon, Bob McElrath, -Georg Schwarz, Jason Farmer, Brian V. Smith, Samuel Hathaway, Thomas R. -Shemanske, Stephen Gibson, Christian Ridderstro"m, Ezra Peisach, -William H Wheeler, Thomas Klausner, Harald Koenig, Adrian Bunk, Kevin -Smith, Jason Riedy, Wolfram Krause, Reinhard Kotucha, and Takeshi Abe. - - -File: dvipng.info, Node: Copying, Next: Index, Prev: Credits, Up: Top - -9 Copying -********* - -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - - This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser -General Public License for more details. - - You should have received a copy of the GNU Lesser General Public -License along with this program. If not, see -. - - - -Copyright (C) 2002-2008 Jan-AAke Larsson - - -File: dvipng.info, Node: Index, Prev: Copying, Up: Top - -Index -***** - -[index] -* Menu: - -* -dSAFER: Option details. (line 167) -* absolute page number, and -l: Option details. (line 140) -* absolute page number, and -p: Option details. (line 188) -* antialiasing levels, number of: Option details. (line 242) -* background color (option): Option details. (line 40) -* base resolution, setting: Option details. (line 35) -* baseline reporting: Option details. (line 76) -* color specifications: Color specifications. - (line 6) -* command-line options: Command-line options. - (line 6) -* compilation: Installation. (line 6) -* compression: Option details. (line 303) -* configuration, of dvipng: Installation. (line 6) -* dark fonts: Option details. (line 119) -* debugging <1>: Diagnosing problems. (line 6) -* debugging: Option details. (line 54) -* depth reporting: Option details. (line 76) -* exit on erroneous images: Option details. (line 253) -* first page printed: Option details. (line 188) -* follow mode: Option details. (line 97) -* font generation, avoiding: Option details. (line 157) -* forcing palette output: Option details. (line 197) -* foreground color (option): Option details. (line 91) -* FreeType font rendering: Option details. (line 105) -* fuzzy images: Option details. (line 119) -* gamma: Option details. (line 119) -* GhostScript and -dSAFER: Option details. (line 167) -* GhostScript, turning off: Option details. (line 162) -* GIF image format: Option details. (line 125) -* height reporting: Option details. (line 132) -* installation, of dvipng: Installation. (line 6) -* invoking dvipng: Basic usage. (line 6) -* last page printed: Option details. (line 140) -* light fonts: Option details. (line 119) -* magnification, overriding DVI: Option details. (line 295) -* Metafont mode, specifying: Option details. (line 149) -* mktexpk, avoiding: Option details. (line 157) -* mode name, specifying: Option details. (line 149) -* no erroneous images: Option details. (line 207) -* offset pages: Option details. (line 182) -* option, details of: Option details. (line 6) -* options, dvipng: Command-line options. - (line 6) -* options, reading from standard input: Option details. (line 11) -* options, summary: Option summary. (line 6) -* output resolution, setting: Option details. (line 60) -* output, redirecting: Option details. (line 175) -* page range: Option details. (line 220) -* page, first printed: Option details. (line 188) -* page, last printed: Option details. (line 140) -* physical page number, and -l: Option details. (line 140) -* physical page number, and -p: Option details. (line 188) -* PNG image format: Option details. (line 216) -* PostScript inclusion problems: Encapsulated PostScript. - (line 21) -* problems: Diagnosing problems. (line 6) -* quality: Option details. (line 242) -* quiet operation: Option details. (line 238) -* reverse pagination: Option details. (line 249) -* silent operation: Option details. (line 238) -* standard input, reading options from: Option details. (line 11) -* standard output, output to: Option details. (line 175) -* T1lib font rendering: Option details. (line 270) -* transparent border fallback color: Option details. (line 25) -* transparent border width: Option details. (line 25) -* trouble: Diagnosing problems. (line 6) -* truecolor output: Option details. (line 284) -* warnings, suppressing: Option details. (line 238) - - - -Tag Table: -Node: Top297 -Node: Introduction1192 -Node: Installation3431 -Node: Prerequisites3778 -Node: Configure6268 -Node: Build/install8307 -Node: Installation outside the texmf tree8775 -Node: Advice for non-privileged users9482 -Node: Basic usage10490 -Node: Command-line options11617 -Node: Option summary12041 -Node: Option details14350 -Node: Graphics29729 -Node: Encapsulated PostScript30294 -Node: Bitmapped graphics31637 -Node: Color32837 -Node: Color specifications33225 -Node: Color specials34324 -Node: Diagnosing problems35736 -Node: Contact information36219 -Node: Debug options36960 -Node: Credits37995 -Node: Copying39157 -Node: Index39937 - -End Tag Table diff --git a/Build/source/texk/dvipng/dvipng.test b/Build/source/texk/dvipng/dvipng.test new file mode 100755 index 00000000000..743d2544441 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng.test @@ -0,0 +1,17 @@ +#! /bin/sh + +TEXMFCNF=$(dirname $(kpsewhich texmf.cnf)) +TEXFONTMAPS=$(dirname $(dirname $(kpsewhich psfonts.map)))// +ENCFONTS=$(dirname $(dirname $(kpsewhich 8r.enc)))// +TEXMFMAIN=$(kpsewhich --expand-var='$TEXMFMAIN') +TEXMFDIST=$(kpsewhich --expand-var='$TEXMFDIST') +TEXMFLOCAL=$(kpsewhich --expand-var='$TEXMFLOCAL') + +export TEXMFCNF TEXFONTMAPS ENCFONTS TEXMFMAIN TEXMFDIST TEXMFLOCAL + +latex $srcdir/test_dvipng.tex || exit 77 + +./dvipng -T tight -strict test_dvipng || exit 1 + +echo View the result e.g. with xv test_dvipng\*.png + diff --git a/Build/source/texk/dvipng/dvipng.texi b/Build/source/texk/dvipng/dvipng.texi deleted file mode 100644 index 6b4c6a99df3..00000000000 --- a/Build/source/texk/dvipng/dvipng.texi +++ /dev/null @@ -1,940 +0,0 @@ -\input texinfo -@setfilename dvipng.info -@settitle A DVI-to-PNG translator -@ifset man -@c man begin SYNOPSIS -dvipng [options] filename - -dvipng [options] [filename] - -@c man end -@end ifset - -@set version 1.12 -@set month-year February 2009 - -@c Put everything in one index (arbitrarily chosen to be the concept index). -@syncodeindex fn cp -@syncodeindex ky cp -@syncodeindex pg cp -@syncodeindex vr cp - -@include macros.texi -@iftex -@tolerance 10000 @emergencystretch 3em -@end iftex - -@dircategory TeX -@direntry -* DVI-to-PNG: (dvipng). Translating TeX DVI files to Portable Network Graphics (PNG). -* dvipng: (dvipng). A DVI-to-PNG translator. -@end direntry - -@finalout -@titlepage -@title dvipng -@subtitle A DVI-to-PNG Translator -@subtitle Version @value{version} - - -@author by Jan-@AA{}ke Larsson. -@page -@vskip 0pt plus 1filll -Copyright @copyright{} 2002-2008 Jan-@AA{}ke Larsson - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -@ignore -Permission is granted to process this file through TeX and print the -results, provided the printed document carries copying permission -notice identical to this one except for the removal of this paragraph -(this paragraph not being relevant to the printed manual). -@end ignore - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided also that the -section entitled ``Copying'' is included exactly as in the original, and -provided that the entire resulting derived work is distributed under the -terms of a permission notice identical to this one. - -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions, -except that this permission notice may be stated in a translation -approved by the Free Software Foundation. -@end titlepage -@page - -@c @summarycontents -@contents - -@ifnottex -@node Top -@top dvipng - -This manual documents dvipng, a program to translate a DVI (DeVice -Independent) file into PNG (Portable Network Graphics). - -This file documents dvipng version @value{version} - -Corrections or perhaps rewrites of sections are @emph{very welcome}. - -Jan-@AA{}ke Larsson - -@end ifnottex - -@menu -* Introduction:: Introduction -* Installation:: How to compile and install dvipng -* Basic usage:: First things first -* Command-line options:: Advanced usage -* Graphics:: Including PostScript and/or bitmaps -* Color:: Using color with dvipng -* Diagnosing problems:: Problems? -* Credits:: People who have contributed -* Copying:: GNU Lesser General Public License -* Index:: General index -@end menu - - - -@node Introduction -@chapter Introduction - -@c man begin DESCRIPTION -@include readme.texi -@c man end - -@node Installation -@chapter Installation - -@cindex configuration, of dvipng -@cindex compilation -@cindex installation, of dvipng - -@include install.texi - -@node Basic usage -@chapter Basic usage of dvipng - -@cindex invoking dvipng - -To use dvipng at its simplest, simply type - -@example -dvipng foo -@end example - -@noindent -where @file{foo.dvi} is the output of @TeX{} that you want to convert to -PNG format. If there are four pages in @file{foo.dvi}, those pages will -be output as @file{foo1.png}, @file{foo2.png}, @file{foo3.png}, and -@file{foo4.png}, respectively. - -If you have enabled the PostScript font support (via FreeType or T1lib), -fonts will be rendered as they are needed. Otherwise, if you use fonts -that have not been used on your system before, they may be automatically -generated; this process can take a few minutes, so progress reports -appear by default. The next time the same font is used, it will have -been saved on disk, so rendering will go much faster. (If dvipng tries -to endlessly generate the same fonts over and over again, something is -wrong. @xref{Unable to generate fonts,,, kpathsea, Kpathsea}.) - -Many options are available (see the next section). For a brief summary -of available options, just type - -@example -dvipng --help -@end example - -@node Command-line options -@chapter Command-line options - -@cindex command-line options -@cindex options, dvipng - -dvipng has a plethora of command line options. Reading through this -section will give a good idea of the capabilities of the driver. - -@menu -* Option summary:: Quick listing, from dvipng --help. -* Option details:: More information about each option. -@end menu - - -@node Option summary -@section Option summary - -@cindex options, summary -Here is a handy summary of the options; it is printed out when you run -dvipng with no arguments or with the standard @samp{--help} option. - -@example -@include dvipng.help -@end example - - -@node Option details -@section Option details - -@cindex option, details of -@c man begin OPTIONS - -Many of the parameterless options listed here can be turned off by -suffixing the option with a zero (@samp{0}); for instance, to turn off -page reversal, use @samp{-r0}. Such options are marked with a trailing -@samp{*}. - -@table @samp -@item - -@cindex options, reading from standard input -@cindex standard input, reading options from -Read additional options from standard input after processing the command -line. - -@item --help -Print a usage message and exit. - -@item --version -Print the version number and exit. - -@item -bd @var{num} -@item -bd @var{color_spec} -@item -bd '@var{num} @var{color_spec}' -@cindex transparent border width -@cindex transparent border fallback color -Set the pixel width of the transparent border (default 0). Using this -option will make the image edges transparent, but it only affects pixels -with the background color. Giving a @var{color_spec} will set the -fallback color, to be used in viewers that cannot handle transparency -(the default is the background color). The color spec should be in -@TeX{} color \special syntax, e.g., 'rgb 1.0 0.0 0.0'. Setting the -fallback color makes the default border width 1 px. @xref{Color}. - -@item --bdpi @var{num} -@cindex base resolution, setting -Set the base (Metafont) resolution, both horizontal and vertical, to -@var{num} dpi (dots per inch). This option is necessary when manually -selecting Metafont mode with the --mode option (see below). - -@item -bg @var{color_spec} -@cindex background color (option) -Choose background color for the images. This option will be ignored if -there is a background color \special in the DVI. The color spec should -be in @TeX{} color \special syntax, e.g., 'rgb 1.0 0.0 0.0'. You can -also specify 'Transparent' or 'transparent' which will give you a -transparent background with the normal background as a fallback color. A -capitalized 'Transparent' will give a full-alpha transparency, while an -all-lowercase 'transparent' will give a simple fully transparent -background with non-transparent antialiased pixels. The latter would be -suitable for viewers who cannot cope with a true alpha channel. GIF -images do not support full alpha transparency, so in case of GIF output, -both variants will use the latter behaviour. @xref{Color}. - -@item -d @var{num} -@cindex debugging -Set the debug flags, showing what dvipng (thinks it) is doing. This will -work unless dvipng has been compiled without the @code{DEBUG} option -(not recommended). Set the flags as you need them, use @samp{-d -1} as -the first option for maximum output. @xref{Debug options}. - -@item -D @var{num} -@cindex output resolution, setting -Set the output resolution, both horizontal and vertical, to @var{num} -dpi (dots per inch). - -One may want to adjust this to fit a certain text font size (e.g., on -a web page), and for a text font height of @var{font_px} pixels (in -Mozilla) the correct formula is -@example -@var{dpi} = @var{font_px} * 72.27 / 10 [px * @TeX{}pt/in / @TeX{}pt] -@end example -The last division by ten is due to the standard font height 10pt in -your document, if you use 12pt, divide by 12. Unfortunately, some -proprietary browsers have font height in pt (points), not pixels. You -have to rescale that to pixels, using the screen resolution (default -is usually 96 dpi) which means the formula is -@example -@var{font_px} = @var{font_pt} * 96 / 72 [pt * px/in / (pt/in)] -@end example -On some high-res screens, the value is instead 120 dpi. Good luck! - -@item --depth* -@cindex baseline reporting -@cindex depth reporting -Report the depth of the image. This only works reliably when the -@LaTeX{} style @file{preview.sty} from @previewlatex{} is used with -the @samp{active} option. It reports the number of pixels from the -bottom of the image to the baseline of the image. This can be used for -vertical positioning of the image in, e.g., web documents, where one -would use (Cascading StyleSheets 1) -@example - -@end example -The depth is a negative offset in this case, so the minus sign is -necessary, and the unit is pixels (px). - -@item --dvinum* -Set this option to make the output page number be the @TeX{} page -numbers rather than the physical page number. See the @samp{-o} switch. - -@ignore -@item -e @var{num} -@cindex maxdrift -@cindex accuracy in positioning -@cindex positioning accuracy -Maximum drift in pixels of each character from its `true' -resolution-independent position on the page. The default value of this -parameter is resolution dependent (it is the number of entries in the -list [100, 200, 300, 400, 500, 600, 800, 1000, 1200, 1600, 2000, 2400, -2800, 3200, @dots{}] that are less than or equal to the resolution in -dots per inch). Allowing individual characters to `drift' from their -correctly rounded positions by a few pixels, while regaining the true -position at the beginning of each new word, improves the spacing of -letters in words. - -@item -f* -@cindex filter, running as a -@cindex standard I/O -@cindex pipes, not readable -@vindex PRINTER@r{, avoided with @samp{-f}} -Run as a filter. Read the DVI file from standard input and write the -PostScript to standard output. The standard input must be seekable, so -it cannot be a pipe. If your input must be a pipe, write a shell script -that copies the pipe output to a temporary file and then points dvipng at -this file. This option also disables the automatic reading of the -@code{PRINTER} environment variable; use @samp{-P$PRINTER} after the -@samp{-f} to read it anyway. It also turns off the automatic sending of -control-D if it was turned on with the @samp{-F} option or in the -configuration file; use @samp{-F} after the @samp{-f} to send it anyway. - -@item -k* -@cindex cropmarks -Print crop marks. This option increases the paper size (which should be -specified, either with a paper size special or with the @samp{-T} -option) by a half inch in each dimension. It translates each page by a -quarter inch and draws cross-style crop marks. It is mostly useful with -typesetters that can set the page size automatically. This works by -downloading @file{crop.pro}. -@end ignore - -@item -fg @var{color_spec} -@cindex foreground color (option) -Choose foreground color for the images. This option will be ignored if -there is a foreground color \special in the DVI. The color spec should -be in @TeX{} color \special syntax, e.g., 'rgb 1.0 0.0 0.0'. -@xref{Color}. - -@item --follow* -@cindex follow mode -Wait for data at end-of-file. One of the benefits of dvipng is that it -does not read the postamble, so it can be started before @TeX{} -finishes. This switch makes dvipng wait at end-of-file for further -output, unless it finds the POST marker that indicates the end of the -DVI. This is similar to @samp{tail -f} but for DVI-to-PNG conversion. - -@item --freetype* -@cindex FreeType font rendering -Enable/disable FreeType font rendering (default on). This option is -available if the FreeType2 font library was present at compilation time. -If this is the case, dvipng will have direct support for PostScript -Type1 and TrueType fonts internally, rather than using @samp{gsftopk} -for rendering the fonts. If you have PostScript versions of Computer -Modern installed, there will be no need to generate bitmapped variants -on disk of these. Then, you can render images at different (and unusual) -resolutions without cluttering the disk with lots of bitmapped fonts. -Note that if you have both FreeType and T1lib on your system, FreeType -will be preferred by dvipng. If you for some reason would want to use -T1lib rendering, use this option. - -@item --gamma @var{num} -@cindex gamma -@cindex dark fonts -@cindex light fonts -@cindex fuzzy images -Control the interpolation of colors in the greyscale anti-aliasing -color palette. Default value is 1.0. For 0 < @var{num} < 1, the -fonts will be lighter (more like the background), and for @var{num} > -1, the fonts will be darker (more like the foreground). - -@item --gif* -@cindex GIF image format -The images are output in the GIF format, if GIF support is enabled. -This is the default for the @samp{dvigif} binary, which only will be -available when GIF support is enabled. GIF images are palette images -(see the @samp{--palette} option) and does not support true alpha -channels (see the @samp{--bg} option). See also the @samp{--png} -option. - -@item --height* -@cindex baseline reporting -@cindex height reporting -Report the height of the image. This only works reliably when the -@LaTeX{} style @file{preview.sty} from @previewlatex{} is used with -the @samp{active} option. It reports the number of pixels from the top -of the image to the baseline of the image. The total height of the -image is obtained as the sum of the values reported from -@samp{--height} and @samp{--depth}. - -@item -l [=]@var{num} -@cindex last page printed -@cindex page, last printed -@cindex physical page number, and @samp{-l} -@cindex absolute page number, and @samp{-l} -The last page printed will be the first one numbered @var{num}. Default -is the last page in the document. If @var{num} is prefixed by an equals -sign, then it (and the argument to the @samp{-p} option, if specified) -is treated as a physical (absolute) page number, rather than a value to -compare with the @TeX{} @samp{\count0} values stored in the DVI file. -Thus, using @samp{-l =9} will end with the ninth page of the document, -no matter what the pages are actually numbered. - -@item --mode @var{mode} -@cindex mode name, specifying -@cindex Metafont mode, specifying -Use @var{mode} as the Metafont device name for the PK fonts (both for -path searching and font generation). This needs to be augmented with the -base device resolution, given with the @samp{--bdpi} option. See the -file @url{ftp://ftp.tug.org/tex/modes.mf} for a list of resolutions and -mode names for most devices. @xref{Unable to generate fonts,,, kpathsea, -Kpathsea}. - -@item -M* -@cindex font generation, avoiding -@pindex mktexpk@r{, avoiding} -@c this description repeated in kpathsea.texi -Turns off automatic PK font generation (@file{mktexpk}). This will have -no effect when using PostScript fonts, since no PK font generation will -be done anyway. -@ignore -@flindex missfont.log -If @code{mktexpk}, the invocation is appended to a file -@file{missfont.log} (by default) in the current directory. You can then -execute the log file to create the missing files after fixing the -problem. -@vindex TEXMFOUTPUT -@vindex MISSFONT_LOG -If the current directory is not writable and the environment variable or -configuration file value @samp{TEXMFOUTPUT} is set, its value is used. -Otherwise, nothing is written. The name @samp{missfont.log} is -overridden by the @samp{MISSFONT_LOG} environment variable or -configuration file value. -@end ignore - -@item --noghostscript* -@cindex GhostScript, turning off -This switch prohibits the internal call to GhostScript for displaying -PostScript specials. @samp{--noghostscript0} turns the call back on. - -@item --nogssafer* -@cindex GhostScript and -dSAFER -@cindex -dSAFER -Normally, if GhostScript is used to render PostScript specials, the -GhostScript interpreter is run with the option @samp{-dSAFER}. The -@samp{--nogssafer} option runs GhostScript without @samp{-dSAFER}. The -@samp{-dSAFER} option in Ghostscript disables PostScript operators such -as deletefile, to prevent possibly malicious PostScript programs from -having any effect. - -@item -o @var{name} -@cindex output, redirecting -@cindex standard output, output to -Send output to the file @var{name}. A single occurrence of @samp{%d} or -@samp{%01d}, @dots{}, @samp{%09d} will be exchanged for the physical -page number (this can be changed, see the @samp{--dvinum} switch). The -default output filename is @samp{@var{file}%d.png} where the input DVI -file was @samp{@var{file}.dvi}. - -@item -O @var{x-offset},@var{y-offset} -@cindex offset pages -Move the origin by @var{x-offset},@var{y-offset}, a comma-separated -pair of dimensions such as @samp{.1in,-.3cm}. -@c (@pxref{papersize special}). -The origin of the page is shifted from the default position -(of one inch down, one inch to the right from the upper left corner of -the paper) by this amount. - -@item -p [=]@var{num} -@cindex first page printed -@cindex page, first printed -@cindex physical page number, and @samp{-p} -@cindex absolute page number, and @samp{-p} -The first page printed will be the first one numbered @var{num}. Default -is the first page in the document. If @var{num} is prefixed by an -equals sign, then it (and the argument to the @samp{-l} option, if -specified) is treated as a physical (absolute) page number, rather than -a value to compare with the @TeX{} @samp{\count0} values stored in the -DVI file. Thus, using @samp{-p =3} will start with the third page of -the document, no matter what the pages are actually numbered. - -@item --palette* -@cindex forcing palette output -Starting from @samp{dvipng} 1.8, the output PNG will be a truecolor -png when an external image is included, to avoid unnecessary delay and -quality reduction, and enable the EPS translator to draw on a -transparent background and outside of the boundingbox. This switch -will force palette (256-color) output and make @samp{dvipng} revert to -the old behaviour, where included images were opaque and always -clipped to the boundingbox. This will also override the -@samp{--truecolor} switch if present. - -@item --picky* -@cindex no erroneous images -No images are output when a warning occurs. Normally, dvipng will -output an image in spite of a warning, but there may be something -missing in this image. One reason to use this option would be if you -have a more complete but slower fallback converter. Mainly, this is -useful for failed figure inclusion and unknown \special occurrences, -but warnings will also occur for missing or unknown color specs and -missing PK fonts. - -@item --png* -@cindex PNG image format -The images are output in the PNG format. This is the default for the -@samp{dvipng} binary. See also the @samp{--gif} option. - -@item -pp @var{firstpage}-@var{lastpage} -@cindex page range -Print pages @var{firstpage} through @var{lastpage}; but not quite -equivalent to @samp{-p @var{firstpage} -l @var{lastpage}}. For example, -when rendering a book, there may be several instances of a page in the -DVI file (one in @code{\frontmatter}, one in @code{\mainmatter}, and one -in @code{\backmatter}). In case of several pages matching, @samp{-pp -@var{firstpage}-@var{lastpage}} will render @emph{all} pages that -matches the specified range, while @samp{-p @var{firstpage} -l -@var{lastpage}} will render the pages from the @emph{first} occurrence -of @var{firstpage} to the @emph{first} occurrence of @var{lastpage}. -This is the (undocumented) behaviour of dvips. In dvipng you can give -both kinds of options, in which case you get all pages that matches the -range in @samp{-pp} between the pages from @samp{-p} to @samp{-l}. Also -multiple @samp{-pp} options accumulate, unlike @samp{-p} and @samp{-l}. -The @samp{-} separator can also be @samp{:}. Note that @samp{-pp -1} -will be interpreted as "all pages up to and including 1", if you want a -page numbered -1 (only the table of contents, say) put @samp{-pp -1--1}, -or more readable, @samp{-pp -1:-1}. - -@item -q* -@cindex quiet operation -@cindex silent operation -@cindex warnings, suppressing -Run quietly. Don't chatter about pages converted, etc.@: to standard -output; report no warnings (only errors) to standard error. - -@item -Q @var{num} -@cindex antialiasing levels@r{, number of} -@cindex quality -Set the quality to @var{num}. That is, choose the number of antialiasing -levels for PK and T1lib rendering to be @var{num}*@var{num}+1. The default -value is 4 which gives 17 levels of antialiasing for antialiased fonts -from these two. If FreeType is available, its rendering is unaffected by -this option. - -@item -r* -@cindex reverse pagination -Toggle output of pages in reverse/forward order. By default, the first -page in the DVI is output first. - -@ignore -@item -R -@cindex security -@cindex shell command execution, disabling -@cindex absolute filenames, disabling -@cindex pipes, disabling output to -Run securely. This disables shell command execution in @code{\special} -(via @samp{`}, @pxref{Dynamic creation of graphics}) and config files -(via the @samp{E} option, @pxref{Configuration file commands}), pipes as -output files, and opening of any absolute filenames. - -@item -t @var{papertype} -@cindex paper type -@cindex media -@cindex letter papertype -@cindex legal papertype -@cindex ledger papertype -@cindex a4 papertype -@cindex a3 papertype -@cindex landscape papertype -Set the paper type to @var{papertype}. -@c usually defined in one of the -@c configuration files, along with the appropriate PostScript code to -@c select it (@pxref{Config file paper sizes}). -You can also specify a @var{papertype} of @samp{landscape}, which -rotates a document by 90 degrees. To rotate a document whose paper type -is not the default, you can use the @samp{-t} option twice, once for the -paper type, and once for @samp{landscape}. -@end ignore - -@item --strict* -@cindex exit on erroneous images -The program exits when a warning occurs. Normally, dvipng will output -an image in spite of a warning, but there may be something missing in -this image. One reason to use this option would be if you have a more -complete but slower fallback converter. See the @samp{--picky} option -above for a list of when warnings occur. - -@item -T @var{image_size} -Set the image size to @var{image_size} which can be either of -@samp{bbox}, @samp{tight}, or a comma-separated pair of dimensions -@var{hsize},@var{vsize} such as @samp{.1in,.3cm}. The default is -@samp{bbox} which produces a PNG that includes all ink put on the page -and in addition the DVI origin, located 1in from the top and 1in from -the left edge of the paper. This usually gives whitespace above and to -the left in the produced image. The value @samp{tight} will make dvipng -only include all ink put on the page, producing neat images. -@c (@pxref{papersize special}). -@c This option overrides any papersize special in the DVI file. - -@item --t1lib* -@cindex T1lib font rendering -Enable/disable T1lib font rendering (default on). This option is -available if the T1lib font library was present at compilation time. If -this is the case, dvipng will have direct support for PostScript Type1 -fonts internally, rather than using @samp{gsftopk} for rendering the -fonts. If you have PostScript versions of Computer Modern installed, -there will be no need to generate bitmapped variants on disk of these. -Then, you can render images at different (and unusual) resolutions -without cluttering the disk with lots of bitmapped fonts. Note that if -you have both FreeType and T1lib on your system FreeType will be -preferred by dvipng, and if you for some reason rather want to use -T1lib, give the option @samp{--freetype0} (see above). - -@item --truecolor* -@cindex truecolor output -This will make @samp{dvipng} generate truecolor output. Note that -truecolor output is automatic if you include an external image in your -DVI, e.g., via a PostScript special (i.e., the @samp{graphics} or -@samp{graphicx} package). This switch is overridden by the -@samp{--palette} switch. - -@item -v* -Enable verbose operation. This will currently indicate what fonts is -used, in addition to the usual output. - -@item -x @var{num} -@cindex magnification, overriding DVI -Set the @math{x} magnification ratio to @math{@var{num}/1000}. Overrides -the magnification specified in the DVI file. Must be between 10 and -100000. It is recommended that you use standard magstep values (1095, -1200, 1440, 1728, 2074, 2488, 2986, and so on) to help reduce the total -number of PK files generated. @var{num} may be a real number, not an -integer, for increased precision. - -@item -z @var{num} -@cindex compression -Set the PNG compression level to @var{num}. This option is enabled if -your @samp{libgd} is new enough. The default compression level is 1, -which selects maximum speed at the price of slightly larger PNGs. For an -older @samp{libgd}, the hard-soldered value 5 is used. The include file -@samp{png.h} says -@ifclear man -@quotation -Currently, valid values range from 0 - 9, corresponding directly to the -zlib compression levels 0 - 9 (0 - no compression, 9 - "maximal" -compression). Note that tests have shown that zlib compression levels -3-6 usually perform as well as level 9 for PNG images, and do -considerably fewer calculations. In the future, these values may not -correspond directly to the zlib compression levels. -@end quotation -@end ifclear -@ifset man -``Currently, valid values range from 0 - 9, corresponding directly to -the zlib compression levels 0 - 9 (0 - no compression, 9 - "maximal" -compression). Note that tests have shown that zlib compression levels -3-6 usually perform as well as level 9 for PNG images, and do -considerably fewer calculations. In the future, these values may not -correspond directly to the zlib compression levels.'' -@end ifset -@end table -@c man end - -@node Graphics -@chapter Graphics - -@samp{dvipng} attempts to handle graphics as included by the -@samp{graphicx} and @samp{graphics} packages, without the need of -specifying a driver to these packages. This means that it recognizes -the encapsulated postscript inclusion meant for @samp{dvips}, but is -also able (from version 1.8) to include bitmapped graphics, see the -details below. - -@menu -* Encapsulated PostScript:: An internal call to GhostScript -* Bitmapped graphics:: PNG, JPEG and GIF -@end menu - -@node Encapsulated PostScript -@section Encapsulated PostScript - -When an EPS file is included, a call to GhostScript is performed to -produce a bitmapped image that can be included. The default is to -produce an image with transparent background, at the same size as the -DVI page currently being converted to PNG, and include that as -foreground on the PNG. Of course, if the image is to be cropped, that -is done. The included image will be a truecolor image, so for maximum -performance the output PNG will be in truecolor mode as well. - -This conversion needs the @samp{pngalpha} output device to be present -in your copy of GhostScript. If that device is not present, or you use -the @samp{--palette} switch or request GIF output, the fallback is to -use the @samp{png16m} device to produce a cropped opaque image for -inclusion. Other relevant switches are @samp{--noghostscript} and -@samp{--nogssafer}. @xref{Option details}. - -@cindex PostScript inclusion problems -The most common problem with including graphics is an incorrect -bounding box. Complain to whoever wrote the software that generated -the file if the bounding box is indeed incorrect. An adjusted -boundingbox can be specified in the @samp{\includegraphics} call, as -in this example (using @samp{graphicx}): - -@example -\includegraphics[bb=10 20 100 200]@{imagename.eps@} -@end example - - -@node Bitmapped graphics -@section Bitmapped graphics - -dvipng can include PNG, JPEG and GIF graphics. When including such -images via @samp{\includegraphics} you need to specify the bounding -box since @TeX{} itself cannot read them from the files in question. -The bounding box size should be given as @samp{0 0 w h} in pixels, -e.g., if the file @samp{imagename.png} is 300x400 pixels, the -inclusion would read - -@example -\includegraphics[bb=0 0 300 400]@{imagename.png@} -@end example - -The default size is the image size in bp (``big points'' in TeX -nomenclature or PostScript points as other people have it, 72 per inch). -That is, default resolution will be 72 dpi for included bitmaps, which -is the default size in the few other bitmap-capable drivers that are -known to me (dvipdfm and PDFLaTeX). - -If you want 100 dpi you need to specify the width accordingly. You -just divide your image width by 100: a 135 pixel wide image at 100 dpi -will take up 1.35 inches. If you want 200 dpi you divide by 200, and -so on. Simple, eh? The example above at 200 dpi would be 1.5 inches -wide: - -@example -\includegraphics[bb=0 0 300 400,witdh=1.5in]@{imagename.png@} -@end example - -@node Color -@chapter Color - -To support color, dvipng recognizes a certain set of specials as -generated by the @samp{color} and @samp{xcolor} style files. These -specials start with the keyword @samp{color} or the keyword -@samp{background}, followed by a color specification. - -@menu -* Color specifications:: -* Color specials:: -@end menu - - -@node Color specifications -@section Color specifications - -@cindex color specifications - -The color specification supported by dvipng is by-value or by-name. The -by-value spec starts with the name of a color model (one of @samp{rgb}, -@samp{hsb}, @samp{cmy}, @samp{cmyk}, or @samp{gray}) followed by the -appropriate number of parameters. Thus, the color specification -@samp{rgb 0.3 0.4 0.5} would correspond to the color that is @samp{0.3 -0.4 0.5} in its red, blue and green values. The color model used -internally in dvipng is @samp{RGB} (discretized to 256 levels), for -details on the formulas used in conversion, see the @samp{xcolor} -documentation. - -By-name color specifications are single (case-dependent) words and are -compared with color names defined in @samp{dvipsnam.def} (from the -@samp{graphics} bundle), @samp{svgnam.def} and @samp{xcolor.sty} (from -the @samp{xcolor} bundle). See the @samp{xcolor} documentation for a -list of names and the corresponding colors. - -On the command-line, the name @samp{Transparent} can also be used as -an argument to @samp{--bg} to choose transparent background. -@xref{Option details}. - -@node Color specials -@section Color specials - -We will describe @samp{background} first, since it is the simplest. The -@samp{background} keyword must be followed by a color specification. -That color specification is used as a fill color for the background. The -last @samp{background} special on a page is the one that gets used, and -is used for the whole of the page image. (This is possible because the -prescan phase of dvipng notices all of the color specials so that the -appropriate information can be written out during the second phase.) - -The @samp{color} special itself has three forms. The first is just -@samp{color} followed by a color specification. In this case, the -current global color is set to that color; the color stack must be empty -when such a command is executed. - -The second form is @samp{color push} followed by a color specification. -This saves the current color on the color stack and sets the color to be -that given by the color specification. This is the most common way to -set a color. - -The final form of the @samp{color} special is just @samp{color pop}, -with no color specification; this says to pop the color last pushed on -the color stack from the color stack and set the current color to be -that color. - -dvipng correctly handles these color specials across pages, even when -the pages are rendered repeatedly or in reverse order. - -@node Diagnosing problems -@chapter Diagnosing problems - -@cindex problems -@cindex trouble -@cindex debugging - -You've gone through all the trouble of installing dvipng, carefully read -all the instructions in this manual, and still can't get something to -work. The following sections provide some helpful hints if you find -yourself in such a situation. - -@menu -* Contact information:: Who to ask. -* Debug options:: Getting diagnostics. -@end menu - -@node Contact information -@section Contact information - -Bug reports should be sent to -@email{dvipng@@nongnu.org}. - -Questions, suggestions for new features, pleas for help, and/or praise -should go to @email{dvipng@@nongnu.org}. For more information on this -mailing list, send a message with just the word `help' as subject or -body to @email{dvipng-request@@nongnu.org} or look at -@url{http://lists.nongnu.org/mailman/listinfo/dvipng}. - -Offers to support further development will be appreciated. For developer -access, ask on @email{dvipng@@nongnu.org}. - -For details on the @TeX{} path-searching library, and @code{mktexpk} -problems, @pxref{Common problems,,, kpathsea, Kpathsea}. - - -@node Debug options -@section Debug options - -The @samp{-d} flag to dvipng helps in tracking down certain errors. The -parameter to this flag is an integer that tells what errors are -currently being tracked. To track a certain class of debug messages, -simply provide the appropriate number given below; if you wish to track -multiple classes, sum the numbers of the classes you wish to track. To -track all classes, you can use @code{-1}. - -Some of these debugging options are actually provided by Kpathsea -(@pxref{Debugging, , , kpathsea, Kpathsea}). - -The classes are: -@table @asis -@item 1 -Normal dvi op-codes -@item 2 -Virtual fonts -@item 4 -PK fonts -@item 8 -TFM files -@item 16 -Glyph rendering -@item 32 -FreeType calls -@item 64 -Encoding loads -@item 128 -Color specials -@item 256 -GhostScript specials -@item 512 -T1lib calls -@item 1024 -Kpathsea @code{stat} calls -@item 2048 -Kpathsea hash table lookups -@item 4096 -Kpathsea path element expansion -@item 8192 -Kpathsea path searches -@ignore -@item 16384 -@end ignore - -@end table - -@node Credits -@chapter Credits - -A number of persons have contributed, if I forget to mention someone, -I apologize. First and foremost we have David Kastrup whose -@previewlatex{} project provided the incentive to write this program. -There is also a number of people who have contributed by reporting -bugs and suggesting improvements as the thing has evolved. These -include but is perhaps not limited to (in semi-random order): Thomas -Esser (te@TeX{}), Christian Schenk (MIK@TeX{}), Brian R Furry (debian -package), Angus Leeming (LyX), Thomas Boutell (libgd), John Jones -(first user report), Uwe Kern (xcolor), Karl Berry (@TeX{} Live), -David Harvey (hinting in Freetype), Neal Harmon, Alan Shutko, Reiner -Stieb, Nick Alcock, Adam Buchbinder, Svend Tollak Munkejord, James -Longstreet, Bernhard Simon, Bob McElrath, Georg Schwarz, Jason Farmer, -Brian V. Smith, Samuel Hathaway, Thomas R. Shemanske, Stephen Gibson, -Christian Ridderstr@"om, Ezra Peisach, William H Wheeler, Thomas -Klausner, Harald Koenig, Adrian Bunk, Kevin Smith, Jason Riedy, -Wolfram Krause, Reinhard Kotucha, and Takeshi Abe. - -@ifset man -@c man begin NOTES -The full manual is accessible in the info format, on most systems by typing -@example -info dvipng -@end example -@c man end -@c man begin COPYRIGHT -This program is released under the GNU Lesser General Public License -version 3, see the COPYING file in the dvipng distribution or -@url{http://www.gnu.org/licenses/gpl.html}. - -Copyright @copyright{} 2002-2008 Jan-@AA{}ke Larsson -@c man end -@end ifset - -@node Copying -@chapter Copying - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with this program. If not, see -. - -@sp 2 -@noindent -Copyright @copyright{} 2002-2008 Jan-@AA{}ke Larsson - -@node Index -@unnumbered Index - -@printindex cp -@bye - diff --git a/Build/source/texk/dvipng/enc.c b/Build/source/texk/dvipng/enc.c index 0ca2677c684..677799886b0 100644 --- a/Build/source/texk/dvipng/enc.c +++ b/Build/source/texk/dvipng/enc.c @@ -26,7 +26,7 @@ struct encoding* encodingp=NULL; -struct encoding* InitEncoding(char* encoding) +static struct encoding* InitEncoding(char* encoding) { char *pos,*max,*buf,*enc_file; int i; diff --git a/Build/source/texk/dvipng/font.c b/Build/source/texk/dvipng/font.c index b4fb9d82978..048395b8811 100644 --- a/Build/source/texk/dvipng/font.c +++ b/Build/source/texk/dvipng/font.c @@ -38,7 +38,7 @@ void CheckChecksum(uint32_t c1, uint32_t c2, const char* name) } -double ActualFactor(uint32_t unmodsize) +static double ActualFactor(uint32_t unmodsize) /* compute the actual size factor given the approximation */ /* actually factor * 1000 */ { @@ -189,7 +189,7 @@ void FontDef(unsigned char* command, void* parent) } #ifdef HAVE_FT2_OR_LIBT1 -char* kpse_find_t1_or_tt(char* filename) +static char* kpse_find_t1_or_tt(char* filename) { char* filepath = kpse_find_file(filename, kpse_type1_format, false); #ifdef HAVE_FT2 @@ -200,7 +200,7 @@ char* kpse_find_t1_or_tt(char* filename) } #endif -void FontFind(struct font_entry * tfontptr) +static void FontFind(struct font_entry * tfontptr) { #ifdef HAVE_LIBKPATHSEA kpse_glyph_file_type font_ret; @@ -300,7 +300,7 @@ void FontFind(struct font_entry * tfontptr) } -void DoneFont(struct font_entry *tfontp) +static void DoneFont(struct font_entry *tfontp) { switch (tfontp->type) { case FONT_TYPE_PK: diff --git a/Build/source/texk/dvipng/fontmap.c b/Build/source/texk/dvipng/fontmap.c index ea6e15c4009..fa88f7b5cab 100644 --- a/Build/source/texk/dvipng/fontmap.c +++ b/Build/source/texk/dvipng/fontmap.c @@ -30,7 +30,7 @@ static struct filemmap ttfont_mmap; #endif static struct psfontmap *psfontmap=NULL; -char* newword(char** buffer, char* end) +static char* newword(char** buffer, char* end) { char *word,*pos=*buffer; @@ -55,7 +55,7 @@ char* copyword(char* orig) return(word); } -char* find_format(char* name) +static char* find_format(char* name) { /* Cater for both new (first case) and old (second case) kpathsea */ char* format = @@ -134,7 +134,7 @@ struct psfontmap *NewPSFont(struct psfontmap* copyfrom) return(newentry); } -struct psfontmap *SearchPSFontMap(char* fontname, +static struct psfontmap *SearchPSFontMap(char* fontname, struct filemmap* search_mmap) { static char *pos=NULL,*end=NULL; @@ -196,7 +196,7 @@ void ClearPSFontMap(void) #endif } -void ReadPSFontMap(struct psfontmap *entry) +static void ReadPSFontMap(struct psfontmap *entry) { char *pos,*end,*psname; int nameno = 0; diff --git a/Build/source/texk/dvipng/ft.c b/Build/source/texk/dvipng/ft.c index dceff74bf75..10274a6db6a 100644 --- a/Build/source/texk/dvipng/ft.c +++ b/Build/source/texk/dvipng/ft.c @@ -145,7 +145,7 @@ bool InitFT(struct font_entry * tfontp) } -void UnLoadFT(struct char_entry *ptr) +static void UnLoadFT(struct char_entry *ptr) { if (ptr->data!=NULL) free(ptr->data); diff --git a/Build/source/texk/dvipng/help/Makefile.am b/Build/source/texk/dvipng/help/Makefile.am new file mode 100644 index 00000000000..f9291eeae98 --- /dev/null +++ b/Build/source/texk/dvipng/help/Makefile.am @@ -0,0 +1,26 @@ +## Makefile.am for the TeX Live subdirectory texk/dvipng/help/ +## +## Copyright (C) 2009 Peter Breitenlohner +## You may freely use, modify and/or distribute this file. +## +DVIPNG_HELP = $(top_srcdir)/doc/dvipng.help + +all-local: help-stamp $(DVIPNG_HELP) + +# If dvipng.help is to be rebuilt, this would fail for a read-only source +# directory, but rebuilding dvipng.info would equally fail. +# Do not even try to rebuild dvipng.help if help-stamp is up to date. +$(DVIPNG_HELP): + $(MAKE) $(AM_MAKEFLAGS) help-stamp +help-stamp: ../dvipng$(EXEEXT) + -(cd .. && ./dvipng) | \ + sed -e's/ (dvipng) / /' -e's,/lt-dvipng ,/dvipng ,' \ + -e's,^This is .*/dvipng ,This is ./dvipng ,' \ + -e's,^Usage: .*/dvipng ,Usage: ./dvipng ,' > dvipng.tmp + ( test -r $(DVIPNG_HELP) && diff dvipng.tmp $(DVIPNG_HELP) ) \ + || cp dvipng.tmp $(DVIPNG_HELP) + rm -f dvipng.tmp + echo timestamp >$@ + +DISTCLEANFILES = help-stamp + diff --git a/Build/source/texk/dvipng/help/Makefile.in b/Build/source/texk/dvipng/help/Makefile.in new file mode 100644 index 00000000000..3345d0c36c1 --- /dev/null +++ b/Build/source/texk/dvipng/help/Makefile.in @@ -0,0 +1,409 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = help +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gs-device.m4 \ + $(top_srcdir)/m4/makeinfo.m4 \ + $(top_srcdir)/../../m4/kpse-common.m4 \ + $(top_srcdir)/../../m4/kpse-freetype2-flags.m4 \ + $(top_srcdir)/../../m4/kpse-gd-flags.m4 \ + $(top_srcdir)/../../m4/kpse-kpathsea-flags.m4 \ + $(top_srcdir)/../../m4/kpse-libpng-flags.m4 \ + $(top_srcdir)/../../m4/kpse-t1lib-flags.m4 \ + $(top_srcdir)/../../m4/kpse-warnings.m4 \ + $(top_srcdir)/../../m4/kpse-zlib-flags.m4 \ + $(top_srcdir)/../../m4/libtool.m4 \ + $(top_srcdir)/../../m4/ltoptions.m4 \ + $(top_srcdir)/../../m4/ltsugar.m4 \ + $(top_srcdir)/../../m4/ltversion.m4 \ + $(top_srcdir)/../../m4/lt~obsolete.m4 \ + $(top_srcdir)/ac/dvipng.ac $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/../../build-aux/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_MAKEINFOFLAGS = @AM_MAKEINFOFLAGS@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FREETYPE2_DEPEND = @FREETYPE2_DEPEND@ +FREETYPE2_INCLUDES = @FREETYPE2_INCLUDES@ +FREETYPE2_LIBS = @FREETYPE2_LIBS@ +FT2_CONFIG = @FT2_CONFIG@ +GD_DEPEND = @GD_DEPEND@ +GD_INCLUDES = @GD_INCLUDES@ +GD_LIBS = @GD_LIBS@ +GREP = @GREP@ +GS = @GS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_INFO = @INSTALL_INFO@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ +KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ +KPATHSEA_LIBS = @KPATHSEA_LIBS@ +KPSEWHICH = @KPSEWHICH@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBPNG_DEPEND = @LIBPNG_DEPEND@ +LIBPNG_INCLUDES = @LIBPNG_INCLUDES@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POW_LIB = @POW_LIB@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +T1LIB_DEPEND = @T1LIB_DEPEND@ +T1LIB_INCLUDES = @T1LIB_INCLUDES@ +T1LIB_LIBS = @T1LIB_LIBS@ +VERSION = @VERSION@ +WARNING_CFLAGS = @WARNING_CFLAGS@ +ZLIB_DEPEND = @ZLIB_DEPEND@ +ZLIB_INCLUDES = @ZLIB_INCLUDES@ +ZLIB_LIBS = @ZLIB_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +DVIPNG_HELP = $(top_srcdir)/doc/dvipng.help +DISTCLEANFILES = help-stamp +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign help/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign help/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile all-local +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am all-local check check-am clean clean-generic \ + clean-libtool distclean distclean-generic distclean-libtool \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am + + +all-local: help-stamp $(DVIPNG_HELP) + +# If dvipng.help is to be rebuilt, this would fail for a read-only source +# directory, but rebuilding dvipng.info would equally fail. +# Do not even try to rebuild dvipng.help if help-stamp is up to date. +$(DVIPNG_HELP): + $(MAKE) $(AM_MAKEFLAGS) help-stamp +help-stamp: ../dvipng$(EXEEXT) + -(cd .. && ./dvipng) | \ + sed -e's/ (dvipng) / /' -e's,/lt-dvipng ,/dvipng ,' \ + -e's,^This is .*/dvipng ,This is ./dvipng ,' \ + -e's,^Usage: .*/dvipng ,Usage: ./dvipng ,' > dvipng.tmp + ( test -r $(DVIPNG_HELP) && diff dvipng.tmp $(DVIPNG_HELP) ) \ + || cp dvipng.tmp $(DVIPNG_HELP) + rm -f dvipng.tmp + echo timestamp >$@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/Build/source/texk/dvipng/install.texi b/Build/source/texk/dvipng/install.texi deleted file mode 100644 index c58f9af6013..00000000000 --- a/Build/source/texk/dvipng/install.texi +++ /dev/null @@ -1,203 +0,0 @@ -@c install.texi -@c -@c Part of the dvipng distribution - -@include macros.texi -@ifset rawfile -@chapter Installing dvipng - -@end ifset -@c ----------------------- -Installing dvipng should be simple: merely @code{./configure}, -@code{make}, and @code{make install}. - -@ifclear rawfile -@menu -* Prerequisites:: -* Configure:: -* Build/install:: -* Installation outside the texmf tree:: -* Advice for non-privileged users:: -@end menu -@end ifclear - -@node Prerequisites -@section Prerequisites - -@itemize @bullet -@item The GD Graphics Draw library, libgd - -The drawing library @samp{libgd} is necessary, and is downloadable at -@uref{http://www.boutell.com/gd}, and there are binary packages for -most operating systems from their respective distributors. In any -case, the latest version of the library installs using @samp{autoconf} -so it should not be difficult for you to install it from source, and -then proceed with installing dvipng. - -@item The path-searching library kpathsea - -Kpathsea is most likely included in your @LaTeX{} installation, but it -may happen that ./configure does not find it; see below. If you do not -have it, download it from @uref{http://www.ctan.org} and compile it. -I have no experience with this, so I cannot help much here. - -@item The font-rendering library FreeType 2 - -While not strictly necessary, a recent FreeType 2 is recommended since -dvipng currently will produce better-quality images when this library is -available. To take advantage of this, you should have at least FreeType -2.1.9. - -FreeType 2 will enable direct support for PostScript and TrueType fonts, -so that dvipng will not need to generate bitmapped variants on disk of -the @TeX{} fonts since modern @TeX{} distributions include PostScript -versions of them. Then, you can render images at different (and unusual) -resolutions without cluttering the disk with lots of bitmapped fonts. - -Finally, it will enable subfont support in dvipng. That is, if you want -to render CJK-@LaTeX{} characters, you must have FreeType 2 installed. - -@item The font-rendering library T1lib - -An alternative to FreeType 2 is T1lib, but this will enable only -PostScript fonts in dvipng and will not include subfont support. Also -here, you can render images at different (and unusual) resolutions -without cluttering the disk with lots of bitmapped fonts. If both -FreeType 2 and T1lib are present, FreeType will be internally -preferred by dvipng but T1lib can be chosen at runtime. - -@item libpng and libz - -To be able to compress and write PNG files to disk, dvipng (or really -libgd) uses libpng which in turn uses libz. These should be available on -any modern system, if not, download them and install them. - -@item The @code{texinfo} package - -This is needed for building the documentation. -@end itemize - -@node Configure -@section Configure - -The first step is to configure the source code, telling it where -various files will be. To do so, run - -@example -./configure @var{options} -@end example - -(Note: if you have fetched dvipng from CVS rather than a regular -release, you will have to first generate @file{./configure} by running -@code{autoconf} 2.53 or later.) - -On many machines, you will not need to specify any options, but if -@code{configure} cannot determine something on its own, you'll need to -help it out. For a list of the options type - -@example -./configure --help -@end example - -On some machines, the libraries will be installed in directories that -are not in the linker's search path. This will generate an error when -running @file{./configure}, indicating that it cannot find libgd or -libkpathsea (most likely). You then need to specify the path to the -respective library's object files. They are typically called e.g., -@file{libgd.a} or @file{libgd.so}. If they are located in e.g., -@file{/sw/local/lib}, do - -@example -./configure LDFLAGS=-L/sw/local/lib -@end example - -If the library is available as a shared object file (@file{.so}), the -runtime linker may also need to be told where to find the library, -then use - -@example -./configure LDFLAGS='-L/sw/local/lib -R/sw/local/lib' -@end example - -When either of these is necessary, it is likely that the C header -files are also installed in directories that are not in the C -preprocessor's search path. This will also generate an error when -running @file{./configure}, indicating that it cannot find e.g., -@file{gd.h} or @file{kpathsea.h} (most likely). You then need to -specify the path to the respective library's C header files. If they -are located in e.g., @file{/sw/local/include}, do - -@example -./configure CPPFLAGS=-I/sw/local/include -@end example - -On my SUN Solaris workstation, I had to combine this into - -@example -./configure CPPFLAGS='-I/sw/local/include -I/sw/tex/teTeX/1.0/include'\ - LDFLAGS='-L/sw/local/lib -R/sw/local/lib -L/sw/tex/teTeX/1.0/lib/' -@end example - -@noindent -where the backslash denotes a continuation of the line. - -@node Build/install -@section Build/install - -Once @file{configure} has been run, simply enter - -@example -make -@end example - -@noindent -at the prompt to compile the C code, and build the documentation files. -To install the files into the locations chosen earlier, type - -@example -make install -@end example - -@noindent -You may need special privileges to install, e.g., if you are installing -into system directories. - -@node Installation outside the texmf tree -@section Installation outside the texmf tree - -In some cases, a dvipng binary installed outside the texmf tree will -not be able to find virtual fonts, or the PostScript font maps -(normally used by dvips). This may be because @emph{only} -$SELFAUTOLOC, $SELFAUTODIR, and $SELFAUTOPARENT are used in the texmf -tree configuration file @samp{texmf.cnf}. If so, give the switch -@samp{--enable-selfauto-set} to @samp{./configure}. This will make -dvipng adjust these three internally so that kpathsea thinks that -dvipng @emph{is} installed in the texmf tree. - -@node Advice for non-privileged users -@section Installation for non-privileged users - -Often people without system administration privileges want to install -software for their private use. In that case you need to specify more -options to the @file{configure} script, usually this is done by using -the @samp{--prefix} option to the @file{configure} script, and let it -point to the personal home directory. In that way, resulting binaries -will be installed under the @file{bin} subdirectory of your home -directory, manual pages under @file{man} and so on. That way, it is -reasonably easy to maintain a bunch of additional packages, since the -prefix argument is supported by most @file{configure} scripts. - -You'll have to add something like @file{/home/myself/bin} to your -@code{PATH} shell variable, if it isn't there already, and similarly -set the @code{INFOPATH} and @code{MANPATH} variables to be able to -access the documentation. - -@ifset rawfile -@section Copying - -This program is released under the GNU Lesser General Public License -version 3, see the COPYING file in the dvipng distribution or -@url{http://www.gnu.org/licenses/}. - -Copyright @copyright{} 2002-2009 Jan-@AA{}ke Larsson -@end ifset diff --git a/Build/source/texk/dvipng/m4/gs-device.m4 b/Build/source/texk/dvipng/m4/gs-device.m4 index f0ed6671a0f..dcd0dea1f8b 100644 --- a/Build/source/texk/dvipng/m4/gs-device.m4 +++ b/Build/source/texk/dvipng/m4/gs-device.m4 @@ -1,10 +1,10 @@ -# gs-device.m4 - Macro to check for GS devices. +# gs-device.m4 - Macros to check for GS devices. ## Copyright (C) 20xx Some One ## Some affiliation ## -## Temporary notice: -## I extracted this macro from aclocal.m4 in the dvipng-1.9 distribution -## and renamed it in order not to violate the Autoconf (AC_) namespace. +## Notice: +## I extracted these macros from aclocal.m4 in the dvipng-1,12 distribution +## and renamed one in order not to violate the Autoconf (AC_) namespace. ## 26 Mar 2008, Peter Breitenlohner ## ## This file is free software; the copyright holder gives unlimited @@ -13,17 +13,34 @@ # serial 1 -# xx_GS_HAS_DEVICE(DEVICE, ACTION-IF-FAILED) -# ------------------------------------------ -# Check if GS has the device DEVICE and execute the shell code -# ACTION-IF-FAILED if not. -AC_DEFUN([xx_GS_HAS_DEVICE], - [AC_MSG_CHECKING([whether $GS has the $1 device]) - if $GS -h | grep $1 >/dev/null; then - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - $2 - fi -])# xx_GS_HAS_DEVICE +# GS_CHECK_DEVICES +# ---------------- +# Check GS (ghostscript) devices. +AC_DEFUN([GS_CHECK_DEVICES], +[GS_WARN= +_GS_HAS_DEVICE([pngalpha], + [GS_WARN="Your EPS inclusions will be cropped to the + boundingbox, and rendered on an opaque background. + Upgrade GhostScript to avoid this." + _GS_HAS_DEVICE([png16m], + [GS_WARN="Your EPS inclusions may not work. + Upgrade/install GhostScript to avoid this."])]) +if test -n "$GS_WARN"; then + AC_MSG_WARN([$GS_WARN]) +fi +]) # GS_CHECK_DEVICES + +# _GS_HAS_DEVICE(DEVICE, ACTION-IF-FAILED) +# ---------------------------------------- +# Internal subroutine. Check if GS has the device DEVICE and +# execute the shell code ACTION-IF-FAILED if not. +m4_define([_GS_HAS_DEVICE], +[AC_MSG_CHECKING([whether $GS has the $1 device]) +if $GS -h | grep $1 >/dev/null; then + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) + $2 +fi +])# _GS_HAS_DEVICE diff --git a/Build/source/texk/dvipng/macros.texi b/Build/source/texk/dvipng/macros.texi deleted file mode 100644 index 3c90a59eb15..00000000000 --- a/Build/source/texk/dvipng/macros.texi +++ /dev/null @@ -1,61 +0,0 @@ -@ignore -macros.texi - -Part of the dvipng distribution - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with this program. If not, see -. - -Copyright @copyright{} 2002-2008 Jan-@AA{}ke Larsson -@end ignore - -@ifclear macros -@set macros -@macro AUCTeX {} -AUC@TeX{} -@end macro -@ifnottex -@macro LaTeX {} -La@TeX{} -@end macro -@macro previewlatex {} -preview-latex -@end macro -@ifset no-acronym -@clear no-acronym -@macro acronym {text} -@sc{\text\} -@end macro -@end ifset -@ifset no-env -@clear no-env -@macro env {text} -@code{\text\} -@end macro -@end ifset -@ifset no-option -@clear no-option -@macro option {text} -@samp{\text\} -@end macro -@end ifset -@end ifnottex -@tex -\gdef\LaTeX{L\kern-.36em\raise.3ex\hbox{\sc{a}}\kern-.15em\TeX} -\gdef\previewlatex{Preview-\LaTeX} -\ifx\acronym\undefined \gdef\acronym#1{{\smallcaps \lowercase{#1}}} \fi -\ifx\env\undefined \global\let\env=\code \fi -\ifx\option\undefined \global\let\option=\samp \fi -@end tex -@end ifclear diff --git a/Build/source/texk/dvipng/papersiz.c b/Build/source/texk/dvipng/papersiz.c index 317ea408036..749035df10e 100644 --- a/Build/source/texk/dvipng/papersiz.c +++ b/Build/source/texk/dvipng/papersiz.c @@ -36,7 +36,7 @@ const int32_t lengthsp[]={ 1L, 65536L, 65782L, * Advance the passed pointer as well. */ -int32_t myatodim(char ** p) +static int32_t myatodim(char ** p) { double tmp; /* double accuracy is enough, I think */ int i=0; diff --git a/Build/source/texk/dvipng/pk.c b/Build/source/texk/dvipng/pk.c index f2d6eb0a70a..2bb425987e8 100644 --- a/Build/source/texk/dvipng/pk.c +++ b/Build/source/texk/dvipng/pk.c @@ -35,7 +35,7 @@ unsigned char dyn_f; int repeatcount; int poshalf; -unsigned char getnyb(unsigned char** pos) +static unsigned char getnyb(unsigned char** pos) { if (poshalf == 0) { poshalf=1; @@ -46,7 +46,7 @@ unsigned char getnyb(unsigned char** pos) } } -uint32_t pk_packed_num(unsigned char** pos) +static uint32_t pk_packed_num(unsigned char** pos) { register int i; uint32_t j; @@ -77,7 +77,7 @@ uint32_t pk_packed_num(unsigned char** pos) } } -unsigned char* skip_specials(unsigned char* pos) +static unsigned char* skip_specials(unsigned char* pos) { uint32_t i; @@ -384,7 +384,7 @@ void InitPK(struct font_entry * tfontp) } } -void UnLoadPK(struct char_entry *ptr) +static void UnLoadPK(struct char_entry *ptr) { if (ptr->data!=NULL) free(ptr->data); diff --git a/Build/source/texk/dvipng/ppagelist.c b/Build/source/texk/dvipng/ppagelist.c index 4621bb7b7c8..deccb96a70f 100644 --- a/Build/source/texk/dvipng/ppagelist.c +++ b/Build/source/texk/dvipng/ppagelist.c @@ -107,7 +107,7 @@ bool InPageList(int32_t i) return(false); } -void ListPage(int32_t pslow, int32_t pshigh) +static void ListPage(int32_t pslow, int32_t pshigh) { register struct pp_list *pl; diff --git a/Build/source/texk/dvipng/readme.texi b/Build/source/texk/dvipng/readme.texi deleted file mode 100644 index 378333376ae..00000000000 --- a/Build/source/texk/dvipng/readme.texi +++ /dev/null @@ -1,161 +0,0 @@ -@c readme.texi -@c -@c Part of the dvipng distribution - -@ifclear man -@include macros.texi -@ifset rawfile -@chapter dvipng - -@end ifset -@end ifclear -@c ----------------------- - -This program makes PNG and/or GIF graphics from DVI files as obtained -from @TeX{} and its relatives. - -If GIF support is enabled, GIF output is chosen by using the -@samp{dvigif} binary or with the @samp{--gif} option. - -@ifclear man - -It is intended to produce anti-aliased screen-resolution images as fast -as is possible. The target audience is people who need to generate and -regenerate many images again and again. The primary target is the -@previewlatex{} (X)Emacs package, a package to preview formulas from -within (X)Emacs. Yes, you get to see your formulas in the (X)Emacs -buffer, see @url{http://www.gnu.org/software/auctex/preview-latex.html}. - -Another example is WeBWorK, an internet-based method for delivering -homework problems to students over the internet, giving students -instant feedback as to whether or not their answers are correct, see -@url{http://webwork.math.rochester.edu}. - -A more recent addition to the dvipng-using applications out there is -MediaWiki, the software behind Wikipedia and many other wikis out -there. Dvipng is used to render mathematical formulae from version -1.8.0 of MediaWiki, see @url{http://www.mediawiki.org}. - -Other applications may also benefit, like web applications as latex2html -and WYSIWYG editors like LyX. - -@ifset rawfile -@section Benefits of dvipng -@end ifset -@end ifclear - -The benefits of @samp{dvipng}/@samp{dvigif} include - -@itemize @bullet -@item -Speed. It is a very fast bitmap-rendering code for DVI files, which -makes it suitable for generating large amounts of images on-the-fly, -as needed in @previewlatex{}, WeBWorK and others. - -@item -It does not read the postamble, so it can be started before @TeX{} -finishes. There is a @samp{--follow} switch that makes dvipng wait at -end-of-file for further output, unless it finds the POST marker that -indicates the end of the DVI. - -@item -Interactive query of options. dvipng can read options interactively -through stdin, and all options are usable. It is even possible to change -the input file through this interface. - -@item -Supports PK, VF, PostScript Type1, and TrueType fonts, subfonts (i.e., -as used in CJK-@LaTeX{}), color specials, and inclusion of PostScript, -PNG, JPEG or GIF images. - -@item -and more... - -@end itemize - -@ifset rawfile -@section Installation - -Read @file{INSTALL}, included in the distribution. - -@section Usage - -To use dvipng at its simplest, simply type - -@example -dvipng foo -@end example - -@noindent -where @file{foo.dvi} is the output of @TeX{} that you want to convert to -PNG format. If there are four pages in @file{foo.dvi}, those pages will -be output as @file{foo1.png}, @file{foo2.png}, @file{foo3.png}, and -@file{foo4.png}, respectively. - -Many options are available (see the info manual). For a brief summary -of available options, just type - -@example -dvipng --help -@end example - -@section Availability - -The dvipng package is available at Savannah, the GNU project site. Since -dvipng is not part of the GNU project, although released under the GNU -GPL, the web address is -@url{http://savannah.nongnu.org/projects/dvipng}. Instructions for -anonymous CVS access can be found at -@url{http://savannah.nongnu.org/cvs/?group=dvipng}. - -@section Contacts - -Bug reports should be sent to @email{dvipng@@nongnu.org}. - -Questions, suggestions for new features, pleas for help, and/or praise -should go to @email{dvipng@@nongnu.org}. For more information on this -mailing list, send a message with just the word `help' as subject or -body to @email{dvipng-request@@nongnu.org} or look at -@url{http://lists.nongnu.org/mailman/listinfo/dvipng}. - -Offers to support further development will be appreciated. For developer -access, ask on @email{dvipng@@nongnu.org}. - -@section Copying - -This program is released under the GNU Lesser General Public License -version 3, see the COPYING file in the dvipng distribution or -@url{http://www.gnu.org/licenses/}. - -Copyright @copyright{} 2002-2009 Jan-@AA{}ke Larsson - -@section Todo - -@itemize @bullet -@item -Use gs interpreter library for speed and possibly for functionality. - -@item -Add more color models for xcolor compatibility - -@item -Fix T1lib and PK rendering so it is on par with Freetype. - -@item -Enable a named pipe as DVI - -@item -Further speed improvements. - -@item -Other output specials and source specials. - -@item -Clean internal structures. Overhaul file handling. - -@item -Fix the SELFAUTO stuff at runtime rather than at build time -@end itemize - - -@end ifset diff --git a/Build/source/texk/dvipng/set.c b/Build/source/texk/dvipng/set.c index 0a9693fed0c..050dbedea11 100644 --- a/Build/source/texk/dvipng/set.c +++ b/Build/source/texk/dvipng/set.c @@ -84,7 +84,7 @@ void CreateImage(pixels x_width,pixels y_width) } -void ChangeColor(gdImagePtr imagep,int x1,int y1, +static void ChangeColor(gdImagePtr imagep,int x1,int y1, int x2,int y2,int color1,int color2) /* In the given rectangle, change color1 to color2 */ { diff --git a/Build/source/texk/dvipng/sfd.c b/Build/source/texk/dvipng/sfd.c index ea9f2fe456d..08330e0dbc3 100644 --- a/Build/source/texk/dvipng/sfd.c +++ b/Build/source/texk/dvipng/sfd.c @@ -25,7 +25,7 @@ #include "dvipng.h" struct subfont* subfontp=NULL; -struct subfont* ReadSubfont(char* sfdname, char *infix) +static struct subfont* ReadSubfont(char* sfdname, char *infix) { char *pos,*max,*sfdfile=NULL; struct subfont* sfdp=NULL; diff --git a/Build/source/texk/dvipng/special.c b/Build/source/texk/dvipng/special.c index 45a97d92af1..d1f55b5b79e 100644 --- a/Build/source/texk/dvipng/special.c +++ b/Build/source/texk/dvipng/special.c @@ -40,7 +40,7 @@ struct pscode { struct pscode* psheaderp=NULL; /* static, DVI-specific header list */ -void PSCodeInit(struct pscode *entry, char *special) +static void PSCodeInit(struct pscode *entry, char *special) { entry->next=NULL; entry->special=special; @@ -91,7 +91,7 @@ void ClearPSHeaders(void) } } -void writepscode(struct pscode* pscodep, FILE* psstream) +static void writepscode(struct pscode* pscodep, FILE* psstream) { while (pscodep!=NULL) { if (pscodep->code!=NULL) { @@ -131,7 +131,7 @@ void writepscode(struct pscode* pscodep, FILE* psstream) } -gdImagePtr +static gdImagePtr ps2png(struct pscode* pscodep, char *device, int hresolution, int vresolution, int llx, int lly, int urx, int ury, int bgred, int bggreen, int bgblue) { @@ -274,7 +274,7 @@ ps2png(struct pscode* pscodep, char *device, int hresolution, int vresolution, return psimage; } -gdImagePtr +static gdImagePtr rescale(gdImagePtr psimage, int pngwidth, int pngheight) { gdImagePtr scaledimage=psimage; @@ -305,7 +305,7 @@ rescale(gdImagePtr psimage, int pngwidth, int pngheight) return(scaledimage); } -void newpsheader(char* special) { +static void newpsheader(char* special) { struct pscode* tmp; char* txt; diff --git a/Build/source/texk/dvipng/t1.c b/Build/source/texk/dvipng/t1.c index 85803a47bb2..84a15a5bf67 100644 --- a/Build/source/texk/dvipng/t1.c +++ b/Build/source/texk/dvipng/t1.c @@ -164,7 +164,7 @@ bool InitT1(struct font_entry * tfontp) } -void UnLoadT1(struct char_entry *ptr) +static void UnLoadT1(struct char_entry *ptr) { if (ptr->data!=NULL) free(ptr->data); diff --git a/Build/source/texk/dvipng/texi2pod.pl b/Build/source/texk/dvipng/texi2pod.pl deleted file mode 100755 index 9c6d8cc2792..00000000000 --- a/Build/source/texk/dvipng/texi2pod.pl +++ /dev/null @@ -1,444 +0,0 @@ -#! /usr/bin/env perl - -# Copyright (C) 1999, 2000, 2001, 2003, 2007 Free Software -# Foundation, Inc. - -# This file is part of GCC. - -# GCC is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. - -# GCC is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with GCC. If not, see . - -# This does trivial (and I mean _trivial_) conversion of Texinfo -# markup to Perl POD format. It's intended to be used to extract -# something suitable for a manpage from a Texinfo document. - -use warnings; - -$output = 0; -$skipping = 0; -%sects = (); -$section = ""; -@icstack = (); -@endwstack = (); -@skstack = (); -@instack = (); -$shift = ""; -%defs = (); -$fnno = 1; -$inf = ""; -$ibase = ""; - -while ($_ = shift) { - if (/^-D(.*)$/) { - if ($1 ne "") { - $flag = $1; - } else { - $flag = shift; - } - $value = ""; - ($flag, $value) = ($flag =~ /^([^=]+)(?:=(.+))?/); - die "no flag specified for -D\n" - unless $flag ne ""; - die "flags may only contain letters, digits, hyphens, dashes and underscores\n" - unless $flag =~ /^[a-zA-Z0-9_-]+$/; - $defs{$flag} = $value; - } elsif (/^-/) { - usage(); - } else { - $in = $_, next unless defined $in; - $out = $_, next unless defined $out; - usage(); - } -} - -if (defined $in) { - $inf = gensym(); - open($inf, "<$in") or die "opening \"$in\": $!\n"; - $ibase = $1 if $in =~ m|^(.+)/[^/]+$|; -} else { - $inf = \*STDIN; -} - -if (defined $out) { - open(STDOUT, ">$out") or die "opening \"$out\": $!\n"; -} - -while(defined $inf) { -while(<$inf>) { - # Certain commands are discarded without further processing. - /^\@(?: - [a-z]+index # @*index: useful only in complete manual - |need # @need: useful only in printed manual - |(?:end\s+)?group # @group .. @end group: ditto - |page # @page: ditto - |node # @node: useful only in .info file - |(?:end\s+)?ifnottex # @ifnottex .. @end ifnottex: use contents - )\b/x and next; - - chomp; - - # Look for filename and title markers. - /^\@setfilename\s+([^.]+)/ and $fn = $1, next; - /^\@settitle\s+([^.]+)/ and $tl = postprocess($1), next; - - # Identify a man title but keep only the one we are interested in. - /^\@c\s+man\s+title\s+([A-Za-z0-9-]+)\s+(.+)/ and do { - if (exists $defs{$1}) { - $fn = $1; - $tl = postprocess($2); - } - next; - }; - - # Look for blocks surrounded by @c man begin SECTION ... @c man end. - # This really oughta be @ifman ... @end ifman and the like, but such - # would require rev'ing all other Texinfo translators. - /^\@c\s+man\s+begin\s+([A-Z]+)\s+([A-Za-z0-9-]+)/ and do { - $output = 1 if exists $defs{$2}; - $sect = $1; - next; - }; - /^\@c\s+man\s+begin\s+([A-Z]+)/ and $sect = $1, $output = 1, next; - /^\@c\s+man\s+end/ and do { - $sects{$sect} = "" unless exists $sects{$sect}; - $sects{$sect} .= postprocess($section); - $section = ""; - $output = 0; - next; - }; - - # handle variables - /^\@set\s+([a-zA-Z0-9_-]+)\s*(.*)$/ and do { - $defs{$1} = $2; - next; - }; - /^\@clear\s+([a-zA-Z0-9_-]+)/ and do { - delete $defs{$1}; - next; - }; - - next unless $output; - - # Discard comments. (Can't do it above, because then we'd never see - # @c man lines.) - /^\@c\b/ and next; - - # End-block handler goes up here because it needs to operate even - # if we are skipping. - /^\@end\s+([a-z]+)/ and do { - # Ignore @end foo, where foo is not an operation which may - # cause us to skip, if we are presently skipping. - my $ended = $1; - next if $skipping && $ended !~ /^(?:ifset|ifclear|ignore|menu|iftex|copying)$/; - - die "\@end $ended without \@$ended at line $.\n" unless defined $endw; - die "\@$endw ended by \@end $ended at line $.\n" unless $ended eq $endw; - - $endw = pop @endwstack; - - if ($ended =~ /^(?:ifset|ifclear|ignore|menu|iftex)$/) { - $skipping = pop @skstack; - next; - } elsif ($ended =~ /^(?:example|smallexample|display)$/) { - $shift = ""; - $_ = ""; # need a paragraph break - } elsif ($ended =~ /^(?:itemize|enumerate|[fv]?table)$/) { - $_ = "\n=back\n"; - $ic = pop @icstack; - } else { - die "unknown command \@end $ended at line $.\n"; - } - }; - - # We must handle commands which can cause skipping even while we - # are skipping, otherwise we will not process nested conditionals - # correctly. - /^\@ifset\s+([a-zA-Z0-9_-]+)/ and do { - push @endwstack, $endw; - push @skstack, $skipping; - $endw = "ifset"; - $skipping = 1 unless exists $defs{$1}; - next; - }; - - /^\@ifclear\s+([a-zA-Z0-9_-]+)/ and do { - push @endwstack, $endw; - push @skstack, $skipping; - $endw = "ifclear"; - $skipping = 1 if exists $defs{$1}; - next; - }; - - /^\@(ignore|menu|iftex|copying)\b/ and do { - push @endwstack, $endw; - push @skstack, $skipping; - $endw = $1; - $skipping = 1; - next; - }; - - next if $skipping; - - # Character entities. First the ones that can be replaced by raw text - # or discarded outright: - s/\@copyright\{\}/(c)/g; - s/\@dots\{\}/.../g; - s/\@enddots\{\}/..../g; - s/\@([.!? ])/$1/g; - s/\@[:-]//g; - s/\@bullet(?:\{\})?/*/g; - s/\@TeX\{\}/TeX/g; - s/\@pounds\{\}/\#/g; - s/\@minus(?:\{\})?/-/g; - s/\\,/,/g; - - # Now the ones that have to be replaced by special escapes - # (which will be turned back into text by unmunge()) - s/&/&/g; - s/\@\@/&at;/g; - s/\@\{/{/g; - s/\@\}/}/g; - - # Inside a verbatim block, handle @var specially. - if ($shift ne "") { - s/\@var\{([^\}]*)\}/<$1>/g; - } - - # POD doesn't interpret E<> inside a verbatim block. - if ($shift eq "") { - s//>/g; - } else { - s//>/g; - } - - # Single line command handlers. - - /^\@include\s+(.+)$/ and do { - push @instack, $inf; - $inf = gensym(); - $file = postprocess($1); - - # Try cwd and $ibase. - open($inf, "<" . $file) - or open($inf, "<" . $ibase . "/" . $file) - or die "cannot open $file or $ibase/$file: $!\n"; - next; - }; - - /^\@(?:section|unnumbered|unnumberedsec|center)\s+(.+)$/ - and $_ = "\n=head2 $1\n"; - /^\@subsection\s+(.+)$/ - and $_ = "\n=head3 $1\n"; - - # Block command handlers: - /^\@itemize(?:\s+(\@[a-z]+|\*|-))?/ and do { - push @endwstack, $endw; - push @icstack, $ic; - if (defined $1) { - $ic = $1; - } else { - $ic = '@bullet'; - } - $_ = "\n=over 4\n"; - $endw = "itemize"; - }; - - /^\@enumerate(?:\s+([a-zA-Z0-9]+))?/ and do { - push @endwstack, $endw; - push @icstack, $ic; - if (defined $1) { - $ic = $1 . "."; - } else { - $ic = "1."; - } - $_ = "\n=over 4\n"; - $endw = "enumerate"; - }; - - /^\@([fv]?table)\s+(\@[a-z]+)/ and do { - push @endwstack, $endw; - push @icstack, $ic; - $endw = $1; - $ic = $2; - $ic =~ s/\@(?:samp|strong|key|gcctabopt|env)/B/; - $ic =~ s/\@(?:code|kbd)/C/; - $ic =~ s/\@(?:dfn|var|emph|cite|i)/I/; - $ic =~ s/\@(?:file)/F/; - $_ = "\n=over 4\n"; - }; - - /^\@((?:small)?example|display)/ and do { - push @endwstack, $endw; - $endw = $1; - $shift = "\t"; - $_ = ""; # need a paragraph break - }; - - /^\@itemx?\s*(.+)?$/ and do { - if (defined $1) { - # Entity escapes prevent munging by the <> processing below. - $_ = "\n=item $ic\<$1\>\n"; - } else { - $_ = "\n=item $ic\n"; - $ic =~ y/A-Ya-y/B-Zb-z/; - $ic =~ s/(\d+)/$1 + 1/eg; - } - }; - - $section .= $shift.$_."\n"; -} -# End of current file. -close($inf); -$inf = pop @instack; -} - -die "No filename or title\n" unless defined $fn && defined $tl; - -$sects{NAME} = "$fn \- $tl\n"; -$sects{FOOTNOTES} .= "=back\n" if exists $sects{FOOTNOTES}; - -for $sect (qw(NAME SYNOPSIS DESCRIPTION OPTIONS ENVIRONMENT FILES - BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) { - if(exists $sects{$sect}) { - $head = $sect; - $head =~ s/SEEALSO/SEE ALSO/; - print "=head1 $head\n\n"; - print scalar unmunge ($sects{$sect}); - print "\n"; - } -} - -sub usage -{ - die "usage: $0 [-D toggle...] [infile [outfile]]\n"; -} - -sub postprocess -{ - local $_ = $_[0]; - - # @value{foo} is replaced by whatever 'foo' is defined as. - while (m/(\@value\{([a-zA-Z0-9_-]+)\})/g) { - if (! exists $defs{$2}) { - print STDERR "Option $2 not defined\n"; - s/\Q$1\E//; - } else { - $value = $defs{$2}; - s/\Q$1\E/$value/; - } - } - - # Formatting commands. - # Temporary escape for @r. - s/\@r\{([^\}]*)\}/R<$1>/g; - s/\@(?:dfn|var|emph|cite|i)\{([^\}]*)\}/I<$1>/g; - s/\@(?:code|kbd)\{([^\}]*)\}/C<$1>/g; - s/\@(?:gccoptlist|samp|strong|key|option|env|command|b)\{([^\}]*)\}/B<$1>/g; - s/\@sc\{([^\}]*)\}/\U$1/g; - s/\@file\{([^\}]*)\}/F<$1>/g; - s/\@w\{([^\}]*)\}/S<$1>/g; - s/\@(?:dmn|math)\{([^\}]*)\}/$1/g; - - # keep references of the form @ref{...}, print them bold - s/\@(?:ref)\{([^\}]*)\}/B<$1>/g; - - # Change double single quotes to double quotes. - s/''/"/g; - s/``/"/g; - - # Cross references are thrown away, as are @noindent and @refill. - # (@noindent is impossible in .pod, and @refill is unnecessary.) - # @* is also impossible in .pod; we discard it and any newline that - # follows it. Similarly, our macro @gol must be discarded. - - s/\(?\@xref\{(?:[^\}]*)\}(?:[^.<]|(?:<[^<>]*>))*\.\)?//g; - s/\s+\(\@pxref\{(?:[^\}]*)\}\)//g; - s/;\s+\@pxref\{(?:[^\}]*)\}//g; - s/\@noindent\s*//g; - s/\@refill//g; - s/\@gol//g; - s/\@\*\s*\n?//g; - - # @uref can take one, two, or three arguments, with different - # semantics each time. @url and @email are just like @uref with - # one argument, for our purposes. - s/\@(?:uref|url|email)\{([^\},]*)\}/<B<$1>>/g; - s/\@uref\{([^\},]*),([^\},]*)\}/$2 (C<$1>)/g; - s/\@uref\{([^\},]*),([^\},]*),([^\},]*)\}/$3/g; - - # Un-escape <> at this point. - s/<//g; - - # Now un-nest all B<>, I<>, R<>. Theoretically we could have - # indefinitely deep nesting; in practice, one level suffices. - 1 while s/([BIR])<([^<>]*)([BIR])<([^<>]*)>/$1<$2>$3<$4>$1 with bare ...; eliminate empty markup, B<>; - # shift white space at the ends of [BI]<...> expressions outside - # the expression. - s/R<([^<>]*)>/$1/g; - s/[BI]<>//g; - s/([BI])<(\s+)([^>]+)>/$2$1<$3>/g; - s/([BI])<([^>]+?)(\s+)>/$1<$2>$3/g; - - # Extract footnotes. This has to be done after all other - # processing because otherwise the regexp will choke on formatting - # inside @footnote. - while (/\@footnote/g) { - s/\@footnote\{([^\}]+)\}/[$fnno]/; - add_footnote($1, $fnno); - $fnno++; - } - - return $_; -} - -sub unmunge -{ - # Replace escaped symbols with their equivalents. - local $_ = $_[0]; - - s/</E/g; - s/>/E/g; - s/{/\{/g; - s/}/\}/g; - s/&at;/\@/g; - s/&/&/g; - return $_; -} - -sub add_footnote -{ - unless (exists $sects{FOOTNOTES}) { - $sects{FOOTNOTES} = "\n=over 4\n\n"; - } - - $sects{FOOTNOTES} .= "=item $fnno.\n\n"; $fnno++; - $sects{FOOTNOTES} .= $_[0]; - $sects{FOOTNOTES} .= "\n\n"; -} - -# stolen from Symbol.pm -{ - my $genseq = 0; - sub gensym - { - my $name = "GEN" . $genseq++; - my $ref = \*{$name}; - delete $::{$name}; - return $ref; - } -} -- cgit v1.2.3