texlive[57027] Build/source/texk/dvipsk: new option -title, from

commits+karl at tug.org commits+karl at tug.org
Sat Nov 28 23:49:13 CET 2020


Revision: 57027
          http://tug.org/svn/texlive?view=revision&revision=57027
Author:   karl
Date:     2020-11-28 23:49:12 +0100 (Sat, 28 Nov 2020)
Log Message:
-----------
new option -title, from Akira

Modified Paths:
--------------
    trunk/Build/source/texk/dvipsk/ChangeLog
    trunk/Build/source/texk/dvipsk/NEWS
    trunk/Build/source/texk/dvipsk/dvips.c
    trunk/Build/source/texk/dvipsk/dvips.info
    trunk/Build/source/texk/dvipsk/dvips.texi
    trunk/Build/source/texk/dvipsk/output.c
    trunk/Build/source/texk/dvipsk/protos.h

Modified: trunk/Build/source/texk/dvipsk/ChangeLog
===================================================================
--- trunk/Build/source/texk/dvipsk/ChangeLog	2020-11-28 22:38:51 UTC (rev 57026)
+++ trunk/Build/source/texk/dvipsk/ChangeLog	2020-11-28 22:49:12 UTC (rev 57027)
@@ -1,3 +1,16 @@
+2020-11-28  Akira Kakuto  <kakuto at w32tex.org>
+
+	* protos.h (titlename): new global.
+	* dvips.c (titlename): new global.
+	(helparr): new option -title.
+	(main): recognize it.
+	* output.c (initprinter) <%%Title>: use xbasename(iname) instead of
+	iname by default.
+
+2020-11-28  Karl Berry  <karl at freefriends.org>
+
+	* dvips.texi (Option details): document -title.
+
 2020-11-28  TANAKA Takuji  <ttk at t-lab.opal.ne.jp>
 
 	* virtualfont.c:

Modified: trunk/Build/source/texk/dvipsk/NEWS
===================================================================
--- trunk/Build/source/texk/dvipsk/NEWS	2020-11-28 22:38:51 UTC (rev 57026)
+++ trunk/Build/source/texk/dvipsk/NEWS	2020-11-28 22:49:12 UTC (rev 57027)
@@ -1,6 +1,10 @@
 $Id$
 This file records noteworthy changes.  (Public domain.)
 
+dvips 2021.1 (TeX Live 2020):
+  Default title is now the basename of the input file isntead of the
+  full path, and can be overridden with new option -title.
+
 dvips 2020.1 (TeX Live 2020):
   Encodings for bitmap fonts.
   https://tug.org/TUGboat/tb40-2/tb125rokicki-type3search.pdf

Modified: trunk/Build/source/texk/dvipsk/dvips.c
===================================================================
--- trunk/Build/source/texk/dvipsk/dvips.c	2020-11-28 22:38:51 UTC (rev 57026)
+++ trunk/Build/source/texk/dvipsk/dvips.c	2020-11-28 22:49:12 UTC (rev 57027)
@@ -123,6 +123,7 @@
 integer firstboploc;         /* where the first bop is */
 Boolean sepfiles;            /* each section in its own file? */
 int numcopies;               /* number of copies of each page to print */
+char *titlename="";          /* if given, used for %%Title */
 const char *oname;           /* output file name */
 char *iname;                 /* dvi file name */
 char *fulliname;             /* same, with current working directory */
@@ -315,6 +316,7 @@
 "-r*  Reverse order of pages          -R*  Run securely",
 "-s*  Enclose output in save/restore  -S # Max section size in pages",
 "-t s Paper format                    -T c Specify desired page size",
+"-title s Title in comment",
 "-u s PS mapfile                      -U*  Disable string param trick",
 "-v   Print version number and quit   -V*  Send downloadable PS fonts as PK",
 "-x # Override dvi magnification      -X # Horizontal resolution",
@@ -999,21 +1001,24 @@
                reverse = (*p != '0');
                break;
 case 't' :
-               if (*p == 0 && argv[i+1])
-                  p = argv[++i];
-               if (strcmp(p, "landscape") == 0) {
-                  if (hpapersize || vpapersize)
-                     error(
-             "both landscape and papersize specified; ignoring landscape");
-                  else
-                     landscape = 1;
-               } else
-                  paperfmt = p;
+               if (STREQ (p, "itle") && argv[i+1]) {
+                  titlename = argv[++i];
+               } else {
+                  if (*p == 0 && argv[i+1])
+                     p = argv[++i];
+                  if (strcmp(p, "landscape") == 0) {
+                     if (hpapersize || vpapersize)
+                        error("both landscape and papersize specified; ignoring landscape");
+                     else
+                        landscape = 1;
+                  } else
+                     paperfmt = p;
+               }
                break;
 case 'v':
-                printf ("%s %s\n", banner, banner2);
-                exit (0);
-                break;
+               printf ("%s %s\n", banner, banner2);
+               exit (0);
+               break;
 case 'x' : case 'y' :
                if (*p == 0 && argv[i+1])
                   p = argv[++i];

Modified: trunk/Build/source/texk/dvipsk/dvips.info
===================================================================
--- trunk/Build/source/texk/dvipsk/dvips.info	2020-11-28 22:38:51 UTC (rev 57026)
+++ trunk/Build/source/texk/dvipsk/dvips.info	2020-11-28 22:49:12 UTC (rev 57027)
@@ -1,6 +1,6 @@
 This is dvips.info, produced by makeinfo version 6.7 from dvips.texi.
 
-This manual documents Dvips version 2020.1 (May 2020), a program to
+This manual documents Dvips version 2020.1 (November 2020), a program to
 translate a DVI file into PostScript.  You may freely use, modify and/or
 distribute this file.
 INFO-DIR-SECTION TeX
@@ -16,7 +16,7 @@
 Dvips
 *****
 
-This manual documents Dvips version 2020.1 (May 2020), a program to
+This manual documents Dvips version 2020.1 (November 2020), a program to
 translate a DVI file into PostScript.  You may freely use, modify and/or
 distribute this file.
 
@@ -97,8 +97,7 @@
 
    For solutions to common installation problems and information on how
 to report a bug, see the file 'kpathsea/BUGS' (*note (kpathsea)Bugs::).
-For solutions to Dvips-specific problems, *note Debug options::.  Also
-see the Dvips home page at <http://www.radicaleye.com/dvips>.
+For solutions to Dvips-specific problems, *note Debug options::.
 
    Dvips does require some additional installation, detailed in the
 sections below.  Also, to configure color devices, *note Color device
@@ -209,7 +208,7 @@
 originally written by Peter Deutsch.  It can read the PostScript
 produced by Dvips and render it on your monitor, or for another device
 (e.g., an Epson printer) that does not support PostScript, or in PDF
-format.  The latest version is available via <http://ghostscript.com>.
+format.  The latest version is available via <https://ghostscript.com>.
 
    The program Ghostview, originally written by Johannes Plass and Tim
 Theisen, provides typical previewing capabilities (next page/previous
@@ -216,7 +215,7 @@
 page, magnification, etc.).  It requires Ghostscript to run, and files
 in structured Postscript, specifically with '%%Page' comments (no 'N' in
 'config.ps').  The current version is known as GV, and is available from
-<http://www.gnu.org/software/gv>.
+<https://www.gnu.org/software/gv>.
 
 
 File: dvips.info,  Node: Diagnosing problems,  Prev: Ghostscript installation,  Up: Installation
@@ -444,7 +443,7 @@
 *Note (kpathsea)Unable to generate fonts::.)
 
    Many options are available (see the next section).  For a brief
-summary of available options, just type
+summary of available options, run
 
      dvips --help
 
@@ -867,6 +866,12 @@
           information in the output.  (If you just have a single page
           document, you can use '-E' to get pure EPSF output.)
 
+'-title STRING'
+     Use STRING as the title in the generated PostScript ('%%Title').
+     If not specified, the default is the basename of the input file;
+     for example, running 'dvips /foo/bar.dvi' will have a '%%Title' of
+     'bar.dvi'.
+
 '-T HSIZE,VSIZE'
      Set the paper size to (HSIZE,VSIZE), a comma-separated pair of
      dimensions such as '.1in,-.3cm' (*note papersize special::).  It
@@ -3776,6 +3781,7 @@
 * %%Page, removing:                      Option details.      (line 165)
 * %%Page, required by Ghostview:         Ghostscript installation.
                                                               (line  12)
+* %%Title:                               Option details.      (line 357)
 * %%VMusage:                             Headers and memory usage.
                                                               (line  12)
 * %*Font:                                Fonts in figures.    (line   6)
@@ -3813,7 +3819,6 @@
 * -l [=]NUM:                             Option details.      (line 174)
 * -m:                                    Option details.      (line 187)
 * -M:                                    Option details.      (line 199)
-* -mode:                                 Option details.      (line 190)
 * -mode MODE:                            Option details.      (line 190)
 * -N:                                    Option details.      (line 212)
 * -n NUM:                                Option details.      (line 209)
@@ -3839,25 +3844,26 @@
 * -s SLANT:                              Afm2tfm options.     (line  61)
 * -T ENC-FILE:                           Changing both encodings.
                                                               (line   6)
-* -T HSIZE,VSIZE:                        Option details.      (line 357)
+* -T HSIZE,VSIZE:                        Option details.      (line 363)
 * -t PAPERTYPE:                          Option details.      (line 337)
 * -T PS-TEX-ENC:                         Afm2tfm options.     (line  71)
 * -t TEX-ENC:                            Changing TeX encodings.
                                                               (line   6)
 * -t TEX-ENC <1>:                        Afm2tfm options.     (line  66)
-* -U:                                    Option details.      (line 372)
+* -title STR:                            Option details.      (line 357)
+* -U:                                    Option details.      (line 378)
 * -u:                                    Afm2tfm options.     (line  75)
-* -u PSMAPFILE:                          Option details.      (line 364)
-* -v:                                    Option details.      (line 380)
-* -V:                                    Option details.      (line 383)
+* -u PSMAPFILE:                          Option details.      (line 370)
+* -v:                                    Option details.      (line 386)
+* -V:                                    Option details.      (line 389)
 * -v VPL-FILE:                           Afm2tfm options.     (line  81)
 * -V VPL-FILE:                           Afm2tfm options.     (line  84)
-* -x NUM:                                Option details.      (line 392)
-* -X NUM:                                Option details.      (line 400)
-* -Y NUM:                                Option details.      (line 407)
+* -x NUM:                                Option details.      (line 398)
+* -X NUM:                                Option details.      (line 406)
+* -Y NUM:                                Option details.      (line 413)
 * -z:                                    Hypertext.           (line   6)
-* -Z for compressing bitmap fonts:       Option details.      (line 416)
-* -z for recognizing hyperdvi:           Option details.      (line 410)
+* -Z for compressing bitmap fonts:       Option details.      (line 422)
+* -z for recognizing hyperdvi:           Option details.      (line 416)
 * ..-relative filenames:                 Option details.      (line 317)
 * .afm Adobe metric files:               Metric files.        (line  26)
 * .dvipsrc, searched for:                Configuration file searching.
@@ -4018,7 +4024,7 @@
 * compilation:                           Installation.        (line   6)
 * compressed PostScript:                 Dynamic creation of graphics.
                                                               (line   6)
-* compressing bitmap fonts:              Option details.      (line 416)
+* compressing bitmap fonts:              Option details.      (line 422)
 * Computer Modern in PostScript:         Hypertext caveats.   (line   6)
 * Computer Modern, encoding of:          Encodings.           (line  15)
 * condensed fonts:                       Afm2tfm options.     (line  47)
@@ -4082,8 +4088,9 @@
                                                               (line  35)
 * dictionary, SDict:                     Literal headers.     (line   6)
 * dictionary, userdict:                  Header files.        (line  21)
-* distillation, and -z:                  Option details.      (line 410)
+* distillation, and -z:                  Option details.      (line 416)
 * distiller, for PDF files:              Hypertext.           (line  11)
+* document title, specifying:            Option details.      (line 357)
 * dot accent:                            Reencoding with Afm2tfm.
                                                               (line  32)
 * double-sided printing:                 Option details.      (line  37)
@@ -4227,7 +4234,7 @@
 * gs installation:                       Ghostscript installation.
                                                               (line   6)
 * gsave/grestore, and literal PS:        Literal examples.    (line  27)
-* gsftopk:                               Option details.      (line 384)
+* gsftopk:                               Option details.      (line 390)
 * h config command (download additional header): Configuration file commands.
                                                               (line  57)
 * H config command (PostScript header path): Configuration file commands.
@@ -4253,11 +4260,11 @@
 * hscale (psfile special option):        psfile special.      (line  30)
 * hsize (psfile special option):         psfile special.      (line  24)
 * html specials:                         Hypertext.           (line   6)
-* html specials, and -z:                 Option details.      (line 410)
+* html specials, and -z:                 Option details.      (line 416)
 * http://xxx.lanl.gov/hypertex:          Hypertext.           (line  22)
 * Hungarian umlaut:                      Reencoding with Afm2tfm.
                                                               (line  32)
-* hyperdvi extensions, enabling:         Option details.      (line 410)
+* hyperdvi extensions, enabling:         Option details.      (line 416)
 * hypertext and bitmap fonts:            Hypertext caveats.   (line   6)
 * hypertext caveats:                     Hypertext caveats.   (line   6)
 * hypertext caveats <1>:                 Hypertext caveats.   (line   6)
@@ -4337,8 +4344,8 @@
 * macros for epsf inclusion:             \includegraphics.    (line   6)
 * macros for epsf inclusion <1>:         EPSF macros.         (line   6)
 * magnification, DVI:                    EPSF scaling.        (line  62)
-* magnification, overriding DVI:         Option details.      (line 392)
-* magnification, vertical:               Option details.      (line 403)
+* magnification, overriding DVI:         Option details.      (line 398)
+* magnification, vertical:               Option details.      (line 409)
 * mailcap and hypertext:                 Hypertext specials.  (line  53)
 * manual feed:                           Option details.      (line 187)
 * maxdrift:                              Option details.      (line  76)
@@ -4367,7 +4374,7 @@
 * mktexpk, changing name:                Environment variables.
                                                               (line  36)
 * mode name, specifying:                 Option details.      (line 190)
-* mtpk:                                  Option details.      (line 384)
+* mtpk:                                  Option details.      (line 390)
 * multiple master fonts:                 psfonts.map.         (line  60)
 * multiple output files:                 Option details.      (line 132)
 * multiple paper trays:                  Paper trays.         (line   6)
@@ -4405,6 +4412,7 @@
 * output file, setting:                  Configuration file commands.
                                                               (line 115)
 * output files, multiple:                Option details.      (line 132)
+* output title, specifying:              Option details.      (line 357)
 * output, inverted:                      Small or inverted.   (line   6)
 * output, none:                          No output.           (line   6)
 * output, redirecting:                   Option details.      (line 242)
@@ -4436,7 +4444,7 @@
 * PDF files, making:                     Ghostscript installation.
                                                               (line   6)
 * PDF files, making <1>:                 Hypertext.           (line  11)
-* PDF files, option for:                 Option details.      (line 410)
+* PDF files, option for:                 Option details.      (line 416)
 * pdfmark:                               Hypertext.           (line   6)
 * pfa files:                             Glyph files.         (line  25)
 * pfb files:                             Glyph files.         (line  25)
@@ -4463,7 +4471,7 @@
 * PostScript encoding:                   Encodings.           (line  27)
 * PostScript encoding, changing:         Changing PostScript encodings.
                                                               (line   6)
-* PostScript font alias file:            Option details.      (line 364)
+* PostScript font alias file:            Option details.      (line 370)
 * PostScript font alias file <1>:        Configuration file commands.
                                                               (line 126)
 * PostScript fonts:                      PostScript fonts.    (line   6)
@@ -4511,7 +4519,7 @@
 * psfonts.map <2>:                       psfonts.map.         (line   6)
 * psheaderdir:                           Header files.        (line  12)
 * psi character missing:                 Hypertext caveats.   (line  53)
-* pstopk:                                Option details.      (line 384)
+* pstopk:                                Option details.      (line 390)
 * pTeX extensions:                       Option details.      (line 220)
 * pTeX extensions <1>:                   Option details.      (line 226)
 * ptex JFM:                              Virtual fonts.       (line  37)
@@ -4534,11 +4542,11 @@
 * remapping:                             Reencoding with Afm2tfm.
                                                               (line   6)
 * resident fonts, different in different printers: Option details.
-                                                              (line 364)
+                                                              (line 370)
 * resident fonts, different in different printers <1>: Configuration file commands.
                                                               (line 126)
-* resolution:                            Option details.      (line 400)
-* resolution <1>:                        Option details.      (line 407)
+* resolution:                            Option details.      (line 406)
+* resolution <1>:                        Option details.      (line 413)
 * resolution, setting:                   Option details.      (line  63)
 * reverse pagination:                    Option details.      (line 314)
 * rhi (psfile special option):           psfile special.      (line  46)
@@ -4638,6 +4646,7 @@
 * Theisen, Tim:                          Ghostscript installation.
                                                               (line  12)
 * tight bounding box, finding:           Option details.      (line  87)
+* title, specifying:                     Option details.      (line 357)
 * too-small output:                      Small or inverted.   (line   6)
 * trademark character, accessing:        Changing PostScript encodings.
                                                               (line  18)
@@ -4694,7 +4703,7 @@
 * wide fonts:                            psfonts.map.         (line  19)
 * X config command (horizontal resolution): Configuration file commands.
                                                               (line 198)
-* Xerox 4045:                            Option details.      (line 372)
+* Xerox 4045:                            Option details.      (line 378)
 * Y config command (vertical resolution): Configuration file commands.
                                                               (line 201)
 * Z config command (compress fonts):     Configuration file commands.
@@ -4705,84 +4714,84 @@
 
 
 Tag Table:
-Node: Top516
-Node: Why Dvips1261
-Node: Installation3844
-Node: config.ps installation4847
-Node: PostScript font installation7454
-Node: Ghostscript installation8374
-Node: Diagnosing problems9311
-Node: Debug options10402
-Node: No output11406
-Node: Small or inverted12872
-Node: Printer errors13590
-Node: Long documents fail14922
-Node: Including graphics fails15263
-Node: Invoking Dvips16502
-Node: Basic usage17093
-Node: Command-line options18097
-Node: Option summary18545
-Node: Option details20794
-Node: Environment variables40760
-Node: Config files43621
-Node: Configuration file searching44291
-Node: Configuration file commands47488
-Node: Paper size and landscape55462
-Node: papersize special57087
-Node: Config file paper sizes58795
-Node: Paper trays62951
-Node: Interaction with PostScript64285
-Node: PostScript figures64938
-Node: Bounding box65664
-Node: \includegraphics69036
-Node: EPSF macros71328
-Node: EPSF scaling73296
-Node: EPSF clipping75866
-Node: psfile special76508
-Node: Dynamic creation of graphics78900
-Node: Fonts in figures80218
-Node: Header files81868
-Node: Including headers from TeX83074
-Node: Including headers from the command line85112
-Node: Headers and memory usage86211
-Node: Literal PS87422
-Node: " special88004
-Node: ps special88745
-Node: Literal headers90243
-Node: PostScript hooks90952
-Node: Literal examples93048
-Node: Hypertext94502
-Node: Hypertext caveats95676
-Node: Hypertext specials100032
-Node: PostScript fonts102666
-Node: Font concepts103783
-Node: Metric files105013
-Node: Glyph files107793
-Node: Virtual fonts110152
-Node: Encodings112307
-Node: Bitmap font encodings114709
-Node: PostScript typesetting117239
-Node: Making a font available120336
-Node: Invoking afm2tfm125370
-Node: Changing font encodings126390
-Node: Changing TeX encodings127181
-Node: Changing PostScript encodings128283
-Node: Changing both encodings129627
-Node: Reencoding with Afm2tfm130301
-Node: Encoding file format133404
-Node: Special font effects137608
-Node: Afm2tfm options139868
-Node: psfonts.map143393
-Node: Color148123
-Node: Color macro files149167
-Node: User-definable colors152377
-Node: Color subtleties153653
-Node: Ted Turner155305
-Node: Color device configuration156530
-Node: Color support details158974
-Node: Color specifications159352
-Node: Color specials160756
-Node: Index162885
+Node: Top521
+Node: Why Dvips1271
+Node: Installation3854
+Node: config.ps installation4789
+Node: PostScript font installation7396
+Node: Ghostscript installation8316
+Node: Diagnosing problems9255
+Node: Debug options10346
+Node: No output11350
+Node: Small or inverted12816
+Node: Printer errors13534
+Node: Long documents fail14866
+Node: Including graphics fails15207
+Node: Invoking Dvips16446
+Node: Basic usage17037
+Node: Command-line options18035
+Node: Option summary18483
+Node: Option details20732
+Node: Environment variables40943
+Node: Config files43804
+Node: Configuration file searching44474
+Node: Configuration file commands47671
+Node: Paper size and landscape55645
+Node: papersize special57270
+Node: Config file paper sizes58978
+Node: Paper trays63134
+Node: Interaction with PostScript64468
+Node: PostScript figures65121
+Node: Bounding box65847
+Node: \includegraphics69219
+Node: EPSF macros71511
+Node: EPSF scaling73479
+Node: EPSF clipping76049
+Node: psfile special76691
+Node: Dynamic creation of graphics79083
+Node: Fonts in figures80401
+Node: Header files82051
+Node: Including headers from TeX83257
+Node: Including headers from the command line85295
+Node: Headers and memory usage86394
+Node: Literal PS87605
+Node: " special88187
+Node: ps special88928
+Node: Literal headers90426
+Node: PostScript hooks91135
+Node: Literal examples93231
+Node: Hypertext94685
+Node: Hypertext caveats95859
+Node: Hypertext specials100215
+Node: PostScript fonts102849
+Node: Font concepts103966
+Node: Metric files105196
+Node: Glyph files107976
+Node: Virtual fonts110335
+Node: Encodings112490
+Node: Bitmap font encodings114892
+Node: PostScript typesetting117422
+Node: Making a font available120519
+Node: Invoking afm2tfm125553
+Node: Changing font encodings126573
+Node: Changing TeX encodings127364
+Node: Changing PostScript encodings128466
+Node: Changing both encodings129810
+Node: Reencoding with Afm2tfm130484
+Node: Encoding file format133587
+Node: Special font effects137791
+Node: Afm2tfm options140051
+Node: psfonts.map143576
+Node: Color148306
+Node: Color macro files149350
+Node: User-definable colors152560
+Node: Color subtleties153836
+Node: Ted Turner155488
+Node: Color device configuration156713
+Node: Color support details159157
+Node: Color specifications159535
+Node: Color specials160939
+Node: Index163068
 
 End Tag Table
 

Modified: trunk/Build/source/texk/dvipsk/dvips.texi
===================================================================
--- trunk/Build/source/texk/dvipsk/dvips.texi	2020-11-28 22:38:51 UTC (rev 57026)
+++ trunk/Build/source/texk/dvipsk/dvips.texi	2020-11-28 22:49:12 UTC (rev 57027)
@@ -3,7 +3,7 @@
 @settitle Dvips: A DVI-to-PostScript translator
 
 @set version 2020.1
- at set month-year May 2020
+ at set month-year November 2020
 
 @copying
 This manual documents Dvips version @value{version}
@@ -35,7 +35,7 @@
 @subtitle for version @value{version}
 @subtitle @value{month-year}
 @author Tomas Rokicki
- at author @url{http://tug.org/dvips}
+ at author @url{https://tug.org/dvips}
 
 @page
 @insertcopying
@@ -136,8 +136,7 @@
 For solutions to common installation problems and information on how to
 report a bug, see the file @file{kpathsea/BUGS} (@pxref{Bugs,,,
 kpathsea, Kpathsea}).  For solutions to Dvips-specific problems,
- at pxref{Debug options}.  Also see the Dvips home page at
- at url{http://www.radicaleye.com/dvips}.
+ at pxref{Debug options}.
 
 Dvips does require some additional installation, detailed in the
 sections below.  Also, to configure color devices, @pxref{Color device
@@ -226,7 +225,7 @@
 produced by Dvips and render it on your monitor, or for another device
 (e.g., an Epson printer) that does not support PostScript, or in PDF
 format.  The latest version is available via
- at url{http://ghostscript.com}.
+ at url{https://ghostscript.com}.
 
 @cindex Theisen, Tim
 @pindex ghostview
@@ -239,7 +238,7 @@
 page, magnification, etc.).  It requires Ghostscript to run, and files
 in structured Postscript, specifically with @samp{%%Page} comments (no
 @samp{N} in @file{config.ps}).  The current version is known as GV,
-and is available from @url{http://www.gnu.org/software/gv}.
+and is available from @url{https://www.gnu.org/software/gv}.
 
 
 @node Diagnosing problems
@@ -499,7 +498,7 @@
 @xref{Unable to generate fonts,,, kpathsea, Kpathsea}.)
 
 Many options are available (see the next section).  For a brief summary
-of available options, just type
+of available options, run
 
 @example
 dvips --help
@@ -789,7 +788,6 @@
 
 @item -mode @var{mode}
 @opindex -mode @var{mode}
- at opindex -mode
 @cindex mode name, specifying
 @cindex Metafont mode, specifying
 Use @var{mode} as the Metafont device name for path searching and font
@@ -1032,6 +1030,17 @@
 you can use @samp{-E} to get pure EPSF output.)
 @end itemize
 
+ at item -title @var{string}
+ at opindex -title @var{str}
+ at cindex title, specifying
+ at cindex output title, specifying
+ at cindex document title, specifying
+ at findex %%Title
+Use @var{string} as the title in the generated PostScript
+(@code{%%Title}). If not specified, the default is the basename of the
+input file; for example, running @code{dvips /foo/bar.dvi} will have a
+ at code{%%Title} of @samp{bar.dvi}.
+
 @item -T @var{hsize}, at var{vsize}
 @opindex -T @var{hsize}, at var{vsize}
 Set the paper size to (@var{hsize}, at var{vsize}), a comma-separated
@@ -2989,8 +2998,8 @@
 @end display
 
 You may also want to check ``Notes on converting (La)@TeX{} documents
-to robust PDF using Rokicki's dvips and Acrobat Distiller'' by Timothy
-P. Van Zandt:@*
+to robust PDF using Rokicki's dvips and Acrobat Distiller'' by
+Timothy at tie{}P. Van Zandt:@*
 @url{http://www.emrg.com/texpdf.htmlhttp://zandtwerk.insead.fr/tex2pdf.html}.
 
 

Modified: trunk/Build/source/texk/dvipsk/output.c
===================================================================
--- trunk/Build/source/texk/dvipsk/output.c	2020-11-28 22:38:51 UTC (rev 57026)
+++ trunk/Build/source/texk/dvipsk/output.c	2020-11-28 22:49:12 UTC (rev 57027)
@@ -1436,8 +1436,10 @@
       if (tryepsf && isepsf == 0)
          error("We tried, but couldn't make it EPSF.");
       fprintf(bitfile, "%%%%Creator: %s\n", banner + 8);
-      if (*iname)
-         fprintf(bitfile, "%%%%Title: %s\n", iname);
+      if (*titlename)
+         fprintf(bitfile, "%%%%Title: %s\n", titlename);
+      else if (*iname)
+         fprintf(bitfile, "%%%%Title: %s\n", xbasename(iname));
 #ifdef CREATIONDATE
       jobtime = get_unique_time_if_given();
       if (jobtime == INVALID_EPOCH_VALUE) {

Modified: trunk/Build/source/texk/dvipsk/protos.h
===================================================================
--- trunk/Build/source/texk/dvipsk/protos.h	2020-11-28 22:38:51 UTC (rev 57026)
+++ trunk/Build/source/texk/dvipsk/protos.h	2020-11-28 22:49:12 UTC (rev 57027)
@@ -291,6 +291,7 @@
 extern integer firstboploc;
 extern Boolean sepfiles;
 extern int numcopies;
+extern char *titlename;
 extern const char *oname;
 extern char *iname;
 extern char *fulliname;



More information about the tex-live-commits mailing list.