|
Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
-- This file:
-- https://anggtwu.net/LUA/TexBox1.lua.html
-- https://anggtwu.net/LUA/TexBox1.lua
-- (find-angg "LUA/TexBox1.lua")
-- Author: Eduardo Ochs <eduardoochs@gmail.com>
--
-- (find-es "luatex" "tex-without-tex")
-- (find-es "luatex" "getting-glyph-data")
-- (find-angg "LUA/dednat7load.lua")
-- (find-angg "LUA/lua50init.lua" "Repl3.lua")
-- (find-angg "LUA/Show2.lua")
-- (find-angg "LUA/Show2.lua" "edrx26")
-- (find-angg "LUA/Show2.lua" "texbody")
-- (find-angg "LUA/Show2.lua" "StringShow-tests")
-- (find-angg "LUA/Show2.lua" "texbody-tests")
-- (find-angg "LUA/Show2.lua" "Show-tests")
-- (defun e () (interactive) (find-angg "LUA/TexBox1.lua"))
-- (find-angggrep "grep --color=auto -niH --null -e show2 LUA/*.lua")
-- «.outertexbody» (to "outertexbody")
-- «.copy-and-typeset» (to "copy-and-typeset")
-- «.run-repl» (to "run-repl")
-- «.Tex-test» (to "Tex-test")
require "Show2" -- (find-angg "LUA/Show2.lua")
require "Repl3" -- (find-angg "LUA/Repl3.lua")
require "Trav1" -- (find-angg "LUA/Trav1.lua")
-- «outertexbody» (to ".outertexbody")
-- See: (find-angg "LUA/Show2.lua" "texbody")
--
outertexbody = Dang.from [=[
\documentclass{article}
\usepackage[a6paper,landscape]{geometry}
\begin{document}
\catcode`\^^J=10
\directlua{dofile "dednat7load.lua"}
\def\pu{\directlua{pu()}}
\setbox0=\hbox{abc}
\copy0
%L require "TexBox1"
%L if os.getenv("REPL3") then run_repl3_now() end
\pu
<<saysuccess>>
\end{document}
]=]
-- «copy-and-typeset» (to ".copy-and-typeset")
--[==[
* (setenv "REPL3" nil)
* (show2-use "~/LATEX/")
* (find-Deps1-cps "TexBox1")
* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
dofile "TexBox1.lua"
= outertexbody.bigstr
= outertexbody
= outertexbody:show00()
= outertexbody:show0()
= outertexbody:show()
= Show.log
* (etv)
--]==]
-- «run-repl» (to ".run-repl")
-- See: (dednat7tugslidesp 22 "repls-2")
-- (dednat7tugslidesa "repls-2")
--[==[
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd ~/LATEX/
export REPL3=yes
lualatex Show2.tex
Trav.__index._nodetype = function (tr,o) return node.type(o) end
x = Trav.from(tex.box[0])
= x
= x "mt PPV"
= x "mt .__name"
= x ".id"
= x ".id nodetype"
= x ".list"
= x ".list .id"
= x ".list .id nodetype"
= x ".list .char"
= x ".list .char char"
= x ".list .next"
= x ".list .next .id nodetype"
= x ".list .next .char"
= x ".list .next .char char"
= node.id("hlist")
= node.type(node.id("hlist"))
= tex.box[0]
= tex.box[0].id, node.id("hlist")
= tex.box[0].list
= tex.box[0].list.id, node.id("glyph")
= tex.box[0].list.char, string.byte("a")
= tex.box[0].list.next
= tex.box[0].list.next.char, string.byte("b")
--]==]
-- «Tex-test» (to ".Tex-test")
--[==[
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd ~/LATEX/
export REPL3=yes
lualatex Show2.tex
te = Tex { o="foo" }
= Tex {}
= tex.box[0]
PPP(Tex.box(0))
--]==]
-- Local Variables:
-- coding: utf-8-unix
-- End: