Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • Interesting. Re. tex.runtoks: You have to make sure that at the end TEX is in a sane state and this is not always trivial. I wonder what this means in terms of a function that should accept any valid TeX. Commented Mar 26, 2020 at 1:10
  • @user19087 Well, as long as you "only" do \coreop where everything is wrapped in \vbox{...} anyway it should be safe. Commented Mar 26, 2020 at 1:16
  • Ironically I am keeping as much TeX out of Lua as possible. Otherwise I have to deal with nested runtoks for converting ex to sp at the proper font size. Also searching for how to convert 1ex to sp isn't easy. Possibly put an "x" in a vbox and measure the height, but there are probably lots of gotchas for conforming to TeX's conversion. Could be another question if I used this approach. Commented Mar 26, 2020 at 17:27
  • tex.runtoks(context.delayed.coreop(context.delayed.input("knuth"))) Commented Mar 27, 2020 at 6:34