
LuaTeX でリテラル文字列を印刷しようとすると、奇妙なドットが表示されます。理由を知っている人はいますか? これを回避する方法はありますか?
リテラル文字列を 1 行ずつ解析して、以下のようなものを印刷することを考えていましたが、ドットが表示される理由がわかりません。
function printLines(str)
for line in str:gmatch"[^\n]*" do
tex.sprint(line)
end
end
メイン.tex:
\documentclass{article}
\usepackage[utf8]{luainputenc}
\usepackage{t1enc}
\usepackage{luacode}
\directlua{dofile("code.lua")}
\begin{document}
\luaexec{
tex.sprint(tab)
}
\luaexec{
tex.sprint(tabBeg)
tex.sprint(tabMid)
tex.sprint(tabEnd)
}
\end{document}
コード.lua:
tab = [[
\begin{tabular}{|l|l|}
test & table \\
\end{tabular}
]]
tabBeg = [[\begin{tabular}{|l|l|}]]
tabMid = [[test & table \\]]
tabEnd = [[\end{tabular}]]