« first day (4221 days earlier)      last day (698 days later) » 

8:40 AM
@egreg don't you find the catcode regime in my answer so much more readable than yours? j, F, P so much less intimidating than _ and :
 
8:57 AM
@DavidCarlisle No. :-D
 
What answer is that?
 
@FaheemMitha This for the readable one: tex.stackexchange.com/a/645139/1090
 
 
3 hours later…
12:35 PM
LuaTeX - how to use token.set_macro for defining an active character token?
 
Probably not possible.
↑ said as not-the-author-of-LuaTeX.
Nevertheless it's true that many, many things cannot be done within Lua. Use runtoks or coroutine trick.
 
@UlrichDiez E.g. token.set_macro('\u{FFFF}~', ...) changes ~.
 
12:50 PM
@MarcelKrüger ??? Afaik \u{FFFF} yields {\accent 21 FFFF} ??? Is there some documentation of token.set_macro which reveals syntax completely?
 
@UlrichDiez you are talking to @MarcelKrüger not @UlrikeFischer I asume he's been reading the source code, not the documentation.
 
@DavidCarlisle Be that as it may. I did not grasp what he suggested. E.g., after \directlua{token.set_macro('\u{FFFF}x', '\string\\relax', 'global')} active x still is undefined.
 
@UlrichDiez Well, it's Lua code. If you want to use it in \directlua you have to escape it to token.set_macro('\string\u{FFFF}x', ...) of course.
@DavidCarlisle True, but it's "almost documented". The manual claims "Active characters are internally implemented as a special type of multi-letter control sequences that uses a prefix that is otherwise impossible to obtain.". U+FFFF is the "prefix that is otherwise impossible to obtain".
 
1:23 PM
@MarcelKrüger Thank you for this cexplanation.
 
 
1 hour later…
2:38 PM
@MarcelKrüger So token.create('\string\u{FFFF}x') and token.create(utf8.codepoint("x"), 13) are equivalent?
 
 
4 hours later…
6:59 PM
Good news, for once!
0
Q: fncychap does not work

henrI am trying to use \usepackage[Lenny]{fncychap} to get Lenny look on my chapter headings. However, when I try to use the package, the look does not apply to my document. Code: \documentclass[table,xcdraw,a4paper,12pt]{article} \usepackage[Lenny]{fncychap} \setcounter{tocdepth}{4}...

 
@egreg you could adjust your standard missing % answer to suggest adding a % before the\usepackage
2
 
7:28 PM
user image
4
@egreg ^^^ from today
 
@UlrikeFischer I think I've already seen that landscape… Maybe also the duck!
@DavidCarlisle Like Cato who used to say, at the end of every speech, Ceterum censeo Karthago delendam esse
 
@UlrikeFischer tonight's dinner?
 
7:46 PM
@DavidCarlisle you are like Cato: Ceterum censeo Anas esse delendam ;-)
 
@UlrikeFischer valde bona manducare
 
8:23 PM
@UlrikeFischer Looks like a nice place. Where is it?
 
@mickep Verona
 
8:45 PM
Which characters besides backslash (\), single quote (') and double quote (") need to be escaped in Lua in strings if you wish to use them as characters of the string? (I ask because I think about implementing a macro which does these things after expansion and stringification and which is to be applied on macro-arguments within \directlua.)
 
8:56 PM
@UlrichDiez can't you just call \luaescapestring ?
@UlrichDiez but just newlines, \ and one of ' or " or if the string is quote delimited, or use [[...]] delimited strings
 
@DavidCarlisle Oops - yes I can. For whatsoever obscure reason I didn't realize \luaescapestring can be used outside \directlua, too - e.g., when defining macros whose replacement-text is to be a part of a string in Lua. I don't know what I was thinking. Sorry for the noise.
@DavidCarlisle I suppose with [[...]] delimited strings you need to escape two consecutive ]. ;-)
 
9:12 PM
@UlrichDiez I don't think you can actually, you need [[ aaa]] .. "]]" .. [[ bbb]] or similar
 
9:28 PM
@DavidCarlisle Thanks for the clarification.
 

« first day (4221 days earlier)      last day (698 days later) »