[luatex] Library for regular expressions in lualatex

Саша Козловский k.sasha1994 at yandex.ru
Tue Jun 11 11:19:50 CEST 2019

Hello Henri.
> insert ActualText within the
> mlist_to_hlist callback
May be it's a very good idea,but how i can get text of formula. Because 
if i redefine $$ or $ or another commands,i can get text of formula,but 
how i can do it in node tree?
> You asked a similar question about that before as well, but for
> local_par instead of mlist

Thank you very mutch fore link to my question,because i couldn't found 
it,but in your example exist issue,because if in pdf document in 
paragraf more then one line,pdfliteral only inserted at the first line. 
Please,if it not difficult for you,fix this issue. here is a document 
where you can see this issue. Thank you very mutch for your help.

%\pdfextension catalog{/Lang (ru-RU)}
local local_par_counter=0
local BDC = node.new("whatsit","pdf_literal")
local EMC = node.new("whatsit","pdf_literal")
BDC.mode = 2
EMC.data = 'EMC'
EMC.mode = 2
function fields(par)
for _,c in ipairs(f) do
if c~=nil and par[c]~=nil then
f0=f0.."field "..c.." value "..tostring(par[c]).." "
return f0
function tag_local_par(parent, level)
     local head = parent.list
     while head do
texio.write_nl("type "..(node.type(head.id)~=nil and node.type(head.id) 
or "unknown"))
texio.write_nl("fields "..fields(head))
         if head.id == node.id"hlist" or head.id == node.id"vlist" then
             if head.list and head.list.id == node.id"local_par" then
                 local par_list = head.list and head.list.next -- 
local_par should always be followed by a list
BDC.data = string.format('/Span <</ActualText(paragraph %s)>> 
                 head.list = node.insert_before(head.list, head.list, 
                 par_list = node.insert_after(par_list, 
node.tail(par_list), node.copy(EMC))
elseif head.list~=nil then
             tag_local_par(head, level + 1)
         head = head.next
"..node.type(tex.box["AtBeginShipoutBox"].id)) texio.write_nl("fields 
tag_local_par(tex.box["AtBeginShipoutBox"], 0)}}%
a b c d e f g h
a $a_{n} = 0$ for some $n$, then show that either $a_{0} = 0$ or $a_{1} 
= 0$.

More information about the luatex mailing list