diff options
author | Karl Berry <karl@freefriends.org> | 2010-11-25 01:44:56 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-11-25 01:44:56 +0000 |
commit | cdb8f75f21deda10ab7bf1e2d345efda5c6765c3 (patch) | |
tree | 342b5cc2e3cb2451e14a980fa01daa91ca0da2f7 /Master/texmf-dist/doc/pdftex/manual | |
parent | 758bc16c67cd2f74d2101fab34d81b1ccffd8a26 (diff) |
pdftex manual 655
git-svn-id: svn://tug.org/texlive/trunk@20555 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/pdftex/manual')
-rw-r--r-- | Master/texmf-dist/doc/pdftex/manual/ChangeLog | 55 | ||||
-rw-r--r-- | Master/texmf-dist/doc/pdftex/manual/Makefile | 21 | ||||
-rw-r--r-- | Master/texmf-dist/doc/pdftex/manual/README | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/pdftex/manual/pdftex-a.pdf | bin | 641300 -> 793010 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/pdftex/manual/pdftex-i.tex | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/pdftex/manual/pdftex-l.pdf | bin | 643584 -> 790859 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/pdftex/manual/pdftex-s.pdf | bin | 850137 -> 1032440 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/pdftex/manual/pdftex-syntax.txt | 44 | ||||
-rw-r--r-- | Master/texmf-dist/doc/pdftex/manual/pdftex-t.tex | 2193 | ||||
-rw-r--r-- | Master/texmf-dist/doc/pdftex/manual/pdftex-t.txt | 38 | ||||
-rw-r--r-- | Master/texmf-dist/doc/pdftex/manual/pdftex-w.pdf | 89 | ||||
-rw-r--r-- | Master/texmf-dist/doc/pdftex/manual/pdftex-w.tex | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/pdftex/manual/syntaxform.awk | 7 |
13 files changed, 1440 insertions, 1024 deletions
diff --git a/Master/texmf-dist/doc/pdftex/manual/ChangeLog b/Master/texmf-dist/doc/pdftex/manual/ChangeLog new file mode 100644 index 00000000000..3d9d49e39c9 --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/manual/ChangeLog @@ -0,0 +1,55 @@ +2010-11-22 Karl Berry <karl@gnu.org> + + * Makefile (distall): use $(distnopdf) instead of duplicating file + list. + + * pdftex-t.tex: Fix \pdfobj example, PDF reference url, + MacTeX much more current than CMacTeX, etc. + From Paul I. + + * pdftex-t.tex: avoid text lines >=80 chars. + No need for ~ after a and an in English. + * pdftex-w.tex: make consistent with pdftex-t.tex. + +2010-11-22 Paul Isambert <zappathustra@free.fr> + + * pdftex-t.tex: fixes for \Something instead of \type + +2010-11-19 Karl Berry <karl@gnu.org> + + * pdftex-t.tex: use \tex{foo} instead of \type{\foo} for bookmarks, + so we get the \'s. + Remove section about truetype details that became a TUB paper, + to avoid duplication. + + * pdftex-w.tex (\pdfobjcompresslevel): must set to 0 explicitly. + Noticed by Paul I. + * pdftex-t.tex (titlepagelines): consequent update. + + * pdftex-t.tex: alphabetize misc new primitives list; typos. + +2010-11-18 Karl Berry <karl@gnu.org> + + * pdftex-t.tex (\pdfretval): minimally document. + +2010-11-16 Karl Berry <karl@gnu.org> + + * pdftex-t.tex: a couple more abbreviations, English, etc. + +2010-11-15 Paul Isambert <zappathustra@free.fr> + + * pdftex-t.tex: more primitives. + +2010-11-14 Karl Berry <karl@gnu.org> + + * All files: expand keywords again, so the manual appears + updated, among other things. + + * Makefile (pdftexversion): 1.40.11 now. + (pdftex-t.txt): set GREP_OPTIONS=--text. + + * pdftex-i.tex: add \pdfmapline for contnav, somehow omitted + from TL for years now. + + * pdftex-t.tex: update intro information about distributions, + etc., to be somewhat more accurate. diff --git a/Master/texmf-dist/doc/pdftex/manual/Makefile b/Master/texmf-dist/doc/pdftex/manual/Makefile index cefb2e4840a..0793a2f7cad 100644 --- a/Master/texmf-dist/doc/pdftex/manual/Makefile +++ b/Master/texmf-dist/doc/pdftex/manual/Makefile @@ -1,20 +1,17 @@ -# $Id: Makefile,v 1.89 2007/01/25 07:18:57 hhenkel Exp $ +# $Id: Makefile 656 2010-11-23 01:20:14Z karl $ # # Makefile for pdfTeX documentation -pdftexversion=1.40.0 +pdftexversion=1.40.11 mandir=manual distdate=`date +%y%m%d` distrev=`awk '/Id:/{print $$4; exit}' $(mandir)/pdftex-t.tex` -distall=pdftex-w.tex pdftex-t.txt pdftex-t.tex \ - pdftex-i.tex syntaxform.awk Makefile makefiles.cmd \ - pdftex-a.pdf pdftex-l.pdf pdftex-s.pdf \ - pdftex-syntax.txt README Changelog +distall=$(distnopdf) pdftex-a.pdf pdftex-l.pdf pdftex-s.pdf distnopdf=pdftex-w.tex pdftex-t.txt pdftex-t.tex \ pdftex-i.tex syntaxform.awk Makefile makefiles.cmd \ - pdftex-syntax.txt README Changelog + pdftex-syntax.txt README ChangeLog all: pdftex-a.pdf \ pdftex-l.pdf \ @@ -23,16 +20,16 @@ all: pdftex-a.pdf \ booklet: pdftex-b.pdf pdftex-b-e.pdf pdftex-b-o.pdf -pdftex-a.pdf: pdftex-t.tex pdftex-t.txt +pdftex-a.pdf a: pdftex-t.tex pdftex-t.txt texexec --result=$@ $< -pdftex-l.pdf: pdftex-t.tex pdftex-t.txt +pdftex-l.pdf l: pdftex-t.tex pdftex-t.txt texexec --mode=letter --result=$@ $< -pdftex-s.pdf: pdftex-t.tex pdftex-i.tex +pdftex-s.pdf s: pdftex-t.tex pdftex-i.tex texexec --mode=screen --result=$@ $< -pdftex-b.pdf: pdftex-a.pdf +pdftex-b.pdf b: pdftex-a.pdf texexec --pdfarrange --paper=a5a4 --print=up --addempty=1,2 \ --result=$@ $< @@ -48,7 +45,7 @@ pdftex-t.txt: pdftex-w.pdf Makefile cat $< \ | expand \ | fmt -s -w36 \ - | grep . \ + | env GREP_OPTIONS=--text grep . \ | expand \ | cat > $@ diff --git a/Master/texmf-dist/doc/pdftex/manual/README b/Master/texmf-dist/doc/pdftex/manual/README index a05731f8ee2..f95b4a3a8a4 100644 --- a/Master/texmf-dist/doc/pdftex/manual/README +++ b/Master/texmf-dist/doc/pdftex/manual/README @@ -1,3 +1,5 @@ +$Id: README 635 2010-11-14 19:15:12Z karl $ + 1. List of pdfTeX documentation files ===================================== @@ -47,14 +49,10 @@ Execute file makefiles.cmd. 3.1 Generating pdftex-syntax.txt from pdftex-t.tex -------------------------------------------------- - pdftex-t.tex --> (awk -f syntaxform.awk) --> pdftex-syntax.txt 3.2 Generating title page of manual ----------------------------------- - pdftex-w.tex --> (pdfetex) --> pdftex-w.pdf --> (expand, fmt, grep) --> pdftex-t.txt - -$Id: README,v 1.23 2006/12/22 23:38:29 hhenkel Exp $ diff --git a/Master/texmf-dist/doc/pdftex/manual/pdftex-a.pdf b/Master/texmf-dist/doc/pdftex/manual/pdftex-a.pdf Binary files differindex 67d0ef9eef2..97f5313094f 100644 --- a/Master/texmf-dist/doc/pdftex/manual/pdftex-a.pdf +++ b/Master/texmf-dist/doc/pdftex/manual/pdftex-a.pdf diff --git a/Master/texmf-dist/doc/pdftex/manual/pdftex-i.tex b/Master/texmf-dist/doc/pdftex/manual/pdftex-i.tex index 1f1bd805cfd..28036649bc7 100644 --- a/Master/texmf-dist/doc/pdftex/manual/pdftex-i.tex +++ b/Master/texmf-dist/doc/pdftex/manual/pdftex-i.tex @@ -1,4 +1,6 @@ -%$Id: pdftex-i.tex,v 1.2 2005/01/06 09:53:43 hahe Exp $ +%$Id: pdftex-i.tex 635 2010-11-14 19:15:12Z karl $ + +\pdfmapline{+contnav ContextNavigation <contnav.pfb} \startmode[screen] \setuppapersize @@ -132,5 +134,3 @@ \setupbackgrounds [page] [background=color] \stopbuffer - - diff --git a/Master/texmf-dist/doc/pdftex/manual/pdftex-l.pdf b/Master/texmf-dist/doc/pdftex/manual/pdftex-l.pdf Binary files differindex 0a4063635b5..7437def1345 100644 --- a/Master/texmf-dist/doc/pdftex/manual/pdftex-l.pdf +++ b/Master/texmf-dist/doc/pdftex/manual/pdftex-l.pdf diff --git a/Master/texmf-dist/doc/pdftex/manual/pdftex-s.pdf b/Master/texmf-dist/doc/pdftex/manual/pdftex-s.pdf Binary files differindex e6f16ad9c47..ce07204bf30 100644 --- a/Master/texmf-dist/doc/pdftex/manual/pdftex-s.pdf +++ b/Master/texmf-dist/doc/pdftex/manual/pdftex-s.pdf diff --git a/Master/texmf-dist/doc/pdftex/manual/pdftex-syntax.txt b/Master/texmf-dist/doc/pdftex/manual/pdftex-syntax.txt index 52dba7785d1..ad1658b8a9e 100644 --- a/Master/texmf-dist/doc/pdftex/manual/pdftex-syntax.txt +++ b/Master/texmf-dist/doc/pdftex/manual/pdftex-syntax.txt @@ -3,7 +3,7 @@ %% pdfTeX documentation file pdftex-t.tex by script syntaxform.awk. %% Used convention for syntax rules is borrowed from `TeXbook naruby' %% by Petr Olsak. -%% $Id: pdftex-t.tex,v 1.675 2007/01/25 10:37:13 hhenkel Exp $ +%% $Id: pdftex-t.tex 655 2010-11-23 00:37:25Z karl $ %% integer registers: \pdfoutput (integer) @@ -20,6 +20,17 @@ \efcode <font> <8-bit number> (integer) \lpcode <font> <8-bit number> (integer) \rpcode <font> <8-bit number> (integer) +\pdfadjustinterwordglue (integer) +\knbscode <font> <8-bit number> (integer) +\stbscode <font> <8-bit number> (integer) +\shbscode <font> <8-bit number> (integer) +\pdfprependkern (integer) +\knbccode <font> <8-bit number> (integer) +\pdfappendkern (integer) +\knaccode <font> <8-bit number> (integer) +\pdfgentounicode (integer) +\tagcode <font> <character code> (integer) +\pdfpagebox (integer) \pdfforcepagebox (integer) \pdfoptionalwaysusepdfpagebox (integer) \pdfinclusionerrorlevel (integer) @@ -28,6 +39,7 @@ \pdfimageapplygamma (integer) \pdfgamma (integer) \pdfimagegamma (integer) +\pdfinclusioncopyfonts (integer) \pdfdraftmode (integer) %% dimen registers: @@ -35,14 +47,15 @@ \pdfvorigin (dimen) \pdfpagewidth (dimen) \pdfpageheight (dimen) -\pdflinkmargin (dimen) -\pdfdestmargin (dimen) -\pdfthreadmargin (dimen) -\pdfpxdimen (dimen) +\pdfignoreddimen (dimen) \pdffirstlineheight (dimen) \pdflastlinedepth (dimen) \pdfeachlineheight (dimen) \pdfeachlinedepth (dimen) +\pdflinkmargin (dimen) +\pdfdestmargin (dimen) +\pdfthreadmargin (dimen) +\pdfpxdimen (dimen) %% token registers: \pdfpagesattr (tokens) @@ -66,9 +79,14 @@ \pdfescapename <general text> (expandable) \pdfescapehex <general text> (expandable) \pdfunescapehex <general text> (expandable) -\tex {ifpdfprimitive} <control sequence> (expandable) -\ifpdfabsnum <number> (expandable) -\ifpdfabsdim <dimen> (expandable) +\ifpdfprimitive <control sequence> (expandable) +\ifincsname (expandable) +\pdfstrcmp <general text> <general text> (expandable) +\pdfmatch [icase] [subcount <number>] + <general text> <general text> (expandable) +\pdflastmatch <integer> (expandable) +\ifpdfabsnum (expandable) +\ifpdfabsdim (expandable) \pdfuniformdeviate <number> (expandable) \pdfnormaldeviate (expandable) \pdfmdfivesum [file] <general text> (expandable) @@ -78,12 +96,15 @@ (expandable) \pdfcolorstackinit [page] [direct] <general text> (expandable) +\pdfinsetht <integer> (expandable) +\pdfximagebbox <integer> <integer> (expandable) %% read-only integers: \pdftexversion (read-only integer) \pdflastobj (read-only integer) \pdflastxform (read-only integer) \pdflastximage (read-only integer) +\pdflastximagecolordepth (read-only integer) \pdflastximagepages (read-only integer) \pdflastannot (read-only integer) \pdflastlink (read-only integer) @@ -92,6 +113,7 @@ \pdflastdemerits (read-only integer) \pdfelapsedtime (read-only integer) \pdfrandomseed (read-only integer) +\pdfretval (read-only integer) \pdfshellescape (read-only integer) %% general commands: @@ -118,6 +140,9 @@ \pdffontattr <font> <general text> \pdftrailer <general text> \pdffontexpand <font> <expand spec> +\letterspacefont <control sequence> <font> <integer> +\pdfcopyfont <control sequence> <font> +\pdfglyphtounicode <general text> <general text> \vadjust [<pre spec>] <filler> { <vertical mode material> } (h, m) \quitvmode \pdfliteral [<pdfliteral spec>] <general text> (h, v, m) @@ -126,8 +151,7 @@ \pdfsetrandomseed <number> \pdfnoligatures <font> \pdfprimitive <control sequence> -\pdfcolorstack <stack number> <stack action> -<general text> +\pdfcolorstack <stack number> <stack action> <general text> \pdfsetmatrix \pdfsave \pdfrestore diff --git a/Master/texmf-dist/doc/pdftex/manual/pdftex-t.tex b/Master/texmf-dist/doc/pdftex/manual/pdftex-t.tex index 08d41e4414d..6c99763f8ea 100644 --- a/Master/texmf-dist/doc/pdftex/manual/pdftex-t.tex +++ b/Master/texmf-dist/doc/pdftex/manual/pdftex-t.tex @@ -1,12 +1,12 @@ % interface=english modes=letter,screen output=pdftex % vim: tw=79 -% $Id: pdftex-t.tex,v 1.675 2007/01/25 10:37:13 hhenkel Exp $ +% $Id: pdftex-t.tex 655 2010-11-23 00:37:25Z karl $ -% The number of lines on the titlepage depends on the kind of -% \PDF\ code that \PDFTEX\ generates. - -\setvariables[pdftex][titlepagelines=55] % 55 should be ok for non-rc* version +% The number of lines on the titlepage depends on exactly +% what \PDF\ code is generated. +% +\setvariables[pdftex][titlepagelines=55] %D We use a multi purpose style (using modes) that enable us %D to generate an A4, letter and screen version. @@ -32,7 +32,7 @@ \setupoutput [pdftex] -%D ConTeXt defaults to 1.5; we want to be backwards compatible (and we don't +%D ConTeXt defaults to 1.5; we want to be maximally compatible (and we don't %D use any features from 1.4++ anyway, do we?) \pdfminorversion=3 @@ -51,7 +51,7 @@ \setupcapitals [title=no] -\def\rcsscan $#1 #2,v #3 #4/#5/#6 #7${ +\def\svnscan $#1 #2 #3 #4-#5-#6 #7${ \def\rcsrevision{#3} \def\rcsyear{#4} \def\rcsmonth{#5} @@ -61,9 +61,9 @@ July\or August\or September\or October\or November\or December\else ERROR\fi} } -\rcsscan $Id: pdftex-t.tex,v 1.675 2007/01/25 10:37:13 hhenkel Exp $ +\svnscan $Id: pdftex-t.tex 655 2010-11-23 00:37:25Z karl $ -\def\currentpdftex{1.40.0} +\def\currentpdftex{1.40.11} %*********************************************************************** @@ -75,11 +75,10 @@ \abbreviation [AFM] {afm} {Adobe Font Metrics} %\abbreviation [AMIGA] {Amiga} {Amiga hardware platform} %\abbreviation [AMIWEB] {AmiWeb2c} {\AMIGA\ distribution} -\abbreviation [BIBTEX] {bib\TeX} {Handles bibliographies} +\abbreviation [BIBTEX] {Bib\TeX} {Handles bibliographies} \abbreviation [ASCII] {ascii} {American Standard Code for Information Interchange} -\abbreviation [CMACTEX] {CMac\TeX} {\MAC\ \WEBC\ distribution} \abbreviation [CONTEXT] {\ConTeXt} {general purpose macro package} -\abbreviation [CTAN] {CTAN} {global \TEX\ archive server} +\abbreviation [CTAN] {ctan} {global \TEX\ archive server} %\abbreviation [DJGPP] {djgpp} {DJ Delorie's \GNU\ Programming Platform} \abbreviation [DVI] {dvi} {native \TEX\ Device Independent file format} \abbreviation [ENCTEX] {enc\TeX} {enc\TeX\ extension to \TEX} @@ -91,19 +90,21 @@ \abbreviation [GHOSTSCRIPT] {Ghostscript} {\PS\ and \PDF\ language interpreter} \abbreviation [GNU] {gnu} {GNU's Not Unix} \abbreviation [HZ] {hz} {Hermann Zapf optimization} +\abbreviation [ISO] {iso} {International Organization for Standardization} \abbreviation [JBIG] {jbig} {Joint Bi-level Image Experts Group} \abbreviation [JBIGTWO] {jbig2} {Joint Bi-level Image Experts Group} \abbreviation [JPEG] {jpeg} {Joint Photographic Experts Group} \abbreviation [LATEX] {\LaTeX} {general purpose macro package} \abbreviation [MAC] {Macintosh} {Macintosh hardware platform} \abbreviation [MACOSX] {Mac\,OS\,X} {Macintosh operating system version 10} +\abbreviation [MACTEX] {Mac\TeX} {\MAC\ \WEBC\ distribution} \abbreviation [MDFIVE] {md5} {MD5 message-digest algorithm} \abbreviation [METAFONT] {\MetaFont} {graphic programming environment, bitmap output} \abbreviation [METAPOST] {\MetaPost} {graphic programming environment, vector output} -\abbreviation [MIKTEX] {MikTeX} {\WIN\ distribution} -\abbreviation [MLTEX] {ML\TeX} {ML\TeX\ extension to \TEX} +\abbreviation [MIKTEX] {MiK\TeX} {\WIN\ distribution} +\abbreviation [MLTEX] {ml\TeX} {ML\TeX\ extension to \TEX} \abbreviation [MPTOPDF] {mptopdf} {\METAPOST\ to \PDF\ conversion tool} -\abbreviation [MSDOS] {MSDos} {Microsoft DOS platform (Intel)} +\abbreviation [MSDOS] {ms-dos} {Microsoft DOS platform (Intel)} \abbreviation [PDFETEX] {pdfe\TeX} {\ETEX\ extension producing \PDF\ output} \abbreviation [PDFLATEX] {pdf\LaTeX} {\TEX\ extension producing \PDF\ output (\LATEX\ format loaded)} \abbreviation [PDFTEX] {pdf\TeX} {\TEX\ extension producing \PDF\ output} @@ -114,10 +115,11 @@ \abbreviation [PGC] {pgc} {\PDF\ Glyph Container} \abbreviation [PK] {pk} {Packed bitmap font} \abbreviation [PNG] {png} {Portable Network Graphics} +\abbreviation [POSIX] {posix} {Portable Operating System Interface} \abbreviation [PROTEXT] {pro\TeX t} {\WIN\ \WEBC\ distribution based on \MIKTEX} \abbreviation [PS] {ps} {PostScript} \abbreviation [POSTSCRIPT] {PostScript} {PostScript} -\abbreviation [PSTOPDF] {PStoPDF} {PostScript to \PDF\ converter (on top of GhostScript)} +\abbreviation [PSTOPDF] {PStoPDF} {PostScript to \PDF\ converter (on top of \GHOSTSCRIPT)} \abbreviation [RGB] {rgb} {Red Green Blue color specification} \abbreviation [TCX] {tcx} {\TEX\ Character Translation} \abbreviation [TDS] {tds} {\TEX\ Directory Standard} @@ -126,7 +128,7 @@ \abbreviation [TEXINFO] {Texinfo} {generate typeset documentation from info pages} \abbreviation [TEXUTIL] {\TeX util} {\CONTEXT\ utility tool} \abbreviation [TEX] {\TeX} {typographic language and program} -\abbreviation [TEXLIVE] {\TeX\ Live} {\TeX-Live distribution (multiple platform)} +\abbreviation [TEXLIVE] {\TeX\ Live} {\TeX\ Live distribution (multiple platform)} \abbreviation [TFM] {tfm} {\TEX\ Font Metrics} \abbreviation [TIF] {tiff} {Tagged Interchange File format} \abbreviation [TUG] {tug} {\TEX\ Users Group} @@ -134,7 +136,7 @@ \abbreviation [URL] {url} {Uniform Resource Locator} \abbreviation [WEBC] {Web2c} {official multi||platform \WEB\ environment} \abbreviation [WEB] {web} {literate programming environment} -\abbreviation [WIN] {Win32} {Microsoft Windows platform} +\abbreviation [WIN] {Windows} {Microsoft Windows platform} \abbreviation [XEMTEX] {XEm\TeX} {\WIN\ \WEBC\ distribution} \abbreviation [ZIP] {zip} {compressed file format} @@ -142,42 +144,27 @@ \def\THANH{H\`an Th\^e\llap{\raise 0.5ex\hbox{\'{}}} Th\`anh} -%D Because they are subjected to changes and spoil the visual appearance of -%D the \TEX\ source, \URL's are defined here. +%D Because they are subjected to change and tend to spoil the visual +%D appearance of the \TEX\ source, \URL's are defined here. \useURL [ptex_org] [http://www.pdftex.org] % links to ptex_examples -\useURL [ptex_ctan] [ctan:systems/pdftex] -%\useURL [ptex_devel] [http://pdftex.sarovar.org/current/] -\useURL [ptex_sarovar] [http://sarovar.org/projects/pdftex/] -%\useURL [ptex_examples] [http://www.tug.org/applications/pdftex/] -\useURL [tex_showcase] [http://www.tug.org/texshowcase] - -\useURL [tetex] [http://www.tug.org/teTeX/] -\useURL [texlive] [http://www.tug.org/tex-live/] -\useURL [ctan_systems] [ctan:systems] -\useURL [win32] [ctan:systems/win32] -%\useURL [amiga] [ctan:systems/amiga/amiweb2c/] - -\useURL [fabrice] [mailto:popineau@supelec.fr] -\useURL [thomas] [mailto:te@dbs.uni-hannover.de] -\useURL [andreas] [mailto:andreas.scherer@pobox.com] -\useURL [christian] [mailto:cschenk@berlin.snafu.de] -\useURL [context] [http://www.pragma-ade.com] -\useURL [pdfreference] [http://www.adobe.com/devnet/pdf/pdf_reference.html] +\useURL [ptex_ctan] [http://mirror.ctan.org/systems/pdftex] +\useURL [ptex_devel] [http://foundry.supelec.fr/gf/project/pdftex] -% where the bug reports should go: -\useURL [ptex_bugs] [mailto:pdftex@tug.org] [] [pdftex@tug.org] +% where bug reports should go: +\useURL [ptex_bugs] [mailto:pdftex@tug.org] [] [pdftex@tug.org] % anything else pdftex related: -\useURL [ptex_list] [mailto:pdftex@tug.org] [] [pdftex@tug.org] +\useURL [ptex_list] [mailto:pdftex@tug.org] [] [pdftex@tug.org] -\useURL [sebastian] [mailto:s.rahtz@elsevier.co.uk] [] [s.rahtz@elsevier.co.uk] -\useURL [sebastian] [mailto:sebastian.rahtz@computing-services.oxford.ac.uk] [] [sebastian.rahtz@computing-services.oxford.ac.uk] -\useURL [thanh] [mailto:thanh@informatics.muni.cz] [] [thanh@informatics.muni.cz] -\useURL [thanh] [mailto:hanthethanh@myrealbox.com] [] [hanthethanh@myrealbox.com] -\useURL [martin] [mailto:martin@pdftex.org] [] [martin@pdftex.org] -\useURL [hans] [mailto:pragma@wxs.nl] [] [pragma@wxs.nl] -\useURL [hartmut] [mailto:hartmut_henkel@gmx.de] [] [hartmut\_henkel@gmx.de] -\useURL [pawel] [mailto:p.jackowski@gust.org.pl] [] [p.jackowski@gust.org.pl] +\useURL [texlive] [http://tug.org/texlive/] +\useURL [ctan_systems] [http://mirror.ctan.org/systems] +\useURL [win32] [http://mirror.ctan.org/systems/win32] +\useURL [context] [http://www.pragma-ade.com] +\useURL [tex_showcase] [http://tug.org/texshowcase] + +\useURL [pdfreference] [http://www.adobe.com/devnet/pdf/pdf_reference.html] +\useURL [thanh_truetype_tub] [http://tug.org/TUGboat/tb30-1/tb94thanh.pdf] +\useURL [jbig2enc] [https://github.com/agl/jbig2enc] %D The primitive definitions are specified a bit fuzzy using the next set of %D commands. Some day I'll write some proper macros to deal with this. @@ -203,10 +190,16 @@ % hyphenates -\def\Something#1{\Sugar{\mathematics{\langle}\prewordbreak{#1}\prewordbreak\mathematics{\rangle}}} +\def\Something#1{\Sugar{\mathematics{\langle}\prewordbreak + {#1}\prewordbreak\mathematics{\rangle}}} + +% Break after these chars in urls, not before. +\sethyphenatedurlafter / +\sethyphenatedurlafter . +\sethyphenatedurlafter _ % introduced -\def\introduced#1{The primitive has been introduced in \PDFTEX\ #1.} +\def\introduced#1{The primitive was introduced in \PDFTEX\ #1.} % to get bookmarks for primitives like \ifpdfprimitive \appendtoks\def\tex#1{\string\\#1}\to\simplifiedcommands @@ -409,7 +402,7 @@ openaction=firstpage, title=the pdfTeX users manual, author={H\`an Th\^e Th\`anh, Sebastian Rahtz, Hans Hagen, Hartmut Henkel, - Pawe\l\ Jackowski, Martin Schröder}] + Pawe\l\ Jackowski, Martin Schr\"oder}] \setupinteractionscreen % still needed? @@ -614,9 +607,8 @@ \vfill \startlines - The title page of this manual - represents the plain \TeX\ coded - text ``Welcome to pdf\TeX !'' + The title page is the result of + this plain \TeX\ text: \stoplines \blank[2*big] \setuptyping[after=] @@ -624,6 +616,8 @@ \starttyping \pdfoutput=1 \pdfcompresslevel=0 + \pdfobjcompresslevel=0 + \pdfmapline{ptmr8r Times-Roman <8r.enc} \font\tenrm=ptmr8r \tenrm Welcome to pdf\TeX! @@ -665,26 +659,27 @@ with the help of \PDF. When \PDF\ output is not selected, \PDFTEX\ produces normal \DVI\ output, otherwise it generates \PDF\ output that looks identical to the \DVI\ output. An important aspect of this project is to investigate alternative justification algorithms (\eg\ -a~font expansion algorithm akin to the \HZ\ micro||typography algorithm by +a font expansion algorithm akin to the \HZ\ micro||typography algorithm by Prof.~Hermann Zapf), optionally making use of Multiple Master fonts. \PDFTEX\ is based on the original \TEX\ sources and \WEBC, and has been -successfully compiled on \UNIX, \WIN\ and \MSDOS\ systems. It is under -active development, with new features trickling in. Great care is taken +successfully compiled on \UNIX, \WIN\ and \MSDOS\ systems. It is +actively maintained, with new features trickling in. Great care is taken to keep new \PDFTEX\ versions backward compatible with earlier ones. -For some years there has been a~\quote {moderate} successor to \TEX\ +For some years there has been a \quote {moderate} successor to \TEX\ available, called \ETEX. Because mainstream macro packages such as \LATEX\ have started supporting this welcome extension, the \ETEX\ functionality has also been integrated into the \PDFTEX\ code. For a while (\TEXLIVE~2004 and~2005) \PDFTEX\ therefore came in two flavours: the \ETEX\ enabled \PDFETEX\ engine and the standard one, \PDFTEX. The -ability to produce both \PDF\ and \DVI\ output made \PDFETEX\ the primary -\TEX\ engine in these distributions. Since \PDFTEX\ version 1.40 now the -\ETEX\ extensions are part already of the \PDFTEX\ engine, so there is -no need anymore to ship \PDFETEX. The \ETEX\ functionality of \PDFTEX\ -can be disabled if not required. Other extensions are \MLTEX\ and \ENCTEX; -these are also included in the current \PDFTEX\ code. +ability to produce both \PDF\ and \DVI\ output made \PDFETEX\ the +primary \TEX\ engine in these distributions. Since \PDFTEX\ version 1.40 +now the \ETEX\ extensions are part already of the \PDFTEX\ engine, so +there is no longer any need to ship \PDFETEX. The \ETEX\ functionality +of \PDFTEX\ can be disabled if not required. Other extensions are +\MLTEX\ and \ENCTEX; these are also included in the current \PDFTEX\ +code. \PDFTEX\ is maintained by \THANH, Martin Schr\"oder, Hans Hagen, Taco Hoekwater, Hartmut Henkel, and others. The \PDFTEX\ homepage is \from @@ -694,7 +689,7 @@ list \from [ptex_bugs]. We thank all readers who send us corrections and suggestions. We also wish to express the hope that \PDFTEX\ will be of as much use to you as it is to us. Since \PDFTEX\ is still being improved and extended, -we suggest you to keep track of updates. +we strongly suggest tracking updates. %*********************************************************************** @@ -704,37 +699,36 @@ This manual revision (\rcsrevision) tries to keep track with the recent \PDFTEX\ development up to version \currentpdftex. Main text updates were done regarding the new configuration scheme, font mapping, and new or updated primitives. The primary repository for the manual and its -sources is at \from[ptex_sarovar]. Copies in \PDF\ format can also be -found at the CTAN network in directory \from[ptex_ctan]. +sources is at \from[ptex_devel]. Copies in \PDF\ format can also be +found on \CTAN\ in \from[ptex_ctan]. -Thanks to Karl Berry for proof reading and submitting a~long changes -list. New errors might have slipped in afterwards by the editor. +Thanks to the many people who have contributed to the manual. +New errors might have slipped in afterwards by the editor. Please send questions or suggestions by email to \from[ptex_bugs]. %*********************************************************************** \subsection{Legal Notice} -Copyright \copyright\ 1996||2007 \THANH. +Copyright \copyright\ 1996||2010 \THANH. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 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 +A copy of the license is included in the section entitled ``GNU Free Documentation License''. %*********************************************************************** \section{About \PDF} -The cover of this manual lists an almost minimal \PDF\ file generated -by \PDFTEX, with the corresponding source file on the next page. Unless -compression is enabled, such a~\PDF\ file is rather verbose and readable. -The first line specifies the version used; currently \PDFTEX\ produces -level 1.4 output by default. \PDF\ viewers are supposed to silently skip -over all elements they cannot handle. +The cover of this manual lists an almost minimal \PDF\ file generated by +\PDFTEX, from the corresponding source on the next page. Since +compression is not enabled, such a \PDF\ file is rather verbose and +readable. The first line specifies the version used. \PDF\ viewers are +supposed to silently skip over all elements they cannot handle. -A~\PDF\ file consists of objects. These objects can be recognized by their +A \PDF\ file consists of objects. These objects can be recognized by their number and keywords: \starttyping @@ -743,17 +737,17 @@ number and keywords: Here \typ{9 0 obj ... endobj} is the object capsule. The first number is the object number. The sequence \type{5 0 R} is an object reference, -a~pointer to another object (no.~5). The second number (here a~zero) +a pointer to another object (no.~5). The second number (here a zero) is currently not used in \PDFTEX; it is the version number of the object. It is for instance used by \PDF\ editors, when they replace objects by new ones. -When a~viewer opens a~\PDF\ file, it goes right to the end of the -file, looking for the keyword \type{startxref}. The number after -\type{startxref} gives the absolute position (byte offset from the -file start) of the so called \quote {object cross-reference table} -that begins with the keyword \type{xref}. This table in turn tells the -byte offsets of all objects that make up the \PDF\ file, providing fast +When a viewer opens a \PDF\ file, it goes to the end of the file, +looking for the keyword \type{startxref}. The number after +\type{startxref} gives the absolute position (byte offset from the file +start) of the so called \quote {object cross-reference table} that +begins with the keyword \type{xref}. This table in turn tells the byte +offsets of all objects that make up the \PDF\ file, providing fast random access to the individual objects (here the \type{xref} table shows 11~objects, numbered from~0 to~10; the object no.~0 is always unused). The actual starting point of the file's object structure is @@ -761,7 +755,7 @@ defined after the \type{trailer}: The \type{/Root} entry points to the \type{/Catalog} object (no.~9). In this object the viewer can find the pointer \type{/Pages} to the page list object (no.~5). In our example we have only one page. The trailer also holds an \type{/Info} entry, which -points to an object (no.~10) with a~bit more about the document. Just +points to an object (no.~10) with a bit more about the document. Just follow the thread: \startnarrower @@ -771,44 +765,44 @@ follow the thread: \type{/Contents} $\longrightarrow$ object~3 \stopnarrower -As soon as we add annotations, a~fancy word for hyperlinks and the like, +As soon as we add annotations, a fancy word for hyperlinks and the like, some more entries will be present in the catalog. We invite users to -take a~look at the \PDF\ code of this file to get an impression of that. +take a look at the \PDF\ code of this file to get an impression of that. -The page content is a~stream of drawing operations. Such a~stream +The page content is a stream of drawing operations. Such a stream can be compressed, where the level of compression can be set with \type {\pdfcompresslevel} (compression is switched off for the title -page). Let's take a~closer look at this stream in object~3. Often -(but not in our example) there is a~transformation matrix, six numbers +page). Let's take a closer look at this stream in object~3. Often +(but not in our example) there is a transformation matrix, six numbers followed by \type{cm}. As in \POSTSCRIPT, the operator comes after the -operands. Between \type{BT} and \type{ET} comes the text. A~font is -selected by a~\type{Tf} operator, which is given a~font resource name +operands. Between \type{BT} and \type{ET} comes the text. A font is +selected by a \type{Tf} operator, which is given a font resource name \type{/F..} and the font size. The actual text goes into \type{()} -bracket pairs so that it creates a~\POSTSCRIPT\ string. The numbers -inbetween bracket pairs provide horizontal movements like spaces and -fine glyph positioning (kerning). When one analyzes a~file produced by -a~less sophisticated typesetting engine, whole sequences of words can +bracket pairs so that it creates a \POSTSCRIPT\ string. The numbers +in bracket pairs provide horizontal movements like spaces and +fine glyph positioning (kerning). When one analyzes a file produced by +a less sophisticated typesetting engine, whole sequences of words can be recognized. In \PDF\ files generated by \PDFTEX\ however, many words -come out rather fragmented, mainly because a~lot of kerning takes place; +come out rather fragmented, mainly because a lot of kerning takes place; in our example the \type{80} moves the text \type{(elcome)} left towards the letter \type{(W)} by 80/1000 of the font size. \PDF\ viewers in search mode simply ignore the kerning information in these text streams. When -a~document is searched, the search engine reconstructs the text from these +a document is searched, the search engine reconstructs the text from these (string) snippets. -Every \type{/Page} object points also to a~\type{/Resources} object +Every \type{/Page} object points also to a \type{/Resources} object (no.~1) that gives all ingredients needed to assemble the page. In our -example only a~\type{/Font} object (no.~4) is referenced, which in turn +example only a \type{/Font} object (no.~4) is referenced, which in turn tells that the text is typeset in \type{/Font} \type{/Times-Roman}. The -\type{/Font} object points also to a~\type{/Widths} array (object no.~7) +\type{/Font} object points also to a \type{/Widths} array (object no.~7) that tells for each character by how much the viewer must move forward -horizontally after typesetting a~glyph. More details about the font -can be found in the \type{/FontDescriptor} object (no.~8); if a~font +horizontally after typesetting a glyph. More details about the font +can be found in the \type{/FontDescriptor} object (no.~8); if a font file is embedded, this object points to the font program stream. But as the Times-Roman font used for our example is one of the 14 so||called standard fonts that should always be present in any \PDF\ viewer and therefore need not be embedded in the \PDF\ file, it is left out here -for brevity. However, when we use for instance a~Computer Modern Roman +for brevity. However, when we use for instance a Computer Modern Roman font, we have to make sure that this font is later available to the \PDF\ viewer, and the best way to do this is to embed the font. @@ -820,35 +814,37 @@ the Minion font). So you never really know how it looks exactly at the viewer side unless you embed every font. In this simple file we don't specify in what way the file should be opened, -for instance full screen or clipped. A~closer look at the page object no.~2 -(\typ{/Type /Page}) shows that a~mediabox (\typ{/MediaBox}) is part of the -page description. A~mediabox acts like the (high-resolution) bounding box -in a~\POSTSCRIPT\ file. \PDFTEX\ users can add dictionary stuff to page +for instance full screen or clipped. A closer look at the page object no.~2 +(\typ{/Type /Page}) shows that a mediabox (\typ{/MediaBox}) is part of the +page description. A mediabox acts like the (high-resolution) bounding box +in a \POSTSCRIPT\ file. \PDFTEX\ users can add dictionary stuff to page objects by the \type{\pdfpageattr} primitive. Although in most cases macro packages will shield users from these internals, \PDFTEX\ provides access to many of the entries described -here, either automatically by translating the \TEX\ data structures -into \PDF\ ones, or manually by pushing entries to the catalog, page, -info or self created objects. One can for instance create an object by -using \type{\pdfobj} after which \type{\pdflastobj} returns the number. So +here, either automatically by translating the \TEX\ data structures into +\PDF\ ones, or manually by pushing entries to the catalog, page, info or +self-created objects. One can for instance create an object by using +\type{\pdfobj} after which \type{\pdflastobj} returns its number. So \starttyping -\pdfobj{/Type /Catalog /Pages 5 0 R} +\pdfobj{<< /Type/ExtGState /LW 2 >>} \stoptyping -inserts an object into the \PDF\ file, while \type{\pdflastobj} -returns the number \PDFTEX\ assigned to this object. Unless objects -are referenced by others, they will just end up as isolated entities, -not doing any real harm but bloating the \PDF\ file. In general this -rather direct way of pushing objects in the \PDF\ files by primitives like -\type{\pdfobj} is not very useful, and only makes sense when implementing, -say, fill||in field support or annotation content reuse. We will come -to that later. +inserts an object into the \PDF\ file (it creates a ``graphics state'' +object setting the line width to 2~units), and \type{\pdflastobj} now +returns the number \PDFTEX\ assigned to this object. Unless objects are +referenced by others, they will just end up as isolated entities, not +doing any real harm but bloating the \PDF\ file. + +In general this rather direct way of pushing objects in the \PDF\ files +by primitives like \type{\pdfobj} is not very useful, and only makes +sense when implementing, say, fill||in field support or annotation +content reuse. We will come to that later. For those who want to learn more about the gory \PDF\ details, the best bet is to read the \PDFReference. As of the time of writing you can -download this book as a~big \PDF\ file from Adobe's PDF Technology Center, +download this book as a big \PDF\ file from Adobe's \PDF\ Technology Center, \from[pdfreference] --- or get the heavy paper version. Those who, after this introduction, feel unsure how to proceed, are @@ -860,23 +856,21 @@ that section, we will describe how to get started with \PDFTEX. \section{Getting started} This section describes the steps needed to get \PDFTEX\ running on -a~system where \PDFTEX\ is not yet installed. Nowadays virtually all \TEX\ -distributions have \PDFTEX\ as a~component, such as \TEXLIVE, \TETEX, -\XEMTEX, \MIKTEX, \PROTEXT, and \CMACTEX. The ready to run \TEXLIVE\ -distribution comes with \PDFTEX\ versions for many \UNIX, \WIN, and -\MACOSX\ systems; more information can be found at \from[texlive]. \TETEX\ -by Thomas Esser is a~source distribution with an automated compilation -process for \UNIX\ systems; see \from[tetex]. For \WIN\ systems there -are also three separate distributions that contain \PDFTEX, all in -\from[win32]: \XEMTEX\ by Fabrice Popineau, \MIKTEX\ by Christian Schenk, -and \PROTEXT\ (based on \MIKTEX) by Thomas Feuerstack. So when you use -any of these distributions, you don't need to bother with the \PDFTEX\ +a system where \PDFTEX\ is not yet installed. Nowadays virtually all +\TEX\ distributions have \PDFTEX\ as a component, such as \TEXLIVE, +\TETEX, \XEMTEX, \MIKTEX, \PROTEXT, and \MACTEX. The ready to run +\TEXLIVE\ distribution comes with \PDFTEX\ versions for many \UNIX, +\WIN, and \MACOSX\ systems; more information can be found at +\hbox{\from[texlive].} There are also \WIN-specific distributions which +contain \PDFTEX, under \from[win32]: \MIKTEX\ by Christian Schenk, and +\PROTEXT\ (based on \MIKTEX) by Thomas Feuerstack. When you use any +of these distributions, you don't need to bother with the \PDFTEX\ installation procedure in the next sections. If there is no precompiled \PDFTEX\ binary for your system, or the version -coming with a~distribution is not the current one and you would like to -try out a~fresh \PDFTEX\ immediately, you will need to build \PDFTEX\ -from sources; read on. You should already have a~working \TEX\ system, +coming with a distribution is not the current one and you would like to +try out a fresh \PDFTEX\ immediately, you will need to build \PDFTEX\ +from sources; read on. You should already have a working \TEX\ system, \eg\ \TEXLIVE\ or \TETEX, into which the freshly compiled \PDFTEX\ will be integrated. Note that the installation description in this manual is \WEBC||specific. @@ -886,16 +880,14 @@ is \WEBC||specific. \subsection{Getting sources and binaries} The latest sources of \PDFTEX\ are currently distributed for compilation -on \UNIX\ systems (including Linux), and \WIN\ systems (Windows 95, -98, NT, 2000, XP). The primary location where one can fetch the latest -released code is at the developers' homepage \from[ptex_sarovar], where -you also find bug tracking information, and the manual sources. Download -the \PDFTEX\ archive from there. +on \UNIX\ systems (including \GNU/Linux), and \WIN\ systems. The +primary home page is \from[ptex_org], where you also find bug tracking +information. Development sources are at \from[ptex_devel]. -The \PDFTEX\ sources can also be found at their canonical place in -the CTAN network, \from[ptex_ctan]. -Separate \PDFTEX\ binaries for various systems might also be available, -check out the subdirectories below \from[ctan_systems]. +The \PDFTEX\ sources can also be found at their canonical place in the +\CTAN\ network, \from[ptex_ctan]. Separate \PDFTEX\ binaries for +various systems might also be available, check out the subdirectories +below \from[ctan_systems]. %*********************************************************************** @@ -904,7 +896,7 @@ check out the subdirectories below \from[ctan_systems]. The compilation is expected to be easy on \UNIX||like systems and can be described best by example. Assuming that the file \filename {pdftex.zip} is downloaded to some working directory, \eg\ -\filename {\$HOME/pdftex}, on a~\UNIX\ system the following steps are +\filename {\$HOME/pdftex}, on a \UNIX\ system the following steps are needed to compile \PDFTEX: \startesctyping @@ -920,7 +912,7 @@ pool file \filename{pdftex.pool} is generated; it's needed for creating the format files. The obsolescent binary \filename{pdfetex} is still generated for backward -compatibility, but since version 1.40 it is just a~file copy +compatibility, but since version 1.40 it is just a file copy of the file \filename{pdftex}. Together with the \filename{pdftex} binary also the \filename{pdftosrc} @@ -934,11 +926,11 @@ The next step is to put the freshly compiled \filename{pdftex}, \filename{pdftosrc}, and \filename{ttf2afm} binaries and the pool file \filename{pdftex.pool} into their proper places within the \TDS\ structure of the \TEX\ system. Put the binary files -into the binary directory (\eg\ for a~typical \TEXLIVE\ system) -\filename{/usr/local/texlive/2006/bin/x86_64-linux}, and the pool file -into \filename{/usr/local/texlive/2006/texmf/web2c}. +into the binary directory (\eg\ for a typical \TEXLIVE\ system) +\filename{/usr/local/texlive/2010/bin/x86_64-linux}, and the pool file +into \filename{/usr/local/texlive/2010/texmf/web2c}. -Don't forget to do a~\filename{texconfig-sys init} afterwards, so that +Don't forget to do a \filename{texconfig-sys init} afterwards, so that all formats are regenerated system-wide with the fresh \filename{pdftex} binary. @@ -949,7 +941,7 @@ binary. \WEBC||based programs, including \PDFTEX, use the \WEBC\ run||time configuration file called \filename {texmf.cnf}. The location of this file is the appropriate position within the \TDS\ tree -relative to the place of the \PDFTEX\ binary; on a~\TEXLIVE\ system, +relative to the place of the \PDFTEX\ binary; on a \TEXLIVE\ system, file \filename{texmf.cnf} typically is located either in directory \filename{texmf/web2c} or \filename{texmf-local/web2c}. The path to file \filename{texmf.cnf} can also be set up by the environment variable @@ -1021,30 +1013,30 @@ and \type{.pfb}). These outline (vector) fonts are to be preferred over bitmap \PK\ fonts. In most cases Type~1 fonts are used and this variable tells \PDFTEX\ where to find them. -\PathDescription {TTFFONTS, OPENTYPEFONTS} Search paths for TrueType -(\type{.ttf}) and OpenType (\type{.otf}) font files. Like Type~1 fonts, -TrueType and OpenType fonts are also outlines. +\PathDescription {TTFONTS,\hfil\break \hbox{OPENTYPEFONTS}} Search paths +for TrueType (\type{.ttf}) and OpenType (\type{.otf}) font files. Like +Type~1 fonts, TrueType and OpenType fonts are also outlines. \PathDescription {PKFONTS} Search path for packed (bitmap) font (\type{.pk}) files. Unfortunately bitmap fonts are still displayed poorly by some \PDF\ viewers, so when possible one should use outline fonts. When no outline -is available, \PDFTEX\ tries to locate a~suitable \PK\ font (or invoke -a~process that generates it). +is available, \PDFTEX\ tries to locate a suitable \PK\ font (or invoke +a process that generates it). %*********************************************************************** \subsection[cfg]{The \PDFTEX\ configuration} One has to keep in mind that, as opposed to \TEX\ with its \DVI\ output, -the \PDFTEX\ program does not require a~separate postprocessing stage -to transform the \TEX\ input into a~\PDF\ file. As a~consequence, all -data needed for building a~ready \PDF\ page must be available +the \PDFTEX\ program does not require a separate postprocessing stage +to transform the \TEX\ input into a \PDF\ file. As a consequence, all +data needed for building a ready \PDF\ page must be available during the \PDFTEX\ run, in particular information on media dimensions and offsets, graphics files for embedding, and font information (font files, encodings). -When \TEX\ builds a~page, it places items relative to the top left page +When \TEX\ builds a page, it places items relative to the top left page corner (the \DVI\ reference point). Separate \DVI\ postprocessors allow specifying the paper size (\eg\ \quote {A4} or \quote{letter}), so that this reference point is moved to the correct position on the paper, @@ -1056,20 +1048,20 @@ the \PDFTEX\ run. As with pages described by \POSTSCRIPT, the \PDF\ reference point is in the lower||left corner. Formerly, these dimensions and other \PDFTEX\ parameters were read -in from a~configuration file named \filename{pdftex.cfg}, which had -a~special (non-\TEX) format, at the start of processing. Nowadays such -a~file is ignored by \PDFTEX. Instead, the page dimensions and offsets, +in from a configuration file named \filename{pdftex.cfg}, which had +a special (non-\TEX) format, at the start of processing. Nowadays such +a file is ignored by \PDFTEX. Instead, the page dimensions and offsets, as well as many other parameters, can be set by \PDFTEX\ primitives during the \PDFTEX\ format building process, so that the settings are dumped into the fresh format and consequently will be used when \PDFTEX\ is later called with that format. All settings from the format can -still be overridden during a~\PDFTEX\ run by using the same primitives. -This new configuration concept is a~more unified approach, as it avoids -the configuration file with a~special format. +still be overridden during a \PDFTEX\ run by using the same primitives. +This new configuration concept is a more unified approach, as it avoids +the configuration file with a special format. -A~list of \PDFTEX\ primitives relevant for setting up the \PDFTEX\ engine +A list of \PDFTEX\ primitives relevant to setting up the \PDFTEX\ engine is given in \in{table}[tbl:configparms]. All primitives are described in -detail within later sections. \in{Figure}[in:pdftexconfig] shows a~recent +detail within later sections. \in{Figure}[in:pdftexconfig] shows a recent configuration file (\type{pdftexconfig.tex}) in \TEX\ format, using the primitives from \in{table}[tbl:configparms], which typically is read in during the format building process. It enables \PDF\ output, sets paper @@ -1092,7 +1084,9 @@ even without setting any parameters. \NC \type{\pdfpkmode} \NC token reg.\NC empty \NC mode set in \type{mktex.cnf} \NC\NR \NC \type{\pdfuniqueresname} \NC integer \NC 0 \NC \NC\NR \NC \type{\pdfprotrudechars} \NC integer \NC 0 \NC \NC\NR +\NC \type{\pdfgentounicode} \NC integer \NC 0 \NC \NC\NR \NC \type{\pdfminorversion} \NC integer \NC 4 \NC \PDF\ 1.4 \NC\NR +\NC \type{\pdfpagebox} \NC integer \NC 0 \NC \NC\NR \NC \type{\pdfforcepagebox} \NC integer \NC 0 \NC \NC\NR \NC \type{\pdfinclusionerrorlevel} \NC integer \NC 0 \NC \NC\NR %----------------------------------------------------------------------- @@ -1100,6 +1094,10 @@ even without setting any parameters. \NC \type{\pdfvorigin} \NC dimension \NC 1\,in \NC \NC\NR \NC \type{\pdfpagewidth} \NC dimension \NC 0\,pt \NC \NC\NR \NC \type{\pdfpageheight} \NC dimension \NC 0\,pt \NC \NC\NR +%\NC \type{\pdffirstlineheight} \NC dimention \NC -1000\,pt \NC \NC\NR +%\NC \type{\pdflastlinedepth} \NC dimention \NC -1000\,pt \NC \NC\NR +%\NC \type{\pdfeachlineheight} \NC dimention \NC -1000\,pt \NC \NC\NR +%\NC \type{\pdfeachlinedepth} \NC dimention \NC -1000\,pt \NC \NC\NR \NC \type{\pdflinkmargin} \NC dimension \NC 0\,pt \NC \NC\NR \NC \type{\pdfdestmargin} \NC dimension \NC 0\,pt \NC \NC\NR \NC \type{\pdfthreadmargin} \NC dimension \NC 0\,pt \NC \NC\NR @@ -1131,10 +1129,10 @@ even without setting any parameters. {A typical configuration file (\filename{pdftexconfig.tex}).} {\getbuffer} -Independent of whether such a~configuration file is read or not, the -first action in a~\PDFTEX\ run is that the program reads the global \WEBC\ +Independent of whether such a configuration file is read or not, the +first action in a \PDFTEX\ run is that the program reads the global \WEBC\ configuration file (\filename{texmf.cnf}), which is common to all programs -in the \WEB2C\ system. This file mainly defines file search paths, the +in the \WEBC\ system. This file mainly defines file search paths, the memory layout (\eg\ pool and hash size), and other general parameters. %*********************************************************************** @@ -1194,16 +1192,16 @@ Format generation is enabled by the \type{-ini} option. The default mode (\DVI\ or \PDF) can be chosen either on the command line by setting the option \type{-output-format} to \type{dvi} or \type{pdf}, or by setting the \type{\pdfoutput} parameter. The format file then inherits -this setting, so that a~later call to \PDFTEX\ with this format starts -in the preselected mode (which still can be overrun then). A~format -file can be read in only by the engine that has generated it; a~format -incompatible with an engine leads to a~fatal error. +this setting, so that a later call to \PDFTEX\ with this format starts +in the preselected mode (which still can be overrun then). A format +file can be read in only by the engine that has generated it; a format +incompatible with an engine leads to a fatal error. It is customary to package the configuration and macro file input -into a~\type{.ini} file. \Eg, the file \type{etex.ini} in +into a \type{.ini} file. \Eg, the file \type{etex.ini} in \in{figure}[in:etexini] is for generating an \ETEX\ format with \DVI\ -output (it contains a~few comparisons to be safe also for \TEX\ engines). -A~similar file \type{pdflatex.ini} can be used for generating a~\LATEX\ +output (it contains a few comparisons to be safe also for \TEX\ engines). +A similar file \type{pdflatex.ini} can be used for generating a \LATEX\ format with \PDF\ output; refer to \in{figure}[in:pdflatexini]. One can see how the primitive \type{\pdfoutput} is used to override the output mode set by file \type{pdftexconfig.tex}. The corresponding @@ -1228,7 +1226,7 @@ pdftex -ini -jobname=pdfelatex *pdflatex.ini pdftex -ini -jobname=pdfelatex -etex pdflatex.ini \stoptyping -In \CONTEXT\ the generation depends on the interface used. A~format using the +In \CONTEXT\ the generation depends on the interface used. A format using the English user interface is generated with \starttyping @@ -1261,16 +1259,16 @@ needs. Whatever macro package used, the formats should be placed in the \type \subsection{Testing the installation} When everything is set up, you can test the installation. In the -distribution there is a~plain \TEX\ test file \filename{samplepdf.tex} +distribution there is a plain \TEX\ test file \filename{samplepdf.tex} in the \type{manual/samplepdf/} directory. Process this file by typing: \starttyping pdftex samplepdf \stoptyping -If the installation is ok, this run should produce a~file called +If the installation is ok, this run should produce a file called \filename{samplepdf.pdf}. The file \filename {samplepdf.tex} is also -a~good place to look for how to use \PDFTEX's primitives. +a good place to look for how to use \PDFTEX's primitives. %*********************************************************************** @@ -1281,7 +1279,7 @@ something cannot be found. In such cases make sure that \type{TEXMFCNF} is set correctly, so \PDFTEX\ can find \filename {texmf.cnf}. The next best place to look|/|edit is the file \type{texmf.cnf}. When still in deep trouble, set \type{KPATHSEA_DEBUG=255} before running \PDFTEX\ or run -\PDFTEX\ with option \type{-k 255}. This will cause \PDFTEX\ to write a~lot +\PDFTEX\ with option \type{-k 255}. This will cause \PDFTEX\ to write a lot of debugging information that can be useful to trace problems. More options can be found in the \WEBC\ documentation. @@ -1295,7 +1293,7 @@ getting started: \type{TEXMFCNF} is not set correctly and so \PDFTEX\ cannot find \type{texmf.cnf}, or \type{TEXPOOL} in \filename {texmf.cnf} - doesn't contain a~path to the pool file \filename {pdftex.pool}. + doesn't contain a path to the pool file \filename {pdftex.pool}. \head \type{You have to increase POOLSIZE.} @@ -1320,7 +1318,7 @@ pool_size=500000 \type{Fatal format file error; I'm stymied} This appears \eg\ if you forgot to regenerate the \type{.fmt} - files after installing a~new version of the \PDFTEX\ binary and + files after installing a new version of the \PDFTEX\ binary and \filename {pdftex.pool}. The first line tells by which engine the offending format was generated. @@ -1328,7 +1326,7 @@ pool_size=500000 \type{TEX.POOL doesn't match; TANGLE me again (or fix the path).} This might appear if you forgot to install the proper \filename - {pdftex.pool} when installing a~new version of the \PDFTEX\ + {pdftex.pool} when installing a new version of the \PDFTEX\ binary. \Eg\ under \TEXLIVE\ then run \type{texconfig-sys init} as root. @@ -1344,20 +1342,20 @@ pool_size=500000 TrueType or OpenType fonts, or some image file. Make sure that the required file exists and the corresponding variable - in \filename {texmf.cnf} contains a~path to the file. See above which + in \filename {texmf.cnf} contains a path to the file. See above which variables \PDFTEX\ needs apart from the ones \TEX\ uses. When you have installed new fonts, and your \PDF\ viewer complains - about missing fonts, you should take a~look at the log file produced + about missing fonts, you should take a look at the log file produced by \PDFTEX. Missing fonts, map files, encoding vectors as well as missing characters (glyphs) are reported there. \stopitemize -Normally the page content takes one object. This means that one seldomly -finds more than a~few hundred objects in a~simple file. This \PDFTEX\ +Normally the page content takes one object. This means that one seldom +finds more than a few hundred objects in a simple file. This \PDFTEX\ manual for instance uses approx.~750 objects. In more complex applications -this number can grow quite rapidly, especially when one uses a~lot of +this number can grow quite rapidly, especially when one uses a lot of widget annotations, shared annotations or other shared things. In any case \PDFTEX's internal object table size will automatically grow to the required size (the parameter \type{obj_tab_size} for manual control of @@ -1368,17 +1366,17 @@ the object table size is now obsolete and ignored). \section{Macro packages supporting \PDFTEX} As \PDFTEX\ generates the final \PDF\ output without help of -a~postprocessor, macro packages that take care of these \PDF\ features +a postprocessor, macro packages that take care of these \PDF\ features have to be set up properly. Typical tasks are handling color, graphics, hyperlink support, threading, font||inclusion, as well as page imposition and manipulation. All these \PDF||specific tasks can be -commanded by \PDFTEX's own primitives (a few also by a~\PDFTEX||specific +commanded by \PDFTEX's own primitives (a few also by a \PDFTEX||specific \type{\special{pdf: ...}} primitive). Any other \type{\special{}} commands, like the ones defined for various \DVI\ postprocessors, are simply -ignored by \PDFTEX\ when in \PDF\ output mode; a~warning is given only +ignored by \PDFTEX\ when in \PDF\ output mode; a warning is given only for non||empty \type{\special{}} commands. -When a~macro package already written for classical \TEX\ with \DVI\ output +When a macro package already written for classical \TEX\ with \DVI\ output is to be modified for use with \PDFTEX, it is very helpful to get some insight to what extent \PDFTEX||specific support is needed. This info can be gathered \eg\ by outputting the various \type{\special} commands @@ -1396,7 +1394,7 @@ or, if this leads to confusion, and see what happens. As soon as one \quote {special} message turns up, one knows for sure that some kind of \PDFTEX\ specific support is needed, and -often the message itself gives a~indication of what is needed. +often the message itself gives a indication of what is needed. Currently all mainstream macro packages offer \PDFTEX\ support, with automatic detection of \PDFTEX\ as engine. So there is normally no need @@ -1404,7 +1402,7 @@ to turn on \PDFTEX\ support explicitly. \startitemize -\item For \LATEX\ users, Sebastian Rahtz' and Heiko Oberdiek's \type +\item For \LATEX\ users, Sebastian Rahtz and Heiko Oberdiek's \type {hyperref} package has substantial support for \PDFTEX\ and provides access to most of its features. In the simplest and most common case, the user merely needs to load \type{hyperref}, @@ -1419,7 +1417,7 @@ to turn on \PDFTEX\ support explicitly. \item The \CONTEXT\ macro package by Hans Hagen has very full support for \PDFTEX\ in its generalized hypertext features. Support for - \PDFTEX\ is implemented as a~special driver, and is invoked by + \PDFTEX\ is implemented as a special driver, and is invoked by typing \type{\setupoutput[pdftex]} or feeding \TEXEXEC\ with the \type{--pdf} option. @@ -1427,7 +1425,7 @@ to turn on \PDFTEX\ support explicitly. the \TEXINFO\ file, instead of \TEX. Alternatively, run the shell command \type{texi2pdf} instead of \type{texi2dvi}. -\item A~small modification of \filename {webmac.tex}, called \filename +\item A small modification of \filename {webmac.tex}, called \filename {pdfwebmac.tex}, allows production of hyperlinked \PDF\ versions of the program code written in \WEB. @@ -1448,7 +1446,7 @@ fonts if an equivalent is available in Type~1 or TrueType format, if only because bitmap Type~3 fonts render very poorly in (older versions of) Adobe Reader. Given the free availability of Type~1 versions of all the Computer Modern fonts, and the ability to use standard \POSTSCRIPT\ -fonts, there is rarely a~need to use bitmap fonts in \PDFTEX. +fonts, there is rarely a need to use bitmap fonts in \PDFTEX. %*********************************************************************** @@ -1478,7 +1476,7 @@ the following fields (some are optional; explanations follow): \stopnarrower It is mandatory that {\em tfmname} is the first field. If -a~{\em basename} is given, it must be the second field. Similarly if +a {\em basename} is given, it must be the second field. Similarly if {\em fontflags} is given it must be the third field (if {\em basename} is present) or the second field (if {\em basename} is left out). It is possible to mix the positions of {\em special}, {\em encodingfile}, @@ -1487,7 +1485,7 @@ fixed order. \startdescription {tfmname} -sets the name of the \TFM\ file for a~font --- the name \TEX\ sees. +sets the name of the \TFM\ file for a font --- the name \TEX\ sees. This name must always be given. @@ -1497,21 +1495,21 @@ be given. sets the (\POSTSCRIPT) base font name, which has two uses: -First, when a~\PDF\ file is embedded by \type{\pdfximage}, the +First, when a \PDF\ file is embedded by \type{\pdfximage}, the \type{/BaseFont} names in the font dictionaries of Type~1 and Type~1C (CFF) fonts from the embedded \PDF\ file are checked against this {\em basename} field. If names match, the glyphs of that font will not be -copied from the embedded \PDF\ file, but instead a~local font is opened, +copied from the embedded \PDF\ file, but instead a local font is opened, and all needed glyphs will be taken from the Type~1 font file that is mentioned in the map line (see {\em fontfile} below). By this collecting mechanism Type~1 glyphs can be shared between several embedded \PDF\ -files and with text that is typeset by \pdfTeX, which helps keeping the +files and with text that is typeset by \PDFTEX, which helps keeping the resulting \PDF\ file size small, if many files with similar Type~1(C) fonts are embedded. Replacing Type1 fonts from embedded \PDF\ files -requires that also a~Type1 font file name is in the {\em fontfile} field +requires that also a Type1 font file name is in the {\em fontfile} field (see below). -Second, if a~font file is not to be embedded into the \PDF\ output +Second, if a font file is not to be embedded into the \PDF\ output ({\em fontfile} field missing), then the {\em basename} field will be copied to the \type{/BaseFont} and \type{/FontName} dictionary entries in the \PDF\ file, so that the \POSTSCRIPT\ font name will be known to @@ -1527,13 +1525,13 @@ strictly speaking it's optional). specify some characteristics of the font. The following description of these flags is taken, with slight modification, from the \PDFReference\ (the section on font descriptor flags). Viewers can adapt their rendering -to these flags, especially when they substitute a~non-embedded font by +to these flags, especially when they substitute a non-embedded font by some own approximation. \startnarrower -The value of the flags key in a~font descriptor is a~32||bit integer that -contains a~collection of boolean attributes. These attributes are true if the +The value of the flags key in a font descriptor is a 32||bit integer that +contains a collection of boolean attributes. These attributes are true if the corresponding bit is set to~1. \in{Table}[flags] specifies the meanings of the bits, with bit~1 being the least significant. Reserved bits must be set to zero. @@ -1564,28 +1562,28 @@ to zero. {The meaning of flags in the font descriptor.} {\getbuffer} -All characters in a~{\em fixed||width} font have the same width, while -characters in a~proportional font have different widths. Characters in a~{\em +All characters in a {\em fixed||width} font have the same width, while +characters in a proportional font have different widths. Characters in a {\em serif font} have short strokes drawn at an angle on the top and bottom of -character stems, while sans serif fonts do not have such strokes. A~{\em +character stems, while sans serif fonts do not have such strokes. A {\em symbolic font} contains symbols rather than letters and numbers. Characters -in a~{\em script font} resemble cursive handwriting. An {\em all||cap} font, +in a {\em script font} resemble cursive handwriting. An {\em all||cap} font, which is typically used for display purposes such as titles or headlines, -contains no lowercase letters. It differs from a~{\em small||cap} font in +contains no lowercase letters. It differs from a {\em small||cap} font in that characters in the latter, while also capital letters, have been sized and their proportions adjusted so that they have the same size and stroke weight as lowercase characters in the same typeface family. Bit~6 in the flags field indicates that the font's character set conforms to the -Adobe Standard Roman Character Set, or a~subset of that, and that it uses +Adobe Standard Roman Character Set, or a subset of that, and that it uses the standard names for those characters. Finally, bit~19 is used to determine whether or not bold characters are drawn with extra pixels even at very small text sizes. Typically, when characters are drawn at small sizes on very low resolution devices such as display screens, features of bold characters may appear only one pixel -wide. Because this is the minimum feature width on a~pixel||based device, +wide. Because this is the minimum feature width on a pixel||based device, ordinary non||bold characters also appear with one||pixel wide features, and thus cannot be distinguished from bold characters. If bit~19 is set, features of bold characters may be thickened at small text sizes. @@ -1593,8 +1591,8 @@ features of bold characters may be thickened at small text sizes. \stopnarrower If the {\em fontflags} field is not given, \PDFTEX\ treats it as being~4, -a~symbolic font. If you do not know the correct value, it is best not -to specify it at all, as specifying a~bad value of font flags may cause +a symbolic font. If you do not know the correct value, it is best not +to specify it at all, as specifying a bad value of font flags may cause troubles in viewers. On the other hand this option is not absolutely useless because it provides backward compatibility with older map files (see the {\em fontfile} description below). @@ -1623,7 +1621,7 @@ identical to that used by \type{dvips}. If no encoding is specified, the font's built||in default encoding is used. The {\em encodingfile} field may be omitted if you are sure that the font resource has the correct built||in encoding. In general this option is highly recommended, -and it is {\em required} when subsetting a~TrueType font. +and it is {\em required} when subsetting a TrueType font. \stopdescription @@ -1632,10 +1630,10 @@ and it is {\em required} when subsetting a~TrueType font. sets the name of the font file to be embedded into the \PDF\ output for a given \TeX\ font (the {\em tfmname}~$\longleftrightarrow$~{\em fontfile} mapping is the most prominent use of the \filename{pdftex.map} file). -The font file name must belong to a~Type~1 or TrueType font file. If +The font file name must belong to a Type~1 or TrueType font file. If the {\em fontfile} field is missing, no font embedding can take place; in case the {\em basename} field does not contain one of the 14 standard -font names also a~warning will be given. Not embedding a~font into a~\PDF\ +font names also a warning will be given. Not embedding a font into a \PDF\ file might be troublesome, as it requires that the font or some similar looking replacement font is available within the \PDF\ viewer, so that it can render the glyphs with its own font version. @@ -1645,15 +1643,15 @@ which tells how to handle the font file: \startitemize -\item If the font file name is preceded by a~\type{<} character, the +\item If the font file name is preceded by a \type{<} character, the font file will be only partially embedded into the \PDF\ file (``subsetted''), meaning that only used glyphs are going into the \PDF\ file. This is the most common use and is {\em strongly recommended} for any font, as it ensures the portability and reduces the size of the \PDF\ output. Subsetted fonts are included - in such a~way that name and cache clashes are minimized. + in such a way that name and cache clashes are minimized. -\item If the font file name is preceded by a~double \type{<<}, the font +\item If the font file name is preceded by a double \type{<<}, the font file will be included entirely --- all glyphs of the font are embedded, including even the ones that are not used in the document. Apart from causing large size \PDF\ output, this option @@ -1666,10 +1664,10 @@ which tells how to handle the font file: \item The case that no special character precedes the font file name is deprecated since \PDFTEX\ version 1.40.0. These font files are - now completely ignored, and a~corresponding warning is given. You + now completely ignored, and a corresponding warning is given. You achieve exactly the same \PDF\ result if you just remove the font file name from the map entry. Then the glyph widths that go - into the \PDF~file are extracted from the \TFM~file, and a~font + into the \PDF~file are extracted from the \TFM~file, and a font descriptor object is created that contains approximations of the font metrics for the selected font. @@ -1681,24 +1679,24 @@ which tells how to handle the font file: or printed. To use this feature, the font flags {\em must} be specified, and it must have the bit~6 set on, which means that only fonts with the Adobe Standard Roman Character Set can be - simulated. The only exception is the case of a~Symbolic font, + simulated. The only exception is the case of a Symbolic font, which is not very useful. \stopitemize When one suffers from invalid lookups, for instance when \PDFTEX\ tries -to open a~\type{.pfa} file instead of a~\type{.pfb} one, one can add +to open a \type{.pfa} file instead of a \type{.pfb} one, one can add the suffix to the filename. In this respect, \PDFTEX\ completely relies on the \type{kpathsea} libraries. \stopdescription %HE Huh? pgc? -If a~used font is not present in the map files, first \PDFTEX\ will -look for a~source with suffix \type{.pgc}, which is a~so||called \PGC\ -source (\PDF\ Glyph Container) \footnote {This is a~text file containing -a~\PDF\ Type~3 font, created by \METAPOST\ using some utilities by Hans -Hagen. In general \PGC\ files can contain whatever is allowed in a~\PDF\ page +If a used font is not present in the map files, first \PDFTEX\ will +look for a source with suffix \type{.pgc}, which is a so||called \PGC\ +source (\PDF\ Glyph Container) \footnote {This is a text file containing +a \PDF\ Type~3 font, created by \METAPOST\ using some utilities by Hans +Hagen. In general \PGC\ files can contain whatever is allowed in a \PDF\ page description, which may be used to support fonts that are not available in \METAFONT. \PGC\ fonts are not widely useful, as vector Type~3 fonts are not displayed very well in older versions of Acrobat Reader, but may @@ -1708,10 +1706,10 @@ drivers do, creating \PK~fonts on||the||fly if needed. Lines containing nothing apart from {\em tfmname} stand for scalable Type~3 fonts. For scalable fonts as Type~1, TrueType and scalable Type~3 -font, all the fonts loaded from a~\TFM\ at various sizes will be included -only once in the \PDF\ output. Thus if a~font, let's say \type{csr10}, is +font, all the fonts loaded from a \TFM\ at various sizes will be included +only once in the \PDF\ output. Thus if a font, let's say \type{csr10}, is described in one of the map files, then it will be treated as scalable. As -a~result the font source for csr10 will be included only once for +a result the font source for csr10 will be included only once for \type{csr10}, \type{csr10 at 12pt} etc. So \PDFTEX\ tries to do its best to avoid multiple embedding of identical font sources. Thus vector \PGC\ fonts should be specified as scalable Type~3 in map files like: @@ -1720,16 +1718,16 @@ fonts should be specified as scalable Type~3 in map files like: csr10 \stoptyping -It doesn't hurt much if a~scalable Type~3 font is not given in map files, +It doesn't hurt much if a scalable Type~3 font is not given in map files, except that the font source will be embedded into the \PDF\ file multiple -times for various sizes, which causes a~much larger \PDF\ output. On -the other hand if a~font in the map files is defined as scalable Type~3 +times for various sizes, which causes a much larger \PDF\ output. On +the other hand if a font in the map files is defined as scalable Type~3 font and its \PGC\ source is not scalable or not available, \PDFTEX\ will use \PK\ fonts instead; the \PDF\ output is still valid but some fonts may look ugly because of the scaled bitmap. To summarize this rather confusing story, we include some example lines. -The most common way is to embed only a~glyph subset from a~font like this, +The most common way is to embed only a glyph subset from a font like this, with re||encoding: \starttyping @@ -1742,7 +1740,7 @@ Without re||encoding it looks like this: cmr10 CMR10 <cmr10.pfb \stoptyping -A~SlantFont is specified similarly as for \type{dvips}. The \type +A SlantFont is specified similarly as for \type{dvips}. The \type {SlantFont} or \type{ExtendFont} entries work only with embedded Type1 fonts: @@ -1751,14 +1749,14 @@ psyro StandardSymL ".167 SlantFont" <usyr.pfb pcrr8rn Courier ".85 ExtendFont" <8r.enc <pcrr8a.pfb \stoptyping -Entirely embed a~font into the \PDF\ file without and with re||encoding: +Entirely embed a font into the \PDF\ file without and with re||encoding: \starttyping fmvr8x MarVoSym <<marvosym.pfb pgsr8r GillSans <8r.enc <<pgsr8a.pfb \stoptyping -A~TrueType font can be used in the same way as a~Type~1 font: +A TrueType font can be used in the same way as a Type~1 font: \starttyping verdana8r Verdana <8r.enc <verdana.ttf @@ -1791,7 +1789,7 @@ If in doubt, always embed all fonts, even the 14 standard ones. As mentioned above, \PDFTEX\ can work with TrueType fonts. Defining TrueType fonts is similar to Type~1. The only extra thing to do -with TrueType is to create a~\TFM\ file. There is a~program called +with TrueType is to create a \TFM\ file. There is a program called \type{ttf2afm} in the \PDFTEX\ distribution which can be used to extract \AFM\ from TrueType fonts (another conversion program is \type{ttf2pt1}). Usage of \type{ttf2afm} is simple: @@ -1800,16 +1798,16 @@ extract \AFM\ from TrueType fonts (another conversion program is ttf2afm -e <encoding vector> -o <afm outputfile> <ttf input file> \stoptyping - A~TrueType file can be recognized by its suffix \filename {ttf}. The optional +A TrueType file can be recognized by its suffix \filename {ttf}. The optional {\em encoding} specifies the encoding, which is the same as the encoding vector used in map files for \PDFTEX\ and \type{dvips}. If the encoding is not given, all the glyphs of the \AFM\ output will be mapped to \type {/.notdef}. \type{ttf2afm} writes the output \AFM\ to standard output. If we need to know which glyphs are available in the font, we can run \type {ttf2afm} without encoding to get all glyph names. The resulting \AFM\ file -can be used to generate a~\TFM\ one by applying \filename {afm2tfm}. +can be used to generate a \TFM\ one by applying \filename {afm2tfm}. -To use a~new TrueType font the minimal steps may look like below. We suppose +To use a new TrueType font the minimal steps may look like below. We suppose that \filename {test.map} is used. \starttyping @@ -1818,33 +1816,45 @@ afm2tfm times.afm -T 8r.enc echo "times TimesNewRomanPSMT <8r.enc <times.ttf" >>test.map \stoptyping -There are a~few limitations with TrueType fonts in comparison with +There are a few limitations with TrueType fonts in comparison with Type~1 fonts: \startitemize[a,packed] -\item The special effects SlantFont|/|ExtendFont cannot be used. -\item To subset a~TrueType font, the font must be specified as re||encoded, +\item The special effects SlantFont|/|ExtendFont did not work + before version 1.40.0. +\item To subset a TrueType font, the font must be specified as re||encoded, therefore an encoding vector must be given. \item TrueType fonts coming with embedded \PDF\ files are kept untouched; they are not replaced by local ones. \stopitemize +For much more about \PDFTEX\ and TrueType fonts, including many details +on handling glyph names, see ``A closer look at TrueType fonts and +\PDFTEX'', {\em TUGboat} 30:1 (2009), pp.~32||34, \from[thanh_truetype_tub] + %*********************************************************************** \section{Formal syntax specification} This section formally specifies the \PDFTEX\ specific extensions to -the \TEX\ macro programming language. All primitives are prefixed by -\type {pdf} except for \type{\efcode}, \type{\lpcode}, \type{\rpcode}, -\type{\leftmarginkern}, and \type{\rightmarginkern}. The general -definitions and syntax rules follow after the list of primitives. +the \TEX\ macro programming language. Most primitives are prefixed +by \type{pdf}. +%All primitives are prefixed by +%\type {pdf} except for \type{\efcode}, \type{\lpcode}, \type{\rpcode}, +%\type{\leftmarginkern}, \type{\rightmarginkern}, \type{\letterspacefont} +%and the new conditionals (which begin with \type{ifpdf}). +The general definitions and syntax rules follow after the list of primitives. + +Two new units of measure were introduced in \PDFTEX\ 1.30.0: the +new Didot (1\,nd~=~0.375\,mm) and the new Cicero (1\,nc~=~12\,nd) +(the former was proposed by \ISO\ in 1975). %%S This is the list of new or extended primitives provided by pdftex. %%S Don't edit this file, as it is now auto-generated from the %%S pdfTeX documentation file pdftex-t.tex by script syntaxform.awk. %%S Used convention for syntax rules is borrowed from `TeXbook naruby' %%S by Petr Olsak. -%%S $Id: pdftex-t.tex,v 1.675 2007/01/25 10:37:13 hhenkel Exp $ +%%S $Id: pdftex-t.tex 655 2010-11-23 00:37:25Z karl $ %%S NL %%S integer registers: @@ -1913,6 +1923,50 @@ definitions and syntax rules follow after the list of primitives. } \Syntax { +\Tex {\pdfadjustinterwordglue} \Whatever{integer} +} + +\Syntax { +\Tex {\knbscode} \Something{font} \Something{8-bit number} \Whatever{integer} +} + +\Syntax { +\Tex {\stbscode} \Something{font} \Something{8-bit number} \Whatever{integer} +} + +\Syntax { +\Tex {\shbscode} \Something{font} \Something{8-bit number} \Whatever{integer} +} + +\Syntax { +\Tex {\pdfprependkern} \Whatever{integer} +} + +\Syntax { +\Tex {\knbccode} \Something{font} \Something{8-bit number} \Whatever{integer} +} + +\Syntax { +\Tex {\pdfappendkern} \Whatever{integer} +} + +\Syntax { +\Tex {\knaccode} \Something{font} \Something{8-bit number} \Whatever{integer} +} + +\Syntax { +\Tex {\pdfgentounicode} \Whatever{integer} +} + +\Syntax { +\Tex {\tagcode} \Something{font} \Something{character code} \Whatever{integer} +} + +\Syntax { +\Tex {\pdfpagebox} \Whatever{integer} +} + +\Syntax { \Tex {\pdfforcepagebox} \Whatever{integer} } @@ -1944,6 +1998,11 @@ definitions and syntax rules follow after the list of primitives. \Tex {\pdfimagegamma} \Whatever{integer} } + +\Syntax { +\Tex {\pdfinclusioncopyfonts} \Whatever{integer} +} + \Syntax { \Tex {\pdfdraftmode} \Whatever{integer} } @@ -1974,39 +2033,40 @@ definitions and syntax rules follow after the list of primitives. } \Syntax { -\Tex {\pdflinkmargin} \Whatever{dimen} +\Tex {\pdfignoreddimen} \Whatever{dimen} } \Syntax { -\Tex {\pdfdestmargin} \Whatever{dimen} +\Tex {\pdffirstlineheight} \Whatever{dimen} } \Syntax { -\Tex {\pdfthreadmargin} \Whatever{dimen} +\Tex {\pdflastlinedepth} \Whatever{dimen} } \Syntax { -\Tex {\pdfpxdimen} \Whatever{dimen} +\Tex {\pdfeachlineheight} \Whatever{dimen} } -% todo: -\iffalse \Syntax { -\Tex {\pdffirstlineheight} \Whatever{dimen} +\Tex {\pdfeachlinedepth} \Whatever{dimen} } \Syntax { -\Tex {\pdflastlinedepth} \Whatever{dimen} +\Tex {\pdflinkmargin} \Whatever{dimen} } \Syntax { -\Tex {\pdfeachlineheight} \Whatever{dimen} +\Tex {\pdfdestmargin} \Whatever{dimen} } \Syntax { -\Tex {\pdfeachlinedepth} \Whatever{dimen} +\Tex {\pdfthreadmargin} \Whatever{dimen} +} + +\Syntax { +\Tex {\pdfpxdimen} \Whatever{dimen} } -\fi \stoppacked @@ -2106,18 +2166,29 @@ definitions and syntax rules follow after the list of primitives. \tex {ifpdfprimitive} \Something{control sequence} \Whatever{expandable} } -% Currently it's only experimental, so don't really document it -% (also not in pdftex-syntax.txt) -%\Syntax { -%\Tex {\pdfstrcmp} \Something{general text} \Something{general text} \Whatever{expandable} -%} +\Syntax { +\tex {ifincsname} \Whatever{expandable} +} + +\Syntax { +\Tex {\pdfstrcmp} \Something{general text} \Something{general text} \Whatever{expandable} +} + +\Syntax { +\Tex {\pdfmatch} \Optional{\Literal{icase}} \Optional{\Literal{subcount} \Something{number}} + \Something{general text} \Something{general text} \Whatever{expandable} +} \Syntax { -\Tex {\ifpdfabsnum} \Something{number} \Whatever{expandable} +\Tex {\pdflastmatch} \Something{integer} \Whatever{expandable} } \Syntax { -\Tex {\ifpdfabsdim} \Something{dimen} \Whatever{expandable} +\Tex {\ifpdfabsnum} \Whatever{expandable} +} + +\Syntax { +\Tex {\ifpdfabsdim} \Whatever{expandable} } \Syntax { @@ -2129,7 +2200,7 @@ definitions and syntax rules follow after the list of primitives. } \Syntax { -\Tex {\pdfmdfivesum} \Optional{file} \Something{general text} \Whatever{expandable} +\Tex {\pdfmdfivesum} \Optional{\Literal{file}} \Something{general text} \Whatever{expandable} } \Syntax { @@ -2141,15 +2212,23 @@ definitions and syntax rules follow after the list of primitives. } \Syntax { -\Tex {\pdffiledump} \Optional{offset \Something{number}} \Optional{length \Something{number}} \Something{general text} +\Tex {\pdffiledump} \Optional{\Literal{offset} \Something{number}} \Optional{\Literal{length} \Something{number}} \Something{general text} \Whatever{expandable} } \Syntax { -\Tex {\pdfcolorstackinit} \Optional{page} \Optional{direct} \Something{general text} +\Tex {\pdfcolorstackinit} \Optional{\Literal{page}} \Optional{\Literal{direct}} \Something{general text} \Whatever{expandable} } +\Syntax { +\Tex{\pdfinsetht} \Something{integer} \Whatever{expandable} +} + +\Syntax { +\Tex {\pdfximagebbox} \Something{integer} \Something{integer} \Whatever{expandable} +} + \stoppacked %%S NL @@ -2176,6 +2255,10 @@ definitions and syntax rules follow after the list of primitives. } \Syntax { +\Tex {\pdflastximagecolordepth} \Whatever{read||only integer} +} + +\Syntax { \Tex {\pdflastximagepages} \Whatever{read||only integer} } @@ -2208,6 +2291,10 @@ definitions and syntax rules follow after the list of primitives. } \Syntax { +\Tex {\pdfretval} \Whatever{read||only integer} +} + +\Syntax { \Tex {\pdfshellescape} \Whatever{read||only integer} } @@ -2322,6 +2409,18 @@ definitions and syntax rules follow after the list of primitives. } \Syntax { +\Tex {\letterspacefont} \Something{control sequence} \Something{font} \Something{integer} +} + +\Syntax { +\Tex {\pdfcopyfont} \Something{control sequence} \Something{font} +} + +\Syntax { +\Tex {\pdfglyphtounicode} \Something{general text} \Something{general text} +} + +\Syntax { \Tex {\vadjust} \Optional{\Something{pre spec}} \Something{filler} \Lbrace \Something{vertical mode material} \Rbrace \Whatever{h, m} } @@ -2354,8 +2453,7 @@ definitions and syntax rules follow after the list of primitives. } \Syntax { -\Tex {\pdfcolorstack} \Something{stack number} \Something{stack action} -\Something{general text} +\Tex {\pdfcolorstack} \Something{stack number} \Something{stack action} \Something{general text} } \Syntax { @@ -2618,7 +2716,7 @@ definitions and syntax rules follow after the list of primitives. \stoppacked - A~\Something {general text} is expanded immediately, like \type{\special} +A \Something {general text} is expanded immediately, like \type{\special} in traditional \TEX, unless explicitly mentioned otherwise. Some of the object and image related primitives can be prefixed by @@ -2628,10 +2726,10 @@ Some of the object and image related primitives can be prefixed by \section[primitives]{\PDFTEX\ primitives} -Here follows a~short description of the primitives added by \PDFTEX\ +Here follows a short description of the primitives added by \PDFTEX\ to the original \TEX\ engine (other extensions by \MLTEX\ and \ENCTEX\ are not listed). One way to learn more about how to use these new -primitives is to have a~look at the file \filename {samplepdf.tex} in the +primitives is to have a look at the file \filename {samplepdf.tex} in the \PDFTEX\ distribution. Note that if the output is \DVI\ then the \PDFTEX\ specific dimension @@ -2651,7 +2749,7 @@ constants. This means that {\em you} (or, more likely, the macros you write) must escape characters as necessary (namely \type{\}, \type{(}, and \type{)}. Otherwise, an invalid \PDF\ file may result. The \type{hyperref} and \TEXINFO\ packages have code which may serve as -a~starting point for implementing +a starting point for implementing this, although it will certainly need to be adapted to any particular situation. @@ -2661,10 +2759,10 @@ situation. \pdftexprimitive {\Syntax {\Tex {\pdfoutput} \Whatever{integer}}} -\bookmark{\type{\pdfoutput}} +\bookmark{\tex{pdfoutput}} This parameter specifies whether the output format should be \DVI\ or -\PDF. A~positive value means \PDF\ output, otherwise (default 0) one gets +\PDF. A positive value means \PDF\ output, otherwise (default 0) one gets \DVI\ output. This primitive is the only one that must be set to produce \PDF\ output (unless the commandline option \type{-output-format=pdf} is used); all other primitives are optional. This parameter cannot be @@ -2673,7 +2771,7 @@ we want \PDF\ output, we have to set \type{\pdfoutput} before \PDFTEX\ ships out the first page. When \PDFTEX\ starts complaining about specials, one can be rather sure -that a~macro package is not aware of the \PDF\ mode. A~simple way of +that a macro package is not aware of the \PDF\ mode. A simple way of making macros aware of \PDFTEX\ in \PDF\ or \DVI\ mode is: \starttyping @@ -2682,7 +2780,7 @@ making macros aware of \PDFTEX\ in \PDF\ or \DVI\ mode is: \stoptyping Using the \type{ifpdf.sty} file, which works with both \LATEX\ and plain -\TeX, is a~cleaner way of doing this. Historically, the simple test +\TeX, is a cleaner way of doing this. Historically, the simple test \type{\ifx\pdfoutput\undefined} was defined; but nowadays, the \PDFTEX\ engine is used in distributions also for non-\PDF\ formats (\eg\ \LATEX), so \type{\pdfoutput} may be defined even when the output format @@ -2690,34 +2788,38 @@ is \DVI. \pdftexprimitive {\Syntax {\Tex {\pdfminorversion} \Whatever{integer}}} -\bookmark{\type{\pdfminorversion}} +\bookmark{\tex{pdfminorversion}} This primitive sets the \PDF\ version of the generated file and the latest allowed \PDF\ version of included \PDF{}s. \Eg, \type{\pdfminorversion=3} tells \PDFTEX\ to set the \PDF\ version to 1.3 and allows only included \PDF\ files -with versions numbers up to 1.3. The default for \type{\pdfminorversion} is 4, -producing files with \PDF\ version 1.4. If specified, this primitive must +with versions numbers up to 1.3. The default for \type{\pdfminorversion} is 5, +producing files with \PDF\ version 1.5. If specified, this primitive must appear before any data is to be written to the generated \PDF\ file, so you should put it at the very start of your files. The command has been introduced -in \PDFTEX\ 1.30.0 as a~shortened synonym of \type{\pdfoptionpdfminorversion} +in \PDFTEX\ 1.30.0 as a shortened synonym of \type{\pdfoptionpdfminorversion} command, that is obsolete by now. +Distributions alter the default value here; for example, \TEXLIVE\ 2010 +sets \type{\pdfminorversion=5} when its formats are built, so object +compression can be enabled (described below). + \pdftexprimitive {\Syntax {\Tex {\pdfcompresslevel} \Whatever{integer}}} -\bookmark{\type{\pdfcompresslevel}} +\bookmark{\tex{pdfcompresslevel}} This integer parameter specifies the level of {\em stream} compression -(text, in||line graphics, and embedded \PNG\ images (only if they are -un- and re||compressed during the embedding process); all done by the -\type{zlib} library). Zero means no compression, 1~means fastest, 9~means -best, 2..8 means something in between. A~value outside this range will -be adjusted to the nearest meaningful value. This parameter is read -each time \PDFTEX\ starts a~stream. Setting \type{\pdfcompresslevel=0} -is great for \PDF\ stream debugging. +(text, inline graphics, and embedded \PNG\ images (only if they are un- +and re-compressed during the embedding process); all done by the +\type{zlib} library). Zero means no compression, 1~means fastest, +9~means best, $2..8$ means something in between. A value outside this +range will be adjusted to the nearest meaningful value. This parameter +is read each time \PDFTEX\ starts a stream. Setting +\type{\pdfcompresslevel=0} is great for \PDF\ stream debugging. \pdftexprimitive {\Syntax {\Tex {\pdfobjcompresslevel} \Whatever{integer}}} -\bookmark{\type{\pdfobjcompresslevel}} +\bookmark{\tex{pdfobjcompresslevel}} This integer parameter controls the compression of {\em non-stream} objects. In the \PDF-1.4 specification these objects still had to go into @@ -2731,12 +2833,12 @@ and links are used. \introduced{1.40.0} The writing of compressed objects is enabled by setting -\type{\pdfobjcompresslevel} to a~value between 1 and~3; it's +\type{\pdfobjcompresslevel} to a value between 1 and~3; it's disabled by value~0 (default). Enabling requires that also \type{\pdfminorversion}~$>$~4. If \type{\pdfobjcompresslevel}~$>$~0, -but \type{\pdfminorversion}~$<$~5, a~warning is given and object stream +but \type{\pdfminorversion}~$<$~5, a warning is given and object stream writing is disabled. The \type{\pdfobjcompresslevel} value is clipped -to the range 0..3. Using values outside this range is not recommended +to the range $0..3$. Using values outside this range is not recommended (for future extension). The \type{\pdfobjcompresslevel} settings have the following effects: @@ -2750,42 +2852,44 @@ is still not compressed. Finally, when set to~3, all non-stream objects are compressed, including the \type{/Info} dictionary (this means that the \type{/Info} can't be read as clear text any more). If object streams are to be used, currently \type{\pdfobjcompresslevel=2} is recommended, +and set so in some distributions. \description{Caveat:} \PDF\ files generated with object streams enabled -can't be read with (old) \PDF\ viewers that don't understand \PDF-1.5 -files. For widest distribution and unknown audience, don't activate -object stream writing. The \PDF-1.5 standard describes also a~hybrid -object compression mode that gives some backward compatibility, but this -is currently not implemented, as \PDF-1.5 seems to be rather quickly -adopted by modern \PDF\ viewers. Also not implemented is the optional -\type{/Extends} key. +can't be read with (sufficiently old) \PDF\ viewers that don't +understand \PDF-1.5 files. For widest distribution and unknown audience, +don't activate object stream writing. The \PDF-1.5 standard describes +also a hybrid object compression mode that gives some backward +compatibility, but this is currently not implemented, as \PDF-1.5 was +rather quickly adopted by modern \PDF\ viewers. Also not implemented is +the optional \type{/Extends} key. \pdftexprimitive {\Syntax {\Tex {\pdfdecimaldigits} \Whatever{integer}}} -\bookmark{\type{\pdfdecimaldigits}} +\bookmark{\tex{pdfdecimaldigits}} -This integer parameter specifies the numeric accuracy of real coordinates as written -to the \PDF\ file. It gives the maximal number of decimal digits after the -decimal point. Valid values are in range 0..4. A~higher value means -more precise output, but also results in a~larger file size and more -time to display or print. In most cases the optimal value is~2. This -parameter does not influence the precision of numbers used in raw \PDF\ code, -like that used in \type{\pdfliteral} and annotation action specifications; -also multiplication items (\eg\ scaling factors) -are not affected and are always output with best precision. -This parameter is read when \PDFTEX\ writes a~real number to the \PDF\ output. +This integer parameter specifies the numeric accuracy of real +coordinates as written to the \PDF\ file. It gives the maximal number of +decimal digits after the decimal point. Valid values are in range +$0..4$. A higher value means more precise output, but also results in a +larger file size and more time to display or print. In most cases the +optimal value is~2. This parameter does not influence the precision of +numbers used in raw \PDF\ code, like that used in \type{\pdfliteral} and +annotation action specifications; also multiplication items (\eg\ +scaling factors) are not affected and are always output with best +precision. This parameter is read when \PDFTEX\ writes a real number to +the \PDF\ output. When including huge \METAPOST\ images using \filename {supp-pdf.tex}, one can limit the accuracy to two digits by typing: \type{\twodigitMPoutput}. \pdftexprimitive {\Syntax {\Tex {\pdfhorigin} \Whatever{dimension}}} -\bookmark{\type{\pdfhorigin}} +\bookmark{\tex{pdfhorigin}} This parameter can be used to set the horizontal offset the output box -from the top left corner of the page. A~value of 1~inch corresponds to the +from the top left corner of the page. A value of 1~inch corresponds to the normal \TEX\ offset. This parameter is read when \PDFTEX\ starts shipping -out a~page to the \PDF\ output. +out a page to the \PDF\ output. For standard purposes, this parameter should always be kept at 1~true inch. If you want to shift text on the page, use \TEX's @@ -2799,7 +2903,7 @@ command. Or, you can preadjust the \type{\pdfhorigin} value before typing \pdftexprimitive {\Syntax {\Tex {\pdfvorigin} \Whatever{dimension}}} -\bookmark{\type{\pdfvorigin}} +\bookmark{\tex{pdfvorigin}} This parameter is the vertical companion of \type{\pdfhorigin}, and the notes above regarding \type{\mag} and true dimensions apply. Also keep @@ -2809,11 +2913,11 @@ in mind that the \TEX\ coordinate system starts in the top left corner \pdftexprimitive {\Syntax {\Tex {\pdfpagewidth} \Whatever{dimension}}} -\bookmark{\type{\pdfpagewidth}} +\bookmark{\tex{pdfpagewidth}} This dimension parameter specifies the page width of the \PDF\ output (the screen, the paper, etc.). \PDFTEX\ reads this parameter when it -starts shipping out a~page. After magnification has been changed by +starts shipping out a page. After magnification has been changed by the \type{\mag} primitive, check that this parameter reflects the wished true page width. @@ -2824,7 +2928,7 @@ screen, you can be rather sure that this parameter is set wrong. \pdftexprimitive {\Syntax {\Tex {\pdfpageheight} \Whatever{dimension}}} -\bookmark{\type{\pdfpageheight}} +\bookmark{\tex{pdfpageheight}} Similar to the previous item, this dimension parameter specifies the page height of the \PDF\ output. If set to zero, the page height will @@ -2832,17 +2936,19 @@ be calculated analogously to the above. After magnification has been changed by the \type{\mag} primitive, check that this parameter reflects the wished true page height. +%*********************************************************************** + \subsection{The document info and catalog} \pdftexprimitive {\Syntax {\Tex {\pdfinfo} \Something{general text}}} -\bookmark{\type{\pdfinfo}} +\bookmark{\tex{pdfinfo}} This primitive allows the user to add information to the document info section; if this information is provided, it can be extracted, \eg\ by the pdfinfo program, or by the Adobe Reader (version 7.0: menu option {\em File $\longrightarrow$ Document Properties}). The \Something{general text} is -a~collection of key||value||pairs. The key names are preceded by a~\type{/}, +a collection of key||value||pairs. The key names are preceded by a \type{/}, and the values, being strings, are given between parentheses. All keys are optional. Possible keys are \type{/Author}, \type{/CreationDate} (defaults to current date including time zone info), \type{/ModDate}, @@ -2852,16 +2958,16 @@ and \type{/Keywords}. \type{/CreationDate} and \type{/ModDate} are expressed in the form \type{D:YYYYMMDDhhmmssTZ..}, where \type{YYYY} is the year, \type{MM} is -the month, \type{DD} is the day, hh is the hour, \type{mm} is the minutes, -\type{ss} is the seconds, and \type{TZ..} is an optional string denoting -the time zone. An example of this format is shown below. For details -please refer to the \PDFReference. +the month, \type{DD} is the day, hh is the hour, \type{mm} is the +minutes, \type{ss} is the seconds, and \type{TZ..} is an optional string +denoting the time zone. An example of this format is shown below. For +details please refer to the \PDFReference. -Multiple appearances of \type{\pdfinfo} will be concatenated. In general, if -a~key is given more than once, one may expect that the first appearance will be used. -Be aware however, that this behaviour is viewer dependent. Except expansion, -\PDFTEX\ does not perform any further operations on \Something{general text} provided -by the user. +Multiple appearances of \type{\pdfinfo} will be concatenated. In +general, if a key is given more than once, one may expect that the first +appearance will be used. Be aware however, that this behaviour is +viewer dependent. Except expansion, \PDFTEX\ does not perform any +further operations on \Something{general text} provided by the user. An example of the use of \type{\pdfinfo} is: @@ -2880,7 +2986,7 @@ An example of the use of \type{\pdfinfo} is: \pdftexprimitive {\Syntax {\Tex {\pdfcatalog} \Something{general text} \Optional{\Something{open-action spec}}}} -\bookmark{\type{\pdfcatalog}} +\bookmark{\tex{pdfcatalog}} Similar to the document info section is the document catalog, where keys are \type{/URI}, which provides the base \URL\ of the document, and \type @@ -2916,7 +3022,7 @@ open action directly into the catalog. \pdftexprimitive {\Syntax {\Tex {\pdfnames} \Something{general text}}} -\bookmark{\type{\pdfnames}} +\bookmark{\tex{pdfnames}} This primitive inserts the \Something{general text} to the \type {/Names} array. The text must @@ -2925,7 +3031,7 @@ otherwise the document can be invalid. \pdftexprimitive {\Syntax {\Tex {\pdftrailer} \Something{general text}}} -\bookmark{\type{\pdftrailer}} +\bookmark{\tex{pdftrailer}} This command puts its argument text verbatim into the file trailer dictionary. \introduced{1.11a} @@ -2936,10 +3042,10 @@ dictionary. \introduced{1.11a} \pdftexprimitive {\Syntax {\Tex {\pdfpkresolution} \Whatever{integer}}} -\bookmark{\type{\pdfpkresolution}} +\bookmark{\tex{pdfpkresolution}} This integer parameter specifies the default resolution of embedded \PK\ -fonts and is read when \PDFTEX\ embeds a~\PK\ font during finishing the +fonts and is read when \PDFTEX\ embeds a \PK\ font during finishing the \PDF\ output. As bitmap fonts are still rendered poorly by some \PDF\ viewers, it is best to use Type~1 fonts when available. @@ -2947,9 +3053,9 @@ viewers, it is best to use Type~1 fonts when available. \Something{font} \Something{stretch} \Something{shrink} \Something{step} \Optional{\Literal{autoexpand}}}} -\bookmark{\type{\pdffontexpand}} +\bookmark{\tex{pdffontexpand}} -This extension to \TEX's font definitions controls a~\PDFTEX\ automatism +This extension to \TEX's font definitions controls a \PDFTEX\ automatism called {\em font expansion}. We describe this by an example: \starttyping @@ -2962,20 +3068,20 @@ The \type{30 20 10} means this: \quotation {hey \TEX, when line breaking is going badly, you may stretch the glyphs from this font as much as 3\,\% or shrink them as much as 2\,\%}. For practical reasons \PDFTEX\ uses discrete expansion steps, in this example, 1\,\%. Roughly spoken, the -trick is as follows. Consider a~text typeset in triple column mode. When -\TEX\ cannot break a~line in the appropriate way, the unbreakable parts +trick is as follows. Consider a text typeset in triple column mode. When +\TEX\ cannot break a line in the appropriate way, the unbreakable parts of the word will stick into the margin. When \PDFTEX\ notes this, it will try to scale (shrink) the glyphs in that line using fixed steps, until the line fits. When lines are too spacy, the opposite happens: \PDFTEX\ starts scaling (stretching) the glyphs until the white space gaps is acceptable. This glyph stretching and shrinking is called {\em font expansion}. To enable font expansion, don't forget to set -\type{\pdfadjustspacing} to a~value greater than zero. +\type{\pdfadjustspacing} to a value greater than zero. There are two different modes for font expansion: First, if the \type{autoexpand} option is there --- which is the -recommended mode --- only a~single map entry is needed for all expanded +recommended mode --- only a single map entry is needed for all expanded font versions, using the name of the unexpanded \TFM\ file ({\em tfmname}). No expanded {\em tfmname} versions need to mentioned (they are ignored), as \PDFTEX\ generates expanded copies of the unexpanded \TFM\ @@ -2984,18 +3090,18 @@ data structures and keeps them in its memory. Since \PDFTEX~1.40.0 the the text matrix (\PDF\ operator ``\type{Tm}''), and not anymore on font file level, giving the advantage that it now works not only with Type1 but also with TrueType and OpenType fonts (and even without embedding -a~font file; but that's not recommended). In this mode \PDFTEX\ requires +a font file; but that's not recommended). In this mode \PDFTEX\ requires only unexpanded font files. Second, if the \type{autoexpand} option is missing, setting up font expansion gets more tedious, as there must be map entries for \TFM\ files in all required expansion values. The expanded {\em tfmname} variants are constructed by adding the font expansion value to the {\em tfmname} -of the base font, \eg\ there must be a~map entry with {\em tfmname} +of the base font, \eg\ there must be a map entry with {\em tfmname} \type{sometfm+10} for 1\,\% stretch or \type {sometfm-15} for 1.5\,\% -shrink. This also means, that for each expanded font variant a~\TFM\ +shrink. This also means, that for each expanded font variant a \TFM\ file with properly expanded metrics must exist. Having several map -entries for the various expansion values of a~font requires to provide +entries for the various expansion values of a font requires to provide for each expansion value an individually crafted font file with expanded glyphs. Depending on how these glyphs are generated, this might give slightly better glyph forms than the rather simple glyph stretching @@ -3008,7 +3114,7 @@ mode is not worth the trouble. The font expansion mechanism is inspired by an optimization first introduced by Prof.~Hermann Zapf, which in itself goes back to optimizations used in the early days of typesetting: use different -glyphs to optimize the grayness of a~page. So, there are many, slightly +glyphs to optimize the grayness of a page. So, there are many, slightly different~a's, e's, etc. For practical reasons \PDFTEX\ does not use such huge glyph collections; it uses horizontal scaling instead. This is sub||optimal, and for many fonts, possibly offensive to the design. But, @@ -3017,16 +3123,16 @@ Multiple Master fonts when no fonts are embedded and|/|or can be found on the target system. Such fonts are designed to adapt their design to the different scaling parameters. It is up to the user to determine to what extent mixing slightly remastered fonts can be used without -violating the design. Think of an~O: when geometrically stretched, the +violating the design. Think of an O: when geometrically stretched, the vertical part of the glyph becomes thicker, and looks incompatible with -an unscaled original. With a~Multiple Master situation, one can stretch +an unscaled original. With a Multiple Master situation, one can stretch while keeping this thickness compatible. \pdftexprimitive {\Syntax {\Tex {\pdfadjustspacing} \Whatever{integer}}} -\bookmark{\type{\pdfadjustspacing}} +\bookmark{\tex{pdfadjustspacing}} -This primitive provides a~switch for enabling font expansion. By default, +This primitive provides a switch for enabling font expansion. By default, \type{\pdfadjustspacing} is set to~0; then font expansion is disabled, so that the \PDFTEX\ output is identical to that from the original \TEX\ engine. @@ -3042,31 +3148,31 @@ shrinking are taken into account {\em while} the paragraph is broken into lines. In this case, line breaks are likely to be different from those of standard \TEX. In fact, paragraphs may even become longer or shorter. -Both alternatives require a~collection of \TFM\ files that are +Both alternatives require a collection of \TFM\ files that are related to the \Something{stretch} and \Something{shrink} settings for the \type{\pdffontexpand} primitive, unless this is given with the \type{autoexpand} option. -\pdftexprimitive {\Syntax {\Tex {\efcode} \Something{font} \Whatever{integer}}} +\pdftexprimitive {\Syntax {\Tex {\efcode} \Something{font} \Something{8-bit number} \Whatever{integer}}} -\bookmark{\type{\efcode}} +\bookmark{\tex{efcode}} -We didn't yet tell the whole story. One can imagine that some glyphs -are visually more sensitive to stretching or shrinking than others. Then -the \type{\efcode} primitive can be used to influence the expandability -of individual glyphs within a~given font, as a~factor to the expansion +We didn't yet tell the whole story. One can imagine that some glyphs are +visually more sensitive to stretching or shrinking than others. Then the +\type{\efcode} primitive can be used to influence the expandability of +individual glyphs within a given font, as a factor to the expansion setting from the \type{\pdffontexpand} primitive. The syntax is similar to \type{\sfcode} (but with the \Something{font} required), and it defaults to~1000, meaning 100\,\% expandability. The given integer value -is clipped to the range 0..1000, corresponding to a~usable expandability -range of 0..100\,\%. Example: +is clipped to the range $0..1000$, corresponding to a usable +expandability range of 0..100\,\%. Example: \starttyping \efcode\somefont`A=800 \efcode\somefont`O=0 \stoptyping -Here an~A may stretch or shrink only by 80\,\% of the current expansion +Here an A may stretch or shrink only by 80\,\% of the current expansion value for that font, and expansion for the~O is disabled. The actual expansion is still bound to the steps as defined by \type{\pdffontexpand} primitive, otherwise one would end up with more possible font inclusions @@ -3074,7 +3180,7 @@ than would be comfortable. \pdftexprimitive {\Syntax {\Tex {\pdfprotrudechars} \Whatever{integer}}} -\bookmark{\type{\pdfprotrudechars}} +\bookmark{\tex{pdfprotrudechars}} Yet another way of optimizing paragraph breaking is to let certain characters move into the margin (`character protrusion'). When @@ -3086,19 +3192,19 @@ might be changed. This qualification and the amount of shift are set by the primitives \type{\rpcode} and \type{\lpcode}. Character protrusion is disabled when \type{\pdfprotrudechars=0} (or negative). -If you want to protrude some item other than a~character (\eg\ -a~\type{\hbox}), you can do so by padding the item with an invisible +If you want to protrude some item other than a character (\eg\ +a \type{\hbox}), you can do so by padding the item with an invisible zero||width character, for which protrusion is activated. -\pdftexprimitive {\Syntax {\Tex {\rpcode} \Something{font} \Whatever{integer}}} +\pdftexprimitive {\Syntax {\Tex {\rpcode} \Something{font} \Something{8-bit number} \Whatever{integer}}} -\bookmark{\type{\rpcode}} +\bookmark{\tex{rpcode}} -The amount that a~character from a~given font may shift into the right +The amount that a character from a given font may shift into the right margin (`character protrusion') is set by the primitive \type {\rpcode}. The protrusion distance is the integer value given to \type {\rpcode}, -multiplied with 0.001\,em from the current font. The given integer -value is clipped to the range $-$1000..1000, corresponding to a~usable +multiplied with 0.001\,em from the current font. The given integer value +is clipped to the range $-1000..1000$, corresponding to a usable protrusion range of $-$1\,em..1\,em. Example: \starttyping @@ -3111,28 +3217,28 @@ Here the comma may shift by 0.2\,em into the margin and the hyphen by you better paragraphs (use \type{\rpcode} judiciously; don't overdo it). Remark: old versions of \PDFTEX\ use the character width as measure. This -was changed to a~proportion of the em-width after \THANH\ finished his +was changed to a proportion of the em-width after \THANH\ finished his master's thesis. -\pdftexprimitive {\Syntax {\Tex {\lpcode} \Something{font} +\pdftexprimitive {\Syntax {\Tex {\lpcode} \Something{font} \Something{8-bit number} \Whatever{integer}}} -\bookmark{\type{\lpcode}} +\bookmark{\tex{lpcode}} This is similar to \type{\rpcode}, but affects the amount by which characters may protrude into the left margin. Also here the given integer -value is clipped to the range $-$1000..1000. +value is clipped to the range $-1000..1000$. \pdftexprimitive {\Syntax {\Tex {\leftmarginkern} \Something{box number} \Whatever{expandable}}} -\bookmark{\type{\leftmarginkern}} +\bookmark{\tex{leftmarginkern}} The \Tex{\leftmarginkern} \Something{box number} primitive expands to the width of the margin kern at the left side of the horizontal list stored in \Tex{\box} \Something{box number}. The expansion string includes the unit \type{pt}. \Eg, when the left margin kern of \type{\box0} amounts to $-$10\,pt, \type{\leftmarginkern0} will expand to \type{-10pt}. -A~similar primitive \type{\rightmarginkern} exists for the right margin. +A similar primitive \type{\rightmarginkern} exists for the right margin. \introduced{1.30.0} These are auxiliary primitives to make character protrusion @@ -3149,7 +3255,7 @@ unpackaging process. The \type{\leftmarginkern} and \type{\rightmarginkern} primitives allow to access the margin kerns and store them away before unpackaging the hbox. \Eg\, the following code snipplet restores margin kerning of -a~horizontal list stored in \type{\box\testline}, resulting in a~hbox with +a horizontal list stored in \type{\box\testline}, resulting in a hbox with proper margin kerning (which is then done by ordinary kerns). \starttyping @@ -3160,7 +3266,7 @@ proper margin kerning (which is then done by ordinary kerns). \pdftexprimitive {\Syntax {\Tex {\rightmarginkern} \Something{box number} \Whatever{expandable}}} -\bookmark{\type{\rightmarginkern}} +\bookmark{\tex{rightmarginkern}} The \Tex{\rightmarginkern} \Something{box number} primitive expands to the width of the margin kern at the right side of the horizontal list @@ -3168,34 +3274,62 @@ stored in \Tex{\box} \Something{box number}. See \type{\leftmarginkern} for more details. \introduced{1.30.0} +\pdftexprimitive {\Syntax {\Tex {\letterspacefont} \Something{control sequence} \Something{font} \Something{integer}}} + +\bookmark{\tex{letterspacefont}} + +This primitive creates an instance of \Something{font} with the widths +of all glyphs increased by \Something{integer} thousandths of an em (as +set in \Something{font}). The effect is letter spacing, but the glyphs +are actually larger (sidebearings are increased), so a single glyph will +take more space. For instance, the following creates a font +\type{\lsfont} whose glyphs are all 1.2\,pt larger than those of +\type{\normalfont}: + +\starttyping +\font\normalfont=myfont at 12pt +\letterspacefont\lsfont\normalfont 100 +\stoptyping + +Negative values are allowed for \Something{integer}. +Letter spacing works natively in \PDF\ mode only, unless special fonts are +devised (in our example, a \type{myfont+100ls} font), as with font expansion. + +\pdftexprimitive {\Syntax {\Tex {\pdfcopyfont} \Something{control sequence} \Something{font}}} + +\bookmark{\tex{pdfcopyfont}} + +This primitive defines \Something{control sequence} as a synonym for +\Something{font}. + \pdftexprimitive {\Syntax {\Tex {\pdffontattr} \Something{font} \Something{general text}}} -\bookmark{\type{\pdffontattr}} +\bookmark{\tex{pdffontattr}} This primitive inserts the \Something{general text} to the \type {/Font} -dictionary. The text must conform to the specifications as laid down in the -\PDFReference, otherwise the document can be invalid. +dictionary. The text must conform to the specifications as laid down in +the \PDFReference, otherwise the document can be invalid. \pdftexprimitive {\Syntax {\Tex {\pdffontname} \Something{font} \Whatever {expandable}}} -\bookmark{\type{\pdffontname}} +\bookmark{\tex{pdffontname}} -In \PDF\ files produced by \PDFTEX\ one can recognize a~font resource -by the prefix~\type{/F} followed by a~number, for instance \type{/F12} -or \type{/F54}. For a~given \TEX\ \Something{font}, this primitive +In \PDF\ files produced by \PDFTEX\ one can recognize a font resource +by the prefix~\type{/F} followed by a number, for instance \type{/F12} +or \type{/F54}. For a given \TEX\ \Something{font}, this primitive expands to the number from the corresponding font resource name. \Eg, if \type{/F12} corresponds to some \TEX\ font \type{\foo}, the \type{\pdffontname\foo} expands to the number~\type{12}. In the current implementation, when \type{\pdfuniqueresname} (see below) -is set to a~positive value, the \type{\pdffontname} still returns only the +is set to a positive value, the \type{\pdffontname} still returns only the number from the font resource name, but not the appended random string. \pdftexprimitive {\Syntax {\Tex {\pdffontobjnum} \Something{font} \Whatever {expandable}}} -\bookmark{\type{\pdffontobjnum}} +\bookmark{\tex{pdffontobjnum}} This command is similar to \type{\pdffontname}, but it returns the \PDF\ object number of the font dictionary instead of the number from @@ -3209,7 +3343,7 @@ access to all the font resources used in the document. \pdftexprimitive {\Syntax {\Tex {\pdffontsize} \Something{font} \Whatever {expandable}}} -\bookmark{\type{\pdffontsize}} +\bookmark{\tex{pdffontsize}} This primitive expands to the font size of the given font, with unit \type{pt}. \Eg, when using the plain \TeX\ macro package, the call @@ -3218,7 +3352,7 @@ This primitive expands to the font size of the given font, with unit \pdftexprimitive {\Syntax {\Tex {\pdfincludechars} \Something{font} \Something{general text}}} -\bookmark{\type{\pdfincludechars}} +\bookmark{\tex{pdfincludechars}} This command causes \PDFTEX\ to treat the characters in \Something{general text} as if they were used with \Something{font}\unkern, which means that the @@ -3227,38 +3361,38 @@ output. Nothing is appended to the list being built. \pdftexprimitive {\Syntax {\Tex {\pdfuniqueresname} \Whatever{integer}}} -\bookmark{\type{\pdfuniqueresname}} +\bookmark{\tex{pdfuniqueresname}} -When this primitive is assigned a~positive number, \PDF\ resource names -will be made reasonably unique by appending a~random string consisting +When this primitive is assigned a positive number, \PDF\ resource names +will be made reasonably unique by appending a random string consisting of six \ASCII\ characters. \pdftexprimitive {\Syntax {\Tex {\pdfmapfile} \Something{map spec}}} -\bookmark{\type{\pdfmapfile}} +\bookmark{\tex{pdfmapfile}} -This primitive is used for reading a~font map file consisting of +This primitive is used for reading a font map file consisting of one or more font map lines. The name of the map file is given in the \Something{map spec} together with an optional leading modifier character. If no \type{\pdfmapfile} primitive is given, the default map -file \filename{pdftex.map} will be read by \PDFTEX. There is a~companion +file \filename{pdftex.map} will be read by \PDFTEX. There is a companion primitive \type{\pdfmapline} that allows to scan single map lines; -its map line argument has the same syntax as the map lines from a~map +its map line argument has the same syntax as the map lines from a map file. Both primitives can be used concurrently. The \type{\pdfmapfile} primitive is fast for reading external bulk font map information (many -map lines collected in a~map file), whereas the \type{\pdfmapline} allows +map lines collected in a map file), whereas the \type{\pdfmapline} allows to put the font map information for individual \TeX\ fonts right into -the \TeX\ source or a~style file. In any case the map line information +the \TeX\ source or a style file. In any case the map line information is scanned by \PDFTEX, and in the most common case the data are put into -a~fresh internal map entry data structure, which is then consulted once -a~font is called. +a fresh internal map entry data structure, which is then consulted once +a font is called. Normally there is no need for the \PDFTEX\ user to bother about the \type{\pdfmapfile} or \type{\pdfmapline} primitives, as the main \TEX\ distributions provide nice helper tools that automatically assemble the default font map file. Prominent tool examples are the scripts \type{updmap} and \type{updmap-sys} coming with \TEXLIVE\ and \TETEX. -If your map file isn't in the current directory (or a~standard system +If your map file isn't in the current directory (or a standard system directory), you will need to set the \type{TEXFONTMAPS} variable (in \WEBC) or give an explicit path so that it will be found. @@ -3269,8 +3403,8 @@ The operation mode of the \type{\pdfmapfile} and \type{\pdfmapline} primitives is selected by an optional modifier character (\type{+}, \type{=}, \type{-}) in front of the {\em tfmname} field. This modifier defines how the individual map lines are going to be handled, and how -a~collision between an already registered map entry and a~newer one is -resolved; either ignoring a~later entry, or replacing or deleting an +a collision between an already registered map entry and a newer one is +resolved; either ignoring a later entry, or replacing or deleting an existing entry. But in any case, map entries of fonts already in use are kept untouched. Here are two examples: @@ -3283,26 +3417,26 @@ When no modifier character is given (\eg\ \type{\pdfmapfile{foo.map}} or \type{\pdfmapline{phvr8r Helvetica}}) and there hasn't already been any call of one of these primitives before, then the default map file \filename{pdftex.map} will {\em not} be read in. Apart from this the -given map file will be processed similarly as with a~\type{+} modifier: -duplicate later map entries within the file are ignored and a~warning is +given map file will be processed similarly as with a \type{+} modifier: +duplicate later map entries within the file are ignored and a warning is issued. This means, that you can block reading of the default map file also by an empty \type{\pdfmapfile{}} or \type{\pdfmapline{}} early in the \TeX\ file. When the default map file is large but you don't need it anyway, these command variants might considerably speed up the \PDFTEX\ startup process. -If a~modifier is given, the mechanism is so that before reading the +If a modifier is given, the mechanism is so that before reading the items given as arguments to \type{\pdfmapfile} or \type{\pdfmapline} the default map file will be read first --- if this hasn't already been done or been prevented by the above blocking cases. This should be mostly compatible with the traditional behaviour. If you want to add -support for a~new font through an additional font map file while keeping +support for a new font through an additional font map file while keeping all the existing mappings, don't use the primitive versions without modifier, but instead type either \type{\pdfmapfile{+myfont.map}} or \type{\pdfmapfile{=myfont.map}}, as described below. \type{\pdfmapfile {+foo.map}} reads the file \filename{foo.map}; duplicate -later map entries within the file are ignored and a~warning is issued. +later map entries within the file are ignored and a warning is issued. \type{\pdfmapfile {=foo.map}} reads the file \filename{foo.map}; matching map entries in the database are replaced by new entries from @@ -3311,8 +3445,8 @@ matching map entries in the database are replaced by new entries from \type{\pdfmapfile {-foo.map}} reads the file \filename{foo.map}; matching map entries are deleted from the database (if not yet in use). -If you want to use a~base map file name other than \type{pdftex.map}, -or change its processing options through a~\PDFTEX\ format, you can do +If you want to use a base map file name other than \type{pdftex.map}, +or change its processing options through a \PDFTEX\ format, you can do this by appending the \type{\pdfmapfile} command to the \type{\everyjob{}} token list for the \type{-ini} run, \eg: @@ -3326,9 +3460,9 @@ This would always read the file \type{myspecial.map} after the default \pdftexprimitive {\Syntax {\Tex {\pdfmapline} \Something{map spec}}} -\bookmark{\type{\pdfmapline}} +\bookmark{\tex{pdfmapline}} -Similar to \type{\pdfmapfile}, but here you can give a~single +Similar to \type{\pdfmapfile}, but here you can give a single map line (like the ones in map files) as an argument. The optional modifiers (\type{+-=}) have the same effect as with \type{\pdfmapfile}; see also the description above. Example: @@ -3338,8 +3472,8 @@ the description above. Example: \stoptyping This primitive (especially the \type{\pdfmapline{=...}} variant) is useful -for temporary quick checks of a~new font map entry during development, -before finally putting it into a~map file. +for temporary quick checks of a new font map entry during development, +before finally putting it into a map file. \type{\pdfmapline {}} like \type{\pdfmapfile {}} blocks reading of the default map file, if it comes early enough in the \TeX\ @@ -3347,7 +3481,7 @@ input. \introduced{1.20a} \pdftexprimitive {\Syntax {\Tex {\pdftracingfonts} \Whatever{integer}}} -\bookmark{\type{\pdftracingfonts}} +\bookmark{\tex{pdftracingfonts}} This integer parameter specifies the level of verbosity for info about expanded fonts given in the log, \eg\ when \type{\tracingoutput=1}. @@ -3366,64 +3500,223 @@ together with the font size, \eg: ...\xivtt (cmtt10+20@14.0pt) t \stoptyping -Setting \type{\pdftracingfonts} to a~value other than~0 or~1 is not +Setting \type{\pdftracingfonts} to a value other than~0 or~1 is not recommended, to allow future extensions. \introduced{1.30.0} \pdftexprimitive {\Syntax {\Tex {\pdfmovechars} \Whatever{integer}}} -\bookmark{\type{\pdfmovechars}} +\bookmark{\tex{pdfmovechars}} Since \PDFTEX\ version 1.30.0 the primitive \type{\pdfmovechars} is obsolete, -and its use merely leads to a~warning. (This primitive specified whether +and its use merely leads to a warning. (This primitive specified whether \PDFTEX\ should try to move characters in range 0..31 to higher slots; its sole purpose was to remedy certain bugs of early \PDF\ viewers.) \pdftexprimitive {\Syntax {\Tex {\pdfpkmode} \Whatever{tokens}}} -\bookmark{\type{\pdfpkmode}} +\bookmark{\tex{pdfpkmode}} -The \type{\pdfpkmode} is a~token register that sets the \METAFONT\ mode for +The \type{\pdfpkmode} is a token register that sets the \METAFONT\ mode for pixel font generation. The contents of this register is dumped into the format, so one can (optionally) preset it \eg\ in \type{pdftexconfig.tex}. \introduced{1.30.0} \pdftexprimitive {\Syntax {\Tex {\pdfnoligatures} \Something{font}}} -\bookmark{\type{\pdfnoligatures}} +\bookmark{\tex{pdfnoligatures}} -This diables all ligatures in the loaded font \Something{font}. +This disables all ligatures in the loaded font \Something{font}. \introduced{1.30.0} +\pdftexprimitive {\Syntax {\Tex {\tagcode} \Something{font} \Something{character code} \Whatever{integer}}} + +\bookmark{\tex{tagcode}} + +This primitive accesses a character's \type{char_tag} info. It is meant +to delete \type{lig_tag} (the character's ligature/kerning program), +\type{list_tag} (which indicates that the character belongs to a chain of +ascending sizes) and/or \type{ext_tag} (which indicates that the character +is extensible), with the following options: assigning \type{-7} or smaller +clears all tags, \type{-6} clears \type{ext_tag} and \type{list_tag}, +\type{-5} clears \type{ext_tag} and \type{lig_tag}, \type{-4} clears +\type{ext_tag}, \type{-3} clears \type{list_tag} and \type{lig_tag}, +\type{-2} clears \type{list_tag}, \type{-1} clears \type{lig_tag}, +and \type{0} or larger does nothing. Changes are irreversible and global. + +Conversely, when queried, the primitive returns \type{0} if the tag's +value is \type{no_tag}, \type{1} if \type{lig_tag} is set, \type{2} if +\type{list_tag} is set or \type{4} (not~3) if \type{ext_tag} is set. + +\pdftexprimitive {\Syntax {\Tex {\pdfgentounicode} \Whatever{integer}}} + +If set to \type{1} when the job ends, a mapping from glyph names to +Unicode characters will be created for the fonts used in the documents +(such a mapping is called a CMap), to allow \PDF\ readers to extract +text content (e.g. for searching). Most fonts use standard names for +characters, so the mapping is generally automatic and shouldn't be set +manually. Otherwise, the following command must be used. + +\pdftexprimitive {\Syntax {\Tex {\pdfglyphtounicode} \Something{general text} \Something{general text}}} + +The first argument is the name of a glyph, the second is a string of Unicode +numeric values denoting characters. For instance: + +\starttyping +\pdfgentounicode=1 +\pdfglyphtounicode{ff}{0066066} +\stoptyping + +\noindent maps the \type{ff} ligature to a pair of \type{f}'s (whose +code is \type{U+0066}). + +%*********************************************************************** + +\subsection{Spacing} + +Controlling spacing before and after characters was introduced in version 1.30, +mostly to handle punctuation rules in different languages. + +\pdftexprimitive{\Syntax {\Tex{\pdfadjustinterwordglue} \Whatever{integer}}} + +\bookmark{\tex{pdfadjustinterwordglue}} + +If positive, adjustment of interword glue is enabled and controlled by the +following three primitives. + +\pdftexprimitive {\Syntax {\Tex {\knbscode} \Something{font} \Something{8-bit number} \Whatever{integer}}} + +\bookmark{\tex{knbscode}} + +The amount of space, in thousandths of an em, added to the glue following +a character. This amounts is clipped to the range \type{-1000}||\type{1000}. +For instance, the following example means that glues after periods will be +increased by .2\,em. + +\starttyping +\pdfadjustinterwordglue=1 +\knsbcode\font`\.=200 +\stoptyping + +\pdftexprimitive {\Syntax {\Tex {\stbscode} \Something{font} \Something{8-bit number} \Whatever{integer}}} + +\bookmark{\tex{stbscode}} + +This works like \type{\knbscode}, but applies to the stretch component of +the following glue. + +\pdftexprimitive {\Syntax {\Tex {\shbscode} \Something{font} \Something{8-bit number} \Whatever{integer}}} + +\bookmark{\tex{shbscode}} + +Like \type{\stbscode}, but for the shrink component. + +\pdftexprimitive{\Syntax {\Tex{\pdfprependkern} \Whatever{integer}}} + +\bookmark{\tex{pdfprependkern}} + +If positive, automatic insertion of kerns before characters is enabled. + +\pdftexprimitive {\Syntax {\Tex {\knbccode} \Something{font} \Something{8-bit number} \Whatever{integer}}} + +\bookmark{\tex{knbccode}} + +The width of the kern, in thousandths of an em, inserted before a character. +It is clipped to the range \type{-1000}||\type{1000}. For instance, with the +following code, a .15\,em-kern will be inserted before all question marks +(useful for e.g. French punctuation): + +\starttyping +\pdfprependkern=1 +\knbccode\font`\?=150 +\stoptyping + +\pdftexprimitive{\Syntax {\Tex{\pdfappendkern} \Whatever{integer}}} + +\bookmark{\tex{pdfappendkern}} + +Same as \type{\pdfprependkern}, but for kerns inserted after characters. + +\pdftexprimitive {\Syntax {\Tex {\knaccode} \Something{font} \Something{8-bit number} \Whatever{integer}}} + +\bookmark{\tex{knaccode}} + +Same as \type{\knbccode}, except the kern is inserted after the character. +Such a kern is required for instance after a left guillemet in French punctuation. + +%*********************************************************************** + +\subsection{Vertical adjustments} + +\pdftexprimitive {\Syntax {\Tex{\pdfignoreddimen} \Whatever{dimension}}} + +\bookmark{\tex{pdfignoreddimen}} + +This is the dimension which must assigned to the following four primitives +so they are ignored. Default is \type{-1000pt}, and it should be modified +with care since it also influences when a previous paragraph's depth is ignored +(for instance, the plain \TEX\ macro \type{\nointerlineskip} should be +modified accordingly). + +\pdftexprimitive {\Syntax {\Tex {\pdffirstlineheight} \Whatever{dimension}}} + +\bookmark{\tex{pdffirstlineheight}} + +This parameter specifies the height of the first line of a paragraph, +regardless of its content. It is read when the paragraph builder is +called, and ignored when set to \type{\pdfignoreddimen}. By default, +it is set to \type{-1000pt}, so it is ignored as long as the value +of \type{\pdfignoreddimen} is the same. + +\pdftexprimitive {\Syntax {\Tex {\pdflastlinedepth} \Whatever{dimension}}} + +\bookmark{\tex{pdflastlinedepth}} + +This is similar to the previous parameter, but affects the last line's +depth of a paragraph. + +\pdftexprimitive {\Syntax {\Tex {\pdfeachlineheight} \Whatever{dimension}}} + +\bookmark{\tex{pdfeachlineheight}} + +Similar to \type{\pdffirstlineheight}, but for all lines of a paragraph, +including the first one, unless \type{\pdffirstlineheight} is specified. + +\pdftexprimitive {\Syntax {\Tex {\pdfeachlinedepth} \Whatever{dimension}}} + +\bookmark{\tex{pdfeachlinedepth}} + +Like the preceding parameter, but for depth. + %*********************************************************************** \subsection{\PDF\ objects} \pdftexprimitive {\Syntax {\Tex {\pdfobj} \Something{object type spec}}} -\bookmark{\type{\pdfobj}} +\bookmark{\tex{pdfobj}} -This command creates a~raw \PDF\ object that is written to the \PDF\ file as -\type{1 0 obj} \unknown\ \type{endobj}. The object is written to \PDF\ output as -provided by the user. When \Something{object type spec} is not given, \PDFTEX\ -does not any longer create a~dictionary object with contents \Something{general text}, -as it was in the past. +This command creates a raw \PDF\ object that is written to the \PDF\ +file as \type{1 0 obj} \unknown\ \type{endobj}. The object is written to +\PDF\ output as provided by the user. When \Something{object type spec} +is not given, \PDFTEX\ no longer creates a dictionary object with +contents \Something{general text}, as it did in the past. -When however \Something{object type spec} is given as \Something{attr spec} -\Literal{stream}, the object will be created as a~stream with contents -\Something{general text} and additional attributes in \Something{attr -spec}\unkern. +When, however, \Something{object type spec} is given as \Something{attr +spec} \Literal{stream}, the object will be created as a stream with +contents \Something{general text} and additional attributes in +\Something{attr spec}\unkern. When \Something{object type spec} is given as \Something{attr spec} -\Literal{file}, then the \Something{general text} will be treated as a~file +\Literal{file}, then the \Something{general text} will be treated as a file name and its contents will be copied into the stream contents. When \Something{object type spec} is given as \type{reserveobjnum}, -just a~new object number is reserved. The number of the reserved object +just a new object number is reserved. The number of the reserved object is accessible via \type{\pdflastobj}. The object can later be filled with contents by \Syntax{\Tex{\pdfobj} \Literal{useobjnum} \Something{number} \Lbrace\Something{balanced text}\Rbrace}. -But the reserved object number can already be be used before by other -objects, which provides a~forward||referencing mechanism. +But the reserved object number can already be used before by other +objects, which provides a forward||referencing mechanism. The object is kept in memory and will be written to the \PDF\ output only when its number is referred to by \type{\pdfrefobj} or when \type{\pdfobj} @@ -3433,16 +3726,16 @@ built. The number of the most recently created object is accessible via \pdftexprimitive {\Syntax {\Tex {\pdflastobj} \Whatever{read||only integer}}} -\bookmark{\type{\pdflastobj}} +\bookmark{\tex{pdflastobj}} This command returns the object number of the last object created by \type {\pdfobj}. \pdftexprimitive {\Syntax {\Tex {\pdfrefobj} \Something{object number}}} -\bookmark{\type{\pdfrefobj}} +\bookmark{\tex{pdfrefobj}} -This command appends a~whatsit node to the list being built. When the whatsit +This command appends a whatsit node to the list being built. When the whatsit node is searched at shipout time, \PDFTEX\ will write the object \Something{object number} to the \PDF\ output if it has not been written yet. @@ -3453,7 +3746,7 @@ to the \PDF\ output if it has not been written yet. \pdftexprimitive {\Syntax {\Tex {\pdfpagesattr} \Whatever{tokens}}} -\bookmark{\type{\pdfpagesattr}} +\bookmark{\tex{pdfpagesattr}} \PDFTEX\ expands this token list when it finishes the \PDF\ output and adds the resulting character stream to the root \type{Pages} object. When defined, @@ -3474,22 +3767,22 @@ printed. \pdftexprimitive {\Syntax {\Tex {\pdfpageattr} \Whatever{tokens}}} -\bookmark{\type{\pdfpageattr}} +\bookmark{\tex{pdfpageattr}} This is similar to \type{\pdfpagesattr}, but has priority over it. It can be used to override any attribute given by \type{\pdfpagesattr} for individual pages. The token list is expanded when \PDFTEX\ ships out -a~page. The contents are added to the attributes of the current page. +a page. The contents are added to the attributes of the current page. \pdftexprimitive {\Syntax {\Tex {\pdfpageref} \Something{page number} \Whatever{expandable}}} -\bookmark{\type{\pdfpageref}} +\bookmark{\tex{pdfpageref}} -This primitive expands to the number of the page object that contains the -dictionary for page \Something{page number}. If the page \Something{page -number} does not exist, a~warning will be issued, a~fresh unused \PDF\ -object will be generated, and \type{\pdfpageref} will expand to that -object number. +This primitive expands to the number of the page object that contains +the dictionary for page \Something{page number}. If the page +\Something{page number} does not exist, a warning will be issued, +a fresh unused \PDF\ object will be generated, and \type{\pdfpageref} +will expand to that object number. \Eg, if the dictionary for page~5 of the \TEX\ document is contained in \PDF\ object no.~18, \tex{pdfpageref5} expands to the number 18. @@ -3498,9 +3791,9 @@ object number. \subsection{Form XObjects} -The next three primitives support a~\PDF\ feature called \quote {object -reuse} in \PDFTEX. The idea is first to create a~`form XObject' in -\PDF. The content of this object corresponds to the content of a~\TEX\ +The next three primitives support a \PDF\ feature called \quote {object +reuse} in \PDFTEX. The idea is first to create a `form XObject' in +\PDF. The content of this object corresponds to the content of a \TEX\ box; it can contain pictures and references to other form XObjects as well. After creation, the form XObject can be used multiple times by simply referring to its object number. This feature can be useful @@ -3514,12 +3807,12 @@ text typeset by \TEX. \pdftexprimitive {\Syntax {\Tex {\pdfxform} \Optional{\Something{attr spec}} \Optional{\Something{resources spec}} \Something{box number}}} -\bookmark{\type{\pdfxform}} +\bookmark{\tex{pdfxform}} -This command creates a~form XObject corresponding to the contents of the +This command creates a form XObject corresponding to the contents of the box \Something{box number}. The box can contain other raw objects, form XObjects, or images as well. It can however {\em not} contain annotations -because they are laid out on a~separate layer, are positioned absolutely, +because they are laid out on a separate layer, are positioned absolutely, and have dedicated housekeeping. \type{\pdfxform} makes the box void, as \type{\box} does. @@ -3533,7 +3826,7 @@ and takes priority over later ones. \pdftexprimitive {\Syntax {\Tex {\pdfrefxform} \Something{object number}}} -\bookmark{\type{\pdfrefxform}} +\bookmark{\tex{pdfrefxform}} The form XObject is kept in memory and will be written to the \PDF\ output only when its object number is referred to by \type{\pdfrefxform} @@ -3541,40 +3834,40 @@ or when \type{\pdfxform} is preceded by \type{\immediate}. Nothing is appended to the list being built. The number of the most recently created form XObject is accessible via \type {\pdflastxform}. -When issued, \type{\pdfrefxform} appends a~whatsit node to the list being +When issued, \type{\pdfrefxform} appends a whatsit node to the list being built. When the whatsit node is searched at shipout time, \PDFTEX\ will write the form \Something{object number} to the \PDF\ output if it is not written yet. \pdftexprimitive {\Syntax {\Tex {\pdflastxform}} \Whatever{read||only integer}} -\bookmark{\type{\pdflastxform}} +\bookmark{\tex{pdflastxform}} The object number of the most recently created form XObject is accessible via \type {\pdflastxform}. As said, this feature can be used for reusing information. This mechanism -also plays a~role in typesetting fill||in forms. Such widgets sometimes +also plays a role in typesetting fill||in forms. Such widgets sometimes depends on visuals that show up on user request, but are hidden otherwise. \pdftexprimitive {\Syntax {\Tex {\pdfxformname} \Something{object number} \Whatever{expandable}}} -\bookmark{\type{\pdfxformname}} +\bookmark{\tex{pdfxformname}} -In \PDF\ files produced by \PDFTEX\ one can recognize a~form Xobject by -the prefix~\type{/Fm} followed by a~number, for instance \type{/Fm2}. -For a~given form XObject number, this primitive expands to the number -in the corresponding form XObject name. \Eg, if \type{/Fm2} corresponds -to some form XObject with object number 7, the \type{\pdfxformname7} +In \PDF\ files produced by \PDFTEX\ one can recognize a form Xobject by +the prefix~\type{/Fm} followed by a number, for instance \type{/Fm2}. +For a given form XObject number, this primitive expands to the number in +the corresponding form XObject name. \Eg, if \type{/Fm2} corresponds to +some form XObject with object number 7, the \type{\pdfxformname7} expands to the number~\type{2}. \introduced{1.30.0} %*********************************************************************** \subsection{Graphics inclusion} -\PDF\ provides a~mechanism for embedding graphic and textual objects: form +\PDF\ provides a mechanism for embedding graphic and textual objects: form XObjects. In \PDFTEX\ this mechanism is accessed by means of \type{\pdfxform}, -\type{\pdflastxform} and \type{\pdfrefxform}. A~special kind of XObjects +\type{\pdflastxform} and \type{\pdfrefxform}. A special kind of XObjects are bitmap graphics and for manipulating them similar commands are provided. \pdftexprimitive {\Syntax { @@ -3587,23 +3880,25 @@ are bitmap graphics and for manipulating them similar commands are provided. \Something{general text} }} -\bookmark{\type{\pdfximage}} +\bookmark{\tex{pdfximage}} This command creates an image object. The dimensions of the image can be -controlled via \Something{rule spec}\unkern. The default values are zero for depth -and \quote {running} for height and width. If all of them are given, the -image will be scaled to fit the specified values. If some (but not -all) are given, the rest will be set to a~value corresponding to the -remaining ones so as to make the image size to yield the same proportion of -$width : (height+depth)$ as the original image size, where depth is treated -as zero. If none are given then the image will take its natural size. - -An image inserted at its natural size often has a~resolution of \type -{\pdfimageresolution} (see below) given in dots per inch in the output file, -but some images may contain data specifying the image resolution, and in such -a~case the image will be scaled to the correct resolution. The dimensions of -an image can be accessed by enclosing the \type{\pdfrefximage} command to -a~box and checking the dimensions of the box: +controlled via \Something{rule spec}\unkern. The default values are zero +for depth and \quote {running} for height and width. If all of them are +given, the image will be scaled to fit the specified values. If some +(but not all) are given, the rest will be set to a value corresponding +to the remaining ones so as to make the image size to yield the same +proportion of $width : (height+depth)$ as the original image size, where +depth is treated as zero. If none are given then the image will take its +natural size. + +An image inserted at its natural size often has a resolution of \type +{\pdfimageresolution} (see below) given in dots per inch in the output +file, but some images may contain data specifying the image resolution, +and in such a case the image will be scaled to the correct +resolution. The dimensions of an image can be accessed by enclosing the +\type{\pdfrefximage} command to a box and checking the dimensions of the +box: \starttyping \setbox0=\hbox{\pdfximage{somefile.png}\pdfrefximage\pdflastximage} @@ -3621,7 +3916,7 @@ The image type is specified by the extension of the given file name: and \type{.pdf} for \PDF\ file. But once \PDFTEX\ has opened the file, it checks the file type first by looking to the magic number at the file start, which gets precedence over the file name extension. This -gives a~certain degree of fault tolerance, if the file name extension +gives a certain degree of fault tolerance, if the file name extension is stated wrongly. Similarly to \type{\pdfxform}, the optional text given by \Something{attr @@ -3634,9 +3929,10 @@ While working with \PDF\ or \JBIG2\ images, \Something{page spec} allows to decide which page of the document is to be included; the \Something{page spec} is irrelevant for the other two image formats. Starting from \PDFTEX\ 1.11 one may also decide in the \PDF\ -image case, which page box of the image is to be treated as a~final +image case, which page box of the image is to be treated as a final bounding box. If \Something{pdf box spec} is present, it overrides the -default behaviour specified by the \type{\pdfforcepagebox} parameter. This +default behaviour specified by the \type{\pdfpagebox} parameter, and is +overridden by the (obsolete) \type{\pdfforcepagebox} parameter. This option is irrelevant for non||\PDF\ inclusions. Starting from \PDFTEX\ 1.21, \type{\pdfximage} command supports @@ -3647,13 +3943,13 @@ images have always self||contained color space information. \pdftexprimitive {\Syntax {\Tex {\pdfrefximage} \Something{integer}}} -\bookmark{\type{\pdfrefximage}} +\bookmark{\tex{pdfrefximage}} The image is kept in memory and will be written to the \PDF\ output only when its number is referred to by \type{\pdfrefximage} or \type{\pdfximage} is preceded by \type{\immediate}. Nothing is appended to the list being built. -\type{\pdfrefximage} appends a~whatsit node to the list being built. When +\type{\pdfrefximage} appends a whatsit node to the list being built. When the whatsit node is searched at shipout time, \PDFTEX\ will write the image with number \Something{integer} to the \PDF\ output if it has not been written yet. @@ -3661,30 +3957,54 @@ written yet. \pdftexprimitive {\Syntax {\Tex {\pdflastximage} \Whatever{read||only integer}}} -\bookmark{\type{\pdflastximage}} +\bookmark{\tex{pdflastximage}} The number of the most recently created XObject image is accessible via \type {\pdflastximage}. +\pdftexprimitive {\Syntax {\Tex {\pdfximagebbox} \Something{integer} \Something{integer} \Whatever{expandable}}} + +\bookmark{\tex{pdfximagebbox}} + +The dimensions of the bounding box of a \PDF\ image loaded with +\type{\pdfximage} are stored in a table. This primitive returns those +dimensions as follows: + +\starttyping +\pdfximage{afile.pdf} +\pdfximagebbox\pdflastximage 1 % Returns lower-left x +\pdfximagebbox\pdflastximage 2 % Returns lower-left y +\pdfximagebbox\pdflastximage 3 % Returns upper-right x +\pdfximagebbox\pdflastximage 4 % Returns upper-right y +\stoptyping + +\pdftexprimitive {\Syntax {\Tex {\pdflastximagecolordepth} \Whatever{read||only +integer}}} + +\bookmark{\tex{pdflastximagecolordepth}} + +The color depth (\type{1} for 1-bit images, \type{2} for 2-bit images, +and so on) of the last image accessed with \type{\pdfximage}. + \pdftexprimitive {\Syntax {\Tex {\pdflastximagepages} \Whatever{read||only integer}}} -\bookmark{\type{\pdflastximagepages}} +\bookmark{\tex{pdflastximagepages}} -This read||only register returns the highest page number from a~file +This read||only register returns the highest page number from a file previously accessed via the \type{\pdfximage} command. This is useful only for \PDF\ files; it always returns \type{1} for \PNG, \JPEG, or \JBIGTWO\ files. \pdftexprimitive {\Syntax {\Tex {\pdfimageresolution} \Whatever{integer}}} -\bookmark{\type{\pdfimageresolution}} +\bookmark{\tex{pdfimageresolution}} The integer \type{\pdfimageresolution} parameter (unit: dots per -inch, dpi) is a~last resort value, used only for bitmap (\JPEG, \PNG, +inch, dpi) is a last resort value, used only for bitmap (\JPEG, \PNG, \JBIGTWO) images, but not for \PDF{}s. The priorities are as follows: Often one image dimension (\type{width} or \type{height}) is stated -explicitely in the \TEX\ file. Then the image is properly scaled so +explicitly in the \TEX\ file. Then the image is properly scaled so that the aspect ratio is kept. If both image dimensions are given, the image will be stretched accordingly, whereby the aspect ratio might get distorted. Only if no image dimension is given in the \TEX\ file, @@ -3693,19 +4013,30 @@ using the $x$ and $y$ resolution values normally contained in the image file. If one of these resolution values is missing or weird (either $<$~0 or $>$~65535), the \type{\pdfimageresolution} value will be used for both $x$ and $y$ resolution, when calculating the image size. And -if the \type{\pdfimageresolution} is zero, finally a~default resolution +if the \type{\pdfimageresolution} is zero, finally a default resolution of 72\,dpi would be taken. The \type{\pdfimageresolution} is read when \PDFTEX\ creates an image via \type{\pdfximage}. The given value is clipped to the range 0..65535\,[dpi]. Currently this parameter is used particularly for calculating the dimensions of \JPEG\ images in \EXIF\ format (unless at least one -dimension is stated explicitely); the resolution values coming with \EXIF\ -files are currently ignored. +dimension is stated explicitly); the resolution values coming with +\EXIF\ files are currently ignored. + +\pdftexprimitive {\Syntax {\Tex {\pdfpagebox} \Whatever{integer}}} + +\bookmark{\tex{pdfpagebox}} + +When \PDF\ files are included, the command \type{\pdfximage} allows the +selection of which \PDF\ page box to use in the optional field +\Something{image attr spec}\unkern. If the option isn't present, the +page box defaults to the value of \type{\pdfpagebox} as follows: +(1)~media box, (2)~crop box, (3)~bleed box, (4)~trim box, and +(5)~artbox. \pdftexprimitive {\Syntax {\Tex {\pdfforcepagebox} \Whatever{integer}}} -\bookmark{\type{\pdfforcepagebox}} +\bookmark{\tex{pdfforcepagebox}} %- It is now possible to specify the pdf page box to use when including pdfs. % The syntax has been extended: @@ -3716,69 +4047,68 @@ files are currently ignored. % previous versions of pdfTeX. % The page box specified at \pdfximage can be globally overridden with the % config parameter always_use_pdfpagebox and the command -% \pdfoptionalwaysusepdfpagebox <integer>, where 0 is the default (use whatever -% is specified with \pdfximage), 1 is media, 2 is crop, 3 is bleed, 4 is trim -% and 5 is artbox. This can only be set once per object, i.\,e.\ the value used at -% \pdfximage is remembered. +% \pdfoptionalwaysusepdfpagebox <integer>, where 0 is the default (use +% whatever is specified with \pdfximage), 1 is media, 2 is crop, 3 is +% bleed, 4 is trim and 5 is artbox. This can only be set once per +% object, i.\,e.\ the value used at \pdfximage is remembered. % See the PDF Reference for an explanation of the boxes. -When \PDF\ files are included, the command \type{\pdfximage} allows the selection -of which \PDF\ page box to use in the optional field \Something{image attr -spec}\unkern. The integer primitive \type{\pdfforcepagebox} allows to globally -override this choice by giving them one of the following values: (1) media box, -(2) crop box, (3) bleed box, (4) trim box, and (5) artbox. The command is -available starting from \PDFTEX\ 1.30.0, as a~shortened synonym of obsolete -\type{\pdfoptionalwaysusepdfpagebox} instruction. +The integer primitive \type{\pdfforcepagebox} allows to globally +override the choice of the page box used with \type{\pdfximage}. It +takes the same values as \type{\pdfpagebox}. The command is available +starting from \PDFTEX\ 1.30.0, as a shortened synonym of obsolete +\type{\pdfoptionalwaysusepdfpagebox} instruction, but is itself +now considered obsolete --- a mixture of \type{\pdfpagebox} and +\Something{image attr spec} is better. \pdftexprimitive {\Syntax {\Tex {\pdfinclusionerrorlevel} \Whatever{integer}}} -\bookmark{\type{\pdfinclusionerrorlevel}} +\bookmark{\tex{pdfinclusionerrorlevel}} -This controls the behaviour of \PDFTEX\ when a~\PDF\ file is included -that has a~newer version than the one specified by this primitive: -If it is set to~0, \pdfTeX\ gives only a~warning; if it's~1, \pdfTeX\ -raises an error. The command has been introduced in \PDFTEX\ 1.30.0 as -a~shortened synonym of \type{\pdfoptionpdfinclusionerrorlevel}, that is +This controls the behaviour of \PDFTEX\ when a \PDF\ file is included +that has a newer version than the one specified by this primitive: If it +is set to~0, \PDFTEX\ gives only a warning; if it's~1, \PDFTEX\ raises +an error. The command has been introduced in \PDFTEX\ 1.30.0 as +a shortened synonym of \type{\pdfoptionpdfinclusionerrorlevel}, that is now obsolete. \pdftexprimitive {\Syntax {\Tex {\pdfimagehicolor} \Whatever{integer}}} -\bookmark{\type{\pdfimagehicolor}} +\bookmark{\tex{pdfimagehicolor}} This primitive, when set to~1, enables embedding of \PNG\ images with -16~bit wide color channels at their full color resolution. As such -an embedding mode is defined only from \PDF\ version~1.5 onwards, -the \type{\pdfimagehicolor} functionality is automatically disabled -in \PDFTEX\ if \type{\pdfminorversion}~$<$~5; then each 16~bit -color channel is reduced to a~width of 8~bit by stripping the lower 8~bits -before embedding. The same stripping happens when \type{\pdfimagehicolor} -is set to~0. For \type{\pdfminorversion}~$\ge$~5 the default -value of \type{\pdfimagehicolor} is~1. If specified, the parameter -must appear before any data is written to the \PDF\ output. +16~bit wide color channels at their full color resolution. As such an +embedding mode is defined only from \PDF\ version~1.5 onwards, the +\type{\pdfimagehicolor} functionality is automatically disabled in +\PDFTEX\ if \type{\pdfminorversion}~$<$~5; then each 16~bit color +channel is reduced to a width of 8~bit by stripping the lower 8~bits +before embedding. The same stripping happens when +\type{\pdfimagehicolor} is set to~0. For \type{\pdfminorversion}~$\ge$~5 +the default value of \type{\pdfimagehicolor} is~1. If specified, the +parameter must appear before any data is written to the \PDF\ output. \introduced{1.30.0} \pdftexprimitive {\Syntax {\Tex {\pdfimageapplygamma} \Whatever{integer}}} -\bookmark{\type{\pdfimageapplygamma}} +\bookmark{\tex{pdfimageapplygamma}} This primitive, when set to~1, enables gamma correction while embedding \PNG\ images, taking the values of the primitives \type {\pdfgamma} as well as the gamma value embedded in the \PNG\ image into account. When -\type{\pdfimageapplygamma} is set to~0, no gamma correction is performed. -If specified, the parameter must appear before any data is written to the -\PDF\ output. -\introduced{1.30.0} +\type{\pdfimageapplygamma} is set to~0, no gamma correction is +performed. If specified, the parameter must appear before any data is +written to the \PDF\ output. \introduced{1.30.0} \pdftexprimitive {\Syntax {\Tex {\pdfgamma} \Whatever{integer}}} -\bookmark{\type{\pdfgamma}} +\bookmark{\tex{pdfgamma}} This primitive defines the `device gamma' for \PDFTEX. Values are in -promilles (same as for \type{\mag}). The default value of this primitive -is~1000, defining a~device gamma value of~1.0. +promilles (same as \type{\mag}). The default value of this primitive +is~1000, defining a device gamma value of~1.0. -When \type{\pdfimageapplygamma} is set to~1, then whenever a~\PNG\ image -is included, \PDFTEX\ applies a~gamma correction. This correction is +When \type{\pdfimageapplygamma} is set to~1, then whenever a \PNG\ image +is included, \PDFTEX\ applies a gamma correction. This correction is based on the value of the \type{\pdfgamma} primitive and the `assumed device gamma' that is derived from the value embedded in the actual image. If no embedded value can be found in the \PNG\ image, then the @@ -3789,17 +4119,17 @@ If specified, the parameter must appear before any data is written to the \pdftexprimitive {\Syntax {\Tex {\pdfimagegamma} \Whatever{integer}}} -\bookmark{\type{\pdfimagegamma}} +\bookmark{\tex{pdfimagegamma}} -This primitive gives a~default `assumed gamma' value for \PNG\ images. +This primitive gives a default `assumed gamma' value for \PNG\ images. Values are in promilles (same as for \type{\pdfamma}). The default value of this primitive is~2200, implying an assumed gamma value of~2.2. When \PDFTEX\ is applying gamma corrections, images that do not have an embedded `assumed gamma' value are assumed to have been created for -a~device with a~gamma of 2.2. Experiments show that this default setting -is correct for a~large number of images; however, if your images come -out too dark, you probably want to set \type{\pdfimagegamma} to a~lower +a device with a gamma of 2.2. Experiments show that this default setting +is correct for a large number of images; however, if your images come +out too dark, you probably want to set \type{\pdfimagegamma} to a lower value, like~1000. If specified, the parameter must appear before any data is written to the \PDF\ output. @@ -3807,12 +4137,12 @@ If specified, the parameter must appear before any data is written to the \pdftexprimitive {\Syntax {\Tex {\pdfpxdimen} \Whatever{dimen}}} -\bookmark{\type{\pdfpxdimen}} +\bookmark{\tex{pdfpxdimen}} While working with bitmap graphics or typesetting electronic documents, it might be convenient to base dimensions on pixels rather than \TeX's standard units like \type{pt} or \type{em}. For this purpose, \PDFTEX\ -provides an~extra unit called \type{px} that takes the dimension given to +provides an extra unit called \type{px} that takes the dimension given to the \type{\pdfpxdimen} primitive. In example, to make the unit \type{px} corresponding to 96\,dpi pixel density (then 1\,px~=~72/96\,bp), one can do the following calculation: @@ -3825,13 +4155,23 @@ can do the following calculation: Then \type{\hsize} amounts to 1200~pixels in 96\,dpi, which is exactly 903.375\,pt (but \TeX\ rounds it to 903.36914\,pt). The -default value of \type{\pdfpxdimen} is 1\,bp, corresponding to a~pixel +default value of \type{\pdfpxdimen} is 1\,bp, corresponding to a pixel density of 72\,dpi. This primitive is completely independent from the \type{\pdfimageresolution} and \type{\pdfpkresolution} parameters. \introduced{1.30.0} It used to be an integer register that gave the dimension 1\,px as number of scaled points, defaulting to 65536 (1\,px equal to 65536\,sp~$=$~1\,pt). Starting from \PDFTEX\ 1.40.0, -\type{\pdfpxdimen} is now a~real dimension parameter. +\type{\pdfpxdimen} is now a real dimension parameter. + +\pdftexprimitive {\Syntax {\Tex{\pdfinclusioncopyfonts} \Whatever{integer}}} + +\bookmark{\tex{pdfinclusioncopyfonts}} + +If positive, this parameter forces \PDFTEX\ to include fonts from a \PDF\ +file loaded with \type{\pdfximage}, even if those fonts are available on +disk. Bigger files might be created, but included \PDF\ files are sure to +be embedded with the adequate fonts; indeed, the fonts on disk might be +different from the embedded ones, and glyphs might be missing. %*********************************************************************** @@ -3846,7 +4186,7 @@ the dimension 1\,px as number of scaled points, defaulting to 65536 \item sound fragments \stopitemize -The first type differs from the other three in that there is a~designated +The first type differs from the other three in that there is a designated area involved on which one can click, or when moved over some action occurs. \PDFTEX\ is able to calculate this area, as we will see later. All annotations can be supported using the next two general annotation @@ -3854,21 +4194,22 @@ primitives. \pdftexprimitive {\Syntax {\Tex {\pdfannot} \Something{annot type spec}}} -\bookmark{\type{\pdfannot}} +\bookmark{\tex{pdfannot}} -This command appends a~whatsit node corresponding to an annotation to the -list being built. The dimensions of the annotation can be controlled via the -\Something{rule spec}. The default values are running for all width, height -and depth. When an annotation is written out, running dimensions will take -the corresponding values from the box containing the whatsit node -representing the annotation. The \Something{general text} is inserted as raw -\PDF\ code to the contents of annotation. The annotation is written out only -if the corresponding whatsit node is searched at shipout time. +This command appends a whatsit node corresponding to an annotation to +the list being built. The dimensions of the annotation can be controlled +via the \Something{rule spec}. The default values are running for all +width, height and depth. When an annotation is written out, running +dimensions will take the corresponding values from the box containing +the whatsit node representing the annotation. The \Something{general +text} is inserted as raw \PDF\ code to the contents of annotation. The +annotation is written out only if the corresponding whatsit node is +searched at shipout time. \pdftexprimitive {\Syntax {\Tex {\pdflastannot} \Whatever{read||only integer}}} -\bookmark{\type{\pdflastannot}} +\bookmark{\tex{pdflastannot}} This primitive returns the object number of the last annotation created by \type{\pdfannot}. These two primitives allow users to create any annotation @@ -3879,21 +4220,21 @@ that cannot be created by \type{\pdfstartlink} (see below). \subsection[linking]{Destinations and links} The first type of annotation, mentioned above, is implemented by three -primitives. The first one is used to define a~specific location as being +primitives. The first one is used to define a specific location as being referred to. This location is tied to the page, not the exact location on the -page. The main reason for this is that \PDF\ maintains a~dedicated list of +page. The main reason for this is that \PDF\ maintains a dedicated list of these annotations |<|and some more when optimized|>| for the sole purpose of speed. \pdftexprimitive {\Syntax {\Tex {\pdfdest} \Something{dest spec}}} -\bookmark{\type{\pdfdest}} +\bookmark{\tex{pdfdest}} -This primitive appends a~whatsit node which establishes a~destination for -links and bookmark outlines; the link is identified by either a~number or -a~symbolic name, and the way the viewer is to display the page must be -specified in \Something{dest type}\unkern, which must be one of those mentioned in -\in{table}[appearance]. +This primitive appends a whatsit node which establishes a destination +for links and bookmark outlines; the link is identified by either +a number or a symbolic name, and the way the viewer is to display the +page must be specified in \Something{dest type}\unkern, which must be +one of those mentioned in \in{table}[appearance]. \startbuffer \starttabulate[|l|l|] @@ -3917,7 +4258,7 @@ specified in \Something{dest type}\unkern, which must be one of those mentioned {\getbuffer} The specification \Literal {xyz} can optionally be followed by \Literal -{zoom} \Something{integer} to provide a~fixed zoom||in. The \Something +{zoom} \Something{integer} to provide a fixed zoom||in. The \Something {integer} is processed like \TEX\ magnification, i.\,e.\ 1000 is the normal page view. When \Literal {zoom} \Something{integer} is given, the zoom factor changes to 0.001 of the \Something{integer} value, @@ -3929,26 +4270,27 @@ searched at shipout time. \pdftexprimitive {\Syntax {\Tex {\pdfstartlink} \Optional{\Something{rule spec}} \Optional{\Something{attr spec}} \Something{action spec}}} -\bookmark{\type{\pdfstartlink}} +\bookmark{\tex{pdfstartlink}} -This primitive is used along with \type{\pdfendlink} and appends a~whatsit -node corresponding to the start of a~hyperlink. The whatsit node representing -the end of the hyperlink is created by \type{\pdfendlink}. The dimensions of -the link are handled in the similar way as in \type{\pdfannot}. Both \type -{\pdfstartlink} and \type{\pdfendlink} must be in the same level of box -nesting. A~hyperlink with running width can be multi||line or even -multi||page, in which case all horizontal boxes with the same nesting level -as the boxes containing \type{\pdfstartlink} and \type{\pdfendlink} will be -treated as part of the hyperlink. The hyperlink is written out only if the -corresponding whatsit node is searched at shipout time. +This primitive is used along with \type{\pdfendlink} and appends +a whatsit node corresponding to the start of a hyperlink. The whatsit +node representing the end of the hyperlink is created by +\type{\pdfendlink}. The dimensions of the link are handled in the +similar way as in \type{\pdfannot}. Both \type {\pdfstartlink} and +\type{\pdfendlink} must be in the same level of box nesting. A hyperlink +with running width can be multi||line or even multi||page, in which case +all horizontal boxes with the same nesting level as the boxes containing +\type{\pdfstartlink} and \type{\pdfendlink} will be treated as part of +the hyperlink. The hyperlink is written out only if the corresponding +whatsit node is searched at shipout time. Additional attributes, which are explained in great detail in the \PDFReference, can be given via \Something{attr spec}\unkern. Typically, the attributes specify the color and thickness of any border around -the link. Thus \typ {/C [0.9 0 0] /Border [0 0 2]} specifies a~color -(in \RGB) of dark red, and a~border thickness of 2~points. +the link. Thus \typ {/C [0.9 0 0] /Border [0 0 2]} specifies a color +(in \RGB) of dark red, and a border thickness of 2~points. -While all graphics and text in a~\PDF\ document have relative positions, +While all graphics and text in a \PDF\ document have relative positions, annotations have internally hard||coded absolute positions. Again this is for the sake of speed optimization. The main disadvantage is that these annotations do {\em not} obey transformations issued by \type @@ -3956,29 +4298,30 @@ annotations do {\em not} obey transformations issued by \type The \Something{action spec} specifies the action that should be performed when the hyperlink is activated while the \Something{user-action spec} -performs a~user||defined action. A~typical use of the latter is to specify -a~\URL, like \typ {/S /URI /URI (http://www.tug.org/)}, or a~named action like +performs a user||defined action. A typical use of the latter is to specify +a \URL, like \typ {/S /URI /URI (http://www.tug.org/)}, or a named action like \typ {/S /Named /N /NextPage}. - A~\Something{goto-action spec} performs a~GoTo action. Here \Something +A \Something{goto-action spec} performs a GoTo action. Here \Something {numid} and \Something{nameid} specify the destination identifier (see below). The \Something{page spec} specifies the page number of the destination, in this case the zoom factor is given by \Something{general -text}\unkern. A~destination can be performed in another \PDF\ file by specifying -\Something{file spec}\unkern, in which case \Something{newwindow spec} specifies -whether the file should be opened in a~new window. A~\Something{file spec} -can be either a~\type{(string)} or a~\type{<<dictionary>>}. The default -behaviour of the \Something{newwindow spec} depends on the browser setting. +text}\unkern. A destination can be performed in another \PDF\ file by +specifying \Something{file spec}\unkern, in which case +\Something{newwindow spec} specifies whether the file should be opened +in a new window. A \Something{file spec} can be either a \type{(string)} +or a \type{<<dictionary>>}. The default behaviour of the +\Something{newwindow spec} depends on the browser setting. - A~\Something{thread-action spec} performs an article thread reading. The -thread identifier is similar to the destination identifier. A~thread can be -performed in another \PDF\ file by specifying a~\Something{file spec}\unkern. +A \Something{thread-action spec} performs an article thread reading. The +thread identifier is similar to the destination identifier. A thread can be +performed in another \PDF\ file by specifying a \Something{file spec}\unkern. \pdftexprimitive {\Syntax {\Tex {\pdfendlink}}} -\bookmark{\type{\pdfendlink}} +\bookmark{\tex{pdfendlink}} -This primitive ends a~link started with \type{\pdfstartlink}. All text +This primitive ends a link started with \type{\pdfstartlink}. All text between \type{\pdfstartlink} and \type{\pdfendlink} will be treated as part of this link. \PDFTEX\ may break the result across lines (or pages), in which case it will make several links with the same content. @@ -3986,7 +4329,7 @@ case it will make several links with the same content. \pdftexprimitive {\Syntax {\Tex {\pdflastlink} \Whatever{read||only integer}}} -\bookmark{\type{\pdflastlink}} +\bookmark{\tex{pdflastlink}} This primitive returns the object number of the last link created by \type{\pdfstartlink} (analogous to \type{\pdflastannot}). @@ -3994,14 +4337,14 @@ This primitive returns the object number of the last link created by \pdftexprimitive {\Syntax {\Tex {\pdflinkmargin} \Whatever{dimension}}} -\bookmark{\type{\pdflinkmargin}} +\bookmark{\tex{pdflinkmargin}} This dimension parameter specifies the margin of the box representing -a~hyperlink and is read when a~page containing hyperlinks is shipped out. +a hyperlink and is read when a page containing hyperlinks is shipped out. \pdftexprimitive {\Syntax {\Tex {\pdfdestmargin} \Whatever{dimension}}} -\bookmark{\type{\pdfdestmargin}} +\bookmark{\tex{pdfdestmargin}} Margin added to the dimensions of the rectangle around the destinations. @@ -4013,7 +4356,7 @@ Margin added to the dimensions of the rectangle around the destinations. \Optional{\Something{attr spec}} \Something{action spec} \Optional{\Literal {count} \Something{integer}} \Something{general text}}} -\bookmark{\type{\pdfoutline}} +\bookmark{\tex{pdfoutline}} This primitive creates an outline (or bookmark) entry. The first parameter specifies the action to be taken, and is the same as that allowed for \type @@ -4033,19 +4376,19 @@ is written to the \PDF\ output immediately. \Optional{\Something{rule spec}} \Optional {\Something{attr spec}} \Something{id spec}}} -\bookmark{\type{\pdfthread}} +\bookmark{\tex{pdfthread}} -Defines a~bead within an article thread. Thread beads with same +Defines a bead within an article thread. Thread beads with same identifiers (spread across the document) will be joined together. \pdftexprimitive {\Syntax {\Tex {\pdftstarthread} \Optional{\Something{rule spec}} \Optional {\Something{attr spec}} \Something{id spec}}} -\bookmark{\type{\pdfstartthread}} +\bookmark{\tex{pdfstartthread}} This uses the same syntax as \type{\pdfthread}, apart that it must be -followed by a~\type{\pdfendthread}. \type{\pdfstartthread} and the +followed by a \type{\pdfendthread}. \type{\pdfstartthread} and the corresponding \type{\pdfendthread} must end up in vboxes with the same nesting level; all vboxes between them will be added into the thread. Note that during output runtime if there are other newly created @@ -4053,19 +4396,19 @@ boxes which have the same nesting level as the vbox/vboxes containing \type{\pdfstartthread} and \type{\pdfendthread}, they will be also added into the thread, which is probably not what you want. To avoid such unconsidered behaviour, it's often enough to wrap boxes that shouldn't -belong to the thread by a~box to change their box nesting level. +belong to the thread by a box to change their box nesting level. \pdftexprimitive {\Syntax {\Tex {\pdfendthread}}} -\bookmark{\type{\pdfendthread}} +\bookmark{\tex{pdfendthread}} This ends an article thread started before by \type{\pdfstartthread}. \pdftexprimitive {\Syntax {\Tex {\pdfthreadmargin} \Whatever{dimension}}} -\bookmark{\type{\pdfthreadmargin}} +\bookmark{\tex{pdfthreadmargin}} -Specifies a~margin to be added to the dimensions of a~bead within +Specifies a margin to be added to the dimensions of a bead within an article thread. %*********************************************************************** @@ -4075,47 +4418,49 @@ an article thread. \pdftexprimitive {\Syntax {\Tex {\pdfliteral} \Optional{\Something {pdfliteral spec}} \Something{general text}}} -\bookmark{\type{\pdfliteral}} +\bookmark{\tex{pdfliteral}} Like \type{\special} in normal \TEX, this command inserts raw \PDF\ code into the output. This allows support of color and text transformation. This primitive is heavily used in the \METAPOST\ -inclusion macros. Normally \PDFTEX\ ends a~text section in the \PDF\ +inclusion macros. Normally \PDFTEX\ ends a text section in the \PDF\ output and sets the transformation matrix to the current location on the page before inserting \Something{general text}\unkern, however this can be turned off by giving the optional keyword \Literal {direct}. This command -appends a~whatsit node to the list being built. \Something{general text} +appends a whatsit node to the list being built. \Something{general text} is expanded when the whatsit node is created and not when it is shipped out, as with \type{\special}. -Starting from version 1.30.0, \PDFTEX\ allows to use a~new keyword +Starting from version 1.30.0, \PDFTEX\ allows to use a new keyword \type{page} instead of \type{direct}. Both modify the default behaviour of \type{\pdfliteral}, avoiding translation of the coordinates space before inserting the literal code. The difference is that the \type{page} -keyword instructs \PDFTEX\ to close a~\type{BT ET} text block before +keyword instructs \PDFTEX\ to close a \type{BT ET} text block before inserting anything. It means that the literal code inserted refers to the origin (lower||left corner of the page) and can be safely enclosed with \type{q Q}. Note, that in most cases using \type{q Q} operators inside \type{\pdfliteral} with \type{direct} keyword will produce corrupted \PDF\ output, as the \PDF\ standard doesn't allow to do anything like -this within a~\type{BT ET} block. +this within a \type{BT ET} block. % HE: \unkern is a kludge here; wanted to have tight "{pdf:" \pdftexprimitive {\Syntax {\Tex {\special} \Lbrace\unkern\type{pdf:} \Something{text} \Rbrace}} -\bookmark{\type{\special}} +\bookmark{\tex{special}} -This is equivalent to \Syntax{\Tex{\pdfliteral} \Lbrace \Something{text} \Rbrace}. +This is equivalent to \Syntax{\Tex{\pdfliteral} \Lbrace \Something{text} +\Rbrace}. \pdftexprimitive {\Syntax {\Tex {\special} \Lbrace\unkern\type{pdf:direct:} \Something{text} \Rbrace}} -\bookmark{\type{\special\ direct}} +\bookmark{\tex{special\ direct}} -This is equivalent to \Syntax{\Tex{\pdfliteral} \Literal{direct} \Lbrace \Something{text} \Rbrace}. +This is equivalent to \Syntax{\Tex{\pdfliteral} \Literal{direct} \Lbrace +\Something{text} \Rbrace}. \pdftexprimitive {\Syntax {\Tex {\special} \Lbrace\unkern\type{pdf:page:} \Something{text} \Rbrace}} -\bookmark{\type{\special\ page}} +\bookmark{\tex{special\ page}} This is equivalent to \Syntax{\Tex{\pdfliteral} \Literal{page} \Lbrace \Something{text} \Rbrace}. @@ -4123,65 +4468,98 @@ This is equivalent to \Syntax{\Tex{\pdfliteral} \Literal{page} \Lbrace \Somethin \subsection{Strings} -\pdftexprimitive {\Syntax {\Tex {\pdfescapestring} \Something {general text}}} +\pdftexprimitive {\Syntax {\Tex {\pdfescapestring} \Something {general text} \Whatever{expandable}}} -\bookmark{\type{\pdfescapestring}} +\bookmark{\tex{pdfescapestring}} -Starting from version 1.30.0, \PDFTEX\ provides a~mechanism for converting -a~general text into \PDF\ string. Many characters that may be needed inside -such a~text (especially parenthesis), have a~special meaning inside a~\PDF\ +Starting from version 1.30.0, \PDFTEX\ provides a mechanism for converting +a general text into \PDF\ string. Many characters that may be needed inside +such a text (especially parenthesis), have a special meaning inside a \PDF\ string object and thus, can't be used literally. The primitive replaces each -special \PDF\ character by its literal representation by inserting a~backslash +special \PDF\ character by its literal representation by inserting a backslash before that character. Some characters (\eg\ space) are also converted into 3||digit octal number. In example, \type{\pdfescapestring{Text (1)}} will be -expanded to \type{Text\040\(1\)}. This ensures a~literal interpretation of the +expanded to \type{Text\040\(1\)}. This ensures a literal interpretation of the text by the \PDF\ viewer. \introduced{1.30.0} -\pdftexprimitive {\Syntax {\Tex {\pdfescapename} \Something {general text}}} +\pdftexprimitive {\Syntax {\Tex {\pdfescapename} \Something {general text} \Whatever{expandable}}} -\bookmark{\type{\pdfescapename}} +\bookmark{\tex{pdfescapename}} In analogy to \type{\pdfescapestring}, \type{\pdfescapename} replaces each special \PDF\ character inside the general text by its hexadecimal representation preceded by \type{#} character. This ensures the proper -interpretation of the text if used as a~\PDF\ name object. In example, +interpretation of the text if used as a \PDF\ name object. In example, \type{Text (1)} will be replaced by \type{Text#20#281#29}. \introduced{1.30.0} -\pdftexprimitive {\Syntax {\Tex {\pdfescapehex} \Something {general text}}} +\pdftexprimitive {\Syntax {\Tex {\pdfescapehex} \Something {general text} \Whatever{expandable}}} -\bookmark{\type{\pdfescapehex}} +\bookmark{\tex{pdfescapehex}} This command converts each character of \Something{general text} into its -hexadecimal representation. Each character of the argument becomes a~pair of +hexadecimal representation. Each character of the argument becomes a pair of hexadecimal digits. \introduced{1.30.0} -\pdftexprimitive {\Syntax {\Tex {\pdfunescapehex} \Something {general text}}} +\pdftexprimitive {\Syntax {\Tex {\pdfunescapehex} \Something {general text} \Whatever{expandable}}} -\bookmark{\type{\pdfunescapehex}} +\bookmark{\tex{pdfunescapehex}} This command treats each character pair of \Something {general text} as -a~hexadecimal number and returns an \ASCII\ character of this code. +a hexadecimal number and returns an \ASCII\ character of this code. \introduced{1.30.0} -% Currently it's only experimental, so don't really document it -\iffalse \pdftexprimitive {\Syntax {\Tex {\pdfstrcmp} \Something{general text} \Something{general text} \Whatever{expandable}}} -\bookmark{\type{\pdfstrcmp}} +\bookmark{\tex{pdfstrcmp}} + +This command compares two strings and expands to \type{0} if the strings +are equal, to \type{-1} if the first string ranks before the second, and +to \type{1} otherwise. \introduced{1.30.0} + +\pdftexprimitive {\Syntax {\Tex {\pdfmatch} \Optional{\Literal{icase}} \Optional{\Literal{subcount} \Something{integer}} +\Something{general text} \Something{general text} \Whatever{expandable}}} -This command compares two strings and expands to 0 if the strings are -equal, to $-1$ if the first string is $<$ then the second, and to $+1$ if -the first is $>$ than the second. +\bookmark{\tex{pdfmatch}} + +This command implements pattern matching (using the syntax of \POSIX\ +regular expressions). The first \Something{general text} is a pattern, +the second is a string, and the command expands to \type{-1} if the +pattern is invalid, to \type{0} if no match is found, and to \type{1} if +a match is found. With the \type{icase} option, the matching is +case-insensitive. The \type{subcount} option sets the size of the table +storing found (sub)patterns. \introduced{1.30.0} + +\pdftexprimitive {\Syntax {\Tex {\pdflastmatch} \Something{integer} \Whatever{expandable}}} + +\bookmark{\tex{pdflastmatch}} + +The matches found with \type{\pdfmatch} are stored in a table. This command +returns the entry \Something{integer}. Entry~0 contains the match, and +the following entries contain submatches corresponding to the subpatterns +(up to \type{subcount-1}); all matches are preceded by their positions, +separated by \type{->}. If the position is \type{-1} and the match is +empty, it means that the subpattern corresponding to that entry wasn't found. +For instance: + +\starttyping +\pdfmatch subcount 3 {ab(cd)*ef(gh)(ij)}{abefghij} +\pdflastmatch0 % "0->abefghij" +\pdflastmatch1 % "-1->" +\pdflastmatch2 % "4->gh" +\pdflastmatch3 % "-1->" +\stoptyping + +Entry~1 is empty because no match was found for \type{cd}, and entry~3 +is empty because it exceeds the table's size, as set by \type{subcount}. \introduced{1.30.0} -\fi \pdftexprimitive{\Syntax {\Tex {\pdfmdfivesum} \Something{general text} \Whatever{expandable}}} -\bookmark{\type{\pdfmdfivesum}} +\bookmark{\tex{pdfmdfivesum}} This command expands to the \MDFIVE\ of \Something{general text} in uppercase hexadecimal format (same as \type{\pdfescapehex}). @@ -4191,44 +4569,45 @@ hexadecimal format (same as \type{\pdfescapehex}). \subsection{Numbers} -\pdftexprimitive{\Syntax {\Tex {\ifpdfabsnum}} \Something{number}} +\pdftexprimitive{\Syntax {\Tex {\ifpdfabsnum} \Whatever{expandable}}} -\bookmark{\type{\ifpdfabsnum}} +\bookmark{\tex{ifpdfabsnum}} -The primitive works as normal \type{\ifnum} condition check, except that it compares -absolute values of numbers. Although it seems to be a~trivial shortcut for a~couple of -\type{\ifnum x<0} tests, as a~primitive it is more friendly in usage and works a~bit faster. +This primitive works like the standard \type{\ifnum} condition check, +except that it compares absolute values of numbers. Although it seems to +be a trivial shortcut for a couple of \type{\ifnum x<0} tests, as a +primitive it is more friendly in usage and works a bit faster. \introduced{1.40.0} -\pdftexprimitive{\Syntax {\Tex {\ifpdfabsdim}} \Something{dimen}} +\pdftexprimitive{\Syntax {\Tex {\ifpdfabsdim} \Whatever{expandable}}} -\bookmark{\type{\ifpdfabsdim}} +\bookmark{\tex{ifpdfabsdim}} Like \type{\ifpdfabsnum}, the primitive works as normal \type{\ifdim} condition check, except that it compares absolute values of dimensions. \introduced{1.40.0} \pdftexprimitive{\Syntax {\Tex {\pdfuniformdeviate} \Something{number} \Whatever{expandable}}} -\bookmark{\type{\pdfuniformdeviate}} +\bookmark{\tex{pdfuniformdeviate}} -The commands generates a~uniformly distributed random integer value between +The commands generates a uniformly distributed random integer value between 0 (inclusive) and \Something{number} (exclusive). This primitive expands to -a~list of tokens. \introduced{1.30.0} +a list of tokens. \introduced{1.30.0} \pdftexprimitive{\Syntax {\Tex {\pdfnormaldeviate} \Whatever{expandable}}} -\bookmark{\type{\pdfnormaldeviate}} +\bookmark{\tex{pdfnormaldeviate}} %MS Hopefully the random number doesn't influce the length of this paragraph; %MS otherwise texexec could loop :-) -The commands generates a~random integer value with a~mean of 0 and a~unit -of 65\,536, \eg\ $\pdfnormaldeviate$. This primitive expands to a~list of +The commands generates a random integer value with a mean of 0 and a unit +of 65\,536, \eg\ $\pdfnormaldeviate$. This primitive expands to a list of tokens. \introduced{1.30.0} \pdftexprimitive {\Syntax {\Tex {\pdfrandomseed}} \Whatever{read||only integer}} -\bookmark{\type{\pdfrandomseed}} +\bookmark{\tex{pdfrandomseed}} You can use \type{\the\pdfrandomseed} to query the current seed value, so you can \eg\ write the value to the log file. @@ -4238,10 +4617,10 @@ commands like \type{\count}). \introduced{1.30.0} \pdftexprimitive{\Syntax {\Tex {\pdfsetrandomseed} \Something{number}}} -\bookmark{\type{\pdfsetrandomseed}} +\bookmark{\tex{pdfsetrandomseed}} -This sets the random seed (\type{\pdfrandomseed}) to a~specific value, -allowing you to re-play sequences of semi-randoms at a~later moment. +This sets the random seed (\type{\pdfrandomseed}) to a specific value, +allowing you to re-play sequences of semi-randoms at a later moment. \introduced{1.30.0} %*********************************************************************** @@ -4251,19 +4630,19 @@ allowing you to re-play sequences of semi-randoms at a~later moment. \pdftexprimitive {\Syntax {\Tex {\pdfelapsedtime}} \Whatever{read||only integer}} -\bookmark{\type{\pdfelapsedtime}} +\bookmark{\tex{pdfelapsedtime}} -The command expands to a~number that represents the time elapsed from the +The command returns a number that represents the time elapsed from the moment of run start. The elapsed time is returned in `scaled seconds', that means seconds divided by 65536, \eg\ \PDFTEX\ has run for \the\pdfelapsedtime\ `scaled seconds' when this paragraph was typeset. Obviously, the command will -never return a~value greater than the highest number available in \TeX: if +never return a value greater than the highest number available in \TeX: if the time exceeds 32767 seconds, the constant value $2^{31}-1$ will be returned. \introduced{1.30.0} \pdftexprimitive{\type{\pdfresettimer}} -\bookmark{\type{\pdfresettimer}} +\bookmark{\tex{pdfresettimer}} The command resets the internal timer so that \type{\pdfelapsedtime} starts returning micro||time from~0 again. \introduced{1.30.0} @@ -4275,7 +4654,7 @@ starts returning micro||time from~0 again. \introduced{1.30.0} \pdftexprimitive{\Syntax {\Tex {\pdffilemoddate} \Something{general text} \Whatever{expandable}}} -\bookmark{\type{\pdffilemoddate}} +\bookmark{\tex{pdffilemoddate}} Expands to the modification date of file \Something{general text} in the same format as for \type{\pdfcreationdate}, \eg\ it's {\tt \pdffilemoddate @@ -4285,7 +4664,7 @@ format as for \type{\pdfcreationdate}, \eg\ it's {\tt \pdffilemoddate \pdftexprimitive{\Syntax {\Tex {\pdffilesize} \Something{general text} \Whatever{expandable}}} -\bookmark{\type{\pdffilesize}} +\bookmark{\tex{pdffilesize}} Expands to the size of file \Something{general text}, \eg\ it's {\tt \pdffilesize {./pdftex-t.tex}} for the source of this manual. @@ -4294,18 +4673,18 @@ Expands to the size of file \Something{general text}, \eg\ it's {\tt \pdftexprimitive{\Syntax {\Tex {\pdfmdfivesum} file \Something{general text} \Whatever{expandable}}} -\bookmark{\type{\pdfmdfivesum\ file}} +\bookmark{\tex{pdfmdfivesum\ file}} Expands to the \MDFIVE\ of file \Something{general text} in uppercase hexadecimal format (same as \type{\pdfescapehex}), \eg\ it's {\tt \pdfmdfivesum file {./pdftex-t.tex}} for the source of this manual. \introduced{1.30.0} -\pdftexprimitive{\Syntax {\Tex {\pdffiledump} \Optional{offset -\Something{number}} \Optional{length \Something{number}} \Something{general +\pdftexprimitive{\Syntax {\Tex {\pdffiledump} \Optional{\Literal{offset} +\Something{number}} \Optional{\Literal{length} \Something{number}} \Something{general text} \Whatever{expandable}}} -\bookmark{\type{\pdffiledump}} +\bookmark{\tex{pdffiledump}} Expands to the dump of the file \Something{general text} in uppercase hexadecimal format (same as \type{\pdfescapehex}), starting at offset @@ -4315,18 +4694,18 @@ bytes of the source of this manual are {\tt \pdffiledump length 10 %*********************************************************************** -\subsection{Colourstack} +\subsection{Color stack} -\PDFTEX\ 1.40.0 comes with a colour stack support (actually any graphic state +\PDFTEX\ 1.40.0 comes with color stack support (actually any graphic state stack). \pdftexprimitive{\Syntax { -\Tex {\pdfcolorstackinit} \Optional{page} \Optional{direct} \Something{general text} +\Tex {\pdfcolorstackinit} \Optional{\Literal{page}} \Optional{\Literal{direct}} \Something{general text} \Whatever{expandable}}} -\bookmark{\type{\pdfcolorstackinit}} +\bookmark{\tex{pdfcolorstackinit}} -The primitive initializes new graphic stack and returns its number. Optional +The primitive initializes a new graphic stack and returns its number. Optional \Literal{page} keyword instructs \PDFTEX\ to restore the graphic at the beginning of every new page. Also optional \Literal{direct} has the same effect as for \Tex{\pdfliteral} primitive. \introduced{1.40.0} @@ -4335,14 +4714,15 @@ as for \Tex{\pdfliteral} primitive. \introduced{1.40.0} \Tex {\pdfcolorstack} \Something{stack number} \Something{stack action} \Something{general text}}} -\bookmark{\type{\pdfcolorstack}} +\bookmark{\tex{pdfcolorstack}} -The command operates on the stack of a given number. If \Something{stack action} -is \Literal{push} keyword, the new value provided as \Something{general text} -is inserted into the top of the graphic stack and becomes the current stack -value. If followed by \Literal{pop}, the top value is removed from the stack -and the new top value becomes the current. \Literal{set} keyword replaces the -current value with \Something{general text} without changing the stack size. +The command operates on the stack of a given number. If \Something{stack +action} is \Literal{push} keyword, the new value provided as +\Something{general text} is inserted into the top of the graphic stack +and becomes the current stack value. If followed by \Literal{pop}, the +top value is removed from the stack and the new top value becomes the +current. \Literal{set} keyword replaces the current value with +\Something{general text} without changing the stack size. \Literal{current} keyword instructs just to use the current stack value without modifying the stack at all. \introduced{1.40.0} @@ -4358,27 +4738,28 @@ problem with three new primitives. \pdftexprimitive{\Syntax {\Tex {\pdfsetmatrix}}} -\bookmark{\type{\pdfsetmatrix}} +\bookmark{\tex{pdfsetmatrix}} -Afine transformations are normally expressed with six numbers. First four -(no unit) values defining scaling, rotating and skewing, plus two extra -dimensions for shifting. Since the translation is handled by \TeX\ itself, -\Tex{\pdfsetmatrix} primitive expects as an argument a string containing -just first four numbers of the transformation separated by a space and assumes two -position coordinates to be 0. In example, \type{\pdfsetmatrix{0.87 -0.5 0.5 0.87}} -rotates the current space by 30 degrees, inserting \type{0.87 -0.5 0.5 0.87 0 0 cm} -into the content stream. \introduced{1.40.0} +Afine transformations are normally expressed with six numbers. First +four (no unit) values defining scaling, rotating and skewing, plus two +extra dimensions for shifting. Since the translation is handled by \TeX\ +itself, \Tex{\pdfsetmatrix} primitive expects as an argument a string +containing just the first four numbers of the transformation separated +by a space and assumes two position coordinates to be~0. In example, +\type{\pdfsetmatrix{0.87 -0.5 0.5 0.87}} rotates the current space by 30 +degrees, inserting \type{0.87 -0.5 0.5 0.87 0 0 cm} into the content +stream. \introduced{1.40.0} \pdftexprimitive{\Syntax {\Tex {\pdfsave}}} -\bookmark{\type{\pdfsave}} +\bookmark{\tex{pdfsave}} -The command saves the current transformation by inserting \type{q} operator into the -content stream. \introduced{1.40.0} +The command saves the current transformation by inserting \type{q} +operator into the content stream. \introduced{1.40.0} \pdftexprimitive{\Syntax {\Tex {\pdfrestore}}} -\bookmark{\type{\pdfrestore}} +\bookmark{\tex{pdfrestore}} The command restores previously saved transformation by inserting \type{Q} operator into the content stream. One should keep in mind that \Tex{\pdfsave} @@ -4389,144 +4770,188 @@ and end at the same group level. \introduced{1.40.0} \subsection{Miscellaneous} -\pdftexprimitive {\Syntax {\Tex {\vadjust} - \Optional{\Something{pre spec}} \Something{filler} - \Lbrace \Something{vertical mode material} \Rbrace }} +\pdftexprimitive {\Syntax {\tex {ifincsname} \Whatever{expandable}}} -\bookmark{\type{\vadjust}} +\bookmark{\tex{ifincsname}} -The \type{\vadjust} implementation of \PDFTEX\ adds an optional -qualifier \Something{pre spec} (which is the string \type{pre}) to -the original \TEX\ primitive with the same name. As long as there is -no \type{pre} given, \type{\vadjust} behaves exactly as the original -(see the \TEX book, p.~281); it appends an adjustment item created -from \Something{vertical mode material} to the current list {\em after} -the line in which \type{\vadjust} appears. However with the qualifier -\type{pre}, the adjustment item is put {\em before} the line in which -\type{\vadjust pre} appears. +This conditional is true if evaluated inside \type{\csname ... \endcsname}, +and false otherwise. -\pdftexprimitive {\Syntax {\Tex {\quitvmode}}} -\bookmark{\type{\quitvmode}} +\pdftexprimitive {\Syntax {\tex {ifpdfprimitive} \Something{control sequence} \Whatever{expandable}}} -The primitive instructs \PDFTEX\ to quit the vertical mode and start typesetting -a~paragraph. \type{\quitvmode} has the same effect as \type{\leavevmode} definition -from \type{plain} macro package. Note however, that \type{\leavevmode} may conflict -with \type{\everypar} tokens list. No such risk while using \type{\quitvmode} instead. -\introduced{1.21a} +\bookmark{\tex{ifpdfprimitive}} +This condition checks if the following control sequence has its +primitive meaning. If it has, \type{\ifpdfprimitive} returns true. In +any other case (redefined, made \type{\undefined}, has never been +primitive) false is returned. \introduced{1.40.0} -\pdftexprimitive {\Syntax {\Tex {\pdfsavepos}}} -\bookmark{\type{\pdfsavepos}} +\pdftexprimitive {\Syntax {\Tex {\pdfcreationdate} \Whatever{expandable}}} + +\bookmark{\tex{pdfcreationdate}} + +Expands to the date string \PDFTEX\ uses in the info dictionary of the +document, \eg\ for this file {\tt\pdfcreationdate}. \introduced{1.30.0} + + +\pdftexprimitive {\Syntax {\tex {pdfdraftmode} \Whatever{integer}}} + +\bookmark{\tex{pdfdraftmode}} + +When set to 1 (or set by the command-line switch \type{-draftmode}) +\PDFTEX\ doesn't write the output \PDF\ file and doesn't actually read any +images but does everything else (including writing auxiliary files), +thus speeding up compilations when you know you need an extra run but +don't care about the output, e.g. just to get the \BIBTEX\ references +right. \introduced{1.40.0} + + +\pdftexprimitive {\Syntax {\Tex{\pdfinsertht} \Something{integer} \Whatever{expandable}}} + +\bookmark{\tex{pdfinsertht}} + +If \Something{integer} is the number of an insertion class, this command +returns the height of the corresponding box at the current time. +For instance, the following returns \type{12pt} in plain \TEX: + +\starttyping +Abc\footnote*{Whatever.}\par +\pdfinsertht\footins +\stoptyping -This primitive marks the current absolute ($x,y$) position on the -media, with the reference point in the lower left corner. It is active -only during page shipout, when the page is finally assembled. The -position coordinates can then be retrieved by the \type{\pdflastxpos} -and \type{\pdflastypos} primitives, and \eg\ written out to some -auxiliary file. The coordinates can be used only after the current -\type{\shipout} has been finalized, therefore normally two \PDFTEX\ -runs are required to utilize these primitives. Starting with -\PDFTEX\ 1.40.0, this mechanism can be used also while running -in \DVI\ mode. \pdftexprimitive {\Syntax {\Tex {\pdflastxpos}} \Whatever{read||only integer}} -\bookmark{\type{\pdflastxpos}} +\bookmark{\tex{pdflastxpos}} This primitive returns an integer number representing the absolute $x$ coordinate of the last point marked by \type{\pdfsavepos}. The unit is `scaled points' (sp). + \pdftexprimitive {\Syntax {\Tex {\pdflastypos}} \Whatever{read||only integer}} -\bookmark{\type{\pdflastypos}} +\bookmark{\tex{pdflastypos}} -This primitive works similar to \type{\pdflastxpos}, only it returns +This primitive works analogously to \type{\pdflastxpos}, only returning the $y$ coordinate. -\pdftexprimitive {\Syntax {\Tex {\pdftexversion} \Whatever{read||only integer}}} -\bookmark{\type{\pdftexversion}} -\def\versplit#1#2#3{#1.#2#3} +\pdftexprimitive {\Syntax {\tex {pdfprimitive} \Something{control sequence}}} -Returns the version of \PDFTEX\ multiplied by 100, \eg\ for \PDFTEX\ -version \expandafter\versplit\the\pdftexversion.\pdftexrevision\ used to -produce this document, it returns {\tt \number\pdftexversion}. +\bookmark{\tex{pdfprimitive}} -\pdftexprimitive {\Syntax {\Tex {\pdftexrevision} \Whatever{expandable}}} +This command executes the primitive meaning of the following control +sequence, if it has been redefined or made undefined. If the following +control sequence is undefined and never was a primitive, nothing happens +and no error is raised. If the control sequence was initially +expandable, \type{\pdfprimitive} expands either. Otherwise +\type{\pdfprimitive} doesn't expand. \introduced{1.40.0} + + +\pdftexprimitive {\Syntax {\Tex {\pdfretval} \Whatever{read||only +integer}}} + +\bookmark{\tex{pdfretval}} + +Set to $-1$ if \type{\pdfobj} ignores an invalid object number. Perhaps +this will be used to store the error status of other primitives in the +future. + + +\pdftexprimitive {\Syntax {\Tex {\pdfsavepos}}} + +\bookmark{\tex{pdfsavepos}} -\bookmark{\type{\pdftexrevision}} +This primitive marks the current absolute ($x,y$) position on the +media, with the reference point in the lower left corner. It is active +only during page shipout, when the page is finally assembled. The +position coordinates can then be retrieved by the \type{\pdflastxpos} +and \type{\pdflastypos} primitives, and \eg\ written out to some +auxiliary file. The coordinates can be used only after the current +\type{\shipout} has been finalized, therefore normally two \PDFTEX\ +runs are required to utilize these primitives. Starting with +\PDFTEX\ 1.40.0, this mechanism can be used also while running +in \DVI\ mode. + + +\pdftexprimitive {\Syntax {\Tex {\pdfshellescape} \Whatever{read||only +integer}}} + +\bookmark{\tex{pdfshellescape}} + +This primitive is~1 if \type{\write18} is enabled, 2 if it is +restricted, and 0 otherwise. (\type{\write18} was +\ifnum\pdfshellescape=0\relax not \fi enabled when this manual was +typeset.) \introduced{1.30.0} -Returns the revision letter of \PDFTEX, \eg\ for \PDFTEX\ version -\expandafter\versplit\the\pdftexversion.\pdftexrevision\ used to produce -this document, it returns the letter {\tt \pdftexrevision}. \pdftexprimitive {\Syntax {\Tex {\pdftexbanner} \Whatever{expandable}}} -\bookmark{\type{\pdftexbanner}} +\bookmark{\tex{pdftexbanner}} Returns the \PDFTEX\ banner message, \eg\ for the version used here: {\tt \pdftexbanner}. \introduced{1.20a} -\pdftexprimitive {\Syntax {\Tex {\pdfcreationdate} \Whatever{expandable}}} -\bookmark{\type{\pdfcreationdate}} +\pdftexprimitive {\Syntax {\Tex {\pdftexrevision} \Whatever{expandable}}} -Expands to the date string \PDFTEX\ uses in the info dictionary of the -document, \eg\ for this file {\tt\pdfcreationdate}. \introduced{1.30.0} +\bookmark{\tex{pdftexrevision}} -\pdftexprimitive {\Syntax {\Tex {\pdfshellescape} \Whatever{read||only -integer}}} +\def\versplit#1#2#3{#1.#2#3} -\bookmark{\type{\pdfshellescape}} +Returns the revision number of \PDFTEX, \eg\ for \PDFTEX\ version +\expandafter\versplit\the\pdftexversion.\pdftexrevision\ (used to produce +this document), it returns the number {\tt \pdftexrevision}. -This primitive is~1 if \type{\write18} is enabled, 0 otherwise. -\type{\write18} was \ifnum\pdfshellescape=0\relax not \fi enabled when this -manual was typeset. -\introduced{1.30.0} -\pdftexprimitive {\Syntax {\tex {ifpdfprimitive} \Something{control sequence} \Whatever{expandable}}} +\pdftexprimitive {\Syntax {\Tex {\pdftexversion} \Whatever{read||only integer}}} -\bookmark{\tex{ifpdfprimitive}} +\bookmark{\tex{pdftexversion}} -This condition checks if the following control sequence has its primitive -meaning. If it has, \type{\ifpdfprimitive} returns true. In any other case -(redefined, made \type{\undefined}, has never been primitive) false is returned. -\introduced{1.40.0} +Returns the version of \PDFTEX\ multiplied by 100, \eg\ for \PDFTEX\ +version \expandafter\versplit\the\pdftexversion.\pdftexrevision\ used to +produce this document, it returns {\tt \number\pdftexversion}. -\pdftexprimitive {\Syntax {\tex {pdfprimitive} \Something{control sequence}}} +\pdftexprimitive {\Syntax {\Tex {\quitvmode}}} -\bookmark{\type{\pdfprimitive}} +\bookmark{\tex{quitvmode}} -This command executes the primitive meaning of the following control sequence, -if it has been redefined or made undefined. If the following control sequence is -undefined and never was a~primitive, nothing happens and no error is raised. -If the control sequence was initially expandable, \type{\pdfprimitive} -expands either. Otherwise \type{\pdfprimitive} doesn't expand. \introduced{1.40.0} +The primitive instructs \PDFTEX\ to quit vertical mode and start +typesetting a paragraph. \type{\quitvmode} has the same effect as +\type{\leavevmode} definition from \type{plain} macro package. Note +however, that \type{\leavevmode} may conflict with \type{\everypar} +tokens list. No such risk while using \type{\quitvmode} instead. +\introduced{1.21a} -\pdftexprimitive {\Syntax {\tex {pdfdraftmode} \Whatever{integer}}} -\bookmark{\type{\pdfdraftmode}} +\pdftexprimitive {\Syntax {\Tex {\vadjust} + \Optional{\Something{pre spec}} \Something{filler} + \Lbrace \Something{vertical mode material} \Rbrace }} -%FIXME: -draftmode should be in tt; bibtex-logo is wrong -When set to 1 (or switched on by the commandline switch -draftmode) \PDFTEX\ -doesn't write the output pdf and doesn't actually read any images but does -everything else (including writing auxiliary files), thus speeding up -compilations when you know you need an extra run but don't care about the -output, e.g. just to get the \BIBTEX\ references right. -\introduced{1.40.0} +\bookmark{\tex{vadjust}} + +The \type{\vadjust} implementation of \PDFTEX\ adds an optional +qualifier \Something{pre spec} (which is the string \type{pre}) to +the original \TEX\ primitive with the same name. As long as there is +no \type{pre} given, \type{\vadjust} behaves exactly as the original +(see the \TEX book, p.~281); it appends an adjustment item created +from \Something{vertical mode material} to the current list {\em after} +the line in which \type{\vadjust} appears. However with the qualifier +\type{pre}, the adjustment item is put {\em before} the line in which +\type{\vadjust pre} appears. %*********************************************************************** -\section{Graphics and color} +\section{Graphics} \PDFTEX\ supports inclusion of pictures in \PNG, \JPEG, \JBIGTWO, and -\PDF\ format; a~few differences between these are discussed below. The +\PDF\ format; a few differences between these are discussed below. The most common technique with \TEX\ |<|the inclusion of \EPS\ figures|>| is replaced by \PDF\ inclusion. \EPS\ files can be converted to \PDF\ by \GHOSTSCRIPT, Adobe Distiller or other \POSTSCRIPT||to||\PDF\ converters. @@ -4534,21 +4959,21 @@ is replaced by \PDF\ inclusion. \EPS\ files can be converted to \PDF\ by The \PDF\ format is currently the most versatile source format for graphics embedding. \PDFTEX\ allows to insert arbitrary pages from \PDF\ files with their own fonts, graphics, and pixel images into -a~document. The cover page of this manual is an example of such an insert, -being a~one page document generated by \PDFTEX. +a document. The cover page of this manual is an example of such an insert, +being a one page document generated by \PDFTEX. -By default \PDFTEX\ takes the BoundingBox of a~\PDF\ file from its CropBox +By default \PDFTEX\ takes the BoundingBox of a \PDF\ file from its CropBox if available, otherwise from its MediaBox. This can be influenced by the \Something{pdf box spec} option to the \type{\pdfximage} primitive, -or by setting the \type{\pdfforcepagebox} primitive to -a~value corresponding to the wanted box type. +or by setting the \type{\pdfpagebox} or \type{\pdfforcepagebox} primitives to +a value corresponding to the wanted box type. -To get the right BoundingBox from a~\EPS\ file, before converting to \PDF, +To get the right BoundingBox from a \EPS\ file, before converting to \PDF, it is necessary to transform the \EPS\ file so that the start point is at the (0,0)~coordinate and the page size is set exactly corresponding -to the BoundingBox. A~\PERL\ script (\EPSTOPDF) for this purpose has been +to the BoundingBox. A \PERL\ script (\EPSTOPDF) for this purpose has been written. The \TEXUTIL\ utility script and the \PSTOPDF\ program that comes -with \GHOSTSCRIPT\ can so a~similar job. (Concerning this conversion, +with \GHOSTSCRIPT\ can so a similar job. (Concerning this conversion, they can handle complete directories, remove some garbage from files, takes precautions against duplicate conversion, etc.) @@ -4558,38 +4983,38 @@ alpha-channel of \PNG\ images is processed if available; this allows embedding of images with simple transparency. The \PNG\ format does not support the CMYK color model, which is sometimes required for print media (this often can be replaced by four component \JPEG\ in high quality or -lossless compression mode). Photos in \PNG\ format have a~rather weak +lossless compression mode). Photos in \PNG\ format have a rather weak compression; here the \JPEG\ format is preferable. Embedding \PNG\ images in the general case requires \PDFTEX\ to uncompress the pixel array and to re||compress it to the \PDF\ requirements; this -process often takes a~noticeable amount of time. Since \PDFTEX\ 1.30.0 -there is now a~fast \PNG\ embedding mode that goes without uncompressing; +process often takes a noticeable amount of time. Since \PDFTEX\ 1.30.0 +there is now a fast \PNG\ embedding mode that goes without uncompressing; the image data are directly copied into the \PDF\ stream, resulting in -a~much higher embedding speed. However this mode is only activated, if +a much higher embedding speed. However this mode is only activated, if the image array structure of the \PNG\ file is compatible with the \PDF\ image structure (\eg\ an interlaced \PNG\ image requires uncompressing to re||arrange the image lines). Luckily it seems that the most common \PNG\ files also allow fast copying. The use of gamma correction disables fast copying, as it requires calculations with individual pixels. Whether the -fast copy mode is used for a~\PNG\ image can be seen from the log file, +fast copy mode is used for a \PNG\ image can be seen from the log file, which then shows the string `(PNG copy)' after the \PNG\ file name. The \JPEG\ format is normally used in lossy mode; then it's ideal for embedding photos; it's not recommended for crisp images from synthetic -sources with a~limited amount of colors. +sources with a limited amount of colors. The \JBIGTWO\ format works only for bitonal (black and white) pixel images like scanned line and text documents, but for these it has -typically a~much higher compression ratio than the other two pixel +typically a much higher compression ratio than the other two pixel image formats. The \JBIGTWO\ format is part of the \PDF\ standard since version 1.5; native \JBIGTWO\ image inclusion is available in \PDFTEX\ -since version 1.40.0. A~\JBIGTWO\ file might contain many images, which -gives an even better compression ratio than with a~single image per file, +since version 1.40.0. A \JBIGTWO\ file might contain many images, which +gives an even better compression ratio than with a single image per file, as \JBIGTWO\ encoders can exploit similarities between bit patterns over several images. Encoders for \JBIGTWO\ can operate in lossy as well as -lossless modes. Only recently a~free \JBIGTWO\ encoder has been written -and made available, see http:/\!/www.imperialviolet.org/jbig2.html. +lossless modes. Only recently a free \JBIGTWO\ encoder has been written +and made available, see \from[jbig2enc]. Other options for graphics in \PDFTEX\ are: @@ -4604,18 +5029,18 @@ macro packages) can be redefined to produce literal \PDF, using some macros written by Hans Hagen. \description {\METAPOST} Although the output of \METAPOST\ is \POSTSCRIPT, -it is in a~highly simplified form, and a~\METAPOST\ to \PDF\ conversion +it is in a highly simplified form, and a \METAPOST\ to \PDF\ conversion (\MPTOPDF, written by Hans Hagen and Tanmoy Bhattacharya) is implemented -as a~set of macros which reads \METAPOST\ output and supports all of +as a set of macros which reads \METAPOST\ output and supports all of its features. For new work, the \METAPOST\ route is highly recommended. For the future, -Adobe has announced that they will define a~specification for \quote +Adobe has announced that they will define a specification for \quote {encapsulated \PDF}. The inclusion of raw \POSTSCRIPT\ commands |<|a technique utilized by for instance the \type{pstricks} package|>| cannot directly be -supported. Although \PDF\ is direct a~descendant of \POSTSCRIPT, it +supported. Although \PDF\ is direct a descendant of \POSTSCRIPT, it lacks any programming language commands, and cannot deal with arbitrary \POSTSCRIPT. @@ -4624,7 +5049,7 @@ lacks any programming language commands, and cannot deal with arbitrary \section{Character translation} Characters that are input to \PDFTEX\ are subject to optional -\TEX\ character translation (\TCX) under control of a~\TCX\ file. +\TEX\ character translation (\TCX) under control of a \TCX\ file. The \TCX\ maps the input character codes (\eg\ from \type{\input} or \type{\read}) to the character codes as seen by \PDFTEX. This mapping takes place before the characters enter \PDFTEX's `mouth'. If no \TCX\ @@ -4634,10 +5059,10 @@ is done. \TCX\ files consist of lines each containing one or two integer numbers in the range 0..255, either in decimal or hex notation. % strtol() C-function - A~comment sign \type{%} in a~\TCX\ line starts a~comment until the +A comment sign \type{%} in a \TCX\ line starts a comment until the end of line. The first number in each line is for matching the input character code, the second, optional number is the corresponding \TEX\ -character code. If a~line contains only one number, characters with +character code. If a line contains only one number, characters with this code enter \PDFTEX\ unchanged; no mapping is done. \TCX\ mapping also influences \PDFTEX\ output streams for \type{\message} and @@ -4645,15 +5070,15 @@ this code enter \PDFTEX\ unchanged; no mapping is done. the range 32..126 are flagged as `printable', meaning that these characters are output directly by \type{\message} and \type{\write} primitives. Characters outside the range 32..126 are instead output -in escaped form, \eg\ as \type{^^A} for a~character with code -\type{0x01}. When a~character code is mentioned in the 2nd column of the -\TCX\ file, or as the only value in a~line, it is flagged as `printable'. +in escaped form, \eg\ as \type{^^A} for a character with code +\type{0x01}. When a character code is mentioned in the 2nd column of the +\TCX\ file, or as the only value in a line, it is flagged as `printable'. During \type{\message} and \type{\write}, output characters are mapped in reverse direction: they are looked up in the 2nd column of the \TCX\ file and the corresponding values from the 1st column are output. Again, -if a~\PDFTEX\ character code is found as the only number in a~line, no -mapping is done. Mentioning a~character code as the only number on -a~line has the sole purpose to flag this code `printable'; remember that +if a \PDFTEX\ character code is found as the only number in a line, no +mapping is done. Mentioning a character code as the only number on +a line has the sole purpose to flag this code `printable'; remember that character within the range 32..126 are `printable' anyway. The characters output into the \PDF\ file, \eg\ by \type{\pdfliteral} @@ -4679,7 +5104,7 @@ manual. \section{Abbreviations} -In this document we used a~few abbreviations. For convenience we mention +In this document we use numerous abbreviations. For convenience we mention their meaning here. \placelistofabbreviations @@ -4691,11 +5116,11 @@ their meaning here. \section{Examples of HZ and protruding} In the following sections we will demonstrate \PDFTEX's protruding and -\HZ\ features, using a~text from E.~Tufte. This sample text has a~lot +\HZ\ features, using a text from E.~Tufte. This sample text has a lot of punctuation and often needs hyphenation. Former \PDFTEX\ versions had sometimes problems with combining these features, but from version 1.21a on it should be ok. If you still encounter problems, please try -to prepare a~small test file that demonstrates the problem and send it +to prepare a small test file that demonstrates the problem and send it to one of the maintainers. \startbuffer @@ -4720,7 +5145,7 @@ to one of the maintainers. {\em This section is based on the manual on keys written by Martin Schr\"oder, one of the maintainers of \PDFTEX.} - A~\PDF\ document should contain only the structures and attributes defined +A \PDF\ document should contain only the structures and attributes defined in the \PDF\ specification. However, the specification allows applications to insert additional keys, provided they follow certain rules. @@ -4748,7 +5173,7 @@ store custom metadata in the document information dictionary, it is inappropriate to store private content or structural information there; such information should be stored in the document catalog instead.} -Although it would seem more natural to put this infomation in the +Although it would seem more natural to put this information in the document information dictionary, we have to obey the rules laid down in the \PDFReference. The following key ends up in the document catalog. @@ -4837,50 +5262,50 @@ of this license document, but changing it is not allowed. \gnusubject{Preamble} -The purpose of this License is to make a~manual, textbook, or other +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 +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 +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 +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 +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 +whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. \gnusection{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 +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 {\bf ``Document''}, below, refers to any such manual or work. Any member of the public is -a~licensee, and is addressed as {\bf ``you''}. You accept the license if you -copy, modify or distribute the work in a~way requiring permission +a licensee, and is addressed as {\bf ``you''}. You accept the license if you +copy, modify or distribute the work in a way requiring permission under copyright law. - A~{\bf ``Modified Version''} of the Document means any work containing the -Document or a~portion of it, either copied verbatim, or with +A {\bf ``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~{\bf ``Secondary Section''} is a~named appendix or a~front-matter section of +A {\bf ``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 +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. @@ -4888,32 +5313,32 @@ them. The {\bf ``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 +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 {\bf ``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. +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~{\bf ``Transparent''} copy of the Document means a~machine-readable copy, -represented in a~format whose specification is available to the +A {\bf ``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 +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 \PDF\ viewers 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 {\bf ``Opaque''}. +of text. A copy that is not ``Transparent'' is called {\bf ``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 +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 @@ -4922,21 +5347,21 @@ processing tools are not generally available, and the machine-generated HTML, \POSTSCRIPT\ or \PDF\ produced by some word processors for output purposes only. -The {\bf ''Title Page''} means, for a~printed book, the title page itself, +The {\bf ''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. - A~section {\bf ``Entitled XYZ''} means a~named subunit of the Document whose +A section {\bf ``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 {\bf ``Acknowledgements''}, +a specific section name mentioned below, such as {\bf ``Acknowledgements''}, {\bf ``Dedications''}, {\bf ``Endorsements''}, or {\bf ``History''}.) To {\bf ``Preserve the Title''} -of such a~section when you modify the Document means that it remains -a~section ``Entitled XYZ'' according to this definition. +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 @@ -4955,7 +5380,7 @@ 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 +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 @@ -4983,11 +5408,11 @@ 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 +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 +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. +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 @@ -4997,24 +5422,24 @@ 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. +them a chance to provide you with an updated version of the Document. \gnusection{4}{MODIFICATIONS} -You may copy and distribute a~Modified Version of the Document under +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 +and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: \startitemize[A,packed] \item - Use in the Title Page (and on the covers, if any) a~title distinct + 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 + of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. \item @@ -5036,7 +5461,7 @@ of it. In addition, you must do these things in the Modified Version: adjacent to the other copyright notices. \item - Include, immediately after the copyright notices, a~license notice + 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. @@ -5058,10 +5483,10 @@ of it. In addition, you must do these things in the Modified Version: \item Preserve the network location, if any, given in the Document for - public access to a~Transparent copy of the Document, and likewise + 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 + 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. @@ -5077,7 +5502,7 @@ of it. In addition, you must do these things in the Modified Version: or the equivalent are not considered part of the section titles. \item - Delete any section Entitled ``Endorsements''. Such a~section + Delete any section Entitled ``Endorsements''. Such a section may not be included in the Modified Version. \item @@ -5095,18 +5520,18 @@ 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 +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. +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 +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 +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. @@ -5125,11 +5550,11 @@ 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 +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. +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. @@ -5141,21 +5566,21 @@ Entitled ``Endorsements''. \gnusection{6}{COLLECTIONS OF DOCUMENTS} -You may make a~collection consisting of the Document and other 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 +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 +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. \gnusection{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 +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. @@ -5173,20 +5598,20 @@ aggregate. \gnusection{8}{TRANSLATION} -Translation is considered a~kind of modification, so you may +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 +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 +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'', +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. @@ -5209,14 +5634,14 @@ 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 +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 +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. +as a draft) by the Free Software Foundation. \stopcolumns %*********************************************************************** diff --git a/Master/texmf-dist/doc/pdftex/manual/pdftex-t.txt b/Master/texmf-dist/doc/pdftex/manual/pdftex-t.txt index 7d33c57ee20..ddc028e2a0c 100644 --- a/Master/texmf-dist/doc/pdftex/manual/pdftex-t.txt +++ b/Master/texmf-dist/doc/pdftex/manual/pdftex-t.txt @@ -1,11 +1,11 @@ -%PDF-1.4 +%PDF-1.5 %ÐÔÅØ 3 0 obj << /Length 152 >> stream BT -/F51 9.9626 Tf 91.925 759.927 Td +/F51 9.9626 Tf 91.925 710.037 Td [(W)80(elcome)-250(to)-250(pdfT)]TJ 67.818 -2.241 Td [(E)]TJ 4.842 2.241 Td [(X!)]TJ 138.924 -654.747 @@ -17,7 +17,7 @@ endobj /Type /Page /Contents 3 0 R /Resources 1 0 R -/MediaBox [0 0 595.276 841.89] +/MediaBox [0 0 612 792] /Parent 5 0 R >> endobj 1 0 obj << @@ -74,37 +74,37 @@ endobj /Pages 5 0 R >> endobj 10 0 obj << -/Producer (pdfTeX-1.40.1) +/Producer (pdfTeX-1.40.11) /Creator (TeX) /CreationDate -(D:20070125120125+01'00') -/ModDate (D:20070125120125+01'00') +(D:20101122113059-08'00') +/ModDate (D:20101122113059-08'00') /Trapped /False /PTEX.Fullbanner (This is pdfTeX, -Version 3.141592-1.40.1-2.2 (Web2C -7.5.6) kpathsea version 3.5.6) +Version 3.1415926-1.40.11-2.2 (TeX +Live 2010) kpathsea version 6.0.0) >> endobj xref 0 11 0000000000 65535 f -0000000335 00000 n +0000000328 00000 n 0000000224 00000 n 0000000015 00000 n -0000001058 00000 n -0000001210 00000 n -0000000939 00000 n -0000000403 00000 n -0000000756 00000 n -0000001267 00000 n -0000001316 00000 n +0000001051 00000 n +0000001203 00000 n +0000000932 00000 n +0000000396 00000 n +0000000749 00000 n +0000001260 00000 n +0000001309 00000 n trailer << /Size 11 /Root 9 0 R /Info 10 0 R /ID -[<C0AA7E97DD300D37AF4A42A0553DC9E6> -<C0AA7E97DD300D37AF4A42A0553DC9E6>] +[<EE90809C33F2D2DC401E0C0DBC447F19> +<EE90809C33F2D2DC401E0C0DBC447F19>] >> startxref -1570 +1568 %%EOF diff --git a/Master/texmf-dist/doc/pdftex/manual/pdftex-w.pdf b/Master/texmf-dist/doc/pdftex/manual/pdftex-w.pdf deleted file mode 100644 index 736f0049372..00000000000 --- a/Master/texmf-dist/doc/pdftex/manual/pdftex-w.pdf +++ /dev/null @@ -1,89 +0,0 @@ -%PDF-1.4 -%ÐÔÅØ -3 0 obj << -/Length 152 ->> -stream -BT -/F51 9.9626 Tf 91.925 759.927 Td [(W)80(elcome)-250(to)-250(pdfT)]TJ 67.818 -2.241 Td [(E)]TJ 4.842 2.241 Td [(X!)]TJ 138.924 -654.747 Td [(1)]TJ -ET -endstream -endobj -2 0 obj << -/Type /Page -/Contents 3 0 R -/Resources 1 0 R -/MediaBox [0 0 595.276 841.89] -/Parent 5 0 R ->> endobj -1 0 obj << -/Font << /F51 4 0 R >> -/ProcSet [ /PDF /Text ] ->> endobj -7 0 obj -[333 408 500 500 833 778 333 333 333 500 564 250 333 250 278 500 500 500 500 500 500 500 500 500 500 278 278 564 564 564 444 921 722 667 667 722 611 556 722 722 333 389 722 611 889 722 722 556 722 667 556 611 722 722 944 722 722 611 333 278 333 469 500 333 444 500 444 500 444 333 500 500 278 278 500 278 778 500 500 500 500 333 389 278] -endobj -8 0 obj << -/Type /FontDescriptor -/FontName /Times-Roman -/Flags 34 -/FontBBox [0 -216 1000 678] -/Ascent 678 -/CapHeight 651 -/Descent -216 -/ItalicAngle 0 -/StemV 83 -/XHeight 450 ->> endobj -6 0 obj << -/Type /Encoding -/Differences [33/exclam 49/one 69/E 84/T 87/W/X 99/c/d/e/f 108/l/m 111/o/p 116/t] ->> endobj -4 0 obj << -/Type /Font -/Subtype /Type1 -/BaseFont /Times-Roman -/FontDescriptor 8 0 R -/FirstChar 33 -/LastChar 116 -/Widths 7 0 R -/Encoding 6 0 R ->> endobj -5 0 obj << -/Type /Pages -/Count 1 -/Kids [2 0 R] ->> endobj -9 0 obj << -/Type /Catalog -/Pages 5 0 R ->> endobj -10 0 obj << -/Producer (pdfTeX-1.40.1) -/Creator (TeX) -/CreationDate (D:20070125120125+01'00') -/ModDate (D:20070125120125+01'00') -/Trapped /False -/PTEX.Fullbanner (This is pdfTeX, Version 3.141592-1.40.1-2.2 (Web2C 7.5.6) kpathsea version 3.5.6) ->> endobj -xref -0 11 -0000000000 65535 f -0000000335 00000 n -0000000224 00000 n -0000000015 00000 n -0000001058 00000 n -0000001210 00000 n -0000000939 00000 n -0000000403 00000 n -0000000756 00000 n -0000001267 00000 n -0000001316 00000 n -trailer -<< /Size 11 -/Root 9 0 R -/Info 10 0 R -/ID [<C0AA7E97DD300D37AF4A42A0553DC9E6> <C0AA7E97DD300D37AF4A42A0553DC9E6>] >> -startxref -1570 -%%EOF diff --git a/Master/texmf-dist/doc/pdftex/manual/pdftex-w.tex b/Master/texmf-dist/doc/pdftex/manual/pdftex-w.tex index 488e574ee19..72d9bf7097a 100644 --- a/Master/texmf-dist/doc/pdftex/manual/pdftex-w.tex +++ b/Master/texmf-dist/doc/pdftex/manual/pdftex-w.tex @@ -1,7 +1,8 @@ -%$Id: pdftex-w.tex,v 1.3 2005/01/06 13:23:20 hahe Exp $ -\pdfmapline{ptmr8r Times-Roman <8r.enc} +% $Id: pdftex-w.tex 647 2010-11-22 19:25:43Z karl $ \pdfoutput=1 \pdfcompresslevel=0 +\pdfobjcompresslevel=0 +\pdfmapline{ptmr8r Times-Roman <8r.enc} \font\tenrm=ptmr8r \tenrm Welcome to pdf\TeX! diff --git a/Master/texmf-dist/doc/pdftex/manual/syntaxform.awk b/Master/texmf-dist/doc/pdftex/manual/syntaxform.awk index 2212d5fd368..005aeb8a5e3 100644 --- a/Master/texmf-dist/doc/pdftex/manual/syntaxform.awk +++ b/Master/texmf-dist/doc/pdftex/manual/syntaxform.awk @@ -1,4 +1,4 @@ -#$Id: syntaxform.awk,v 1.13 2006/02/10 21:27:48 hhenkel Exp $ +#$Id: syntaxform.awk 635 2010-11-14 19:15:12Z karl $ # pdftex-t.tex --> pdftex-syntax.txt # requires gawk due to gensub() function @@ -55,6 +55,11 @@ BEGIN{ $0 = gensub(/\\Tex *{([^}]*)}/, "\\1", "g"); } +/\\tex/ { + $0 = gensub(/\\tex *{([^}]*)}/, "\\\\\\1", "g"); +} + + /\\Optional/ { $0 = gensub(/\\Optional *{([^}]*)}/, "[\\1]", "g"); } |