texlive[71860] Build/source/texk/web2c/pdftexdir: sync with pdftex
commits+karl at tug.org
commits+karl at tug.org
Sun Jul 21 19:04:56 CEST 2024
Revision: 71860
https://tug.org/svn/texlive?view=revision&revision=71860
Author: karl
Date: 2024-07-21 19:04:55 +0200 (Sun, 21 Jul 2024)
Log Message:
-----------
sync with pdftex r931 (\pdfptexuseunderscore)
Revision Links:
--------------
https://tug.org/svn/texlive?view=revision&revision=931
Modified Paths:
--------------
trunk/Build/source/texk/web2c/pdftexdir/ChangeLog
trunk/Build/source/texk/web2c/pdftexdir/NEWS
trunk/Build/source/texk/web2c/pdftexdir/pdftex.web
trunk/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
Modified: trunk/Build/source/texk/web2c/pdftexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/pdftexdir/ChangeLog 2024-07-20 23:46:34 UTC (rev 71859)
+++ trunk/Build/source/texk/web2c/pdftexdir/ChangeLog 2024-07-21 17:04:55 UTC (rev 71860)
@@ -1,3 +1,14 @@
+2024-05-24 Thanh Han The <hanthethanh at gmail.com>
+
+ * pdftex.web (pdf_ptex_use_underscore_code),
+ (pdf_ptex_use_underscore): new \pdfptexuseunderscore parameter.
+ (Put each ...): define it.
+ (print_param): print it.
+ (get_ptex_use_underscore): new fn to implement it.
+ (pdf_print_info): adjust Fullbanner prefix character.
+ * pdftoepdf.cc (getptexuseunderscore): declare fn.
+ (write_epdf): use it for FileName, PageNumber, InfoDict.
+
2024-04-18 Thanh Han The <hanthethanh at gmail.com>
* pdftex.web (pdf_begin_string): increase tolerance for finding
Modified: trunk/Build/source/texk/web2c/pdftexdir/NEWS
===================================================================
--- trunk/Build/source/texk/web2c/pdftexdir/NEWS 2024-07-20 23:46:34 UTC (rev 71859)
+++ trunk/Build/source/texk/web2c/pdftexdir/NEWS 2024-07-21 17:04:55 UTC (rev 71860)
@@ -1,3 +1,10 @@
+- changes:
+ - new primitive \pdfptexuseunderscore: if positive or
+ if \pdfmajorversion >= 2, the PTEX.Fullbanner and other dictionary
+ entries use an _ instead of ., as in PTEX_Fullbanner.
+- bugfixes:
+ - increase tolerance for detecting interword spaces in overfull lines.
+
pdfTeX 3.141592653-2.6-1.40.26 (TeX Live 2024)
- bugfixes:
- more reliable text extraction on BigEndian systems.
Modified: trunk/Build/source/texk/web2c/pdftexdir/pdftex.web
===================================================================
--- trunk/Build/source/texk/web2c/pdftexdir/pdftex.web 2024-07-20 23:46:34 UTC (rev 71859)
+++ trunk/Build/source/texk/web2c/pdftexdir/pdftex.web 2024-07-21 17:04:55 UTC (rev 71860)
@@ -1,4 +1,4 @@
-% Copyright 1996-2023 Han Th\^e\llap{\raise 0.5ex\hbox{\'{}}} Th\`anh,
+% Copyright 1996-2024 Han Th\^e\llap{\raise 0.5ex\hbox{\'{}}} Th\`anh,
% <thanh@@pdftex.org>
% This file is part of pdfTeX.
@@ -5704,10 +5704,11 @@
@d pdf_suppress_warning_page_group_code = pdftex_first_integer_code + 30 {suppress warning about multiple pdfs with page group}
@d pdf_info_omit_date_code = pdftex_first_integer_code + 31 {omit generating CreationDate and ModDate}
@d pdf_suppress_ptex_info_code = pdftex_first_integer_code + 32 {suppress /PTEX.* entries in PDF dictionaries}
- at d pdf_omit_charset_code = pdftex_first_integer_code + 33 {suppress /PTEX.* entries in PDF dictionaries}
- at d pdf_omit_info_dict_code = pdftex_first_integer_code + 34 {suppress /PTEX.* entries in PDF dictionaries}
- at d pdf_omit_procset_code = pdftex_first_integer_code + 35 {suppress /PTEX.* entries in PDF dictionaries}
- at d pdf_int_pars=pdftex_first_integer_code + 36 {total number of \pdfTeX's integer parameters}
+ at d pdf_omit_charset_code = pdftex_first_integer_code + 33 {omit CharSet in Font dict}
+ at d pdf_omit_info_dict_code = pdftex_first_integer_code + 34 {omit Info dict}
+ at d pdf_omit_procset_code = pdftex_first_integer_code + 35 {omit ProcSet in resources dict}
+ at d pdf_ptex_use_underscore_code = pdftex_first_integer_code + 36 {use underscore for PTEX prefix}
+ at d pdf_int_pars=pdftex_first_integer_code + 37 {total number of \pdfTeX's integer parameters}
@#
@d etex_int_base=pdf_int_pars {base for \eTeX's integer parameters}
@d tracing_assigns_code=etex_int_base {show assignments}
@@ -5822,6 +5823,7 @@
@d pdf_omit_charset == int_par(pdf_omit_charset_code)
@d pdf_omit_info_dict == int_par(pdf_omit_info_dict_code)
@d pdf_omit_procset == int_par(pdf_omit_procset_code)
+ at d pdf_ptex_use_underscore == int_par(pdf_ptex_use_underscore_code)
@#
@d tracing_assigns==int_par(tracing_assigns_code)
@d tracing_groups==int_par(tracing_groups_code)
@@ -5933,6 +5935,7 @@
pdf_omit_charset_code: print_esc("pdfomitcharset");
pdf_omit_info_dict_code: print_esc("pdfomitinfodict");
pdf_omit_procset_code: print_esc("pdfomitprocset");
+pdf_ptex_use_underscore_code: print_esc("pdfptexuseunderscore");
@/@<Cases for |print_param|@>@/
othercases print("[unknown integer parameter!]")
endcases;
@@ -6137,6 +6140,9 @@
primitive("pdfomitprocset",assign_int,int_base+pdf_omit_procset_code);@/
@!@:pdf_omit_procset}{\.{\\pdfomitprocset} primitive@>
+primitive("pdfptexuseunderscore",assign_int,int_base+pdf_ptex_use_underscore_code);@/
+@!@:pdf_ptex_use_underscore}{\.{\\pdfptexuseunderscore} primitive@>
+
@ @<Cases of |print_cmd_chr|...@>=
assign_int: if chr_code<count_base then print_param(chr_code-int_base)
else begin print_esc("count"); print_int(chr_code-count_base);
@@ -15154,6 +15160,12 @@
get_pdf_omit_charset := pdf_omit_charset;
end;
+function get_ptex_use_underscore: boolean;
+begin
+ get_ptex_use_underscore
+ := (pdf_ptex_use_underscore > 0) or (pdf_major_version >= 2)
+end;
+
function get_nullfont: internal_font_number;
begin
get_nullfont := null_font;
@@ -20300,7 +20312,10 @@
pdf_print_ln("/Trapped /False");
end;
if pdf_suppress_ptex_info mod 2 = 0 then begin
- pdf_str_entry_ln("PTEX.Fullbanner", pdftex_banner);
+ if get_ptex_use_underscore then
+ pdf_str_entry_ln("PTEX_Fullbanner", pdftex_banner)
+ else
+ pdf_str_entry_ln("PTEX.Fullbanner", pdftex_banner);
end;
pdf_end_dict;
end;
Modified: trunk/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
===================================================================
--- trunk/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc 2024-07-20 23:46:34 UTC (rev 71859)
+++ trunk/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc 2024-07-21 17:04:55 UTC (rev 71860)
@@ -62,6 +62,7 @@
// does not allow it.
extern int getpdfsuppresswarningpagegroup(void);
extern integer getpdfsuppressptexinfo(void);
+extern integer getptexuseunderscore(void);
extern integer zround(double);
}
@@ -825,6 +826,7 @@
// "Resources",
NULL
};
+ const char *sep = getptexuseunderscore() ? "_" : ".";
PdfDocument *pdf_doc = (PdfDocument *) epdf_doc;
(pdf_doc->occurences)--;
@@ -844,18 +846,18 @@
// write additional information
if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_FILENAME) == 0) {
- pdf_printf("/%s.FileName (%s)\n", pdfkeyprefix,
+ pdf_printf("/%s%sFileName (%s)\n", sep, pdfkeyprefix,
convertStringToPDFString(pdf_doc->file_name,
strlen(pdf_doc->file_name)));
}
if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_PAGENUMBER) == 0) {
- pdf_printf("/%s.PageNumber %i\n", pdfkeyprefix, (int) epdf_selected_page);
+ pdf_printf("/%s%sPageNumber %i\n", sep, pdfkeyprefix, (int) epdf_selected_page);
}
if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_INFODICT) == 0) {
pdf_doc->doc->getDocInfoNF(&info);
if (info.isRef()) {
// the info dict must be indirect (PDF Ref p. 61)
- pdf_printf("/%s.InfoDict ", pdfkeyprefix);
+ pdf_printf("/%s%sInfoDict ", sep, pdfkeyprefix);
pdf_printf("%d 0 R\n", addOther(info.getRef()));
}
}
More information about the tex-live-commits
mailing list.