View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000341 | luatex | feature request | public | 2010-03-04 16:14 | 2010-03-12 15:46 |
Reporter | patrick | Assigned To | Taco | ||
Priority | normal | Severity | feature | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Fixed in Version | 0.51.0 | ||||
Summary | 0000341: tex.sprint() with different catcodes | ||||
Description | Sometimes I would like to feed this into tex.sprint(): \begingroup\font\myfont <userinput with all kinds of characters including "\" > \endgroup That means I must make at least one character active, in this case the backslash. I would like to have a feature that assigns catcodetables (the corresponding numbers) to input. For example: (pseudo code) tex.sprint( 1 -> "\begingroup\font\myfont" , 2 -> <userinput>, 1 -> "\endgroup") where 1 would be a standard catcode table and 2 would be a "all characters are non-special" catcode table. That way I don't have to check the user input. | ||||
Tags | No tags attached. | ||||
|
Hans and I think this is better with a different function name, as sprint is overloaded already. The idea is this: tex.tprint({ctxcatcodes, "aa", "..."}, {xmlcatcodes, "..."}, ...) eol behaviour would be similar to tex.sprint (a.o.t. tex.print) |
|
The name does not matter for me. tprint is perfectly fine. Would it then make sense to have a predefined catcode table that has no active characters? Is it possible to define a catcode table (in TeX or on the lua side) that has no active character? |
|
"active" was misleading, of course. I would like to have something like: \begingroup \catcode`\^= 12 \catcode`\$= 12 \catcode`\_= 12 \catcode`\{=12 \catcode`\}=12 \catcode`\%=12 \catcode`\&=12 \catcode`\~=12 \catcode`\#=12 \catcode`\\=12 \savecatcodetable 1 \endgroup Which doesn't work (I'd guess) because of the "other \" in \endgroup. |
|
You can use -2 for a catcode table matching '\the' (everything is 12 or 10). I've added this information to the manual, where it was still missing. |
|
#3458 implements tex.tprint() |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-03-04 16:14 | patrick | New Issue | |
2010-03-04 16:59 | Taco | Note Added: 0000457 | |
2010-03-04 16:59 | Taco | Assigned To | => Taco |
2010-03-04 16:59 | Taco | Status | new => assigned |
2010-03-05 07:54 | patrick | Note Added: 0000458 | |
2010-03-05 08:58 | patrick | Note Added: 0000459 | |
2010-03-05 08:59 | patrick | Note Edited: 0000459 | |
2010-03-08 14:01 | Taco | Note Added: 0000461 | |
2010-03-08 14:38 | Taco | Note Added: 0000462 | |
2010-03-08 14:38 | Taco | Status | assigned => resolved |
2010-03-08 14:38 | Taco | Resolution | open => fixed |
2010-03-12 15:46 | Taco | Fixed in Version | => 0.51.0 |
2010-03-12 15:46 | Taco | Status | resolved => closed |