global status
This library contains a number of run-time configuration items that you may find useful in message
reporting, as well as an iterator function that gets all of the names and values as a table.
😱 Types incomplete or incorrect? 🙏 Please contribute!
methods
status.list
function status.list() -> StatusInfo {
output_active = boolean,
best_page_break = Node,
filename = string,
inputid = integer,
linenumber = integer,
lasterrorstring = string,
lastluaerrorstring = string,
lastwarningtag = string,
lastwarningstring = string,
lasterrorcontext = string,
pdf_gone = integer,
pdf_ptr = integer,
...(+65)
}
The keys in the table are the known items, the value is the current value. Almost
all of the values in status are fetched through a metatable at run-time
whenever they are accessed, so you cannot use pairs on status,
but you can use pairs on info, of course. If you do not
need the full list, you can also ask for a single item by using its name as an
index into status.
Example:
\catcode`_=12
\directlua{
info = status.list()
for key, value in pairs(info) do
tex.print('"' .. key .. '": '.. tostring(value), '\string\\par')
end
}
Reference:
- Corresponding C source code: lstatslib.c#L476-L488
status.resetmessages
Wipe error and warning messages.
Reference:
- Corresponding C source code: lstatslib.c#L490-L501
😱 Types incomplete or incorrect? 🙏 Please contribute!
status.setexitcode
Set the exit code.
Reference:
- Corresponding C source code: lstatslib.c#L503-L506