diff options
Diffstat (limited to 'Master/texmf-dist/doc/pdftex')
23 files changed, 504 insertions, 237 deletions
diff --git a/Master/texmf-dist/doc/pdftex/NEWS b/Master/texmf-dist/doc/pdftex/NEWS index 7171ee730ef..3a66ff8dd50 100644 --- a/Master/texmf-dist/doc/pdftex/NEWS +++ b/Master/texmf-dist/doc/pdftex/NEWS @@ -1,9 +1,24 @@ -pdfTeX 3.14159265-2.6-1.40.17 (TeX Live 2016) +pdfTeX 3.14159265-2.6-1.40.18 (TeX Live 2017) - changes: - - if environment variable SOURCE_DATE_EPOCH is set, use its value for - the CreationDate and ModDate values, and to seed the trailer /ID. + - rename envvar SOURCE_DATE_EPOCH_TEX_PRIMITIVES to FORCE_SOURCE_DATE; + no changes in functionality. + - if the \pdfpageattr token list contains the string "/MediaBox", + omitting output of the default /MediaBox. + +- bugfixes: + - \pdflastmatch more reliable when there was no match + +--------------------------------------------------- +pdfTeX 3.14159265-2.6-1.40.17 (TeX Live 2016) (May 20, 2016) +- changes: + - if the environment variable SOURCE_DATE_EPOCH is set, use its value for + the PDF CreationDate and ModDate values, and to seed the trailer /ID. This by itself should suffice to create reproducible PDFs. The - other changes support more granular output tweaks along the same lines. + new primitives below support more granular output tweaks with the + same intent. + - if the environment variable SOURCE_DATE_EPOCH_TEX_PRIMITIVES is set + to 1, the \year, \day, and \time primitives are also initialized + from the SOURCE_DATE_EPOCH value, instead of the current time. - new primitive \pdfinfoomitdate to omit CreationDate and ModDate keys. - new primitive \pdftrailerid to set seed for the trailer /ID @@ -17,6 +32,7 @@ pdfTeX 3.14159265-2.6-1.40.17 (TeX Live 2016) - bugfixes: - do not crash if font size of a vf >= 2048pt. + --------------------------------------------------- pdfTeX 3.14159265-2.6-1.40.16 (TeX Live 2015) - changes: @@ -26,6 +42,7 @@ pdfTeX 3.14159265-2.6-1.40.16 (TeX Live 2015) - bugfixes: - ensure line-ending after a group dict in the output. + --------------------------------------------------- pdfTeX 3.14159265-2.6-1.40.15 (TeX Live 2014) - changes: diff --git a/Master/texmf-dist/doc/pdftex/README b/Master/texmf-dist/doc/pdftex/README index 9b78615b002..785ab5b4595 100644 --- a/Master/texmf-dist/doc/pdftex/README +++ b/Master/texmf-dist/doc/pdftex/README @@ -2,14 +2,16 @@ pdfTeX is an extended version of eTeX that can create PDF directly from TeX source files and enhance the result of TeX typesetting with the help of PDF. When PDF output is not selected, pdfTeX produces normal DVI output, otherwise it produces PDF output that looks essentially -identical to the DVI output. An important aspect of this project was to -investigate alternative justification algorithms, resulting in the -margin kerning and font expansion "microtypgraphy" features, inspired by -Peter Karow. - -pdfTeX is based on the original e-TeX sources and Web2c, and has been -successfully compiled on many systems. It is actively maintained, but -stability is paramount now; only bug fixes and small enhancements are expected. +identical to the DVI output + +An important aspect of this project was to investigate alternative +justification algorithms, resulting in the "microtypography" features of +margin kerning and font expansion. This was inspired by Peter Karow's +and Hermann Zapf's work. + +pdfTeX is integrated with the original e-TeX sources and Web2c. It is +actively maintained, but stability is paramount now; only bug fixes and +small enhancements are expected. Releases are made through TeX Live. See the file NEWS for changes to the program. Documentation about pdfTeX can be found at http://www.pdftex.org. diff --git a/Master/texmf-dist/doc/pdftex/manual/ChangeLog b/Master/texmf-dist/doc/pdftex/manual/ChangeLog index e156cf82ddf..5ed479c2fd2 100644 --- a/Master/texmf-dist/doc/pdftex/manual/ChangeLog +++ b/Master/texmf-dist/doc/pdftex/manual/ChangeLog @@ -1,3 +1,73 @@ +2017-04-20 Karl Berry <karl@freefriends.org> + + * pdftex-t.tex (\currentpdftex): 1.40.18 (for TeX Live 2017). + + * pdftex-t.tex (Map files): omit description of tfm-only map + entries (and pgc), since the behavior might change. Use "psname" + instead of "basename" for possible clarity. Various other rewordings. + + *pdftex-t.tex (--version, --pdf): do not erroneously output a tt + ligature. + +2017-03-18 Karl Berry <karl@freefriends.org> + + * pdftex-t.tex: starting from -> starting with + * pdftex-t.tex: starting from -> starting with. + +2017-03-17 Karl Berry <karl@freefriends.org> + + * pdftex-t.tex (\efcode, \rpcode, \lpcode, \knbscode, \knstcode, + \knshcode, \knbccode, \knaccode): state that changes to these + tables are global, not affected by TeX's grouping, and only to the + particular <font> specified. Report from Doug McKenna. + +2017-03-16 Karl Berry <karl@freefriends.org> + + * pdftex-t.tex: behavior, not behaviour, for consistency with + seemingly all else (color, math, etc.). + + * pdftex-t.tex: behavior, not behaviour. Nothing else here is UK.Eng. + + * pdftex-t.tex (Map files) <encodingfile>: can be specified for + bitmap PK fonts now also. + + * pdftex-t.tex (\tagcode): use <8-bit number> like everything else, + rather than <character code>. Report from Doug McKenna. + +2017-02-18 Karl Berry <karl@freefriends.org> + + * pdftex-t.tex (\pdfpageattr): document new behavior of + omitting our /MediaBox if "/MediaBox" is present in this token list. + +2017-02-01 Karl Berry <karl@freefriends.org> + + * pdftex-t.tex (Map files): clarify that decimal 4 = bit position 3 + = symbolic, for embedded fonts, and specify the 0x22 default for + non-embedded fonts. + Report from Gernot Hassenpflug to pdftex, 1 Dec 2016 14:01:30. + +2016-07-05 Karl Berry <karl@freefriends.org> + + * pdftex-t.tex (\pdfcatalog): show "openaction <action spec>" + after the <general text>, instead of creating an <open-action spec>, + for (hopefully) more clarity. + (open-action spec): remove \Syntax item. + Report from Douglas McKenna to pdftex list, 3 Jul 2016 12:46:59. + + (\pdftrailer, \pdftrailerid): give simple examples. + +2016-06-12 Karl Berry <karl@freefriends.org> + + * pdftex-t.tex (\pdfmatch): mention default subcount 10; wording. + (\pdflastmatch): clarify match position, wording; + + * pdftex-t.tex (Invoking \PDFTEX): new name FORCE_SOURCE_DATE for + SOURCE_DATE_EPOCH_TEX_PRIMITIVES. + +2016-05-20 Karl Berry <karl@tug.org> + + * TeX Live 2016 release. + 2016-05-05 Karl Berry <karl@tug.org> * pdftex-t.tex: missed \ 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 8e7335c5c99..3f8c4abe269 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-syntax.txt b/Master/texmf-dist/doc/pdftex/manual/pdftex-syntax.txt index bf6d00d5f3e..70a1a454d84 100644 --- a/Master/texmf-dist/doc/pdftex/manual/pdftex-syntax.txt +++ b/Master/texmf-dist/doc/pdftex/manual/pdftex-syntax.txt @@ -43,7 +43,7 @@ \rpcode <font> <8-bit number> (integer) \shbscode <font> <8-bit number> (integer) \stbscode <font> <8-bit number> (integer) -\tagcode <font> <character code> (integer) +\tagcode <font> <8-bit number> (integer) %% Read-only integers: \pdfelapsedtime (read-only integer) @@ -118,7 +118,7 @@ %% General commands: \letterspacefont <control sequence> <font> <integer> \pdfannot <annot type spec> (h, v, m) -\pdfcatalog <general text> [<open-action spec>] +\pdfcatalog <general text> [openaction <action spec>] \pdfcolorstack <stack number> <stack action> <general text> \pdfcopyfont <control sequence> <font> \pdfdest <dest spec> (h, v, m) @@ -187,7 +187,6 @@ | <file spec> [<page spec>] <general text> <newwindow spec> <thread-action spec> --> [<file spec>] <numid> | [<file spec>] <nameid> -<open-action spec> --> openaction <action spec> <colorspace spec> --> colorspace <number> <pdf box spec> --> mediabox | cropbox | bleedbox | trimbox | artbox <map spec> --> { [<map modifier>] <balanced text> } diff --git a/Master/texmf-dist/doc/pdftex/manual/pdftex-t.tex b/Master/texmf-dist/doc/pdftex/manual/pdftex-t.tex index 15d0daa1c50..248dc9ae4dc 100644 --- a/Master/texmf-dist/doc/pdftex/manual/pdftex-t.tex +++ b/Master/texmf-dist/doc/pdftex/manual/pdftex-t.tex @@ -1,7 +1,7 @@ % interface=english modes=letter,screen output=pdftex % vim: tw=79 -% $Id: pdftex-t.tex 753 2016-05-09 17:19:54Z karl $ +% $Id: pdftex-t.tex 777 2017-04-20 23:08:32Z karl $ % The number of lines on the title page depends on exactly % what \PDF\ code is generated. @@ -38,9 +38,9 @@ August\or September\or October\or November\or December\else ERROR\fi} } -\svnscan $Id: pdftex-t.tex 753 2016-05-09 17:19:54Z karl $ +\svnscan $Id: pdftex-t.tex 777 2017-04-20 23:08:32Z karl $ -\def\currentpdftex{1.40.17} +\def\currentpdftex{1.40.18} %*********************************************************************** @@ -88,7 +88,6 @@ \abbreviation [PERL] {Perl} {Perl programming environment} \abbreviation [PFA] {PFA} {Adobe PostScript Font format (ASCII)} \abbreviation [PFB] {PFB} {Adobe PostScript Font format (Binary)} -\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} @@ -682,7 +681,7 @@ Please send questions or suggestions by email to \from[ptex_bugs]. \subsection{Legal Notice} -Copyright \copyright\ 1996||2016 \THANH. +Copyright \copyright\ 1996||2017 \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; @@ -785,7 +784,7 @@ 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 +in a \POSTSCRIPT\ file. \PDFTEX\ users can add dictionary entries to page objects with the \type{\pdfpageattr} primitive. Although in most cases macro packages will shield users from these @@ -812,9 +811,9 @@ content reuse. We will come to that later. Of course, this is just the barest introduction to \PDF\ format. 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, -\from[pdfreference] --- or get the heavy paper version. +is to read the \PDFReference. You can download this book as a big \PDF\ +file from Adobe's \PDF\ Technology Center, \from[pdfreference] --- or +get the heavy paper version. We now turn to specifics of \PDFTEX. @@ -864,9 +863,7 @@ can be described best by example. Assuming that the file \filename needed to compile \PDFTEX: \startesctyping -cd $HOME/pdftex -unzip pdftex-@currentpdftex.zip -cd pdftex-@currentpdftex/source +cd pdftex.../source ./build-pdftex.sh \stopesctyping @@ -1324,21 +1321,20 @@ values of \type{19700101000032Z}. This is useful for reproducible builds of documents. (See also \type{\pdfinfoomitdate}, \type{\pdfsuppressptexinfo}, et al.) -The second, related, environment variable is -\type{SOURCE_DATE_EPOCH_TEX_PRIMITIVES}. If this is set to~\type{1}, -\TEX's time-related primitives are also initialized from the value of -\type{SOURCE_DATE_EPOCH}. These primitives are \type{\year}, -\type{\month}, \type{\day}, and \type{\time}. If -\type{SOURCE_DATE_EPOCH} is not set, setting -\type{SOURCE_DATE_EPOCH_TEX_PRIMITIVES} has no effect. If -\type{SOURCE_DATE_EPOCH_TEX_PRIMITIVES} is unset, set to the empty -string, or set to~\type{0}, the primitives reflect the current time as -usual. Any other value elicits a warning, and the current time is used. -(This is useful only if one wants to make reproducible \PDF{}s for a set -of documents without changing them in any way, e.g., an operating system -distribution with manuals that use \type{\today}. Except in such -unusual circumstances, it is better not to set this, and let the \TEX\ -primitives retain the meaning they have always had.) +The second, related, environment variable is \type{FORCE_SOURCE_DATE}. +If this is set to~\type{1}, \TEX's time-related primitives are also +initialized from the value of \type{SOURCE_DATE_EPOCH}. These +primitives are \type{\year}, \type{\month}, \type{\day}, and +\type{\time}. If \type{SOURCE_DATE_EPOCH} is not set, setting +\type{FORCE_SOURCE_DATE} has no effect. If \type{FORCE_SOURCE_DATE} is +unset, set to the empty string, or set to~\type{0}, the primitives +reflect the current time as usual. Any other value elicits a warning, +and the current time is used. (This is useful only if one wants to make +reproducible \PDF{}s for a set of documents without changing them in any +way, e.g., an operating system distribution with manuals that use +\type{\today}. Except in such unusual circumstances, it is better not +to set this, and let the \TEX\ primitives retain the meaning they have +always had.) Finally, just to have the list of options and basic invocation at hand, here is a verbatim listing of the \type{-}\type{-help} output. All @@ -1413,7 +1409,7 @@ to turn on \PDFTEX\ support explicitly. for \PDFTEX\ in its generalized hypertext features. Support for \PDFTEX\ is implemented as a special driver, and is invoked by typing \type{\setupoutput[pdftex]} or feeding \TEXEXEC\ with the - \type{-{}-pdf} option. + \hbox{\tt -{}-pdf} option. \item \PDF\ from \TEXINFO\ documents can be created by running \PDFTEX\ on the \TEXINFO\ file, instead of \TEX. Alternatively, run the shell @@ -1447,50 +1443,48 @@ fonts, there is rarely a need to use bitmap fonts in \PDFTEX. \subsection[mapfile]{Map files} Font map files provide the connection between \TEX\ \TFM\ font files -and the outline font file names. They contain also information about +and outline font file names. They contain also information about re||encoding arrays, partial font embedding (``subsetting''), and character transformation parameters (like SlantFont and ExtendFont). Those map files were first created for \DVI\ postprocessors. But, as \PDFTEX\ in \PDF\ output mode includes all \PDF\ processing steps, it also needs to know about font mapping, and therefore reads in one or more map files. -Map files are not read in when \PDFTEX\ is in \DVI\ mode. Pixel fonts -can be used without being listed in the map file. +Map files are not read in when \PDFTEX\ is in \DVI\ mode. Bitmap fonts +can (and normally should) be used without being listed in the map file. By default, \PDFTEX\ reads the map file \filename{pdftex.map}. In \WEBC, map files are searched for using the \type{TEXFONTMAPS} config file value and environment variable. By default, the current directory and various system directories are searched. -Within the map file, each font is listed on an individual line. The syntax of +Within the map file, each font is listed on a single line. The syntax of each line is upward||compatible with \type{dvips} map files and can contain the following fields (some are optional; explanations follow): \startnarrower -{\em tfmname basename fontflags special encodingfile fontfile} +{\em tfmname psname fontflags special encodingfile fontfile} \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 -{\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}, -and {\em fontfile}, however the first three fields must be given in -fixed order. +It is mandatory that {\em tfmname} is the first field. If a {\em +psname} is given, it must be the second field. Similarly if {\em +fontflags} is given it must be the third field (if {\em psname} is +present) or the second field (if {\em psname} is left out). The +positions of {\em special}, {\em encodingfile}, and {\em fontfile} can +be mixed. \startdescription {tfmname} -sets the name of the \TFM\ file for a font --- the name \TEX\ sees. -This name must always -be given. +sets the name of the \TFM\ file for a font --- the file name given in a +\TEX\ \type{\font} command. This name must always be given. \stopdescription -\startdescription {basename} +\startdescription {psname} sets the (\POSTSCRIPT) base font name, which has two uses: 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 +psname} 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, 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 @@ -1502,18 +1496,18 @@ requires that also a Type~1 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 -({\em fontfile} field missing), then the {\em basename} field will be +({\em fontfile} field missing), then the {\em psname} 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 -the consumer application (\eg\ viewer). +reading applications (\eg\ viewers). -It is highly recommended to always use the {\em basename} field (but -strictly speaking it's optional). +It is highly recommended to use the {\em psname} field, but +strictly speaking it is optional. \stopdescription \startdescription {fontflags} -specify some characteristics of the font. The following description of +optionally 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 @@ -1581,141 +1575,125 @@ 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 -trouble 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). +If the {\em fontflags} field is not given, and the font is embedded, +\PDFTEX\ treats it as the value~4 (decimal, that is, bit position 3 is set), +a symbolic font. For non-embedded fonts, the default value is +\type{0x22}, a non-symbolic serif 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 trouble 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). \stopdescription \startdescription {special} -specifies instructions to manipulate fonts similar to the way -\type{dvips} does. Currently only the keywords \type{SlantFont} -and \type{ExtendFont} are interpreted, other instructions (as -\type{ReEncodeFont} with parameters, see {\em encoding} below) are +specifies font manipulations in the same way as +\type{dvips}. Currently only the keywords \type{SlantFont} +and \type{ExtendFont} are interpreted, other instructions (notably +\type{ReEncodeFont} and its parameters, see {\em encoding} below) are just ignored. The permitted \type{SlantFont} range is $-$1..1; for \type{ExtendFont} it's $-$2..2. The block of {\em special} -instruction must be enclosed by double quotes \type{"}. +instruction must be enclosed by double quote characters: \type{"}. \stopdescription -\startdescription {encodingfile} -specifies the name of the file containing the external encoding vector -to be used for the font. The encoding file must have name extension -\type{.enc}, and the full file name including this extension must be given -with preceding~\type{<} character. The format of the encoding vector is -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. +\startdescription {encodingfile} specifies the name of the file +containing the external encoding vector to be used for the font. The +encoding file name must have the extension \type{.enc}, and the file +name including extension must be given with either a preceding~\type{<} +character or a preceding~\type{<[}. The format of the encoding vector is +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. \stopdescription \startdescription {fontfile} 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} +given \TeX\ font (the {\em tfmname}~$\leftrightarrow$~{\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 {\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 +in case the {\em psname} field does not contain one of the 14 standard 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. The font file name should be preceded by one or two special characters, -which tells how to handle the font file: +specifying how to handle the font file: \startitemize \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 + font file will be only partially embedded in the \PDF\ output + (``subsetted''), meaning that only used glyphs are written to 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. \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 - may cause troubles with TrueType fonts, so it is normally not - recommended for Type~1 or TrueType fonts. But this is currently - the only mode that allows the use of OpenType fonts. This mode - might also be useful in case the font is atypical and can not be - subsetted well by \PDFTEX. {\em Beware: some font vendors forbid - full font inclusion.} - -\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 - 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 - descriptor object is created that contains approximations of the - font metrics for the selected font. - - This option is useful only as fallback when you do not want to - embed the font (\eg\ due to font license restrictions), but wish to - use the font metrics and let the \PDF\ viewer generate instances - that look close to the used font in case the font resource is not - installed on the system where the \PDF\ output will be viewed - or printed. To use this feature, the font flags {\em must} be + file will be included entirely --- all glyphs of the font are + embedded, including even those not used in the document. Apart + from causing large size \PDF\ output, this option may cause + troubles with TrueType fonts, so it is normally not recommended + for Type~1 or TrueType fonts. But this is currently the only mode + that allows the use of OpenType fonts. This mode might also be + useful in case the font is atypical and cannot be subsetted well + by \PDFTEX. {\em Beware: proprietary font vendors typically + forbid full font inclusion.} + +\item If no special character precedes the font file name, it is + ignored, with a warning (this case was deprecated in \PDFTEX\ + version 1.40.0). 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 descriptor object is created that contains + approximations of the font metrics for the selected font. + +\item Specifying the {\em psname} and no font file name is only useful + as a last-ditch fallback when you do not want to embed the font + (\eg\ due to font license restrictions), but wish to use the font + metrics and let the \PDF\ viewer generate instances that look + close to the used font in case the font resource is not installed + on the system where the \PDF\ output will be viewed 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 +If you encounter problematic lookups, for instance if \PDFTEX\ tries +to open a \type{.pfa} file instead of a \type{.pfb}, you can add the suffix to the filename. In this respect, \PDFTEX\ completely relies on the \type{kpathsea} library. \stopdescription -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 -be more useful when better Type~3 font handling is more common.}. If no -\PGC\ source is available, \PDFTEX\ will try to use \PK~fonts as \DVI\ -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 -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 -\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: +For Type~1 and TrueType fonts, the font file will be included only once +in the \PDF\ output, regardless of how many \TeX\ \type{\font} instances +are used in the document. For instance, given \starttyping -csr10 +\font\a = cmr12 +\font\b = cmr12 at 11pt \stoptyping -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 -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. +the outline file \type{cmr12.pfb} will only be included once in the +\PDF, and merely scaled down to create the instance for \type{\b}. -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, -with re||encoding: +If a used font is not present in the map files, \PDFTEX\ will try to use +\PK~fonts as most \DVI\ drivers do, creating \PK~fonts on||the||fly if +needed. This is the normal, and recommended, way to use bitmap fonts. + +To summarize this rather confusing story, we include some example map +lines. The most common way is to embed only a subset of glyphs from a +font for a particular desired encoding, like this: \starttyping ptmri8r Times-Italic <8r.enc <ptmri8a.pfb @@ -1727,16 +1705,17 @@ Without re||encoding it looks like this: cmr10 CMR10 <cmr10.pfb \stoptyping -A SlantFont is specified similarly as for \type{dvips}. The \type -{SlantFont} or \type{ExtendFont} entries work only with embedded Type~1 -fonts: +\type{SlantFont} and \type{ExtendFont} fields are specified as with +\type{dvips}. \type{SlantFont} and \type{ExtendFont} work only with +embedded Type~1 fonts: \starttyping 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 +(not typically useful): \starttyping fmvr8x MarVoSym <<marvosym.pfb @@ -1749,7 +1728,7 @@ A TrueType font can be used in the same way as a Type~1 font: verdana8r Verdana <8r.enc <verdana.ttf \stoptyping -Now follow a few cases with non-embedded fonts. If the fontfile is +Finally, a few cases with non-embedded fonts. If the fontfile is missing, the viewer application will have to use its own approximation of the missing font (with and without re||encoding): @@ -1768,7 +1747,7 @@ pgsr8r GillSans 32 <8r.enc \stoptyping Not embedding fonts is rather risky and should generally be avoided. -If in doubt, always embed all fonts, even the 14 standard ones. +The recommendation these days is to embed all fonts, even the 14 standard ones. %*********************************************************************** @@ -1942,11 +1921,6 @@ new Didot (1\,nd~=~0.375\,mm) and the new Cicero (1\,nc~=~12\,nd) } \Syntax{ -\Something{open-action spec} \Means % - \Literal{openaction} \Something{action spec} -} - -\Syntax{ \Something{colorspace spec} \Means % \Literal{colorspace} \Something{number} } @@ -2332,20 +2306,20 @@ beginning of 1970-01-01 UTC, in this format: \type{19700101000000Z} Multiple appearances of \type{\pdfinfo} are concatenated. Usually if a key is given more than once, the first appearance will be used, but this is viewer||dependent. Except for standard \TeX\ expansion, \PDFTEX\ does -not perform any further operations on \Something{general text} provided -by the user. +not perform any further operations in the \Something{general text} +provided by the user. Here is an example of using \type{\pdfinfo} to include the information not supplied by \PDFTEX: -\startesctyping +\starttyping \pdfinfo { /Title (example.pdf) /Author (Tom and Jerry) /Subject (Example) /Keywords (mouse, cat) } -\stopesctyping +\stoptyping For more details on all this, see the \PDFReference. @@ -2359,7 +2333,7 @@ making reproducible \PDF{}s. \introduced{1.40.17} \pdftexprimitive{\Syntax{\Tex{\pdfsuppressptexinfo} \Whatever{integer}}} \bookmark{\tex{pdfsuppressptexinfo}} -Treated as a bitmask, specifying which \type{PTEX.} keys to omit from +Treated as a bitmask, specifying which \type{PTEX.*} keys to omit from the output: \startbuffer @@ -2376,7 +2350,7 @@ the output: \stopbuffer \placetable - [here][pagemode] + [here][suppressptexinfo] {\type{\pdfsuppressptexinfo} bit meanings.} {\getbuffer} @@ -2386,25 +2360,25 @@ everything. \type{PTEX.Fullbanner} is included by default in the general document info dictionary, as mentioned under \type{\pdfinfo} above. The other \type{PTEX.*} keys are included when a \PDF\ is included in the document -(and not otherwise), as described in \in{section}[sec.addpdfkeys] +(and not otherwise), as described in \in{section}[sec.addpdfkeys]. This conditional suppression can be useful in making reproducible \PDF{}s. \introduced{1.40.17} \pdftexprimitive{\Syntax{\Tex{\pdfcatalog} \Something{general text} - \Optional{\Something{open-action spec}}}} + \Optional{\Literal{openaction} \Something{action spec}}}} \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 -{/PageMode}, which determines how the \PDF\ viewer displays the document -on startup. The possibilities for the latter are explained in \in {Table} -[pagemode]: +Similar to the document info section is the document catalog, where +possible keys are \type{/URI}, which specifies the base \URL\ of the +document, and \type {/PageMode}, which determines how the \PDF\ viewer +displays the document on startup. The possibilities for the latter are +explained in \in {table} [pagemode]: \startbuffer \starttabulate[|l|l|] \HL -\NC \bf value \NC \bf meaning \NC\NR +\NC \bf value \NC \bf meaning \NC\NR \HL \NC \tt /UseNone \NC neither outline nor thumbnails visible \NC\NR \NC \tt /UseOutlines \NC outline visible \NC\NR @@ -2419,13 +2393,26 @@ on startup. The possibilities for the latter are explained in \in {Table} {Supported \type{/PageMode} values.} {\getbuffer} -In full||screen mode, there is no menu bar, window controls, nor any other -window present. The default setting is \type{/UseNone}. +The default \type{/PageMode} setting is \type{/UseNone}. In +full||screen mode, there is no menu bar, window controls, nor any other +window present. -The \Something{openaction} is the action provided when opening the -document and is specified in the same way as internal links, see \in -{section} [linking]. Instead of using this method, one can also write the -open action directly into the catalog. +After the \Something{general text}, a construct \Literal{openaction} +\Something{action spec} can be given, where \Literal{openaction} is a +\PDFTEX\ keyword, and \Something{action spec} specifies the action to be +taken when opening the document. This \Something{action spec} is the +same as for internal links; see \in {section} [linking]. (Instead of +using this method, one can also write the open action directly into the +catalog.) + +Several settings can be made in one \type{\pdfcatalog} call, for +example: + +\starttyping +\pdfcatalog{ + /PageMode /FullScreen +} openaction goto page 2 {/Fit} +\stoptyping \pdftexprimitive{\Syntax{\Tex{\pdfnames} \Something{general text}}} \bookmark{\tex{pdfnames}} @@ -2439,7 +2426,8 @@ otherwise the document can be invalid. \bookmark{\tex{pdftrailer}} This command puts its argument text verbatim into the file trailer -dictionary. \introduced{1.11a} +dictionary. Example: \type{\pdftrailer {/mytrlrkey /mytrlrval}}. +\introduced{1.11a} \pdftexprimitive{\Syntax{\Tex{\pdftrailerid} \Something{general text}}} \bookmark{\tex{pdftrailerid}} @@ -2447,8 +2435,8 @@ dictionary. \introduced{1.11a} Use the \Something{general text} to seed the \type{/ID} value in the trailer, instead of the default combination of the absolute input file name and starting time. If the argument is empty, the \type{/ID} is -omitted entirely. This can be useful in making reproducible -\PDF{}s. \introduced{1.40.17} +omitted entirely. Example: \type{\pdftrailerid{}}. This can be useful +in making reproducible \PDF{}s. \introduced{1.40.17} %*********************************************************************** @@ -2552,7 +2540,7 @@ Font expansion can be activated in two modes. When \type{\pdfadjustspacing} is set to~1, font expansion is applied {\em after} \TEX's normal paragraph breaking routines have broken the paragraph into lines. In this case, line breaks are identical to standard \TEX\ -behaviour. +behavior. When set to~2, the width changes that are the result of stretching and shrinking are taken into account {\em while} the paragraph is broken into @@ -2576,7 +2564,7 @@ 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: +expandability range of $0..100$\,\%. Example: \starttyping \efcode\somefont`A=800 @@ -2589,6 +2577,9 @@ expansion is still bound to the steps as defined by \type{\pdffontexpand} primitive, otherwise one would end up with more possible font inclusions than would be comfortable. +Changes to this table are global, i.e., ignore \TeX's usual grouping, +and apply only to the given \Something{font}. + \pdftexprimitive{\Syntax{\Tex{\pdfprotrudechars} \Whatever{integer}}} \bookmark{\tex{pdfprotrudechars}} @@ -2630,14 +2621,20 @@ 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 master's thesis. +Changes to this table are global, i.e., ignore \TeX's usual grouping, +and apply only to the given \Something{font}. + \pdftexprimitive{\Syntax{\Tex{\lpcode} \Something{font} \Something{8-bit number} \Whatever{integer}}} \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 +characters may protrude into the left margin. Here also the given integer value is clipped to the range $-1000..1000$. +Changes to this table are global, i.e., ignore \TeX's usual grouping, +and apply only to the given \Something{font}. + \pdftexprimitive{\Syntax{\Tex{\leftmarginkern} \Something{box number} \Whatever{expandable}}} \bookmark{\tex{leftmarginkern}} @@ -2833,7 +2830,7 @@ 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 +be mostly compatible with the traditional behavior. If you want to add 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 @@ -2941,7 +2938,7 @@ 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}}} + \Something{8-bit number} \Whatever{integer}}} \bookmark{\tex{tagcode}} This primitive accesses a character's \type{char_tag} info. It is meant @@ -3066,8 +3063,12 @@ Text with no interword \pdffakespace\pdffakespace spaces. \subsection{Spacing} -Controlling spacing before and after characters was introduced in version 1.30, -mostly to handle punctuation rules in different languages. +Controlling spacing before and after characters was introduced in +version 1.30, mostly to handle punctuation rules in different +languages. The \type{\...code} tables here, like those in the previous +section, operate globally, i.e., ignore \TeX's usual grouping, and apply +only to the given \Something{font}, not other instances of the +underlying font. \pdftexprimitive{\Syntax{\Tex{\pdfadjustinterwordglue} \Whatever{integer}}} \bookmark{\tex{pdfadjustinterwordglue}} @@ -3079,9 +3080,11 @@ following three primitives. \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 +The amount of space, in thousandths of an em, added to the natural width +of the glue following a character (the name stands for ``kern before +space'', although technically it is looking at glue items, not kern +items). This amounts is clipped to the range $-1000..1000$. For +instance, the following example means that glues after periods will be increased by .2\,em. \starttyping @@ -3112,7 +3115,7 @@ If positive, automatic insertion of kerns before characters is enabled. \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 +It is clipped to the range $-1000..1000$. For instance, with the following code, a .15\,em-kern will be inserted before all question marks (useful for \eg\ French punctuation): @@ -3240,7 +3243,7 @@ specifying the region of the page being displayed and printed, and \type{/Rotate}, the number of degrees (in multiples of 90) the page should be rotated clockwise when it is displayed or printed. -% /MediaBox is not a good example, since will never take an effect +% /MediaBox is not a good example, since will never take effect \starttyping \pdfpagesattr @@ -3253,9 +3256,15 @@ should be rotated clockwise when it is displayed or printed. 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 +for an individual page. The token list is expanded when \PDFTEX\ ships out a page. The contents are added to the attributes of the current page. +If the \type{\pdfpageattr} value contains the string \type{/MediaBox}, +then \PDFTEX\ omits outputting its own \type{/MediaBox} value (which is +\type{[0 0 }\Something{\it page\_width} \Something{\it +page\_height}\type{]}). (This behavior was introduced in version +1.40.18.) + \pdftexprimitive{\Syntax{\Tex{\pdfpageresources} \Whatever{tokens}}} \bookmark{\tex{pdfpageresources}} @@ -3418,14 +3427,14 @@ or \JBIG2\ bitmaps and \PDF\ images. 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\ +formats. Starting with \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 bounding box. If \Something{pdf box spec} is present, it overrides the -default behaviour specified by the \type{\pdfpagebox} parameter, and is +default behavior 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 +Starting with \PDFTEX\ 1.21, \type{\pdfximage} command supports \type{colorspace} keyword followed by an object number (user||defined colorspace for the image being included). This feature works for \JPEG\ images only. \PNG s are \RGB\ palettes, \JBIG2 s are bitonal, and \PDF\ @@ -3500,7 +3509,7 @@ for both $x$ and $y$ resolution, when calculating the image size. And 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]. +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 @@ -3535,10 +3544,10 @@ page box defaults to the value of \type{\pdfpagebox} as follows: % object, i.\,e.\ the value used at \pdfximage is remembered. % See the PDF Reference for an explanation of the boxes. -The integer primitive \type{\pdfforcepagebox} allows to globally -override the choice of the page box used with \type{\pdfximage}. It +The integer primitive \type{\pdfforcepagebox} allows globally +overriding 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 +starting with \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. @@ -3546,7 +3555,7 @@ now considered obsolete --- a mixture of \type{\pdfpagebox} and \pdftexprimitive{\Syntax{\Tex{\pdfinclusionerrorlevel} \Whatever{integer}}} \bookmark{\tex{pdfinclusionerrorlevel}} -This controls the behaviour of \PDFTEX\ when a \PDF\ file is included +This controls the behavior of \PDFTEX\ when a \PDF\ file is included that has a newer version than the one specified by \type{\pdfminorversion}. If \type{\pdfinclusionerrorlevel} is set to~0 (the default), \PDFTEX\ gives only a warning; if 1, \PDFTEX\ raises an @@ -3639,7 +3648,7 @@ 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, +(1\,px equal to 65536\,sp~$=$~1\,pt). Starting with \PDFTEX\ 1.40.0, \type{\pdfpxdimen} is now a real dimension parameter. \pdftexprimitive{\Syntax{\Tex{\pdfinclusioncopyfonts} \Whatever{integer}}} @@ -3805,7 +3814,7 @@ 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 +or a \type{<<dictionary>>}. The default behavior of the \Something{newwindow spec} depends on the browser setting. A \Something{thread-action spec} performs an article thread reading. The @@ -3896,7 +3905,7 @@ Note that during output runtime if there are other newly created 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 +unconsidered behavior, it's often enough to wrap boxes that shouldn't belong to the thread by a box to change their box nesting level. \pdftexprimitive{\Syntax{\Tex{\pdfendthread} \Modelist{v, m}}} @@ -3932,8 +3941,8 @@ 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 -\type{page} instead of \type{direct}. Both modify the default behaviour +Starting with version 1.30.0, \PDFTEX\ allows to use a new keyword +\type{page} instead of \type{direct}. Both modify the default behavior 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 @@ -3974,7 +3983,7 @@ This is equivalent to \Syntax{\Tex{\pdfliteral} \Literal{page} \Lbrace \Whatever{expandable}}} \bookmark{\tex{pdfescapestring}} -Starting from version 1.30.0, \PDFTEX\ provides a mechanism for converting +Starting with 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 @@ -4026,23 +4035,29 @@ to \type{1} otherwise. \introduced{1.30.0} \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} +extended regular expressions). The first \Something{general text} is a +pattern and the second is a string. 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 the found (sub)patterns; its default is 10. +\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. +The matches found with \type{\pdfmatch} are stored in a table. This +command returns the entry for \Something{integer}, in the format +\Something{position}\type{->}\Something{string}; \Something{position} is +the position of the match (starting at zero) or \type{-1} if no match +was found, and \Something{string} is the matched substring. + +Entry~0 contains the match as a whole; the subsequent entries contain +submatches corresponding to the subpatterns, up to \type{subcount-1}. + +If \Something{integer} is less than zero, an error is given. + For instance: \starttyping @@ -4054,7 +4069,7 @@ For instance: \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}. +is empty because it exceeds the table's size as set by \type{subcount}. \introduced{1.30.0} %*********************************************************************** @@ -4641,7 +4656,7 @@ the \PDFReference. The following key ends up in the document catalog. \NC \bf key \NC \bf type \NC meaning \NC \NR \HL \NC PTEX.Fullbanner \NC string \NC The full version of the \pt binary that -produced the file as displayed by \typ {pdftex -{}-version}, \eg\ +produced the file as displayed by {\tt pdftex \hbox{-{}-version}}, \eg\ {\tt\pdftexbanner}. This is necessary because the string in the \type{Producer} key in the info dictionary is rather short, namely {\tt pdfTeX-\currentpdftex}. \NC \NR @@ -4982,7 +4997,7 @@ These titles must be distinct from any other section titles. You may add a section Entitled ``Endorsements'', provided it contains nothing but endorsements of your Modified Version by various -parties--for example, statements of peer review or that the text has +parties---for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. diff --git a/Master/texmf-dist/doc/pdftex/tests/01-fake-interword-space/Makefile b/Master/texmf-dist/doc/pdftex/tests/01-fake-interword-space/Makefile index 1af4806137c..f565355eabf 100644 --- a/Master/texmf-dist/doc/pdftex/tests/01-fake-interword-space/Makefile +++ b/Master/texmf-dist/doc/pdftex/tests/01-fake-interword-space/Makefile @@ -1,5 +1,7 @@ +# Public domain. + test: ../../source/build-pdftex/texk/web2c/pdftex -ini fake-interword-space.tex clean: - rm -f fake-interword-space.log fake-interword-space.pdf + $(clean) diff --git a/Master/texmf-dist/doc/pdftex/tests/02-pdfmatch/Makefile b/Master/texmf-dist/doc/pdftex/tests/02-pdfmatch/Makefile new file mode 100644 index 00000000000..06943375d0f --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/02-pdfmatch/Makefile @@ -0,0 +1,10 @@ +# $Id: Makefile 758 2016-06-12 16:54:10Z karl $ +# Public domain. + +include ../Common.mak + +testpdfmatch: + $(prog) test-pdfmatch.tex + +clean: + $(clean) diff --git a/Master/texmf-dist/doc/pdftex/tests/02-pdfmatch/test-pdfmatch.tex b/Master/texmf-dist/doc/pdftex/tests/02-pdfmatch/test-pdfmatch.tex new file mode 100644 index 00000000000..f6d55fe587c --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/02-pdfmatch/test-pdfmatch.tex @@ -0,0 +1,22 @@ +% $Id: test-pdfmatch.tex 759 2016-06-12 18:11:28Z karl $ +% This file public domain. Bug report of \pdflastmatch crash: +% http://tug.org/pipermail/tex-live/2016-June/038664.html +% +\catcode`\{=1 \catcode`\}=2 \catcode`^=7 \newlinechar=`^^J +% +\message{^^Jpdflastmatch0 before any match: \pdflastmatch0} +\message{^^J}% +% +\message{^^Jmatch a to b: \pdfmatch{a}{b}} +\message{^^J}% +\message{pdflastmatch0: \pdflastmatch0} +\message{^^J}% +% +\message{^^Jmatch example: \pdfmatch subcount 3 {ab(cd)*ef(gh)(ij)}{abefghij}} +\message{^^J}% +\message{pdflastmatch0 (0->abefghij): \pdflastmatch0 ^^J} +\message{pdflastmatch1 (-1->): \pdflastmatch1 ^^J} +\message{pdflastmatch2 (4->gh): \pdflastmatch2 ^^J} +\message{pdflastmatch3 (-1->): \pdflastmatch3} +\message{^^J}% +\end diff --git a/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/Makefile b/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/Makefile index 1e0e72aea9c..0f7177f77e2 100644 --- a/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/Makefile +++ b/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile 751 2016-05-04 22:57:38Z karl $ +# $Id: Makefile 772 2017-03-16 22:58:04Z karl $ # Public domain. include ../Common.mak @@ -10,7 +10,7 @@ test2: $(prog) test-fixed-date-id.tex testprim: - SOURCE_DATE_EPOCH=120 SOURCE_DATE_EPOCH_TEX_PRIMITIVES=1 \ + SOURCE_DATE_EPOCH=120 FORCE_SOURCE_DATE=1 \ $(prog) test-prim.tex test = test-SOURCE_DATE_EPOCH @@ -41,7 +41,7 @@ test3-repro.pdf: force force: clean: - rm -f *.log *.pdf *.fmt *.aux + $(clean) fmt: $(prog) \*pdflatex.ini diff --git a/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/test-prim.tex b/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/test-prim.tex index 7c83d90b422..c00641ed4f7 100644 --- a/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/test-prim.tex +++ b/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/test-prim.tex @@ -1,4 +1,4 @@ -% $Id$ +% $Id: test-prim.tex 762 2016-07-05 17:44:56Z karl $ % See the testprim: target in ./Makefile for the invocation. \catcode`\{ = 1 diff --git a/Master/texmf-dist/doc/pdftex/tests/04-pdfsuppressptexinfo/Makefile b/Master/texmf-dist/doc/pdftex/tests/04-pdfsuppressptexinfo/Makefile index 6e176ae9742..554a361248b 100644 --- a/Master/texmf-dist/doc/pdftex/tests/04-pdfsuppressptexinfo/Makefile +++ b/Master/texmf-dist/doc/pdftex/tests/04-pdfsuppressptexinfo/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile 740 2016-04-23 15:08:37Z karl $ +# $Id: Makefile 772 2017-03-16 22:58:04Z karl $ # Public domain. include ../Common.mak @@ -37,4 +37,4 @@ testtrailer-diff: $(testptex)-orig.pdf $(testtrailer).pdf -$(diff) $^ # new /mytrlrkey, dates+id should be different clean: - rm -f *.log *.pdf *.fmt *.aux + $(clean) diff --git a/Master/texmf-dist/doc/pdftex/tests/05-mediabox/Makefile b/Master/texmf-dist/doc/pdftex/tests/05-mediabox/Makefile new file mode 100644 index 00000000000..6f45b14cac8 --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/05-mediabox/Makefile @@ -0,0 +1,18 @@ +# $Id: Makefile 772 2017-03-16 22:58:04Z karl $ +# Public domain. + +include ../Common.mak + +default: test-normal test-omit-mediabox + +test-normal: + $(prog) test-normal.tex + grep -q /MediaBox.*314 test-normal.pdf + +test-omit-mediabox: + $(prog) test-omit-mediabox.tex + grep -q /MediaBox.*271 test-omit-mediabox.pdf # should be there + ! grep -q /MediaBox.*314 test-omit-mediabox.pdf # should not + +clean: + $(clean) diff --git a/Master/texmf-dist/doc/pdftex/tests/05-mediabox/test-normal.tex b/Master/texmf-dist/doc/pdftex/tests/05-mediabox/test-normal.tex new file mode 100644 index 00000000000..f0544855562 --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/05-mediabox/test-normal.tex @@ -0,0 +1,7 @@ +% $Id: test-normal.tex 772 2017-03-16 22:58:04Z karl $ +% Public domain. + +\pdfoutput=1 +\pdfpagewidth=314bp +\pdfpageheight=315bp +X.\end diff --git a/Master/texmf-dist/doc/pdftex/tests/05-mediabox/test-omit-mediabox.tex b/Master/texmf-dist/doc/pdftex/tests/05-mediabox/test-omit-mediabox.tex new file mode 100644 index 00000000000..93eb60dbc12 --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/05-mediabox/test-omit-mediabox.tex @@ -0,0 +1,8 @@ +% $Id: test-omit-mediabox.tex 772 2017-03-16 22:58:04Z karl $ +% Public domain. + +\pdfoutput=1 \catcode`\{=1 \catcode`\}=2 +\pdfpagewidth=314bp +\pdfpageheight=315bp +\pdfpageattr{/MediaBox [ 0 1 271 272 ]} +X.\end diff --git a/Master/texmf-dist/doc/pdftex/tests/06-pkmap/Makefile b/Master/texmf-dist/doc/pdftex/tests/06-pkmap/Makefile new file mode 100644 index 00000000000..853ec0eb2ba --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/06-pkmap/Makefile @@ -0,0 +1,24 @@ +# $Id: Makefile 777 2017-04-20 23:08:32Z karl $ +# Public domain. + +include ../Common.mak + +default: test-pkmap + +test-pkenc: # cmr10.3600pk - not used + $(prog) test-pkmap.tex +# +# should work when and if patch is applied: +# grep -q /ffi test-pkenc.pdf # should end up with this encoded char +# grep -a ToUnicode test-pkenc.pdf +# +# dev convenience: +# pdffonts test-big.pdf +# pdftotext test-big.pdf - + +cmr10.3600pk: + mf-nowin '\mode:=ljfour;mag:=6;input cmr10' + gftopk cmr10.3600gf + +clean: + $(clean) diff --git a/Master/texmf-dist/doc/pdftex/tests/06-pkmap/cmb10.72pk b/Master/texmf-dist/doc/pdftex/tests/06-pkmap/cmb10.72pk Binary files differnew file mode 100644 index 00000000000..9de73dcd0f1 --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/06-pkmap/cmb10.72pk diff --git a/Master/texmf-dist/doc/pdftex/tests/06-pkmap/cmr10.72pk b/Master/texmf-dist/doc/pdftex/tests/06-pkmap/cmr10.72pk Binary files differnew file mode 100644 index 00000000000..35ed3e21584 --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/06-pkmap/cmr10.72pk diff --git a/Master/texmf-dist/doc/pdftex/tests/06-pkmap/prepatch.pdf b/Master/texmf-dist/doc/pdftex/tests/06-pkmap/prepatch.pdf Binary files differnew file mode 100644 index 00000000000..07617bdba2d --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/06-pkmap/prepatch.pdf diff --git a/Master/texmf-dist/doc/pdftex/tests/06-pkmap/test-pkmap.tex b/Master/texmf-dist/doc/pdftex/tests/06-pkmap/test-pkmap.tex new file mode 100644 index 00000000000..f78d7c095d1 --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/06-pkmap/test-pkmap.tex @@ -0,0 +1,37 @@ +% $Id: test-pkmap.tex 777 2017-04-20 23:08:32Z karl $ +% Public domain. +% Test map files with bitmap (i.e., Type 3) fonts. + +% A thread starting here: +% http://tug.org/pipermail/pdftex/2016-July/009064.html +% and continuing here (and more): +% http://tug.org/pipermail/pdftex/2016-August/009065.html +% discusses a patch for supporting an encoding file with Type 3. +% The patch has not yet been installed. +% +% For comparison, the PDF made before the patch was applied is saved +% here as prepatch.pdf. +% +% The default PK resolution is 72, so we made cmb10.72pk in this directory. +% (mf-nowin '\mode:=mactrue; input cmb10' && gftopk cmb10.72gf) +% (mf-nowin '\mode:=mactrue; input cmr10' && gftopk cmr10.72gf) +% +\pdfoutput=1 \catcode`\{=1 \catcode`\}=2 +\hsize=6pc \parfillskip=0pt plus1fil \vsize=6in \lineskip=1pc +\pdfcompresslevel=0 \pdfobjcompresslevel=0 + +\pdfglyphtounicode{ffi}{0066 0066 0069} %no need for all: \input glyphtounicode +\pdfgentounicode=1 + +\pdfmapline{cmr10}% type3 map without encoding - no ToUnicode, no /ffi. +\font\cmr=cmr10 \noindent \cmr ffi + +% if we install the patch. +%\pdfmapline{cmb10 <7t.enc}% type3 map with encoding +%\font\cmb=cmb10 \noindent \cmb ffi + +% geometrically-scaled tfm: the Type 3 should be scaled (resulting in +% blocky blown-up bits), instead of using a separately-generated +% cmr10.360pk (50*72/10). +\font\big = cmr10 at 50pt \big big +\end diff --git a/Master/texmf-dist/doc/pdftex/tests/07-mapwarn/Makefile b/Master/texmf-dist/doc/pdftex/tests/07-mapwarn/Makefile new file mode 100644 index 00000000000..6e40de92426 --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/07-mapwarn/Makefile @@ -0,0 +1,12 @@ +# $Id: Makefile 777 2017-04-20 23:08:32Z karl $ +# Public domain. + +include ../Common.mak + +default: test-mapwarn + +test-mapwarn: + $(prog) test-mapwarn.tex; test $$? = 1 # pdftex should exit 1 + +clean: + $(clean) diff --git a/Master/texmf-dist/doc/pdftex/tests/07-mapwarn/test-mapwarn.tex b/Master/texmf-dist/doc/pdftex/tests/07-mapwarn/test-mapwarn.tex new file mode 100644 index 00000000000..7088ab2a8ad --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/07-mapwarn/test-mapwarn.tex @@ -0,0 +1,18 @@ +% $Id: test-mapwarn.tex 777 2017-04-20 23:08:32Z karl $ +% Public domain. +% Ensure that various invalid map lines don't cause a crash. +% The last line aborts due to a (detected) buffer overflow. + +\pdfoutput=1 \catcode`\{=1 \catcode`\}=2 +\catcode`\^=7 \newlinechar=`\^^J + +% all but the first should cause warnings. +\message{empty^^J}\pdfmapline{} +\message{just <^^J}\pdfmapline{<} +\message{justtfm<^^J}\pdfmapline{cmb10x1<} +\message{justtfm <^^J}\pdfmapline{cmb10x2 <} +\message{justtfm < ^^J}\pdfmapline{cmb10x3 < } +\message{notfm slant^^J}\pdfmapline{" 167 SlantFont " <foo.pfb +\message{notfm extend^^J}\pdfmapline{" 167 ExtendFont " <bar.pfb} +\pdfmapline{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} +\end diff --git a/Master/texmf-dist/doc/pdftex/tests/Common.mak b/Master/texmf-dist/doc/pdftex/tests/Common.mak index 201bef42e9d..04e3afd2c15 100644 --- a/Master/texmf-dist/doc/pdftex/tests/Common.mak +++ b/Master/texmf-dist/doc/pdftex/tests/Common.mak @@ -1,10 +1,10 @@ -# $Id: Common.mak 737 2016-03-21 22:54:16Z karl $ +# $Id: Common.mak 777 2017-04-20 23:08:32Z karl $ # Public domain. # Common Makefile definitions to run pdftex from test hierarchy, # but use support files from an installation. -tl = /usr/local/texmf +tl = /usr/local/texlive-rel tl_dist = $(tl)/texmf-dist # plain = $(tl_dist)/tex/plain/base @@ -17,12 +17,18 @@ tfm_knuth = $(tl_dist)/fonts/tfm/public/knuth-lib t1_cm = $(tl_dist)/fonts/type1/public/amsfonts/cm # env = TEXINPUTS=.:$(plain):$(plain_config):$(generic_config):$(generic_hyphen)\ - TEXFONTS=$(tfm_cm):$(tfm_knuth):$(t1_cm) \ + TEXFONTS=.:$(tfm_cm):$(tfm_knuth):$(t1_cm) \ TEXFONTMAPS=$(tl_dist)/fonts/map/pdftex/updmap \ + ENCFONTS=$(tl_dist)/fonts/enc/dvips/base \ MKTEXTFM=0 \ + MKTEXPK=0 \ KPATHSEA_WARNING=0 diff = diff --text -c0 pdftex = ../../source/build-pdftex/texk/web2c/pdftex +pdftex = $(W)/texk/web2c/pdftex prog = $(env) $(pdftex) -ini -interaction=nonstopmode + +# can't make the clean: target here since then it would be the default. +clean = rm -f *.log *.pdf *.fmt *.aux |