diff options
author | Luigi Scarso <luigi.scarso@gmail.com> | 2023-01-17 22:11:05 +0000 |
---|---|---|
committer | Luigi Scarso <luigi.scarso@gmail.com> | 2023-01-17 22:11:05 +0000 |
commit | 6214af86f59e8b8fb1734c1dc47a98d916b75cf3 (patch) | |
tree | 50cb103fbf5d8930b9155b2cd7657c9f132490df | |
parent | f8b1993f28ed85af42a3809ff0fd179f19ffb777 (diff) |
Sync with upstream luatex 43f4f57e5
git-svn-id: svn://tug.org/texlive/trunk@65574 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Build/source/texk/web2c/luatexdir/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/lpdflib.c | 16 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/luatex.c | 6 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/luatex_svnversion.h | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/pdf/pdfgen.c | 28 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/pdf/pdftables.h | 3 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/pdf/pdftypes.h | 1 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/textoken.c | 1 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/base/luatex-backend.tex | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/base/luatex-fonts.tex | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/base/luatex-modifications.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/base/luatex-nodes.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/base/luatex.pdf | bin | 1786441 -> 1786719 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/luatex/base/luatex.tex | 2 |
14 files changed, 56 insertions, 25 deletions
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog index bca2c97a432..91c53445205 100644 --- a/Build/source/texk/web2c/luatexdir/ChangeLog +++ b/Build/source/texk/web2c/luatexdir/ChangeLog @@ -1,5 +1,9 @@ +2023-01-17 Luigi Scarso <luigi.scarso@gmail.com> + * \pdfvariable omitmediabox 1 (H.Hagen) + * luatex 1.16.0 + 2022-12-05 Luigi Scarso <luigi.scarso@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@gmail.com> * Track last node in ligature handling (M.Krüger) diff --git a/Build/source/texk/web2c/luatexdir/lua/lpdflib.c b/Build/source/texk/web2c/luatexdir/lua/lpdflib.c index 057af5ea6f3..70fbde76bb9 100644 --- a/Build/source/texk/web2c/luatexdir/lua/lpdflib.c +++ b/Build/source/texk/web2c/luatexdir/lua/lpdflib.c @@ -820,6 +820,12 @@ static int getpdfomitinfodict(lua_State * L) 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 @@ static int setpdfomitinfodict(lua_State * L) 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,12 +1379,14 @@ static const struct luaL_Reg pdflib[] = { { "getomitcidset", getpdfomitcidset }, { "getomitcharset", getpdfomitcharset }, { "getomitinfo", getpdfomitinfodict }, + { "getomitmediabox", getpdfomitmediabox }, { "setinclusionerrorlevel", setpdfinclusionerrorlevel }, { "setignoreunknownimages", setpdfignoreunknownimages }, { "setgentounicode", setpdfgentounicode }, { "setomitcidset", setpdfomitcidset }, { "setomitcharset", setpdfomitcharset }, { "setomitinfo", setpdfomitinfodict }, + { "setomitmediabox", setpdfomitmediabox }, { "setforcefile", setforcefile }, { "mapfile", l_mapfile }, { "mapline", l_mapline }, diff --git a/Build/source/texk/web2c/luatexdir/luatex.c b/Build/source/texk/web2c/luatexdir/luatex.c index 753b8e5d3c4..14426db6a8b 100644 --- a/Build/source/texk/web2c/luatexdir/luatex.c +++ b/Build/source/texk/web2c/luatexdir/luatex.c @@ -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> diff --git a/Build/source/texk/web2c/luatexdir/luatex_svnversion.h b/Build/source/texk/web2c/luatexdir/luatex_svnversion.h index 4d376f97808..cfbc8af82ab 100644 --- a/Build/source/texk/web2c/luatexdir/luatex_svnversion.h +++ b/Build/source/texk/web2c/luatexdir/luatex_svnversion.h @@ -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 diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.c b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.c index bc9e1442046..52d771bc36b 100644 --- a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.c +++ b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.c @@ -1801,13 +1801,16 @@ void pdf_end_page(PDF pdf) 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 @@ void pdf_finish_file(PDF pdf, int fatal_error) { } } 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 @@ void pdf_finish_file(PDF pdf, int fatal_error) { 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. */ diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdftables.h b/Build/source/texk/web2c/luatexdir/pdf/pdftables.h index aa9aaef96cf..57fdec1ce9a 100644 --- a/Build/source/texk/web2c/luatexdir/pdf/pdftables.h +++ b/Build/source/texk/web2c/luatexdir/pdf/pdftables.h @@ -142,6 +142,7 @@ typedef enum { c_pdf_recompress, c_pdf_omit_charset, c_pdf_omit_infodict, + c_pdf_omit_mediabox, } pdf_backend_counters ; typedef enum { @@ -192,6 +193,7 @@ extern int pdf_cur_form; # 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 @@ extern int pdf_cur_form; # 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) diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdftypes.h b/Build/source/texk/web2c/luatexdir/pdf/pdftypes.h index 34b3322036a..f9e1d3ba347 100644 --- a/Build/source/texk/web2c/luatexdir/pdf/pdftypes.h +++ b/Build/source/texk/web2c/luatexdir/pdf/pdftypes.h @@ -296,6 +296,7 @@ typedef struct pdf_output_file_ { 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 */ diff --git a/Build/source/texk/web2c/luatexdir/tex/textoken.c b/Build/source/texk/web2c/luatexdir/tex/textoken.c index 026f7d6bf15..b6f8bbb8c7c 100644 --- a/Build/source/texk/web2c/luatexdir/tex/textoken.c +++ b/Build/source/texk/web2c/luatexdir/tex/textoken.c @@ -2621,6 +2621,7 @@ static int do_variable_pdf(halfword c) 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); } diff --git a/Master/texmf-dist/doc/luatex/base/luatex-backend.tex b/Master/texmf-dist/doc/luatex/base/luatex-backend.tex index 4c6c36bd7ba..8d4c366c35f 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-backend.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-backend.tex @@ -125,7 +125,7 @@ after the \PDFTEX\ equivalents. \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 @@ after the \PDFTEX\ equivalents. \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 @@ The cidset, charset and info flags (numbers) disables inclusion of a so called \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}}] diff --git a/Master/texmf-dist/doc/luatex/base/luatex-fonts.tex b/Master/texmf-dist/doc/luatex/base/luatex-fonts.tex index 136d20dd3b4..294b1281ff1 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-fonts.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-fonts.tex @@ -728,10 +728,10 @@ font.setfont(<number> n, <table> f) 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 @@ Within reasonable bounds you can extend a font after it has been defined. Becaus 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 diff --git a/Master/texmf-dist/doc/luatex/base/luatex-modifications.tex b/Master/texmf-dist/doc/luatex/base/luatex-modifications.tex index e3edc59f79e..d6dffe27400 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-modifications.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-modifications.tex @@ -667,6 +667,7 @@ The configuration related registers have become: \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 @@ The engine sets the following defaults. \pdfomitcidset 0 \pdfomitcharset 0 \pdfomitinfodict 0 +\pdfomitmediabox 0 \pdfpagebox 0 \pdfminorversion 4 \pdfuniqueresname 0 diff --git a/Master/texmf-dist/doc/luatex/base/luatex-nodes.tex b/Master/texmf-dist/doc/luatex/base/luatex-nodes.tex index d18006df0ce..19bc7bd7ca8 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-nodes.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-nodes.tex @@ -1248,7 +1248,7 @@ This converts a single type name to its internal numeric representation. \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. diff --git a/Master/texmf-dist/doc/luatex/base/luatex.pdf b/Master/texmf-dist/doc/luatex/base/luatex.pdf Binary files differindex 12e7b2d00c0..a64c02e0399 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex.pdf +++ b/Master/texmf-dist/doc/luatex/base/luatex.pdf diff --git a/Master/texmf-dist/doc/luatex/base/luatex.tex b/Master/texmf-dist/doc/luatex/base/luatex.tex index 9f7236b284a..1a3d684cea9 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex.tex @@ -73,7 +73,7 @@ \startdocument [manual=Lua\TeX, status=stable, - version=1.15] + version=1.16] \startnotmode[*export] \component luatex-titlepage |