12:00 AM
@Skillmonlikestopanswers.xyz What do you mean? Like directly typing the \if:w...\else:...\fi: block in the code?

@PhelypeOleinik no, getting rid of \exp_after:wN \if_meaning:w \exp_after:wN.
@PhelypeOleinik the current implementation is slower than using \if:w \scan_stop: \__kernel_to_str:w { #1 } \scan_stop: by almost 20% with no advantages.

@PhelypeOleinik same goes for \__tl_if_empty_if:o for which it is even stated that it is used all over the place and hence has to be fast...

@Skillmonlikestopanswers.xyz But 20%? It seemed a lot less to me..

>>> new/old
0.8347732181425487
@PhelypeOleinik 16.5 % to be less exaggerative.
@PhelypeOleinik I don't want to suggest my fast branching test from there for its instability regarding two certain tokens :)

12:14 AM
@Skillmonlikestopanswers.xyz Indeed, seems like a significative difference...
What has \expandafter ever done for us?

@PhelypeOleinik without it 99% of my packages wouldn't work.

@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 the number of expansion steps would be changing for an \if:w based test as well.

@Skillmonlikestopanswers.xyz Ah, right. \ifx doesn't expand...
My brain's not functioning well today
@Skillmonlikestopanswers.xyz Seems like it used \ifx at first, then it changed to \if (commit), and then back to \ifx again (commit)...

@PhelypeOleinik ohoh, we conclude \if being faster than \ifx, contrary to Bruno's findings.
@PhelypeOleinik tested with all the major engines, \if is consistently faster on my machine (well, and my code is 33% faster than \if).

12:27 AM
@Skillmonlikestopanswers.xyz We must be wrong ;-)
@Skillmonlikestopanswers.xyz You're showing off now ;-)

@PhelypeOleinik of course :)

@Skillmonlikestopanswers.xyz I wonder how Bruno benchmarked that... Maybe we're missing some edge case.
@Skillmonlikestopanswers.xyz But then, if it's an edge case it's not worth optimising for

@PhelypeOleinik most likely he benchmarked using time on the command line.
@PhelypeOleinik there is no edge case.
@PhelypeOleinik well \ifx is considerably faster than \if, it just so happens that \exp_after:wN is slow.

@Skillmonlikestopanswers.xyz But why would it show the opposite?

@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.

12:40 AM
@Skillmonlikestopanswers.xyz I know that, but it would be (about) the same overhead for both tests. I doubt Bruno would just run TeX once for each test
@Skillmonlikestopanswers.xyz Also note that at the time of that commit, l3benchmark was already in the repository, so he probably used that

Hello all!
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)

@PhelypeOleinik I don't know how reliable it was in 2016.

I tried to search in Overleaf: es.overleaf.com/latex/templates but the templates there do not have good designs that point to what I want
Here is what I want (obviously with other shapes, colours and fonts)
What do you suggest me to do? Should I create it myself (which I think I will spend a lot of hours), or should I download a template? Do you have useful links?
This document is for teenagers around 16 years old, so something shocking is what I need!

3 hours later…
3:32 AM
@manooooh Like this?

@JosephWright Yes, I hadn't had time to connect, but, you're right, the problem only appears in linux (fedora 31 in my case), in win10 it's all OK.

@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.
@manooooh An exercise list looking like a whatsapp conversation ;-)

4 hours later…
7:24 AM
@mickep oh no

7:37 AM
@PabloGonzálezL Can I mail you? I can explain what's happening, not sure if there is an easy fix other than 'be careful with the ordering', or perhaps adding a new variable for this particular case
@Skillmonlikestopanswers.xyz See my comment on GitHub: I don't find the speed the way round you mention

@JosephWright "the way round you mention" not sure whether I understand that correctly. Do your benchmarks propose something different?

@Skillmonlikestopanswers.xyz Testing here, the current \ifx one is very slightly faster for LuaTeX and very very close for pdfTeX to the \if one
@Skillmonlikestopanswers.xyz Bruno's argument was based i think on reading the WEB, as \ifx does more work

@JosephWright you mean less, I think?

@JosephWright that's true, that's why I state that it is generally faster. But the \exp_after:wN cascade makes it slow.

7:46 AM
@JosephWright Yes, I would love to collaborate with this "enigma" :)

@PabloGonzálezL Joseph es un pato detective. :)

@PauloCereda Sí que lo es (Yes, it is)

@PabloGonzálezL got it. :)

@JosephWright Benchmarking script:
\documentclass[]{minimal}

\usepackage{expl3}
\usepackage{l3benchmark}

\ExplSyntaxOn

\prg_new_conditional:Npnn \new_tl_if_empty:n #1 { p , TF , T , F }
{
\if:w \scan_stop: \__kernel_tl_to_str:w { #1 } \scan_stop:
\prg_return_true:
\else:
\prg_return_false:
\fi:
}
\prg_new_conditional:Npnn \new_tl_if_empty:o #1 { p , TF , T , F }
{
\if:w \scan_stop: \__kernel_tl_to_str:w \exp_after:wN { #1 } \scan_stop:
\prg_return_true:
\else:
\prg_return_false:
Results pdftex:
Old:
1.01e-6 seconds (3.18 ops)
1.01e-6 seconds (3.18 ops)
1.01e-6 seconds (3.18 ops)
New if:
8.49e-7 seconds (2.68 ops)
8.52e-7 seconds (2.69 ops)
8.54e-7 seconds (2.7 ops)
New ifx:
9.69e-7 seconds (3.06 ops)
9.6e-7 seconds (3.04 ops)
9.59e-7 seconds (3.04 ops)
Quick:
6.01e-7 seconds (1.9 ops)
5.99e-7 seconds (1.9 ops)
5.99e-7 seconds (1.89 ops)

[8/9, 20:23/20:56] update: siunitx [750k] (53414 -> 53856) ... done

7:57 AM
Results luatex:
Old:
1.18e-6 seconds (3.79 ops)
1.18e-6 seconds (3.8 ops)
1.19e-6 seconds (3.81 ops)
New if:
1.01e-6 seconds (3.25 ops)
1.01e-6 seconds (3.26 ops)
1.01e-6 seconds (3.25 ops)
New ifx:
1.14e-6 seconds (3.65 ops)
1.14e-6 seconds (3.67 ops)
1.14e-6 seconds (3.66 ops)
Quick:
6.31e-7 seconds (2.02 ops)
6.31e-7 seconds (2.03 ops)
6.31e-7 seconds (2.02 ops)
Results xetex:
Old:
1.02e-6 seconds (3.26 ops)
1.02e-6 seconds (3.25 ops)
1.02e-6 seconds (3.28 ops)
New if:
8.5e-7 seconds (2.72 ops)
8.49e-7 seconds (2.72 ops)
8.51e-7 seconds (2.72 ops)
New ifx:
9.61e-7 seconds (3.07 ops)
9.59e-7 seconds (3.06 ops)
9.62e-7 seconds (3.06 ops)
Quick:
5.93e-7 seconds (1.9 ops)
5.91e-7 seconds (1.89 ops)
5.92e-7 seconds (1.89 ops)
@JosephWright for me the \if based test is faster on every engine.

@Skillmonlikestopanswers.xyz OK, put in a PR

@JosephWright can you cross-check these findings on your machine?
@PauloCereda oh. Congrats @JosephWright, I guess :)

@PauloCereda ooh, did I misspell ooh?

8:08 AM
Old:
9.67e-7 seconds (3.43 ops)
9.1e-7 seconds (3.16 ops)
1.01e-6 seconds (3.71 ops)
New if:
1.33e-6 seconds (4.76 ops)
1.32e-6 seconds (2.87 ops)
1.46e-6 seconds (3.54 ops)
New ifx:
1.07e-6 seconds (3.25 ops)
1.88e-6 seconds (4.31 ops)
1.05e-6 seconds (1.4 ops)
Quick:
5.39e-7 seconds (1.54 ops)
5.17e-7 seconds (1.66 ops)
5.18e-7 seconds (1.8 ops)

@JosephWright your timings have a very big variance. How long was your target time?

@JosephWright and how many other processes were running while benchmarking? In my experience, if the processor load isn't constant during the benchmark you can't use the results at all.

@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.

8:20 AM
@Skillmonlikestopanswers.xyz Probably platform-dependent; I'm on Windows

@JosephWright TeX benchmarks are like air conditioners: they don't work as expected when you open Windows. :)
9

Old:
\g__benchmark_1_int=\count177
1.06e-6 seconds (3.71 ops)
1.22e-6 seconds (2.96 ops)
1.22e-6 seconds (2.35 ops)
New if:
1.04e-6 seconds (2.2 ops)
9.77e-7 seconds (3.33 ops)
9.41e-7 seconds (3.25 ops)
New ifx:
1.07e-6 seconds (3.68 ops)
1.06e-6 seconds (3.58 ops)
1.13e-6 seconds (4.09 ops)
Quick:
6.41e-7 seconds (2.29 ops)
6.59e-7 seconds (2.2 ops)
6.5e-7 seconds (2.39 ops)
@JosephWright ^^^ pdfLaTeX on Overleaf

@JosephWright Currently installing TL on my Windows machine to run the benchmarks :)

8:27 AM

@Skillmonlikestopanswers.xyz rabbit.exe

@Skillmonlikestopanswers.xyz If performance is better on Unix, and no worse on Windows, it's worth having; like i said, but in a PR
@Skillmonlikestopanswers.xyz I suspect I won't do another release before TL'19 freezes, so this will hit TL'20 for pre-testing

@JosephWright is quick ok, or should the implementation be rock-stable (so \if)?

8:45 AM
@Skillmonlikestopanswers.xyz I think it has to be the stable version

@JosephWright :) Me too.

@UlrikeFischer if the tested token list starts with \tokB or contains \tokA\tokB whatever comes after that in the tl will be executed and the true branch will be executed.
@UlrikeFischer so its robustness depend on how seldom \tokA and \tokB are used.
@UlrikeFischer but I just ran a test and noticed that it is only slightly faster than \ifx\tokA#1\tokA with \tokA seldom, which will only fail if it starts with \tokA.
Oh, and the \ifx\tokA#1\tokA test is considerably faster for long input.

9:44 AM
@JosephWright results on my Windows machine (pdflatex):
Old:
5.85e-7 seconds (3.19 ops)
5.79e-7 seconds (3.15 ops)
6.28e-7 seconds (2.59 ops)
New if:
5.36e-7 seconds (2.29 ops)
4.86e-7 seconds (2.01 ops)
5.18e-7 seconds (2.14 ops)
New ifx:
5.8e-7 seconds (2.39 ops)
5.39e-7 seconds (4.75 ops)
5.33e-7 seconds (2.97 ops)
Windows is an evil little OS, the variance is bad for me as well there :( Well, one of its problems is, that it isn't really little.
Old:
9.11e-7 seconds (4.14 ops)
9.05e-7 seconds (4.2 ops)
9.08e-7 seconds (4.22 ops)
New if:
7.6e-7 seconds (3.53 ops)
7.63e-7 seconds (3.54 ops)
7.6e-7 seconds (3.48 ops)
New ifx:
8.81e-7 seconds (4.03 ops)
8.78e-7 seconds (4.14 ops)
8.77e-7 seconds (4.07 ops)
@JosephWright lualatex on Windows
@JosephWright and xelatex on Windows:
Old:
5.86e-7 seconds (3.08 ops)
5.85e-7 seconds (3.07 ops)
5.85e-7 seconds (3.07 ops)
New if:
4.8e-7 seconds (2.55 ops)
4.86e-7 seconds (2.55 ops)
4.77e-7 seconds (2.51 ops)
New ifx:
5.56e-7 seconds (2.92 ops)
5.56e-7 seconds (2.92 ops)
5.58e-7 seconds (2.97 ops)
LOL, I reran the pdflatex test on Windows and this are the results. I can conclude that the current implementation is horrible:
Old:
6.14e-7 seconds (2.62 ops)
5.74e-7 seconds (5.74e9 ops)
6.35e-7 seconds (6.35e9 ops)
New if:
5.06e-7 seconds (2.09 ops)
5e-7 seconds (4.55 ops)
5.11e-7 seconds (4.51 ops)
New ifx:
5.39e-7 seconds (2.38 ops)
5.37e-7 seconds (2.29 ops)
5.8e-7 seconds (5.11 ops)
9 orders of magnitude!
Seems like the results for pdflatex are completely unstable on Windows for me :(

2 hours later…
11:40 AM
@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 ...)

@UlrikeFischer this has to be possible, see chickenize :)

@UlrikeFischer I once wrote something like that in tex.stackexchange.com/questions/446444/…

@UlrikeFischer iirc, this is also how ConTeXt implements underlining.

For highlighting you would probably have to move some stuff around to ensure that the line is drawn under instead of above the text, but that's easy.

@MarcelKrüger oh I miss that, that's a nice answer.

11:49 AM
@UlrikeFischer first comment still true though

@DavidCarlisle nah

@DavidCarlisle you could use it for a menu card.

May 30 '19 at 9:05, by David Carlisle
@UlrikeFischer you are mean

@MarcelKrüger this should be put in a package. Questions about highlighting and underlining are quite frequent and using soul is a pain.

@UlrikeFischer OK, I'll try to fix some remaining issues with that and prepare a package. But I'll have to finis some harf mode luaotfload stuff first.

11:52 AM
@UlrikeFischer that's why I tend to use ulem, breaks automatic hyphenation, but manual hyphenation still works with it, and it is more robust.

@MarcelKrüger no hurry. It would be only a pity not to use it.

@MarcelKrüger looking forward to the package!

@MarcelKrüger @UlrikeFischer do I gather from comments that an update to luacolor is needed soon?

@DavidCarlisle Probably I will try a bit more in the afternoon. But the change in itself is harmless, it would have only an effect if we update also luaotfload.
@DavidCarlisle I pulled the change from Marcel for testing in a local branch, I can push it if want.

@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.

12:00 PM
@UlrikeFischer ^^ :)

@MarcelKrüger really? That's bad I thought I found all the \pdf... names at the time, @UlrikeFischer we should look (or simply give @MarcelKrüger write access:-)

@DavidCarlisle ooh give him w+

@MarcelKrüger oh I see, yes it is not right as it is, is it...

@DavidCarlisle yes the code looks a bit wrong. It only redefines \pdfxform.
@DavidCarlisle should we still try to provide also the pdftex names? Or simply stick to \saveboxresource?

@UlrikeFischer I was just thinking the same thing. I think it should just use the new names and make people use luatex85.sty if they want the old ones

12:10 PM
@DavidCarlisle The problem there is that if luatex85 is loaded before luacolor, it uses the unpatched versions.
So maybe patch \pdfxform only if it is already defined?

@PauloCereda I think no one in Germany likes yodelling, that's a Bavarian and Austrian and probably Swiss thing.

@DavidCarlisle Should we get rid of some of the ifx\newattribute\@undefined stuff?

I'd get rid of most of
\TMP@EnsureCode{34}{12}% "
\TMP@EnsureCode{39}{12}% '
\TMP@EnsureCode{40}{12}% (
\TMP@EnsureCode{41}{12}% )
\TMP@EnsureCode{42}{12}% *
\TMP@EnsureCode{43}{12}% +
\TMP@EnsureCode{44}{12}% ,
\TMP@EnsureCode{45}{12}% -
\TMP@EnsureCode{46}{12}% .
\TMP@EnsureCode{47}{12}% /
\TMP@EnsureCode{58}{12}% :
\TMP@EnsureCode{60}{12}% <
\TMP@EnsureCode{62}{12}% >
\TMP@EnsureCode{91}{12}% [
\TMP@EnsureCode{93}{12}% ]
\TMP@EnsureCode{95}{12}% _ (other!)
\TMP@EnsureCode{96}{12}%
\edef\LuaCol@AtEnd{\LuaCol@AtEnd\noexpand\endinput}
as well, catcode paranoia doesn't make the packages any more readable

@DavidCarlisle ;-). Good plan.

12:18 PM
@UlrikeFischer especially as (slightly surprisingly) this claims to be latex-only, not genereric

@DavidCarlisle @UlrikeFischer Another problem with the \pdfxform/\saveboxresource code: It breaks \immediate.

@MarcelKrüger I was wondering if changing the primitive is the best plan there but I haven't followed the code closely, does it really have to patch \saveboxresource?

Luckily, the SX-chat has saved me from this enormously long message and shortened it considerably!

@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.

12:27 PM
@MarcelKrüger I think I should keep in mind in the xform code that there is perhaps a need to postprocess the box.

12:38 PM
@Skillmonlikestopanswers.xyz it hid the best bit

@DavidCarlisle clearly.

@UlrikeFischer I think it has to define \pdfxform as if we just patch the new name then people load lualatex85 they will get the unpatched version.

1:09 PM
@DavidCarlisle only if they then actually use the command. Something that is not very probable. Imho all relevant packages work without luatex85 now.

1:34 PM
@MarcelKrüger with the new lua code (with and without luacolor) the luaotfload.add_colorscheme no longer works.
@StefanKottwitz my browser complains about a missing certificate for texwelt.

@UlrikeFischer @StefanKottwitz same here.
@JosephWright, @DavidCarlisle, @UlrikeFischer the etbb font package features an uppercase ẞ in T1, just so you know that there actually is a package for which this is valid :)

1:52 PM
@DavidCarlisle Blue passport now?

@StefanKottwitz your comments are very useful to me!! That's a good idea. Do you have some template of a smartphone design?

@MarcelKrüger the changes in the color.tlg looks odd. It sets colorstack 0 and then pushes stack 1:
\pdfcolorstack 0 set {0.0706 0.204 0.337 rg}
....\pdfcolorstack 1 push {/TransGs0.471 gs}

@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

@StefanKottwitz not sure if mocking, or subtly advertising...
2

\def\zz{%
\write-1{}%
\ifnum\lastnodetype=9
\show\ProbablyNotImmediate
\else
\show\Immdiate
\fi

}

\zz

a\zz

a\immediate\zz

a \immediate\zz

\special{oops}\immediate\zz

\bye

2:07 PM
@DavidCarlisle why does it fail in the oops case?

@UlrikeFischer the \immediate means that the \write-1 inserted doesn't make a node, but in that case the preceding node is a whatsit so looks the same to \lastnodetype

@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.

@UlrikeFischer @Skillmon cert issue fixed, the (letsencrypt certbot) renewal had put it to a new folder, argh. (texwelt.de-0001 instead of texwelt.de)

@StefanKottwitz good (well, not that it didn't work, but that it works again).

2:22 PM
@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):
\documentclass{report}
\usepackage{fontspec}
\directlua{
["FF0000FE"] = {"b"},
["0000FFFF"] = {"z"},
})
}
\newfontface\colorglyphs{texgyretermes}[RawFeature={color=my_scheme}]
\newfontface\colorfont{texgyrechorus}[RawFeature={color=FF0000}]

\begin{document}

blubzzz {\colorglyphs blubzzz} {\colorfont blubzzz}

\end{document}

@DavidCarlisle Right, doing the scanning for the count in Lua. The actual \luacolorProcessBox is just lua code anyway.
@UlrikeFischer I know, a fix is on the way. Here 0000FFFF doesn't help because FF transparency is generally ignored by our color code.
@UlrikeFischer Should be fixed with the latest code.

@MarcelKrüger The actual \luacolorProcessBox is just lua code anyway. ah I hadn't noticed that. yes I see

@Skillmonlikestopanswers.xyz subtly advertising with subtly motivating to motivate the topanswers.xyz/tex designer to improve it a bit ;-) at least they changed to sans serif now
Is it pink on red? (I'm not good with seeing colors)

@StefanKottwitz font choices are user dependent, registered users can choose which font to use (and I prefer the serif one, personally)
@StefanKottwitz it's the same red as the TeX logo of TeX.SX (maybe a tad brighter)

@MarcelKrüger seems to work fine.

2:37 PM
@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).

@manooooh I did not see a smartphone-looking template. I think putting texts in tcolorboxes may help to mimic a smartphone look

@StefanKottwitz certainly! One could also place some speech-bubble-esque tails to the boxes.
@PauloCereda in the latest TeXnische Komödie (the DANTE magazine), there is an article by someone who's surname translates to "duck-man".

@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 ;-)

@PauloCereda close, his name is Entenmann.

2:42 PM
This stop sign is not convincing at all...

@PauloCereda not at all! Was just typing "That's not a German sign".

@StefanKottwitz okay, I will work on it. Thank you Stefan!
@StefanKottwitz I miss marmot seeing that picture :'(

@PauloCereda because the text is lower case?

@HaraldHanche-Olsen yes :)

2:52 PM
@PauloCereda personally, I'd stop for any red octagonal sign, no matter what it says …

@HaraldHanche-Olsen ooh a chocolate sign

@PauloCereda ?

@HaraldHanche-Olsen important signs. :)

3:08 PM
@HaraldHanche-Olsen v

@DavidCarlisle ooh

3:26 PM
@DavidCarlisle it doesn't look like picture more - to fuzzy and to colored.

2 hours later…
5:32 PM
@UlrikeFischer Do you get
  Check failed with difference files
- ./build/test-config-luatex/luacolor-test-issue43.luatex.pdf.diff
- ./build/test-config-luatex/luacolor-test-pr66-pdf.luatex.pdf.diff
- ./build/test-config-luatex/luacolor-test-pr66.luatex.diff
the last one is due to l3backend showing in the log, but I'm always wary about pdf internal diffs, but /F15 changing to /F25 is just different font loading in the format isn't it?

6:20 PM
@DavidCarlisle I can't look now - I'm out.

6:56 PM
@UlrikeFischer it's OK (I updated them)

7:36 PM
@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:-)

8:21 PM
@DavidCarlisle ok I will add @MarcelKrüger s code when I'm home (the /F25 change is normal)

@UlrikeFischer I may try the lua count grabbing so \immediate works, but probably not this evening.

@StefanKottwitz and all: to recreate a whatsapp chat like the two images below, should I ask for every shape on it (explaining what I want), or should I ask separately?

@manooooh as always post a question with some code and ask how to change it...

@DavidCarlisle thank you David :)
@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?

8:43 PM
@manooooh I can't see why you need more than one question, don't you just want to ask how to make a box with a given shape?

@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
That's why I ask if one question is sufficient or more are needed

@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
@DavidCarlisle ok, thank you! No, drawing a black rectangle is easy!

@manooooh well drawing a green one isn't any harder

8:59 PM
@DavidCarlisle I didn't mention, but look what have the black inside: two buttons and the page number. How do I put them? Its positions? What size of the left & right? etc.

@manooooh for positioning things by position, you can use picture mode or tikz or pstricks or other choices

Yes, I will use Tikz, but I am not a pro like (ex)-marmot or other amazing users. I will do a research, too
Casually, I will start trying to draw the black rectangle

@DavidCarlisle \rlap{\smash{\kern<x>\raise<y>\hbox{<contents>}}}?

9:14 PM
@Skillmonlikestopanswers.xyz \pdfliteral{ 0 0 0 0 10 10 cm}

I am not getting the rectangle on the bottom of the page but on the top with this code:
\begin{tikzpicture}
\fill[white,fill=titleColor] (0,\paperheight) rectangle (\paperwidth,\paperheight+4cm) node[midway,align=center] {Text here};
\end{tikzpicture}
What am I doing wrong?

@DavidCarlisle ohhh, even better :)
@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).

@Skillmonlikestopanswers.xyz I wanted to do it by myself...

@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

9:19 PM
@manooooh then you shouldn't ask :)

@Skillmonlikestopanswers.xyz you saw my code, it didn't work! I gave it up

@manooooh no, I saw an excerpt of your code and have no idea where you're using it how and what you want to do...

@DavidCarlisle indeed, that was the problem. Thanks for pointing it out and to Skillmon too

@DavidCarlisle That's a bit like a sign posted on the door to an office occupied by some mathematics students: “Yes, sorry, we're clopen.”

9:30 PM
@TeXnician thank you for the source! That's a good start

@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....

Whoops! "@ma" is confusing! Hahaha

@DavidCarlisle Actually it is documented for pdftex, but under \pdfrefxform:

@manooooh you should change your name, put the oooo at the front:)

@DavidCarlisle @oooomanh

9:35 PM
@MarcelKrüger I didn't read the whole manual just now, the description of \pdfxform:-)

@DavidCarlisle You didn't memorize all the engine manuals? I'm disappointed :)

Mar 26 '12 at 19:37, by David Carlisle
@Canageek moral of the story: never read the documentation, bad things happen

@TeXnician that answer requires XeTeX or LuaTeX, but I use pdflatex. What should I do?

@manooooh Replace the font code with something pdfLaTeX can use.

@manooooh just look at the code it doesn't require luatex other than \usepackage{fontspec} which is just for the unrelated font choices
@MarcelKrüger thanks for the PR:-)

9:41 PM
@DavidCarlisle the kik-android requires \setmainfont{DroidSans}, which it seems to be part of the fontspec, so I deleted that line
I deleted \usepackage{fontspec} and \setmainfont{DroidSans} but now it produces "Undefined control sequence \bbl@beforestart"

@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.

@TeXnician that solved the problem. Thanks!

Today I opened TeX.SX in a different browser, and just realised how very ugly this site became in 2018. I'm so glad that our user-scripts exist.

@Skillmonlikestopanswers.xyz yes I had that problem too. I opened it in chrome the other day: three columns and there was a strange "ask a question" button that I don't normally see. Horrible.

@DavidCarlisle I'm glad you're still well after that shock!
@DavidCarlisle topanswers isn't .org, and yes, it is flashy. But not this ugly.

9:57 PM
@Skillmonlikestopanswers.xyz well... to be honest it runs close

Can someone explain me how are \x1, \x2, \y1 and \y2 defined on kik-android, please?: tex.stackexchange.com/questions/1319/…

10:21 PM
@manooooh Section 14.15 The let operation in the manual. Basically \xN and \yN correspond to the x- and y-coordinates of the point pN defined by for example let \p1 = (current page.north east) in

@TorbjørnT. good to know. Thank you!
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}
When I replace, the dimensions explode. I have some errors
Underfull \hbox (badness 10000) in paragraph at lines 9--17
! Dimension too large.
Full code (whatsapp.cls):
% whatsapp.cls
% taken from https://tex.stackexchange.com/questions/1319/showcase-of-beautiful-typography-done-in-tex-friends/239511#239511
% by Brian Jacobs (fixes by Maximilian Noethe).
% April 10, 2018
%

\ProvidesClass{whatsapp}

% because I'm not actually using it for much of anything

\usepackage{varwidth}
%\usepackage{fontspec}
%\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{calc}
.tex:
\documentclass{whatsapp}

\setPartnerName{Dave Johnson}
%\setPartnerPic{Man.jpg}
\setHours{12}
\setMinutes{11}

\begin{document}
\you{Knock knock}
\me{Who's there?}
\you{Canoe}
\me{Canoe who?}
\you{Canoe help me with my homework?}
\time{Fri}{12:03 PM}
\you{...please. I'm gonna fail calculus. :-(}
\me{...}
\end{document}
The problem is on line 22 of whatsapp.cls

10:37 PM
\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 %

@DavidCarlisle I added % after \def\@statusbar#1{ and after \hspace{.1in} but those fixes did not solve the problem of the dimensions.
I have no idea why the colour and \\ , I didn't write the class

@manooooh I didn't think they would affect the dimensions, just mentioned then as you posted them here and they shouted at me:-)
@manooooh once you are posting that much code you are better asking a question

@DavidCarlisle Oh, ok. Something curious is that the errors don't appear on the log file, only on the TeXworks console output. That's strange

@manooooh I have no idea what you are doing, but if you change a tikzpicture from 2.3in to 21cm it can quite easily happen that some dimension gets too large. tikz is a bit fragile here.

@manooooh no that is not possible

10:46 PM
@UlrikeFischer I didn't touch the tikz dimensions but the geometry parameters. Do you mean that the commands current page.south west etc. abruptly changed?

@manooooh well there is a certain probability that a node called "current page" changes if you change the page dimensions.

@manooooh oddly enough an A4 paper is bigger than a phone screen
@UlrikeFischer .7 ?

This is the log file:
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7200 64-bit) (preloaded format=pdflatex 2019.10.29) 22 FEB 2020 19:40
entering extended mode
**./Guia.tex
(Guia.tex
LaTeX2e <2019-10-01> patch level 1
(whatsapp.cls
Document Class: whatsapp

("C:\Users\POSITIVO\AppData\Local\Programs\MiKTeX 2.9\tex/latex/base\article.cl
s"
Document Class: article 2019/08/27 v1.4j Standard LaTeX document class
("C:\Users\POSITIVO\AppData\Local\Programs\MiKTeX 2.9\tex/latex/base\size10.clo
"
File: size10.clo 2019/08/27 v1.4j Standard LaTeX file (size option)

@manooooh oh you killed the job

And this is the console output:

10:49 PM
@manooooh so what did you respond to the ? prompt?

@DavidCarlisle yup, the page size changed a lot
@DavidCarlisle I don't know what do you mean

@manooooh the image you show ends with a ? prompt from tex asking for your instructions, how did you respond?

@DavidCarlisle I did not respond nothing. I compile the .tex and the console output show me the image

@manooooh but tex is waiting at that point for user input

Oh, what should I write then?

10:53 PM
@DavidCarlisle I suspected this ;-)

@UlrikeFischer I am not mean, I don't kill jobs.

@manooooh you could type x and then hit enter. Then tex can finish the log-file.

@manooooh h for help would be a good start

? h
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.

@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.

10:55 PM
Thanks to @UlrikeFischer for the suggestion, now the log file becomes:
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7200 64-bit) (preloaded format=pdflatex 2019.10.29) 22 FEB 2020 19:40
entering extended mode
**./Guia.tex
(Guia.tex
LaTeX2e <2019-10-01> patch level 1
(whatsapp.cls
Document Class: whatsapp

("C:\Users\POSITIVO\AppData\Local\Programs\MiKTeX 2.9\tex/latex/base\article.cl
s"
Document Class: article 2019/08/27 v1.4j Standard LaTeX document class
("C:\Users\POSITIVO\AppData\Local\Programs\MiKTeX 2.9\tex/latex/base\size10.clo
"
File: size10.clo 2019/08/27 v1.4j Standard LaTeX file (size option)

@manooooh so hit return and it will continue, hit x and it will finish up cleanly hit s and it will go into scrollmode ...
@manooooh try using A3 rather than A4

I don't know where I break the limit of 19 feet, if an a4 paper size does not have that dimension
@DavidCarlisle used \usepackage[a3paper,margin=1in,footskip=0.25in]{geometry} and same problems

@manooooh make a minimal example deleting everything not needed for that error and post a real question on the main site
@UlrikeFischer see we are gradually tricking Marcel into ho-tex :-)

@DavidCarlisle didn't you invited him already?

@UlrikeFischer not yet, just accepted the PR

11:11 PM
@DavidCarlisle yes saw it. I added also the code for the color support (and I'm now confused why it is needed as I get no failure without it ;-().
@DavidCarlisle imho luacolor.lua is in the wrong folder. It shouldn't be in scripts but in tex/latex/luacolor.

0

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...

11:34 PM
@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?

11:45 PM
@DavidCarlisle Yes, but the main point is that I have to remember to delete two folders if I want to get rid of the local install ;-)

@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.

@UlrikeFischer OK, do you mean you are delaying luaotfload as well?

@DavidCarlisle I meant mostly luaotfload, imho the luacolor changes are unproblematic.

@UlrikeFischer OK that's what I thought. I may push it out tomorrow then (after re-arranging the script)