texlive[65574] trunk: Sync with upstream luatex 43f4f57e5

commits+lscarso at tug.org commits+lscarso at tug.org
Tue Jan 17 23:11:05 CET 2023


Revision: 65574
          http://tug.org/svn/texlive?view=revision&revision=65574
Author:   lscarso
Date:     2023-01-17 23:11:05 +0100 (Tue, 17 Jan 2023)
Log Message:
-----------
Sync with upstream luatex 43f4f57e5

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/luatexdir/ChangeLog
    trunk/Build/source/texk/web2c/luatexdir/lua/lpdflib.c
    trunk/Build/source/texk/web2c/luatexdir/luatex.c
    trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
    trunk/Build/source/texk/web2c/luatexdir/pdf/pdfgen.c
    trunk/Build/source/texk/web2c/luatexdir/pdf/pdftables.h
    trunk/Build/source/texk/web2c/luatexdir/pdf/pdftypes.h
    trunk/Build/source/texk/web2c/luatexdir/tex/textoken.c
    trunk/Master/texmf-dist/doc/luatex/base/luatex-backend.tex
    trunk/Master/texmf-dist/doc/luatex/base/luatex-fonts.tex
    trunk/Master/texmf-dist/doc/luatex/base/luatex-modifications.tex
    trunk/Master/texmf-dist/doc/luatex/base/luatex-nodes.tex
    trunk/Master/texmf-dist/doc/luatex/base/luatex.pdf
    trunk/Master/texmf-dist/doc/luatex/base/luatex.tex

Modified: trunk/Build/source/texk/web2c/luatexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/ChangeLog	2023-01-17 21:08:34 UTC (rev 65573)
+++ trunk/Build/source/texk/web2c/luatexdir/ChangeLog	2023-01-17 22:11:05 UTC (rev 65574)
@@ -1,5 +1,9 @@
+2023-01-17  Luigi Scarso <luigi.scarso at gmail.com> 
+    * \pdfvariable omitmediabox 1 (H.Hagen)
+    * luatex 1.16.0
+
 2022-12-05  Luigi Scarso <luigi.scarso at gmail.com> 
-    * complementaty patch for revision 7551 (lua end compatibility) (H.Hagen)
+    * complementary patch for revision 7551 (lua end compatibility) (H.Hagen)
 
 2022-12-03  Luigi Scarso <luigi.scarso at gmail.com> 
     * Track last node in ligature handling (M.Krüger)

Modified: trunk/Build/source/texk/web2c/luatexdir/lua/lpdflib.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/lua/lpdflib.c	2023-01-17 21:08:34 UTC (rev 65573)
+++ trunk/Build/source/texk/web2c/luatexdir/lua/lpdflib.c	2023-01-17 22:11:05 UTC (rev 65574)
@@ -820,6 +820,12 @@
     return 1 ;
 }
 
+static int getpdfomitmediabox(lua_State * L)
+{
+    lua_pushinteger(L, (pdf_omit_mediabox));
+    return 1 ;
+}
+
 static int setpdfgentounicode(lua_State * L)
 {
     if (lua_type(L, 1) == LUA_TNUMBER) {
@@ -852,6 +858,14 @@
     return 0 ;
 }
 
+static int setpdfomitmediabox(lua_State * L)
+{
+    if (lua_type(L, 1) == LUA_TNUMBER) {
+        set_pdf_omit_mediabox(lua_tointeger(L, 1));
+    }
+    return 0 ;
+}
+
 /* for tracing purposes when no pages are flushed */
 
 static int setforcefile(lua_State * L)
@@ -1365,6 +1379,7 @@
     { "getomitcidset", getpdfomitcidset },
     { "getomitcharset", getpdfomitcharset },
     { "getomitinfo", getpdfomitinfodict },
+    { "getomitmediabox", getpdfomitmediabox },
     { "setinclusionerrorlevel", setpdfinclusionerrorlevel },
     { "setignoreunknownimages", setpdfignoreunknownimages },
     { "setgentounicode", setpdfgentounicode },
@@ -1371,6 +1386,7 @@
     { "setomitcidset", setpdfomitcidset },
     { "setomitcharset", setpdfomitcharset },
     { "setomitinfo", setpdfomitinfodict },
+    { "setomitmediabox", setpdfomitmediabox },
     { "setforcefile", setforcefile },
     { "mapfile", l_mapfile },
     { "mapline", l_mapline },

Modified: trunk/Build/source/texk/web2c/luatexdir/luatex.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/luatex.c	2023-01-17 21:08:34 UTC (rev 65573)
+++ trunk/Build/source/texk/web2c/luatexdir/luatex.c	2023-01-17 22:11:05 UTC (rev 65574)
@@ -32,9 +32,9 @@
     stick to "0" upto "9" so users can expect a number represented as string.
 */
 
-int luatex_version = 115;
-int luatex_revision = '1';
-const char *luatex_version_string = "1.15.1";
+int luatex_version = 116;
+int luatex_revision = '0';
+const char *luatex_version_string = "1.16.0";
 const char *engine_name = my_name;
 
 #include <kpathsea/c-ctype.h>

Modified: trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h	2023-01-17 21:08:34 UTC (rev 65573)
+++ trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h	2023-01-17 22:11:05 UTC (rev 65574)
@@ -1,4 +1,4 @@
 #ifndef luatex_svn_revision_h
 #define luatex_svn_revision_h
-#define luatex_svn_revision 7553
+#define luatex_svn_revision 7556
 #endif

Modified: trunk/Build/source/texk/web2c/luatexdir/pdf/pdfgen.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/pdf/pdfgen.c	2023-01-17 21:08:34 UTC (rev 65573)
+++ trunk/Build/source/texk/web2c/luatexdir/pdf/pdfgen.c	2023-01-17 22:11:05 UTC (rev 65574)
@@ -1801,13 +1801,16 @@
         pdf_dict_add_name(pdf, "Type", "Page");
         pdf_dict_add_ref(pdf, "Contents", pdf->last_stream);
         pdf_dict_add_ref(pdf, "Resources", res_p->last_resources);
-        pdf_add_name(pdf, "MediaBox");
-        pdf_begin_array(pdf);
-        pdf_add_int(pdf, 0);
-        pdf_add_int(pdf, 0);
-        pdf_add_bp(pdf, pdf->page_size.h);
-        pdf_add_bp(pdf, pdf->page_size.v);
-        pdf_end_array(pdf);
+        pdf->omit_mediabox = pdf_omit_mediabox;
+        if (! pdf->omit_mediabox) {
+            pdf_add_name(pdf, "MediaBox");
+            pdf_begin_array(pdf);
+            pdf_add_int(pdf, 0);
+            pdf_add_int(pdf, 0);
+            pdf_add_bp(pdf, pdf->page_size.h);
+            pdf_add_bp(pdf, pdf->page_size.v);
+            pdf_end_array(pdf);
+        }
         page_attributes = pdf_page_attr ;
         if (page_attributes != null)
             pdf_print_toks(pdf, page_attributes);
@@ -2251,6 +2254,10 @@
             }
         } else {
             if (pdf->draftmode == 0) {
+                pdf->gen_tounicode = pdf_gen_tounicode;
+                pdf->omit_cidset = pdf_omit_cidset;
+                pdf->omit_charset = pdf_omit_charset;
+                pdf->omit_infodict = pdf_omit_infodict;
                 /*tex We make sure that the output file name has been already created. */
                 pdf_flush(pdf);
                 /*tex Flush page 0 objects from JBIG2 images, if any. */
@@ -2264,13 +2271,6 @@
                     check_nonexisting_structure_destinations(pdf);
                 }
                 /*tex
-                    Output fonts definition.
-                */
-                pdf->gen_tounicode = pdf_gen_tounicode;
-                pdf->omit_cidset = pdf_omit_cidset;
-                pdf->omit_charset = pdf_omit_charset;
-                pdf->omit_infodict = pdf_omit_infodict;
-                /*tex
                     The first pass over the list will flag the slots that are
                     used so that we can do a preroll for type 3 fonts.
                 */

Modified: trunk/Build/source/texk/web2c/luatexdir/pdf/pdftables.h
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/pdf/pdftables.h	2023-01-17 21:08:34 UTC (rev 65573)
+++ trunk/Build/source/texk/web2c/luatexdir/pdf/pdftables.h	2023-01-17 22:11:05 UTC (rev 65574)
@@ -142,6 +142,7 @@
     c_pdf_recompress,
     c_pdf_omit_charset,
     c_pdf_omit_infodict,
+    c_pdf_omit_mediabox,
 } pdf_backend_counters ;
 
 typedef enum {
@@ -192,6 +193,7 @@
 #  define pdf_omit_cidset               get_tex_extension_count_register(c_pdf_omit_cidset)
 #  define pdf_omit_charset              get_tex_extension_count_register(c_pdf_omit_charset)
 #  define pdf_omit_infodict             get_tex_extension_count_register(c_pdf_omit_infodict)
+#  define pdf_omit_mediabox             get_tex_extension_count_register(c_pdf_omit_mediabox)
 #  define pdf_recompress                get_tex_extension_count_register(c_pdf_recompress)
 
 #  define pdf_h_origin                  get_tex_extension_dimen_register(d_pdf_h_origin)
@@ -216,6 +218,7 @@
 #  define set_pdf_omit_cidset(i)        set_tex_extension_count_register(c_pdf_omit_cidset,i)
 #  define set_pdf_omit_charset(i)       set_tex_extension_count_register(c_pdf_omit_charset,i)
 #  define set_pdf_omit_infodict(i)      set_tex_extension_count_register(c_pdf_omit_infodict,i)
+#  define set_pdf_omit_mediabox(i)      set_tex_extension_count_register(c_pdf_omit_mediabox,i)
 #  define set_pdf_gen_tounicode(i)      set_tex_extension_count_register(c_pdf_gen_tounicode,i)
 #  define set_pdf_recompress(i)         set_tex_extension_count_register(c_pdf_recompress,i)
 

Modified: trunk/Build/source/texk/web2c/luatexdir/pdf/pdftypes.h
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/pdf/pdftypes.h	2023-01-17 21:08:34 UTC (rev 65573)
+++ trunk/Build/source/texk/web2c/luatexdir/pdf/pdftypes.h	2023-01-17 22:11:05 UTC (rev 65574)
@@ -296,6 +296,7 @@
     int omit_cidset;
     int omit_charset;
     int omit_infodict;
+    int omit_mediabox; 
     int inclusion_copy_font;
     int major_version;          /* fixed major part of the PDF version */
     int minor_version;          /* fixed minor part of the PDF version */

Modified: trunk/Build/source/texk/web2c/luatexdir/tex/textoken.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/tex/textoken.c	2023-01-17 21:08:34 UTC (rev 65573)
+++ trunk/Build/source/texk/web2c/luatexdir/tex/textoken.c	2023-01-17 22:11:05 UTC (rev 65574)
@@ -2621,6 +2621,7 @@
     else if (scan_keyword("omitcidset"))           { do_variable_backend_int(c_pdf_omit_cidset); }
     else if (scan_keyword("omitcharset"))          { do_variable_backend_int(c_pdf_omit_charset); }
     else if (scan_keyword("omitinfodict"))         { do_variable_backend_int(c_pdf_omit_infodict); }
+    else if (scan_keyword("omitmediabox"))         { do_variable_backend_int(c_pdf_omit_mediabox); }
     else if (scan_keyword("recompress"))           { do_variable_backend_int(c_pdf_recompress); }
 
     else if (scan_keyword("horigin"))              { do_variable_backend_dimen(d_pdf_h_origin); }

Modified: trunk/Master/texmf-dist/doc/luatex/base/luatex-backend.tex
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/base/luatex-backend.tex	2023-01-17 21:08:34 UTC (rev 65573)
+++ trunk/Master/texmf-dist/doc/luatex/base/luatex-backend.tex	2023-01-17 22:11:05 UTC (rev 65574)
@@ -125,7 +125,7 @@
 \stopsubsection
 
 \startsubsection[title={\type {[set|get]suppressoptionalinfo}, \type {[set|get]trailerid},
-\type {[set|get]omitcidset} and \type {[set|get]omitinfodict}}]
+\type {[set|get]omitcidset}, \type {[set|get]omitinfodict} and \type {[set|get]omitmediabox}}]
 
 \topicindex{\PDF+options}
 \topicindex{\PDF+trailer}
@@ -135,6 +135,7 @@
 \libindex{getomitcidset}           \libindex{setomitcidset}
 \libindex{getomitcharset}          \libindex{setomitcharset}
 \libindex{getomitinfodict}         \libindex{setomitinfodict}
+\libindex{getomitmediabox}         \libindex{setomitmediabox}
 
 The optional info bitset (a number) determines what kind of info gets flushed.
 By default we flush all. See \in {section} [sec:pdfextensions] for more details.
@@ -146,6 +147,9 @@
 \type {CIDSet} and \type {CharSet} entries, which can be handy when aiming at
 some of the many \PDF\ substandards.
 
+When it is omitted, one should provide the \type {MediaBox} via the page attribute
+options, because it is a mandate field. No checking is done.
+
 \stopsubsection
 
 \startsubsection[title={\type {[set|get][obj|]compresslevel} and \type {[set|get]recompress}}]

Modified: trunk/Master/texmf-dist/doc/luatex/base/luatex-fonts.tex
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/base/luatex-fonts.tex	2023-01-17 21:08:34 UTC (rev 65573)
+++ trunk/Master/texmf-dist/doc/luatex/base/luatex-fonts.tex	2023-01-17 22:11:05 UTC (rev 65574)
@@ -728,10 +728,10 @@
 
 Note that at the moment, each access to the \type {font.fonts} or call to \type
 {font.getfont} creates a \LUA\ table for the whole font unless you cached it.
-If you want a copy of the internal data you can use \type {font.copyfont}:
+If you want a copy of the internal data you can use \type {font.getcopy}:
 
 \startfunctioncall
-<table> f = font.copyfont(<number> n)
+<table> f = font.getcopy(<number> n)
 \stopfunctioncall
 
 This one will return a table of the parameters as known to \TEX. These can be
@@ -788,7 +788,7 @@
 some properties are best left unchanged this is limited to adding characters.
 
 \startfunctioncall
-font.addcharacters(<number n>, <table> f)
+font.addcharacters(<number> n, <table> f)
 \stopfunctioncall
 
 The table passed can have the fields \type {characters} which is a (sub)table

Modified: trunk/Master/texmf-dist/doc/luatex/base/luatex-modifications.tex
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/base/luatex-modifications.tex	2023-01-17 21:08:34 UTC (rev 65573)
+++ trunk/Master/texmf-dist/doc/luatex/base/luatex-modifications.tex	2023-01-17 22:11:05 UTC (rev 65574)
@@ -667,6 +667,7 @@
 \edef\pdfomitcidset               {\pdfvariable omitcidset}
 \edef\pdfomitcharset              {\pdfvariable omitcharset}
 \edef\pdfomitinfodict             {\pdfvariable omitinfodict}
+\edef\pdfomitmediabox             {\pdfvariable omitmediabox}
 \edef\pdfpagebox                  {\pdfvariable pagebox}
 \edef\pdfminorversion             {\pdfvariable minorversion}
 \edef\pdfuniqueresname            {\pdfvariable uniqueresname}
@@ -917,6 +918,7 @@
 \pdfomitcidset            0
 \pdfomitcharset           0
 \pdfomitinfodict          0
+\pdfomitmediabox          0
 \pdfpagebox               0
 \pdfminorversion          4
 \pdfuniqueresname         0

Modified: trunk/Master/texmf-dist/doc/luatex/base/luatex-nodes.tex
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/base/luatex-nodes.tex	2023-01-17 21:08:34 UTC (rev 65573)
+++ trunk/Master/texmf-dist/doc/luatex/base/luatex-nodes.tex	2023-01-17 22:11:05 UTC (rev 65574)
@@ -1248,7 +1248,7 @@
 \libindex {type}
 \libindex {subtype}
 
-In the argument is a number, then the next function converts an internal numeric
+If the argument is a number, then the next function converts an internal numeric
 representation to an external string representation. Otherwise, it will return
 the string \type {node} if the object represents a node, and \type {nil}
 otherwise.

Modified: trunk/Master/texmf-dist/doc/luatex/base/luatex.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/luatex/base/luatex.tex
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/base/luatex.tex	2023-01-17 21:08:34 UTC (rev 65573)
+++ trunk/Master/texmf-dist/doc/luatex/base/luatex.tex	2023-01-17 22:11:05 UTC (rev 65574)
@@ -73,7 +73,7 @@
 \startdocument
   [manual=Lua\TeX,
    status=stable,
-   version=1.15]
+   version=1.16]
 
 \startnotmode[*export]
     \component luatex-titlepage



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