Home

the pdfTeX users manual

image

Contents

1. 44 5 Setting up fonts 9 Additional PDF Keys ss 45 6 Formal syntax specification 13 Colophon oe 32e eee a ea 46 7 PDFTEXprimitiV S 17 GNU Free Documentation License 47 8 Graphics 0 eee eee 41 Introduction The main purpose of the rprTEX project is to create and maintain an extension of TEX that can produce PDF directly from TEX source files and improve enhance the result of TEX typesetting with the help of pnr When rrr output is not selected Por TEX produces standard pv1 output otherwise it generates ppF output that looks identical to the pvr output An important aspect of this project is to investigate alternative justification algorithms e g a font expansion algorithm akin to the Hz micro typography algorithm by Prof Hermann Zapf PpFIEX is based on the original TEX sources and Wzs2c and has been successfully compiled on Uwix WiNDows and Ms pos systems It is actively maintained with new features trickling in Great care is taken to keep new rprIEX versions backward compatible with earlier ones For some years there has been a conservative successor to TEX available called e IEX Because mainstream macro packages such as I TEX have started supporting this welcome extension the e TRX functionality has also been integrated into the rprTEX code For a while TEX Live 2004 and 2005 rprIEX therefore came in two flavours the e TEX enabled p
2. Type Catalog Pages 50 R gt gt endobj 10 O obj lt lt Producer pdfTeX 1 40 14 Creator TeX CreationDate D 20140214090930 08 00 ModDate D 20140214090930 08 00 Trapped False PTEX Fullbanner This is pdfTeX Version 3 1415926 2 5 1 40 14 TeX Live 2013 kpathsea version 6 1 1 gt gt endobj xref O 11 0000000000 0000000328 0000000224 0000000015 0000001050 0000001202 0000000931 0000000396 0000000749 0000001259 0000001308 trailer lt lt Size 11 Root 90R Info 10 0 R ID lt 9412E76EA9D0D010D100E612AC4C5D51 gt lt 9412E76EA9D0D010D100E612AC4C5D51 gt gt gt startxref 1567 EOF 65535 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 B BBBBBBBBBHA The pdfTEX user manual The pdfTEX user manual H n Th Th nh Sebastian Rahtz Hans Hagen Hartmut Henkel Pawel Jackowski Martin Schr der May 22 2014 Rev 715 The title page is the result of this plain TEX text pdfoutput 1 pdfcompresslevel 0 pdfobjcompresslevel 0 pdfmapline ptmr8r Times Roman 2 lt 8r enc font tenrm ptmr8r tenrm Welcome to pdfNTeX bye 11 1 2 The pdfTEX user manual Contents 1 Introduction Lu 1 9 Character translation 42 2 About PDE i4 iom be Rr RAS 2 3 Getting started 3 Abbreviations cece eens 42 4 Macro packages supporting PDFIEX 9 Examples of HZ and protruding
3. Npdfgamma integer Npdfimagegamma integer Npdfinclusioncopyfonts integer Npdfdraftmode integer Npdfsuppresswarningdupdest integer Npdfsuppresswarningdupmap integer Npdfsuppresswarningpagegroup integer Dimen registers pdfhorigin dimen pdfvorigin dimen pdfpagewidth dimen pdfpageheight dimen pdfignoreddimen dimen pdffirstlineheight dimen pdflastlinedepth dimen pdfeachlineheight dimen pdfeachlinedepth dimen pdflinkmargin dimen pdfdestmargin dimen pdfthreadmargin dimen pdfpxdimen dimen 14 The pdfTEX user manual Token registers Npdfpagesattr tokens Npdfpageattr tokens Npdfpageresources tokens Npdfpkmode tokens Expandable commands Npdftexrevision expandable Npdftexbanner expandable Npdfcreationdate expandable Npdfpageref pagenumber expandable Npdfxformname objectnumber expandable Npdffontname font expandable Npdffontobjnum font expandable Npdffontsize font expandable Npdfincludechars font generaltext expandable leftmarginkern box number expandable Nrightmarginkern box number expandable pdfescapestring general text expandable pdfescapename general text expandable pdfescapehex general text expandable pdfunescapehex general text expandable ifpdfprimitive control sequence expandable ifincsname expandable Npdfstrcmp general text general text expandable pdfmatch icase subcount n
4. PDF 1 5 7DOAQ 3 0 obj lt lt Length 152 gt gt stream BT 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 Ta 1 TJ ET endstream endobj 2 0 obj lt lt Type Page Contents 3 O R Resources 1 0 R MediaBox 0 O 612 792 Parent 50R gt gt endobj 1 0 obj lt lt Font lt lt F51 4 OR gt gt ProcSet PDF Text gt gt 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 667 556 611 722 722 944 722 722 333 278 333 469 500 333 444 500 500 444 333 500 500 278 278 500 778 500 500 500 500 333 389 278 endobj 8 0 obj lt lt Type FontDescriptor FontName Times Roman Flags 2 FontBBox 0 216 1000 678 Ascent 678 CapHeight 651 Descent 216 ItalicAngle O StemV 83 XHeight 450 gt gt endobj 6 O obj lt lt Type Encoding Differences 33 exclam 49 one 69 E 84 T 87 W X 99 c d e f 108 1 m 111 o p 116 t 722 611 444 278 gt gt endobj 4 0 obj lt lt Type Font Subtype Type1 BaseFont Times Roman FontDescriptor 8 0 R FirstChar 33 LastChar 116 Widths 7 O R Encoding 6 O R gt gt endobj 5 0 obj lt lt Type Pages Count 1 Kids 2 O R gt gt endobj 9 0 obj lt lt
5. expandable This command converts each character of general text into its hexadecimal representation Each character of the argument becomes a pair of hexadecimal digits The primitive was introduced in pprFIEX 1 30 0 36 7 16 The pdfTEX user manual Npdfunescapehex generaltext expandable This command treats each character pair of general text as a hexadecimal number and returns an ascii character of this code The primitive was introduced in ppFIEX 1 30 0 Npdfstrcmp general text general text expandable This command compares two strings and expands to 0 if the strings are equal to 1 if the first string ranks before the second and to 1 otherwise The primitive was introduced in ppFTgX 1 30 0 pdfmatch icase subcount integer general text general text expandable This command implements pattern matching using the syntax of posix regular expressions The first gen eral text is a pattern the second is a string and the command expands to 1 if the pattern is invalid to 0 if no match is found and to 1 if a match is found With the icase option the matching is case insensitive The subcount option sets the size of the table storing found sub patterns The primitive was introduced in PDFTEX 1 30 0 Npdflastmatch integer expandable The matches found with Npdfmatch are stored in a table This command returns the entry integer Entry 0 contains the match and the following entries contain sub
6. stretch shrink step autoexpand stretch number shrink number step number prespec pre pdfliteral spec direct page pdfspecial spec pdfspecial id pdfspecial modifier balanced text pdfspecialid pdf PDF pdfspecial modifier direct stack action set push pop current A general text is expanded immediately like special in traditional TEX unless explicitly mentioned otherwise Some of the object and image related primitives can be prefixed by immediate More about that in the next sections PDFTEX primitives Here follows a short description of the primitives added by rprIEX 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 samplepdf tex in the ppFTEX distribution 17 71 The pdfTEX user manual Note that if the output is pvi then the ppr TEX specific dimension parameters are not used at all However some PprTEX integer parameters can affect the pvi as well as pr output currently Npdfoutput and pdfadjustspacing General warning many of these new primitives for example pdfdest and pdfoutline write their arguments directly to the rpr output file when producing PDF as PDF string constants This means that you or more likely the macros you write must escape characters as necessary namely C and Oth
7. Unless objects are referenced by others they will just end up as isolated entities not doing any real harm but bloating the prr file In general this rather direct way of pushing objects in the ppr files by primitives like Npdfobj 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 rpr details the best bet is to read the PDF Reference As of the time of writing you can download this book as a big rpr file from Adobe s ppr Technology Center http www adobe com devnet pdf pdf reference html or get the heavy paper version Those who after this introduction feel unsure how to proceed are advised to read on but skip section 7 Before we come to that section we will describe how to get started with rprIEX Getting started This section describes the steps needed to get ppFIEX running on a system where PDFTHX is not yet installed Nowadays virtually all TEX distributions have ppFIEX as a component such as TEX Live TETEX XEMTEX MIKTEX pROTEXT and MacTEX The ready to run TEX Live distribution comes with PDFTEX versions for many Unix Winpows and Mac OS X systems more information can be found at http tug org texlive There are also WINpows specific distributions which contain rprFTEX un der http mirror ctan org systems win32 MiKTEX by Christian Schenk and proTgXt based on MiIKTgX by Thoma
8. chunk average approximate cluster aggregate outline summarize itemize review dip into flip through browse glance into leaf through skim refine enumerate glean synopsize winnow the wheat from the chaff and separate the sheep from the goats 44 The pdfTEX user manual We thrive in information thick worlds because of our marvelous and everyday capacity to se lect edit single out structure highlight group pair merge harmonize synthesize focus orga nize condense reduce boil down choose catego rize catalog classify list abstract scan look into idealize isolate discriminate distinguish screen Both pigeonhole pick over sort integrate blend in spect filter lump skip smooth chunk average approximate cluster aggregate outline summa rize itemize review dip into flip through browse glance into leaf through skim refine enumerate glean synopsize winnow the wheat from the chaff and separate the sheep from the goats We thrive in information thick worlds because of our marvelous and everyday capacity to select edit single out structure highlight group pair merge harmonize synthesize focus organize condense reduce boil down choose categorize catalog classify list abstract scan look into idealize isolate discriminate distinguish screen pigeonhole pick over sort integrate blend inspect filter lump skip smooth chunk average approximate clus
9. pdfpagewidth 210 true mm pdfpageheight 297 true mm pdfhorigin 1 true in pdfvorigin 1 true in pdfpkresolution 600 4 As of TeX Live 2010 we output PDF 1 5 by default so we can enable 4 more compression To change this for the installation comment out of 4 delete these lines and remake the formats To change it for a 4 particular LaTeX document RequirePackage pdf14 early pdfminorversion 5 Npdfobjcompresslevel 2 endinput Figure 1 The rprIEX configuration file for TEX Live pdftexconfig tex Independent of whether such a configuration file is read or not the first action in a ppFTpX run is that the program reads the global WEs2c configuration file texmf cnf which is common to all programs in the Wees2c system This file mainly defines file search paths the memory layout e g string pool and hash size and other general parameters 3 6 Creating format files The pdfTEX user manual Thomas Esser 1998 2004 public domain MifxXpdfoutputAundefined else ifx pdfoutput relax else input pdftexconfig pdf out put 0 fi Mi input etex src dump endinput Figure 2 File etex ini for IEX format with pvr output ifx pdfoutput undefined else ifx pdfoutput relax else input pdftexconfig pdfoutput 1 fi fi scrollmode input latex 1tx endinput Figure 3 File pdflatex ini for TEX format with rpr output The pprTEKX engine allow building f
10. the unbreakable parts of the word will stick into the margin When ppFTEX 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 ppFTpX starts scaling stretching the glyphs until the white space gaps is acceptable This glyph stretching and shrinking is called font expansion To enable font expansion don t forget to set pdfadjustspacing to a value greater than zero There are two different modes for font expansion First if the autoexpand option is there which is the recommended mode only a single map entry is needed for all expanded font versions using the name of the unexpanded rrw file tfmname No expanded tfmname versions need to mentioned they are ignored as PoF TEX generates expanded copies of the unexpanded rrM data structures and keeps them in its memory Since ppFTEX 1 40 0 the autoexpand mode happens within the page stream by modification of the text matrix PDF operator Tm and not anymore on font file level giving the advantage that it now works not only with Type 1 but also with TrueType and OpenType fonts and even without embedding a font file but that s not recommended In this mode ppFTEX requires only unexpanded font files Second if the autoexpand option is missing setting up font expansion gets more tedious as there must be map entries for rrM files in all required expansion values The expanded tfmname
11. 30 0 Npdfgamma integer This primitive defines the device gamma for pDFIEX Values are in promilles same as mag The default value of this primitive is 1000 defining a device gamma value of 1 0 When pdfimageapplygamma is set to 1 then whenever a pNc image is included ppFIEX applies a gamma correction This correction is based on the value of the 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 value of Npdf imagegamma is used instead If specified the parameter must appear before any data is written to the ppr output The primitive was introduced in ppFTEX 1 30 0 Npdfimagegamma integer This primitive gives a default assumed gamma value for pNc images Values are in promilles same as for pdfamma The default value of this primitive is 2200 implying an assumed gamma value of 2 2 32 7 10 The pdfTEX user manual When ppFTpX 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 Npdf imagegamma to a lower value like 1000 If specified the parameter must appear before any data is written to the ppr output The primitive was introduced in
12. A Use in the Title Page and on the covers if any a title distinct from that of the Document and from those of previous versions which should if there were any be listed in the History section of the Doc ument You may use the same title as a previous version if the original pub lisher of that version gives permission B List on the Title Page as authors one or more per sons or entities responsible for authorship of the mod ifications in the Modified Version together with at least five of the principal authors of the Document all of its principal authors if it has fewer than five un less they release you from this requirement C State on the Title page the name of the publisher of the Modified Version as the publisher D Preserve all the copyright notices of the Document E Add an appropriate copy right notice for your mod ifications adjacent to the other copyright notices F Include immediately after the copyright notices a license notice giving the public permission to use the Modified Version un der the terms of this Li cense in the form shown in the Addendum below G Preserve in that license no tice the full lists of Invari ant Sections and required Cover Texts given in the Document s license notice H Include an unaltered copy of this License I Preserve the section Enti ted History Preserve its Title and add to it an item stating at least the ti tle year new
13. Box of the page fitbh fit the width of Bounding Box of the page fitbv fit the height of Bounding Box of the page xyz goto the current position see below Table 5 Options for display of outline and destinations The specification xyz can optionally be followed by zoom integer to provide a fixed zoom in The in teger is processed like TEX magnification i e 1000 is the normal page view When zoom integer is given the zoom factor changes to 0 001 of the integer value otherwise the current zoom factor is kept unchanged The destination is written out only if the corresponding whatsit node is searched at shipout time pdfstartlink rule spec attr spec action spec This primitive is used along with 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 Npdfendlink The dimensions of the link are handled in the similar way as in Npdfannot Both Npdfstartlink and Npdfendlink 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 pdfstartlink and Npdfendlink 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 PDF Reference
14. Similar to pdfmapfile but here you can give a single map line like the ones in map files as an argument The optional modifiers have the same effect as with pdfmapf ile see also the description above Example pdfmapline tptmri8r Times Italic lt 8r enc lt ptmri8a pfb This primitive especially the pdfmapline variant is useful for temporary quick checks of a new font map entry during development before finally putting it into a map file pdfmapline like pdfmapfile blocks reading of the default map file if it comes early enough in the TEX input The primitive was introduced in ppFTEX 1 20a Npdfsuppresswarningdupmap integer Ordinarily pprFIEX gives a warning when a duplicate map entry for a given font is read whatever the mechanism However sometimes it is useful to include map information within the document using pdfmapfile or pdfmapline even for fonts that happen to be installed on the system Then seeing the warnings on every run is just noise and can be suppressed by setting this parameter to a positive number The primitive was introduced in ppFIEX 1 40 13 Npdftracingfonts integer This integer parameter specifies the level of verbosity for info about expanded fonts given in the log e g when tracingoutput 1 If pdftracingfonts 0 which is the default the log shows the actual non zero signed expansion value for each expanded letter within brackets e g Nxivtt 20 t 25 The p
15. The first parameter specifies the action to be taken and is the same as that allowed for pdfstartlink The count specifies the number of direct subentries under this entry specify 0 or omit it if this entry has no subentries If the number is negative then all subentries will be closed and the absolute value of this number specifies the number of subentries The text is what will be shown in the outline window Note that this is limited to characters in the PDF Document Encoding vector The outline is written to the rpr output immediately Article threads Npdfthread rule spec attr spec id spec Defines a bead within an article thread Thread beads with same identifiers spread across the document will be joined together pdftstarthread rule spec attr spec id spec This uses the same syntax as pdfthread apart that it must be followed by a pdfendthread pdfstartthread and the corresponding pdfendthread must end up in vboxes with the same nest ing level all vboxes between them will be added into the thread Note that during output runtime if there are other newly created boxes which have the same nesting level as the vbox vboxes containing pdfstartthread and pdfendthread they will be also added into the thread which is probably not 35 7 14 7 15 The pdfTEX user manual what you want To avoid such unconsidered behaviour it s often enough to wrap boxes that shouldn t belong to the thread by a bo
16. also be set up by the environment variable TEXMFCNF Next you might need to edit texmf cnf so that rprIEX can find all necessary files but the texmf cnf files coming with the major TEX distributions should already be set up for normal use You might check into the file texmf cnf to see where the various bits and pieces are going PDFTEX uses the search path variables shown in table 1 used for texmf cnf output files TEXMFOUTPUT input files images TEXINPUTS format files TEXFORMATS TEX pool files TEXPOOL encoding files ENCFONTS font map files TEXFONTMAPS TFM files TFMFONTS virtual fonts VFFONTS Type 1 fonts T1FONTS TrueType fonts TTFONTS OpenType fonts OPENTYPEFONTS pixel fonts PKFONTS Table 1 The Wzz2c variables TEXMFOUTPUT Normally pprIEX puts its output files in the current directory If any output file cannot be opened there it tries to open it in the directory specified in the environment variable TEXMFOUTPUT There is no default value for that variable For example if you 3 5 The pdfTEX user manual type pdftex paper and the current directory is not writable if TEXMFOUTPUT has the value tmp ppFTEX attempts to create tmp paper log and tmp paper pdf if any output is produced TEXINPUTS This variable specifies where rprIEX finds its input files Image files are considered input files and searched for along this path TEXFORMATS Search path for format fmt files TEXPOOL Search path for poo
17. and number exclusive This primitive expands to a list of tokens The primitive was introduced in rprTEX 1 30 0 Npdfnormaldeviate expandable Generate a normally distributed random integer with a mean of 0 and standard deviation 65536 That is about 6876 of the time the result will be between 65536 and 65536 one standard deviation away from the mean About 95 of results will be within two standard deviations and 99 7 within three This primitive expands to a list of tokens The primitive was introduced in ppFTEX 1 30 0 37 7 17 7 18 7 19 The pdfTEX user manual pdfrandomseed read only integer You can use the pdfrandomseed to query the current seed value so you can e g write the value to the log file The initial value of the seed is derived from the system time and is not more than 1 000 999 999 this ensures that the value can be used with commands like count The primitive was introduced in PDFTEX 1 30 0 Npdfsetrandomseed number Set the random seed pdfrandomseed to a specific value allowing you to replay sequences of semi randoms at a later moment The primitive was introduced in ppFTgxX 1 30 0 Timekeeping Npdfelapsedtime read only integer Return a number that represents the time elapsed from the moment of the start of the run The elapsed time is returned in scaled seconds meaning seconds divided by 65536 e g ppFIEX has run for 135003 scaled seconds when this paragraph was ty
18. and ExtendFont Those map files were first created for pvi postprocessors But as PoF TEX in rpr output mode includes all pnr 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 rprIEX is in pv mode Pixel fonts can be used without being listed in the map file By default rprTEX reads the map file pdftex map In Wes2c map files are searched for using the 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 each line is upward compatible with dvips map files and can contain the following fields some are optional explanations follow tfmname basename fontflags special encodingfile fontfile It is mandatory that tfmname is the first field If a basename is given it must be the second field Similarly if fontflags is given it must be the third field if basename is present or the second field if basename is left out It is possible to mix the positions of special encodingfile and fontfile however the first three fields must be given in fixed order tfmname sets the name of the tr file for a font the name TEX sees This name must always be given basename sets the PosrScnirr base font name which has two uses First when a rrr file is embedded by Npdfximage the BaseFont names in the f
19. 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 pdfprimitive expands either Otherwise pdfprimitive doesn t expand The primitive was introduced in pprIEX 1 40 0 pdfretval read only integer Set to 1 if pdfobj ignores an invalid object number Perhaps this will be used to store the error status of other primitives in the future pdfsavepos 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 pdflastxpos and pdflastypos primitives and e g written out to some auxiliary file The coordinates can be used only after the current shipout has been finalized therefore normally two rprTEX runs are required to utilize these primitives Starting with ppFTIEX 1 40 0 this mechanism can be used also while running in pvi mode Npdfshellescape read only integer This primitive is 1 if write18 is enabled 2 if it is restricted and 0 otherwise write18 was enabled when this manual was typeset The primitive was introduced in ppr TEX 1 30 0 Npdftexbanner expandable Returns the ppFIRX banner message e g for th
20. every included ppr The dictionary of this object contains these additional keys key type meaning PTEX FileName string The name of the included file as seen by rprIEX PTEX InfoDict dictionary The document information dictionary of the included ppr an indirect object PTEX PageNumber integer The page number of the included file The PDF Reference says Although viewer applications can 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 information in the document information dictionary we have to obey the rules laid down in the PDF Reference The following key ends up in the document catalog key meaning type PTEX Fullbanner string The full version of the binary that produced the file as displayed by pdftex version eg This is pdfTeX Version 3 1415926 2 5 1 40 14 45 The pdfTEX user manual TeX Live 2013 kpathsea version 6 1 1 Thisisnecessary becau se the string in the Producer key in the info dictionary is rather short namely pdfTeX 1 40 15 Colophon This manual is typeset in CoNTEXr One can generate an A4 version from the source code by typing texexec result pdftex a pdf pdftex t Or in letter size texexec mode letter result pdftex l pdf pdftex t Given that the A4 version is typeset o
21. 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 vertical part of the glyph becomes thicker and looks incompatible with an unscaled original With a Multiple Master situation one can stretch while keeping this thickness compatible Npdfadjustspacing integer This primitive provides a switch for enabling font expansion By default pdfadjustspacing is set to 0 then font expansion is disabled so that the ppFTEX output is identical to that from the original TEX engine Font expansion can be activated in two modes When Npdfadjustspacing is set to 1 font expansion is applied after TEX s normal paragraph breaking routines have broken the paragraph into lines In this case line breaks are identical to standard TEX behaviour When set to 2 the width changes that are the result of stretching and shrinking are taken into account 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 teM files that are related to the stretch and shrink settings for the pdffontexpand primitive unless this is given with the autoexpand opt
22. for instance F12 or F54 For a given TEX font this primitive expands to the number from the corre sponding font resource name E g if F12 corresponds to some TEX font foo the pdffontname foo expands to the number 12 In the current implementation when pdfuniqueresname see below is set to a positive value the pdffontname still returns only the number from the font resource name but not the appended random string Npdffontobjnum font expandable This command is similar to pdffontname but it returns the ppr object number of the font dictionary instead of the number from the font resource name E g if the font dictionary Type Font in PDF object 3 corresponds to some TEX font foo the pdffontobjnum foo gives the number 3 Use of pdffontname and Npdffontobjnum allows users full access to all the font resources used in the document Npdffontsize font expandable This primitive expands to the font size of the given font with unit pt E g when using the plain TEX macro package the call pdffontsize tenrm expands to 10 Opt Npdfincludechars font generaltext This command causes ppFTEX to treat the characters in general text as if they were used with font which means that the corresponding glyphs will be embedded into the font resources in the rpr output Nothing is appended to the list being built Npdfunigueresname integer When this primitive is assigned a positive number Dr resource names w
23. is always unused The actual starting point of the file s object structure is defined after the trailer The Root entry points to the Catalog object no 9 In this object the viewer can find the pointer Pages to the page list object no 5 In our example we have only one page The trailer also holds an Info entry which points to an object no 10 with a bit more about the document Just follow the thread Root object 9 Pages object 5 Kids object 2 Contents object 3 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 ppr code of this file to get an impression of that The page content is a stream of drawing operations Such a stream can be compressed where the level of compression can be set with Npdfcompresslevel 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 followed by cm As in PosrScar the operator comes after the operands Between BT and ET comes the text A font is selected by a Tf operator which is given a font resource name F and the font size The actual text goes into 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 pro
24. ligature to a pair of f s whose code is U 0066 The glyphtounicode tex file distributed with ppFIEX and other software contains thousands of such definitions covering most common glyph names So for practical purposes one would probably want input glyphtounicode pdf gentounicode 1 I4TEX users could load the cmap package to achieve the same effect 26 7 4 The pdfTEX user manual pdfnobuiltintounicode font The primary purpose of this command is to prevent rprIEX from generating the ToUnicode CMap resource for the given font when Npdfgentounicode 1 most likely because the CMap resource is already generated by some other method for example the I TEX cmap package uses Npdffontattr to generate a CMap resource Minimal example font f cmb10 pdfnobuiltintounicode f f No unicode mappings for this output The primitive was introduced in pprFIEX 1 40 11 pdfinterwordspaceon pdfinterwordspaceoff These commands create corresponding whatsit nodes which turn on off generation of faked interword spaces in the output This allows for better reflowing of text on the fly by pr readers better extraction of textual content and is required by ppr A It does not affect the normal TEX justification with glue This requires finding and reading font files dummy space t fm and pfb the font is included in the rpr output and character 32 is inserted from it as the fake space Example of usage see also the fa
25. output as the ppr standard doesn t allow to do anything like this within a BT ET block special pdf text This is equivalent to pdfliteral text special pdf direct text This is equivalent to pdfliteral direct text special pdf page text This is equivalent to pdfliteral page text Strings pdfescapestring general text expandable Starting from version 1 30 0 ppFIEX provides a mechanism for converting a general text into ppr string Many characters that may be needed inside such a text especially parenthesis have a special meaning inside a Ppr string object and thus can t be used literally The primitive replaces each special ppr character by its literal representation by inserting a backslash before that character Some characters e g space are also converted into 3 digit octal number In example pdfescapestring Text 1 will be expanded to Text 040 1X This ensures a literal interpretation of the text by the rpr viewer The primitive was introduced in ppFTEX 1 30 0 Npdfescapename general text expandable In analogy to pdfescapestring pdfescapename replaces each special ppr character inside the general text by its hexadecimal representation preceded by st character This ensures the proper interpretation of the text if used as a ppr name object In example Text 1 will be replaced by Text 20312281129 The primitive was introduced in rprTEX 1 30 0 Npdfescapehex generaltext
26. pdfprependkern integer If positive automatic insertion of kerns before characters is enabled knbccode font 8 bit number integer The width of the kern in thousandths of an em inserted before a character 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 e g French punctuation pdfprependkern 1 knbccode font 150 pdfappendkern integer Same as pdf prependkern but for kerns inserted after characters knaccode font 8 bit number integer Same as knbccode except the kern is inserted after the character Such a kern is required for instance after a left guillemet in French punctuation Vertical adjustments pdfignoreddimen dimension This is the dimension which must assigned to the following four primitives so they are ignored Default is 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 nointerlineskip should be modified accordingly pdffirstlineheight dimension 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 pdfignoreddimen By default it is set to 1000pt so it is ignored as long as the value of pdf ignoreddimen is the same pdflastlinedepth dimension This is similar to the pre
27. ppFTEX 1 30 0 Npdfpxdimen dimen 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 pt or em For this purpose PDFIEX provides an extra unit called px that takes the dimension given to the Npdfpxdimen primitive In example to make the unit px corresponding to 96 dpi pixel density then 1 px 72 96 bp one can do the following calculation Mpdfpxdimen ilin 1 dpi divide pdfpxdimen by 96 96 dpi hsize 1200px Then 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 pdfpxdimen is 1 bp corresponding to a pixel density of 72 dpi This primitive is completely independent from the pdfimageresolution and pdfpkresolution parameters The primitive was introduced in pprTEX 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 ppFTEX 1 40 0 pdfpxdimen is now a real dimension parameter pdfinclusioncopyfonts integer If positive this parameter forces ppFTEX to include fonts from a por file loaded with pdfximage even if those fonts are available on disk Bigger files might be created but included rrr 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 mi
28. the name of the file containing the external encoding vector to be used for the font The encoding file must have name extension enc and the full file name including this extension must be given with preceding character The format of the encoding vector is identical to that used by dvips If no encoding is specified the font s built in default encoding is used The 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 required when subsetting a TrueType font fontfile sets the name of the font file to be embedded into the ppr output for a given TEX font the tfmname lt fontfile mapping is the most prominent use of the pdftex map file The font file name must belong to a Type 1 or TrueType font file If the fontfile field is missing no font embedding can take place in case the basename field does not contain one of the 14 standard font names also a warning will be given Not embedding a font into a rpr file might be troublesome as it requires that the font or some similar looking replacement font is available within the ppr 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 e If the font file name is preceded by a lt character the font file will be only partially embedded into the ror file subs
29. 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 The Jjp1G2 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 image formats The JBIG2 format is part of the rpr standard since version 1 5 native jBIG2 image inclusion is available in ppFTEX since version 1 40 0 A js1c2 file might contain many images which gives an even better compression ratio than with a single image per file as jz1c2 encoders can exploit similarities between bit patterns over several images Encoders for JBIG2 can operate in lossy as well as lossless modes Only recently a free yBIG2 encoder has been written and made available see https github com agl jbig2enc 41 The pdfTEX user manual Other options for graphics in ppr TFX are TEX picture mode Since this is implemented simply in terms of font characters it works in exactly the same way as usual Xy pic If the PostScrirr back end is not requested Xy pic uses its own Type 1 fonts and needs no special attention tpic The tpic special commands used in some macro packages can be redefined to produce literal PDF using some macros written by Hans Hagen METAPOST Although the output of METAPOST is PosrScnrrr it is in a highly simplified form and a METAPOST to rpr conversi
30. PNG JPEG JBIG2 and pDr format a few differences between these are discussed below The most common technique with TEX the inclusion of Eps figures is replaced by rrr inclusion Eps files can be converted to rpr by Guostscript Adobe Distiller or other PosTScRIPT to PDF converters The rrr format is currently the most versatile source format for graphics embedding ppFIEX allows to insert arbitrary pages from rrr 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 PDFTEHX By default rprTEX takes the BoundingBox of a rrr file from its CropBox if available otherwise from its MediaBox This can be influenced by the pdf box spec option to the pdfximage primitive or by setting the Npdfpagebox or Npdfforcepagebox primitives to a value corresponding to the wanted box type To get the right BoundingBox from a Eps file before converting to Ppr it is necessary to transform the grs 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 written The TEXuvrr utility script and the PSroPDF program that comes with GuostscrirT can so a similar job Concerning this conversion they can handle complete directories remove some garbage from files takes precautions against duplicate conversion etc The lossle
31. TEX 1 30 0 Color stack PDF TEX 1 40 0 comes with color stack support actually any graphic state stack Npdfcolorstackinit page direct general text expandable The primitive initializes a new graphic stack and returns its number Optional page keyword instructs PDFTEX to restore the graphic at the beginning of every new page Also optional direct has the same effect as for pdf literal primitive The primitive was introduced in ppFTEX 1 40 0 38 7 20 7 21 The pdfTEX user manual pdfcolorstack stack number stack action general text The command operates on the stack of a given number If stack action is push keyword the new value provided as general text is inserted into the top of the graphic stack and becomes the current stack value If followed by pop the top value is removed from the stack and the new top value becomes the current set keyword replaces the current value with general text without changing the stack size current keyword instructs just to use the current stack value without modifying the stack at all The primitive was introduced in rprIgEX 1 40 0 Transformations Since the content of pdf literal is not interpreted anyhow any transformation inserted directly into the content stream as well as saving and restoring the current transformation matrix remains unnoticed by rprIEX positioning mechanism As a consequence links and other annotations that are formed in PDF as different layer
32. authors and publisher of the Modified Version as given on the Ti tle Page If there is no section Entitled History in the Document create 47 one stating the title year authors and publisher of the Document as given on its Title Page then add an item describing the Mod ified Version as stated in the previous sentence J Preserve the network loca tion if any given in the Document for public ac cess to a Transparent copy of the Document and like wise the network locations given in the Document for previous versions it was based on These may be placed in the History sec tion You may omit a net work location for a work that was published at least four years before the Docu ment itself or if the orig inal publisher of the ver sion it refers to gives per mission K For any section Entitled Acknowledgements or Dedications Preserve the Title of the section and preserve in the section all the substance and tone of each of the contributor ac knowledgements and or dedications given therein L Preserve all the Invariant Sections of the Document unaltered in their text and in their titles Section num bers or the equivalent are not considered part of the section titles M Delete any section Entitled Endorsements Such a section may not be in cluded in the Modified Ver sion N Do not retitle any existing section to be Entitled En dorsements or to conflict
33. ay not use technical mea sures to obstruct or control the reading or further copy ing of the copies you make or distribute However you may accept compensation in exchange for copies If you dis tributea large enough number of copies you must also follow the conditions in section 3 You may also lend copies un der the same conditions stated above and you may publicly display copies COPYING IN QUANTITY If you publish printed copies or copies in media that com monly have printed covers of the Document number ing more than 100 and the Document s license notice re quires Cover Texts you must enclose the copies in covers that carry clearly and legibly all these Cover Texts Front Cover Texts on the front cover and Back Cover Texts on the back cover Both covers must also clearly and legibly iden tify you as the publisher of these copies The front cover must present the full title with all words of the title egually prominent and visible You may add other material on the covers in addition Copy ing with changes limited to the covers as long as they preserve the title of the Doc ument and satisfy these condi tions can be treated as verba tim copying in other respects If the required texts for either cover are too voluminous to fit legibly you should put the first ones listed as many as fit reasonably on the actual cover and continue the rest onto adjacent pages If you pu
34. bed in detail within later sections Figure 1 shows a recent configuration file pdftexconfig tex in TEX format using the primitives from table 2 which typically is read in during the format building process It enables rpr output sets paper dimensions and the default pixel density for rx font inclusion The default values are chosen so that Ppr TEX often can be used e g in ini mode even without setting any parameters The pdfTEX user manual internal name type default comment Npdfoutput integer 0 DVI Npdfadjustspacing integer 0 off pdfcompresslevel integer 9 best pdfobjcompresslevel integer 0 no object streams pdfdecimaldigits integer 4 max pdfimageresolution integer 72 dpi pdfpkresolution integer 0 72 dpi pdfpkmode token reg empty mode set in mktex cnf pdfuniqueresname integer 0 pdfprotrudechars integer 0 pdfgentounicode integer 0 pdfminorversion integer 4 PDF 1 4 Npdfpagebox integer 0 pdfforcepagebox integer 0 pdfinclusionerrorlevel integer 0 pdfhorigin dimension 1in pdfvorigin dimension 1in pdfpagewidth dimension Opt Npdfpageheight dimension Opt Npdflinkmargin dimension Opt Npdfdestmargin dimension Opt Npdfthreadmargin dimension Opt Npdfmapfile text pdftex map not dumped Table2 The set of rprIEX configuration parameters 4 Set pdfTeX parameters for pdf mode replacing pdftex cfg file 4 Thomas Esser 2004 public domain pdfoutput 1 Npdfcompresslevel 9 pdfdecimaldigits 3
35. blish or distrib ute Opaque copies of the Document numbering more than 100 you must either include a machine readable Transparent copy along with each Opague copy or state in or with each Opague copy a computernetwork loca tion from which the general networleusing public has access to download using public standard network pro tocols 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 distri bution of Opaque copies in quantity to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy directly or through your agents or retailers of that edition to the public lt is requested but not re quired 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 MODIFICATIONS You may copy and distribute a Modified Version of the Doc ument under the conditions of sections 2 and 3 above pro vided that you release the Modified Version under pre cisely this License with the Modified Version filling the role of the Document thus li censing distribution and mod ification of the Modified Ver sion to whoever possesses a copy of it In addition you must do these things in the Modified Version
36. can be given via attr spec Typically the attributes specify the color and thickness of any border around the link Thus C 0 9 0 0 Border 0 O 2 specifies a color in RGB of dark red and a border thickness of 2 points While all graphics and text in a ppr 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 not obey transformations issued by pdfliteral s The action spec specifies the action that should be performed when the hyperlink is activated while the user action spec performs a user defined action A typical use of the latter is to specify a unr like S URI URI http www tug org or anamed action like S Named N NextPage 34 4 12 7 13 The pdfTEX user manual A goto action spec performs a Golo action Here numid and nameid specify the destination iden tifier see below The page spec specifies the page number of the destination in this case the zoom factor is given by general text A destination can be performed in another rrr file by specifying file spec in which case newwindow spec specifies whether the file should be opened in a new window A file spec can be either a string ora dictionary The default behaviour of the newwindow spec depends on the browser setting A thread action spec performs an article thread reading The thread identif
37. d ini mode The extended ini mode can also be forced by the etex command line option as shown in the 2nd line below pdftex ini jobname pdfelatex pdflatex ini pdftex ini jobname pdfelatex etex pdflatex ini In CoNTEXr the generation depends on the interface used A format using the English user interface is generated with pdftex ini cont en When properly set up one can also use the CoNTEXr command line interface TpXzxzc to generate one or more formats like 3 7 3 8 The pdfTEX user manual texexec make en for an English format or texexec make en de for an English and German one Most ConNTEXr users will simply say texexec make all alone and so generate the TEX and METAPOST related formats that CoNTEXr needs Whatever macro package used the formats should be placed in the TEXFORMATS path Testing the installation When everything is set up you can test the installation In the distribution there is a plain TEX test file samplepdf tex in the manual samplepdf directory Process this file by typing pdftex samplepdf If the installation is ok this run should produce a file called samplepdf pdf The file samplepdf tex is also a good place to look for how to use rprIEX s primitives Common problems The most common problem with installations is that por TEX complains that something cannot be found In such cases make sure that TEXMFCNF is set correctly so ppor TEX can find texmf cnf The ne
38. d no Back Cover Texts A copy of the license is included in the section entitled GNU Free Documentation License The pdfTEX user manual About PDF The cover of this manual lists an almost minimal rrr file generated by ppFTEX from the corresponding source on the next page Since compression is not enabled such a rrr file is rather verbose and readable The first line specifies the version used rpr viewers are supposed to silently skip over all elements they cannot handle A por file consists of objects These objects can be recognized by their number and keywords 9 0 obj Type Catalog Pages 5 O R gt gt endobj Here9 0 obj endobj is the object capsule The first number is the object number The sequence 5 0 Ris an object reference a pointer to another object no 5 The second number here a zero is currently not used in ppFTEX it is the version number of the object It is for instance used by ppr editors when they replace objects by new ones When a viewer opens a rrr file it goes to the end of the file looking for the keyword startxref The number after startxref gives the absolute position byte offset from the file start of the so called object cross reference table that begins with the keyword xref This table in turn tells the byte offsets of all objects that make up the ppr file providing fast random access to the individual objects here the xref table shows 11 objects numbered from 0 to 10 the object no 0
39. d the font It s highly recommended nowadays to embed even the standard fonts as modern viewers often don t use the original 14 standard fonts anymore but instead approximate them by instances of built in Multiple Master fonts e g the Adobe Reader 7 approximates the Times Roman variants by the Minion font So you never really Know how it looks exactly at the viewer side unless you embed every font 31 3 2 The pdfTEX user manual 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 Type Page shows that a mediabox 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 pdf pageattr primitive Although in most cases macro packages will shield users from these internals ppor TEX 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 pdfobj after which pdflastobj returns its number So pdfobj lt lt Type ExtGState LW 2 gt gt inserts an object into the ppr file it creates a graphics state object setting the line width to 2 units and pdflastobj now returns the number pDFTEX assigned to this object
40. dfTEX user manual If pdftracingfonts 1 also the name of the rrM file is listed together with the font size e g xivtt cmtt10 20014 0pt t Setting Npdftracingfonts to a value other than 0 or 1 is not recommended to allow future extensions The primitive was introduced in ppFTEX 1 30 0 pdfmovechars integer Since ppFTgX version 1 30 0 the primitive pdfmovechars is obsolete and its use merely leads to a warning This primitive specified whether ppFTEX should try to move characters in range 0 31 to higher slots its sole purpose was to remedy certain bugs of early PDF viewers Npdfpkmode tokens The 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 e g in pdftexconfig tex The primitive was introduced in ppFTEX 1 30 0 Npdfnoligatures font This disables all ligatures in the loaded font font The primitive was introduced in ppFTEX 1 30 0 Ntagcode font character code integer This primitive accesses a character s char tag info It is meant to delete lig tag the character s ligature kerning program list tag which indicates that the character belongs to a chain of ascending sizes and or ext tag which indicates that the character is extensible with the following options assigning 7 or smaller clears all tags 6 clears ext tag and list tag 5clearsext tagandlig tag 4 clears ext ta
41. dobe 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 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 If the 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 fontfile description below special specifies instructions to manipulate fonts similar to the way dvips does Currently only the keywords SlantFont and ExtendFont are interpreted other instructions as ReEncodeFont with parameters see encoding below are just ignored The permitted SlantFont range is 1 1 for ExtendFont it s 2 2 The block of special instruction must be enclosed by double quotes encodingfile specifies
42. duced by a less sophisticated typesetting engine whole seguences of words can be recognized In rpr files generated by ppFIEX however many words come out rather fragmented mainly because a lot of kerning takes place in our example the 80 moves the text elcome left towards the letter W by 80 1000 of the font size Ppr 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 string snippets Every Page object points also to a Resources object no 1 that gives all ingredients needed to assemble the page In our example only a Font object no 4 is referenced which in turn tells that the text is typeset in Font Times Roman The Font object points also to a 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 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 rpr viewer and therefore need not be embedded in the rrr file it is left out here 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 ppr viewer and the best way to do this is to embe
43. e g due to font license restrictions but wish to use the font metrics and let the rpr viewer generate instances that look close to the used font in case the font resource is not installed on the system where the rpr output will be viewed or printed To use this feature the font flags 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 which is not very useful When one suffers from invalid lookups for instance when rprIgX tries to open a pfa file instead of a pfb one one can add the suffix to the filename In this respect por TEX completely relies on the kpathsea libraries If a used font is not present in the map files first por TEX will look for a source with suffix pgc which is a so called rcc source ppr Glyph Container If no rcc source is available ppor TEX will try to use rk fonts as pvi drivers do creating rk fonts on the fly if needed Lines containing nothing apart from 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 TrM at various sizes will be included only once in the rpr output Thus if a font let s say 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 csr10 csr10 at 12pt etc So rprIEX tries t
44. e version used here This is pdfTeX Version 3 1415926 2 5 1 40 14 TeX Live 2013 kpathsea version 6 1 1 The primitive was intro duced in ppFTEX 1 20a Npdftexrevision expandable Returns the revision number of ppFTEX e g for ppFIEX version 1 40 14 used to produce this document it returns the number 14 Npdftexversion read only integer Returns the version of pDFIEX multiplied by 100 e g for ppor TEX version 1 40 14 used to produce this document it returns 140 Nguitvmode The primitive instructs ppFTEX to quit vertical mode and start typesetting a paragraph Nquitvmode has the same effect as leavevmode definition from plain macro package Note however that leavevmode may conflict with Neverypar tokens list No such risk while using Nquitvmode instead The primitive was introduced in rprTEX 1 21a 40 The pdfTEX user manual vadjust pre spec filler vertical mode material The vadjust implementation of pDFIEX adds an optional qualifier pre spec which is the string pre to the original TEX primitive with the same name As long as there is no pre given vadjust behaves exactly as the original see the TEXbook p 281 it appends an adjustment item created from vertical mode material to the current list affer the line in which Nvadjust appears However with the gualifier pre the adjustment item is put before the line in which Nvadjust pre appears Graphics PDF TEX supports inclusion of pictures in
45. e zone An example of this format is shown below For details please refer to the PDF Reference Multiple appearances of Npdfinfo 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 ppFIEX does not perform any further operations on general text provided by the user An example of the use of Npdf info is pdfinfo Title example pdf Creator TeX Producer pdfTeX 1 40 15 Author Tom and Jerry CreationDate D 20061226154343 01 00 ModDate D 20061226155343 01 00 Subject Example Keywords mouse cat pdfcatalog general text open action spec Similar to the document info section is the document catalog where keys are URI which provides the base urz of the document and PageMode which determines how the rpr viewer displays the document on startup The possibilities for the latter are explained in Table 4 value meaning UseNone neither outline nor thumbnails visible UseUutlines outline visible UseThumbs thumbnails visible FullScreen full screen mode Table 4 Supported PageMode values In full screen mode there is no menu bar window controls nor any other window present The default setting is UseNone The openaction is the action provided when opening the document and is specified in the same way as internal links see sectio
46. erveobjnum useobjnum number rule spec general text object contents file spec general text xform attr spec attr spec resources spec image attr spec lt rule spec attr spec page spec colorspace spec pdf box spec outline spec attr spec action spec count number general text action spec user user action spec goto goto action spec thread thread action spec user action spec general text goto action spec numid file spec nameid file spec page spec general text file spec nameid newwindow spec 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 pdfboxspec mediabox cropbox bleedbox trimbox artbox map spec map modifier balanced text map modifier gt numid num number nameid name general text newwindow spec newwindow nonewwindow dest spec numid dest type nameid dest type dest type xyz zoom number fitr rule spec fitbh fitbv fitb fith fitv fit thread spec rule spec attr spec id spec id spec numid nameid file spec file general text pagespec page number expand spec
47. erwise an invalid ppr file may result The hyperref and TEawro packages have code which may serve as a starting point for implementing this although it will certainly need to be adapted to any particular situation Document setup Npdfoutput integer This parameter specifies whether the output format should be pvi or PDF A positive value means PDF output otherwise default 0 one gets pvr output This primitive is the only one that must be set to produce rpr output unless the commandline option output format pdf is used all other primitives are optional This parameter cannot be specified after shipping out the first page In other words if we want PDF output we have to set pdf output before ppFTEX ships out the first page When pprTEX starts complaining about specials one can be rather sure that a macro package is not aware of the rpr mode A simple way of making macros aware of rprIEX in PDF or pvi mode is ifx pdfoutput undefined Ncsname newcount endcsname pdfoutput fi ifcase pdfoutput DVI CODE else PDF CODE fi Using the ifpdf sty file which works with both I TRX and plain TEX is a cleaner way of doing this Historically the simple test Vi fxXpdfoutputXundefined was defined but nowadays the ppFTEX engine is used in distributions also for non ppr formats e g TEX so pdfoutput may be defined even when the output format is pvr Npdfminorversion integer This primitive sets the rpr version of the generated file and
48. escriptor is a 32 bit integer that contains a collection of boolean attributes These attributes are true if the corresponding bit is set to 1 Table 3 specifies the meanings of the bits with bit 1 being the least significant Reserved bits must be set to zero bit position semantics 1 Fixed width font 2 Serif font 3 Symbolic font 4 Script font 5 Reserved 6 Uses the Adobe Standard Roman Character Set 7 Italic 8 16 Reserved 17 All cap font 18 Small cap font 19 Force bold at small text sizes 20 32 Reserved Table3 The meaning of flags in the font descriptor 10 The pdfTEX user manual All characters in a fixed width font have the same width while characters in a proportional font have different widths Characters in a 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 symbolic font contains symbols rather than letters and numbers Characters in a script font resemble cursive handwriting An all cap font which is typically used for display purposes such as titles or headlines contains no lowercase letters It differs from a 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 A
49. esolution 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 pdfrefximage command to a box and checking the dimensions of the box setbox0 hbox pdfximage somefile png pdfrefximage pdflastximage Now we can use wd0 and ht0 to question the natural size of the image as determined by ppFTEX When dimensions are specified before the somefile png the graphic is scaled to fit these Note that unlike the e g input primitive the filename is supplied between braces 30 The pdfTEX user manual The image type is specified by the extension of the given file name png stands for PNG image jpg or jpeg for JPEG jbig2 preferred but jb2 works also for JBIG2 and pdf for rrr file But once PDFIEX 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 is stated wrongly Similarly to pdfxform the optional text given by attr spec will be written as additional attributes of the image before other keys of the image dictionary One should be aware that slightly different type of PDF object is created while including PNG JPEG or JBIG2 bitmaps and PDF images While
50. etted meaning that only used glyphs are going into the rpr file This is the most common use and is strongly recommended for any font as it ensures the portability and reduces the size of the rpr output Subsetted fonts are included in such a way that name and cache clashes are minimized e If the font file name is preceded by a double lt lt 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 rpr 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 rprIgX Beware some font vendors forbid full font inclusion 11 m The pdfTEX user manual e The case that no special character precedes the font file name is deprecated since ppFTEX version 1 40 0 These font files are now completely ignored and a corresponding warning is given You achieve exactly the same ppr result if you just remove the font file name from the map entry Then the glyph widths that go into the ppr file are extracted from the rr 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
51. ex unzip pdftex 1 40 15 zip cd pdftex 1 40 15 source build pdftex sh The binary pdftex is then built in the subdirectory build texk web2c The obsolescent binary pdfetex is still generated for backward compatibility but since version 1 40 it is just a file copy of the file pdftex As well as the main pdftex binary binaries for the utilities pdftosrc and ttf2afm are generated Incidentally for por TFX maintains a sibling script to build pdftex sh is included namely sync pdftex sh which syncs changes from a TEX Live source repository to a PDFIEX source repository Read the script before using it And don t use it unless you understand what you read Placing files The next step is to put the freshly compiled pdftex pdftosrc and ttf2afm binaries into the binary directory e g for a typical TEX Live system and on the appropriate platform usr local texlive 2014 bin x86 64 linux If you re doing this into a live hierarchy don t forget to do a texconfig sys init afterwards so that all formats are regenerated system wide with the fresh pdf tex binary Setting search paths Wes2c based programs including rprIEX use the Wee2c run time configuration file called texmf cnf The location of this file is the appropriate position within the rps tree relative to the place of the PDFTEX binary on a TEX Live system texmf cnf is typically located either in directory texmf web2c or texmf local web2c The path to file texmf cnf can
52. fsets graphics files for embedding and font information font files encodings When TEX builds a page it places items relative to the top left page corner the pvi reference point Separate pv1 postprocessors allow specifying the paper size e g A4 or letter so that this reference point is moved to the correct position on the paper and the text ends up at the right place In ror the paper dimensions are part of the page definition and ppFTEX therefore requires that they be defined at the beginning of the ppFTEX run As with pages described by PosrScnrrr the rpr reference point is in the lower left corner Formerly these dimensions and other ppFIEX parameters were read in from a configuration file named pdftex cfg which had a special non TEX format at the start of processing Nowadays such a file is ignored by pprTpx Instead the page dimensions and offsets as well as many other parameters can be set by rprFTEX primitives during the ppFTEX format building process so that the settings are dumped into the fresh format and consequently will be used when rprIEX is later called with that format All settings from the format can still be overridden during a ppFTEX 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 PoF TEX primitives relevant to setting up the ppr TEX engine is given in table 2 All primitives are descri
53. g 3clears list_tag and lig_tag 2 clears list_tag 1 clears lig_tag and 0 or larger does nothing Changes are irreversible and global Conversely when queried the primitive returns 0 if the tag s value is no_tag 1 if lig_tag is set 2 if list_tag is set or 4 not 3 if ext tag is set pdfgentounicode integer By default pprFIEX does not include a ToUnicode resource when including fonts in the output Such a resource also called a CMap resource maps glyph names to Unicode characters in a rrr file Lacking such a resource it is the pDF reader which determines how and whether searching in the Ppr file works In practice searching for basic ASCII characters generally works but searching for anything beyond those including ligatures such as fi fails in some versions of some PDF browsers most notably Adobe Reader If Npdfgentounicode is set to 1 when the job ends the ToUnicode resource will be included in the output with mappings for Type 1 fonts used in the documents The mapping is created as follows for each glyph in the font look for its ToUnicode value in a global hash table By default that global hash table is empty entries are added to the table using the following command Npdfglyphtounicode general text general text The first argument is the name of a glyph the second is a string of Unicode numeric values denoting characters For instance pdf gentounicode 1 pdf glyphtounicode ff 0066 0066 maps the ff
54. gregate the Document s Cover Texts may be placed on covers that bracket the Doc ument within the aggregate or the electronic eguivalent of covers if the Document is in electronic form Otherwise they must appear on printed covers that bracket the whole aggregate TRANSLATION Translation is considered a kind of modification so you may distribute trans lations of the Document under the terms of section 4 Replacing Invariant Sections with translations special permissi copyright holders but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections You may include a translation of this License and all the license notices in the Document and any Warranty Disclaimers pro vided that you also include the original English version of this License and the original versions of those notices and disclaimers In case of a disagreement between the translation and the original version of this License or a notice or disclaimer the original version will prevail If a section in the Document is Entitled Acknowledge ments Dedications or History the reguirement Section 4 to Preserve its Title section 1 will typically reguire changing the actual title TERMINATION You may not copy modify sub license or distribute the Docu ment except as expressly pro vided for under this License Any other attempt to copy modify
55. he Info dictionary this means that the Info can t be read as clear text any more If object streams are to be used currently pdfobjcompresslevel 2 is recommended and set so in some distributions Caveat pr files generated with object streams enabled can t be read with sufficiently old rpr viewers that don t understand ppr 1 5 files For widest distribution and unknown audience don t activate object stream writing The rpr 1 5 standard describes also a hybrid object compression mode that gives some backward compatibility but this is currently not implemented as rpr 1 5 was rather quickly adopted by modern rpr viewers Also not implemented is the optional Extends key Npdfdecimaldigits integer This integer parameter specifies the numeric accuracy of real coordinates as written to the por 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 pdfliteral and annotation action specifications also multiplication items e g scaling factors are not affected and are always output with best precision This parameter is read when pDFTEX writes a real number to the ppr output When including huge METRPOST images using supp pdf tex one can l
56. he page width is calculated as Wyox being shipped out 2 X horigin Nhoff set When part of the page falls off the paper or screen you can be rather sure that this parameter is set wrong 19 7 2 The pdfTEX user manual pdfpageheight dimension Similar to the previous item this dimension parameter specifies the page height of the ppr output If set to zero the page height will be calculated analogously to the above After magnification has been changed by the Nnag primitive check that this parameter reflects the wished true page height The document info and catalog pdfinfo general text This primitive allows the user to add information to the document info section if this information is provided it can be extracted e g by the pdfinfo program or by the Adobe Reader version 7 0 menu option File Document Properties The general text is a collection of key value pairs The key names are preceded by a and the values being strings are given between parentheses All keys are optional Possible keys are Author CreationDate defaults to current date including time zone info ModDate Creator defaults to TeX Producer defaults to pdfTeX 1 40 15 Title Subject and Keywords CreationDate and ModDate are expressed in the form D YYYYMMDDhhmmssTZ where YYYY is the year MM is the month DD is the day hh is the hour mm is the minutes ss is the seconds and TZ is an optional string denoting the tim
57. helpful to get some insight to what extent ppFIEX specific support is needed This info can be gathered e g by outputting the various special commands as message Simply type pdfoutput 1 let special message or if this leads to confusion pdfoutput 1 def special i write16 special 1 and see what happens As soon as one special message turns up one knows for sure that some kind of PDF TEX specific support is needed and often the message itself gives a indication of what is needed Currently all mainstream macro packages offer PDFIEX support with automatic detection of PDFTEX as engine So there is normally no need to turn on PDFTEX support explicitly e For IZTEX users Sebastian Rahtz and Heiko Oberdiek s hyperref package has substantial support for pDFIEX and provides access to most of its features In the simplest and most common case the user merely needs to load hyperref and all cross references will be converted to ppr hypertext links PDF output is automatically selected compression is turned on and the page size is set up correctly Bookmarks are created to match the table of contents e The standard I IEFX graphics graphicx and color packages also have automatic pdfTEX support which allow use of color text rotation and graphics inclusion commands e The CoNTEXr macro package by Hans Hagen has very full support for ppFTEX in its generalized hypertext features Support for ppFIEX is implemented as a special d
58. his controls the behaviour of ppFIEX when a rrr file is included that has a newer version than the one specified by this primitive If it is set to 0 ppFIEX gives only a warning if it s 1 PDFIEX raises an error The command has been introduced in rprIEX 1 30 0 as a shortened synonym of pdfoptionpdfinclusionerrorlevel which is now obsolete pdfimagehicolor integer 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 rpr version 1 5 onwards the pdfimagehicolor functionality is automatically disabled in rprIgX if pdfminorversion lt 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 pdfimagehicolor is set to 0 For pdfminorversion gt 5 the default value of Npdf imagehicolor is 1 If specified the parameter must appear before any data is written to the ppr output The primitive was introduced in ppFTEX 1 30 0 Npdfimageapplygamma integer This primitive when set to 1 enables gamma correction while embedding pvc images taking the values of the primitives pdf gamma as well as the gamma value embedded in the PNG image into account When pdfimageapplygamma is set to 0 no gamma correction is performed If specified the parameter must appear before any data is written to the rpr output The primitive was introduced in ppFTEX 1
59. ier is similar to the destination identifier A thread can be performed in another rrr file by specifying a file spec pdfendlink This primitive ends a link started with pdfstartlink All text between pdfstartlink and Npdfendlink will be treated as part of this link ror TEX may break the result across lines or pages in which case it will make several links with the same content pdflastlink read only integer This primitive returns the object number of the last link created by pdfstartlink analogous to pdflastannot The primitive was introduced in ppFTEX 1 40 0 pdflinkmargin dimension This dimension parameter specifies the margin of the box representing a hyperlink and is read when a page containing hyperlinks is shipped out pdfdestmargin dimension Margin added to the dimensions of the rectangle around the destinations pdfsuppresswarningdupdest integer Ordinarily ppFTgX gives a warning when the same destination is used more than once However due to problematic macro packages sometimes a document may end up producing the warning through no fault of its own and fixing the macros may well not be trivial Then seeing the warnings on every run is just noise and can be suppressed by setting this parameter to a positive number The primitive was introduced in ppFTEX 1 40 13 Bookmarks Npdfoutline attr spec action spec count integer general text This primitive creates an outline or bookmark entry
60. igned for free soft ware We have designed this License in order to use it for manu als for free software because free software needs free doc umentation 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 re gardless of subject matter or whether it is published as a printed book We recommend this License principally for works whose purpose is in struction or reference APPLICABILITY AND DEFINITIONS This License applies to any manual or other work in any medium that contains a no tice placed by the copyright holder saying it can be distrib uted under the terms of this License Such a notice grants a world wide royalty free li cense unlimited in duration to use that work under the conditions stated herein The Document below refers to any such manual or work Any member of the public is a licensee and is addressed as you You accept the li cense if you copy modify or distribute the work in a way reguiring permission under copyright law A Modified Version of the Document means any work containing the Document or a portion of it either copied verbatim or with modifica tions and or translated into another language A Secondary Section is a named appendix or a front matter section of the Docu ment that deals exclusively with the relationsh
61. ill be made reasonably unique by appending a random string consisting of six ascu characters Npdfmapfile map spec 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 map spec together with an optional leading modifier character If no Npdfmapfile primitive is given the default map file pdftex map will be read by rprIEX There is a companion primitive Npdfmapline that allows to scan single map lines its map line argument has the same syntax as the map lines from a map file Both primitives can be used concurrently The pdfmapfile primitive is fast for reading external bulk font map information many map lines collected in a map file whereas the Npdfmapline 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 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 Normally there is no need for the rprTEX user to bother about the pdfmapfile or Npdfmapline primi tives as the main TEX distributions provide nice helper tools that automatically assemble the default font map file Prominent tool examples are the scripts updmap and updmap sys coming with TEX LrvE and TETEX If your map file isn t in the current directory or a standard system directory you will need to set
62. imit the accuracy to two digits by typing twodigitMPoutput Npdfhorigin dimension 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 normal TEX offset This parameter is read when rprIEX starts shipping out a page to the rpr 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 own hoffset primitive To avoid surprises after global magnification has been changed by the mag primitive the pdfhorigin parameter should still be 1 true inch e g by typing pdfhorigin 1 true in after issuing the mag command Or you can preadjust the pdfhorigin value before typing mag so that its value after the Nnag command ends up at 1 true inch again Npdfvorigin dimension This parameter is the vertical companion of Npdfhorigin and the notes above regarding mag and true dimensions apply Also keep in mind that the TEX coordinate system starts in the top left corner downward while ppr coordinates start at the bottom left corner upward pdfpagewidth dimension This dimension parameter specifies the page width of the rpr output the screen the paper etc Por TEX reads this parameter when it starts shipping out a page After magnification has been changed by the mag primitive check that this parameter reflects the wished true page width If the value is set to zero t
63. imitives rpcode and M1pcode Character protrusion is disabled when pdfprotrudechars 0 or negative If you want to protrude some item other than a character e g a hbox you can do so by padding the item with an invisible zero width character for which protrusion is activated rpcode font 8 bit number integer The amount that a character from a given font may shift into the right margin character protrusion is set by the primitive Nrpcode The protrusion distance is the integer value given to Nrpcode 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 22 The pdfTEX user manual rpcode somef ont 200 rpcode somef ont 150 Here the comma may shift by 0 2 em into the margin and the hyphen by 0 15 em All these small bits and pieces will help ppFTEX to give you better paragraphs use rpcode judiciously don t overdo it Remark old versions of ppFTEX use the character width as measure This was changed to a proportion of the em width after H n Th Th nh finished his master s thesis lpcode font 8 bit number integer This is similar to Nrpcode 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 leftmarginkern box number expandable The leftmarginkern box numbe
64. in title with any Invariant Section O Preserve any Warranty Dis claimers 1f the Modified Version in cludes new front matter sec tions or appendices that qual ify as Secondary Sections and contain no material copied from the Document you may at your option designate some or all of these sections as in variant To do this add their titles to the list of Invariant Sections in the Modified Ver sion s license notice These ti tles 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 state ments of peer review or that the text has been approved by an organization as the authoritative definition of a standard You may add a passage of up to five words as a Front Cover Text and a passage of up to 25 words as a Back Cover Text to the end of the list of Cover Texts in the Modi fied Version Only one pas sage of Front Cover Text and one of Back Cover Text may be added by or through arrange ments made by any one en tity If the Document already includes a cover text for the same cover previously added by you or by arrangement made by the same entity you are acting on behalf of you may not add another but you may replace the old one on explicit permission from the previous publisher that added the old one The author s and pub lisher s of
65. ing If it has ifpdfprimitive returns true In any other case redefined made undef ined has never been primi tive false is returned The primitive was introduced in ppFTEX 1 40 0 Npdfcreationdate expandable Expands to the date string pDFIRX uses in the info dictionary of the document e g for this file D 20140522151840 07 00 The primitive was introduced in ppFIEX 1 30 0 pdfdraftmode integer When set to 1 or set by the command line switch draftmode ppFIEX doesn t write the output rpr 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 Bs TEX references right The primitive was introduced in ppFIEX 1 40 0 39 The pdfTEX user manual Npdfinsertht integer expandable If 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 12pt in plain TEX Abc footnote Whatever par pdfinsertht footins Npdflastxpos read only integer This primitive returns an integer number representing the absolute x coordinate of the last point marked by pdfsavepos The unit is scaled points sp pdflastypos read only integer This primitive works analogously to pdflastxpos only returning the y coordinate pdfprimitive control sequence This
66. ion Nefcode font 8 bit number integer 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 Nef code primitive can be used to influence the expandability of individual glyphs within a given font as a factor to the expansion setting from the pdffontexpand primitive The syntax is similar to Vsf code but with the 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 efcode somef ont A 800 efcode somef ont 0 0 Here an A may stretch or shrink only by 80 9o 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 pdffontexpand primitive otherwise one would end up with more possible font inclusions than would be comfortable pdfprotrudechars integer Yet another way of optimizing paragraph breaking is to let certain characters move into the margin character protrusion When pdfprotrudechars 1 the glyphs qualified as such will make this move when applicable without changing the line breaking When pdfprotrudechars 2 or greater character protrusion will be taken into account while considering breakpoints so line breaking might be changed This qualification and the amount of shift are set by the pr
67. ion This section formally specifies the ppr TEX specific extensions to the TEX macro programming language Most primitives are prefixed by pdf The general definitions and syntax rules follow after the list of primitives Two new units of measure were introduced in rprIEX 1 30 0 the new Didot 1 nd 0 375 mm and the new Cicero 1 nc 12nd the former was proposed by iso in 1975 Integer registers Npdfoutput integer Npdfminorversion integer 13 The pdfTEX user manual Npdfcompresslevel integer Npdfobjcompresslevel integer Npdfdecimaldigits integer Npdfimageresolution integer Npdfpkresolution integer Npdftracingfonts integer Npdfunigueresname integer Npdfadjustspacing integer Npdfprotrudechars integer Nefcode font 8 bit number integer M pcode font 8 bit number integer Nrpcode font 8 bit number integer Npdfadjustinterwordglue integer knbscode font 8 bit number integer stbscode font 8 bit number integer shbscode font 8 bit number integer Npdfprependkern integer knbccode font 8 bit number integer Npdfappendkern integer knaccode font 8 bit number integer Npdfgentounicode integer Ntagcode font character code integer Npdfpagebox integer Npdfforcepagebox integer Npdfoptionalwaysusepdfpagebox integer Npdfinclusionerrorlevel integer pdfoptionpdfinclusionerrorlevel integer Npdfimagehicolor integer Npdfimageapplygamma integer
68. ip 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 text book of mathematics a Sec ondary Section may not ex plain any mathematics The relationship could be a matter of historical connection with the subjector with related mat ters or of legal commercial philosophical ethical or politi cal position regarding them The Invariant Sections are certain Secondary Sections whose titles are designated as being those of Invariant Sections in the notice that says that the Document is released under this License If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant The Document may contain zero Invariant Sections If the Document does not identify any Invariant Sections then there are none The Cover Texts are certain short passages of text that are listed as Front Cover Texts or Back Cover Texts in the notice that says that the Document is released under this License A Front Cover Text may be at most 5 words and a Back Cover Text may be at most 25 words A Transparent copy of the Document means a machine readable copy represented in a format whose specification is available to the general pub lic that is suitable for revis ing the document straightfor wardly with generic
69. ke interword space tex test file Text with no interword spaces pdfmapline dummy space lt dummy space pfb pdf glyphtounicode space 0020 pdf interwordspaceon Switch to text with faked interword spaces pdf interwordspaceoff Back to text with no interword spaces The primitive was introduced in rprIgEX 1 40 15 pdffakespace Insert a faked interword space to the output regardless of the value of pdfinterwordspaceon and pdfinterwordspaceoff Example Text with no interword pdffakespace pdffakespace spaces The primitive was introduced in ppFIEX 1 40 15 Spacing Controlling spacing before and after characters was introduced in version 1 30 mostly to handle punctua tion rules in different languages pdfadjustinterwordglue integer If positive adjustment of interword glue is enabled and controlled by the following three primitives knbscode font 8 bit number integer The amount of space in thousandths of an em added to the glue following a character This amounts is clipped to the range 1000 1000 For instance the following example means that glues after periods will be increased by 2em 27 7 5 7 6 The pdfTEX user manual pdfadjustinterwordglue 1 knsbcode font 200 stbscode font 8 bit number integer This works like knbscode but applies to the stretch component of the following glue shbscode font 8 bit number integer Like stbscode but for the shrink component
70. l pool files no longer used since the pool file program strings are compiled into the binary ENCFONTS Search path for encoding enc files TEXFONTMAPS Search path for font map map files TFMFONTS Search path for font metric tfm files VFFONTS Search path for virtual font vf files Virtual fonts are fonts made up of other fonts Because pDFTEX produces the final output code it must consult those files T1FONTS Search path for Type 1 font files pfa and pfb These outline vector fonts are to be preferred over bitmap rx fonts In most cases Type 1 fonts are used and this variable tells pprFIEX where to find them TTFONTS Search paths for TrueType ttf and OpenType otf font files Like Type 1 fonts OPENTYPEFONTS TrueType and OpenType fonts are also outlines PKFONTS Search path for packed bitmap font pk files Unfortunately bitmap fonts are still displayed poorly by some rpr viewers so when possible one should use outline fonts When no outline is available pprTEX tries to locate a suitable rx font or invoke a process that generates it The PDFTEX configuration One has to keep in mind that as opposed to TEX with its pvr output the PoF TEX program does not require a separate postprocessing stage to transform the TEX input into a ppr file As a consequence all data needed for building a ready ppF page must be available during the ppFIEX run in particular information on media dimensions and of
71. lly contained in the image file If one of these resolution values is missing or weird either lt 0 or gt 65535 the Npdf imageresolution value will be used for both x and y resolution when calculating the image size And if the pdf imageresolution is zero finally a default resolution of 72 dpi would be taken The Npdf imageresolution is read when ppFTEX creates an image via Npdfximage 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 explicitly the resolution values coming with Exrr files are currently ignored Npdfpagebox integer When rrr files are included the command pdfximage allows the selection of which rpr page box to use in the optional field image attr spec If the option isn t present the page box defaults to the value of Npdfpagebox as follows 1 media box 2 crop box 3 bleed box 4 trim box and 5 artbox Npdfforcepagebox integer The integer primitive Npdf forcepagebox allows to globally override the choice of the page box used with Npdfximage It takes the same values as pdf pagebox The command is available starting from PDFTEX 1 30 0 as a shortened synonym of obsolete pdf optionalwaysusepdfpagebox instruction but is itself now considered obsolete a mixture of pdf pagebox and image attr spec is better Npdfinclusionerrorlevel integer T
72. m e encoding vector o lt afm outputfile ttf input file A TrueType file can be recognized by its suffix ttf The optional encoding specifies the encoding which is the same as the encoding vector used in map files for por TEX and dvips If the encoding is not given all the glyphs of the arm output will be mapped to notdef ttf2afm writes the output ArM to standard output If we need to know which glyphs are available in the font we can run ttf2afm without encoding to get all glyph names The resulting arm file can be used to generate a TFM one by applying afm2tfm To use a new TrueType font the minimal steps may look like below We suppose that test map is used ttf2afm e 8r enc o times afm times ttf afm2tfm times afm T 8r enc echo times TimesNewRomanPSMT 8r enc times ttf gt gt test map There are a few limitations with TrueType fonts in comparison with Type 1 fonts a The special effects SlantFont ExtendFont did not work before version 1 40 0 b To subset a TrueType font the font must be specified as re encoded therefore an encoding vector must be given c TrueType fonts coming with embedded rrr files are kept untouched they are not replaced by local ones For much more about rprIEX and TrueType fonts including many details on handling glyph names see A closer look at TrueType fonts and Ppor TEX TUGboat 30 1 2009 pp 32 34 http tug org TUGboat tb30 1 tb94thanh pdf Formal syntax specificat
73. mand variants might considerably speed up the rprIEX startup process If a modifier is given the mechanism is so that before reading the items given as arguments to pdfmapfile or 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 all the existing mappings don t use the primitive versions without modifier but instead type either pdfmapfile myfont map or pdfmapfile myf ont map as described below pdfmapfile foo map reads the file foo map duplicate later map entries within the file are ignored and a warning is issued pdfmapfile foo map reads the file foo map matching map entries in the database are replaced by new entries from foo map if they aren t already in use Npdfmapfile foo map reads the file 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 pdftex map or change its processing options through a PDFIEX format you can do this by appending the Npdfmapfile command to the everyjob token list for the ini run e g every job expandafter the everyjob pdfmapfile myspecial map dump This would always read the file myspecial map after the default pdftex map file pdfmapline map spec
74. matches corresponding to the subpatterns up to subcount 1 all matches are preceded by their positions separated by gt If the position is 1 and the match is empty it means that the subpattern corresponding to that entry wasn t found For instance pdfmatch subcount 3 ab cd ef gh ij abefghij MpdflastmatchO O gt abefghij Npdflastmatchi 1 gt pdflastmatch2 4 gt gh pdflastmatch3 1 gt Entry 1 is empty because no match was found for cd and entry 3 is empty because it exceeds the table s size as set by subcount The primitive was introduced in ppFTgX 1 30 0 pdfmdfivesum general text expandable This command expands to the mp5 of general text in uppercase hexadecimal format same as pdfescapehex The primitive was introduced in ppFTEX 1 30 0 Numbers ifpdfabsnum expandable This conditional works like the standard ifnum except that it compares absolute values of numbers Although it seems to be a trivial shortcut for a couple of ifnum x lt 0 tests as a primitive it is considerably more friendly in usage and works a bit faster The primitive was introduced in rprIpX 1 40 0 ifpdfabsdim expandable Analogous to ifpdfabsnum this conditional works like ifdim except that it compares absolute values of dimensions The primitive was introduced in ppFTEX 1 40 0 Npdfuniformdeviate number expandable Generate a uniformly distributed random integer value between 0 inclusive
75. mation Interchange B B TEX Handles bibliographies 42 CoN TEXT CTAN DVI ENCTEX EPS EPSTOPDF IEX EXIF GHOSTSCRIPT GNU HZ ISO JBIG JBIG2 JPEG LATEX Mac OS X MacTEX MD5 METRFONT METRPOST MJKTEX MLIEX MPTOPDF MS DOS PDF PDFETEX PDFTEX PERL PGC PK PNG POSIX PostScript PROTEXT PSroPDF RGB TCX TDS TETEX TEX TEXEXEC TEXINFO TEX Live TEXUTIL TFM Unix URL WEB WEB2c WiNDows XEMTEX The pdfTEX user manual general purpose macro package global TEX archive server native TEX Device Independent file format encTEX extension to TEX Encapsulated PostScript EPS to PDF conversion tool an extension to TEX Exchangeable Image File format JPEG file variant ps and PDF language interpreter GNU s Not Unix Hermann Zapf optimization International Organization for Standardization Joint Bi level Image Experts Group Joint Bi level Image Experts Group Joint Photographic Experts Group general purpose macro package Macintosh operating system version 10 MacintosH Wes2c distribution MD5 message digest algorithm graphic programming environment bitmap output graphic programming environment vector output WINpows distribution MLTEX extension to TEX METRPOST to pDF conversion tool Microsoft DOS platform Intel Portable Document Format IEX extension producing PDF output TEX extension producing rpr output Perl programming environment PDF Glyph Container Packed bitmap font P
76. n look into idealize isolate discriminate distinguish screen pigeonhole pick over sort integrate blend inspect filter lump skip smooth chunk average approximate cluster aggregate outline summarize itemize review dip into flip through browse glance into leaf through skim refine enumerate glean synopsize winnow the wheat from the chaff and separate the sheep from the goats We thrive in information thick worlds because of geonhole pick over sort integrate blend inspect our marvelous and everyday capacity to select filter lump skip smooth chunk average ap edit single out structure highlight group pair X proximate cluster aggregate outline summarize merge harmonize synthesize focus organize itemize review dip into flip through browse condense reduce boil down choose categorize glance into leaf through skim refine enumerate catalog classify list abstract scan look into ide glean synopsize winnow the wheat from the chaff alize isolate discriminate distinguish screen pi and separate the sheep from the goats HZ We thrive in information thick worlds because of our marvelous and everyday capacity to select edit single out structure highlight group pair merge harmonize synthesize focus organize condense reduce boil down choose categorize catalog classify list abstract scan look into idealize isolate discriminate distinguish screen pigeonh
77. n 7 11 Instead of using this method one can also write the open action directly into the catalog 20 7 3 The pdfTEX user manual Npdfnames general text This primitive inserts the general text to the Names array The text must conform to the specifications as laid down in the PDF Reference otherwise the document can be invalid Npdftrailer general text This command puts its argument text verbatim into the file trailer dictionary The primitive was introduced in ppFIpX 1 11a Fonts pdfpkresolution integer This integer parameter specifies the default resolution of embedded rx fonts and is read when ppFTEX embeds a rk font during finishing the ppr output As bitmap fonts are still rendered poorly by some PDF viewers it is best to use Type 1 fonts when available pdffontexpand font stretch shrink step autoexpand This extension to TEX s font definitions controls a ppr TEX automatism called font expansion We describe this by an example font somefont sometfm at 10pt pdffontexpand somefont 30 20 10 autoexpand pdfadjustspacing 2 The 30 20 10 means this 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 ppFTEX 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
78. n annotation is written out running dimensions will take the corresponding values from the box containing the whatsit node representing the annotation The general 33 7 11 The pdfTEX user manual text is inserted as raw ppr code to the contents of annotation The annotation is written out only if the corresponding whatsit node is searched at shipout time pdflastannot read only integer This primitive returns the object number of the last annotation created by pdfannot These two primi tives allow users to create any annotation that cannot be created by Npdfstartlink see below 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 referred to This location is tied to the page not the exact location on the page The main reason for this is that ppr maintains a dedicated list of these annotations and some more when optimized for the sole purpose of speed pdfdest dest spec 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 dest type which must be one of those mentioned in table 5 keyword meaning fit fit the page in the window fith fit the width of the page fitv fit the height of the page fitb fit the Bounding
79. nces ppFTEX output streams for message and write Without rcx mapping only characters that are within the range 32 126 are flagged as printable meaning that these characters are output directly by message and Write primitives Characters outside the range 32 126 are instead output in escaped form e g as A for a character with code 0x01 When a character code is mentioned in the 2nd column of the rcx file or as the only value in a line it is flagged as printable During message and Nwrite output characters are mapped in reverse direction they are looked up in the 2nd column of the rcx file and the corresponding values from the 1st column are output Again if a por TEX 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 por file e g by pdfliteral or special primitives are not subject to TCX output remapping Beware Character translation interferes with the eNcTEX primitives to avoid surprises don t use ENCIEX and rcx mapping at the same time Further details about rcx file loading can be found in the rEIEX manual Abbreviations In this document we use numerous abbreviations For convenience we mention their meaning here AFM Adobe Font Metrics ASCII American Standard Code for Infor
80. ne can generate an A5 booklet by typing texexec pdfarrange paper aba4 print up addempty 1 2 result pdftex b pdf pdftex a Odd and even page sets for non duplex printers can be generated using pages odd and pages even options which might require some disciplined shuffling of sheet This also demonstrates that ppFIEX can be used for page imposition purposes given that rprTEX and the fonts are set up properly 46 The pdfTEX user manual GNU Free Documentation License Version 1 2 November 2002 Copyright 2000 2001 2002 Free Software Foundation Inc 59 Temple Place Suite 330 Boston MA 02111 1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document but changing it is not allowed Preamble The purpose of this License is to make a manual textbook or other functional and useful document free in the sense of freedom to assure every one the effective freedom to copy and redistribute it with or without modifying it ei ther commercially or noncom mercially Secondarily this License preserves for the au thor and publisher a way to get credit for their work while not being considered responsi ble for modifications made by others This License is a kind of copy left which means that deriv ative works of the document must themselves be free in the same sense It complements the GNU General Public Li cense which is a copyleft li cense des
81. ng some utilities by Hans Hagen In general rcc files can contain whatever is allowed in a ppr page description which may be used to support fonts that are not available in METRFONT rcc 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 12 5 2 The pdfTEX user manual Now follow 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 ptmr8r Times Roman 8r enc psyr Symbol In the next example the numerical font flags give some rough hint what general characteristics the GillSans font has so e g the Adobe Reader might try an approximation if it doesn t have the font resource nor any clue how a font named GillSans should look like pgsr8r GillSans 32 lt 8r enc Not embedding fonts is rather risky and should generally be avoided If in doubt always embed all fonts even the 14 standard ones Helper tools for TrueType fonts As mentioned above ppFTgX 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 rrM file There is a program called ttf2afm in the PDF TEX distribution which can be used to extract arm from TrueType fonts another conversion program is ttf2pt1 Usage of ttf2afm is simple ttf2af
82. not type spec h v m pdfstartlink rule spec attr spec action spec h m pdfendlink h m pdfoutline outline spec h v m pdfdest dest spec h v m pdfthread thread spec h v m pdfstartthread thread spec v m pdfendthread v m pdfsavepos h v m pdfinfo general text pdfcatalog general text open action spec pdfnames general text pdfmapfile map spec pdfmapline map spec 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 Nguitvmode pdfliteral pdfliteral spec general text h v m special pdfspecial spec pdfresettimer pdfsetrandomseed number pdfnoligatures font pdfprimitive control sequence pdfcolorstack stack number stack action general text pdfsetmatrix pdfsave pdfrestore General definitions and syntax rules general text balanced text attr spec attr general text resources spec resources general text rule spec width height depth dimension rule spec 16 The pdfTEX user manual object type spec reserveobjnum useobjnum number stream attr spec object contents annot type spec res
83. o do its best to avoid multiple embedding of identical font sources Thus vector rcc fonts should be specified as scalable Type 3 in map files like csr10 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 rpr file multiple times for various sizes which causes a much larger rpr output On the other hand if a font in the map files is defined as scalable Type 3 font and its rcc source is not scalable or not available ppFIEX will use rk fonts instead the rpr 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 with re encoding ptmri8r Times Italic lt 8r enc lt ptmri8a pfb Without re encoding it looks like this cmri0 CMR10 lt cmri0 pfb A SlantFont is specified similarly as for dvips The SlantFont or ExtendFont entries work only with embedded Type 1 fonts psyro StandardSymL 167 SlantFont usyr pfb pcrr8rn Courier 85 ExtendFont lt 8r enc lt pcrr8a pfb Entirely embed a font into the ppr file without and with re encoding fmvr8x MarVoSym marvosym pfb pgsr8r GillSans lt 8r enc pgsr8a pfb A TrueType font can be used in the same way as a Type 1 font verdana8r Verdana lt 8r enc lt verdana ttf This is a text file containing a rpr Type 3 font created by METAPOST usi
84. oduced by rprTpX Missing fonts map files encoding vectors as well as missing characters glyphs are reported there Normally the page content takes one object This means that one seldom finds more than a few hundred objects in a simple file This PpFTEX manual for instance uses approx 750 objects In more complex applications 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 obj tab size for manual control of the object table size is now obsolete and ignored 51 The pdfTEX user manual Macro packages supporting PDFTEX As PDFTEX generates the final pnr output without help of a postprocessor macro packages that take care of these ppr 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 rpr specific tasks can be controlled by rprIgX s own primitives a few also by a rprIgX specific special pdf primitive Any other special commands like the ones defined for various pvr postprocessors are simply ignored by Ppr TEX when in rpr output mode a warning is given only for non empty special commands When a macro package already written for classical TEX with pv1 output is to be modified for use with PDFTEX it is very
85. ole pick over sort integrate blend inspect filter lump skip smooth chunk average approximate cluster aggregate outline summarize itemize review dip into flip through browse glance into leaf through skim refine enumerate glean synopsize winnow the wheat from the chaff and separate the sheep from the goats We thrive in information thick worlds because of over sort integrate blend inspect filter lump our marvelous and everyday capacity to select edit skip smooth chunk average approximate cluster single out structure highlight group pair merge aggregate outline summarize itemize review dip harmonize synthesize focus organize condense into flip through browse glance into leaf through reduce boil down choose categorize catalog clas skim refine enumerate glean synopsize winnow sify list abstract scan look into idealize isolate the wheat from the chaff and separate the sheep discriminate distinguish screen pigeonhole pick from the goats Protruding We thrive in information thick worlds because of our marvelous and everyday capacity to select edit single out structure highlight group pair merge harmonize synthesize focus organize condense reduce boil down choose categorize catalog classify list abstract scan look into idealize isolate discriminate distinguish screen pigeonhole pick over sort integrate blend inspect filter lump skip smooth
86. on MPTOPDF written by Hans Hagen and Tanmoy Bhattacharya is imple mented 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 encapsulated Ppr The inclusion of raw PostScript commands a technique utilized by for instance the pstricks package cannot directly be supported Although por is direct a descendant of PostScrirt it lacks any programming language commands and cannot deal with arbitrary PostScript Character translation Characters that are input to rprTEX are subject to optional TEX character translation rcx under control of a rcx file The rcx maps the input character codes e g from Ninput or read to the character codes as seen by rprIEX This mapping takes place before the characters enter ppFTEX s mouth If no rcx file is read the input characters enter ppFTEX directly no mapping 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 A comment sign 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 this code enter ppFIEX unchanged no mapping is done tcx mapping also influe
87. only when its number is referred to by Npdfrefobj or when pdfobj is preceded by immediate Nothing is appended to the list being built The number of the most recently created object is accessible via pdflastobj pdflastobj read only integer This command returns the object number of the last object created by Npdfobj Npdfrefobj object number This command appends a whatsit node to the list being built When the whatsit node is searched at shipout time ppFTEX will write the object object number to the rpr output if it has not been written yet Page and pages objects Npdfpagesattr tokens PDF TEX expands this token list when it finishes the rpr output and adds the resulting character stream to the root Pages object When defined these are applied to all pages in the document Some examples of attributes are MediaBox the rectangle specifying the natural size of the page CropBox the rectangle specifying the region of the page being displayed and printed and Rotate the number of degrees in multiples of 90 the page should be rotated clockwise when it is displayed or printed Npdfpagesattr Rotate 90 rotate all pages by 90 degrees CropBox 0 O 612 792 the crop size of all pages in bp Npdfpageattr tokens This is similar to pdfpagesattr but has priority over it It can be used to override any attribute given by Npdfpagesattr for individual pages The token list is expanded when pDFTEX ships out a page The content
88. ons of the bounding box of a rpr image loaded with pdfximage are stored in a table This primitive returns those dimensions as follows 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 pdflastximagecolordepth read only integer The color depth 1 for 1 bit images 2 for 2 bit images and so on of the last image accessed with pdfximage pdflastximagepages read only integer This read only register returns the highest page number from a file previously accessed via the pdfximage command This is useful only for por files it always returns 1 for PNG JPEG or JBIG2 files Npdfimageresolution integer The integer pdfimageresolution parameter unit dots per inch dpi is a last resort value used only for bitmap JPEG PNG JBIG2 images but not for pprs The priorities are as follows Often one image dimension width or height is stated 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 the 31 The pdfTEX user manual image size will be calculated from its width and height in pixels using the x and y resolution values norma
89. ont dictionaries of Type 1 and Type 1C CFF fonts from the embedded rrr file are checked against this basename field If names match the glyphs of that font will not be copied from the embedded rrr 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 fontfile below By this collecting mechanism Type 1 glyphs can be shared between several embedded rrr files and with text that is typeset by ppr TEX which helps keeping the resulting ppr file size small if many files with similar Type 1 C fonts are embedded Replacing Type 1 fonts from embedded PDF files requires that also a Type 1 font file name is in the fontfile field see below Second if a font file is not to be embedded into the ppr output fontfile field missing then the basename field will be copied to the BaseFont and FontName dictionary entries in the ppr file so that the PostScript font name will be known to the consumer application e g viewer It is highly recommended to always use the basename field but strictly speaking it s optional fontflags specify some characteristics of the font The following description of these flags is taken with slight modification from the PDF Reference the section on font descriptor flags Viewers can adapt their rendering to these flags especially when they substitute a non embedded font by some own approximation The value of the flags key in a font d
90. ormats for pv1 and ppr output in the same way as the classical TEX engine does for pvi Format generation is enabled by the ini option The default mode pv or PDF can be chosen either on the command line by setting the option output format to dvi or pdf or by setting the Npdfoutput parameter The format file then inherits this setting so that a later call to ppFTERX 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 ini file E g the file etex ini in figure 2 is for generating an e IEX format with pv1 output it contains a few comparisons to be safe also for TEX engines A similar file pdflatex ini can be used for generating a TEX format with ppr output refer to figure 3 One can see how the primitive pdfoutput is used to override the output mode set by file pdftexconfig tex The corresponding rprIEX calls for format generation are pdftex ini etex ini pdftex ini pdflatex ini These calls produce format files etex fmt and pdflatex fmt as the default format file name is taken from the input file name You can overrule this with the jobname option The asterisk in the first example line below tells the rprTEX engine to go into extended ini mode TEX enabled otherwise it stays in non extende
91. ortable Network Graphics Portable Operating System Interface PostScript Winpows Wzz2c distribution based on MiKTRX PostScript to ppF converter on top of GHOSTSCRIPT Red Green Blue color specification TEX Character Translation TEX Directory Standard TEX distribution for Unxx based on WeEB2c typographic language and program CoNTEXr command line interface generate typeset documentation from info pages TEX Live distribution multiple platform ConTEXt utility tool TEX Font Metrics Unix platform Uniform Resource Locator literate programming environment official multi platform wes environment Microsoft Windows platform Winpows Weeoc distribution 43 The pdfTEX user manual Examples of HZ and protruding In the following sections we will demonstrate rprIEX s protruding and 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 one of the maintainers Normal We thrive in information thick worlds because of our marvelous and everyday capacity to select edit single out structure highlight group pair merge harmonize synthesize focus organize condense reduce boil down choose categorize catalog classify list abstract sca
92. pFETEX engine and the standard one rprIEX The ability to produce both PDF and pv1 output made ppFETEX the primary TEX engine in these distributions Since pDFIEX version 1 40 now the e TEX extensions are part already of the ppFTEX engine so there is no longer any need to ship PDFETEX The e IpX functionality of ppr TEX can be disabled if not required Other extensions are MLIEX and ENCTEX these are also included in the current rprTEX code PDFTEX is maintained by H n Th Thanh Martin Schr der and others The ppr TEX homepage is http www pdftex org Please send Ppr TEX comments and bug reports to the mailing list pdftexGtug org http lists tug org pdftex About this manual This manual revision 715 is intended to track current pDFIRX development up to version 1 40 15 The primary repository for the manual and its sources is at http foundry supelec fr projects pdftex Copies in ppr format can also be found on cran in http ctan org pkg pdftex 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 pdftex tug org Legal Notice Copyright 9 1996 2014 H n Th Th nh 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 an
93. page For works in for mats 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 be ginning of the body of the text A section Entitled XYZ means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language Here XYZ stands for a specific section name mentioned below such as Acknowledgements Dedications Endorse ments or History To Preserve the Title of such a section when you modify the Document means that it remains a section Enti tled XYZ according to this definition The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document These Warranty Disclaimers are considered to be included by reference in this License but only as re gards disclaiming warranties any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License VERBATIM COPYING You may copy and distribute the Document in any medium either commercially or non commercially provided that this License the copyright no tices and the license notice say ing this License applies to the Document are reproduced in all copies and that you add no other conditions whatso ever to those of this License You m
94. peset Of course the command will never return a value greater than the highest number available in TEX if the time exceeds 32767 seconds the constant value 2 1 will be returned The primitive was introduced in ppFTEX 1 30 0 Npdfresettimer Reset the internal timer so that pdf elapsedtime starts returning micro time from 0 again The primitive was introduced in ppFTEX 1 30 0 Files Npdffilemoddate generaltext expandable Expands to the modification date of file general text in the same format as for pdfcreationdate e g it s D 20140522151826 07 00 for the source of this manual The primitive was introduced in ppFIEX 1 30 0 Npdffilesize general text expandable Expands to the size of file general text e g it s 222117 for the source of this manual The primitive was introduced in rprTEX 1 30 0 pdfmdfivesum file general text expandable Expands to the mp5 of file general text in uppercase hexadecimal format same as pdf escapehex e g it s 5DC3928A234B1D7D3C474E4F593A8DOE for the source of this manual The primitive was introduced in PDFTEX 1 30 0 Npdffiledump offset number length number generaltext expandable Expands to the dump of the file general text in uppercase hexadecimal format same as pdfescapehex starting at offset number or 0 with length number if given The first ten bytes of the source of this manual are 2520696E746572666163 The primitive was introduced in rpr
95. pr 1 5 specification now allows to collect non stream objects as compressed objects into object stream objects Type ObjStm see PDF Ref 5th ed sect 3 4 6 At the rpr file end instead of the object table then an XRef cross reference stream is written out This results in considerably smaller ppr files particularly if lots of annotations and links are used The primitive was introduced in rprTEX 1 40 0 18 The pdfTEX user manual The writing of compressed objects is enabled by setting Npdfobjcompresslevel to a value between 1 and 3 it s disabled by value 0 default Enabling reguires that also Npdfminorversion gt 4 If pdfobjcompresslevel gt 0 but pdfminorversion lt 5 a warning is given and object stream writing is disabled The pdfobjcompresslevel value is clipped to the range 0 3 Using values outside this range is not recommended for future extension The Npdfobjcompresslevel settings have the following effects When set to 0 no object streams are generated at all When set to 1 all non stream objects are compressed with the exception of any objects coming with embedded por files paranoid mode to avoid yet unknown problems and also the Info dictionary is not compressed for clear text legibility When set to 2 also all non stream objects coming with embedded por files are compressed but the Info dictionary is still not compressed Finally when set to 3 all non stream objects are compressed including t
96. r primitive expands to the width of the margin kern at the left side of the horizontal list stored in box box number The expansion string includes the unit pt E g when the left margin kern of box0 amounts to 10 pt Mleftmarginkern0 will expand to 10pt A similar primitive rightmarginkern exists for the right margin The primitive was introduced in ppFIEX 1 30 0 These are auxiliary primitives to make character protrusion more versatile When using the TEX primitive unhbox or Nunhcopy the margin kerns at either end of the unpackaged hbox will be removed e g to avoid weird effects if several hboxes are unpackaged behind each other into the same horizontal list These unhbox or unhcopy are often used together with Nvsplit for dis and re assembling of paragraphs e g to add line numbers Paragraphs treated like this do not show character protrusion by default as the margin kerns have been removed during the unpacking process The leftmarginkern and Vrightmarginkern primitives allow to access the margin kerns and store them away before unpackaging the hbox E g the following code snipplet restores margin kerning of a horizontal list stored in box testline resulting in a hbox with proper margin kerning which is then done by ordinary kerns dimen0 leftmarginkern testline dimeni rightmarginkern testline hbox to hsize kern dimen0O unhcopy testline kern dimen1 Nrightmarginkern box number expandable The rightmarginke
97. river and is invoked by typing setupoutput pdftex or feeding TEXzxEc with the pdf option e PDF from TEXINFO documents can be created by running ppFTEX on the TExmro file instead of TEX Alternatively run the shell command texi2pdf instead of texi2dvi e A small modification of webmac tex called pdfwebmac tex allows production of hyperlinked rpr versions of the program code written in wEB Some nice samples of PoF TFX output can be found athttp www pdftex org http www pragma ade com and http tug org texshowcase Setting up fonts PDFTEX can work with Type 1 and TrueType fonts and to some extent also with OpenType fonts Font files should be available and embedded for all fonts used in the document It is possible to use METRFONT generated fonts in PDFIEX but it is strongly recommended not to use these 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 ppr TEX Map files Font map files provide the connection between TEX TrM font files and the outline font file names They contain also information about re encoding arrays partial font embedding subsetting and character The pdfTEX user manual transformation parameters like SlantFont
98. rn box number primitive expands to the width of the margin kern at the right side of the horizontal list stored in box box number See leftmarginkern for more details The primitive was introduced in ppFTpxX 1 30 0 letterspacefont control sequence font integer This primitive creates an instance of font with the widths of all glyphs increased by integer thousandths of an em as set in 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 lsfont whose glyphs are all 1 2 pt larger than those of normalfont font normalfont myfont at 12pt letterspacefont lsfont normalfont 100 Negative values are allowed for integer Letter spacing works natively in ppr mode only unless special fonts are devised in our example a myfont 1001s font as with font expansion pdfcopyfont control sequence font This primitive defines control sequence as a synonym for font pdffontattr font general text This primitive inserts the general text to the Font dictionary The text must conform to the specifications as laid down in the PDF Reference otherwise the document can be invalid For examples see the cmap and CJK packages 23 The pdfTEX user manual Npdffontname font expandable In rrr files produced by ppFTEX one can recognize a font resource by the prefix F followed by a number
99. s because they are laid out on a separate layer are positioned absolutely and have dedicated housekeeping pdfxform makes the box void as box does When attr spec is given the text will be written as additional attribute into the form XObject dictionary The resources spec is similar but the text will be added to the resources dictionary of the form XObject The text given by attr spec or resources spec is written before other entries of the form dictionary and or the resources dictionary and takes priority over later ones Npdfrefxform object number The form XObject is kept in memory and will be written to the rpr output only when its object number is re ferred to by pdfrefxform or when pdfxform is preceded by immediate Nothing is appended to the list being built The number of the most recently created form XObject is accessible via pdf lastxform When issued pdfrefxform appends a whatsit node to the list being built When the whatsit node is searched at shipout time rprIEX will write the form object number to the rpr output if it is not written yet Npdflastxform read only integer The object number of the most recently created form XObject is accessible via Npdf lastxform As said this feature can be used for reusing information This mechanism 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 Npdfxformname objec
100. s Feuerstack When you use any of these distributions you don t need to bother with the ppFTEX installation procedure in the next sections If there is no precompiled ppFIEX 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 ppr TEX immediately you will need to build ppFTEX from sources read on You should already have a working TEX system e g TEX Live or TETEX into which the freshly compiled ppFTEX will be integrated Note that the installation description in this manual is Wes2c specific Getting sources and binaries The latest sources of ppFTEX are distributed for compilation on Unix systems including cnu Linux and Winpows systems The primary home page is http www pdftex org where you also find bug tracking information Development sources are at http foundry supelec fr projects pdftex The ppFTEX sources can also be found at their canonical place in the cran network http ctan org pkg pdftex Precompiled ppFTEX binaries for various systems might also be available check the subdirectories below http mirror ctan org systems Compiling The compilation is expected to be easy on Unix like systems and can be described best by example Assuming that the file pdftex zip is downloaded to some working directory e g HOME pdftex on a Unix system the following steps are needed to compile rprIEX 3 3 3 4 The pdfTEX user manual cd HOME pdft
101. s are added to the attributes of the current page Npdfpageref pagenumber expandable This primitive expands to the number of the page object that contains the dictionary for page page number If the page page number does not exist a warning will be issued a fresh unused rpr object will be generated and Npdfpageref will expand to that object number E g if the dictionary for page 5 of the TEX document is contained in rrr object no 18 Npdfpageref5 expands to the number 18 Form XObjects The next three primitives support a ppr feature called object reuse in ppor TEX The idea is first to create a form XObject in rpr 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 for large documents with many similar elements as it can reduce the duplication of identical objects These commands behave similarly to pdfobj pdfrefobj and pdflastobj but instead of taking raw PDF code they handle text typeset by TEX 29 7 9 The pdfTEX user manual pdfxform attr spec resources spec box number This command creates a form XObject corresponding to the contents of the box box number The box can contain other raw objects form XObjects or images as well It can however not contain annotation
102. ss compressing PNG format is great for embedding crisp pixel graphics e g line scans screen shots Since ppFIEX 1 30 0 also the alpha channel of pNc images is processed if available this allows embedding of images with simple transparency The pnc format does not support the CMYK color model which is sometimes required for print media this often can be replaced by four component Jpzs in high quality or 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 pDFIEX to uncompress the pixel array and to re compress it to the ppr requirements this process often takes a noticeable amount of time Since PDFIEX 1 30 0 there is now a fast pNc embedding mode that goes without uncompressing the image data are directly copied into the ppr stream resulting in a much higher embedding speed However this mode is only activated if the image array structure of the PNG file is compatible with the ppr image structure e g an interlaced ec 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 Pc image can be seen from the log file which then shows the string PNG copy after the pus file name The JpzEG format is normally
103. ssing pdfsuppresswarningpagegroup integer Ordinarily PoF TEX gives a warning when more than one included rrr file has a so called page group object Group because only one can win that is be propagated to the page level Usually the page groups are identical but when they are not the result is unpredictable It would be ideal if Por T X in fact detected whether the page groups were the same and only gave the warning in the problematic case unfortunately this is not easy a patch would be welcome Nevertheless often one observes that there is no actual problem Then seeing the warnings on every run is just noise and can be suppressed by setting this parameter to a positive number The primitive was introduced in ppFTEX 1 40 14 Annotations PDF 1 4 provides four basic kinds of annotations hyperlinks general navigation text clips notes movies sound fragments 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 rprTEX is able to calculate this area as we will see later All annotations can be supported using the next two general annotation primitives pdfannot annot type spec 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 rule spec The default values are running for all width height and depth When a
104. sublicense or distrib ute the Document is void and will automatically terminate your rights under this License However parties who have re ceived copies or rights from you under this License will not have their licenses termi nated so long as such parties remain in full compliance FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new revised versions of the GNU Free Doc umentation License from time to time Such new versions will be similar in spirit to the present version but may differ in detail to address new problems or concerns See http www gnu org copyleft Each version of the License is given a distinguishing ver sion number If the Document specifies that a particular num bered version of this License or any later version applies to it you have the option of following the terms and con ditions either of that specified version or of any later version that has been published not as a draft by the Free Soft ware Foundation If the Doc ument does not specify a ver sion number of this License you may choose any version ever published not as a draft by the Free Software Founda tion The pdfTEX user manual 48
105. t number expandable In rrr files produced by ppFIEX one can recognize a form Xobject by the prefix Fm followed by a number for instance Fm2 For a given form XObject number this primitive expands to the number in the corresponding form XObject name E g if Fm2 corresponds to some form XObject with object number 7 the Npdfxf ormname7 expands to the number 2 The primitive was introduced in ppFTEX 1 30 0 Graphics inclusion PDF provides a mechanism for embedding graphic and textual objects form XObjects In Ppr TEX this mechanism is accessed by means of pdfxform Npdflastxform and pdfrefxform A special kind of XObjects are bitmap graphics and for manipulating them similar commands are provided pdfximage rule spec attr spec page spec colorspace spec pdf box spec general text This command creates an image object The dimensions of the image can be controlled via rule spec The default values are zero for depth and 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 Npdfimager
106. te all sections Entitled En dorsements COLLECTIONS OF DOCUMENTS You may make a collection con sisting of the Document and other documents released un der this License and replace the individual copies of this License in the various docu ments with a single copy that is included in the collection provided that you follow the rules of this License for verba tim copying of each of the doc uments in all other respects You may extract a single doc ument from such a collection and distribute it individually under this License provided you insert a copy of this Li cense into the extracted docu ment and follow this License in all other respects regarding verbatim copying of that doc ument AGGREGATION WITH INDEPENDENT WORKS A compilation of the Docu ment or its derivatives with other separate and indepen dent documents or works in or on a volume of a storage or distribution medium is called an aggregate if the copy right resulting from the compi lationis not used to limit the le gal rights of the compilation s users beyond what the individ ual works permit When the Documentis included in an ag gregate this License does not apply to the other works in the aggregate which are not them selves derivative works of the Document If the Cover Text requirement of section 3 is applicable to these copies of the Document then if the Document is less than one half of the entire ag
107. ter aggregate outline summarize itemize review dip into flip through browse glance into leaf through skim refine enumerate glean synopsize winnow the wheat from the chaff and separate the sheep from the goats We thrive in information thick worlds because of our marvelous and everyday capacity to select edit single out structure highlight group pair merge harmonize synthesize focus organize condense reduce boil down choose categorize catalog clas sify list abstract scan look into idealize isolate discriminate distinguish screen pigeonhole pick over sort integrate blend inspect filter lump skip smooth chunk average approximate cluster ag gregate outline summarize itemize review dip into flip through browse glance into leaf through skim refine enumerate glean synopsize winnow the wheat from the chaff and separate the sheep from the goats Additional PDF keys This section is based on the manual on keys written by Martin Schr der one of the maintainers of PoF TEX A PDF document should contain only the structures and attributes defined in the ppr specification However the specification allows applications to insert additional keys provided they follow certain rules The most important rule is that developers have to register with Adobe prefixes for the keys they want to insert Hans Hagen has registered the prefix PTEX for pDFTEX PDFTEX generates an XObject for
108. text edi tors or for images composed of pixels generic paint pro grams or for drawing widely available drawing edi tor and that is suitable for in put to text formatters or for au tomatic 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 discour age subsequent modification by ror viewers is not Trans parent An image format is not Transparent if used for any substantial amount of text A copy that is not Transparent is called Opague Examples of suitable formats for Transparent copies in clude plain ASCII without markup Texinfo input format LaTeX input format SGML or XML using a publicly available DTD and standard conforming simple HTML PostScript or ror designed for human modification Ex amples of transparent image formats include PNG XCF and JPG Opaque formats include proprietary formats that can be read and edited only by proprietary word processors SGML or XML for which the DTD and or processing tools are not generally available and the machine generated HTML PostScript or ror produced by some word processors for output purposes only The Title Page means for a printed book the title page it self plus such following pages as are needed to hold legi bly the material this License requires to appear in the ti tle
109. the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version COMBINING DOCUMENTS You may combine the Docu ment with other documents re leased under this License un der the terms defined in sec tion 4 above for modified ver sions provided that you in clude in the combination all of the Invariant Sections of all of the original documents un modified and list them all as Invariant Sections of your com bined work in its license notice and that you preserve all their Warranty Disclaimers The combined work need only contain one copy of this Li cense and multiple identi cal Invariant Sections may be replaced with a single copy If there are multiple Invari ant Sections with the same name but different contents make the title of each such sec tion 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 num ber Make the same adjust ment to the section titles in the list of Invariant Sections in the license notice of the combined work In the combination you must combine any sections Enti tled History in the various original documents forming one section Entitled Histo ry likewise combine any sec tions Entitled Acknowledge ments and any sections Enti tled Dedications You must dele
110. the TEXFONTMAPS variable in Wes2c or give an explicit path so that it will be found When the pdfmapfile or Npdfmapline primitive is read by ppFTEX the argument map file or map line will be processed immediately and the internal map entry database is updated The operation mode of the Npdfmapf ile and Npdfmapline primitives is selected by an optional modifier character in front of the 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 existing entry But in any case map entries of fonts already in use are kept untouched Here are two examples 24 The pdfTEX user manual pdfmapfile myfont map pdfmapline tptmri8r Times Italic lt 8r enc lt ptmri8a pfb When no modifier character is given e g pdfmapfile foo map or pdfmapline phvr8r Helvetica and there hasn t already been any call of one of these primitives before then the default map file pdftex map will not be read in Apart from this the given map file will be processed similarly as with a 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 pdfmapfile or pdfmapline early in the TEX file When the default map file is large but you don t need it anyway these com
111. the latest allowed ppr version of included PDFS E g pdfminorversion 3 tells ppFIEX to set the ppr version to 1 3 and allows only included ppr files with versions numbers up to 1 3 The default for 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 ppFTEX 1 30 0 as a shortened synonym of Npdfoptionpdfminorversion command which is now obsolete Distributions alter the default value here for example TEX Live 2010 sets pdfminorversion 5 when its formats are built so object compression can be enabled described below pdfcompresslevel integer This integer parameter specifies the level of stream compression text inline graphics and embedded PNG images only if they are un and re compressed during the embedding process all done by the 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 Npdf compresslevel O is great for PDF stream debugging Npdfobjcompresslevel integer This integer parameter controls the compression of non stream objects In the ppr 1 4 specification these objects still had to go into the Ppr file as clear text uncompressed The p
112. then the page content are not affected by such user defined transformations PDFIEX 1 40 0 solves this problem with three new primitives Npdfsetmatrix 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 pdf setmatrix 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 pdfsetmatrix 0 87 0 5 0 5 0 87 rotates the current space by 30 degrees inserting 0 87 0 5 0 5 0 87 O O cm into the content stream The primitive was introduced in rprTEX 1 40 0 Npdfsave The command saves the current transformation by inserting g operator into the content stream The primitive was introduced in rprTEX 1 40 0 pdfrestore The command restores previously saved transformation by inserting Q operator into the content stream One should keep in mind that pdfsave and pdfrestore pairs should always be properly nested and should start and end at the same group level The primitive was introduced in ppFTEX 1 40 0 Miscellaneous if incsname expandable This conditional is true if evaluated inside csname endcsname and false otherwise ifpdfprimitive control sequence expandable This condition checks if the following control sequence has its primitive mean
113. umber general text general text expandable pdflastmatch integer expandable ifpdfabsnum expandable ifpdfabsdim expandable pdfuniformdeviate number expandable pdfnormaldeviate expandable pdfmdfivesum file general text expandable pdffilemoddate general text expandable pdffilesize general text expandable pdffiledump offset number length number general text 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 pdflastxpos read only integer pdflastypos read only integer 15 The pdfTEX user manual Npdflastdemerits read only integer Npdfelapsedtime read only integer Npdfrandomseed read only integer Npdfretval read only integer Npdfshellescape read only integer General commands Npdfobj object type spec h v m Npdfrefobj object number h v m Npdfxform xform attr spec box number h v m Npdfrefxform object number h v m pdfximage image attr spec general text h v m Npdfrefximage object number h v m pdfannot an
114. variants are constructed by adding the font expansion value to the tfmname of the base font e g there must be a map entry with tfmname sometfm 10 for 1 stretch or sometfm 15 for 1 5 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 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 used in autoexpand mode The drawback is that several font files will be embedded in the rpr output for each expanded font leading to significantly larger ppr files than in autoexpand mode For moderate expansion values going without autoexpand mode is not worth the trouble 21 The pdfTEX user manual 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 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 when using rpr it s not illogical PDF viewers use so called Multiple Master fonts when no
115. vious parameter but affects the last line s depth of a paragraph pdfeachlineheight dimension Similar to pdffirstlineheight but for all lines of a paragraph including the first one unless pdffirstlineheight is specified pdfeachlinedepth dimension Like the preceding parameter but for depth PDF objects pdfobj object type spec This command creates a raw rpr object that is written to the rpr fileas 1 0 obj endobj The object is written to Ppr output as provided by the user When object type spec is not given ppFTgX no longer creates a dictionary object with contents general text as it did in the past 28 7 7 7 8 The pdfTEX user manual When however object type spec is given as attr spec stream the object will be created as a stream with contents general text and additional attributes in attr spec When object type spec is given as attr spec file then the general text will be treated as a file name and its contents will be copied into the stream contents When object type spec is given as reserveobjnum just a new object number is reserved The number of the reserved object is accessible via Npdflastobj The object can later be filled with contents by pdfobj useobjnum number balanced text 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 ppr output
116. working with ppr or JBIG2 images page spec allows to decide which page of the document is to be included the page spec is irrelevant for the other two image formats Starting from ppFTEX 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 pdf box spec is present it overrides the default behaviour specified by the pdf pagebox parameter and is overridden by the obsolete pdf forcepagebox parameter This option is irrelevant for non Ppr inclusions Starting from ppFTEX 1 21 pdfximage command supports colorspace keyword followed by an object number user defined colorspace for the image being included This feature works for JPEG images only pPNGs are RGB palettes JB1G2 s are bitonal and PDF images have always self contained color space information Npdfrefximage integer The image is kept in memory and will be written to the ppr output only when its number is referred to by pdfrefximage or pdfximage is preceded by immediate Nothing is appended to the list being built Npdfrefximage appends a whatsit node to the list being built When the whatsit node is searched at shipout time pDFIEX will write the image with number integer to the ppr output if it has not been written yet Npdflastximage read only integer The number of the most recently created XObject image is accessible via pdf lastximage Npdfximagebbox integer integer expandable The dimensi
117. x to change their box nesting level pdfendthread This ends an article thread started before by pdfstartthread pdfthreadmargin dimension Specifies a margin to be added to the dimensions of a bead within an article thread Literals and specials pdfliteral pdfliteral spec general text Like special in normal TEX this command inserts raw rpr code into the output This allows support of color and text transformation This primitive is heavily used in the METAPOST inclusion macros Normally pprTEX ends a text section in the ppr output and sets the transformation matrix to the current location on the page before inserting general text however this can be turned off by giving the optional keyword direct This command appends a whatsit node to the list being built general text is expanded when the whatsit node is created and not when it is shipped out as with Nspecial Starting from version 1 30 0 rprIEX allows to use a new keyword page instead of direct Both modify the default behaviour of pdf literal avoiding translation of the coordinates space before inserting the literal code The difference is that the page keyword instructs rprIEX to close a 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 q Q Note that in most cases using q Q operators inside Npdfliteral with direct keyword will produce corrupted rpr
118. xt best place to look edit is the file texmf cnf When still in deep trouble set KPATHSEA_DEBUG 255 before running PDFTEX or run pDFIEX with option k 255 This will cause ppFTEX to write a lot of debugging information that can be useful to trace problems More options can be found in the Wzs2c documentation Variables in texmf cnf can be overwritten by environment variables Here are some of the most common problems you can encounter when getting started e I can t find the format file pdftex fmt I can t find the format file pdflatex fmt The format file is not created see above how to do that or is not properly placed Make sure that TEXFORMATS in texmf cnf contains the path to pdftex fmt or pdflatex fmt e xx fmt was written by tex Fatal format file error I m stymied This appears e g if you forgot to regenerate the fmt files after installing a new version of the por TEX binary The first line tells by which engine the offending format was generated e PDFIEX cannot find one or more map files map encoding vectors enc virtual fonts Type 1 fonts TrueType or OpenType fonts or some image file Make sure that the required file exists and the corresponding variable in texmf cnf contains a path to the file See above which variables ppr TEX needs apart from the ones TEX uses When you have installed new fonts and your pDr viewer complains about missing fonts you should take a look at the log file pr

Download Pdf Manuals

image

Related Search

Related Contents

User Manual - Silicon Sensing Systems  Depliant  安全に関するご注意  PRICE DOWN!  lm535w745w om_1990  Toshiba Satellite C655D-S5143  

Copyright © All rights reserved.
Failed to retrieve file