summaryrefslogtreecommitdiff
path: root/systems/doc/dvipdfmx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /systems/doc/dvipdfmx
Initial commit
Diffstat (limited to 'systems/doc/dvipdfmx')
-rw-r--r--systems/doc/dvipdfmx/README510
-rw-r--r--systems/doc/dvipdfmx/dvipdfmx-special.pdfbin0 -> 179950 bytes
-rw-r--r--systems/doc/dvipdfmx/dvipdfmx-special.tex608
-rw-r--r--systems/doc/dvipdfmx/dvipdfmx.pdfbin0 -> 261192 bytes
-rw-r--r--systems/doc/dvipdfmx/dvipdfmx.tex2240
-rw-r--r--systems/doc/dvipdfmx/fdl-1.3.txt451
-rw-r--r--systems/doc/dvipdfmx/tug2003-slides.pdfbin0 -> 279575 bytes
-rw-r--r--systems/doc/dvipdfmx/tug2005.pdfbin0 -> 2595371 bytes
8 files changed, 3809 insertions, 0 deletions
diff --git a/systems/doc/dvipdfmx/README b/systems/doc/dvipdfmx/README
new file mode 100644
index 0000000000..2ab97e311a
--- /dev/null
+++ b/systems/doc/dvipdfmx/README
@@ -0,0 +1,510 @@
+dvipdfmx and xdvipdfmx for TeX Live
+===================================
+
+xdvipdfmx
+=========
+
+xdvipdfmx is an extended version of dvipdfmx, and is now incorporated in
+the same sources.
+
+The extensions provided by xdvipdfmx provide support for the Extended DVI
+(.xdv) format used by xetex, including support for platform-native fonts
+and the xetex graphics primitives, as well as Unicode/OpenType text.
+
+Like its direct ancestor dvipdfmx, this is free software and may be
+redistributed under the terms of the GNU General Public License,
+version 2 or (at your option) any later version.
+
+There is a hope to merge xdvipdfmx into dvipdfmx.
+
+Jonathan Kew mentions that in the past, XeTeX used a Mac-specific
+program xdv2pdf as the backend instead of xdvipdfmx. xdv2pdf supported
+a couple of special effects that are not yet available through
+xdvipdfmx: the Quartz graphics-based shadow support, AAT "variation"
+fonts like Skia, transparency as an attribute of font color, maybe other
+things. It would be nice for those things to continue to be supported,
+if anyone is looking for some nontrivial but not-impossible job and
+happens across this file.
+
+The dvipdfmx Project
+====================
+
+Copyright (C) 2002-2014 by Jin-Hwan Cho, Shunsaku Hirata,
+Matthias Franz, and the dvipdfmx project team. This package is released
+under the GNU GPL, version 2, or (at your option) any later version.
+
+dvipdfmx is now maintained as part of TeX Live.
+
+Contents
+--------
+
+1. Introduction
+
+2. Installation
+
+ 2.1. Compiling and Installation
+
+ 2.2. TeX Directory Structure (TDS)
+
+ 2.3. Auxiliary Files
+
+3. CJK Support
+
+ 3.1. Quick Test of Installation
+
+ 3.2. CJK-LaTeX and HLaTeX
+
+ 3.3. Omega and Other Extended TeX
+
+ 3.4. Vertical Typesetting
+
+4. Unicode Support
+
+ 4.1. Unicode Support in General
+
+ 4.2. ToUnicode CMap Support
+
+ 4.3. OpenType Support and Unicode
+
+ 4.4. Type1 Font Support and Unicode
+
+5. Graphics and Image Format
+
+ 5.1. Supported Graphics File Format
+
+ 5.2. Graphics Extension
+
+ 5.3. Using External Programs for Format Conversion
+
+6. DVI Specials
+
+ 6.1. Compatibility
+
+ 6.2. Additions to Dvipdfm's pdf: Special
+
+7. Font Mapping
+
+8. Incompatible Changes From Dvipdfm
+
+9. Other Improvement Over Dvipdfm
+
+10. Font Licensing and Embedding
+
+
+
+1. Introduction
+ ------------
+
+ The dvipdfmx (formerly dvipdfm-cjk) project provides an eXtended version
+ of the dvipdfm, a DVI to PDF translator developed by Mark A. Wicks.
+
+ The primary goal of this project is to support multi-byte character
+ encodings and large character sets for East Asian languages. The secondary
+ goal is to support as many features as pdfTeX developed by Han The Thanh.
+
+ This project is a combined work of the dvipdfm-jpn project by Shunsaku
+ Hirata and its modified one, dvipdfm-kor, by Jin-Hwan Cho.
+
+
+2. Installation
+ -----------------------
+
+ Typical usage and installation steps are not different from the original dvipdfm.
+ Please refer documents from dvipdfm distribution for detailed instruction on how
+ to install and how to use dvipdfm.
+
+
+2.1. Compiling and Installation
+
+
+ If you have obtained older version, please use latest version unless you have a
+ clear reason to choose older versions. The latest snapshot of dvipdfmx source is
+ available at:
+
+ http://project.ktug.or.kr/dvipdfmx/snapshot/
+
+ And the CVS repository for this project can be obtained through anonymous CVS
+ access with the following command:
+
+ cvs -d:pserver:anonymous@cvs.ktug.or.kr:/home/cvsroot login
+ cvs -d:pserver:anonymous@cvs.ktug.or.kr:/home/cvsroot co dvipdfmx
+
+ When prompted for a password, simply press the Enter key.
+
+
+ The kpathsea library is required to compile and install dvipdfmx in UNIX or
+ UNIX-like platforms. It is usually included for most of TeX distributions.
+ If you already have installed dvipdfm (the original) by yourself, you should
+ already have kpathsea library and it's headers. And zlib library is highly
+ recommended as dvipdfmx can't compress data without this.
+
+
+ Before starting things, you must check the location of your TeX installation.
+ If other TeX related programs are installed under, e.g., '/usr/local/TeX/bin',
+ you should specify directory '/usr/local/TeX' as an for ./configure script as
+
+ ./configure --prefix=/usr/local/TeX --with-kpathsea=/usr/local/TeX
+
+ If you are using libpaper to handle paper sizes for various program, you can
+ use --with-paper option to ./configure. The location of libpaper library can
+ be specified with this option as
+
+ --with-paper=DIR
+
+ Please note thath dvipdfmx uses JIS paper size for B-series paper instead of
+ ISO's one for historical reason. (too late to change the default behavior)
+ The most easiest way to fix this is to use libpaper if you already have that,
+ otherwise define ISO_PAPERSIZE macro at compilation time.
+
+ Dvipdfmx requires libpng library available from
+
+ http://www.libpng.org/pub/png/libpng.html
+
+ to read PNG format images. To tell dvipdfmx the location of libpng header
+ and library, use configure option
+
+ --with-png=DIR
+
+ After you have finished ./configure, just type
+
+ make && make install
+
+ then dvipdfmx will be installed under the directory specified by the --prefix
+ option to ./configure script. After you have successfully installed dvipdfmx,
+ you may need to install various auxiliary files and slightly adjust location
+ of files or configuration. Amount of additional files and modification depends
+ on your environment, and briefly described in the sections follows.
+
+
+2.2. TeX Directory Structure (TDS)
+
+
+ If your TeX installation is conforming with TDS version 1.1 described in
+
+ http://www.tug.org/ftp/tex/tds-1.1/
+
+ , then you'll need to adjust your dvipdfmx installtion. This also applies when
+ you have updated programs without modifying existing platform independent files
+ (files in texmf directory). Dvipdfmx installs few files in addition to dvipdfmx
+ program itself, dvipdfmx.cnf, cid-x.map and others, but it currently does not
+ choose installation directory as appropriate for TDS 1.1.
+
+ If your 'kpsewhich' program recognizes '.sfd' file format, i.e.,
+
+ kpsewhich --show-path --format=.sfd
+
+ does not answer as 'unknown format', then you should move several files under
+ appropriate locations or should modify texmf.cnf as follows:
+
+ * Subfont Definition (SFD) Files
+
+ Recommended location of SFD files (.sfd) is
+
+ $TEXMF/fonts/sfd/
+
+ and environmental variable for specifying additional search path for this
+ file format files is
+
+ SFDFONTS
+
+ . To make those files visible to dvipdfmx under TDS 1.1 installation, you
+ must move all .sfd files to the directory mentioned above or set SFDFONTS
+ variable in texmf.cnf. As some programs may not be updated to follow this
+ convention yet, it is recommended to preserve old installation directory.
+ If you have .sfd files under "$TEXMF/dvipdfm/", please do not use that,
+ please move all files to the directory mentioned above.
+
+ * PostScript CMap Resources
+
+ Recommended location of CMap files (no suffix or with suffix .cmap) is
+
+ $TEXMF/fonts/cmap/
+
+ and environmental variable for adding extra search path for this format files
+ is
+
+ CMAPFONTS
+
+ You may want to set CMAPFONTS to include GhostScript's Resource path, e.g.,
+
+ /usr/share/ghostscript/Resource/CMap//
+
+ in your texmf.cnf file as this resource can be used by various programs that
+ manipulates PS/PDF files. Dvipdfmx installs few additional files into the
+ directory "$TEXMF/dvipdfm/CMap", please move this files to the directory for
+ CMap files. But please note that file "Adobe-Identity-UCS2" is not meaningful
+ to other programs at all, so you should place at least this file in different
+ location than CMap files. (Or you can just remove this unless you see problems
+ in copy-and-pasting text from dvipdfmx output PDF.)
+
+ * Font Mapping Files
+
+ Suggested place for dvipdfm's font mapping files (.map) is
+
+ $TEXMF/fonts/map/dvipdfm/
+
+ and environmental variable for this format files is
+
+ TEXFONTMAPS
+
+ For files containing dvipdfmx extension to dvipdfm format, place them into
+
+ $TEXMF/fonts/map/dvipdfmx/
+
+ instead of sub-directory 'dvipdfm'.
+
+ * OpenType Fonts
+
+ Appropriate place for OpenType font with PostScript outline (.otf) is
+
+ $TEXMF/fonts/opentype/supplier/typeface/
+
+ where 'supplier' and 'typeface' should be replaced with font's supplier and
+ typeface identifier strings.
+
+
+2.3. Auxiliary Files
+
+
+ 1) CMap PostScript Resources
+
+ Dvipdfmx internally identifies glyphs in a font with identifier represented
+ as numbers ranging from 0 to 65535. CMap PostScript Resources defines how the
+ input character codes are translated to those ID's (CID). CID's should be
+ uniquely assigned to every glyphs contained in a collection of glyphs. Adobe
+ has defined several "character collection"s; Adobe-GB1 (Simplified Chinese),
+ Adobe-CNS1 (Traditional Chinese), Adobe-Japan1 (Japanese), and Adobe-Korea1
+ (Korean), which contains much of glyphs necessary for publishing for each
+ languages. Details on Adobe's character collections can be found at Adobe's
+ developer site:
+
+ http://partners.adobe.com/public/developer/font/index.html
+
+ Please install CMap resource files under the directory
+
+ ${TEXMF}/fonts/cmap
+
+ , or set CMAPFONTS variable to point the directory containing CMap resource
+ in texmf.cnf. If your TeX installation does not conforming TDS 1.1, then you
+ should set CMAPINPUTS variable to make those files visible to dvipdfmx. For
+ examples,
+
+ CMAPINPUTS= .;$TEXMF/fonts/cmap//
+
+ Adobe's "CMaps for PDF 1.4 CJK Fonts" are available from:
+
+ http://partners.adobe.com/public/developer/acrobat/index_advanced.html
+
+ or
+
+ ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/adobe/
+
+ You can find a short explanation of each CMap files in cid2code.txt contained
+ in the archive files found at the above FTP site.
+
+
+ 2) SubFont Definition Files
+
+ .....
+
+
+ 3) Adobe Glyph List and ToUnicode Mapping Files
+
+ The Adobe glyph list (AGL) file describes correspondence between PostScript
+ glyph names (e.g., AE, Aacute, ...) and it's Unicode character sequences.
+ Most features described in the section "Unicode Support" requires this file.
+
+ Dvipdfmx looks for file "glyphlist.txt" when conversion from PostScript glyph
+ names to Unicode is necessary. This conversion is done in various situations;
+ when creating ToUnicode CMap for 8bit encoded fonts, finding glyph description
+ from TrueType/OpenType fonts supporting Unicode when the font itself does not
+ provide the mapping from PostScript glyph names to glyph indices (version 2.0
+ "post" table), and when encoding "unicode" is specified for Type 1 font.
+
+ The "glyphlist.txt" file written by Adobe is found at
+
+ http://partners.adobe.com/asn/tech/type/glyphlist.txt
+
+ You should place file "glyphlist.txt" in a directory shown by
+
+ kpsewhich --progname=dvipdfm --show-path="other text files"
+
+ Please check kpathsea library can find this file by 'kpsewhich' command:
+
+ kpsewhich --progname=dvipdfm --format="other text files" glyphlist.txt
+
+ The 'progname' is not dvipdfmx but dvipdfm here.
+
+ ToUnicode mapping is similar to glyph list file but describes correspondence
+ between CID numbers and Unicode values. The content of this file look like a
+ CMap files and is contained in "CMaps for PDF 1.4 CJK Fonts" from Adobe (see
+ "CMap PostScript Resources" above). This file is required to support TrueType
+ font (including OpenType fonts with TrueType outline). Those files should be
+ installed same directory as ordinary CMap files.
+
+
+3. CJK Support
+
+3.1. Quick Test of Installation
+
+3.2. CJK-LaTeX and HLaTeX
+
+3.3. Omega and Other Extended TeX
+
+
+4. Unicode Support
+
+4.1. Unicode Support in General
+
+4.2. ToUnicode CMap Support
+
+4.3. OpenType Support and Unicode
+
+4.4. Type1 Font Support and Unicode
+
+
+5. Graphics and Image Format
+
+5.1. Supported Graphics File Format
+
+5.2. Graphics Extension
+
+5.3. Using External Programs for Format Conversion
+
+
+6. DVI Specials
+
+6.1. Compatibility
+
+6.2. Additions to Dvipdfm's pdf: Special
+
+
+7. Font Mapping
+
+
+7.1. Options for CJK Font
+
+ Few options are available in dvipdfmx (for CID-keyed fonts) in addition
+ to the original dvipdfm.
+
+
+ 1) TTC Index
+
+ You can specify TrueType Collection index number with :n: option in front
+ of TrueType font name.
+
+ min10 H :1:mincho
+
+ In this example, the option :1: tells dvipdfmx to select TrueType font #1
+ from TrueType collection font "mincho.ttc".
+
+
+ 2) No-embed Switch
+
+ It is possible to block embedding glyph data with the character `!'
+ in front of the font name in the font mapping file.
+
+ This feature reduces the size of the final PDF output, but the PDF file
+ may not be viewed exactly in other systems on which appropriate fonts
+ are not installed.
+
+ Use of this option is not recommended for fonts that contains unusual
+ characters (and characters having different width from default value).
+ Please note that glyph metric information is not written in the output
+ PDF file for TrueType fonts without embedding. It will be treated as
+ fixed-pitch with all widths equal to the default value (will be fixed
+ someday).
+
+
+ 3) Stylistic Variants
+
+ Keywords ",Bold", ",Italic", and ",BoldItalic" can be used to create
+ synthetic bold, italic, and bolditalic style variants from other font
+ using PDF viewer's (or OS's) function.
+
+ jbtmo@UKS@ UniKSCms-UCS2-H :0:!batang,Italic
+ jbtb@Unicode@ Identity-H !batang/UCS,Bold
+
+ Availability of this feature highly depends on the implementation of PDF
+ viewers. This feature is not supported for embedded fonts in the most of
+ PDF viewers, like Adobe Acrobat Reader and GNU Ghostscript.
+
+ Notice that this option automatically disable font embedding.
+
+
+
+8. Incompatible Changes From Dvipdfm
+
+
+
+9. Other Improvement Over Dvipdfm
+
+
+9.1. Encryption
+
+
+9.2. Font
+
+
+
+10. Font Licensing and Embedding
+
+ In OpenType format, information regarding how the font should be treated
+ when creating documents can be recorded. Dvipdfmx uses this information
+ to decide whether embedding font into the document is permitted.
+
+ This font embedding information is indicated by a flag called as "fsType"
+ flag; each bit representing different restrictions on font embedding.
+ If multiple flag bits are set in fsType, the least restrictive license
+ granted takes precedence in dvipdfmx. The fsType flag bits recognized by
+ dvipdfmx is as follows:
+
+ * Installable embedding
+
+ All font with this type of license can be embedded.
+
+ * Editable embedding
+
+ All font with this type of license can be embedded.
+
+ * Embedding for Preview & Print only
+
+ Dvipdfmx give the following warning message for fonts with this
+ type of license:
+
+ This document contains `Preview & Print' only licensed font
+
+ For the font with this type of licensing, font embedding is allowed
+ solely for the purpose of (on-screen) viewing and/or printing the
+ document; further editing of the document or extracting an embedded
+ font data for other purpose is not allowed. To ensure this condition,
+ you must at least protect your document with non-empty password.
+
+ All other flags are treated as more restrictive license than any of the
+ above flags and treated as "No embedding allowed"; e.g., if both of the
+ editable-embedding flag and unrecognized license flag is set, the font
+ is treated as editable-embedding allowed, however, if only unrecognized
+ flags are set, the font is not embedded.
+
+ Embedding flags are preserved in embedded font if the font is embedded
+ as a TrueType font or a CIDFontType 2 CIDFont. For all font embedded as
+ a PostScript font (CFF, CIDFontType 0 CIDFont), they are not preserved.
+ Only /Copyright and /Notice in the FontInfo dictionary are preserved in
+ this case.
+
+ Some font vendors put different embedding restrictions for different
+ condition; e.g., font embedding might be not permitted for commercial
+ materials unless you acquire "commercial license" separately.
+ Please read EULA carefully before making decision on font usage.
+
+
+ Adobe provide a font licensing FAQ and a list of embedding permissions
+ for Adobe Type Library fonts:
+
+ http://www.adobe.com/type/browser/legal/
+
+ For Japanese font in general, embedding permission tend to be somewhat
+ restrictive. Japanese users should read the statement regarding font
+ embedding from Japan Typography Association (in Japanese):
+
+ http://www.typography.or.jp/act/morals/moral4.html
diff --git a/systems/doc/dvipdfmx/dvipdfmx-special.pdf b/systems/doc/dvipdfmx/dvipdfmx-special.pdf
new file mode 100644
index 0000000000..5b64978c1a
--- /dev/null
+++ b/systems/doc/dvipdfmx/dvipdfmx-special.pdf
Binary files differ
diff --git a/systems/doc/dvipdfmx/dvipdfmx-special.tex b/systems/doc/dvipdfmx/dvipdfmx-special.tex
new file mode 100644
index 0000000000..64dbf22bd6
--- /dev/null
+++ b/systems/doc/dvipdfmx/dvipdfmx-special.tex
@@ -0,0 +1,608 @@
+%% tb94cho.ltx
+%% Copyright 2010 Jin-Hwan CHO
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Jin-Hwan CHO.
+
+\documentclass[final]{ltugboat}
+
+\usepackage{graphicx}
+\usepackage{url}
+%\usepackage{picins}
+\usepackage{microtype}
+
+\def\CFF{\acro{CFF}}
+\def\CID{\acro{CID}}
+\def\CJK{\acro{CJK}}
+\def\DTL{\acro{DTL}}
+\def\DVIasm{\acro{DVI}asm}
+\def\DVItype{\acro{DVI}type}
+\def\DPS{\acro{DVIPS}}
+\def\DPM{\acro{DVI\-PDFM}}
+\def\DPMx{\acro{DVI\-PDFM}($x$)}
+\let\DPX\DVIPDFMx
+\def\pdfmark{pdfmark}
+\def\GS{Ghostscript}
+\def\EPS{\acro{EPS}}
+\def\pdfTeX{pdf\/\TeX}
+\def\LuaTeX{Lua\TeX}
+\def\pTeX{p\kern-0.05em\TeX}
+\def\XObject{\acro{XO}bject}
+\def\fafter{1.5pt}
+
+\let\note=\footnote
+\def\ctanloc#1{\url{http://mirror.ctan.org/#1}}
+\setlength{\fboxsep}{1.5pt}
+
+%\divide\abovecaptionskip by 2
+
+% don't go to a float page so soon:
+%\renewcommand{\dbltopfraction}{.99}
+%\renewcommand{\dblfloatpagefraction}{.8}
+
+\title{\DVI\ specials for \PDF\ generation}
+\author{Jin-Hwan Cho}
+\address{Department of Mathematics \\ The University of Suwon \\ Republic of Korea}
+\netaddress{chofchof (at) ktug dot or dot kr}
+
+\begin{document}
+\sectitle{Software \& Tools}
+\maketitle
+
+\begin{abstract}%
+\acro{DVIPDFM}($x$) manages various \PDF\ effects by means of \DVI\ specials.
+Appropriate documentation of \DVI\ specials, however, is not easy to find, and exact functionality is not simple to catch without reading the source code of \DVI\ drivers.
+This paper deals with the \DVI\ specials defined in \acro{DVIPDFM}($x$) that are mainly used for \PDF\ generation.
+We discuss the features of those specials with some examples, many of which are not documented elsewhere.
+\end{abstract}
+
+\section{Introduction}
+
+\DVI, the output file format of D.~E.~Knuth's \TeX, is not widely used at present compared with \PDF, the output format of \pdfTeX.
+It is rather old\note{\DVI\ was designed by David R.~Fuchs in 1979.} and obsolete, but it has powerful aspects nonetheless: \emph{simplicity} and \emph{compactness}.
+
+These aspects make it possible to manipulate \DVI\ files in an easy and fast way.
+Many \DVI\ utilities were developed to convert the \DVI\ format to other file formats including \PS\ and \PDF.
+It is also possible to edit \DVI\ files directly by the use of \DVIasm~\cite{Cho07,Cho08,DVIasm}.
+
+Twenty years ago, at the time \PS\ dominated the printing world, nobody expected a new format would replace \PS.
+\PDF\ is not eternal either.
+In future, when a new format surpassing \PDF\ appears, \DVI\ will be the first format in the \TeX\ world that can be converted to the new format.
+Notice that \LuaTeX, considered to be the next generation of \pdfTeX, still supports the \DVI\ format.
+
+There are two popular ways to convert \DVI\ to \PDF.
+The first one is a two-way conversion, from \DVI\ to \PS\ with \DPS, and then from \PS\ to \PDF\ with a distiller.
+Adobe Acrobat Distiller is the oldest commercial program, and \GS\ is the most popular distiller in the \TeX\ world. \MacOSX\ also has its own distiller.
+
+Adobe designed the \pdfmark\ operator~\cite{pdfmark} for its distiller to support \PDF\ features that are not expressible using the standard \PS\ operators.
+The \pdfmark\ operator is given in the \TeX\ source by means of a \DVI\ special command.
+Note that it is not \DPS\ but a distiller that processes the \pdfmark\ operator.
+
+Mark A.~Wicks' \DPM~\cite{DVIPDFM} introduced the other way of converting \DVI\ directly to \PDF.
+He also designed new \DVI\ specials based on the \pdfmark\ operator to support various \PDF\ features.
+The new specials, however, lacked some functionality in practical use so that not many \PDF\ features could be obtained compared with \pdfTeX.
+
+One of the main goal of \DPX, an extension of \DPM\ that grew out of the \CJK\note{Chinese, Japanese, and Korean.} support, was to provide as many \PDF\ features as \pdfTeX~\cite{Cho03}.
+\DPX\ extended the functionality of some special commands of \DPM, and designed new special commands having a similar functionality of \pdfTeX's own primitives.
+Furthermore, \DPX\ has several powerful features not available in \DPM.
+ \begin{itemize}
+ \item Support 16-bit character sets (\CJK\ encodings and Unicode) with \CID-keyed font technology.
+ \item Support various font formats including OpenType, TrueType, etc.
+ \item Use \CFF\ font format for embedded Type1 \PS\ fonts so that the size of the \PDF\ output is quite small compared with \pdfTeX's output.
+ \item Support extended \TeX\ engines, e.g., Omega, Japanese \pTeX, \XeTeX\ (via \acro{XDVIPDFMX}).\note{Upcoming version of \DPX\ will support the \DVI\ output generated by \LuaTeX.}
+ \end{itemize}
+
+The \acro{TODO} list of \DPX\ had contained one outstanding item for a long time: supporting Till Tantau's beamer package~\cite{beamer}, that is widely used for \PDF\ presentation.
+In fact, this package does not handle \DVI\ specials in a direct way.
+Instead, the graphics part comes from the same author's \PGF\ package~\cite{PGF}, and the other \PDF\ effects come from the hyperref package~\cite{hyperref}.
+
+\DPX\ has supported full functionality of the \PGF\ package since June 2008.\note{The \DPX\ driver that works with the \PGF\ package included in \TeX\ Live 2008 can be downloaded from \url{http://project.ktug.or.kr/dvipdfmx/contrib/generic/}.}
+Nonetheless, the navigation buttons usually shown in the lower right corner of the presentation still did not work, although they were displayed correctly.
+The source code\note{\raggedright \ctanloc{macros/latex/contrib/beamer/base/beamerbasenavigation.sty}} implementing the buttons was
+
+\begin{verbatim}[\small]
+\def\beamer@linkspace#1{\vbox to7.5pt{}\kern#1}
+\end{verbatim}
+
+The code above generates an \emph{empty} box that will be surrounded by the two special commands, `\texttt{pdf:bann}' (before) and `\texttt{pdf:eann}' (after).
+Unfortunately, neither \DPM\ nor \DPX\ construct any annotation in the case of an empty box.
+Another special command `\texttt{pdf:ann}' must be used instead for this purpose.
+That was the exact reason why the navigation buttons did not work.
+
+Why did the author of the beamer package make such a mistake?
+As a matter of fact, it was not his fault because no statement could be found about that functionality in the manual of \DPM~\cite{DVIPDFM}.
+This unhappy story led to this paper.
+
+The author gave a presentation~\cite{Cho05} at \tug\ 2005, in which the different behaviors of \DVI\ specials of \DPS, \DPM, and \DPX\ were discussed.
+\DVI\ specials for \PDF\ generation, however, were not fully discussed at that time.
+The main objective of this paper is to bridge this gap.
+
+We will discuss in the following sections the features of \DVI\ specials defined in \DPM\ for \PDF\ generation, and the extended features given by \DPX.
+The author hopes this paper would be useful for package writers who are finding appropriate information on \DVI\ specials.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Named PDF objects}
+
+There are two kinds of named objects, built-in and user-defined \PDF\ objects.
+
+\subsection{Built-in named objects}
+
+Built-in objects defined in \DPMx{} are listed in Table~\ref{Table1}. We refer to~\cite[p.~12]{pdfmark} and~\cite[p.~5]{DVIPDFM} for \pdfmark\ and \DPM\ built-in objects, respectively.
+Notice that it is not allowed to modify the contents of the last five built-in objects in Table~\ref{Table1}.
+
+\begin{table}[h]
+\begin{tabular}{|l|p{1.95in}|} \hline
+\texttt{@catalog} & catalog dictionary~\cite[p.~139]{PDFReference} \\
+\texttt{@docinfo} & (\DPX\ only) document\newline information dictionary \cite[p.~844]{PDFReference} \\
+\texttt{@names} & name dictionary~\cite[p.~150]{PDFReference} \\
+\texttt{@pages} & root page tree node \cite[p.~143]{PDFReference} \\
+\texttt{@resources} & resource dictionary of current\newline page \cite[p.~154]{PDFReference} \\
+\texttt{@thispage} & current page object \cite[p.~145]{PDFReference} \\\hline
+\texttt{@prevpage} & reference only \\
+\texttt{@nextpage} & reference only \\
+\texttt{@page$n$} & reference only \\
+\texttt{@xpos} & reference only \\
+\texttt{@ypos} & reference only \\
+\hline
+\end{tabular}
+\caption{Built-in objects defined in \DPMx{}}
+\label{Table1}
+\end{table}
+
+
+\subsection{User-defined named objects}
+
+Two special commands are provided by \DPMx{} for user-defined objects.
+One is to define a named object, and the other is to add content to the previously defined object.
+
+\begin{itemize}
+\item\fbox{\ttfamily pdf:obj @name PDFobject} \ creates a named object that can be referenced later by `\texttt{@name}'.
+\end{itemize}
+
+\noindent
+All possible object types for `\texttt{PDFobject}' are listed in Table~\ref{Table2}.
+In the case of indirect objects, the object number must be given explicitly, so that this feature is rarely used, especially to specify the objects in a different \PDF\ file.
+
+\begin{table}[h]
+\begin{tabular}{|l|p{2.1in}|} \hline
+boolean & \texttt{true}, \texttt{false} \\
+numeric & \texttt{123}, \texttt{34.5}, \texttt{-.002} \\
+string & \texttt{(This is a string)}, \texttt{<901FA3>} \\
+name & \texttt{/Name1}, \texttt{/.notdef} \\
+array & \texttt{[3.14 false (Ralph) /Name1]} \\
+dictionary & \texttt{<</Key1 (Value) /Key2 3.14>>} \\
+null & \texttt{null} \\\hline
+indirect & \texttt{12 0 R} \\
+stream & \texttt{stream ... endstream} \\
+\hline
+\end{tabular}
+\caption{\PDF\ object types~\cite[p.~51]{PDFReference}}
+\label{Table2}
+\end{table}
+
+It is not simple to construct a stream object with the special command `\texttt{pdf:obj}' because
+the length of the stream object must be specified explicitly, which is quite bothersome.
+Imagine that you are trying to construct a stream object whose source comes from a file.
+Is it possible with this special command?
+Moreover, any stream object requires the keyword `\texttt{stream}' followed by an end-of-line marker.\note{%
+An end-of-line marker consists of either a carriage return (\texttt{0x0d}) and a line feed (\texttt{0x0a}) or just a line feed, and not by a carriage return alone~\cite[pp.~60--61]{PDFReference}.}
+
+\DPX, therefore, provides new special commands for stream objects.
+
+\begin{itemize}
+\item\fbox{\ttfamily pdf:stream @name (string) <<dict>>} \\[\fafter]
+constructs a stream object the source of which comes from the string object `\texttt{(string)}'.
+The stream dictionary `\texttt{<<dict>>}' is optional, and the dictionary entry `\texttt{/Length}' is created automatically.
+\end{itemize}
+
+\noindent
+The following two special commands, for instance, construct the same stream object.
+The stream data of the second object is represented in the \ASCII\ base-85 encoding.~\cite[p.~70]{PDFReference}
+
+\begin{verbatim}[\small]
+\special{pdf:stream @name (xxxxxxxx)}
+\special{pdf:stream @name (G^+IXG^+IX)
+ <</Filter/ASCII85Decode>>}
+\end{verbatim}
+
+\begin{itemize}
+\item\fbox{\ttfamily pdf:fstream @name (filename) <<dict>>} \\[\fafter]
+constructs a stream object in the same way as `\texttt{pdf:stream}', but the source of stream data comes from a file `\texttt{filename}'.
+\end{itemize}
+
+\noindent
+The following example shows how to include a source \TeX\ file inside the output \PDF\ file. (See~\cite[p.~637]{PDFReference} for more details on the file attachment annotation.)
+
+\begin{verbatim}[\small]
+\special{pdf:fstream @myfile (mytest.tex)}
+\special{pdf:ann bbox 0 0 10 10 <<
+ /Subtype /FileAttachment /FS <<
+ /Type /Filespec /F (mytest.tex)
+ /EF << /F @myfile >> >>
+ /Name /PushPin >>}
+\end{verbatim}
+
+
+\subsection{Adding content to named objects}
+
+We describe the special command for adding content to named objects. The type of the named object must be either array or dictionary.
+
+\begin{itemize}
+\item\fbox{\ttfamily pdf:put @arrayobj object$_1$ $\ldots$ object$_n$} \\[\fafter]
+appends the $n$ objects at the end of the array object `\texttt{@arrayobj}'.
+\item\fbox{\ttfamily pdf:put @dictobj <<dict>>} \ merges the dictionary object `\texttt{<<dict>>}' into `\texttt{@dictobj}'. If both the dictionaries have a common key, the old value in `\texttt{@dictobj}' will be replaced by the new value in `\texttt{<<dict>>}'.
+\end{itemize}
+
+\noindent
+In the following example, the value of the key `\texttt{/X}' in the dictionary object `\texttt{@name}' is `\texttt{@Moon2}'.
+(See~\cite[p.~15]{pdfmark} for corresponding \pdfmark\ operators.)
+
+\begin{verbatim}[\small]
+\special{pdf:put @Moon1
+ [ (Earth to Moon) 238855 /mies ]}
+\special{pdf:obj @Moon2 []}
+\special{pdf:put @Moon2 (Moon to Earth)}
+\special{pdf:put @Moon2 238855}
+\special{pdf:put @Moon2 /miles}
+\special{pdf:obj @name <<>>}
+\special{pdf:put @name << /X @Moon1 >>}
+\special{pdf:put @name << /X @Moon2 >>}
+\end{verbatim}
+
+Note that \DPM\ does not allow adding content to a stream dictionary object, but \DPX\ does.
+
+\begin{itemize}
+\item\fbox{\ttfamily pdf:put @streamobj <<dict>>} \ \ merges the dictionary object `\texttt{<<dict>>}' into the stream dictionary of `\texttt{@streamobj}'. The dictionary entries, `\texttt{/Length}' and `\texttt{/Filter}', in the object `\texttt{<<dict>>}' will be ignored.
+\end{itemize}
+
+Finally, \DPMx{} provides the special command
+\fbox{\ttfamily pdf:close @name} to prevent further modifying the content of `\texttt{@name}'. After closing the named object, it can only be referenced.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Annotations}
+
+An annotation is considered as an object with a location on a page.
+The type of the object is given by the value of the key `\texttt{/Subtype}', for instance, `\texttt{/Text}', `\texttt{/Link}', `\texttt{/Sound}', `\texttt{/Movie}', etc.
+(See~\cite[p.~615]{PDFReference} for the list of all annotation types.)
+The location is given by an array object associated to the key `\texttt{/Rect}'.
+\DPMx{} provides the following special command for annotations.
+
+\begin{itemize}
+\item\fbox{\hbadness=10000
+\parbox{.43\textwidth}{\ttfamily pdf:ann @name width [length] height [length] depth [length] <<dict>>}}
+\par\vspace{\fafter}\noindent
+The annotation dictionary is given by `\texttt{<<dict>>}' and the location relative to the current position is given by the three dimension parameters, `\texttt{width}', `\texttt{height}', and `\texttt{depth}'.
+\end{itemize}
+
+\noindent
+It is not possible to specify the location in an absolute way.
+Any value of the key `\texttt{/Rect}' in the annotation dictionary `\texttt{<<dict>>}' will be ignored if found.
+It is not allowed to modify the annotation dictionary with `\texttt{pdf:put}' command, so `\texttt{@name}' must be used as a reference.
+
+Note that \DPX\ allows the `\texttt{bp}' unit in the dimension parameters, but \DPM\ does not.
+Moreover, \DPX\ supports the following form.
+
+\begin{itemize}
+\item\fbox{\hbadness=10000
+\parbox{.425\textwidth}{\ttfamily pdf:ann @name bbox [ulx] [uly] [lrx] [lry] <<dict>>}}
+\par\vspace{\fafter}\noindent
+The relative location is given by the bounding box consisting of four numbers in `\texttt{bp}' units.
+\end{itemize}
+
+\noindent
+The following example shows a movie annotation that enables us to run the movie file `\texttt{mymovie.avi}' inside a \PDF\ viewer program.
+
+\begin{verbatim}
+\special{pdf:ann bbox 0 0 360 180 <<
+ /Subtype /Movie /Border [1 0 0]
+ /T (My Movie) /Movie <<
+ /F (mymovie.avi) /Aspect [720 360]
+ /Poster true >>
+ /A << /ShowControls false >> >>}
+\end{verbatim}
+
+\DPMx{} provides other special commands for \emph{breakable} annotations, e.g., an annotation broken over several lines or several pages.
+
+\begin{itemize}
+\item\fbox{\ttfamily pdf:bann <<dict>>} \ begins a breakable annotation.
+Object name is not allowed for this command.
+\item\fbox{\ttfamily pdf:eann} \ terminates the previous breakable annotation.
+\end{itemize}
+
+\noindent
+These specials are mainly used for `\texttt{/Link}' annotation as the following example shows.
+
+\begin{verbatim}[\small]
+\special{pdf:bann << /Subtype /Link
+ /BS << /Type /Border /W 0.5 /S /S >>
+ /A << /S /URI
+ /URI (http://www.tug.org) >> >>}%
+http://www.tug.org%
+\special{pdf:eann}
+\end{verbatim}
+
+\noindent
+\emph{Warning:} No annotation will be constructed if the content between `\texttt{pdf:bann}' and `\texttt{pdf:eann}' is an empty box. For example:
+
+\begin{verbatim}[\small]
+\special{pdf:bann << /Subtype /Link ... >>}
+\vbox to 7.5pt{}\kern 10pt
+\sepcial{pdf:eann}
+\end{verbatim}
+
+Annotations constructed by \DPMx{} may happen to be slightly bigger than the expected size. This occurs when the annotation grow size is positive; this value is specified in the configuration file. To avoid this effect, either modify the configuration file or give `\texttt{-g 0}' on the command line when running \DPMx{}.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Outlines (or bookmarks)}
+
+The document outline consists of a tree-structured hierarchy of outline items (sometimes called bookmarks) for which \DPMx{} provides the following special command.
+
+\begin{itemize}
+\item\fbox{\ttfamily pdf:out $n$ <<dict>>} \ adds an outline item to the document. The integer parameter $n$ represents the level of the outline entry (beginning with 1), and `\texttt{<<dict>>}' represents the outline item dictionary~\cite[p.~585]{PDFReference}.
+\end{itemize}
+
+Note that all the outline items generated by \DPM\ are closed.\note{The sign of the value of the key `\texttt{/Count}' in the outline item dictionary determines whether the item is open or closed.~\cite[p.~586]{PDFReference}}
+The `\texttt{bookmarksopen=true}' option of the hyperref package does not work if the \PDF\ output is generated by \DPM.
+
+\begin{verbatim}[\small]
+\usepackage[
+ dvipdfm,bookmarks=true,bookmarksopen=true
+]{hyperref}
+\end{verbatim}
+
+\DPX\ provides two solutions for this problem.
+The first one is to specify the option `\texttt{-O $n$}' when running \DPX.
+Up to level $n$, the outline entries will be open. The second, and complete, solution is to use this extended special command:
+
+\begin{itemize}
+\item\fbox{\ttfamily pdf:out [-] $n$ <<dict>>} \ The symbol `\texttt{[-]}' indicates that the outline item will be closed. On the other hand, `\texttt{[]}' without the minus sign indicates that the outline item will be open.
+\end{itemize}
+
+The hyperref package provides a new option `\texttt{dvipdfmx-outline-open}' that uses the extended command above. This option enables us to control the open level given by `\texttt{bookmarksopenlevel}'.
+
+\begin{verbatim}[\small]
+\usepackage[%
+ dvipdfmx,bookmarks=true,
+ bookmarksopen=true,
+ bookmarksopenlevel=1,
+ dvipdfmx-outline-open
+]{hyperref}
+\end{verbatim}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{External objects (or XObjects)}
+
+\DPMx{} supports two types of \emph{external objects},\note{%
+``A graphics object whose contents are defined by a self-contained content stream, separate from the content stream in which it is used.''~\cite[p.~332]{PDFReference}
+} an image \XObject{} and a form \XObject.
+
+\begin{itemize}
+\item\fbox{\hbadness=10000
+\parbox{.42\textwidth}{\ttfamily pdf:image @name width [length] height [length] depth [length] (imagefile)}}
+\par\vspace{\fafter}\noindent
+defines an image \XObject\ the source of which comes from the file `\texttt{imagefile}'. See~\cite[p.~216]{Cho07} for complete syntax provided by \DPX.
+\item\fbox{\hbadness=10000
+\parbox{.42\textwidth}{\ttfamily pdf:bxobj @name width [length] height [length] depth [length]}}
+\par\vspace{\fafter}\noindent
+begins the definition of a form \XObject.
+As with the command `\texttt{pdf:add}', \DPX\ allows bounding box `\texttt{bbox [ulx] [uly] [lrx] [lry]}' for dimension parameters.
+\item\fbox{\ttfamily pdf:exobj} \ ends the previous form \XObject\ definition.
+\item\fbox{\ttfamily pdf:uxobj @name} \ displays the image \XObject\ or the form \XObject\ previously defined and associated with `\texttt{@name}'.
+\DPM$x$ allows dimension parameters (same as `\texttt{pdf:image}') after `\texttt{@name}'.
+\end{itemize}
+
+\noindent
+Typical examples showing how to use image \XObject{}s and form \XObject{}s can be found in~\cite[pp.~15--16]{Cho05}.
+
+\begin{figure}[h]
+\centering\includegraphics{transparencygroup.pdf}
+\caption{Two form \XObject{}s with opacity 0.5; the right one is a group \XObject.}
+\label{Figure1}
+\end{figure}
+
+\DPX\ extended the command `\texttt{pdf:eann}' to support a group \XObject.\note{``A special type of form \XObject\ that can be used to group graphical elements together as a unit for various purposes.'' \cite[p.~360]{PDFReference}}
+Figure~\ref{Figure1} shows the difference between a normal \XObject\ and a group \XObject.
+
+\begin{itemize}
+\item\fbox{\ttfamily pdf:exobj <<dict>>} \ merges the dictionary object `\texttt{<<dict>>}' into the type1 form dictionary~\cite[p.~358]{PDFReference} of the previous form \XObject\ and then close the \XObject.
+\end{itemize}
+
+\noindent
+The following code draws the right image in Figure~\ref{Figure1}.
+
+\begin{verbatim}[\small]
+\special{pdf:bxobj @group bbox 0 0 50 50}
+\special{pdf:code
+ 15 w 0 0 m 50 50 l S 50 0 m 0 50 l S}
+\special{pdf:exobj << /Group
+ << /S /Transparency >> >>}
+\special{pdf:obj @extgstate
+ << /CA0.5 <</CA 0.5>> /ca0.5 <</ca 0.5>> >>}
+\special{pdf:put @resources
+ << /ExtGState @extgstate >>}
+\special{pdf:code /CA0.5 gs /ca0.5 gs}
+\special{pdf:uxobj @group}
+\end{verbatim}
+
+\noindent We get the left image if \verb+\special{pdf:exobj}+ is used instead of the 4th and the 5th line.
+
+
+\section{Raw PDF Operators}
+
+This final section deals with writing raw \PDF\ operators in the output.
+\DPM\ provides a special command for this feature.
+
+\begin{itemize}
+\item\fbox{\ttfamily pdf:content Operators} \vadjust{\vskip2pt} adds the list of operators ``\texttt{Operators}'' to the current page at the current location.
+The operator `\texttt{q}', saving the current graphics state, followed by a transformation matrix moving to the current location will be attached to the beginning of the list, and the operator `\texttt{Q}' restoring the saved graphics state at the end of the list.
+\end{itemize}
+
+For instance, the special command
+
+\begin{verbatim}
+\special{pdf:content 10 w 0 0 m 50 50 l S}
+\end{verbatim}
+
+\noindent
+inserts the following list of operators in the output.
+
+\smallskip\noindent
+{\fontsize{9pt}{11pt}\selectfont
+%\begin{verbatim}
+\ttfamily\ldots\,%
+\fbox{\strut q}\,\fbox{\strut 1 0 0 1 $x$ $y$ cm}\,%
+10 w 0 0 m 50 50 l S
+\fbox{\strut Q}\,%
+\ldots
+%\end{verbatim}
+}
+
+We sometimes need to insert \PDF\ operators without additional graphics state operators.
+The author of the \PGF\ package devised a trick:
+
+{\hfuzz=5pt
+\begin{verbatim}
+\special{pdf:content Q ... Operators ... q}
+\end{verbatim}
+}
+
+\noindent
+The first operator `\texttt{Q}' and the last operator `\texttt{q}' nullify the effects of graphics state operators that are attached.
+
+\DPX\ provides a new special command instead of the trick above.
+
+\begin{itemize}
+\item\fbox{\ttfamily pdf:literal direct Operators}\note{%
+The idea of `\texttt{pdf:literal direct}' came from the primitive `\cs{pdfliteral direct}' of \pdfTeX.} \ or simply\\[\fafter]
+\fbox{\ttfamily pdf:code Operators} \ plays the same role as\\[\fafter]
+`\texttt{pdf:content}, but no graphics state operator and no
+transformation matrix will be added.
+\end{itemize}
+
+\begin{figure}[h]
+\centering\includegraphics{bcontent.pdf}
+\caption{The location of `23' in the left image varies according to the location of 1 in the current page.}
+\label{Figure2}
+\end{figure}
+
+Consider the following code, labelled Listing~\ref{Code1}. Which image in Figure~\ref{Figure2} does this code generate?
+
+\renewcommand{\tablename}{Listing}
+\setcounter{table}{0}
+\begin{table}[h]
+%{
+\hfuzz=5pt
+\fontsize{9pt}{11pt}\selectfont
+\begin{verbatim}
+\def\bpic{\special{pdf:content q}}
+\def\epic{\special{pdf:content Q}}
+\def\myop#1{\special{pdf:content Q #1 q}}
+1\bpic2\myop{.5 G 10 w 0 0 m 100 100 l S}3\epic4
+\end{verbatim}
+%}
+\caption{Which image in Figure~\ref{Figure2} is the result of this code, produced by \DPM($x$)?}
+\label{Code1}
+\end{table}
+
+The macro \cs{bpic} in Listing~\ref{Code1} nullifies the effect of the operator `\texttt{Q}' that will be attached after `\texttt{q}', and the macro \cs{epic} nullifies the effect of the list `\texttt{q 1 0 0 1 $x$ $y$ cm}' that will be attached before `\texttt{Q}'.
+
+Most people may choose the right-hand image in Figure~\ref{Figure2} as the result of Listing~\ref{Code1}, if they remember the fact that special commands are considered nothing by \TeX. However, the answer is the left-hand image.
+The reason is that the transformation matrix in the macro \cs{bpic} still has an effect on the characters `2' and `3'. The effect will be nullified by the macro \cs{epic}.
+
+To produce the right-hand image, \DPX\ provides the following new special commands.
+
+\begin{itemize}
+\item\fbox{\ttfamily pdf:bcontent} \ starts a block that works in the same way as `\texttt{pdf:content}' except that all text between this command and `\texttt{pdf:econtent}' will be placed in the right position.
+\item\fbox{\ttfamily pdf:econtent} \ ends the current block.
+\end{itemize}
+
+\noindent
+Moreover, `\texttt{pdf:bcontent}' and `\texttt{pdf:econtent}' can be nested.
+
+Finally, we can get the right-hand image in Figure~\ref{Figure2} as the result of Listing~\ref{Code2} following, produced by \DPX.
+
+\begin{table}[h]
+%{
+\hfuzz=5pt
+\fontsize{9pt}{11pt}\selectfont
+\begin{verbatim}
+\def\bpic{\special{pdf:bcontent}}
+\def\epic{\special{pdf:econtent}}
+\def\myop#1{\special{pdf:code #1}}
+1\bpic2\myop{.5 G 10 w 0 0 m 100 100 l S}3\epic4
+\end{verbatim}
+%}
+\caption{The right-hand image in Figure~\ref{Figure2} is the result of this example produced by \DPX.}
+\label{Code2}
+\end{table}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\SetBibJustification\raggedright
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{thebibliography}{99}
+
+\bibitem{PDFReference} Adobe Systems, Inc., \emph{\PDF\ Reference}, \nth{6} edition (Version 1.7, November 2006).
+ \url{http://www.adobe.com/devnet/acrobat/pdfs/pdf_reference_1-7.pdf}.
+
+\bibitem{pdfmark} Adobe Systems, Inc., \emph{\pdfmark\ Reference}
+(Version 8.0, November 2006).
+ \url{http://www.adobe.com/devnet/acrobat/pdfs/pdfmark_reference.pdf}.
+
+\bibitem{Cho03}
+Jin-Hwan Cho, \emph{\DPX, an extension of \DPM},
+ \tug\ 2003. Hawaii, United States.
+ \url{http://project.ktug.or.kr/dvipdfmx/doc/tug2003.pdf}.
+
+\bibitem{Cho05}
+Jin-Hwan Cho, \emph{Practical Use of Special Commands in \DPX},
+ \tug\ 2005, International Typesetting Conference. Wuhan, China.
+ \url{http://project.ktug.or.kr/dvipdfmx/doc/tug2005.pdf}.
+
+\bibitem{Cho07}
+Jin-Hwan Cho, \emph{Hacking \DVI\ files: Birth of \DVIasm}, The Prac\TeX\ Journal (2007), no.~1, and TUGboat 28:2, 2007, 210--217.
+ \url{http://tug.org/TUGboat/Articles/tb28-2/tb89cho.pdf}.
+
+\bibitem{Cho08}
+Jin-Hwan Cho, \emph{Handling Two-Byte Characters with \DVIasm}, The Asian Journal of \TeX\ \textbf{2} (2008), no.~1, 63--68.
+ \url{http://ajt.ktug.kr/assets/2008/5/1/0201cho.pdf}.
+
+\bibitem{DVIasm}
+Jin-Hwan Cho, \emph{The \DVIasm\ Python script}.
+ \ctanloc{dviware/dviasm/}.
+
+\bibitem{hyperref}
+Heiko Oberdiek, \emph{The hyperref package} (Version 6.78f, August 2008).
+ \ctanloc{macros/latex/contrib/hyperref/}
+
+\bibitem{beamer}
+Till Tantau, \emph{The beamer package} (Version 3.07, March 2007).
+ \ctanloc{macros/latex/contrib/beamer/}.
+
+\newpage
+\bibitem{PGF}
+Till Tantau, \emph{\PGF, A Portable Graphics Format for \TeX} (Version 2.00, February 2008).
+ \ctanloc{graphics/pgf/}.
+
+\bibitem{DVIPDFM} Mark A. Wicks, \emph{\DPM\ User's Manual}
+(Version 0.12.4, September 1999).
+ \url{http://gaspra.kettering.edu/dvipdfm/dvipdfm-0.12.4.pdf}.
+
+\end{thebibliography}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\medskip
+\makesignature
+\end{document}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/systems/doc/dvipdfmx/dvipdfmx.pdf b/systems/doc/dvipdfmx/dvipdfmx.pdf
new file mode 100644
index 0000000000..c3f78cec08
--- /dev/null
+++ b/systems/doc/dvipdfmx/dvipdfmx.pdf
Binary files differ
diff --git a/systems/doc/dvipdfmx/dvipdfmx.tex b/systems/doc/dvipdfmx/dvipdfmx.tex
new file mode 100644
index 0000000000..b346ef1315
--- /dev/null
+++ b/systems/doc/dvipdfmx/dvipdfmx.tex
@@ -0,0 +1,2240 @@
+\documentclass[a4paper,xetex,oneside]{book}
+\usepackage{xltxtra}
+\usepackage{fontspec}
+\usepackage{microtype}
+\usepackage{xunicode}
+\usepackage{unicode-math}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% PLATFORM DEPENDENT INSTRUCTION HERE
+%% Font setup for body text.
+\setmainfont{Constantia}
+\setsansfont{Cambria}
+\setmonofont[Scale=0.92]{Consolas}% Adjust xheight difference
+\setmathfont{Cambria Math}
+%% The following section is for showing some fancy examples.
+%% Some fonts used here may not be availabel on your system.
+%% Please modify this. Just replacing with empty macros is OK.
+\newcommand{\jpzerofourexamples}{{%
+\setmainfont[Scale=5,RawFeature=+jp04]{SourceHanSerifJP-Light.otf}葛祇逢}}
+\newcommand{\jpninezeroexamples}{{%
+\setmainfont[Scale=5,RawFeature=+jp90]{SourceHanSerifJP-Light.otf}葛祇逢}}
+%% We use PostScript raw code here to test dvipdfmx's capability.
+%% TFM files `uprml' and `uprmlv' are distributed with upTeX.
+%% TrueType font `yumindb.ttf' is bundled with Windows 10.
+\newcommand{\jphoritext}{%
+\makebox[112bp][l]{%
+\raisebox{88bp}[112bp][0bp]{%
+\special{pdf:mapline uprml UniJIS-UTF8-H yumindb.ttf}
+\special{ps: uprml findfont 16 scalefont setfont
+ currentpoint moveto (「こんにちは」) show}%
+}}}
+\newcommand{\jpverttext}{%
+\makebox[16bp][l]{%
+\raisebox{112bp}[112bp][0bp]{%
+\special{pdf:mapline uprmlv UniJIS-UTF8-V yumindb.ttf}
+\special{ps: uprmlv findfont 16 scalefont setfont
+ currentpoint moveto (「こんにちは」) show}%
+}}}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\usepackage{xcolor,hyperref,hyperxmp}
+\hypersetup{%
+ bookmarksnumbered=true,%
+ colorlinks=true,%
+ urlcolor=[rgb]{0.2,0.2,0.4},
+ linkcolor=[rgb]{0.2,0.2,0.4},
+ citecolor=[rgb]{0.2,0.2,0.4},
+ pdftitle={The Dvipdfmx User's Manual},%
+ pdfauthor={The dvipdfmx project team},%
+ pdfsubject={A User's Manual for Dvipdfmx and Xdvipdfmx.},%
+ pdfkeywords={dvipdfmx, XeTeX, TeX, LaTeX},
+ pdflang=en,
+ pdfcopyright={Copyright © The dvipdfmx project team.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.3
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+ A copy of the license is included in the section entitled "GNU
+ Free Documentation License".},
+ pdflicenseurl={http://www.gnu.org/licenses/fdl.html}
+}
+\usepackage{listings}
+\lstset{
+ keepspaces=true,
+ basicstyle={\ttfamily},
+ frame={tb},
+ breaklines=true,
+ columns=[l]{fullflexible},
+ numbers=none,
+ xrightmargin=2em,
+ xleftmargin=2em,
+ aboveskip=2em,
+ belowskip=2em
+}
+\usepackage{mflogo}
+\usepackage{lipsum}
+\usepackage{array}
+\usepackage{marginnote}
+\renewcommand*{\marginfont}{\footnotesize\itshape}
+\usepackage[noorphans,font=itshape]{quoting}
+\newcommand{\package}[1]{\textit{#1}}
+\newcommand{\code}[1]{\mbox{\texttt{#1}}}
+\newcommand{\keyword}[1]{\textit{#1}}
+\newcommand{\option}[1]{\mbox{`\texttt{#1}'}}
+\newcommand{\dvipdfm}{\texttt{dvipdfm}}
+\newcommand{\dvipdfmx}{\texttt{dvipdfmx}}
+\newcommand{\xdvipdfmx}{\texttt{xdvipdfmx}}
+\newcommand{\deprecated}[1]{\marginnote{\addfontfeatures{Color=CC3333}#1}}
+\newcommand{\newfeature}[1]{\marginnote{\addfontfeatures{Color=3366CC}#1}}
+\newcommand{\lnum}[1]{{\addfontfeatures{RawFeature=+lnum}#1}}
+% For placeing drawings via \special
+\newcommand{\specialbox}[3]{%
+\makebox[#1][l]{\raisebox{-#2}[0bp][#2]{\special{#3}}}}
+\usepackage{fancyhdr}
+\pagestyle{fancy}
+%%DVIPDFMX SETTINGS
+\AtBeginDocument{%
+ \special{dvipdfmx:config O 1}%
+ \special{dvipdfmx:config V 7}
+}
+\begin{document}
+
+\begin{titlepage}
+ \begin{raggedleft}
+ {\Huge\bfseries The Dvipdfmx User's Manual}\\[\baselineskip]
+ \Large The Dvipdfmx Project Team\\
+ December 23, 2018\par
+ \end{raggedleft}
+\end{titlepage}
+
+\tableofcontents
+
+\chapter{Getting Started}
+
+\section{Introduction}
+
+The \dvipdfmx\ (formerly \dvipdfm-cjk) project provides an extended version of
+the \dvipdfm, a DVI to PDF translator developed by Mark~A.~Wicks.
+
+The primary goal of this project is to support multi-byte character encodings
+and large character sets such as for East Asian languages.
+This project started as a combined work of the \dvipdfm-jpn project by
+Shunsaku Hirata and its modified one, \dvipdfm-kor, by Jin-Hwan Cho.
+
+Extensions to \dvipdfm\ include,
+\begin{itemize}
+ \item Support for OpenType and TrueType font, including partial support
+ for the OpenType Layout for finding glyph variants and vertical writing.
+ \item Support for CJK-\LaTeX\ and H\LaTeX\ with Subfont Definition Files.
+ \item Support for various legacy multi-byte encodings via PostScript CMap
+ Resources.
+ \item Unicode related features: Unicode as an input encoding and
+ auto-creation of ToUnicode CMaps.
+ \item Support for p\TeX\ (a Japanese localized variant of \TeX) including
+ vertical writing extension.
+ \item Some extended DVI specials.
+ \item Reduction of output files size with on-the-fly Type1 to CFF (Type1C)
+ conversion and PDF object stream.
+ \item Advanced raster image support including alpha channels, embedded
+ ICC profiles, 16-bit bit-depth colors, and so on.
+ \item Basic PDF password security support for PDF output.
+\end{itemize}
+Some important features are still missing:
+\begin{itemize}
+ \item Linearization.
+ \item Color Management.
+ \item Resampling of images.
+ \item Selection of compression filters.
+ \item Variable font and OpenType 1.8.
+ \item and many more...
+\end{itemize}
+
+\dvipdfmx\ is now maintained as part of \TeX\ Live. Latest source code can
+be found at the \TeX\ Live SVN repository. For an instruction on accessing the
+development sources for \TeX\ Live, see,\medskip
+
+\url{http://www.tug.org/texlive/svn/}
+\medskip
+
+This document, ``The \dvipdfmx\ User's Manual'', was originally prepared for
+\TeX\ Live 2017. Current maintainer of this document is Shunsaku Hirata.
+Latest version and contact information can be found at:\medskip
+
+\url{http://github.com/shirat74/dvipdfm-x-doc}
+\medskip
+
+\noindent{}Please send questions or suggestions.
+
+\subsection{\xdvipdfmx}
+
+\xdvipdfmx\ is an extended version of \dvipdfmx, and is now incorporated into
+\dvipdfmx.
+
+The \xdvipdfmx\ extensions provides support for the Extended DVI (.xdv) format
+generated by \XeTeX\ which includes support for platform-native fonts and the
+\XeTeX\ graphics primitives, as well as Unicode text and OpenType font.
+
+\XeTeX\ originally used a Mac-specific program called \code{xdv2pdf} as a
+backend program instead of \xdvipdfmx. The \code{xdv2pdf} program supported
+a couple of special effects that are not yet available through \xdvipdfmx:
+The Quartz graphics-based shadow support, AAT ``variation'' fonts such as Skia,
+transparency as an attribute of font, and so on.
+It would be nice if they continue to be supported. Suggestions and help are
+welcomed.
+
+
+\subsection{Legal Notice}
+
+Copyright © The dvipdfmx project team.
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+A copy of the license is included in the section entitled
+``\hyperref[SEC:FDL]{GNU Free Documentation License}''.
+
+\section{Installation and Usage}
+
+Typical usage and installation steps are not different from the original
+\dvipdfm. Please refer documents from \dvipdfm\ distribution for detailed
+instruction on how to install and how to use \dvipdfm. The \dvipdfm\ manual is
+available from its CTAN site:\medskip
+
+\url{http://www.ctan.org/tex-archive/dviware/dvipdfm}
+\medskip
+
+The minimal requirements for building \dvipdfmx\ is the \keyword{kpathsea} library.
+the \keyword{zlib} library for compression and the \keyword{libpng} library for PNG
+inclusion are highly recommended.
+Optionally, the \keyword{libpaper} library might be used to handle paper size.
+
+This document mainly focuses on the additions and modifications to \dvipdfm.
+Please refer the
+``\href{http://mirrors.ctan.org/dviware/dvipdfm/dvipdfm.pdf}{Dvipdfm User's Manual}''
+available from the CTAN site mentioned above for basic usage.
+
+Some additional command line options recognized by \dvipdfmx\ are listed in
+Table~\ref{TABLE:options}. In addition to this, the \code{-V} option for specifying
+the output PDF version now accepts the version specification of a form \code{2.0}. Try
+\begin{lstlisting}
+dvipdfmx --help
+\end{lstlisting}
+for the list of command line options and their explanations.
+
+\begin{table}
+ \centering
+ \begin{tabular}{lp{8cm}}\hline
+ Option & Description \\ \hline\hline
+ \code{-C} \textit{number} & Specify miscellaneous option flags. See,
+ section of ``\hyperref[SEC:compatibility]{Incompatible Changes}'' for
+ details. \\
+ \code{-S} & Enable PDF encryption. \\
+ \code{-K} \textit{number} & Set encryption key length. The default value
+ is 40.\\
+ \code{-P} \textit{number} & Set permission flags for PDF encryption.
+ The \textit{number} is a 32-bit unsigned integer representing permission
+ flags.
+ See, section of ``\hyperref[SEC:encryption]{Encryption Support}''.
+ The default value is \code{0x003C}.\\
+ \code{-I} \textit{number} & Life of image cache in hours. By specifying
+ value \code{0} \dvipdfmx\ erases cached images, and value \code{-1}
+ erases all cached images and does not leave newly generated one. The
+ default value is \code{-2}. (ignore image cache) \\
+ \code{-M} & Process \MP\ generated PostScript file.\\
+ \code{-E} & Always try to embed fonts \emph{regardless of
+ licensing}.\\
+ \code{-O} \textit{number} & Set maximum depth of open bookmark item.\\
+ \hline
+ \end{tabular}
+ \caption{Additional command line options recognized by \dvipdfmx.}%
+ \label{TABLE:options}
+\end{table}
+
+
+\section{Quick Guide}
+
+\dvipdfmx\ is supposed to be used by users of \LaTeX\ packages for typesetting
+CJK languages like H\LaTeX\ and CJK-\LaTeX, and \TeX\ variants such as \XeTeX,
+p\TeX, and up\TeX.
+This section is intended to be a quick guide for each users.
+
+\subsection{\texorpdfstring{\XeTeX}{XeTeX}}
+
+\XeTeX\ users
+normally do not invoke the \dvipdfmx\ command directly. To control the
+behavior of \dvipdfmx, please consider using the \code{dvipdfmx:config}
+special explained in the section of ``\hyperref[SEC:specials]{Specials}''.
+Some part of this document is irrelevant for \XeTeX\ users.
+
+\subsection{p\TeX}
+p\TeX\ users are at least required to install several auxiliary files
+mentioned in the section of ``\hyperref[SEC:auxfiles]{Auxiliary Files}''
+and to setup font-mappings. Just install the \package{adobemappings} and
+\package{glyphlist} for auxiliary files. (As \TeX\ Live basic installation
+requires them, they are probably already installed for \TeX\ Live users.)
+
+For \TeX\ Live users, setting up fontmaps can be easily done with the help
+of the \package{ptex-fontmaps} package and the \keyword{updmap} program.
+To use with the IPAex fonts (contained in the \package{ipaex} package), for
+example, run,
+\begin{lstlisting}
+kanji-config-updmap --sys ipaex
+\end{lstlisting}
+where the \option{--sys} option indicates the system-wide configuration.
+After successful invocation of the above command, the IPAex fonts will
+be used by default. The current setting can be checked via,
+\begin{lstlisting}
+kanji-config-updmap --sys status
+\end{lstlisting}
+For more information on the updmap program, try,
+\begin{lstlisting}
+kanji-config-updmap --help
+\end{lstlisting}
+or refer the documentation of the updmap program.
+
+Alternatively, just for a quick test of installation, try the following:
+\begin{lstlisting}
+\documentclass{article}
+\begin{document}
+\special{pdf:mapline rml H KozMinProVI-Regular}
+...Some Japanese text goes here...
+\end{document}
+\end{lstlisting}
+In this example, PDF viewer which can handle substitute font is required since
+\dvipdfmx\ does not embed fonts.
+
+For using Japanese text in PDF document information and annotations, put
+the following \code{special} command,
+\begin{lstlisting}
+\AtBeginDocument{\special{pdf:tounicode 90ms-RKSJ-UCS2}}
+\end{lstlisting}
+in the preamble.
+The above \code{special} command instructs \dvipdfmx\ to convert text encoded
+in Shift-JIS to Unicode. For EUC-JP, replace 90ms-RKJK-UCS2 with EUC-UCS2.
+
+\subsection{up\TeX}
+up\TeX\ users are basically the same as p\TeX\ users but there are two choices
+for setting fontmaps. Setup fontmaps as mentioned above for p\TeX, or use
+keyword \code{unicode} in the encoding field of the fontmap file.
+
+The former might be easier as the auto-creation of fontmap files can be done
+with the updmap program and the \package{ptex-fontmaps} package. But in
+this method there are some difficulties when using fonts which employ character
+collections (glyph repertoire) other than Adobe-Japan\lnum{1} in the case of PostScript
+flavored OpenType fonts.
+In the later case, the \package{adobemappings} package is not required
+and newer PostScript flavored OpenType fonts which do not employ Adobe-Japan\lnum{1}
+can be easily used too.
+
+Using \code{unicode} is more simpler and intuitive thus it is recommended to
+use this method.\footnote{For \TeX\ Live 2017. Earlier versions have buggy
+support.}
+A typical example fontmap entries for using Adobe's SouceHan series
+might look like:
+\begin{lstlisting}
+urml unicode SourceHanSerifJP-Light.otf
+urmlv unicode SourceHanSerifJP-Light.otf -w 1
+ugbm unicode SourceHanSansJP-Medium.otf
+ugbmv unicode SourceHanSansJP-Medium.otf -w 1
+\end{lstlisting}
+
+As in p\TeX, the following \code{special} instruction might be necessary for PDF
+document information and annotations to be shown correctly:
+\begin{lstlisting}
+\AtBeginDocument{\special{pdf:tounicode UTF8-UCS2}}
+\end{lstlisting}
+Here, input encoding is assumed to be UTF-8.
+
+\subsection{CJK-\LaTeX}
+
+CJK-\LaTeX\ users are required to have \keyword{Subfont Definition Files}
+to be installed. They are available as part of the \package{ttfutils} package.
+
+To use TrueType Arphic fonts provided by the \package{arphic-ttf} package:
+\begin{lstlisting}
+\documentclass{article}
+\usepackage{CJKutf8}
+...Other packages loaded here...
+\AtBeginDocument{%
+ \special{pdf:tounicode UTF8-UCS2}%
+ \special{pdf:mapline bsmiu@Unicode@ unicode bsmi00lp.ttf}%
+ }
+\begin{document}
+\begin{CJK}{UTF8}{bsmi}
+...some Chinese text goes here...
+\end{CJK}
+\end{document}
+\end{lstlisting}
+Here, \code{pdf:mapline} special is used to setup a font-mapping.
+
+\section{Auxiliary Files}\label{SEC:auxfiles}
+
+This section is mostly for supporting legacy encodings and legacy font format
+such as PostScript Type1 font. \XeTeX\ users may skip this section.
+
+\dvipdfmx\ has a capacity to handle various input encodings from 7-bit
+encodings to variable-width multi-byte encodings. It also has some sort of
+Unicode support. Several auxiliary files which are not common to \TeX\ users
+are needed to enable those features. This section shortly describes about them.
+
+\subsection{PostScript CMap Resources}
+
+\keyword{PostScript CMap Resources}\footnote{See,
+``\href{http://www.adobe.com/content/dam/Adobe/en/devnet/font/pdfs/5014.CIDFont\_Spec.pdf}%
+{Adobe CMap and CIDFont Files Specification}''}
+are required for supporting legacy encodings such as Shift-JIS, EUC-JP, \lnum{Big5},
+and other East Asian encodings. \dvipdfmx\ internally identifies glyphs with
+identifiers (CIDs\footnote{PostScript terminology ``Character IDentifier''.})
+represented as an integer ranging from 0 to 65535 in the CID-based glyph access.
+PostScript CMap Resources describes the mapping between sequences of input
+character codes and CIDs. \dvipdfmx\ has an extensible support for multi-byte
+encodings via PostScript CMap Resources.
+
+CMap files for standard East Asian encodings, for use with Adobe's character
+collections, are included in the \package{adobemapping} package.
+The latest version of those CMap files maintained by Adobe can be found at
+Adobe's GitHub Project page:\medskip
+
+\url{http://github.com/adobe-type-tools/cmap-resources}
+\medskip
+
+Those files are mandatory for supporting p\TeX. up\TeX\ users may also
+want to install them but they are not required.
+
+\subsection{Subfont Definition Files}
+
+CJK fonts usually contain several thousands of glyphs. For using such fonts
+with (original) \TeX, which can only handle 8-bit encodings, it is necessary to
+split a font into several \keyword{subfonts}. The Subfont Definition File (SFD)
+specify the way how those fonts are split into subfonts. \dvipdfmx\ uses SFD
+files to convert a set of subfonts back to a single font.
+
+SFD files are not required for use with \TeX\ variants which can handle
+multi-byte character encodings and large character sets such as p\TeX,
+up\TeX,\XeTeX, and Omega.
+H\LaTeX\ and CJK-\LaTeX\ users are required to have those files to be
+installed. SFD files are available as a part of the \package{ttfutils} package
+for \TeX\ Live users.
+
+\subsection{The Adobe Glyph List and ToUnicode Mappings}
+
+The Adobe Glyph List\footnote{See,
+``\href{http://github.com/adobe-type-tools/agl-specification}{Adobe Glyph List Specification}''}
+(AGL) describes correspondence between PostScript glyph names (e.g., \code{AE},
+\code{Aacute},...) and Unicode character sequences representing them.
+Some features described in the section ``Unicode Support'' requires AGL file.
+
+\dvipdfmx\ looks for the file \code{glyphlist.txt} when conversion from
+PostScript glyph names to Unicode sequences is necessary.
+This conversion is done in various situations; when creating ToUnicode CMaps
+for 8-bit encoding fonts, finding glyph descriptions from TrueType and OpenType
+fonts when the font itself does not provide a mapping from PostScript glyph
+names to glyph indices (version 2.0 ``post'' table), and when the encoding
+\code{unicode} is specified for Type1 font.
+
+The AGL file is included in the \package{glyphlist} package. The latest version
+can be found at Adobe's GitHub site:\medskip
+
+\url{http://github.com/adobe-type-tools/agl-aglfn}
+\medskip
+
+ToUnicode Mappings are similar to AGL but they describe correspondence
+between CID numbers (instead of glyph names) and Unicode values.
+The content of those files are the same as CMap Resources.
+They are required when using TrueType fonts emulated as a CID-keyed font.
+They should be found in the same directory as ordinary CMap files.
+
+ToUnicode Mapping files are included in the \package{adobemapping} package.
+Those files are not required for \XeTeX\ users.
+
+\section{Overview of Extensions}
+
+This section gives a quick overview of \dvipdfmx's extended capabilities.
+
+\subsection{CJK Support}
+
+There are many extensions made for supporting CJK languages. Features described
+here is mainly for CJK languages but their use is actually not limited to it.
+Those features are implemented in a generic way so that it can be beneficial to
+users who are not involved in CJK languages.
+
+\subsubsection{Legacy Multi-byte Encodings}
+
+\dvipdfmx\ has an extensible support for encodings by means of
+PostScript CMap Resources. Just like \code{enc} files are written for 8-bit
+encodings, one can write their own CMap files to support custom encodings.
+See, Adobe's technical notes\cite{ADOBE} for details on PostScript CMap Resources.
+
+\subsubsection{Vertical Writing}
+
+\dvipdfmx\ supports the vertical writing extension used by p\TeX\ and up\TeX.
+A DVI instruction to set the writing mode is supported. The OpenType Layout
+GSUB Feature is supported for selecting vertical version of glyphs.
+
+\begin{figure}
+\centering
+\jphoritext\hspace{24pt}\jpverttext%
+\caption{An example of horizontal and vertical text;
+left and right corner brackets are replaced with their vertical counterparts.}%
+\label{FIG:verttext}
+\end{figure}
+
+\subsection{Unicode Support}
+
+Unicode support here consists of two parts: Supporting Unicode as an input
+encoding and making output PDF files ``Unicode aware''.
+
+\subsubsection{Unicode as Input Encoding}
+
+\dvipdfmx\ recognizes an additional keyword \code{unicode} in fontmap files
+to declare that Unicode values are used in the input DVI file. Unicode support is
+basically limited to the Basic Multilingual Plane (BMP) since there are no
+support for code ranges that requires more than three bytes in TFM and extended
+TFM formats.
+
+\subsubsection{ToUnicode CMap Support}
+
+In PDF, it is often the case that text is not encoded in Unicode.
+However, modern applications usually want them represented in Unicode to make
+it usable as text information.
+The ToUnicode CMap is a bridge between PDF text string encodings and Unicode
+encodings, and makes it possible to extract text in PDF files as
+Unicode encoded strings. It is important to make resulting PDF search-able and
+copy-and-past-able. Dvipdfmx supports auto-creation of ToUnicode CMaps.
+
+It will not work properly for multiply encoded glyphs due to fundamental
+limitations of Unicode conversion mechanism with ToUnicode CMaps.
+
+\subsection{Other Extensions}
+
+\dvipdfmx\ can generate encrypted PDF documents to protect its contents from
+unauthorized access. It is limited to password-based authentication, and
+public-key based authentication is not supported. The 256-bit AES encryption is
+also supported for PDF version 1.7 and 2.0 setting although it may not be supported
+by PDF viewers.
+
+There are various other improvements over \dvipdfm. The most notable one is
+more improved PDF input and output support: The cross-reference stream and
+object stream introduced in \lnum{PDF-1.5} are also supported.
+
+
+\chapter{Graphics}\label{SEC:graphics}
+
+\section{Image Inclusion}
+
+The basics of incorporating images into output PDF is the same as in \dvipdfm.
+To do this, \LaTeX\ users can simply use the \package{graphicx} package.
+(possibly with the driver option \code{dvipdfmx})
+This section is \emph{not} for providing a how-to guide to include images but
+just for supported graphics and image formats along with supported features.
+
+Graphics support was mostly rewritten in \dvipdfmx.
+Support for BMP and JPEG\lnum{2000} was added. An effort to preserve more
+information originally found in included images, e.g., embedded ICC Profiles
+and XMP Metadata, was made.
+
+However, \dvipdfmx\ does not support various features common to graphics
+manipulation programs such as resampling, color conversion, and selection of
+compression filters. Thus, it is recommended to use other programs specialized
+in image manipulation for preparation of images.
+
+\subsection{Supported Graphics File Formats}
+
+Supported formats are, PNG, JPEG, \lnum{JPEG2000}, BMP, PDF, and \MP\ generated
+EPS. All other format images, such as SVG and PostScript, must be converted to
+PDF before inclusion. The \option{-D} option, as in \dvipdfm, can be used for
+filtering images.
+
+\subsubsection{Notes on PNG Support}
+
+PNG is supported as in \dvipdfm\ with many improvements.
+
+PNG support includes most of important features of PNG format such as color
+palette, transparency, 16-bit bit-depth color, embedded ICC Profiles,
+calibrated color, and embedded XMP Metadata.
+
+In including PNG images, \dvipdfmx\ first decompresses image data and then
+compresses (if requested) it again.
+For better compression ratio, a preprocessing filter (Predictor filter) might
+be applied before compression.
+\dvipdfmx\ supports the TIFF Predictor 2 and the PNG optimum filter.
+However, there is yet no way to specify which predictor function is to be used
+and currently PNG optimum filter is always employed.
+
+Predictor filter is a preprocessing filter to image data for improving compression.
+Using a predictor filter usually gives better compression
+but in many cases compression speed becomes significantly slower.
+Try \option{-C 0x20} command line option to disable predictor filters and to
+check if slowness is due to filtering.
+
+For the PNG optimum filter, a heuristic approach, ``minimum sum of absolute
+differences'', is employed for finding the most optimal filter to be used.
+See, discussion in the PNG Specification ''Filter selection'':\medskip
+
+\url{http://www.w3.org/TR/2003/REC-PNG-20031110/\#12Filter-selection}
+\medskip
+
+As built-in support for the sRGB color space is absent in PDF,
+the sRGB color can only be represented precisely by means of the sRGB ICC Profile.
+However, for sRGB color PNG images, \dvipdfmx\ uses an approximate calibrated
+RGB color space instead.
+For approximating the sRGB color, the gamma and CIE \lnum{1931} chromaticity values
+mentioned in the PNG Specification is used.
+See, the following page for more information:\medskip
+
+\url{http://www.w3.org/TR/2003/REC-PNG-20031110/\#11sRGB}
+\medskip
+
+\dvipdfmx\ also supports calibrated color with the \code{gAMA} and the \code{cHRM} chunk.
+These chunks carry information on more accurate color representation.
+Some software programs, however, write only \code{cHRM} but do not record the gamma value
+although the PNG specification recommends to do so. Gamma value 2.2 is assumed if only
+\code{cHRM} is present but \code{gAMA} is not.
+
+Some PNG features are unavailable depending on output PDF version setting. Please refer
+Table~\ref{TABLE:PNGfeat} for more details.
+
+\begin{table}
+ \centering
+ \begin{tabular}{lp{8cm}}\hline
+ Feature & PDF Version Required \\ \hline\hline
+ 16-bit Color Depth & Version 1.5 \\
+ Transparency & Full support for alpha channel requires PDF version 1.4.
+ Color key masking (a specific color is treated as fully transparent)
+ requires 1.3.\\
+ XMP Metadata & Version 1.4 \\
+ ICC Profile & Version 1.3 \\
+ \hline
+ \end{tabular}
+ \caption{PNG features and corresponding PDF versions required.}%
+ \label{TABLE:PNGfeat}
+\end{table}
+
+\subsubsection{JPEG and \lnum{JPEG2000}}
+
+JPEG format is supported as in \dvipdfm. In addition to this, \lnum{JPEG2000}
+is also supported.
+
+JPEG and \lnum{JPEG2000} image inclusion is basically done as ''pass-through'',
+that is, image data is not decompressed before inclusion. So, although these
+formats are basically lossy, there should be no quality loss when including
+images.
+
+JPEG is relatively well supported. \dvipdfmx\ supports embedded ICC Profiles
+and CMYK color. Embedded XMP metadata is also preserved in the output PDF.
+JFIF or Exif data might be used to determine image's physical size.
+
+As the PDF specification does not require information irrelevant to
+displaying images to be embedded, \dvipdfmx\ does not embed whole data.
+Especially, not all application specific data is retained. Application
+specific data such as JFIF, Exif, and \code{APP14} Adobe marker are
+preserved.
+Please note that XMP and Exif data which may contain location information
+where the photo was taken is always preserved in the output PDF file.
+
+\lnum{JPEG2000} is also supported. It is restricted to JP2 and JPX baseline
+subset as required by the PDF specification. It is not well supported and still in
+an experimental stage. J2C format and transparency are not supported.
+
+\subsubsection{PDF Support}
+
+PDF inclusion is supported as in \dvipdfm, with various important enhancement
+over \dvipdfm\ for more robust inclusion. \dvipdfmx\ can handle cross-reference
+streams and object streams introduced in \lnum{PDF-1.5}.
+\dvipdfmx\ also supports inclusion of PDF pages other than the first page.
+However, tagged PDF may cause problems and annotations are not kept.
+
+As there are no clear way to determine the natural extent of the graphics content
+to be clipped, \dvipdfmx\ preferably try to find the \emph{crop box} to decide
+image size. If there are no crop box \emph{explicitly} specified,%
+\footnote{There are some accusations by Japanese \TeX\ users as
+''violating the PDF spec.'' regarding this point. However, what we are
+talking about is how to guess the \emph{natural} or \emph{intended} size of
+images but not the default value of the PDF crop box itself.} then it
+tries to refer other boundary boxes such as the \emph{art box}. If there are no
+possible boundaries of the graphics content explicitly specified, the \emph{media box},
+which is the boundaries of the physical medium on which the page is to be printed,
+is used as the last resort.
+
+The \code{pdf:image} special supports additional keys, ``\code{page}'' and
+``\code{pagebox}''. The \code{page} key takes an integer value representing
+the page number of PDF page to be included, and the \code{pagebox} takes one
+of the keywords \code{mediabox}, \code{cropbox}, \code{artbox}, \code{bleedbox},
+or \code{trimbox} for selecting page's boundary box to be used. For example,
+\begin{lstlisting}
+\special{pdf:image pagebox artbox page 3 (foo.pdf)}
+\end{lstlisting}
+includes 3rd page of `foo.pdf' with the boundary box set to the art box.
+
+\subsubsection{Other Image Formats}
+
+For \MP\ generated Encapsulated PostScript (EPS) files, multi-byte encoding
+support is added.
+\dvipdfmx\ also supports ``\MP\ mode''. When \dvipdfmx\ is invoked with
+\option{-M} option, it enters in \MP\ mode and processes a \MP\
+generated EPS file as an input.%
+\footnote{\code{prologue} should be set to \code{2}.}
+
+BMP support is also added. It is limited to uncompressed or RLE-compressed
+raster images. Extensions are not (won't be) supported.
+
+For image formats not natively supported, the \code{-D} option can be
+used to convert images to PDF format before inclusion, as in \dvipdfm.
+In \dvipdfmx, the letter \code{v} in the \code{-D} option argument is expanded
+to the output PDF version.
+
+\subsection{Image Cache}
+
+Caching of images generated via filtering command specified with \option{-D}
+option is supported. It solves the problems that image inclusion becomes very
+slow when external filtering program such as GhostScript is invoked each time
+images are included.
+
+Use \option{-I} option to enable this feature:
+\begin{lstlisting}
+-I 24
+\end{lstlisting}
+where the integer represents the life of cache files, 24 hours in this example.
+Zero and negative values have a special meaning.
+Value 0 for ``erase old cached images while leaving newly created one'',
+-1 for ``erase all cached images'', and -2 for ``ignore image cache''.
+Default value is set to -2.
+
+\section{Graphics Drawing}
+
+\dvipdfmx\ does not offer a high level interface to draw graphics objects.
+A possible way to draw graphics is to write raw PDF graphics drawing codes and
+then to insert them into the output via \code{special} commands.
+
+To show an example, the following code:
+\begin{lstlisting}
+\special{pdf:content
+ 1 0 0 1 0 0 cm
+ 0 100 m
+ 80 100 120 80 120 0 c
+ S
+}
+\end{lstlisting}
+draws a Bézier curve,
+\begin{center}
+\specialbox{120bp}{100bp}{pdf:content 1 0 0 1 0 0 cm 0 100 m 80 100 120 80 120 0 c S}
+\end{center}
+The \code{pdf:content} special is used here which is useful for inserting an
+isolated graphics object.
+
+The above example illustrates a typical example of PDF graphics drawing.
+It consists of three parts; setting graphics state, constructing a path, and painting
+a path. A Graphic object are specified as a sequence of operators and their operands
+using \emph{postfix notation}. \keyword{Graphics state operators} comes first,
+\code{cm} in this example sets the current transformation matrix (CTM). Then,
+\keyword{path construction} operators follow; move to position $(0, 100)$,
+append a Bézier curve from current point to $(120, 0)$ with control points
+$(80, 100)$ and $(120, 80)$. Finally, a \keyword{path painting} operator
+comes to draw the constructed path.
+In this example the stroking operator \code{S}
+is used.
+
+\subsection{The \code{pdf:content} Special}
+
+The \code{pdf:content} special can be used for drawing an \emph{isolated}
+graphics object. It sets the origin of graphics drawing operators supplied to
+this command to the position where it is inserted.
+The whole content is enclosed by a pair of graphics state save-restore
+operators. So for example, a color change made within a \code{pdf:content}
+command takes an effect only within the content of this special.
+
+\subsection{Guide to PDF Graphics Operators}
+
+PDF employs essentially the same imaging model as PostScript.
+So, it is easy to learn about PDF graphics drawing for people who are
+well accustomed to PostScript. This section is intended to be a short guide
+for PDF graphics operators.
+
+\subsubsection{Graphics State Operators}
+
+The \code{cm} operator modifies CTM by concatenating the specified matrix.
+Operands given to this operators are six numbers each representing
+transformation matrix elements:
+translation represented as $[1, 0, 0, 1, t_x, t_y]$,
+scaling $[s_x, 0, 0, s_y, 0, 0]$,
+rotation $[\cos\theta, \sin\theta, -\sin\theta, \cos\theta, 0, 0]$.
+
+To uniformly scale the object, just use
+\begin{lstlisting}
+2.0 0 0 2.0 0 0 cm
+\end{lstlisting}
+
+The \code{w} operator sets the line width, e.g., `\code{2 w}' sets the line
+width to 2. Here is an example of drawing a rotated rectangle:
+\begin{lstlisting}
+0.866 0.5 -0.5 0.866 30 2 cm 5 w 0 0 100 50 re S
+\end{lstlisting}
+\begin{center}
+\specialbox{120bp}{96bp}{pdf:content 0.866 0.5 -0.5 0.866 30 2 cm 5 w 0 0 100 50 re S}%
+\end{center}
+
+Transformations can be sequentially applied; for the above example,
+\begin{lstlisting}
+1 0 0 1 30 2 cm 0.866 0.5 -0.5 0.866 0 0 cm
+5 w 0 0 100 50 re S
+\end{lstlisting}
+gives the same result.
+
+To specify colors, use \code{RG}, \code{rg}, \code{K}, and \code{k} operators,
+for RGB or CMYK color for stroking (upper-case) and nonstroking (lower-case).
+\begin{lstlisting}
+0.866 0.5 -0.5 0.866 30 2 cm 5 w
+1 0.4 0 0 K 1 0 0 0 k
+0 0 100 50 re B
+\end{lstlisting}
+where the \code{B} operator fill and then stroke the path.
+\begin{center}
+\specialbox{120bp}{96bp}{pdf:content 0.866 0.5 -0.5 0.866 30 2 cm 5 w
+1 0.4 0 0 K 1 0 0 0 k 0 0 100 50 re B}
+\end{center}
+
+A dash pattern can be specified with the \code{d} operator.
+Operands for this operator are the \keyword{dash array} and
+the \keyword{dash phase}.
+For example, to specify a dash pattern with 6-on 4-off starting with phase 0:
+\begin{lstlisting}
+[6 4] 0 d 2 w 0 0 m 320 0 l S
+\end{lstlisting}
+draws the following dashed line:
+\begin{center}
+\specialbox{320bp}{30bp}{pdf:content
+1 0 0 1 0 20 cm [6 4] 0 d 2 w 0 0 m 320 0 l S}
+\end{center}
+
+Other important operators are \code{q} and \code{Q}, which saves and restores
+the graphics state.
+\begin{lstlisting}
+1 0 0 1 30 2 cm
+q
+0.866 0.5 -0.5 0.866 0 0 cm
+[6 4] 0 d 2 w 0 0 100 50 re S
+Q
+-30 0 m 90 0 l S
+0 -2 m 0 96 l S
+\end{lstlisting}
+In the above example, \code{d}, \code{w}, and rotation only take effect within
+the \code{q}-\code{Q} block. The portion drawing two straight lines is unaffected
+by these graphics state change.
+\begin{center}
+\specialbox{120bp}{96bp}{pdf:content
+1 0 0 1 30 2 cm
+q
+0.866 0.5 -0.5 0.866 0 0 cm
+[6 4] 0 d 2 w 0 0 100 50 re S
+Q
+-30 0 m 90 0 l S
+0 -2 m 0 96 l S
+}
+\end{center}
+
+For a (incomplete) list of graphics state operators, see
+Talbe~\ref{TAB:operatorsGS}.
+
+\begin{table}
+ \centering
+ \begin{tabular}{llp{7.6cm}}\hline
+ Operands & Operator & Description\\ \hline\hline
+ --- & \code{q} & Save the current graphics state.\\
+ --- & \code{Q} & Restore the previously saved graphics state.\\
+ $a$ $b$ $c$ $d$ $e$ $f$ & \code{cm} & Modify the current transformation matrix
+ by concatenating the specified matrix.\\
+ \textit{width} & \code{w} & Set the line width.\\
+ \textit{array} \textit{phase} & \code{d} & Set the line dash pattern.\\
+ $r$ $g$ $b$ & \code{RG} & Set the stroking color space to RGB and
+ set the stroking color as specified.\\
+ $r$ $g$ $b$ & \code{rg} & Set the nonstroking color space to RGB and
+ set the nonstroking color as specified.\\
+ $c$ $m$ $y$ $k$ & \code{K} & Set the stroking color space to CMYK and
+ set the stroking color as specified.\\
+ $c$ $m$ $y$ $k$ & \code{k} & Set the nonstroking color space to CMYK and
+ set the nonstroking color as specified.\\
+ \hline
+ \end{tabular}
+ \caption{A few examples of graphics state operators and color operators.}%
+ \label{TAB:operatorsGS}
+\end{table}
+
+\subsubsection{Path Construction Operators}
+
+A path construction normally starts with a \code{m} operator which moves the
+current point to the specified position and then sequences of other path
+construction operators follow. The path currently under construction is
+called the \keyword{current path}. A sequence of path construction operators
+appends segments of path to the current path and then move the
+\keyword{current point} to the end point of appended path.
+A typical sequence of path construction looks like,
+\begin{lstlisting}
+100 50 m
+100 78 78 100 50 100 c
+22 100 0 78 0 50 c
+0 22 22 0 50 0 c
+78 0 100 22 100 50 c
+S
+\end{lstlisting}
+\begin{center}
+\specialbox{120bp}{80bp}{pdf:content
+100 50 m
+100 78 78 100 50 100 c
+22 100 0 78 0 50 c
+0 22 22 0 50 0 c
+78 0 100 22 100 50 c
+S}
+\end{center}
+This example is an approximated circle drawn by four Bézier curves.
+
+Table~\ref{TAB:operators} shows a list of path construction operators.
+Those who are accustomed to the PostScript language should note that in PDF
+the current path is not a part of the graphics state,
+and hence is \emph{not} saved and restored along with the other graphics state
+parameters.
+
+\begin{table}
+ \centering
+ \begin{tabular}{llp{6.9cm}}\hline
+ Operands & Operator & Description \\ \hline\hline
+ $x$ $y$ & \code{m} & Begin a new path by moving the current point specified by given operands.\\
+ $x$ $y$ & \code{l} & Append a line segment from the current point to the point specified.\\
+ $x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ & \code{c} & Append a Bézier curve to the current path.
+ Two Control points and the end point given as operands.\\
+ $x_2$ $y_2$ $x_3$ $y_3$ & \code{v} & Append a Bézier curve to the current path. Using the current
+ point and first two operand as the Bézier control points.\\
+ $x_1$ $y_1$ $x_3$ $y_3$ & \code{y} & Append a Bézier curve to the current path. The second
+ control point coincides with the end point.\\
+ --- & \code{h} & Close the current path by appending a straight line segment from the current point
+ to the starting point of the path.\\
+ $x$ $y$ \textit{width} \textit{height} & \code{re} & Append a rectangle. First two operands for the
+ position of lower-left corner, third and forth operand representing width and
+ height.\\
+ \hline
+ \end{tabular}
+ \caption{List of path construction operators. All operators move the current point to the end
+ point of appended path.}\label{TAB:operators}
+\end{table}
+
+\subsubsection{Path Painting Operators}
+
+There are basically four kind of path painting operators: \code{S}, \code{f},
+\code{B}, and \code{n}. The first three for ``stroke'', ``fill'', and
+``fill then stroke'' operators respectively, and the last one \code{n}
+paints nothing but end the path object. For filling operators, there are
+two kind of operators depending on how ``insideness'' of points are determined:
+the \keyword{non-zero winding number rule} and the \keyword{even-odd rule}.
+The even-odd rule operators are \code{f*} and \code{B*}.
+
+The following example illustrates the difference:
+\begin{lstlisting}
+0 0 100 100 re 20 20 60 60 re f
+1 0 0 1 120 0 cm
+0 0 100 100 re 20 20 60 60 re f*
+\end{lstlisting}
+\begin{center}
+\specialbox{220bp}{100bp}{pdf:content
+0 0 100 100 re 20 20 60 60 re f
+1 0 0 1 120 0 cm
+0 0 100 100 re 20 20 60 60 re f*}
+\end{center}
+The ``interior'' of the ``inner'' square has a non-zero even winding number.
+(In this example, counter-clockwise direction is assumed for both of
+two \code{re} operators.)
+
+\chapter{Specials}
+
+\section{PDF Specials}\label{SEC:specials}
+
+\dvipdfmx\ recognizes various special commands originally introduced in
+\dvipdfm. Please refer to the ``Dvipdfm User's Manual''\cite{DVIPDFM} for detailed
+information on PDF specials.
+
+\subsection{Additions to PDF Specials}
+
+Several \code{special} commands are added for more flexible PDF generation:
+creation of arbitrary stream objects, controlling \dvipdfmx\ behavior, and some
+specials which might be useful for graphics drawing.
+
+\subsubsection{PDF Object Manipulation}
+
+PDF object manipulation is a key feature of PDF specials.
+The \code{pdf:fstream} special is added in \dvipdfmx\ which enables creation of
+PDF stream object from an existing file. The syntax of this special is,
+\begin{lstlisting}
+pdf:fstream @identifier (filename) <<dictionary>>
+\end{lstlisting}
+where identifier and filename (specified as a PDF string object) are
+mandatory and a dictionary object, following the filename, which is to be added
+to the stream dictionary is optional.
+
+For example, to incorporate XMP Metadata from a file \code{test.xmp},
+\begin{lstlisting}
+\special{pdf:fstream @xmp (test.xmp) <<
+ /Type /Metadata
+ /Subtype /XML
+>>}
+\special{pdf:put @catalog << /Metadata @xmp >>}
+\end{lstlisting}
+
+Similarly, \code{pdf:stream} special can be used to create a PDF stream
+object from a PDF string instead of a file.
+\begin{lstlisting}
+pdf:stream @identifier (stream contents) <<dictionary>>
+\end{lstlisting}
+
+This special might be useful for creating a simple image inline.
+\begin{lstlisting}
+\special{pdf:stream @myim01
+ <5500AAC05500AAC05500AAC05500AAC05500>
+ <<
+ /Type /XObject
+ /Subtype /Image
+ /BitsPerComponent 1
+ /ColorSpace /DeviceGray
+ /Width 9
+ /Height 9
+ >>
+}
+\special{pdf:put @resources <<
+ /XObject << /MyIM01 @myim01 >>
+>>}
+\special{pdf:content 81 0 0 81 0 0 cm /MyIM01 Do}
+\end{lstlisting}
+The above example draws an image like Figure~\ref{FIG:stream}.
+\begin{figure}
+ \centering
+ \makebox[81bp][l]{\raisebox{-81bp}[0bp][81bp]{%
+ \special{pdf:stream @myim01 <5500AAC05500AAC05500AAC05500AAC05500>
+ <<
+ /Type /XObject
+ /Subtype /Image
+ /BitsPerComponent 1
+ /ColorSpace /DeviceGray
+ /Width 9
+ /Height 9
+ >>}
+ \special{pdf:put @resources <<
+ /XObject << /MyIM01 @myim01 >>
+ >>}
+ \special{pdf:content 81 0 0 81 0 0 cm /MyIM01 Do}
+}}
+\caption{An image created by \code{pdf:stream} special.}%
+\label{FIG:stream}
+\end{figure}
+
+\subsubsection{Controlling Font Mappings}
+
+\code{pdf:mapline} and \code{pdf:mapfile} specials can be used to append a
+fontmap entry or to load a fontmap file:
+\begin{lstlisting}
+pdf:mapline foo unicode bar
+pdf:mapfile foo.map
+\end{lstlisting}
+
+\subsubsection{Specifying Output PDF Version}
+
+\code{pdf:majorversion} and \code{pdf:minorversion} specials can be used to
+specify major and minor version of output PDF.
+\begin{lstlisting}
+pdf:minorversion 3
+\end{lstlisting}
+
+Please note that this command must appear on the first page,
+otherwise it will be ignored.
+
+\subsubsection{Custom File Identifiers}
+
+\newfeature{Addition in \TeX\ Live 2019}
+
+A custom file identifier (the \code{ID} entry in the trailer dictionary)
+can be specified via \code{pdf:trailerid} special as
+\begin{lstlisting}
+pdf:trailerid [(0123456789abcdef) (0123456789abcdef)]
+\end{lstlisting}
+An array of two 16-byte PDF string objects must be supplied as
+a file identifier. This special command must appear on the first page.
+
+\subsubsection{Encryption}
+
+To protect output PDF with encryption, use \code{pdf:encrypt} special
+\begin{lstlisting}
+pdf:encrypt userpw (foo) ownerpw (bar) length 128 perm 20
+\end{lstlisting}
+where user-password (\code{userpw}) and owner-password (\code{ownerpw}) must be
+specified as PDF string objects. (which can be empty)
+Numbers specifying key-length and permission flags here are decimal numbers.
+See, section ``\hyperref[SEC:encryption]{Encryption Support}'' for a brief
+description of permission flags.
+
+\subsubsection{PDF Document Creation}
+
+\newfeature{Addition in \TeX\ Live 2019}
+
+As a convenience, the \code{pageresources} special is added, which puts given page
+resources into subsequent page's \keyword{Resource Dictionary}. For example,
+\begin{lstlisting}
+\special{pdf:pageresources <<
+ /ExtGState << /MyGS01 << /ca 0.5 /CA 0.5 >> >>
+>>}
+\end{lstlisting}
+puts an ExtGState resource named \code{MyGS01} into the current page's and all
+subsequent pages' resource dictionary.
+
+Other notable extensions are \code{code}, \code{bcontent}, and
+\code{econtent}. The \code{code} special can be used to insert raw PDF graphics
+instructions into the output. It is different from \dvipdfm's
+\code{content} special in that it does not enclose contents with a \code{q}
+and \code{Q} (save-restore of graphics state) pair.
+A typical usage of this special is:
+\begin{lstlisting}
+\special{pdf:code q 1 Tr}
+...some text goes here...
+\special{pdf:code Q}
+\end{lstlisting}
+which changes text rendering mode to 1, as shown in Figure~\ref{FIG:trmode}.
+
+\begin{figure}
+\centering
+\mbox{\special{pdf:code q 1 w 1 Tr}%
+{\fontsize{200pt}{200pt}\selectfont\textchi}%
+\special{pdf:code Q}}%
+\caption{A character drawn in the PDF text rendering mode 1.}%
+\label{FIG:trmode}
+\end{figure}
+
+Be careful on using this special as it is very easy to generate
+broken PDF files. The \code{bcontent} and \code{econtent} pair is somewhat
+fragile and might be incompatible to other groups of special commands.
+It may not always be guaranteed to work as `expected'.
+
+\subsection{ToUnicode Special}
+
+PDF allows users to attach various additional information such as document information,
+annotation, and navigation information (like bookmarks) to their document.
+All human-readable text, \keyword{text string}, contained in such information must
+be encoded either in \keyword{PDFDocEncoding} or UTF-16BE with Unicode byte order
+marker. However, as many users can't prepare their document with text strings
+properly encoded, there is a special kind of special command, \code{pdf:tounicode},
+which can be used to convert text strings into the appropriate Unicode form.
+Note that this feature is provided just as a remedy for users incapable of encoding
+text strings properly.
+
+For example,
+\begin{lstlisting}
+\special{pdf:tounicode 90ms-RKSJ-UCS2}
+\end{lstlisting}
+declares that \emph{some} of text strings should be re-encoded according to specified
+conversion CMap \code{90ms-RKSJ-UCS2}.
+
+Conversion is done only for arguments to several PDF special commands such as
+\code{docinfo}, \code{ann}, and \code{out} but not for that of general object creation
+specials. Note that not all PDF string objects are subject to this conversion.
+By default, only dictionary entries listed below are converted.
+\begin{lstlisting}
+Title Author Subject Keywords Creator Producer Contents Subj
+TU T TM
+\end{lstlisting}
+
+\newfeature{Addition in \TeX\ Live 2019}
+
+The list of dictionary entries subject to conversion can be extended by supplying
+additional dictionary keys as an array object:
+\begin{lstlisting}
+ \special{pdf:tounicode 90ms-RKSJ-UCS2 [/RC /DS]}
+\end{lstlisting}
+
+If the name of conversion CMap contains one of the keywords RKSJ, \lnum{B5}, GBK, and KSC,
+PDF string objects are treated specially when they are parsed. A two byte sequence
+starting with the first byte's high bit set is treated ``as is'' so that
+the \code{0x5c} byte appears in the second byte is not treated as an escape sequence.
+This behavior is not compliant to the PDF specification.
+
+\subsection{PDF Special Examples}
+
+This section shows several examples of special command usage.
+It is intended to be a hint for advanced users, so uninterested users can safely skip
+this section. In many cases, using \dvipdfmx\ PDF specials requires knowledge on PDF.
+Please refer to Adobe's ``PDF Reference''\cite{ADOBE}.
+
+\subsubsection{Annotations}
+
+In this section, some useful special commands for creating \keyword{annotations}
+are explained. Note that viewer support is required for annotations to be
+displayed correctly.
+
+First start with a very simple \keyword{Text Annotation} for attaching a comment.
+This feature is supported by many PDF viewer applications.
+\marginnote{\special{pdf:ann width 20bp height 20bp
+ <<
+ /Type /Annot
+ /Subtype /Text
+ /Name /Comment
+ /T (Text Annotation Example)
+ /Subj (An Example of Text Annotations)
+ /Contents (A Quick Brown Fox Jumped Over The Lazy Dog.)
+ >>
+}}
+
+\begin{lstlisting}
+\special{pdf:ann width 20bp height 20bp
+ <<
+ /Type /Annot
+ /Subtype /Text
+ /Name /Comment
+ /T (Text Annotation Example)
+ /Subj (An Example of Text Annotations)
+ /Contents (A Quick Brown Fox Jumped Over The Lazy Dog.)
+ >>
+}
+\end{lstlisting}
+\code{pdf:ann} special is used to create an annotation. A small icon shall
+be shown on the side margin. Here, dictionary entry \code{T} is for the tilte,
+\code{Subj} for the subject of this annotation, and \code{Contents} for
+the text string to be shown in the body of this annotation.
+
+Likewise, \keyword{Rubber Stamp Annotation}, which places a rubber stamp
+like figure,
+\begin{center}
+\specialbox{150bp}{50bp}{pdf:ann width 150bp height 50bp
+ <<
+ /Type /Annot
+ /Subtype /Stamp
+ /Name /Approved
+ >>
+}
+\end{center}
+
+\begin{lstlisting}
+\special{pdf:ann width 150bp height 50bp
+ <<
+ /Type /Annot
+ /Subtype /Stamp
+ /Name /Approved
+ >>
+}
+\end{lstlisting}
+Other keywords such as \code{Expired}, \code{Final}, \code{Draft}, and so on,
+can be used in place of \code{Approved}.
+
+One can create stamps of their own style. For this purpose, other specials
+\code{pdf:bxobj} and \code{pdf:exobj} can be used for designing stamps.
+Those specials ``capture'' all typeset material enclosed by them into a PDF
+\keyword{Form XObject}, which is a reusable graphics object like included images.
+
+For a simple example,
+\begin{lstlisting}
+\special{pdf:bxobj @MyStamp
+ width 280pt height 0pt depth 40pt}
+\addfontfeature{Scale=4,Color=FF9933}My Own Stamp
+\special{pdf:exobj}
+\end{lstlisting}
+It captures typeset material ``My Own Stamp'' (this example uses \code{fontspec}
+package's command for changing font size and text color) into the object labeled as
+\code{MyStamp} for later reuse.
+Then, \code{AP} (\keyword{appearance dictionary}) entry for controlling the appearance
+of annotations is used as,
+\begin{lstlisting}
+\special{pdf:ann width 280pt height 40pt
+ <<
+ /Type /Annot
+ /Subtype /Stamp
+ /AP << /N @MyStamp >>
+ >>
+}
+\end{lstlisting}
+The image captured into the object \code{MyStamp} is used as ``Normal''
+(\code{AP} dictionary entry \code{N}) appearance.
+(\code{R} for ``Rollover'' and \code{D} for ``Down'' can be used.)
+
+\parbox[t][0pt][c]{280pt}{%
+\special{pdf:bxobj @MyStamp width 280pt height 0pt depth 40pt}%
+\addfontfeature{Scale=4,Color=FF9933}My Own Stamp%
+\special{pdf:exobj}%
+}%
+
+The result is:
+\begin{center}
+\specialbox{280bp}{40bp}{pdf:ann width 280pt height 40pt
+ <<
+ /Type /Annot
+ /Subtype /Stamp
+ /AP << /N @MyStamp >>
+ >>
+}
+\end{center}
+
+With the following code, \dvipdfmx\ reads the source file and creates a stream
+object named \code{SourceFile}, and then creates file attachment annotation.
+\marginnote{%
+\special{pdf:fstream @SourceFile (\jobname.tex)}%
+\special{pdf:ann width 10bp height 20bp
+ <<
+ /Type /Annot
+ /Subtype /FileAttachment
+ /FS <<
+ /Type /Filespec
+ /F (\jobname.tex)
+ /EF << /F @SourceFile >>
+ >>
+ /Name /PushPin
+ /C [0.8 0.2 0.2]
+ /T (The Dvipdfmx User's Manual)
+ /Subj (The Dvipdmfx User's Manual)
+ /Contents (XeLaTeX source file of this manual.)
+ >>
+}}%
+\begin{lstlisting}
+\special{pdf:fstream @SourceFile (\jobname.tex)}%
+\special{pdf:ann width 10bp height 20bp
+ <<
+ /Type /Annot
+ /Subtype /FileAttachment
+ /FS <<
+ /Type /Filespec
+ /F (\jobname.tex)
+ /EF << /F @SourceFile >>
+ >>
+ /Name /PushPin
+ /C [0.8 0.2 0.2]
+ /T (The Dvipdfmx User's Manual)
+ /Subj (The Dvipdfmx User's Manual)
+ /Contents (XeLaTeX source file of the manual.)
+ >>
+}
+\end{lstlisting}
+A push-pin image must be shown on the margin if viewer supports this kind of
+annotation.
+PDF viewer applications are required to provide predefined icon appearances
+at least for the following standard icons: \code{Graph}, \code{PushPin},
+\code{PaperClip}, and \code{Tag}.
+
+\subsubsection{Special Color Space}
+
+This section shows various examples of using \keyword{Special color spaces}.
+Examples in this section have a common structure. They consist of essentially
+three parts. The first part is for defining color space itself.
+PDF object creation commands like \code{pdf:obj} and \code{pdf:stream} are used
+for this purpose. Next is for registering color space resources in the page's
+\keyword{Resource Dictionary}. It can be done via \code{pdf:put} command as,
+\begin{lstlisting}
+\special{pdf:put @resource <<
+ /Category << ...key-value pairs... >>
+>>}
+\end{lstlisting}
+where \code{@resource} is a special keyword representing current page's
+Resource Dictionary and \code{Category} (to be replaced by actual category
+name) is a category name such as \code{ColorSpace}.
+Finally, graphics objects are placed, with or with a combination of
+text and, PDF drawing operators inserted by the \code{pdf:code} or the
+\code{pdf:contents} special.
+
+%%EXAMPLE: Separation Color Space
+The first example is the \keyword{Separation} color space:
+\special{pdf:stream @TintTransform1
+ ({0 exch dup 0.62 mul exch 0})
+ << /FunctionType 4
+ /Domain [0.0 1.0]
+ /Range [0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0]
+ >>
+}%
+\special{pdf:stream @TintTransform2
+ ({dup 0.78 mul exch dup 0.05 mul exch 0.71 mul 0})
+ << /FunctionType 4
+ /Domain [0.0 1.0]
+ /Range [0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0]
+ >>
+}%
+\special{pdf:obj @Orange [
+ /Separation /Orange /DeviceCMYK @TintTransform1
+ ]
+}%
+\special{pdf:obj @Green [
+ /Separation /Green /DeviceCMYK @TintTransform2
+ ]
+}%
+\begin{center}
+\mbox{%
+\special{pdf:put @resources <<
+ /ColorSpace << /CS01 @Orange /CS02 @Green >>
+ >>
+}%
+\fontsize{40pt}{40pt}\selectfont
+\special{pdf:code q /CS01 cs 1.0 scn}Orange\special{pdf:code Q} and
+\special{pdf:code q /CS02 cs 1.0 scn}Green\special{pdf:code Q}
+}
+\end{center}
+\begin{lstlisting}
+\special{pdf:stream @TintTransform1
+ ({0 exch dup 0.62 mul exch 0})
+ << /FunctionType 4
+ /Domain [ 0.0 1.0 ]
+ /Range [ 0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0 ]
+ >>
+}
+\special{pdf:stream @TintTransform2
+ ({dup 0.78 mul exch dup 0.05 mul exch 0.71 mul 0})
+ << /FunctionType 4
+ /Domain [ 0.0 1.0 ]
+ /Range [ 0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0 ]
+ >>
+}
+\special{pdf:obj @Orange [
+ /Separation /Orange /DeviceCMYK @TintTransform1
+ ]
+}
+\special{pdf:obj @Green [
+ /Separation /Green /DeviceCMYK @TintTransform2
+ ]
+}
+\mbox{%
+ \special{pdf:put @resources <<
+ /ColorSpace << /CS01 @Orange /CS02 @Green >>
+ >>
+ }%
+ \special{pdf:code q /CS01 cs 1.0 scn}
+ Orange
+ \special{pdf:code Q}
+ and
+ \special{pdf:code q /CS02 cs 1.0 scn}
+ Green
+ \special{pdf:code Q}
+}
+\end{lstlisting}
+
+\code{TintTransform}'s defined here are functions for transforming
+\keyword{tint} values into approximate colors in the
+\keyword{alternate color space}
+(\code{DeviceCMYK} in this example). PostScript calculator functions are used
+for converting a single component value representing ``Orange'' or ``Green''
+into four component CMYK values to approximate those colors. The ``Orange''
+color $v$ is approximated as $(0, 0.62v, v, 0)$ in CMYK color space for
+alternate display here.
+
+The \code{cs} operator for selecting color space and the \code{scn} operator
+for color values are used in the \code{pdf:code} special.
+Be sure that the \code{pdf:put} command, which puts color space resources
+into the current page's Resource Dictionary, goes into the same page as
+subsequent drawing commands.
+
+\dvipdfmx\ currently does not have an easy interface for using various color
+space families such as CIE-Based color spaces (e.g., calibrated colors and
+color space with an ICC profile) and Special color spaces (e.g., indexed,
+separation, shading and patterns).
+
+%%EXAMPLE: Shading
+Another example is a \keyword{shading pattern}:
+\begin{lstlisting}
+\special{pdf:put @resources <<
+ /Shading <<
+ /SH01 <<
+ /ShadingType 2
+ /ColorSpace @Orange
+ /Coords [0 0 320 20]
+ /Extend [true true]
+ /Function << /FunctionType 2 /Domain [0 1] /N 1.0 >>
+ >>
+ >>
+>>}
+\special{pdf:content 0 0 320 20 re W n /SH01 sh}
+\end{lstlisting}
+where the ``Orange'' separation color space defined before is used again.
+This example shows an axial shading (\code{ShadingType} 2) pattern.
+\begin{center}
+\makebox[320pt][l]{
+ \special{pdf:put @resources <<
+ /Shading <<
+ /SH01 <<
+ /ShadingType 2
+ /ColorSpace @Orange
+ /Coords [0 0 320 20]
+ /Extend [true true]
+ /Function << /FunctionType 2 /Domain [0 1] /N 1.0 >>
+ >>
+ >>
+ >>}
+ \raisebox{-20pt}[0pt][20pt]{\special{pdf:content 0 0 320 20 re W n /SH01 sh}}
+}
+\end{center}
+
+The shading pattern requires coordinate values to be mapped into color values.
+Type 2 (Exponential Interpolation) \keyword{Function} is used for defining how
+this mapping should occur here.
+The above example, with the exponent $N=1$, is just a simple linear-gradient.
+
+The final examples is a \keyword{tiling pattern}.
+\begin{lstlisting}
+\special{pdf:stream @MyPattern
+ (0.16 0 0 0.16 0 0 cm 4 w
+ 50 0 m 50 28 28 50 0 50 c S 100 50
+ m 72 50 50 28 50 0 c S
+ 50 100 m 50 72 72 50 100 50 c S
+ 0 50 m 28 50 50 72 50 100 c S
+ 100 50 m 100 78 78 100 50 100 c 22 100 0 78 0 50 c
+ 0 22 22 0 50 0 c 78 0 100 22 100 50 c S
+ 0 0 m 20 10 25 5 25 0 c f 0 0 m 10 20 5 25 0 25 c f
+ 100 0 m 80 10 75 5 75 0 c f
+ 100 0 m 90 20 95 25 100 25 c f
+ 100 100 m 80 90 75 95 75 100 c f
+ 100 100 m 90 80 95 75 100 75 c f
+ 0 100 m 20 90 25 95 25 100 c f
+ 0 100 m 10 80 5 75 0 75 c f
+ 50 50 m 70 60 75 55 75 50 c 75 45 70 40 50 50 c f
+ 50 50 m 60 70 55 75 50 75 c 45 75 40 70 50 50 c f
+ 50 50 m 30 60 25 55 25 50 c
+ 25 45 30 40 50 50 c f
+ 50 50 m 60 30 55 25 50 25 c 45 25 40 30 50 50 c f)
+ <<
+ /BBox [0 0 16 16]
+ /PaintType 2
+ /PatternType 1
+ /Resources <<
+ /ProcSet [/PDF]
+ >>
+ /TilingType 3
+ /Type /Pattern
+ /XStep 16
+ /YStep 16
+ >>
+}
+\end{lstlisting}
+
+The above example defines a tiling pattern. The content stream containing
+painting operators, \code{m} for ``move-to'', \code{c} for ``curve-to'',
+\code{f} for ``fill'', and \code{S} for ``stroke'', defines the appearance of
+the \keyword{pattern cell} for this tiling pattern. With the following code,
+\begin{lstlisting}
+\special{pdf:put @resources
+ <<
+ /ColorSpace << /CS01 [/Pattern /DeviceRGB] >>
+ /Pattern << /PT01 @MyPattern >>
+ >>
+}
+\special{pdf:content
+ q 0.8 0.3 0.3 RG /CS01 cs 0.8 0.3 0.3 /PT01 scn
+ 0 0 320 100 re f
+}
+\end{lstlisting}
+a box filled with the tiling pattern defined above is drawn.
+\special{pdf:stream @MyPattern
+ (0.16 0 0 0.16 0 0 cm 4 w
+ 50 0 m 50 28 28 50 0 50 c S 100 50
+ m 72 50 50 28 50 0 c S
+ 50 100 m 50 72 72 50 100 50 c S
+ 0 50 m 28 50 50 72 50 100 c S
+ 100 50 m 100 78 78 100 50 100 c 22 100 0 78 0 50 c
+ 0 22 22 0 50 0 c 78 0 100 22 100 50 c S
+ 0 0 m 20 10 25 5 25 0 c f 0 0 m 10 20 5 25 0 25 c f
+ 100 0 m 80 10 75 5 75 0 c f
+ 100 0 m 90 20 95 25 100 25 c f
+ 100 100 m 80 90 75 95 75 100 c f
+ 100 100 m 90 80 95 75 100 75 c f
+ 0 100 m 20 90 25 95 25 100 c f
+ 0 100 m 10 80 5 75 0 75 c f
+ 50 50 m 70 60 75 55 75 50 c 75 45 70 40 50 50 c f
+ 50 50 m 60 70 55 75 50 75 c 45 75 40 70 50 50 c f
+ 50 50 m 30 60 25 55 25 50 c
+ 25 45 30 40 50 50 c f
+ 50 50 m 60 30 55 25 50 25 c 45 25 40 30 50 50 c f)
+ <<
+ /BBox [0 0 16 16]
+ /PaintType 2
+ /PatternType 1
+ /Resources <<
+ /ProcSet [/PDF]
+ >>
+ /TilingType 3
+ /Type /Pattern
+ /XStep 16
+ /YStep 16
+ >>
+}%
+\begin{center}
+\raisebox{-100bp}[0bp][100bp]{\makebox[320bp][l]{\special{pdf:put @resources
+ <<
+ /ColorSpace << /CS01 [/Pattern /DeviceRGB] >>
+ /Pattern << /PT01 @MyPattern >>
+ >>
+}%
+\special{pdf:content
+ 0.8 0.3 0.3 RG /CS01 cs 0.8 0.3 0.3 /PT01 scn
+ 0 0 320 100 re f
+}}}%
+\end{center}
+
+\subsubsection{Transparency}
+
+%%EXAMPLE: Transparency
+\XeTeX's transparency feature is currently lost in \xdvipdfmx, but the same
+effect can be achieved by setting graphics state parameters with
+\code{ExtGState} resources and \code{gs} operator. Here is a simple
+transparency example:
+\special{pdf:obj @gs01 <<
+ /Type /ExtGState /CA 0.5 /ca 0.5 /AIS false
+>>}%
+\begin{figure}[ht]
+\centering
+\mbox{%
+ %\raisebox{120pt}{\parbox[t]{0.8\textwidth}{%
+ % \addfontfeature{Color=444444}\lipsum[1]}%
+ %}%
+ %\hspace{-0.8\textwidth}%
+ \special{pdf:put @resources <<
+ /ExtGState << /GS01 @gs01 >>
+ >>}%
+ \fontsize{220pt}{220pt}\selectfont
+ \special{pdf:code q /GS01 gs 1.0 0.8 0.2 rg}%
+ α%
+ \special{pdf:code 0.4 0.8 0.4 rg}%
+ \hspace{-0.3em}%
+ β%
+ \hspace{-0.3em}\raisebox{0.5ex}{%
+ \special{pdf:code 0.4 0.4 0.8 rg}%
+ π%
+ }%
+ \special{pdf:code 0.6 0.2 0.8 rg}%
+ \hspace{-0.2em}%
+ γ%
+ \special{pdf:code Q}%
+}
+\end{figure}
+\begin{lstlisting}
+\special{pdf:obj @GS01 <<
+ /Type /ExtGState /CA 0.5 /ca 0.5 /AIS false
+>>}%
+\mbox{%
+ \special{pdf:put @resources <<
+ /ExtGState << /GS01 @GS01 >>
+ >>}%
+ \special{pdf:code q /GS01 gs 1.0 0.8 0.2 rg}%
+ α%
+ \special{pdf:code 0.4 0.8 0.4 rg}%
+ \hspace{-0.3em}%
+ β%
+ \hspace{-0.3em}\raisebox{0.5ex}{%
+ \special{pdf:code 0.4 0.4 0.8 rg}%
+ π%
+ }%
+ \special{pdf:code 1.0 0.2 0.4 rg}%
+ \hspace{-0.2em}%
+ γ%
+ \special{pdf:code Q}%
+}
+\end{lstlisting}
+where values for \code{CA} and \code{ca} represent opacity of stroke and
+fill color respectively. Again, \code{pdf:put} command must go into the same
+page as subsequent graphics and text drawing operators.
+
+\section{Dvipdfmx Extensions}
+
+\newfeature{Addition in \TeX\ Live 2016}
+
+\noindent{}A new special \code{dvipdfmx:config} was introduced in
+\TeX Live 2016 which makes it possible to invoke a command line option.
+Several single letter command line options except \option{D} are supported.
+For example,
+\begin{lstlisting}
+dvipdfmx:config C 0x10
+\end{lstlisting}
+sets the \dvipdfmx's compatibility flags. See, the section
+``\hyperref[SEC:compatibility]{Incompatible Changes}'' for an explanation of
+compatibility flags.
+
+\section{PS Specials}
+
+PS (PostScript) specials can be used to insert a raw PostScript code for drawing
+graphics objects and transforming subsequent text and graphics.
+Please note that support for PostScript operators in \dvipdfmx\ is very
+limited. It is just enough for interpreting PostScript figures output by \MP.
+Only a basic set of operators for arithmetic and math, stack operation and manipulation,
+graphics state, path construction and painting, glyph and font, are supported.
+See, Table~\ref{TABLE:PS} for the list of
+recognized PostScript operators.
+
+\begin{table}
+ \centering
+ \begin{tabular}{p{3cm}>{\raggedright\arraybackslash}p{8cm}}\hline
+ Classification & Operators \\ \hline\hline
+ Arithmetic \& Math & \code{add} \code{sub} \code{mul} \code{div} \code{neg} \code{truncate}\\
+ Stack Operation & \code{clear} \code{pop} \code{exch}\\
+ Graphis State & \code{gsave} \code{grestore}
+ \code{setlinewidth} \code{setdash} \code{setlinecap} \code{setlinejoin} \code{setmiterlimit} \code{setgray} \code{setrgbcolor} \code{setcmykcolor} \\
+ Coordinate System & \code{concat} \code{scale} \code{translate} \code{rotate} \code{idtransform} \code{dtransform}\\
+ Path Construction & \code{currentpoint} \code{newpath} \code{closepath} \code{moveto} \code{rmoveto} \code{lineto} \code{rlineto} \code{curveto} \code{rcurveto} \code{arc} \code{arcn} \code{clip} \code{eoclip} \\
+ Painting & \code{stroke} \code{fill} \\
+ Glyph \& Font & \code{show} \code{findfont} \code{scalefont} \code{setfont} \code{currentfont} \code{stringwidth}\\
+ \hline
+ \end{tabular}
+ \caption{List of PostScript operators recognized by \dvipdfmx.}%
+ \label{TABLE:PS}
+\end{table}
+
+It might be enough for the purpose of basic graphics drawings but as there are
+no support for conditionals and controls it is not enough for complicated tasks,
+especially, the PSTricks package is not supported.
+
+In \dvipdfmx, text handling is extended to support CJK text.
+The following code draws Japanese text like shown in Figure~\ref{FIG:verttext}:
+\begin{lstlisting}
+\special{pdf:mapline uprml UniJIS-UTF8-H yumindb.ttf}
+\special{ps: uprml findfont 16 scalefont setfont
+ currentpoint moveto
+ (...some Japanese text goes here...) show
+}
+\end{lstlisting}
+
+\chapter{Fonts and Encodings}
+
+\section{Fonts and Encodings Support}
+
+In \dvipdfmx, all font formats supported by \dvipdfm\ are also supported with
+many improvements: The CFF conversion for PostScript Type1 fonts\footnote{PostScript
+Type1 font support is restricted to the binary format as in \dvipdfm.} is
+implemented which greatly reduces the output file size. Embedded TrueType fonts are
+now subsetted. The OpenType font format is also supported.\footnote{Its
+implementation is based on the OpenType specification version 1.4.
+Newly added features such as color fonts and variable fonts are not supported yet.}
+
+There are various enhancements made for supporting Unicode and legacy multi-byte
+character encodings for East Asian languages.
+
+
+\section{Font Mappings}
+
+The Syntax of font-mapping (fontmap) files is basically the same as in \dvipdfm.
+There are few extensions available in \dvipdfmx. In addition to the 8-bit \code{enc}
+file and keywords \code{builtin} and \code{none}, \dvipdfmx\ accepts a PostScript CMap
+Resource name and the keyword \code{unicode} in the encoding field.
+
+When the keyword \code{unicode} is specified in the encoding field of fontmap
+files, it is assumed that Unicode values are used in the input DVI file.
+
+\begin{lstlisting}
+ urml unicode SourceHanSerifJP-Light.otf
+\end{lstlisting}
+
+Although the DVI format allows 3-byte and 4-byte character codes to be used,
+\dvipdfmx\ only supports up to 2-byte range since there is no TFM format supporting
+3-byte or 4-byte codes.
+
+For PostScript Type1 fonts which do not support Unicode natively, an auxiliary file,
+the Adobe Glyph List, is required to make it possible to use fonts with Unicode access.
+
+As a general framework for supporting legacy multi-byte encodings, \dvipdfmx\ employs
+PostScript CMap Resources for handling input strings encoded in various
+character encodings. A CMap name can be specified in the encoding field just like
+the encoding name for 8-bit encodings. For example, to specify the CMap ``UniJIS-UCS2-H'',
+
+\begin{lstlisting}
+ urml UniJIS-UCS2-H HiraMinPro-W3.otf
+\end{lstlisting}
+
+For information on the Adobe Glyph List and PostScript CMap Resources, see,
+the section \ref{SEC:auxfiles}, ``Auxiliary Files''.
+
+\subsection{Extended Syntax and Options}
+
+Few options are available in \dvipdfmx\ in addition to the original dvipdfm's
+one. Please note that all features which makes \dvipdfmx\ to use
+non-embedded fonts are deprecated, as by doing so it makes \dvipdfmx\ to create
+PDF files which can be non-compliant to the ISO standards.
+
+\subsubsection{SFD Specification}
+
+For bundling up a font split into multiple subfonts via SFD back into
+a single font, dvipdfmx supports extended syntax of the form
+\begin{lstlisting}
+tfm_name@SFD@ encoding filename options
+\end{lstlisting}
+A typical example looks like:
+\begin{lstlisting}
+gbsn@EUC@ GB-EUC-H gbsn00lp
+\end{lstlisting}
+where TFMs \code{gbsn00}, \code{gbsn01}, \code{gbsn02}... are mapped into a
+single font named \code{gbsn00lp} via the rule described in the SFD file
+\code{EUC}.
+
+\subsubsection{TrueType Collection Index}
+
+TrueType Collection index number can be specified with \code{:n:}
+in front of the TrueType font name:
+\begin{lstlisting}
+min10 H :1:mincho
+\end{lstlisting}
+In this example, the option \code{:1:} tells \dvipdfmx\ to select first
+TrueType font from the TTC font \code{mincho.ttc}. Alternatively, the
+\option{-i} option can be used in the option field to specify TTC index:
+\begin{lstlisting}
+min10 H mincho -i 1
+\end{lstlisting}
+
+\subsubsection{Non-embedding Switch}
+
+\deprecated{Use of this option is deprecated.}
+\noindent{}The character \option{!} in front of the font name can be used to
+indicate that the font shall not be embedded. This feature greatly reduces the
+size of the final PDF output, but the PDF file may not be viewed exactly the same
+in other systems on which appropriate fonts are not installed.
+\bigskip
+
+\noindent{}NOTE: \dvipdfmx\ always converts input encodings to CIDs and then
+uses Identity CMaps\footnote{Predefined CMaps \code{Identity-H} and
+\code{Identity-V} for the identity mapping.}
+in the output PDF. However, \lnum{ISO~32000-1:2008} describes as
+\begin{quoting}
+The Identity-H and Identity-V CMaps shall not be used with a non-embedded font.
+Only standardized character sets may be used.
+\end{quoting}
+which had never appeared in Adobe's PDF References. This makes all PDF files
+generated by \dvipdfmx\ with non-embedded CID-keyed fonts non-compliant to
+the ISO standards.
+
+\subsubsection{`Standard' CJK Fonts}
+
+\deprecated{This feature is deprecated.}
+\noindent{}Use of this feature shall be avoided for new documents. It is
+described here since it might still be useful for some situations.
+
+\dvipdfmx\ recognizes several `Standard' CJK fonts although there are no such
+notion in PDF. In older days where there were not so many freely available CJK
+fonts, it was sometimes useful to create PDF files without embedding fonts and
+let PDF viewers or printers to use substitute fonts (tend to be higher quality)
+installed in their systems. \dvipdfmx\ `knows' several fonts which might be
+available in PostScript printers and PDF applications such as Acrobat Reader,
+and uses them without actually having it.
+See, Table~\ref{TABLE:StdCJKFont}, for the list of available `Standard' CJK
+fonts.
+
+\begin{table}
+ \centering
+ \begin{tabular}{lll}\hline
+ Character Collection & Font Family & Description \\ \hline\hline
+ Adobe-Japan1 & Ryumin-Light & PS printers \\
+ & GothicBBB-Medium & \\
+ Adobe-CNS1 & MHei-Medium-Acro & Acrobat Reader 4 \\
+ & MSung-Light-Acro & \\
+ Adobe-GB1 & STSong-Light-Acro & \\
+ & STHeiti-Regular-Acro & \\
+ Adobe-Japan1 & HeiseiMin-W3-Acro & \\
+ & HeiseiKakuGO-W5-Acro & \\
+ Adobe-Korea1 & HYGoThic-Medium-Acro & \\
+ & HYSMyeongJo-Medium-Acro & \\
+ Adobe-CNS1 & MSungStd-Light-Acro & Acrobat Reader 5 \\
+ Adobe-GB1 & STSongStd-Light-Acro & \\
+ Adobe-Korea1 & HYSMyeongJoStd-Medium-Acro \\
+ Adobe-CNS1 & AdobeMingStd-Light-Acro & Adobe Reader 6 \\
+ Adobe-GB1 & AdobeSongStd-Light-Acro & \\
+ Adobe-Japan1 & KozMinPro-Regular-Acro & \\
+ & KozGoPro-Medium-Acro & \\
+ Adobe-Korea1 & AdobeMyungjoStd-Medium-Acro & \\
+ Adobe-CNS1 & AdobeHeitiStd-Regular & Adobe Reader 7 \\
+ Adobe-Japan1 & KozMinProVI-Regular & Adobe Reader 8\\
+ \hline
+ \end{tabular}
+ \caption{List of available `Standard' CJK font. Most of them are
+ available as a part of Adobe Asian Font Packs for each versions of
+ Adobe or Acrobat Reader.}\label{TABLE:StdCJKFont}
+\end{table}
+
+Only fixed-pitch glyphs (i.e., quarter, third, half, and full widths) are
+supported for those fonts.
+
+\subsubsection{Stylistic Variants}
+
+\deprecated{Use of this option is deprecated.}
+\noindent{}Keywords \code{,Bold}, \code{,Italic}, and \code{,BoldItalic} can be
+used to create synthetic bold, italic, and bolditalic style variants from other
+font using PDF viewer's (or OS's) function.
+\begin{lstlisting}
+jbtmo@UKS@ UniKSCms-UCS2-H :0:!batang,Italic
+\end{lstlisting}
+
+Availability of this feature highly depends on the implementation of PDF
+viewers. This feature is usually not supported for embedded fonts.
+Notice that this option automatically disables font embedding thus
+use of it is deprecated.
+
+\subsection{Specifying Unicode Plane}
+
+As there are no existing TFM formats supporting 3-byte or 4-byte character
+encodings, the only way to use Unicode characters other than the BMP is to
+map the code range 0-65535 to different planes via (e.g., to plane 1)
+the \option{-p 1} fontmap option. This option is
+available only when \code{unicode} is specified in the encoding field.
+
+\subsection{OpenType Layout Feature}
+
+The OpenType Layout Feature fontmap options mentioned below are only meaningful
+when \code{unicode} is specified in the encoding field.
+
+With the \option{-w} option, writing mode can be specified.
+\option{-w 1} denotes the font is for vertical writing. It automatically
+enables an OpenType Layout Feature related to vertical writing, namely,
+\code{vert} or \code{vrt2}, to choose proper glyphs for vertical text.
+
+\newfeature{Addition in \TeX\ Live 2017.}
+
+The \option{-l} (lower case el) option can be used to enable various
+OpenType Layout GSUB Features. For example, \option{-l jp04} enables
+\code{jp04} feature to select \lnum{JIS2004} forms for Kanjis.
+Features can be specified as a ``:'' separated list of OpenType Layout
+Feature tags like \option{-l vkna:jp04}. Script and language may be
+additionally specified as
+\option{-l kana.JAN.ruby}.
+
+An example can be
+\begin{lstlisting}
+uprml-v unicode SourceHanSerifJP-Light.otf -w 1 -l jp90
+\end{lstlisting}
+which declares that font should be treated as for vertical writing and
+use \lnum{JIS1990} form for Kanjis.
+
+\begin{figure}
+\centering
+\jpzerofourexamples\hspace{30pt}\jpninezeroexamples%
+\caption{\lnum{JIS2004} vs. \lnum{JIS1990} form.}\label{FIG:jp90}
+\end{figure}
+
+This feature is limited to the single substitution, there are no way to select
+a glyph from multiple candidates, such as in the \code{aalt} feature, and specifying
+general many-to-many glyph substitutions does not take effect.
+
+\section{Other Improvements}
+
+This section briefly describes other improvements made for \dvipdfmx.
+There is an extension to glyph name handling in the \code{enc} file for
+seamless support of both PostScript Type1 and TrueType fonts.
+PostScript Type1 font support is enhanced although this format might be
+considered obsolete.
+
+\subsection{Extended Glyph Name Syntax}
+
+\dvipdfmx\ accepts the following syntax for glyph names in the \code{enc} file:
+\code{uni0130}, \code{zero.onum} and \code{T\_h.liga}.
+Each represents a glyph accessed with Unicode value \code{U+0130},
+oldstyle number for zero and ``Th'' ligature accessed via the OpenType
+Layout GSUB Feature \code{onum} and \code{liga}, respectively.
+Note that \dvipdfmx\ does not understand glyph names which directly
+use a glyph index such as \code{index0102} or \code{gid2104}.
+
+When \dvipdfmx\ encounters a glyph name, e.g., \code{T\_h.liga}, it first looks
+for OpenType \code{post} table if such glyph name exists; if it exists, then
+\dvipdfmx\ simply uses \code{post} table and maps the glyph name to the glyph index;
+if not, \dvipdfmx\ tries to convert \code{T\_h} to a Unicode sequence (U+0054
+U+0068 in this example) via the AGL mapping; then, OpenType \code{cmap} table is used
+to further convert the resulting Unicode sequence to the sequence of glyph indices;
+finally, the OpenType Layout Feature \code{liga} is applied to get the desired glyph.
+
+A glyph name of a form \code{a.swsh2} can be specified to denote the 2nd swash
+variant form of the letter `a'.
+
+\subsection{CFF Conversion}
+
+\dvipdfmx\ supports on-the-fly PostScript Type1 to CFF (Type1C) conversion
+which greatly reduces size of the resulting PDF file when using Type1 fonts.
+Conversion is essentially `lossless' and there should not be any quality loss.
+However, due to differences in the ability of rasterizers, there might be
+noticeable differences on rendering result.
+
+When an older Type1 font is used, \dvipdfmx\ may give the following warning
+message:
+\begin{lstlisting}
+Obsolete four arguments of "endchar" will be used for Type1
+"seac" operator.
+\end{lstlisting}
+It happens when there is an accented character made as a composite glyph using
+the ``seac'' operator.
+This warning is issued as conversion can't be done without relying on the
+\emph{deprecated} usage of the \code{endchar} operator. However, as mentioned in
+``Appendix C Compatibility and Deprecated Operators'' of Adobe Technical
+Note \#5177,
+``\href{http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/font/pdfs/5177.Type2.pdf}{Type 2 Charstring Format}'',
+PDF applications should support this operator and hence this warning
+message can be ignored.
+
+Use of Type1 font should be avoided as much as possible.
+Please consider using OpenType version instead.
+
+\section{Font Licensing}
+
+In OpenType font format, information regarding how a font should be treated
+when creating a document can be recorded.%
+\footnote{See,
+``\href{http://www.microsoft.com/typography/otspec/os2.htm}{OpenType Specification:
+OS/2 -- OS/2 and Windows Metrics Table}''}.
+\dvipdfmx\ uses this information to decide whether font embedding is permitted.
+
+This font licensing information is indicated by the flag called \code{fsType}
+recorded in OpenType font files; each bits representing different restrictions on
+font embedding. If multiple flag bits are set in \code{fsType}, the least restrictive
+license granted takes precedence in \dvipdfmx.
+The \code{fsType} flag bit recognized by \dvipdfmx\ is as follows:
+\begin{itemize}
+ \item Installable embedding
+ \item Editable embedding
+ \item Embedding for Preview \& Print only
+\end{itemize}
+\dvipdfmx\ issues the following warning message for fonts with `Preview \& Print only'
+setting:
+\begin{verbatim}
+ This document contains 'Preview & Print' only licensed font
+\end{verbatim}
+
+For a font with this type of licensing, font embedding is allowed solely for the
+purpose of (on-screen) viewing and/or printing; further editing of the document
+or extracting embedded font data for other purposes are not allowed.
+One way to ensure this condition is to protect your document with a non-empty
+password.
+
+All other flags are treated as more restrictive license than any of
+the above flags and treated as ``No embedding allowed''; e.g., if both
+of the editable-embedding flag and unrecognized license flag is set,
+the font is treated as editable-embedding allowed, however, if only
+unrecognized flags are set, the font is not embedded.
+
+Font Embedding flags are preserved in the embedded font if they are embedded
+as a TrueType font or a CIDFontType2 CID-keyed font.
+For all fonts embedded as a PostScript font (Type1C and CIDFontType0
+CID-keyed font), they are not preserved.
+Only \code{Copyright} and \code{Notice} in the \keyword{FontInfo} dictionary
+are preserved in this case.
+
+Some font vendors put different embedding restrictions for different
+condition; e.g., font embedding might not be permitted for the commercial
+use unless you acquire the ``commercial license'' separately.
+Please read EULA carefully before making decision on the font usage.
+
+See, for example,
+\href{http://www.adobe.com/products/type/font-licensing/font-embedding-permissions.html}{Adobe's site on font embedding permissions}
+for the font in the Adobe Type Library.
+Microsoft also has a
+\href{http://www.microsoft.com/typography/RedistributionFAQ.mspx}{FAQ page on Font Redistribution}.
+
+For Japanese font in general, embedding permission tend to be somewhat
+restrictive. Japanese users should read the statement regarding font
+embedding from Japan Typography Association (in Japanese):\medskip
+
+\url{http://www.typography.or.jp/act/morals/moral4.html}
+\medskip
+
+\dvipdfmx\ does not support full embedding. Only subset embedding is supported.
+
+\chapter{Encryption}
+
+\section{Encryption Support}\label{SEC:encryption}
+
+\dvipdfmx\ offers basic PDF password security support including the 256-bit AES encryption.
+Only the ``Standard'' security handler is supported and the Public-key security handler is not
+supported.
+
+Encryption is enabled by \option{-S} command line option.
+\begin{lstlisting}
+ dvipdfmx -S -K 128 -P 0x14
+\end{lstlisting}
+where \code{-K} and \code{-P} options are used to specify encryption key length and
+permission flags respectively, and are briefly explained in Table~\ref{TABLE:enc-options}.
+
+\begin{table}
+ \centering
+ \begin{tabular}{lp{8cm}}\hline
+ Option & Description \\ \hline\hline
+ \code{-S} & Enable PDF encryption. \\
+ \code{-K} \textit{number} & Set encryption key length. The default value
+ is 40.\\
+ \code{-P} \textit{number} & Set permission flags for PDF encryption.
+ The \textit{number} is a 32-bit unsigned integer representing permission
+ flags.
+ See, Table~\ref{TABLE:flags}. The default value is \code{0x003C}.\\
+ \hline
+ \end{tabular}
+ \caption{Command line options for encryption.}%
+ \label{TABLE:enc-options}
+\end{table}
+
+When \dvipdfmx\ is invoked with encryption via the \code{-S} option,
+passwords will be asked.
+However, in some circumstances, it might be desirable to avoid being prompted for
+passwords. In that case, use the \code{pdf:encrypt} special to supply passwords in
+the \TeX\ file, as,
+\begin{lstlisting}
+ \special{pdf:encrypt userpw (foo) ownerpw (bar) length 128 perm 20}
+\end{lstlisting}
+Here, user and owner passwords are supplied as PDF string objects (\code{foo} and \code{bar}
+in the example above) which can be empty.
+
+Up to two passwords can be specified for a document -- an owner password and a user password.
+If a user attempts to open an encrypted document with user password being set, PDF application
+should prompt for a password. Users are allowed to access the contents of the document only when
+either password is correctly supplied.
+Depending on which password (user or owner) was supplied, additional operations
+allowed for the opened document is determined; full access for users who opened
+with the correct owner password or additional operations
+controlled by permission flags for users who opened with the correct user password.
+
+Although PDF specification allows various character encodings other than \code{US-ASCII}
+for entering password, \dvipdfmx\ is unable to handle it properly.
+Thus it must be assumed that \code{US-ASCII} is used for password strings.
+
+Access permission flags can be specified via \option{-P} command-line option.
+Each bits of (32-bit unsigned) integer number given to this option represents user
+access permissions; e.g., bit position 3 for allowing ``print'', 4 for
+``modify'', 5 for ``copy or extract'', and so on. See, Table~\ref{TABLE:flags}.
+For example, \code{-P 0x34} allows printing, copying and extraction of text, and adding and
+modifying text annotation and filling in interactive form fields (but disallows
+modification of the contents of the document).
+\begin{table}
+ \centering
+ \begin{tabular}{lp{8.3cm}}\hline
+ Bit Position & Meaning \\ \hline\hline
+ 3 & (Revision 2) Print the document. \\
+ & (Revision 3 or greater) Print the document. Print quality depending on bit 12.\\
+ 4 & Modify the contents of the document by operations other than those controlled
+ by bits 6, 9, and 11. \\
+ 5 & Copy or extract text and graphics from the document. \\
+ 6 & Add or modify text annotations, fill in interactive form fields.
+ Creation and modification of interactive form field is also
+ allowed if bit 4 is set.\\
+ 9 & (Revision 3 or greater) Fill in existing interactive form fields
+ (including signature fields), even if bit 6 is clear.\\
+ 10 & \em{Deprecated in PDF 2.0} \\
+ & (Revision 3 or greater) Extract text and graphics (in support of accessibility to
+ users with disabilities or for other purposes).\\
+ 11 & (Revision 3 or greater) Assemble the document
+ (insert, rotate, or delete pages and create document outline items or thumbnail
+ images), even if bit 4 is clear.\\
+ 12 & (Revision 3 or greater) High-quality printing.
+ When this bit is clear (and bit 3 is set), printing shall be limited to a low-level,
+ possibly of degraded quality.\\
+ \hline
+ \end{tabular}
+ \caption{Flag bits and their short explanation.
+ Revision 2 is used when encryption key length is 40 bits or when PDF output
+ version is less than 1.5. Otherwise, Revision 3 or greater is used.}\label{TABLE:flags}
+\end{table}
+
+The \option{-K} option can be used to specify the encryption key length.
+The key length must be multiple of 8 in the range 40 to 128, or 256 (for PDF
+version 1.7 plus Adobe Extension or PDF version 2.0). Please note
+that when key length 256 is specified for PDF version 1.7 output, it requires
+Adobe's Extension to \lnum{PDF-1.7} and hence PDF applications may not support it.
+PDF version 1.4 is required for key length more than 40 bits. AES encryption algorithm requires
+PDF version 1.6.
+
+To show some examples:\\
+128-bit AES encryption with print-only (high-quality) setting,
+\begin{lstlisting}
+ dvipdfmx -V 5 -S -K 128 -P 0x804 input.dvi
+\end{lstlisting}
+256-bit AES encryption with print (low-quality), adding and modifying text annotations
+allowed,
+\begin{lstlisting}
+ dvipdfmx -V 2.0 -S -K 256 -P 0x24 input.dvi
+\end{lstlisting}
+
+The default value for \option{-K} is 40 and for \option{-P} is \code{0x003C0}
+(all bits from bit-position 3 to 6 set).
+
+\chapter{Compatibility}
+
+\section{Incompatible Changes}\label{SEC:compatibility}
+
+There are various minor incompatible changes to \dvipdfm.
+
+The \option{-C} command line option may be used for compatibility to
+\dvipdfm\ or older versions of \dvipdfmx. The \option{-C} option takes flags
+meaning
+\begin{itemize}
+ \item bit position 2: Use semi-transparent filling for tpic shading
+ command, instead of opaque gray color. (requires PDF 1.4)
+ \item bit position 3: Treat all CID-keyed font as fixed-pitch font. This is
+ only for compatibility.
+ \item bit position 4: Do not replace duplicate fontmap entries.
+ \dvipdfm\ behavior.
+ \item bit position 5: Do not optimize PDF destinations. Use this if you
+ want to refer from other files to destinations in the current file.
+ \item bit position 6: Do not use predictor filter for Flate compression.
+ \item bit position 7: Do not use object stream.
+\end{itemize}
+
+The remap option \option{-r} in fontmaps is no longer supported and is
+silently ignored. The command line option \option{-e} to disable partial
+(subset) font embedding is not supported.
+
+\section{Important Changes}
+
+Here is a list of important changes since the \TeX\ Live 2016 release:
+\begin{itemize}
+\item Changes to make PDF/A creation easier: Always write CIDSet and CharSet
+for embedded fonts. Do not compress XMP metadata.
+\item Merge from libdpx for p\TeX-ng by Clerk Ma.
+\item Addition of \code{STHeiti-Regular-Acro} for CJK `Standard' fonts.
+\item Command line option \option{-p} takes precedence over \code{papersize}
+and \code{pagesize} specials.
+\item Fixed serious bugs in supporting `\code{unicode}' encoding:
+OpenType Layout Feature \code{vert} and \code{vrt2} was not enabled.
+Support for format 2 CFF charsets was broken.
+\item Added simplified version of OpenType Layout support: The `\option{-l}'
+option in fontmaps.
+\end{itemize}
+The full \code{ChangeLog} entries can be viewed via the web interface of the
+\TeX\ Live SVN repository:
+\medskip
+
+\url{http://www.tug.org/svn/texlive/trunk/Build/source/texk/dvipdfm-x}
+\medskip
+
+There was an undocumented feature for supporting OpenType Layout but it was
+dropped. Simplified support for the OpenType Layout was introduced instead.
+
+
+%\renewcommand{\refname}{Further Reading}
+\renewcommand{\bibname}{Further Reading}
+\begin{thebibliography}{99}
+\bibitem{DVIPDFM} ``\href{http://mirrors.ctan.org/dviware/dvipdfm/dvipdfm.pdf}%
+{Dvipdfm User's Manual}'' written by Mark~A.~Wicks.
+\bibitem{ADOBE} Adobe's PDF References and a free copy of
+\lnum{ISO 32000-1:2008} standard are available from
+``\href{http://www.adobe.com/devnet/pdf.html}{PDF Technology Center}''
+on \href{http://www.adobe.com/devnet.html}{Adobe Developer Connection}.
+\bibitem{MICROSOFT} The OpenType Specification is available from Microsoft's
+site:
+``\href{http://www.microsoft.com/en-us/Typography/OpenTypeSpecification.aspx}%
+{OpenType Specification}''.
+\bibitem{PNGSPEC} ``\href{https://www.w3.org/TR/2003/REC-PNG-20031110/}%
+{Portable Network Graphics (PNG) Specification (Second Edition)}''.
+\bibitem{CHOF} An article regarding DVI specials: Jin-Hwan Cho,
+``\href{http://www.tug.org/TUGboat/tb30-1/tb94cho.pdf}{DVI specials for PDF generation}'',
+TUGboat, 30(1):6-11, 2009.
+\end{thebibliography}
+
+\appendix
+
+\chapter{GNU Free Documentation License}\label{SEC:FDL}
+
+This document is distributed under the term of the GNU Free Documentation
+License. See, the attached file for copying conditions.%
+\marginnote{%
+\special{pdf:fstream @fileobj (fdl-1.3.txt)}%
+\special{pdf:ann width 10bp height 20bp
+ << /Type /Annot
+ /Subtype /FileAttachment
+ /FS <<
+ /Type /Filespec
+ /F (fdl-1.3.txt)
+ /EF << /F @fileobj >>
+ >>
+ /Name /PushPin
+ /C [0.8 0.2 0.2]
+ /T (GNU Free Documentation License)
+ /Subj (GNU FDL)
+ /Contents (Plain text version of the GNU Free Documentation License.)
+ >>
+}}%
+
+Or, in case that PDF viewers can not extract attached files, please visit the
+following site:
+\medskip
+
+\url{http://www.gnu.org/licenses/fdl.html}
+
+
+\end{document}
diff --git a/systems/doc/dvipdfmx/fdl-1.3.txt b/systems/doc/dvipdfmx/fdl-1.3.txt
new file mode 100644
index 0000000000..2f7e03ca51
--- /dev/null
+++ b/systems/doc/dvipdfmx/fdl-1.3.txt
@@ -0,0 +1,451 @@
+
+ GNU Free Documentation License
+ Version 1.3, 3 November 2008
+
+
+ Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+ <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+0. PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+functional and useful document "free" in the sense of freedom: to
+assure everyone the effective freedom to copy and redistribute it,
+with or without modifying it, either commercially or noncommercially.
+Secondarily, this License preserves for the author and publisher a way
+to get credit for their work, while not being considered responsible
+for modifications made by others.
+
+This License is a kind of "copyleft", which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+
+1. APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work, in any medium, that
+contains a notice placed by the copyright holder saying it can be
+distributed under the terms of this License. Such a notice grants a
+world-wide, royalty-free license, unlimited in duration, to use that
+work under the conditions stated herein. The "Document", below,
+refers to any such manual or work. Any member of the public is a
+licensee, and is addressed as "you". You accept the license if you
+copy, modify or distribute the work in a way requiring permission
+under copyright law.
+
+A "Modified Version" of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A "Secondary Section" is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall
+subject (or to related matters) and contains nothing that could fall
+directly within that overall subject. (Thus, if the Document is in
+part a textbook of mathematics, a Secondary Section may not explain
+any mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The "Invariant Sections" are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License. If a
+section does not fit the above definition of Secondary then it is not
+allowed to be designated as Invariant. The Document may contain zero
+Invariant Sections. If the Document does not identify any Invariant
+Sections then there are none.
+
+The "Cover Texts" are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License. A Front-Cover Text may
+be at most 5 words, and a Back-Cover Text may be at most 25 words.
+
+A "Transparent" copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, that is suitable for revising the document
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup, or absence of markup, has been arranged to thwart
+or discourage subsequent modification by readers is not Transparent.
+An image format is not Transparent if used for any substantial amount
+of text. A copy that is not "Transparent" is called "Opaque".
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML, PostScript or PDF designed for human modification. Examples of
+transparent image formats include PNG, XCF and JPG. Opaque formats
+include proprietary formats that can be read and edited only by
+proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML, PostScript or PDF produced by some word
+processors for output purposes only.
+
+The "Title Page" means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, "Title Page" means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+The "publisher" means any person or entity that distributes copies of
+the Document to the public.
+
+A section "Entitled XYZ" means a named subunit of the Document whose
+title either is precisely XYZ or contains XYZ in parentheses following
+text that translates XYZ in another language. (Here XYZ stands for a
+specific section name mentioned below, such as "Acknowledgements",
+"Dedications", "Endorsements", or "History".) To "Preserve the Title"
+of such a section when you modify the Document means that it remains a
+section "Entitled XYZ" according to this definition.
+
+The Document may include Warranty Disclaimers next to the notice which
+states that this License applies to the Document. These Warranty
+Disclaimers are considered to be included by reference in this
+License, but only as regards disclaiming warranties: any other
+implication that these Warranty Disclaimers may have is void and has
+no effect on the meaning of this License.
+
+2. VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no
+other conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+
+3. COPYING IN QUANTITY
+
+If you publish printed copies (or copies in media that commonly have
+printed covers) of the Document, numbering more than 100, and the
+Document's license notice requires Cover Texts, you must enclose the
+copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a computer-network location from which the general network-using
+public has access to download using public-standard network protocols
+a complete Transparent copy of the Document, free of added material.
+If you use the latter option, you must take reasonably prudent steps,
+when you begin distribution of Opaque copies in quantity, to ensure
+that this Transparent copy will remain thus accessible at the stated
+location until at least one year after the last time you distribute an
+Opaque copy (directly or through your agents or retailers) of that
+edition to the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to
+give them a chance to provide you with an updated version of the
+Document.
+
+
+4. MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+A. Use in the Title Page (and on the covers, if any) a title distinct
+ from that of the Document, and from those of previous versions
+ (which should, if there were any, be listed in the History section
+ of the Document). You may use the same title as a previous version
+ if the original publisher of that version gives permission.
+B. List on the Title Page, as authors, one or more persons or entities
+ responsible for authorship of the modifications in the Modified
+ Version, together with at least five of the principal authors of the
+ Document (all of its principal authors, if it has fewer than five),
+ unless they release you from this requirement.
+C. State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.
+D. Preserve all the copyright notices of the Document.
+E. Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.
+F. Include, immediately after the copyright notices, a license notice
+ giving the public permission to use the Modified Version under the
+ terms of this License, in the form shown in the Addendum below.
+G. Preserve in that license notice the full lists of Invariant Sections
+ and required Cover Texts given in the Document's license notice.
+H. Include an unaltered copy of this License.
+I. Preserve the section Entitled "History", Preserve its Title, and add
+ to it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page. If
+ there is no section Entitled "History" in the Document, create one
+ stating the title, year, authors, and publisher of the Document as
+ given on its Title Page, then add an item describing the Modified
+ Version as stated in the previous sentence.
+J. Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and likewise
+ the network locations given in the Document for previous versions
+ it was based on. These may be placed in the "History" section.
+ You may omit a network location for a work that was published at
+ least four years before the Document itself, or if the original
+ publisher of the version it refers to gives permission.
+K. For any section Entitled "Acknowledgements" or "Dedications",
+ Preserve the Title of the section, and preserve in the section all
+ the substance and tone of each of the contributor acknowledgements
+ and/or dedications given therein.
+L. Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section titles.
+M. Delete any section Entitled "Endorsements". Such a section
+ may not be included in the Modified Version.
+N. Do not retitle any existing section to be Entitled "Endorsements"
+ or to conflict in title with any Invariant Section.
+O. Preserve any Warranty Disclaimers.
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section Entitled "Endorsements", provided it contains
+nothing but endorsements of your Modified Version by various
+parties--for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+
+5. COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice, and that you preserve all their Warranty Disclaimers.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections Entitled "History"
+in the various original documents, forming one section Entitled
+"History"; likewise combine any sections Entitled "Acknowledgements",
+and any sections Entitled "Dedications". You must delete all sections
+Entitled "Endorsements".
+
+
+6. COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other
+documents released under this License, and replace the individual
+copies of this License in the various documents with a single copy
+that is included in the collection, provided that you follow the rules
+of this License for verbatim copying of each of the documents in all
+other respects.
+
+You may extract a single document from such a collection, and
+distribute it individually under this License, provided you insert a
+copy of this License into the extracted document, and follow this
+License in all other respects regarding verbatim copying of that
+document.
+
+
+7. AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, is called an "aggregate" if the copyright
+resulting from the compilation is not used to limit the legal rights
+of the compilation's users beyond what the individual works permit.
+When the Document is included in an aggregate, this License does not
+apply to the other works in the aggregate which are not themselves
+derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one half of
+the entire aggregate, the Document's Cover Texts may be placed on
+covers that bracket the Document within the aggregate, or the
+electronic equivalent of covers if the Document is in electronic form.
+Otherwise they must appear on printed covers that bracket the whole
+aggregate.
+
+
+8. TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License, and all the license notices in the
+Document, and any Warranty Disclaimers, provided that you also include
+the original English version of this License and the original versions
+of those notices and disclaimers. In case of a disagreement between
+the translation and the original version of this License or a notice
+or disclaimer, the original version will prevail.
+
+If a section in the Document is Entitled "Acknowledgements",
+"Dedications", or "History", the requirement (section 4) to Preserve
+its Title (section 1) will typically require changing the actual
+title.
+
+
+9. TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense, or distribute it is void, and
+will automatically terminate your rights under this License.
+
+However, if you cease all violation of this License, then your license
+from a particular copyright holder is reinstated (a) provisionally,
+unless and until the copyright holder explicitly and finally
+terminates your license, and (b) permanently, if the copyright holder
+fails to notify you of the violation by some reasonable means prior to
+60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, receipt of a copy of some or all of the same material does
+not give you any rights to use it.
+
+
+10. FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions of the
+GNU Free Documentation License from time to time. Such new versions
+will be similar in spirit to the present version, but may differ in
+detail to address new problems or concerns. See
+http://www.gnu.org/copyleft/.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License "or any later version" applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation. If the Document
+specifies that a proxy can decide which future versions of this
+License can be used, that proxy's public statement of acceptance of a
+version permanently authorizes you to choose that version for the
+Document.
+
+11. RELICENSING
+
+"Massive Multiauthor Collaboration Site" (or "MMC Site") means any
+World Wide Web server that publishes copyrightable works and also
+provides prominent facilities for anybody to edit those works. A
+public wiki that anybody can edit is an example of such a server. A
+"Massive Multiauthor Collaboration" (or "MMC") contained in the site
+means any set of copyrightable works thus published on the MMC site.
+
+"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
+license published by Creative Commons Corporation, a not-for-profit
+corporation with a principal place of business in San Francisco,
+California, as well as future copyleft versions of that license
+published by that same organization.
+
+"Incorporate" means to publish or republish a Document, in whole or in
+part, as part of another Document.
+
+An MMC is "eligible for relicensing" if it is licensed under this
+License, and if all works that were first published under this License
+somewhere other than this MMC, and subsequently incorporated in whole or
+in part into the MMC, (1) had no cover texts or invariant sections, and
+(2) were thus incorporated prior to November 1, 2008.
+
+The operator of an MMC Site may republish an MMC contained in the site
+under CC-BY-SA on the same site at any time before August 1, 2009,
+provided the MMC is eligible for relicensing.
+
+
+ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+ Copyright (c) YEAR YOUR NAME.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.3
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+ A copy of the license is included in the section entitled "GNU
+ Free Documentation License".
+
+If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+replace the "with...Texts." line with this:
+
+ with the Invariant Sections being LIST THEIR TITLES, with the
+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+
+If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
diff --git a/systems/doc/dvipdfmx/tug2003-slides.pdf b/systems/doc/dvipdfmx/tug2003-slides.pdf
new file mode 100644
index 0000000000..ce1536a718
--- /dev/null
+++ b/systems/doc/dvipdfmx/tug2003-slides.pdf
Binary files differ
diff --git a/systems/doc/dvipdfmx/tug2005.pdf b/systems/doc/dvipdfmx/tug2005.pdf
new file mode 100644
index 0000000000..b82a445b0f
--- /dev/null
+++ b/systems/doc/dvipdfmx/tug2005.pdf
Binary files differ