>> This appears to be the code to get the byte values into LuaTeX:
>>
>> http://wiki.luatex.org/index.php/Process_input_buffer#Latin-1
>>
>> It needs a bit more background knowledge before it can be copied and
>> pasted into texinfo.tex.
>
> Here's a file that I ran with pdftex and with luatex: both worked. If
> this looks right, the code can be moved into texinfo.tex.
It worked for me, too.
Thank you.
But, still another errors occur while making LilyPond documents.
Attached files --- macro-html.texi and macro-quotation.texi --- are minimal
examples.
By pdfTeX, both they are worked fine.
By LuaTeX, both they are failed like following:
```
$ PDFTEX=luatex texi2pdf -b macro-html.texi
[...snip...]
Runaway argument?
./macro-html.texi:34: File ended while scanning use of \doignoretext.
<inserted text>
@par
@scanmacro ...atspaces }@scantokens {#1@texinfoc }
@aftermacro
l.34 @divId{aaa}
)
! Emergency stop.
<*> ...\let~\normaltilde \input ./macro-html.texi
! ==> Fatal error occurred, no output PDF file produced!
```
```
$ PDFTEX=luatex texi2pdf -b macro-quotation.texi
[...snip...]
./macro-quotation.texi:30: This command can appear only outside of any envir
onment, not in environment @quotation.
@badenverr ...temp , not @inenvironment @thisenv }
@checkenv ...@ifx @thisenv @temp @else @badenverr
@fi
@\node #1->@checkenv {}
@donode #1 ,@finishnodeparse
l.30 @node bbb
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}])
(\end occurred inside a group at level 1)
### semi simple group (level 1) entered at line 1 (@begingroup)
### bottom level
```
\ifx\luatexversion\thisisundefined
\else
\directlua{
local utf8_char, byte, gsub = unicode.utf8.char, string.byte, string.gsub
local function convert_char (char)
return utf8_char(byte(char))
end
local function convert_line (line)
return gsub(line, ".", convert_char)
end
callback.register("process_input_buffer", convert_line)
}
\fi
\input texinfo.tex
@documentencoding UTF-8
@macro divId {ID}
@html
<div id="\ID\">
@end html
@end macro
@macro divEnd
@html
</div>
@end html
@end macro
@divId{aaa}
bbb
@divEnd
@bye
\ifx\luatexversion\thisisundefined
\else
\directlua{
local utf8_char, byte, gsub = unicode.utf8.char, string.byte, string.gsub
local function convert_char (char)
return utf8_char(byte(char))
end
local function convert_line (line)
return gsub(line, ".", convert_char)
end
callback.register("process_input_buffer", convert_line)
}
\fi
\input texinfo.tex
@documentencoding UTF-8
@macro aaa
@quotation
aaa
@end quotation
@end macro
@aaa
@node bbb
bbb
@bye