[luatex] A small erratum in the manual

Takuto ASAKURA tkt.asakura at gmail.com
Sun Dec 22 15:17:23 CET 2019

Hello again,

I found several additional errata in the section for the pdfe library.
I am happy if you would use this report to improve the document.

* Section 13.2.5

There is an explanation:

> Another convenience command gives you the (bounding) box of a (normally page) which can be inheritted from the document itself. An example of a valid box name is MediaBox.
> 	pages = pdfe.getbox(<pdfe document>, boxname)

However, when I gave a <pdfe document> as the first argument, I got:

	warning  (pdfe lib): lua <pdfe dictionary> expected

The MWE for LuaTeX, Version 1.10.0 was:

	local luatex_manual = kpse.var_value('TEXMFDIST') .. '/doc/luatex/base/luatex.pdf'
	local doc = pdfe.open(luatex_manual)

	local pages = pdfe.getbox(doc, 'MediaBox')
	print('pages', pages)

The output for the above was:

	warning  (pdfe lib): lua <pdfe dictionary> expected
	pages	nil

It seems the first argument for pdfe.getbox() is required to be <pdfe dictionary>, not <pdfe document>. If this is true, the two sentences need to be rewritten.

On the other hand, the same paragraph says

> The first argument is to be a page dictionary.
> 	<pdfe dictionary> = pdfe.getpage(<pdfe dictionary>, pagenumber)

but I could give a <pdfe document> for the first argument of pdfe.getpage().

* Section 13.2.8

This section explains about openstream(), closestream(), readfromstream(), and readwholestream(). Thus, the title might not be "[open|close|readfrom][whole|]stream" but "[open|close|readfrom|whole]stream"

* Section 13.2.9

in the Table: TYPE 3: MEANING might not be "boolean" but "integer".

* Section 13.2.11

There is a line:

	<pdfe dictionary|array|stream> = getfromreference(<pdfe reference>)

However, this fucntion actually returns multiple values and the first returned value is not <pdfe dictionary|array|stream>. It should be fixed to something like:

	type, <pdfe dictionary|array|stream>, detail = getfromreference(<pdfe reference>)

Best regards,

> On 2019/12/18, at 23:32, luigi scarso <luigi.scarso at gmail.com> wrote:
> On Wed, Dec 18, 2019 at 2:41 PM Takuto ASAKURA <tkt.asakura at gmail.com> wrote:
> Dear The LuaTeX Team,
> in the latest "LuaTeX Reference Manual" (November 2019, Version 1.11),
> at Section 13.2.3 (page 258) it has lines:
>         n = getnofpages(<pdfe document>)
>         bytes, waste = getnofpages(<pdfe document>)
> I guess the second line in the above is actually explaining the function
> `getmemoryusage()`, not `getnofpages()`.
> Many thanks you for the report,  we will check asap.
> --
> luigi

More information about the luatex mailing list