summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipng
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2010-12-15 16:03:07 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2010-12-15 16:03:07 +0000
commit143b6c7a6abbcb2d62758617328168e53f3dc475 (patch)
tree3087b1ab2f5aeb7051da450a65604c2cd3957a56 /Build/source/texk/dvipng
parentd80ceb87ecf51a08c0c6fea828847320c0cf16d5 (diff)
dvipng 1.14
git-svn-id: svn://tug.org/texlive/trunk@20753 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipng')
-rw-r--r--Build/source/texk/dvipng/ChangeLog5
-rwxr-xr-xBuild/source/texk/dvipng/configure26
-rw-r--r--Build/source/texk/dvipng/configure.ac5
-rw-r--r--Build/source/texk/dvipng/doc/dvipng.help8
-rw-r--r--Build/source/texk/dvipng/doc/dvipng.info330
-rw-r--r--Build/source/texk/dvipng/doc/dvipng.texi173
-rw-r--r--Build/source/texk/dvipng/dvipng-1.13-PATCHES/patch-20-rpl_malloc36
-rw-r--r--Build/source/texk/dvipng/dvipng-1.13-PATCHES/patch-21-win3223
-rw-r--r--Build/source/texk/dvipng/dvipng-1.13-PATCHES/patch-22-win32-bugfix93
-rw-r--r--Build/source/texk/dvipng/dvipng-1.13/RELEASE13
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14-PATCHES/ChangeLog (renamed from Build/source/texk/dvipng/dvipng-1.13-PATCHES/ChangeLog)9
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14-PATCHES/TL-Changes (renamed from Build/source/texk/dvipng/dvipng-1.13-PATCHES/TL-Changes)4
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-01-gd-copyright47
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-02-const15
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/COPYING (renamed from Build/source/texk/dvipng/dvipng-1.13/COPYING)0
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/COPYING.LESSER (renamed from Build/source/texk/dvipng/dvipng-1.13/COPYING.LESSER)0
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/ChangeLog (renamed from Build/source/texk/dvipng/dvipng-1.13/ChangeLog)67
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/ChangeLog.0 (renamed from Build/source/texk/dvipng/dvipng-1.13/ChangeLog.0)0
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/INSTALL (renamed from Build/source/texk/dvipng/dvipng-1.13/INSTALL)0
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/Makefile.in (renamed from Build/source/texk/dvipng/dvipng-1.13/Makefile.in)1
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/README (renamed from Build/source/texk/dvipng/dvipng-1.13/README)0
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/RELEASE15
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/aclocal.m4 (renamed from Build/source/texk/dvipng/dvipng-1.13/aclocal.m4)0
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/color.c (renamed from Build/source/texk/dvipng/dvipng-1.13/color.c)4
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/commands.h (renamed from Build/source/texk/dvipng/dvipng-1.13/commands.h)0
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/config.h.in (renamed from Build/source/texk/dvipng/dvipng-1.13/config.h.in)0
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/configure.ac (renamed from Build/source/texk/dvipng/dvipng-1.13/configure.ac)2
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/draw.c (renamed from Build/source/texk/dvipng/dvipng-1.13/draw.c)0
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/dvi.c (renamed from Build/source/texk/dvipng/dvipng-1.13/dvi.c)0
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/dvipng.1 (renamed from Build/source/texk/dvipng/dvipng-1.13/dvipng.1)129
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/dvipng.c (renamed from Build/source/texk/dvipng/dvipng-1.13/dvipng.c)0
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/dvipng.h (renamed from Build/source/texk/dvipng/dvipng-1.13/dvipng.h)2
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/dvipng.texi1034
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/enc.c (renamed from Build/source/texk/dvipng/dvipng-1.13/enc.c)9
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/font.c (renamed from Build/source/texk/dvipng/dvipng-1.13/font.c)0
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/fontmap.c (renamed from Build/source/texk/dvipng/dvipng-1.13/fontmap.c)6
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/ft.c (renamed from Build/source/texk/dvipng/dvipng-1.13/ft.c)0
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/install.texi203
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/macros.texi61
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/miktex.h (renamed from Build/source/texk/dvipng/dvipng-1.13/miktex.h)0
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/miktex.mak (renamed from Build/source/texk/dvipng/dvipng-1.13/miktex.mak)0
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/misc.c (renamed from Build/source/texk/dvipng/dvipng-1.13/misc.c)29
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/papersiz.c (renamed from Build/source/texk/dvipng/dvipng-1.13/papersiz.c)1
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/pk.c (renamed from Build/source/texk/dvipng/dvipng-1.13/pk.c)0
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/ppagelist.c (renamed from Build/source/texk/dvipng/dvipng-1.13/ppagelist.c)0
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/readme.texi161
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/set.c (renamed from Build/source/texk/dvipng/dvipng-1.13/set.c)0
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/sfd.c (renamed from Build/source/texk/dvipng/dvipng-1.13/sfd.c)21
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/special.c (renamed from Build/source/texk/dvipng/dvipng-1.13/special.c)324
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/t1.c (renamed from Build/source/texk/dvipng/dvipng-1.13/t1.c)0
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/test_dvipng.tex (renamed from Build/source/texk/dvipng/dvipng-1.13/test_dvipng.tex)0
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/tfm.c (renamed from Build/source/texk/dvipng/dvipng-1.13/tfm.c)0
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/vf.c (renamed from Build/source/texk/dvipng/dvipng-1.13/vf.c)0
53 files changed, 2188 insertions, 668 deletions
diff --git a/Build/source/texk/dvipng/ChangeLog b/Build/source/texk/dvipng/ChangeLog
index c6920a87d3c..2a31f5ab086 100644
--- a/Build/source/texk/dvipng/ChangeLog
+++ b/Build/source/texk/dvipng/ChangeLog
@@ -1,3 +1,8 @@
+2010-12-15 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Imported release 1.14 from savannah.nongnu.org.
+ * configure.ac: Adapted.
+
2010-05-30 Vladimir Volovich <vvv@vsu.ru>
* dvipng.test: use `...` not $(...).
diff --git a/Build/source/texk/dvipng/configure b/Build/source/texk/dvipng/configure
index 26781706232..5c9821e518c 100755
--- a/Build/source/texk/dvipng/configure
+++ b/Build/source/texk/dvipng/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for dvipng 1.13.
+# Generated by GNU Autoconf 2.68 for dvipng 1.14.
#
# Report bugs to <tex-k@tug.org>.
#
@@ -570,12 +570,12 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='dvipng'
PACKAGE_TARNAME='dvipng'
-PACKAGE_VERSION='1.13'
-PACKAGE_STRING='dvipng 1.13'
+PACKAGE_VERSION='1.14'
+PACKAGE_STRING='dvipng 1.14'
PACKAGE_BUGREPORT='tex-k@tug.org'
PACKAGE_URL=''
-ac_unique_file="dvipng-1.13/dvipng.c"
+ac_unique_file="dvipng-1.14/dvipng.c"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
@@ -1356,7 +1356,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures dvipng 1.13 to adapt to many kinds of systems.
+\`configure' configures dvipng 1.14 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1426,7 +1426,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of dvipng 1.13:";;
+ short | recursive ) echo "Configuration of dvipng 1.14:";;
esac
cat <<\_ACEOF
@@ -1559,7 +1559,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-dvipng configure 1.13
+dvipng configure 1.14
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2166,7 +2166,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by dvipng $as_me 1.13, which was
+It was created by dvipng $as_me 1.14, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -7523,7 +7523,7 @@ fi
# Define the identity of the package.
PACKAGE='dvipng'
- VERSION='1.13'
+ VERSION='1.14'
cat >>confdefs.h <<_ACEOF
@@ -14809,7 +14809,7 @@ Usage: $0 [OPTIONS]
Report bugs to <bug-libtool@gnu.org>."
lt_cl_version="\
-dvipng config.lt 1.13
+dvipng config.lt 1.14
configured by $0, generated by GNU Autoconf 2.68.
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -16394,7 +16394,7 @@ $as_echo "
ac_config_headers="$ac_config_headers config.h"
-DVIPNG_TREE=dvipng-1.13
+DVIPNG_TREE=dvipng-1.14
ac_config_files="$ac_config_files Makefile help/Makefile doc/Makefile"
@@ -16958,7 +16958,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by dvipng $as_me 1.13, which was
+This file was extended by dvipng $as_me 1.14, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -17024,7 +17024,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-dvipng config.status 1.13
+dvipng config.status 1.14
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/texk/dvipng/configure.ac b/Build/source/texk/dvipng/configure.ac
index d67c2a95e05..4ae238768d1 100644
--- a/Build/source/texk/dvipng/configure.ac
+++ b/Build/source/texk/dvipng/configure.ac
@@ -13,7 +13,7 @@ dnl Copyright (C) 2002-2008 Jan-Åke Larsson
dnl
dnl *********************************************************************
dnl
-m4_define([dvipng_version], [1.13])[]dnl using unmodified dvipng source tree
+m4_define([dvipng_version], [1.14])[]dnl using unmodified dvipng source tree
AC_INIT([dvipng], dvipng_version, [tex-k@tug.org])
AC_PREREQ([2.65])
AC_CONFIG_SRCDIR([dvipng-]dvipng_version[/dvipng.c])
@@ -192,8 +192,7 @@ AC_MSG_RESULT([
AC_CONFIG_HEADERS([config.h])
-DVIPNG_TREE=[dvipng-]dvipng_version
-AC_SUBST([DVIPNG_TREE])
+AC_SUBST([DVIPNG_TREE], [dvipng-]dvipng_version)
AC_CONFIG_FILES([Makefile help/Makefile doc/Makefile])
diff --git a/Build/source/texk/dvipng/doc/dvipng.help b/Build/source/texk/dvipng/doc/dvipng.help
index 39222a917ac..5bf62a29297 100644
--- a/Build/source/texk/dvipng/doc/dvipng.help
+++ b/Build/source/texk/dvipng/doc/dvipng.help
@@ -1,4 +1,4 @@
-This is ./dvipng 1.13 Copyright 2002-2010 Jan-Ake Larsson
+This is ./dvipng 1.14 Copyright 2002-2010 Jan-Ake Larsson
Usage: ./dvipng [OPTION]... FILENAME[.dvi]
Options are chosen to be similar to dvips' options where possible:
@@ -22,12 +22,13 @@ These do not correspond to dvips options:
--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)
+ --freetype* FreeType font rendering (preferred, 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
+ --nogs* Don't use ghostscript for PostScript specials
--nogssafer* Don't use -dSAFER in ghostscript calls
+ --norawps* Don't convert raw PostScript specials
--palette* Force palette output
--picky When a warning occurs, don't output image
--png Output PNG images (dvipng default)
@@ -35,6 +36,7 @@ These do not correspond to dvips options:
--t1lib* T1lib font rendering (default on)
--truecolor* Truecolor output
-Q # Quality (T1lib and PK subsampling)
+ --width* Output the image width on stdout
-z # PNG compression level
# = number f = file s = string * = suffix, '0' to turn off
diff --git a/Build/source/texk/dvipng/doc/dvipng.info b/Build/source/texk/dvipng/doc/dvipng.info
index 5f5a66fef70..62d070278ad 100644
--- a/Build/source/texk/dvipng/doc/dvipng.info
+++ b/Build/source/texk/dvipng/doc/dvipng.info
@@ -1,5 +1,4 @@
-This is ../../../../texk/dvipng/doc/dvipng.info, produced by makeinfo
-version 4.13 from ../../../../texk/dvipng/doc/dvipng.texi.
+This is dvipng.info, produced by makeinfo version 4.13 from dvipng.texi.
INFO-DIR-SECTION TeX
START-INFO-DIR-ENTRY
@@ -16,7 +15,7 @@ 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.13
+ This file documents dvipng version 1.14
Corrections or perhaps rewrites of sections are _very welcome_.
@@ -290,14 +289,15 @@ 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.)
+T1lib), fonts will be rendered as they are needed. Otherwise, dvipng
+will use bitmapped (PK) fonts, and if you use PK 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
@@ -327,7 +327,7 @@ File: dvipng.info, Node: Option summary, Next: Option details, Up: Command-li
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.13 Copyright 2002-2010 Jan-Ake Larsson
+ This is ./dvipng 1.14 Copyright 2002-2010 Jan-Ake Larsson
Usage: ./dvipng [OPTION]... FILENAME[.dvi]
Options are chosen to be similar to dvips' options where possible:
@@ -351,12 +351,13 @@ dvipng with no arguments or with the standard `--help' option.
--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)
+ --freetype* FreeType font rendering (preferred, 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
+ --nogs* Don't use ghostscript for PostScript specials
--nogssafer* Don't use -dSAFER in ghostscript calls
+ --norawps* Don't convert raw PostScript specials
--palette* Force palette output
--picky When a warning occurs, don't output image
--png Output PNG images (dvipng default)
@@ -364,6 +365,7 @@ dvipng with no arguments or with the standard `--help' option.
--t1lib* T1lib font rendering (default on)
--truecolor* Truecolor output
-Q # Quality (T1lib and PK subsampling)
+ --width* Output the image width on stdout
-z # PNG compression level
# = number f = file s = string * = suffix, '0' to turn off
@@ -404,9 +406,11 @@ reversal, use `-r0'. Such options are marked with a trailing `*'.
*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).
+ This option only has an effect when using bitmapped (PK) fonts. The
+ option sets 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
@@ -480,12 +484,12 @@ reversal, use `-r0'. Such options are marked with a trailing `*'.
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.
+ bitmapped (PK) 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
@@ -518,22 +522,21 @@ reversal, use `-r0'. Such options are marked with a trailing `*'.
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
+ This option only has an effect when using bitmapped (PK) fonts. 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.
+ This option only has an effect when using bitmapped (PK) fonts. It
+ turns off automatic PK font generation (`mktexpk').
-`--noghostscript*'
+`--nogs*'
This switch prohibits the internal call to GhostScript for
- displaying PostScript specials. `--noghostscript0' turns the call
- back on.
+ displaying PostScript specials. `--nogs0' turns the call back on.
`--nogssafer*'
Normally, if GhostScript is used to render PostScript specials, the
@@ -543,6 +546,12 @@ reversal, use `-r0'. Such options are marked with a trailing `*'.
as deletefile, to prevent possibly malicious PostScript programs
from having any effect.
+`--norawps*'
+ Some packages generate raw PostScript specials, even non-rendering
+ such specials. This switch turns off the internal call to
+ GhostScript intended to display these raw PostScript specials.
+ `--norawps0' turns the call back on.
+
`-o NAME'
Send output to the file NAME. A single occurrence of `%d' or
`%01d', ..., `%09d' will be exchanged for the physical page number
@@ -566,14 +575,13 @@ reversal, use `-r0'. Such options are marked with a trailing `*'.
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.
+ When an external image is included, `dvipng' will automatically
+ switch to truecolor mode, 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 opaque
+ clipped image inclusion. This will also override the `--truecolor'
+ switch if present.
`--picky*'
No images are output when a warning occurs. Normally, dvipng will
@@ -612,10 +620,10 @@ reversal, use `-r0'. Such options are marked with a trailing `*'.
`-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.
+ levels for bitmapped fonts (PK) and fonts rendered using T1lib, 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
@@ -639,17 +647,17 @@ reversal, use `-r0'. Such options are marked with a trailing `*'.
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
+ Enable 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*'
@@ -667,12 +675,14 @@ reversal, use `-r0'. Such options are marked with a trailing `*'.
Report the width of the image. See also `--height' and `--depth'.
`-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.
+ This option is deprecated; it should not be used. It is much
+ better to select the output resolution directly with the `-D'
+ option. This option sets the magnification ratio to NUM/1000 and
+ 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
@@ -699,12 +709,15 @@ File: dvipng.info, Node: Graphics, Next: Color, Prev: Command-line options,
`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.
+include bitmapped graphics. It also tries to handle some of the raw
+PostScript that is output from various packages. Some of the
+possibilities and problems are mentioned below.
* Menu:
* Encapsulated PostScript:: An internal call to GhostScript
* Bitmapped graphics:: PNG, JPEG and GIF
+* Raw PostScript:: Ignore or give to GhostScript

File: dvipng.info, Node: Encapsulated PostScript, Next: Bitmapped graphics, Up: Graphics
@@ -736,7 +749,7 @@ can be specified in the `\includegraphics' call, as in this example
\includegraphics[bb=10 20 100 200]{imagename.eps}

-File: dvipng.info, Node: Bitmapped graphics, Prev: Encapsulated PostScript, Up: Graphics
+File: dvipng.info, Node: Bitmapped graphics, Next: Raw PostScript, Prev: Encapsulated PostScript, Up: Graphics
5.2 Bitmapped graphics
======================
@@ -763,6 +776,48 @@ 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: Raw PostScript, Prev: Bitmapped graphics, Up: Graphics
+
+5.3 Raw PostScript
+==================
+
+dvipng attempts to handle raw PostScript. Rendering raw PostScript
+specials is done on top of the page by including a transparent image
+generated by the `pngalpha' device in GhostScript (automatically
+selecting `truecolor' mode in dvipng).
+
+ Included PostScript headers are respected, and if the header
+`tex.pro' is included, dvipng also throws in `color.pro' and
+`special.pro'. The package `xcolor' includes its own headers with color
+names, and this is not only kept as a PostScript header, but is also
+read and interpreted by dvipng itself. An attempt is also made to
+respect the PGF header. The non-rendering specials from `hyperref' are
+handled via some heuristics and do not give an error.
+
+ Really rendering and moving things with raw PostScript specials is
+more troublesome. The \rotatebox macro serves as a good example. The
+dvips driver of the graphicx package surrounds DVI glyphs with
+PostScript code so that after conversion by dvips, the glyphs (now
+themselves in PostScript) will be rotated in the desired way. dvipng
+does not handle this, at present. An attempt has been made to handle
+the rendering specials output by PGF (tikz), and also PSTricks. Some
+things work, but others do not. This is especially clear when mixing
+PostScript and DVI rendering commands such as glyphs. dvipng cannot at
+present detect if PostScript code moves `currentpoint' or rotates the
+frame since GhostScript does not return such information. A
+recommendation would be to produce images from these packages as EPS
+files and include them into your document in the standard manner.
+
+ Another way to handle this would be to use a slower fallback (with
+dvips and gs, for example). If you want to disable raw PostScript
+handling in dvipng, use the switch `--norawps'. This switch turns off
+the internal call to GhostScript intended to display these raw
+PostScript specials. Further, when dvipng encounters raw PostScript and
+the gs call is turned off, it gives a warning. It is now possible to
+use the switch `--picky' to disable page rendering of pages with
+warnings, and use the slower fallback for these pages.
+
+
File: dvipng.info, Node: Color, Next: Diagnosing problems, Prev: Graphics, Up: Top
6 Color
@@ -1051,103 +1106,106 @@ 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)
+* -dSAFER: Option details. (line 168)
+* absolute page number, and -l: Option details. (line 142)
+* absolute page number, and -p: Option details. (line 195)
+* antialiasing levels, number of: Option details. (line 248)
+* background color (option): Option details. (line 42)
* base resolution, setting: Option details. (line 35)
-* baseline reporting: Option details. (line 76)
+* baseline reporting: Option details. (line 78)
* color specifications: Color specifications.
(line 6)
* command-line options: Command-line options.
(line 6)
* compilation: Installation. (line 6)
-* compression: Option details. (line 306)
+* compression: Option details. (line 314)
* configuration, of dvipng: Installation. (line 6)
-* dark fonts: Option details. (line 119)
+* dark fonts: Option details. (line 121)
* 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)
+* debugging: Option details. (line 56)
+* depth reporting: Option details. (line 78)
+* exit on erroneous images: Option details. (line 259)
+* first page printed: Option details. (line 195)
+* follow mode: Option details. (line 99)
+* font generation, avoiding: Option details. (line 160)
+* forcing palette output: Option details. (line 204)
+* foreground color (option): Option details. (line 93)
+* FreeType font rendering: Option details. (line 107)
+* fuzzy images: Option details. (line 121)
+* gamma: Option details. (line 121)
+* GhostScript and -dSAFER: Option details. (line 168)
+* GhostScript, turning off: Option details. (line 164)
+* GIF image format: Option details. (line 127)
+* height reporting: Option details. (line 134)
* 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 298)
-* 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)
+* last page printed: Option details. (line 142)
+* light fonts: Option details. (line 121)
+* magnification, overriding DVI: Option details. (line 304)
+* Metafont mode, specifying: Option details. (line 151)
+* mktexpk, avoiding: Option details. (line 160)
+* mode name, specifying: Option details. (line 151)
+* no erroneous images: Option details. (line 213)
+* offset pages: Option details. (line 189)
* 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)
+* output resolution, setting: Option details. (line 62)
+* output, redirecting: Option details. (line 182)
+* page range: Option details. (line 226)
+* page, first printed: Option details. (line 195)
+* page, last printed: Option details. (line 142)
+* physical page number, and -l: Option details. (line 142)
+* physical page number, and -p: Option details. (line 195)
+* PNG image format: Option details. (line 222)
* PostScript inclusion problems: Encapsulated PostScript.
(line 21)
+* PostScript, turning off raw PostScript specials: Option details.
+ (line 176)
* 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)
+* quality: Option details. (line 248)
+* quiet operation: Option details. (line 244)
+* reverse pagination: Option details. (line 255)
+* silent operation: Option details. (line 244)
* standard input, reading options from: Option details. (line 11)
-* standard output, output to: Option details. (line 175)
-* T1lib font rendering: Option details. (line 270)
+* standard output, output to: Option details. (line 182)
+* T1lib font rendering: Option details. (line 276)
* 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)
-* width reporting: Option details. (line 295)
+* truecolor output: Option details. (line 290)
+* warnings, suppressing: Option details. (line 244)
+* width reporting: Option details. (line 301)

Tag Table:
-Node: Top353
-Node: Introduction1248
-Node: Installation3487
-Node: Prerequisites3834
-Node: Configure6324
-Node: Build/install8363
-Node: Installation outside the texmf tree8831
-Node: Advice for non-privileged users9538
-Node: Basic usage10546
-Node: Command-line options11673
-Node: Option summary12097
-Node: Option details14406
-Node: Graphics29868
-Node: Encapsulated PostScript30433
-Node: Bitmapped graphics31776
-Node: Color32976
-Node: Color specifications33364
-Node: Color specials34463
-Node: Diagnosing problems35875
-Node: Contact information36358
-Node: Debug options37099
-Node: Credits38134
-Node: Copying42135
-Node: Index42915
+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 options11662
+Node: Option summary12086
+Node: Option details14512
+Node: Graphics30430
+Node: Encapsulated PostScript31182
+Node: Bitmapped graphics32525
+Node: Raw PostScript33748
+Node: Color35987
+Node: Color specifications36375
+Node: Color specials37474
+Node: Diagnosing problems38886
+Node: Contact information39369
+Node: Debug options40110
+Node: Credits41145
+Node: Copying45146
+Node: Index45926

End Tag Table
diff --git a/Build/source/texk/dvipng/doc/dvipng.texi b/Build/source/texk/dvipng/doc/dvipng.texi
index b48a2419955..0ceb68b301f 100644
--- a/Build/source/texk/dvipng/doc/dvipng.texi
+++ b/Build/source/texk/dvipng/doc/dvipng.texi
@@ -9,8 +9,8 @@ dvipng [options] [filename] -
@c man end
@end ifset
-@set version 1.13
-@set month-year March 2010
+@set version 1.14
+@set month-year October 2010
@c Put everything in one index (arbitrarily chosen to be the concept index).
@syncodeindex fn cp
@@ -132,13 +132,14 @@ 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}.)
+fonts will be rendered as they are needed. Otherwise, dvipng will use
+bitmapped (PK) fonts, and if you use PK 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
@@ -213,9 +214,11 @@ 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).
+This option only has an effect when using bitmapped (PK) fonts. The
+option sets 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)
@@ -340,12 +343,12 @@ 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.
+Modern installed, there will be no need to generate bitmapped (PK)
+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
@@ -392,20 +395,20 @@ 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,
+This option only has an effect when using bitmapped (PK) fonts. 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.
+This option only has an effect when using bitmapped (PK) fonts. It turns
+off automatic PK font generation (@file{mktexpk}).
@ignore
@flindex missfont.log
If @code{mktexpk}, the invocation is appended to a file
@@ -421,10 +424,10 @@ overridden by the @samp{MISSFONT_LOG} environment variable or
configuration file value.
@end ignore
-@item --noghostscript*
+@item --nogs*
@cindex GhostScript, turning off
This switch prohibits the internal call to GhostScript for displaying
-PostScript specials. @samp{--noghostscript0} turns the call back on.
+PostScript specials. @samp{--nogs0} turns the call back on.
@item --nogssafer*
@cindex GhostScript and -dSAFER
@@ -436,6 +439,13 @@ GhostScript interpreter is run with the option @samp{-dSAFER}. The
as deletefile, to prevent possibly malicious PostScript programs from
having any effect.
+@item --norawps*
+@cindex PostScript, turning off raw PostScript specials
+Some packages generate raw PostScript specials, even non-rendering such
+specials. This switch turns off the internal call to GhostScript
+intended to display these raw PostScript specials. @samp{--norawps0}
+turns the call back on.
+
@item -o @var{name}
@cindex output, redirecting
@cindex standard output, output to
@@ -469,14 +479,13 @@ 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.
+When an external image is included, @samp{dvipng} will automatically
+switch to truecolor mode, 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 opaque
+clipped image inclusion. This will also override the @samp{--truecolor}
+switch if present.
@item --picky*
@cindex no erroneous images
@@ -524,10 +533,10 @@ output; report no warnings (only errors) to standard error.
@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.
+levels for bitmapped fonts (PK) and fonts rendered using T1lib, 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
@@ -586,17 +595,17 @@ only include all ink put on the page, producing neat images.
@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).
+Enable 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
@@ -617,12 +626,14 @@ Report the width of the image. See also @samp{--height} and
@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.
+This option is deprecated; it should not be used. It is much better to
+select the output resolution directly with the @samp{-D} option. This
+option sets the magnification ratio to @math{@var{num}/1000} and
+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
@@ -659,12 +670,14 @@ correspond directly to the zlib compression levels.''
@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.
+also able (from version 1.8) to include bitmapped graphics. It also
+tries to handle some of the raw PostScript that is output from various
+packages. Some of the possibilities and problems are mentioned below.
@menu
* Encapsulated PostScript:: An internal call to GhostScript
* Bitmapped graphics:: PNG, JPEG and GIF
+* Raw PostScript:: Ignore or give to GhostScript
@end menu
@node Encapsulated PostScript
@@ -727,6 +740,46 @@ wide:
\includegraphics[bb=0 0 300 400,witdh=1.5in]@{imagename.png@}
@end example
+@node Raw PostScript
+@section Raw PostScript
+
+dvipng attempts to handle raw PostScript. Rendering raw PostScript
+specials is done on top of the page by including a transparent image
+generated by the @samp{pngalpha} device in GhostScript (automatically
+selecting @samp{truecolor} mode in dvipng).
+
+Included PostScript headers are respected, and if the header
+@samp{tex.pro} is included, dvipng also throws in @samp{color.pro} and
+@samp{special.pro}. The package @samp{xcolor} includes its own headers
+with color names, and this is not only kept as a PostScript header, but
+is also read and interpreted by dvipng itself. An attempt is also made
+to respect the PGF header. The non-rendering specials from
+@samp{hyperref} are handled via some heuristics and do not give an
+error.
+
+Really rendering and moving things with raw PostScript specials is more
+troublesome. The \rotatebox macro serves as a good example. The dvips
+driver of the graphicx package surrounds DVI glyphs with PostScript code
+so that after conversion by dvips, the glyphs (now themselves in
+PostScript) will be rotated in the desired way. dvipng does not handle
+this, at present. An attempt has been made to handle the rendering
+specials output by PGF (tikz), and also PSTricks. Some things work, but
+others do not. This is especially clear when mixing PostScript and DVI
+rendering commands such as glyphs. dvipng cannot at present detect if
+PostScript code moves @samp{currentpoint} or rotates the frame since
+GhostScript does not return such information. A recommendation would be
+to produce images from these packages as EPS files and include them into
+your document in the standard manner.
+
+Another way to handle this would be to use a slower fallback (with dvips
+and gs, for example). If you want to disable raw PostScript handling in
+dvipng, use the switch @samp{--norawps}. This switch turns off the
+internal call to GhostScript intended to display these raw PostScript
+specials. Further, when dvipng encounters raw PostScript and the gs call
+is turned off, it gives a warning. It is now possible to use the switch
+@samp{--picky} to disable page rendering of pages with warnings, and use
+the slower fallback for these pages.
+
@node Color
@chapter Color
@@ -938,7 +991,7 @@ Although their code does not appear in the current release, the authors also wis
@ifset man
@c man begin NOTES
-The full manual is accessible in the info format, on most systems by typing
+The full manual is accessible in info format, on most systems by typing
@example
info dvipng
@end example
diff --git a/Build/source/texk/dvipng/dvipng-1.13-PATCHES/patch-20-rpl_malloc b/Build/source/texk/dvipng/dvipng-1.13-PATCHES/patch-20-rpl_malloc
deleted file mode 100644
index 3f3e2b9cb5b..00000000000
--- a/Build/source/texk/dvipng/dvipng-1.13-PATCHES/patch-20-rpl_malloc
+++ /dev/null
@@ -1,36 +0,0 @@
- Autoconf may define malloc to rpl_malloc.
-
- Undefine this before including any system headers to avoid
- implicit declaration of malloc(), e.g., for MinGW32.
-
-diff -ur dvipng-1.13.orig/dvipng.h dvipng-1.13/dvipng.h
---- dvipng-1.13.orig/dvipng.h 2010-03-17 22:41:51.000000000 +0100
-+++ dvipng-1.13/dvipng.h 2010-03-18 12:22:28.897998191 +0100
-@@ -26,6 +26,13 @@
- #define DVIPNG_H
- #include "config.h"
-
-+/* Autoconf may define malloc to rpl_malloc, if the system does not
-+ * have a GNU Libc-compatible malloc (for which malloc(0) gives a
-+ * valid pointer). We don't need that (yet) */
-+#ifdef malloc
-+# undef malloc
-+#endif
-+
- #define STRSIZE 255 /* stringsize for file specifications */
-
- #define FIRSTFNTCHAR 0
-@@ -105,13 +112,6 @@
- # endif
- #endif
-
--/* Autoconf may define malloc to rpl_malloc, if the system does not
-- * have a GNU Libc-compatible malloc (for which malloc(0) gives a
-- * valid pointer). We don't need that (yet) */
--#ifdef malloc
--# undef malloc
--#endif
--
-
- /*************************************************************/
- /************************* protos.h ************************/
diff --git a/Build/source/texk/dvipng/dvipng-1.13-PATCHES/patch-21-win32 b/Build/source/texk/dvipng/dvipng-1.13-PATCHES/patch-21-win32
deleted file mode 100644
index 7596248df4b..00000000000
--- a/Build/source/texk/dvipng/dvipng-1.13-PATCHES/patch-21-win32
+++ /dev/null
@@ -1,23 +0,0 @@
- Avoid unnecessary cast from 'int *' to 'unsigned long*'.
-
-diff -ur dvipng-1.13.orig/special.c dvipng-1.13/special.c
---- dvipng-1.13.orig/special.c 2010-03-17 22:38:35.000000000 +0100
-+++ dvipng-1.13/special.c 2010-03-18 12:32:01.230697171 +0100
-@@ -147,7 +147,7 @@
- #ifndef MIKTEX
- int downpipe[2], uppipe[2];
- #ifdef WIN32
-- int nexitcode = STILL_ACTIVE;
-+ unsigned long nexitcode = STILL_ACTIVE;
- HANDLE hchild;
- int savestdin, savestdout;
- #else /* !WIN32 */
-@@ -307,7 +307,7 @@
- #ifdef WIN32
- }
- while(nexitcode == STILL_ACTIVE)
-- GetExitCodeProcess((HANDLE)hchild, (unsigned long*)&nexitcode);
-+ GetExitCodeProcess((HANDLE)hchild, &nexitcode);
-
- CloseHandle((HANDLE)hchild);
- _dup2(savestdin, fileno(stdin));
diff --git a/Build/source/texk/dvipng/dvipng-1.13-PATCHES/patch-22-win32-bugfix b/Build/source/texk/dvipng/dvipng-1.13-PATCHES/patch-22-win32-bugfix
deleted file mode 100644
index 06e2c6b0b11..00000000000
--- a/Build/source/texk/dvipng/dvipng-1.13-PATCHES/patch-22-win32-bugfix
+++ /dev/null
@@ -1,93 +0,0 @@
-diff -ur dvipng-1.13.orig/ChangeLog dvipng-1.13/ChangeLog
---- dvipng-1.13.orig/ChangeLog 2010-03-17 22:59:40.000000000 +0100
-+++ dvipng-1.13/ChangeLog 2010-10-02 13:16:12.428050971 +0200
-@@ -1,3 +1,12 @@
-+2010-10-02 Peter Breitenlohner <peb@mppmu.mpg.de>
-+
-+ * special.c (ps2png): Drop unused 'bool showpage' for WIN32.
-+
-+2010-09-20 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
-+
-+ * special.c (ps2png): fix WIN32 bug that dvipng.exe waits
-+ infinitely for some kind of eps files.
-+
- 2010-03-17 Jan-Ake Larsson <jalar@mai.liu.se>
-
- * Release 1.13
-diff -ur dvipng-1.13.orig/special.c dvipng-1.13/special.c
---- dvipng-1.13.orig/special.c 2010-03-18 12:32:01.000000000 +0100
-+++ dvipng-1.13/special.c 2010-10-02 13:05:54.952668093 +0200
-@@ -167,7 +167,9 @@
- char resolution[STRSIZE];
- /* char devicesize[STRSIZE]; */
- gdImagePtr psimage=NULL;
-+#ifndef WIN32
- static bool showpage=false;
-+#endif
-
- sprintf(resolution, "-r%dx%d",hresolution,vresolution);
- /* Future extension for \rotatebox
-@@ -290,11 +292,41 @@
- fprintf(psstream, "gsave %f %f %f setrgbcolor clippath fill grestore",
- bgred/255.0, bggreen/255.0, bgblue/255.0);
- }
-+
-+/* WIN32
-+write the following at the top of an eps:
-+
-+%!
-+/DVIPNGDICT 100 dict def
-+DVIPNGDICT begin /showpage {} def end
-+DVIPNGDICT begin
-+*/
-+
-+#ifdef WIN32
-+ fprintf(psstream, "\n%%!\n/DVIPNGDICT 100 dict def\n");
-+ fprintf(psstream, "DVIPNGDICT begin /showpage {} def end\n");
-+ fprintf(psstream, "DVIPNGDICT begin\n");
-+#endif
- writepscode(pscodep,psstream);
-+
-+/* WIN32
-+write the following at the very end of an eps:
-+
-+end
-+showpage
-+*/
-+
-+#ifdef WIN32
-+ fprintf(psstream, "\nend\nshowpage\n");
-+#endif
-+
-+#ifndef WIN32
- if (showpage) {
- DEBUG_PRINT(DEBUG_GS,("\n PS CODE:\tshowpage"));
- fprintf(psstream, " showpage ");
- }
-+#endif
-+
- fclose(psstream);
- }
- if (pngstream) {
-@@ -323,6 +355,12 @@
-
- if (psimage == NULL) {
- DEBUG_PRINT(DEBUG_GS,("\n GS OUTPUT:\tNO IMAGE "));
-+
-+/*
-+ For WIN32 we always output showpage.
-+*/
-+
-+#ifndef WIN32
- if (!showpage) {
- showpage=true;
- DEBUG_PRINT(DEBUG_GS,("(will try adding \"showpage\") "));
-@@ -331,6 +369,8 @@
- bgred,bggreen,bgblue);
- showpage=false;
- }
-+#endif
-+
- #ifdef DEBUG
- } else {
- DEBUG_PRINT(DEBUG_GS,("\n GS OUTPUT:\t%dx%d image ",
diff --git a/Build/source/texk/dvipng/dvipng-1.13/RELEASE b/Build/source/texk/dvipng/dvipng-1.13/RELEASE
deleted file mode 100644
index d2716760775..00000000000
--- a/Build/source/texk/dvipng/dvipng-1.13/RELEASE
+++ /dev/null
@@ -1,13 +0,0 @@
-Release notes for version 1.13 of the dvipng package:
-
-This program makes PNG graphics from DVI files as obtained from TeX
-and its relatives.
-
-
-This release adds the possibility to report the output image width.
-Other than that, a segfault occuring from faulty DVIs has been
-removed, and a number of build issues have been corrected.
-
-
-
-Report any bugs you find, see README for instructions.
diff --git a/Build/source/texk/dvipng/dvipng-1.13-PATCHES/ChangeLog b/Build/source/texk/dvipng/dvipng-1.14-PATCHES/ChangeLog
index 11f85b81164..1ddd1a09a6f 100644
--- a/Build/source/texk/dvipng/dvipng-1.13-PATCHES/ChangeLog
+++ b/Build/source/texk/dvipng/dvipng-1.14-PATCHES/ChangeLog
@@ -1,3 +1,12 @@
+2010-12-15 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Imported release 1.14 from savannah.nongnu.org.
+ * patch-[2]?-* (removed): Included in 1.14.
+
+ * patch-01-gd-copyright (new): Include full gd copyright notice
+ into dvipng.texi; seems the safe thing to do.
+ patch-02-const (new): Avoid compiler warnings.
+
2010-10-02 Peter Breitenlohner <peb@mppmu.mpg.de>
* patch-22-win32-bugfix (new): WIN32 bug fix from Akira Kakuto.
diff --git a/Build/source/texk/dvipng/dvipng-1.13-PATCHES/TL-Changes b/Build/source/texk/dvipng/dvipng-1.14-PATCHES/TL-Changes
index e3f760264a1..2ca3f07dfc0 100644
--- a/Build/source/texk/dvipng/dvipng-1.13-PATCHES/TL-Changes
+++ b/Build/source/texk/dvipng/dvipng-1.14-PATCHES/TL-Changes
@@ -1,4 +1,4 @@
-Changes applied to the dvipng-1.13 tree as obtained from:
+Changes applied to the dvipng-1.14 tree as obtained from:
http://savannah.nongnu.org/files/?group=dvipng
Removed:
@@ -9,7 +9,7 @@ Removed:
Created Autoconf macro files ../m4/gs-device.m4 and ../m4/makeinfo.m4
adapting code in aclocal.m4.
-Moved these files to ../doc/:
+Copied these files to ../doc/:
dvipng.texi
install.texi
macros.texi
diff --git a/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-01-gd-copyright b/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-01-gd-copyright
new file mode 100644
index 00000000000..3777c5c9037
--- /dev/null
+++ b/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-01-gd-copyright
@@ -0,0 +1,47 @@
+ Include full gd copyright notice; seems the safe thing to do.
+
+diff -ur dvipng-1.14.orig/dvipng.texi dvipng-1.14/dvipng.texi
+--- dvipng-1.14.orig/dvipng.texi 2010-12-06 21:07:18.000000000 +0100
++++ dvipng-1.14/dvipng.texi 2010-12-15 15:34:12.000000000 +0100
+@@ -954,6 +954,41 @@
+ Smith, Jason Riedy, Wolfram Krause, Reinhard Kotucha, Takeshi Abe, and
+ Waldeck Schutzer.
+
++Use of the @code{gd} library requires inclusion of the following
++copyright notice, which applies to the @code{gd} library:
++
++@quotation
++Portions copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 by Cold Spring Harbor Laboratory. Funded under Grant P41-RR02188 by the National Institutes of Health.
++
++Portions copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 by Boutell.Com, Inc.
++
++Portions relating to GD2 format copyright 1999, 2000, 2001, 2002, 2003, 2004 Philip Warner.
++
++Portions relating to PNG copyright 1999, 2000, 2001, 2002, 2003, 2004 Greg Roelofs.
++
++Portions relating to gdttf.c copyright 1999, 2000, 2001, 2002, 2003, 2004 John Ellson (ellson@@graphviz.org).
++
++Portions relating to gdft.c copyright 2001, 2002, 2003, 2004 John Ellson (ellson@@graphviz.org).
++
++Portions relating to JPEG and to color quantization copyright 2000, 2001, 2002, 2003, 2004, Doug Becker and copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Thomas G. Lane. This software is based in part on the work of the Independent JPEG Group. See the file README-JPEG.TXT for more information.
++
++Portions relating to GIF compression copyright 1989 by Jef Poskanzer and David Rowley, with modifications for thread safety by Thomas Boutell.
++
++Portions relating to GIF decompression copyright 1990, 1991, 1993 by David Koblas, with modifications for thread safety by Thomas Boutell.
++
++Portions relating to WBMP copyright 2000, 2001, 2002, 2003, 2004 Maurice Szmurlo and Johan Van den Brande.
++
++Portions relating to GIF animations copyright 2004 Jaakko Hyv@"adtti (jaakko.hyvatti@@iki.fi)
++
++Permission has been granted to copy, distribute and modify gd in any context without fee, including a commercial application, provided that this notice is present in user-accessible supporting documentation.
++
++This does not affect your ownership of the derived work itself, and the intent is to assure proper credit for the authors of gd, not to interfere with your productive use of gd. If you have questions, ask. "Derived works" includes all programs that utilize the library. Credit must be given in user-accessible documentation.
++
++This software is provided "AS IS." The copyright holders disclaim all warranties, either express or implied, including but not limited to implied warranties of merchantability and fitness for a particular purpose, with respect to this code and accompanying documentation.
++
++Although their code does not appear in the current release, the authors also wish to thank Hutchison Avenue Software Corporation for their prior contributions.
++@end quotation
++
+ @ifset man
+ @c man begin NOTES
+ The full manual is accessible in info format, on most systems by typing
diff --git a/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-02-const b/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-02-const
new file mode 100644
index 00000000000..ef9dcd0200f
--- /dev/null
+++ b/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-02-const
@@ -0,0 +1,15 @@
+diff -ur dvipng-1.14.orig/special.c dvipng-1.14/special.c
+--- dvipng-1.14.orig/special.c 2010-12-06 11:14:22.000000000 +0100
++++ dvipng-1.14/special.c 2010-12-15 16:01:07.000000000 +0100
+@@ -44,9 +44,9 @@
+ struct pscode {
+ struct pscode* next;
+ char* special; /* complete special */
+- char* code; /* PS string, null if a file */
++ const char* code; /* PS string, null if a file */
+ char* filename; /* file name, null if a string */
+- char* postcode; /* post PS string */
++ const char* postcode; /* post PS string */
+ struct filemmap fmmap; /* file mmap */
+ };
+
diff --git a/Build/source/texk/dvipng/dvipng-1.13/COPYING b/Build/source/texk/dvipng/dvipng-1.14/COPYING
index 94a9ed024d3..94a9ed024d3 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/COPYING
+++ b/Build/source/texk/dvipng/dvipng-1.14/COPYING
diff --git a/Build/source/texk/dvipng/dvipng-1.13/COPYING.LESSER b/Build/source/texk/dvipng/dvipng-1.14/COPYING.LESSER
index fc8a5de7edf..fc8a5de7edf 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/COPYING.LESSER
+++ b/Build/source/texk/dvipng/dvipng-1.14/COPYING.LESSER
diff --git a/Build/source/texk/dvipng/dvipng-1.13/ChangeLog b/Build/source/texk/dvipng/dvipng-1.14/ChangeLog
index a0791cd29eb..e21a07c761c 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/ChangeLog
+++ b/Build/source/texk/dvipng/dvipng-1.14/ChangeLog
@@ -1,7 +1,52 @@
+2010-10-23 Jan-Åke Larsson <jan-ake.larsson@liu.se>
+
+ * dvipng.1, RELEASE: Prepare for 1.14
+
+2010-10-22 Jan-Åke Larsson <jan-ake.larsson@liu.se>
+
+ * configure.ac: Prepare for 1.14
+
+ * special.c: Tidy up the three different calls to gs on different
+ systems.
+
+ * dvipng.texi: Some adjustments, document handling of raw
+ PostScript
+
+2010-10-21 Jan-Åke Larsson <jan-ake.larsson@liu.se>
+
+ * special.c: Code cleanup
+
+2010-10-14 Jan-Åke Larsson <jan-ake.larsson@liu.se>
+
+ * dvipng.h (malloc): Put malloc def first
+
+ * special.c (ps2png): Ensure one and only one showpage, and do it
+ in PostScript instead of in C as suggested by Akira's previous patch
+
2010-10-02 Peter Breitenlohner <peb@mppmu.mpg.de>
* special.c (ps2png): Drop unused 'bool showpage' for WIN32.
+2010-10-01 Jan-Åke Larsson <jan-ake.larsson@liu.se>
+
+ * special.c: Add heuristics to ignore non-rendering specials from
+ hyperref
+
+2010-09-30 Jan-Åke Larsson <jan-ake.larsson@liu.se>
+
+ * special.c, misc.c, dvipng.h, dvipng.texi: Add option to not try
+ converting raw PostScript
+
+2010-09-29 Jan-Åke Larsson <jan-ake.larsson@liu.se>
+
+ * special.c (ps2png): Reap zombies
+
+ * papersiz.c: Fix bug in length decoder
+
+2010-09-22 Jan-Åke Larsson <jan-ake.larsson@liu.se>
+
+ * color.c, enc.c, fontmap.c, misc.c, sfd.c: Handle CRLF correctly
+
2010-09-20 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* special.c (ps2png): fix WIN32 bug that dvipng.exe waits
@@ -11,7 +56,7 @@
* Release 1.13
- * misc.c: Correct copyright year
+ * misc.c: Correct copyright year
* RELEASE: Prepare for 1.13
@@ -37,7 +82,7 @@
ppagelist.c, special.c: Avoid compiler warnings
* dvipng.texi, configure.ac: Prepare for 1.13
-
+
* draw.c, dvipng.h, set.c, vf.c: Adjust glyph-index bounds
test. Remove possible segfault from isprint().
@@ -59,11 +104,11 @@
2009-03-28 Jan-Ake Larsson <jalar@mai.liu.se>
- * config.h.in: Remove the last remnants of alloca
+ * config.h.in: Remove the last remnants of alloca
2009-03-26 Jan-Ake Larsson <jalar@mai.liu.se>
- * configure.ac, dvipng.h: Remove the last remnants of alloca
+ * configure.ac, dvipng.h: Remove the last remnants of alloca
* draw.c, font.c, ft.c, pk.c, t1.c, vf.c: Make the name element of
the font struct a pointer, not an array
@@ -89,7 +134,7 @@
* INSTALL, README, install.texi, readme.texi, special.c: Correct
date for copyright
- * RELEASE, configure.ac, dvipng.1, dvipng.texi: Prepare for 1.12
+ * RELEASE, configure.ac, dvipng.1, dvipng.texi: Prepare for 1.12
2009-01-23 Jan-Ake Larsson <jalar@mai.liu.se>
@@ -125,7 +170,7 @@
2008-05-14 Jan-Ake Larsson <jalar@mai.liu.se>
* Release 1.11
-
+
* configure.ac, dvipng.1, dvipng.texi, RELEASE: Prepare for 1.11
* special.c: Fix PS inclusion regression
@@ -133,27 +178,27 @@
2008-05-09 Jan-Ake Larsson <jalar@mai.liu.se>
* Release 1.10
-
+
* RELEASE: Prepare for 1.10
2008-05-08 Jan-Ake Larsson <jalar@mai.liu.se>
- * special.c: Add warning about DVI code in PS environment
+ * special.c: Add warning about DVI code in PS environment
2008-05-07 Jan-Ake Larsson <jalar@mai.liu.se>
* README, readme.texi: Mention gs interpreter lib in TODO
* aclocal.m4, configure.ac: Move gs device check so that it can be
- called from different points
+ called from different points
2008-05-05 Jan-Ake Larsson <jalar@mai.liu.se>
- * draw.c, dvi.c, dvipng.h: Revert creation of dvi command struct
+ * draw.c, dvi.c, dvipng.h: Revert creation of dvi command struct
* draw.c, dvi.c: Init dvi command struct
- * draw.c, dvi.c, dvipng.h: Create dvi command struct
+ * draw.c, dvi.c, dvipng.h: Create dvi command struct
* special.c: Rearrange code
diff --git a/Build/source/texk/dvipng/dvipng-1.13/ChangeLog.0 b/Build/source/texk/dvipng/dvipng-1.14/ChangeLog.0
index 3c4689ad8c4..3c4689ad8c4 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/ChangeLog.0
+++ b/Build/source/texk/dvipng/dvipng-1.14/ChangeLog.0
diff --git a/Build/source/texk/dvipng/dvipng-1.13/INSTALL b/Build/source/texk/dvipng/dvipng-1.14/INSTALL
index bef302aebd8..bef302aebd8 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/INSTALL
+++ b/Build/source/texk/dvipng/dvipng-1.14/INSTALL
diff --git a/Build/source/texk/dvipng/dvipng-1.13/Makefile.in b/Build/source/texk/dvipng/dvipng-1.14/Makefile.in
index 0e2ce2eaa00..5845e238353 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/Makefile.in
+++ b/Build/source/texk/dvipng/dvipng-1.14/Makefile.in
@@ -95,6 +95,7 @@ dvipng.help: dvipng
rm -f dvipng.tmp
www: $(TEXIFILES) dvipng.help
+ mkdir -p www
texi2html -split chapter -nosec-nav -subdir html \
-I $(srcdir) $(srcdir)/dvipng.texi
(cd html; for i in *; do \
diff --git a/Build/source/texk/dvipng/dvipng-1.13/README b/Build/source/texk/dvipng/dvipng-1.14/README
index da9ba557f4c..da9ba557f4c 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/README
+++ b/Build/source/texk/dvipng/dvipng-1.14/README
diff --git a/Build/source/texk/dvipng/dvipng-1.14/RELEASE b/Build/source/texk/dvipng/dvipng-1.14/RELEASE
new file mode 100644
index 00000000000..60f81395aff
--- /dev/null
+++ b/Build/source/texk/dvipng/dvipng-1.14/RELEASE
@@ -0,0 +1,15 @@
+Release notes for version 1.14 of the dvipng package:
+
+This program makes PNG graphics from DVI files as obtained from TeX
+and its relatives.
+
+
+This release changes raw PostScript processing to avoid the
+non-rendering PostScript specials created by hyperref. A command-line
+switch to turn off raw PostScript rendering has been added. Finally, a
+few bugs has been fixed, such as correct decoding of the -T switch, a
+CRLF bug when reading configuration files in Windows, and a few bugs
+associated to subprocesses.
+
+
+Report any bugs you find, see README for instructions.
diff --git a/Build/source/texk/dvipng/dvipng-1.13/aclocal.m4 b/Build/source/texk/dvipng/dvipng-1.14/aclocal.m4
index 0cd4eddf92e..0cd4eddf92e 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/aclocal.m4
+++ b/Build/source/texk/dvipng/dvipng-1.14/aclocal.m4
diff --git a/Build/source/texk/dvipng/dvipng-1.13/color.c b/Build/source/texk/dvipng/dvipng-1.14/color.c
index 3bc3495a59b..ecaf425f35e 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/color.c
+++ b/Build/source/texk/dvipng/dvipng-1.14/color.c
@@ -80,7 +80,7 @@ static struct colorname * NewColor(const char* prefix, int nprefix,
}
#define FINDWORD(s) while(s<max && \
- (*s=='{'||*s==' '||*s=='%'||*s=='\n'||*s==';')) s++
+ (*s=='{'||*s==' '||*s=='%'||*s==';'||*s=='\r'||*s=='\n')) s++
#define FINDARG(s) while(s<max && *s!='{') s++; FINDWORD(s)
#define FINDMODELEND(s,n) n=0; while(s<max && *s!='}' && *s!='/') { s++; n++; }
#define FINDNAMEEND(s,n) n=0; while(s<max && *s!='}' && *s!=',') { s++; n++; }
@@ -230,7 +230,7 @@ static struct colorname* LoadXColorPrologue(void)
values=++pos; /* second argument: color values */
FINDVALEND(pos,nvalues);
model=pos+3; /* third argument: color model, prefixed by 'XC' */
- while(pos<max && *pos!=' ' && *pos!='\n') pos++;
+ while(pos<max && *pos!=' ' && *pos!='\r' && *pos!='\n') pos++;
nmodel=pos-model;
tmp=NewColor(prefix,nprefix,name,nname,model,nmodel,values,nvalues);
tmp->next=list;
diff --git a/Build/source/texk/dvipng/dvipng-1.13/commands.h b/Build/source/texk/dvipng/dvipng-1.14/commands.h
index e2a5404bb32..e2a5404bb32 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/commands.h
+++ b/Build/source/texk/dvipng/dvipng-1.14/commands.h
diff --git a/Build/source/texk/dvipng/dvipng-1.13/config.h.in b/Build/source/texk/dvipng/dvipng-1.14/config.h.in
index 9c51686b9df..9c51686b9df 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/config.h.in
+++ b/Build/source/texk/dvipng/dvipng-1.14/config.h.in
diff --git a/Build/source/texk/dvipng/dvipng-1.13/configure.ac b/Build/source/texk/dvipng/dvipng-1.14/configure.ac
index 09e04353fd0..0630bb136a4 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/configure.ac
+++ b/Build/source/texk/dvipng/dvipng-1.14/configure.ac
@@ -23,7 +23,7 @@
#************************************************************************
# Process this file with autoconf to produce a configure script.
-AC_INIT([dvipng], [1.13], [dvipng@nongnu.org])
+AC_INIT([dvipng], [1.14], [dvipng@nongnu.org])
AC_CONFIG_SRCDIR([dvipng.c])
AC_ARG_ENABLE(debug,
diff --git a/Build/source/texk/dvipng/dvipng-1.13/draw.c b/Build/source/texk/dvipng/dvipng-1.14/draw.c
index a32bd9f19c2..a32bd9f19c2 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/draw.c
+++ b/Build/source/texk/dvipng/dvipng-1.14/draw.c
diff --git a/Build/source/texk/dvipng/dvipng-1.13/dvi.c b/Build/source/texk/dvipng/dvipng-1.14/dvi.c
index a20290ecfd9..a20290ecfd9 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/dvi.c
+++ b/Build/source/texk/dvipng/dvipng-1.14/dvi.c
diff --git a/Build/source/texk/dvipng/dvipng-1.13/dvipng.1 b/Build/source/texk/dvipng/dvipng-1.14/dvipng.1
index 7bc3889a947..44537c4e8b7 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/dvipng.1
+++ b/Build/source/texk/dvipng/dvipng-1.14/dvipng.1
@@ -1,15 +1,7 @@
-.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
.\"
.\" 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
@@ -53,7 +45,7 @@
.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
+.\" titles (.TH), headers (.SH), subsections (.SS), 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 \{\
@@ -132,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "DVIPNG 1"
-.TH DVIPNG 1 "2009-02-23" "dvipng 1.12" "User commands"
+.TH DVIPNG 1 "2010-10-23" "dvipng 1.14" "User commands"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -205,9 +197,11 @@ 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).
+This option only has an effect when using bitmapped (\s-1PK\s0) fonts. The
+option sets 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
@@ -289,12 +283,12 @@ 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.
+Modern installed, there will be no need to generate bitmapped (\s-1PK\s0)
+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
@@ -328,20 +322,20 @@ 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.
+This option only has an effect when using bitmapped (\s-1PK\s0) fonts. 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 option only has an effect when using bitmapped (\s-1PK\s0) fonts. It turns
+off automatic \s-1PK\s0 font generation (\fImktexpk\fR).
+.IP "\fB\-\-nogs*\fR" 4
+.IX Item "--nogs*"
This switch prohibits the internal call to GhostScript for displaying
-PostScript specials. \fB\-\-noghostscript0\fR turns the call back on.
+PostScript specials. \fB\-\-nogs0\fR turns the call back on.
.IP "\fB\-\-nogssafer*\fR" 4
.IX Item "--nogssafer*"
Normally, if GhostScript is used to render PostScript specials, the
@@ -350,6 +344,12 @@ GhostScript interpreter is run with the option \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\-\-norawps*\fR" 4
+.IX Item "--norawps*"
+Some packages generate raw PostScript specials, even non-rendering such
+specials. This switch turns off the internal call to GhostScript
+intended to display these raw PostScript specials. \fB\-\-norawps0\fR
+turns the call back on.
.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
@@ -375,14 +375,13 @@ a value to compare with the TeX \fB\ecount0\fR values stored in the
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.
+When an external image is included, \fBdvipng\fR will automatically
+switch to truecolor mode, 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 opaque
+clipped image inclusion. 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
@@ -422,10 +421,10 @@ 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.
+levels for bitmapped fonts (\s-1PK\s0) and fonts rendered using T1lib, 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
@@ -449,17 +448,17 @@ 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).
+Enable 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
@@ -471,14 +470,20 @@ truecolor output is automatic if you include an external image in your
.IX Item "-v*"
Enable verbose operation. This will currently indicate what fonts is
used, in addition to the usual output.
+.IP "\fB\-\-width*\fR" 4
+.IX Item "--width*"
+Report the width of the image. See also \fB\-\-height\fR and
+\&\fB\-\-depth\fR.
.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.
+This option is deprecated; it should not be used. It is much better to
+select the output resolution directly with the \fB\-D\fR option. This
+option sets the magnification ratio to \fInum\fR/1000 and
+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
@@ -494,7 +499,7 @@ 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
+The full manual is accessible in info format, on most systems by typing
.PP
.Vb 1
\& info dvipng
@@ -505,4 +510,4 @@ 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
+Copyright (c) 2002\-2010 Jan-AAke Larsson
diff --git a/Build/source/texk/dvipng/dvipng-1.13/dvipng.c b/Build/source/texk/dvipng/dvipng-1.14/dvipng.c
index 78b07c1a81f..78b07c1a81f 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/dvipng.c
+++ b/Build/source/texk/dvipng/dvipng-1.14/dvipng.c
diff --git a/Build/source/texk/dvipng/dvipng-1.13/dvipng.h b/Build/source/texk/dvipng/dvipng-1.14/dvipng.h
index 68b8cc3287c..81845a82c2d 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/dvipng.h
+++ b/Build/source/texk/dvipng/dvipng-1.14/dvipng.h
@@ -112,7 +112,6 @@ typedef int bool;
# endif
#endif
-
/*************************************************************/
/************************* protos.h ************************/
/*************************************************************/
@@ -436,6 +435,7 @@ EXTERN struct internal_state {
#define BG_TRANSPARENT (1<<17)
#define BG_TRANSPARENT_ALPHA (1<<18)
#define FORCE_PALETTE (1<<19)
+#define NO_RAW_PS (1<<20)
EXTERN uint32_t option_flags INIT(BE_NONQUIET | USE_FREETYPE | USE_LIBT1);
#define PAGE_GAVE_WARN 1
diff --git a/Build/source/texk/dvipng/dvipng-1.14/dvipng.texi b/Build/source/texk/dvipng/dvipng-1.14/dvipng.texi
new file mode 100644
index 00000000000..0ceb68b301f
--- /dev/null
+++ b/Build/source/texk/dvipng/dvipng-1.14/dvipng.texi
@@ -0,0 +1,1034 @@
+\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.14
+@set month-year October 2010
+
+@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-2010 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, dvipng will use
+bitmapped (PK) fonts, and if you use PK 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
+This option only has an effect when using bitmapped (PK) fonts. The
+option sets 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
+<IMG SRC="@var{filename.png}" STYLE="vertical-align: -@var{depth}px">
+@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 (PK)
+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
+This option only has an effect when using bitmapped (PK) fonts. 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
+This option only has an effect when using bitmapped (PK) fonts. It turns
+off automatic PK font generation (@file{mktexpk}).
+@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 --nogs*
+@cindex GhostScript, turning off
+This switch prohibits the internal call to GhostScript for displaying
+PostScript specials. @samp{--nogs0} 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 --norawps*
+@cindex PostScript, turning off raw PostScript specials
+Some packages generate raw PostScript specials, even non-rendering such
+specials. This switch turns off the internal call to GhostScript
+intended to display these raw PostScript specials. @samp{--norawps0}
+turns the call back on.
+
+@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
+When an external image is included, @samp{dvipng} will automatically
+switch to truecolor mode, 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 opaque
+clipped image inclusion. 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 bitmapped fonts (PK) and fonts rendered using T1lib, 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 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 --width*
+@cindex width reporting
+Report the width of the image. See also @samp{--height} and
+@samp{--depth}.
+
+@item -x @var{num}
+@cindex magnification, overriding DVI
+This option is deprecated; it should not be used. It is much better to
+select the output resolution directly with the @samp{-D} option. This
+option sets the magnification ratio to @math{@var{num}/1000} and
+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. It also
+tries to handle some of the raw PostScript that is output from various
+packages. Some of the possibilities and problems are mentioned below.
+
+@menu
+* Encapsulated PostScript:: An internal call to GhostScript
+* Bitmapped graphics:: PNG, JPEG and GIF
+* Raw PostScript:: Ignore or give to GhostScript
+@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 Raw PostScript
+@section Raw PostScript
+
+dvipng attempts to handle raw PostScript. Rendering raw PostScript
+specials is done on top of the page by including a transparent image
+generated by the @samp{pngalpha} device in GhostScript (automatically
+selecting @samp{truecolor} mode in dvipng).
+
+Included PostScript headers are respected, and if the header
+@samp{tex.pro} is included, dvipng also throws in @samp{color.pro} and
+@samp{special.pro}. The package @samp{xcolor} includes its own headers
+with color names, and this is not only kept as a PostScript header, but
+is also read and interpreted by dvipng itself. An attempt is also made
+to respect the PGF header. The non-rendering specials from
+@samp{hyperref} are handled via some heuristics and do not give an
+error.
+
+Really rendering and moving things with raw PostScript specials is more
+troublesome. The \rotatebox macro serves as a good example. The dvips
+driver of the graphicx package surrounds DVI glyphs with PostScript code
+so that after conversion by dvips, the glyphs (now themselves in
+PostScript) will be rotated in the desired way. dvipng does not handle
+this, at present. An attempt has been made to handle the rendering
+specials output by PGF (tikz), and also PSTricks. Some things work, but
+others do not. This is especially clear when mixing PostScript and DVI
+rendering commands such as glyphs. dvipng cannot at present detect if
+PostScript code moves @samp{currentpoint} or rotates the frame since
+GhostScript does not return such information. A recommendation would be
+to produce images from these packages as EPS files and include them into
+your document in the standard manner.
+
+Another way to handle this would be to use a slower fallback (with dvips
+and gs, for example). If you want to disable raw PostScript handling in
+dvipng, use the switch @samp{--norawps}. This switch turns off the
+internal call to GhostScript intended to display these raw PostScript
+specials. Further, when dvipng encounters raw PostScript and the gs call
+is turned off, it gives a warning. It is now possible to use the switch
+@samp{--picky} to disable page rendering of pages with warnings, and use
+the slower fallback for these pages.
+
+@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 and Peter
+Breitenlohner (@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, Takeshi Abe, and
+Waldeck Schutzer.
+
+Use of the @code{gd} library requires inclusion of the following
+copyright notice, which applies to the @code{gd} library:
+
+@quotation
+Portions copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 by Cold Spring Harbor Laboratory. Funded under Grant P41-RR02188 by the National Institutes of Health.
+
+Portions copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 by Boutell.Com, Inc.
+
+Portions relating to GD2 format copyright 1999, 2000, 2001, 2002, 2003, 2004 Philip Warner.
+
+Portions relating to PNG copyright 1999, 2000, 2001, 2002, 2003, 2004 Greg Roelofs.
+
+Portions relating to gdttf.c copyright 1999, 2000, 2001, 2002, 2003, 2004 John Ellson (ellson@@graphviz.org).
+
+Portions relating to gdft.c copyright 2001, 2002, 2003, 2004 John Ellson (ellson@@graphviz.org).
+
+Portions relating to JPEG and to color quantization copyright 2000, 2001, 2002, 2003, 2004, Doug Becker and copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Thomas G. Lane. This software is based in part on the work of the Independent JPEG Group. See the file README-JPEG.TXT for more information.
+
+Portions relating to GIF compression copyright 1989 by Jef Poskanzer and David Rowley, with modifications for thread safety by Thomas Boutell.
+
+Portions relating to GIF decompression copyright 1990, 1991, 1993 by David Koblas, with modifications for thread safety by Thomas Boutell.
+
+Portions relating to WBMP copyright 2000, 2001, 2002, 2003, 2004 Maurice Szmurlo and Johan Van den Brande.
+
+Portions relating to GIF animations copyright 2004 Jaakko Hyv@"adtti (jaakko.hyvatti@@iki.fi)
+
+Permission has been granted to copy, distribute and modify gd in any context without fee, including a commercial application, provided that this notice is present in user-accessible supporting documentation.
+
+This does not affect your ownership of the derived work itself, and the intent is to assure proper credit for the authors of gd, not to interfere with your productive use of gd. If you have questions, ask. "Derived works" includes all programs that utilize the library. Credit must be given in user-accessible documentation.
+
+This software is provided "AS IS." The copyright holders disclaim all warranties, either express or implied, including but not limited to implied warranties of merchantability and fitness for a particular purpose, with respect to this code and accompanying documentation.
+
+Although their code does not appear in the current release, the authors also wish to thank Hutchison Avenue Software Corporation for their prior contributions.
+@end quotation
+
+@ifset man
+@c man begin NOTES
+The full manual is accessible in 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-2010 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
+<http://www.gnu.org/licenses/>.
+
+@sp 2
+@noindent
+Copyright @copyright{} 2002-2010 Jan-@AA{}ke Larsson
+
+@node Index
+@unnumbered Index
+
+@printindex cp
+@bye
+
diff --git a/Build/source/texk/dvipng/dvipng-1.13/enc.c b/Build/source/texk/dvipng/dvipng-1.14/enc.c
index 3a17d2a82fa..03224769c78 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/enc.c
+++ b/Build/source/texk/dvipng/dvipng-1.14/enc.c
@@ -59,15 +59,15 @@ static struct encoding* InitEncoding(char* encoding)
pos=fmmap.data;
max=fmmap.data+fmmap.size;
buf=encp->name+strlen(encoding)+1;
-#define SKIPCOMMENT(x) if (*x=='%') while (x<max && *x!='\n') x++;
+#define SKIPCOMMENT(x) if (*x=='%') while (x<max && *x!='\r' && *x!='\n') x++;
while(pos<max && *pos!='/') {
SKIPCOMMENT(pos);
pos++;
}
pos++;
encp->charname[256]=buf;
- while(pos<max && *pos!='['
- && *pos!=' ' && *pos!='\t' && *pos!='\n' && *pos!='%')
+ while(pos<max && *pos!='[' && *pos!='%'
+ && *pos!=' ' && *pos!='\t' && *pos!='\r' && *pos!='\n')
*buf++=*pos++;
*buf++='\0';
DEBUG_PRINT(DEBUG_ENC,("\n PS ENCODING '%s'",
@@ -84,7 +84,8 @@ static struct encoding* InitEncoding(char* encoding)
while(pos<max && *pos!=']') {
pos++;
encp->charname[i++]=buf;
- while(pos<max && *pos!=' ' && *pos!='\t' && *pos!='\n' && *pos!='%')
+ while(pos<max && *pos!='%' && *pos!=' ' \
+ && *pos!='\t' && *pos!='\r' && *pos!='\n')
*buf++=*pos++;
*buf++='\0';
DEBUG_PRINT(DEBUG_ENC,("\n PS ENCODING %d '%s'",
diff --git a/Build/source/texk/dvipng/dvipng-1.13/font.c b/Build/source/texk/dvipng/dvipng-1.14/font.c
index 2a8b59b9723..2a8b59b9723 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/font.c
+++ b/Build/source/texk/dvipng/dvipng-1.14/font.c
diff --git a/Build/source/texk/dvipng/dvipng-1.13/fontmap.c b/Build/source/texk/dvipng/dvipng-1.14/fontmap.c
index c779d6674b4..df6c6e43515 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/fontmap.c
+++ b/Build/source/texk/dvipng/dvipng-1.14/fontmap.c
@@ -148,9 +148,9 @@ static struct psfontmap *SearchPSFontMap(char* fontname,
}
while(pos<end && (entry==NULL || strcmp(entry->tfmname,fontname)!=0)) {
while(pos < end
- && (*pos=='\n' || *pos==' ' || *pos=='\t'
+ && (*pos=='\r' || *pos=='\n' || *pos==' ' || *pos=='\t'
|| *pos=='%' || *pos=='*' || *pos==';' || *pos=='#')) {
- while(pos < end && *pos!='\n') pos++; /* skip comments/empty rows */
+ while(pos < end && *pos!='\r' && *pos!='\n') pos++; /* skip comments/empty rows */
pos++;
}
if (pos < end) {
@@ -166,7 +166,7 @@ static struct psfontmap *SearchPSFontMap(char* fontname,
}
/* first word is font name */
entry->tfmname = newword(&pos,end);
- while(pos < end && *pos!='\n') pos++;
+ while(pos < end && *pos!='\r' && *pos!='\n') pos++;
entry->end = pos;
}
pos++;
diff --git a/Build/source/texk/dvipng/dvipng-1.13/ft.c b/Build/source/texk/dvipng/dvipng-1.14/ft.c
index fdb8a89489c..fdb8a89489c 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/ft.c
+++ b/Build/source/texk/dvipng/dvipng-1.14/ft.c
diff --git a/Build/source/texk/dvipng/dvipng-1.14/install.texi b/Build/source/texk/dvipng/dvipng-1.14/install.texi
new file mode 100644
index 00000000000..c58f9af6013
--- /dev/null
+++ b/Build/source/texk/dvipng/dvipng-1.14/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/dvipng-1.14/macros.texi b/Build/source/texk/dvipng/dvipng-1.14/macros.texi
new file mode 100644
index 00000000000..3c90a59eb15
--- /dev/null
+++ b/Build/source/texk/dvipng/dvipng-1.14/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
+<http://www.gnu.org/licenses/>.
+
+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/dvipng-1.13/miktex.h b/Build/source/texk/dvipng/dvipng-1.14/miktex.h
index c949cd1aff6..c949cd1aff6 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/miktex.h
+++ b/Build/source/texk/dvipng/dvipng-1.14/miktex.h
diff --git a/Build/source/texk/dvipng/dvipng-1.13/miktex.mak b/Build/source/texk/dvipng/dvipng-1.14/miktex.mak
index b291ba67207..b291ba67207 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/miktex.mak
+++ b/Build/source/texk/dvipng/dvipng-1.14/miktex.mak
diff --git a/Build/source/texk/dvipng/dvipng-1.13/misc.c b/Build/source/texk/dvipng/dvipng-1.14/misc.c
index a1d8c3d95eb..aaf5f20f823 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/misc.c
+++ b/Build/source/texk/dvipng/dvipng-1.14/misc.c
@@ -440,6 +440,22 @@ bool DecodeArgs(int argc, char ** argv)
option_flags &= ~NO_GSSAFER;
Message(PARSE_STDIN,"GhostScript calls use -dSAFER\n");
}
+ } else if (strncmp(p,"ogs",3)==0) {
+ if (p[3] != '0') {
+ option_flags |= NO_GHOSTSCRIPT;
+ Message(PARSE_STDIN,"No GhostScript calls\n",p);
+ } else {
+ option_flags &= ~NO_GHOSTSCRIPT;
+ Message(PARSE_STDIN,"GhostScript calls made\n");
+ }
+ } else if (strncmp(p,"orawps",6)==0) {
+ if (p[6] != '0') {
+ option_flags |= NO_RAW_PS;
+ Message(PARSE_STDIN,"Conversion of raw PostScript will not be attempted\n",p);
+ } else {
+ option_flags &= ~NO_RAW_PS;
+ Message(PARSE_STDIN,"Conversion of raw PostScript will be attempted\n",p);
+ }
} else
goto DEFAULT;
break ;
@@ -604,15 +620,16 @@ or <http://www.gnu.org/licenses/>.");
fprintf(stdout," -fg s Foreground color (TeX-style color)\n");
fprintf(stdout," --follow* Wait for data at end-of-file\n");
#ifdef HAVE_FT2
- fprintf(stdout," --freetype* FreeType font rendering (default on)\n");
+ fprintf(stdout," --freetype* FreeType font rendering (preferred, default on)\n");
#endif
fprintf(stdout," --gamma # Control color interpolation\n");
#ifdef HAVE_GDIMAGEGIF
fprintf(stdout," --gif Output GIF images (dvigif default)\n");
#endif
fprintf(stdout," --height* Output the image height on stdout\n");
- fprintf(stdout," --noghostscript* Don't use ghostscript for PostScript specials\n");
+ fprintf(stdout," --nogs* Don't use ghostscript for PostScript specials\n");
fprintf(stdout," --nogssafer* Don't use -dSAFER in ghostscript calls\n");
+ fprintf(stdout," --norawps* Don't convert raw PostScript specials\n");
#ifdef HAVE_GDIMAGECREATETRUECOLOR
fprintf(stdout," --palette* Force palette output\n");
#endif
@@ -628,6 +645,7 @@ or <http://www.gnu.org/licenses/>.");
fprintf(stdout," --truecolor* Truecolor output\n");
#endif
fprintf(stdout," -Q # Quality (T1lib and PK subsampling)\n");
+ fprintf(stdout," --width* Output the image width on stdout\n");
#ifdef HAVE_GDIMAGEPNGEX
fprintf(stdout," -z # PNG compression level\n");
#endif
@@ -657,13 +675,14 @@ void DecodeString(char *string)
int strc=1;
strv[0]=NULL; /* No program name */
- while (*string==' ' || *string=='\t' || *string=='\n')
+ while (*string==' ' || *string=='\t' || *string=='\r' || *string=='\n')
string++;
while (*string!='\0') {
strv[strc++]=string;
if (*string!='\'') {
/* Normal split at whitespace */
- while (*string!=' ' && *string!='\t' && *string!='\n' && *string!='\0')
+ while (*string!=' ' && *string!='\t' \
+ && *string!='\n' && *string!='\r' && *string!='\0')
string++;
} else {
/* String delimiter found , so search for next */
@@ -673,7 +692,7 @@ void DecodeString(char *string)
}
if (*string!='\0')
*string++='\0';
- while (*string==' ' || *string=='\t' || *string=='\n')
+ while (*string==' ' || *string=='\t' || *string=='\r' || *string=='\n')
string++;
}
if (strc>1) /* Nonempty */
diff --git a/Build/source/texk/dvipng/dvipng-1.13/papersiz.c b/Build/source/texk/dvipng/dvipng-1.14/papersiz.c
index 3cf15d7a06c..6f5e99794d2 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/papersiz.c
+++ b/Build/source/texk/dvipng/dvipng-1.14/papersiz.c
@@ -52,6 +52,7 @@ static int32_t myatodim(const char ** p)
while (*q != ',' && *q !='\0')
q++;
tmp = tmp*lengthsp[i]*dpi/4736286L; /* sp * dots/in / (sp/in), convert sp to pixels */
+ *p=q;
return((int32_t) tmp);
}
diff --git a/Build/source/texk/dvipng/dvipng-1.13/pk.c b/Build/source/texk/dvipng/dvipng-1.14/pk.c
index 446dc7ed2ee..446dc7ed2ee 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/pk.c
+++ b/Build/source/texk/dvipng/dvipng-1.14/pk.c
diff --git a/Build/source/texk/dvipng/dvipng-1.13/ppagelist.c b/Build/source/texk/dvipng/dvipng-1.14/ppagelist.c
index b7467a98539..b7467a98539 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/ppagelist.c
+++ b/Build/source/texk/dvipng/dvipng-1.14/ppagelist.c
diff --git a/Build/source/texk/dvipng/dvipng-1.14/readme.texi b/Build/source/texk/dvipng/dvipng-1.14/readme.texi
new file mode 100644
index 00000000000..378333376ae
--- /dev/null
+++ b/Build/source/texk/dvipng/dvipng-1.14/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/dvipng-1.13/set.c b/Build/source/texk/dvipng/dvipng-1.14/set.c
index af4e4ebdfaa..af4e4ebdfaa 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/set.c
+++ b/Build/source/texk/dvipng/dvipng-1.14/set.c
diff --git a/Build/source/texk/dvipng/dvipng-1.13/sfd.c b/Build/source/texk/dvipng/dvipng-1.14/sfd.c
index 99520b116ce..92fae01d960 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/sfd.c
+++ b/Build/source/texk/dvipng/dvipng-1.14/sfd.c
@@ -47,21 +47,22 @@ static struct subfont* ReadSubfont(char* sfdname, char *infix)
return(NULL);
pos=fmmap.data;
max=fmmap.data+fmmap.size;
- while(pos<max && (*pos==' ' || *pos=='\n' || *pos=='\t')) pos++;
+ while(pos<max && (*pos==' ' || *pos=='\r' || *pos=='\n' || *pos=='\t')) pos++;
while (pos<max && *pos=='#') {
- while(pos<max && *pos!='\n') pos++;
- while(pos<max && (*pos==' ' || *pos=='\n' || *pos=='\t')) pos++;
+ while(pos<max && *pos!='\r' && *pos!='\n') pos++;
+ while(pos<max && (*pos==' ' || *pos=='\r' || *pos=='\n' || *pos=='\t')) pos++;
}
while(pos+strlen(infix)<max
&& (strncmp(pos,infix,strlen(infix))!=0
|| (pos[strlen(infix)]!=' ' && pos[strlen(infix)]!='\t'))) {
- while(pos+1<max && (*(pos+1)!='\n' || *pos=='\\'))
+ /* skip lines, taking line continuation into account */
+ while(pos+1<max && (*(pos+1)!='\r' || *(pos+1)!='\n' || *pos=='\\'))
pos++;
pos++;
- while(pos<max && (*pos==' ' || *pos=='\n' || *pos=='\t')) pos++;
+ while(pos<max && (*pos==' ' || *pos=='\r' || *pos=='\n' || *pos=='\t')) pos++;
while (pos<max && *pos=='#') {
- while(pos<max && *pos!='\n') pos++;
- while(pos<max && (*pos==' ' || *pos=='\n' || *pos=='\t')) pos++;
+ while(pos<max && *pos!='\r' && *pos!='\n') pos++;
+ while(pos<max && (*pos==' ' || *pos=='\r' || *pos=='\n' || *pos=='\t')) pos++;
}
}
pos=pos+strlen(infix);
@@ -79,7 +80,7 @@ static struct subfont* ReadSubfont(char* sfdname, char *infix)
sfdp->infix=(char*)sfdp+sizeof(struct subfont)+strlen(sfdname)+1;
strcpy(sfdp->infix,infix);
sfdp->encoding=FT_ENCODING_UNICODE;
- while (pos<max && *pos != '\n') {
+ while (pos<max && *pos != '\r' && *pos != '\n') {
number=strtol(pos,&pos,0);
while(pos<max && (*pos==' ' || *pos=='\t')) pos++;
switch(*pos) {
@@ -101,7 +102,9 @@ static struct subfont* ReadSubfont(char* sfdname, char *infix)
DEBUG_PRINT(DEBUG_ENC,("\n SUBFONT MAP %d %d",codepoint,number));
}
while(pos<max && (*pos==' ' || *pos=='\t')) pos++;
- while(pos<max && *pos=='\\' && pos+1<max && *(pos+1)=='\n') {
+ /* take line continuation into account */
+ while(pos+1<max && *pos=='\\' && (*(pos+1)=='\r' || *(pos+1)=='\n')) {
+ if (pos+2<max && *(pos+1)=='\r' && *(pos+2)=='\n') pos++;
pos+=2;
while(pos<max && (*pos==' ' || *pos=='\t')) pos++;
}
diff --git a/Build/source/texk/dvipng/dvipng-1.13/special.c b/Build/source/texk/dvipng/dvipng-1.14/special.c
index 9a983b6df1c..fdc92e3eb8b 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/special.c
+++ b/Build/source/texk/dvipng/dvipng-1.14/special.c
@@ -25,10 +25,13 @@
#include "dvipng.h"
#ifndef MIKTEX
-#ifdef WIN32
+#ifndef WIN32
+#include <wait.h>
+#else /* WIN32 */
#include <fcntl.h>
#include <io.h>
#include <process.h>
+#define pipe(p) _pipe(p, 65536, O_BINARY | _O_NOINHERIT)
#define snprintf _snprintf
#endif /* WIN32 */
#endif
@@ -41,9 +44,9 @@
struct pscode {
struct pscode* next;
char* special; /* complete special */
- char* code; /* PS string, null if a file */
+ const char* code; /* PS string, null if a file */
char* filename; /* file name, null if a string */
- char* postcode; /* post PS string */
+ const char* postcode; /* post PS string */
struct filemmap fmmap; /* file mmap */
};
@@ -100,7 +103,7 @@ void ClearPSHeaders(void)
}
}
-static void writepscode(struct pscode* pscodep, FILE* psstream)
+static void writepscode(FILE* psstream,struct pscode* pscodep)
{
while (pscodep!=NULL) {
if (pscodep->code!=NULL) {
@@ -144,15 +147,21 @@ static gdImagePtr
ps2png(struct pscode* pscodep, const char *device, int hresolution, int vresolution,
int llx, int lly, int urx, int ury, int bgred, int bggreen, int bgblue)
{
+ int pspipe[2], pngpipe[2];
+#define READ_END 0
+#define WRITE_END 1
+ FILE *psstream=NULL, *pngstream=NULL;
+ char resolution[STRSIZE];
+ /* char devicesize[STRSIZE]; */
+ gdImagePtr psimage=NULL;
#ifndef MIKTEX
- int downpipe[2], uppipe[2];
-#ifdef WIN32
+#ifndef WIN32
+ pid_t pid;
+#else /* WIN32 */
unsigned long nexitcode = STILL_ACTIVE;
HANDLE hchild;
int savestdin, savestdout;
-#else /* !WIN32 */
- pid_t pid;
-#endif /* !WIN32 */
+#endif /* WIN32 */
#else /* MIKTEX */
HANDLE hPngStream;
HANDLE hPsStream;
@@ -161,17 +170,11 @@ ps2png(struct pscode* pscodep, const char *device, int hresolution, int vresolut
_TCHAR szCommandLine[2048];
_TCHAR szGsPath[_MAX_PATH];
#define GS_PATH szGsPath
- int fd;
+#define fdopen _tfdopen
+#define close _close
#endif /* MIKTEX */
- FILE *psstream=NULL, *pngstream=NULL;
- char resolution[STRSIZE];
- /* char devicesize[STRSIZE]; */
- gdImagePtr psimage=NULL;
-#ifndef WIN32
- static bool showpage=false;
-#endif
- sprintf(resolution, "-r%dx%d",hresolution,vresolution);
+ snprintf(resolution,STRSIZE,"-r%dx%d",hresolution,vresolution);
/* Future extension for \rotatebox
status=sprintf(devicesize, "-g%dx%d",
//(int)((sin(atan(1.0))+1)*
@@ -187,17 +190,17 @@ ps2png(struct pscode* pscodep, const char *device, int hresolution, int vresolut
(option_flags & NO_GSSAFER) ? "-": "-dSAFER",
(option_flags & NO_GSSAFER) ? "": "- "));
#ifndef MIKTEX
+ if (pipe(pspipe) || pipe(pngpipe)) return(NULL);
#ifndef WIN32
- if (pipe(downpipe) || pipe(uppipe)) return(NULL);
- /* Ready to fork */
- pid = fork ();
- if (pid == 0) { /* Child process. Execute gs. */
- close(downpipe[1]);
- dup2(downpipe[0], STDIN_FILENO);
- close(downpipe[0]);
- close(uppipe[0]);
- dup2(uppipe[1], STDOUT_FILENO);
- close(uppipe[1]);
+ /* We have fork: execute gs in child */
+ pid = fork();
+ if (pid == 0) { /* Child, execute gs. */
+ close(pspipe[WRITE_END]);
+ dup2(pspipe[READ_END], STDIN_FILENO);
+ close(pspipe[READ_END]);
+ close(pngpipe[READ_END]);
+ dup2(pngpipe[WRITE_END], STDOUT_FILENO);
+ close(pngpipe[WRITE_END]);
execlp(GS_PATH, GS_PATH, device, resolution, /*devicesize,*/
"-dBATCH", "-dNOPAUSE", "-q", "-sOutputFile=-",
"-dTextAlphaBits=4", "-dGraphicsAlphaBits=4",
@@ -205,178 +208,101 @@ ps2png(struct pscode* pscodep, const char *device, int hresolution, int vresolut
(option_flags & NO_GSSAFER) ? NULL: "-",
NULL);
_exit (EXIT_FAILURE);
-#else /* WIN32 */
- if (_pipe(downpipe, 65536, O_BINARY | _O_NOINHERIT)==-1 ||
- _pipe(uppipe, 65536, O_BINARY | _O_NOINHERIT)==-1) {
- fprintf(stderr, "Pipe error.\n");
- return NULL;
-#endif /* WIN32 */
}
- /* Parent process. */
-#ifdef WIN32
+#else /* WIN32 */
+ /* No fork but spawn: execute gs in present process environment.
+ Save fileno's, attach pipes to this process' stdin and stdout. */
savestdin = _dup(fileno(stdin));
- _dup2(downpipe[0], fileno(stdin));
-#endif /* WIN32 */
- close(downpipe[0]);
-#ifdef WIN32
+ _dup2(pspipe[READ_END], fileno(stdin));
savestdout = _dup(fileno(stdout));
- _dup2(uppipe[1], fileno(stdout));
- close(uppipe[1]);
-#endif /* WIN32 */
- psstream=fdopen(downpipe[1],"wb");
- /* fclose(psstream); psstream=fopen("test.ps","wb"); */
-#ifndef WIN32
- if (psstream == NULL)
- close(downpipe[1]);
- close(uppipe[1]);
- pngstream=fdopen(uppipe[0],"rb");
- if (pngstream == NULL)
- close(uppipe[0]);
-#else /* WIN32 */
- if (psstream == NULL) {
- fprintf(stderr, "psstream == NULL\n");
- close(downpipe[1]);
- }
- pngstream=fdopen(uppipe[0],"rb");
- if (pngstream == NULL) {
- fprintf(stderr, "pngstream == NULL\n");
- close(uppipe[0]);
- }
- hchild=(HANDLE)spawnlp(_P_NOWAIT, GS_PATH, GS_PATH, device, resolution,
- "-dBATCH", "-dNOPAUSE", "-q", "-sOutputFile=-",
- "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4",
- (option_flags & NO_GSSAFER) ? "-": "-dSAFER",
- (option_flags & NO_GSSAFER) ? NULL : "-", NULL);
-
- if(hchild) {
+ _dup2(pngpipe[WRITE_END], fileno(stdout));
+ if ((hchild=
+ (HANDLE)spawnlp(_P_NOWAIT, GS_PATH, GS_PATH, device, resolution,
+ "-dBATCH", "-dNOPAUSE", "-q", "-sOutputFile=-",
+ "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4",
+ (option_flags & NO_GSSAFER) ? "-": "-dSAFER",
+ (option_flags & NO_GSSAFER) ? NULL : "-", NULL))==0)
+ return NULL;
#endif /* WIN32 */
+ close(pspipe[READ_END]);
+ close(pngpipe[WRITE_END]);
#else /* MIKTEX */
+ /* No fork but miktex_start_process3: execute gs using that.
+ Attach file descriptors to that process' stdin and stdout. */
if (! miktex_find_miktex_executable("mgs.exe", szGsPath)) {
Warning("Ghostscript could not be found");
return(NULL);
}
- sprintf(szCommandLine,"\"%s\" %s %s %s %s %s %s %s %s %s %s",/* %s",*/
- szGsPath, device, resolution, /*devicesize,*/
- "-dBATCH", "-dNOPAUSE", "-q", "-sOutputFile=-",
- "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4",
- (option_flags & NO_GSSAFER) ? "-": "-dSAFER",
- (option_flags & NO_GSSAFER) ? "": "-");
+ snprintf(szCommandLine,2048,"\"%s\" %s %s %s %s %s %s %s %s %s %s",/* %s",*/
+ szGsPath, device, resolution, /*devicesize,*/
+ "-dBATCH", "-dNOPAUSE", "-q", "-sOutputFile=-",
+ "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4",
+ (option_flags & NO_GSSAFER) ? "-": "-dSAFER",
+ (option_flags & NO_GSSAFER) ? "": "-");
if (! miktex_start_process_3(szCommandLine, &pi, INVALID_HANDLE_VALUE,
&hPsStream, &hPngStream, &hStdErr, 0)) {
Warning("Ghostscript could not be started");
return(NULL);
}
CloseHandle (pi.hThread);
- fd = _open_osfhandle((intptr_t)hPsStream, _O_WRONLY);
- if (fd >= 0) {
- psstream = _tfdopen(fd, "wb");
- if (psstream == NULL)
- _close (fd);
- }
- fd = _open_osfhandle((intptr_t)hPngStream, _O_RDONLY);
- if (fd >= 0) {
- pngstream = _tfdopen(fd, "rb");
- if (pngstream == NULL)
- _close (fd);
- }
+ pspipe[WRITE_END] = _open_osfhandle((intptr_t)hPsStream, _O_WRONLY);
+ pngpipe[READ_END] = _open_osfhandle((intptr_t)hPngStream, _O_RDONLY);
#endif /* MIKTEX */
- if (psstream) {
- writepscode(psheaderp,psstream);
- DEBUG_PRINT(DEBUG_GS,("\n PS CODE:\t<</PageSize[%d %d]/PageOffset[%d %d[1 1 dtransform exch]{0 ge{neg}if exch}forall]>>setpagedevice",
- urx - llx, ury - lly,llx,lly));
- fprintf(psstream, "<</PageSize[%d %d]/PageOffset[%d %d[1 1 dtransform exch]{0 ge{neg}if exch}forall]>>setpagedevice\n",
- urx - llx, ury - lly,llx,lly);
- if ( bgred < 255 || bggreen < 255 || bgblue < 255 ) {
- DEBUG_PRINT(DEBUG_GS,("\n PS CODE:\tgsave %f %f %f setrgbcolor clippath fill grestore",
- bgred/255.0, bggreen/255.0, bgblue/255.0));
- fprintf(psstream, "gsave %f %f %f setrgbcolor clippath fill grestore",
- bgred/255.0, bggreen/255.0, bgblue/255.0);
- }
-
-/* WIN32
-write the following at the top of an eps:
-
-%!
-/DVIPNGDICT 100 dict def
-DVIPNGDICT begin /showpage {} def end
-DVIPNGDICT begin
-*/
-
-#ifdef WIN32
- fprintf(psstream, "\n%%!\n/DVIPNGDICT 100 dict def\n");
- fprintf(psstream, "DVIPNGDICT begin /showpage {} def end\n");
- fprintf(psstream, "DVIPNGDICT begin\n");
-#endif
- writepscode(pscodep,psstream);
-
-/* WIN32
-write the following at the very end of an eps:
-
-end
-showpage
-*/
-
-#ifdef WIN32
- fprintf(psstream, "\nend\nshowpage\n");
-#endif
-
-#ifndef WIN32
- if (showpage) {
- DEBUG_PRINT(DEBUG_GS,("\n PS CODE:\tshowpage"));
- fprintf(psstream, " showpage ");
+ if (pspipe[WRITE_END] >= 0) {
+ if ((psstream=fdopen(pspipe[WRITE_END],"wb")) == NULL)
+ close(pspipe[WRITE_END]);
+ else {
+ writepscode(psstream,psheaderp);
+ /* Page size */
+ DEBUG_PRINT(DEBUG_GS,("\n PS CODE:\t<</PageSize[%d %d]/PageOffset[%d %d[1 1 dtransform exch]{0 ge{neg}if exch}forall]>>setpagedevice",
+ urx - llx, ury - lly,llx,lly));
+ fprintf(psstream, "<</PageSize[%d %d]/PageOffset[%d %d[1 1 dtransform exch]{0 ge{neg}if exch}forall]>>setpagedevice\n",
+ urx - llx, ury - lly,llx,lly);
+ /* Background color */
+ if ( bgred < 255 || bggreen < 255 || bgblue < 255 ) {
+ DEBUG_PRINT(DEBUG_GS,("\n PS CODE:\tgsave %f %f %f setrgbcolor clippath fill grestore",
+ bgred/255.0, bggreen/255.0, bgblue/255.0));
+ fprintf(psstream, "gsave %f %f %f setrgbcolor clippath fill grestore\n",
+ bgred/255.0, bggreen/255.0, bgblue/255.0);
+ }
+ writepscode(psstream,pscodep);
+ fclose(psstream);
}
-#endif
-
- fclose(psstream);
- }
- if (pngstream) {
- psimage = gdImageCreateFromPng(pngstream);
- fclose(pngstream);
}
-#ifdef MIKTEX
- CloseHandle(pi.hProcess);
-#else /* !MIKTEX */
-#ifdef WIN32
+ if (pngpipe[READ_END] >= 0) {
+ if((pngstream=fdopen(pngpipe[READ_END],"rb")) == NULL)
+ close(pngpipe[READ_END]);
+ else {
+ psimage = gdImageCreateFromPng(pngstream);
+ fclose(pngstream);
+ }
}
+#ifndef MIKTEX
+#ifndef WIN32
+ /* Wait for child */
+ waitpid(pid,NULL,0);
+#else
+ /* Wait for spawned process, restore stdin and stdout */
while(nexitcode == STILL_ACTIVE)
GetExitCodeProcess((HANDLE)hchild, &nexitcode);
-
CloseHandle((HANDLE)hchild);
_dup2(savestdin, fileno(stdin));
_dup2(savestdout, fileno(stdout));
close(savestdin);
close(savestdout);
- close(uppipe[0]);
- close(uppipe[1]);
- close(downpipe[0]);
- close(downpipe[1]);
#endif /* WIN32 */
-#endif /* !MIKTEX */
-
+#else /* MIKTEX */
+ /* Close miktex process */
+ CloseHandle(pi.hProcess);
+#endif /* MIKTEX */
+#ifdef DEBUG
if (psimage == NULL) {
DEBUG_PRINT(DEBUG_GS,("\n GS OUTPUT:\tNO IMAGE "));
-
-/*
- For WIN32 we always output showpage.
-*/
-
-#ifndef WIN32
- if (!showpage) {
- showpage=true;
- DEBUG_PRINT(DEBUG_GS,("(will try adding \"showpage\") "));
- psimage=ps2png(pscodep,
- device, hresolution, vresolution, llx, lly, urx, ury,
- bgred,bggreen,bgblue);
- showpage=false;
- }
-#endif
-
-#ifdef DEBUG
} else {
DEBUG_PRINT(DEBUG_GS,("\n GS OUTPUT:\t%dx%d image ",
gdImageSX(psimage),gdImageSY(psimage)));
-#endif
}
+#endif
return psimage;
}
@@ -456,7 +382,7 @@ static void newpsheader(const char* special) {
void SetSpecial(char * special, int32_t hh, int32_t vv)
/* interpret a \special command, made up of keyword=value pairs,
- * or !header or ps:literal_PostScript
+ * or !header or ps:raw_PostScript
*/
{
DEBUG_PRINT(DEBUG_DVI,(" '%s'",special));
@@ -599,10 +525,13 @@ void SetSpecial(char * special, int32_t hh, int32_t vv)
#endif
break;
default: /* Default, PostScript magic: "%!PS-Adobe" */
- if (option_flags & NO_GHOSTSCRIPT) {
- Warning("GhostScript calls disallowed by --noghostscript" );
+ if (option_flags & NO_GHOSTSCRIPT) {
+ Warning("GhostScript calls disallowed by --nogs" );
page_flags |= PAGE_GAVE_WARN;
} else {
+ /* Ensure one (and only one) showpage */
+ image.code=" /DVIPNGDICT 100 dict def DVIPNGDICT begin /showpage {} def ";
+ image.postcode=" end showpage\n";
/* Use alpha blending, and render transparent postscript
images. The alpha blending works correctly only from
libgd 2.0.12 upwards */
@@ -768,7 +697,12 @@ void SetSpecial(char * special, int32_t hh, int32_t vv)
return;
}
- if (special[0]=='"' || strncmp(special,"ps:",3)==0) { /* Literal PostScript */
+ if (special[0]=='"' || strncmp(special,"ps:",3)==0) { /* Raw PostScript */
+ if (option_flags & NO_RAW_PS) {
+ Warning("Raw PostScript rendering disallowed by --norawps" );
+ page_flags |= PAGE_GAVE_WARN;
+ return;
+ }
if (page_imagep != NULL) { /* Draw into image */
static struct pscode *pscodep=NULL;
static bool psenvironment=false;
@@ -776,13 +710,39 @@ void SetSpecial(char * special, int32_t hh, int32_t vv)
struct pscode *tmp;
gdImagePtr psimage=NULL;
char *txt;
- const char *newspecial=NULL; /* Avoid warning from special="..." */
+ const char *specialend=special+strlen(special);
+ const char *newspecial=NULL;
- /* Some packages split their literal PostScript code into
+ /* hyperref non-rendering PostScript specials. */
+ if (strcmp(specialend-11,"pdfmark end")==0
+ || strcmp(specialend-7,"H.A end")==0
+ || strcmp(specialend-7,"H.B end")==0
+ || strcmp(specialend-7,"H.L end")==0
+ || strcmp(specialend-7,"H.R end")==0
+ || strcmp(specialend-7,"H.S end")==0
+ || strcmp(specialend-7,"H.V end")==0
+ || strncmp(special,"ps:SDict begin /product",23)==0)
+ if (pscodep==NULL)
+ return;
+ else
+ newspecial="";
+ /* pgf PostScript specials. */
+ else if (strcmp(special,"ps:: pgfo")==0)
+ /* pgf page start. The first numbers are generally valid for
+ the bop instruction, and the latter code is to move the
+ origin to the right place. */
+ newspecial="ps:: 39139632 55387786 1000 600 600 (tikzdefault.dvi) @start 1 0 bop pgfo 0 0 matrix defaultmatrix transform itransform translate";
+ else if (strcmp(special,"ps:: pgfc")==0)
+ newspecial="ps:: pgfc eop end";
+ /* Some packages split their raw PostScript code into
several specials. Check for those, and concatenate them so
that they're given to one and the same invocation of gs */
+ else if (strncmp(special,"ps::[begin]",11)==0)
+ psenvironment=true;
+ else if (strncmp(special,"ps::[end]",9)==0)
+ psenvironment=false;
if (pscodep==NULL) {
- Message(BE_NONQUIET," <literal PS");
+ Message(BE_NONQUIET," <raw PostScript");
if ((tmp=pscodep=malloc(sizeof(struct pscode)))==NULL)
Fatal("cannot malloc space for raw PostScript struct");
} else {
@@ -793,18 +753,6 @@ void SetSpecial(char * special, int32_t hh, int32_t vv)
Fatal("cannot malloc space for raw PostScript struct");
tmp=tmp->next;
}
- if (strncmp(special,"ps::[begin]",11)==0)
- psenvironment=true;
- else if (strncmp(special,"ps::[end]",9)==0)
- psenvironment=false;
- else if (strcmp(special,"ps:: pgfo")==0)
- /* PostScript code to start page for pgf PostScript
- specials. The first numbers are generally valid for the bop
- instruction, and the latter code is to move the origin to
- the right place. */
- newspecial="ps:: 39139632 55387786 1000 600 600 (tikzdefault.dvi) @start 1 0 bop pgfo 0 0 matrix defaultmatrix transform itransform translate";
- else if (strcmp(special,"ps:: pgfc")==0)
- newspecial="ps:: pgfc eop end";
nextisps=DVIIsNextPSSpecial(dvi);
if (psenvironment || nextisps) {
if (!nextisps) {
@@ -829,7 +777,7 @@ void SetSpecial(char * special, int32_t hh, int32_t vv)
PSCodeInit(tmp,special);
/* Now, render image */
if (option_flags & NO_GHOSTSCRIPT)
- Warning("GhostScript calls disallowed by --noghostscript" );
+ Warning("GhostScript calls disallowed by --nogs" );
else {
/* Use alpha blending, and render transparent postscript
images. The alpha blending works correctly only from
@@ -852,7 +800,7 @@ void SetSpecial(char * special, int32_t hh, int32_t vv)
gdImageAlphaBlending(page_imagep,0);
gdImageDestroy(psimage);
} else
- Warning("No GhostScript pngalpha output, cannot render raw PostScript");
+ Warning("No image output from inclusion of raw PostScript");
} else
Warning("Palette output, cannot include raw PostScript");
#else
diff --git a/Build/source/texk/dvipng/dvipng-1.13/t1.c b/Build/source/texk/dvipng/dvipng-1.14/t1.c
index 4a74a8274f4..4a74a8274f4 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/t1.c
+++ b/Build/source/texk/dvipng/dvipng-1.14/t1.c
diff --git a/Build/source/texk/dvipng/dvipng-1.13/test_dvipng.tex b/Build/source/texk/dvipng/dvipng-1.14/test_dvipng.tex
index 34814776070..34814776070 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/test_dvipng.tex
+++ b/Build/source/texk/dvipng/dvipng-1.14/test_dvipng.tex
diff --git a/Build/source/texk/dvipng/dvipng-1.13/tfm.c b/Build/source/texk/dvipng/dvipng-1.14/tfm.c
index a8a829cc932..a8a829cc932 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/tfm.c
+++ b/Build/source/texk/dvipng/dvipng-1.14/tfm.c
diff --git a/Build/source/texk/dvipng/dvipng-1.13/vf.c b/Build/source/texk/dvipng/dvipng-1.14/vf.c
index d1d33fe6d7e..d1d33fe6d7e 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/vf.c
+++ b/Build/source/texk/dvipng/dvipng-1.14/vf.c