diff options
author | Karl Berry <karl@freefriends.org> | 2024-07-21 17:04:55 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-07-21 17:04:55 +0000 |
commit | 02b5283777b7a5b5957f8dba8ec5b01b11a284e2 (patch) | |
tree | 6ddbccc91b850dfc35bff58433d414f483d9551e /Build/source/texk | |
parent | d25552584059cb1b2630193f357bc335eae04ab9 (diff) |
sync with pdftex r931 (\pdfptexuseunderscore)
git-svn-id: svn://tug.org/texlive/trunk@71860 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/ChangeLog | 11 | ||||
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/NEWS | 7 | ||||
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/pdftex.web | 27 | ||||
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/pdftoepdf.cc | 8 |
4 files changed, 44 insertions, 9 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog index c8586f3bbee..9fcf5a277d2 100644 --- a/Build/source/texk/web2c/pdftexdir/ChangeLog +++ b/Build/source/texk/web2c/pdftexdir/ChangeLog @@ -1,3 +1,14 @@ +2024-05-24 Thanh Han The <hanthethanh@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@gmail.com> * pdftex.web (pdf_begin_string): increase tolerance for finding diff --git a/Build/source/texk/web2c/pdftexdir/NEWS b/Build/source/texk/web2c/pdftexdir/NEWS index 1be93127d9b..a0bfa44c84a 100644 --- a/Build/source/texk/web2c/pdftexdir/NEWS +++ b/Build/source/texk/web2c/pdftexdir/NEWS @@ -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. diff --git a/Build/source/texk/web2c/pdftexdir/pdftex.web b/Build/source/texk/web2c/pdftexdir/pdftex.web index 510e32fd5be..2be2c84fef6 100644 --- a/Build/source/texk/web2c/pdftexdir/pdftex.web +++ b/Build/source/texk/web2c/pdftexdir/pdftex.web @@ -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 @@ that will be defined later. @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} -@d pdf_omit_charset_code = pdftex_first_integer_code + 33 {suppress /PTEX.* entries in PDF dictionaries} -@d pdf_omit_info_dict_code = pdftex_first_integer_code + 34 {suppress /PTEX.* entries in PDF dictionaries} -@d pdf_omit_procset_code = pdftex_first_integer_code + 35 {suppress /PTEX.* entries in PDF dictionaries} -@d pdf_int_pars=pdftex_first_integer_code + 36 {total number of \pdfTeX's integer parameters} +@d pdf_omit_charset_code = pdftex_first_integer_code + 33 {omit CharSet in Font dict} +@d pdf_omit_info_dict_code = pdftex_first_integer_code + 34 {omit Info dict} +@d pdf_omit_procset_code = pdftex_first_integer_code + 35 {omit ProcSet in resources dict} +@d pdf_ptex_use_underscore_code = pdftex_first_integer_code + 36 {use underscore for PTEX prefix} +@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 @@ that will be defined later. @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) +@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_suppress_ptex_info_code: print_esc("pdfsuppressptexinfo"); 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("pdfomitinfodict",assign_int,int_base+pdf_omit_info_dict_code);@/ 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 @@ begin 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 @@ begin 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; diff --git a/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc b/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc index 0dd1c62381e..238ed4dba5d 100644 --- a/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc +++ b/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc @@ -62,6 +62,7 @@ extern "C" { // does not allow it. extern int getpdfsuppresswarningpagegroup(void); extern integer getpdfsuppressptexinfo(void); +extern integer getptexuseunderscore(void); extern integer zround(double); } @@ -825,6 +826,7 @@ void write_epdf(void) // "Resources", NULL }; + const char *sep = getptexuseunderscore() ? "_" : "."; PdfDocument *pdf_doc = (PdfDocument *) epdf_doc; (pdf_doc->occurences)--; @@ -844,18 +846,18 @@ void write_epdf(void) // 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())); } } |