View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000682 | luatex | feature request | public | 2011-06-16 16:16 | 2018-02-25 17:09 |
Reporter | Taco | Assigned To | Hans Hagen | ||
Priority | normal | Severity | feature | Reproducibility | have not tried |
Status | closed | Resolution | no change required | ||
Target Version | maybe never (> v 1) | Fixed in Version | 1.10.0 | ||
Summary | 0000682: Create tex.execute() | ||||
Description | Syntax as for tex.print(), but executed immediately, and including a potential errors when used in a non-expandable context. This is mostly *needed* because coroutines will be different and less powerful in lua 5.2, but besides that it would also be very useful, in all sorts of cases. | ||||
Steps To Reproduce | it will probably be a mess and still not always ok ... one can do this already: \directlua { tex.directprinter = nil function tex.directprint(...) tex.print(...) tex.print("\\directlua{coroutine.resume(tex.directprinter)}") coroutine.yield() end function tex.directsprint(...) tex.sprint(...) tex.sprint("\\directlua{coroutine.resume(tex.directprinter)}") coroutine.yield() end function stepwise(f) tex.directprinter = coroutine.create(f) coroutine.resume(tex.directprinter) end } test \directlua { stepwise (function() tex.directprint("\\setbox0\\hbox{!!!!}") tex.directprint(tex.getbox(0).width .. "\\par") tex.directprint("\\setbox2\\hbox{????}") tex.directprint(tex.getbox(2).width .. "\\par") tex.directprint("\\copy0\\copy2\par") stepwise (function() tex.directprint("\\bgroup") tex.directprint("\\setbox0\\hbox{>>>>}") tex.directprint(tex.getbox(0).width .. "\\par") tex.directprint("\\setbox2\\hbox{<<<<}") tex.directprint(tex.getbox(2).width .. "\\par") tex.directprint("\\copy0\\copy2\par") tex.directprint("\\copy0\\copy2\par") tex.directprint("\\egroup") end) tex.directprint("\\copy0\\copy2\par") end) } test | ||||
Tags | No tags attached. | ||||
|
See also the discussion at http://tex.stackexchange.com/q/20893/5763 |
|
too complex without pproper managemt of the run (interferences) but already possible by tail calls back into lua apart from potential nesting levels overflow; made a bit more convenient with extra helper that quits input (discussed /presented at upcoming ctx meeting) |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-06-16 16:16 | Taco | New Issue | |
2012-01-15 23:34 | oneiros | Note Added: 0000919 | |
2012-08-10 15:45 | oneiros | Severity | minor => feature |
2015-11-08 16:45 | Hans Hagen | Product Version | => maybe never (> v 1) |
2015-11-08 16:45 | Hans Hagen | Steps to Reproduce Updated | |
2015-11-08 16:45 | Hans Hagen | Status | new => acknowledged |
2015-11-08 16:46 | Hans Hagen | Status | acknowledged => assigned |
2015-11-11 11:52 | Hans Hagen | Product Version | maybe never (> v 1) => |
2015-11-11 11:52 | Hans Hagen | Target Version | => maybe never (> v 1) |
2018-01-25 16:32 | Hans Hagen | Assigned To | => Hans Hagen |
2018-02-25 17:09 | Hans Hagen | Note Added: 0001686 | |
2018-02-25 17:09 | Hans Hagen | Status | assigned => closed |
2018-02-25 17:09 | Hans Hagen | Resolution | open => no change required |
2018-02-25 17:09 | Hans Hagen | Fixed in Version | => 1.10.0 |