@Skillmonlikestopanswers.xyz Well, the tokens could (and should) be chosen to exist only in that one definition, so it should be safe... But I'm not sure it's worth the risk. Especially because the number of expansion steps changes...

@PhelypeOleinik when you're doing time you only see the time taken by the whole script, and on a modern OS there is a lot which can slow down a script compared to a 1sec interval, so my best bet is per accident.

Basically, I am looking for a template that reproduce an exercise guide (i.e. a document with exercises of a programming language. It has not evaluation, only exercises and some explanations on side notes, and images)

@manooooh More serious. Pastel colors may not be shocking, comic sans was probably cool for teens in the 90s. A wild guess: a design that's smartphone like, that may be appealing and natural for teens around 16.

@JosephWright strange. I have open: FF, mutt, a few nvims, a few Python REPLs, redshift. I have no idea why your timings vary this much, mine are usually quite constant as long as there is no aperiodic heavy task eating up processor capacity while the benchmark is running.

@MarcelKrüger I'm just writing an answer to the french group regarding the soul problem. Do you think it would be possible to do the soul stuff (highlighting and underlining mostly) in lua? (with or without math ...)

@DavidCarlisle While you are updating luacolor you might also want to look at \pdfxform support. Currently only \pdfxform and not \saveboxresource is patched, so this will not have any effect with up-to-date packages using the LuaTeX names.

@DavidCarlisle Well, the alternative is to either move the code into some callback (which leads to the problem known from luaotfload-color: There is no really appropriate callback) or change all code which uses \saveboxresource. So currently patching the primitive is probably necessary, but once LaTeX has proper PDF resource handling and a standard interface abstraction a hook there could be used.

@UlrikeFischer @MarcelKrüger it occurs to me we could detect an \immediate if we wanted, something like this just using tex, but using lua you could presumably look into the preceding whatsit node and check more conclusively that it is just guard node

@DavidCarlisle That can be fixed using Lua, but I'm missing the point right now: The technique would still require \pdfxform to be expandable, but then the \immediate issue can also just be avoided by making the wrapper fully expandable such that the next fully expanded token after \immediate is the real \pdfxform.

Where ˙\pdfxform` is an abbreviation for \saveboxresource of course.

@UlrikeFischer That's intentional. To allow moving the color functionality to luacolor, the transparency settings are separated and use their own colorstack. Here the "real" colorstack is using set because there already was another color set before, while transparency is using push because the previous glyphs were not transparent.

@UlrikeFischer That can be magically fixed by making any color in the colorscheme transparent...

@MarcelKrüger yes not sure how relevant that is here but I could have used that in shellescape I think to detect \immediate\write18, perhaps.

@MarcelKrüger by making the wrapper expandable you mean do the assignments in lua? it probably doesn't matter much but while current luacolor only patches \pdfxform, if we fix that to patch \save.. then we'll be removing the immediate functionality from the primitive which seems bad (I know users can use \primitive or tex.enableprimitives to get the functionality back but...) so a patched definition that did support \immediate would be good, I think.

@MarcelKrüger if I make them transparent, they disappear, if I make them non-transparent they stay black. In this example it only work if I give the colors slightly different transparency values (FE/FF):

@StefanKottwitz I agree that the visual design is debatable, but so is the design of texwelt (while TA is very flashy, texwelt is too modest, imho). The problem is, I'm not good at designing, so I have no idea how to improve it (and am getting used to it). Luckily there are some newer users on TA who are better than I am in that regard, so we see a bit of change in site design (but no big leaps currently).

@Skillmonlikestopanswers.xyz I like a modest bright clear look. I'm talking with the askbot developer about migrating already, also to move over to a responsive layout, better on phones. Plus some improvement on the askbot css ;-)

@UlrikeFischer @MarcelKrüger I don't think there any need to rush a release but I updated luacolor in the repository to patch \saveboxresource and a few other things. If you want to test that against an updated luaotfload color setup at some point it might be good:-) I'm not sure what the planned change was that started this discussion, so that's not done yet:-)

@DavidCarlisle should I write titles with some same information? For example, to write the green bar I ask "How to draw a top rectangle for WhatsApp chat?", for white rectangles I ask "How to draw a white rectangle for WhatsApp chat?" and so on. Is it correct to ask this?

@DavidCarlisle the problem is that the behaviour of each box is different. I should have a green box on every page, and an image inside it (the "picture" of the person on WhatsApp). Also the white boxes have the time on the corner, and accept multiline text, or an image ("Example image"); also between them should have a little space, also some boxes can have a triangle on one of the top corners (meaning them start a message, look at "This is an example" and "Wow! Great")

White and light green boxes should be added whenever I want, but the dark green not. Also there is a black box on the bottom of the page with 2 buttons to change page, and so on

@manooooh looks to me as usual too: research and try, post specific challenge with code. For separate issues, post separate questions. Link to related questions, especially when it comes to the final layout or template with customizable macros.

@manooooh ask one question, then only if you get stuck later then you may need to ask another, it makes no sense to decide in advance that you need 6 questions. but surely a rectangle is trivial, you don't need to ask how to make a black rectangle surely?

@StefanKottwitz I don't think I am able to create customizable macros since there are no WhatsApp LaTeX templates, but I will give it a shot. I have created those 2 images and I think it is not so difficult, but I will have to do a research, as you mention

@manooooh TikZ uses a coordinate system that has (0,0) on the bottom left, so (1,1) is towards the top right. Also the tikzpicture will be a box with its baseline on the current baseline and its left edge on the current horizontal point. If you want to place a tikzpicture in the background, I'd recommend either using remember picture, overlay and tikzpagenodes, or placing it via packages like eso-pic.

@manooooh there is at least one question on the network discussing this (and most likely about 100).

@manooooh well not posting a complete document as a question for one thing but also that tikzpicture will be positioned where ea letter would be positioned so probably on the first line of text indented by paragraph indent., tikz has mechanisms for absolute positioning

@MarcelKrüger @UlrikeFischer I just realised I never knew \pdfxform took \immediate neither the pdftex nor luatex manuals mention this as far as I can see, of course @<Implement \.{\\immediate}@>= has code to handle it, so you are right but....

@manooooh Have you done some other experiments in the same file before? It seems like you did include something bibliography-related. The file from the example does not produce these errors. Try removing the auxiliary files.

I am having another problem: I want to change the page size from \usepackage[top=.55in,bottom=.55in,right=.015in,left=.015in,paperwidth=2.308in,paperheight=4.103in]{geometry} to \usepackage[a4paper,margin=1in,footskip=0.25in]{geometry}

`\def\@statusbar#1{ ` missing `%` and `\raggedright #1\\ \tiny \color{msggreen}. \end{varwidth} ` why setting the color at the end of the group where it does nothing?, and why `\\ ` at the end of the text? `\hspace{.1in} ` more missing `%`

@manooooh tex has written things to the log but modern operating systems buffer file writing so if you abort the process then essentially random number of lines from the end of the log output may not get written to the file.

I am using this template (kik-android.cls, now whatsapp.cls):
Showcase of beautiful typography done in TeX & friends
as a guide to write a document using pdflatex mode. Since I am on pdflatex I deleted \usepackage{fontspec} and \setmainfont{DroidSans}.
Now I want to change the dimensions of th...

@UlrikeFischer there was a question about lua on the texlive list not so long ago, basically Karl said he didn't care so long as it worked:-) Your thinking being that it's only called from tex, not as a script on the commandline?

@UlrikeFischer and more generally it really is tied to the tex half of the package. If we ever wanted a version in -dev for example it would be simpler if the lua was with the tex than in scripts. I'll change.

@UlrikeFischer do we need to ship luacolor for this to be true? + * extended the color handling to be compatible with the luacolor package

@DavidCarlisle yes, at least so that everything works (the luacolor test I added should fail without the new luacolor). But I'm not sure if we should do it before the freeze or later. Later is perhaps better, in case they are side effects for luatexja or so.