« first day (3580 days earlier)      last day (1370 days later) » 
02:00 - 21:0021:00 - 23:00

2:28 AM
I remember seeing advice on this site not to use \begin{small}...\end{small} and use instead {\small ...}. However, I don't actually really see a reason as to why the environment variant should be avoided. True, you can't have \begin{small} ... \begin{zzz} ... \end{small} ... \end{zzz} but I don't think that is a serious limitation.
In fact, in ConTeXt it is even discouraged to use explicit statements like \small and instead use or an environment or use \definestartstop to define an appropriate environment if none exists.
 
 
4 hours later…
6:16 AM
@HenriMenke the main problem is that is hides a \par from outside environments and doesn't include one itself. Also it doesn't ignore spaces after the begin. See tex.stackexchange.com/a/258282/2388
 
6:51 AM
@UlrikeFischer Ah yes, I see. In that sense ConTeXt has a bit of an easier job with \startsomething which ignores spaces by virtue of being a control sequence.
@UlrikeFischer But in principle I could just define \def\endsmall{\par}. For the hiding \par there is some code in \end though.
$ latexdef -s @doendpe
% latex.ltx, line 6182:
\def\@doendpe{\@endpetrue
     \def\par{\@restorepar
              \clubpenalty\@clubpenalty
              \everypar{}\par\@endpefalse}\everypar
               {{\setbox\z@\lastbox}%
                \everypar{}\@endpefalse}}
@UlrikeFischer I guess that is what this does.
 
@HenriMenke ? that is for lists.
 
@UlrikeFischer Hm, yes indeed. It doesn't actually preserve \prevdepth.
 
@DavidCarlisle but Emacs isn't a tool. It's an empty toolbox, not even having a decent editor!
 
@Skillmonlikestopanswers.xyz I've used Vim (actually NeoVim) for quite some time and I still use it as my main editor, but writing LaTeX in Vim is an absolute shitshow. There are absolutely no good plugins that get anywhere close to the functionalities of literally any other LaTeX editor. In that regard Emacs with AUCTeX is vastly superior.
 
@HenriMenke stop using sane arguments in the editor wars! There are only two arguments allowed: "Emacs lacks a good editor" and "But how do you exit VIM?"
 
7:04 AM
@Skillmonlikestopanswers.xyz Oh, right... ehm, Emacs is horribly bloated! Who can afford it using 8 MB of RAM?
 
@HenriMenke thanks :)
 
7:29 AM
quack
ooh archeology fish
> Cacoëthes (noun): An irresistible urge to do something stupid.
ooh the more you know
 
8:23 AM
@PhelypeOleinik don't you like \let\protect\show\textbf ?
 
@DavidCarlisle quack
 
@PauloCereda ....
 
@PauloCereda \let\protect\show\breakfeast ?
 
@DavidCarlisle uh-oh
@UlrikeFischer oh no
 
@UlrikeFischer you have robust breakfast?
 
8:40 AM
@DavidCarlisle wouldn't you unpack first?
 
uh-oh
 
8:54 AM
some phishing mailers are dumb. There one get mails, from a german address, in good german, with nice details like quite official looking references to some laws articles and then they write the date as 08.17.2020 ;-)
 
@UlrikeFischer ooh spam
 
@UlrikeFischer we don't have 17 months?
 
@HenriMenke That's the more-XML like business, I guess: there are advantages (we were talking about the distinction between commands and environments on the LaTeX team list recently!)
@HenriMenke I think partly as they have different semantics: \small was written to work as a command not an environment. Mainly an issue in that Lamport didn't neatly divide commands and environments, so we are left not being able to have \begin{frame} and \frame do different things (at least not without effort: see the beamer code)
 
9:11 AM
@JosephWright Suggest people to read beamer code? That's mean. :)
 
@PauloCereda @samcarter_is_at_topanswers.xyz and I have to, why shouldn't other people ;)
@PauloCereda @HenriMenke gets to read pgf, so he's already getting a good amount of the 'fun'
 
@JosephWright :)
@JosephWright the IoT can relate with this "fun" too. :)
me: why isn't this working?
normal languages: you screwed up over here
me: oh thanks

me: why isn't this working?
javascript: 😊
me: please i'm begging you
javascript: 😊
 
@PauloCereda typescript ?
 
@DavidCarlisle don't spoil the "fun" :)
 
@JosephWright Maybe only ducks can enjoy?
 
9:19 AM
@samcarter_is_at_topanswers.xyz ooh
 
9:40 AM
@PauloCereda Would you have 1 or 2 minutes to spare to help me with a super secret project?
 
@samcarter_is_at_topanswers.xyz sure, of course!
 
@PauloCereda Thanks a lot! (I'll tell you on Friday what this was for)
 
@samcarter_is_at_topanswers.xyz my pleasure. :)
 
10:13 AM
I was hoping this code would draw an arrow from the right column to the left
but it does do that at all
what am I doing wrong?
hmm.. cancel that
I will make a better example
 
add a tikzmark at the position where the arrow should point to
\documentclass{beamer}
\beamertemplatenavigationsymbolsempty
\setbeamertemplate{frametitle}[default][center]
\newcommand{\Var}[1]{\ensuremath{\textcolor{varcolor}{#1}}}
\definecolor{varcolor}{RGB}{15,122,183}
\usepackage{listings}
\lstdefinestyle{duckstyle}{%
moredelim=[is][\color{red}]{|}{|},
mathescape=true,
escapechar=@
}
\lstset{style=duckstyle}
\usepackage{tikz}
\usetikzlibrary{tikzmark,shapes.geometric}
\date{}
\begin{document}
 
page 13 of anorien.csc.warwick.ac.uk/mirrors/CTAN/graphics/pgf/contrib/… says you don't need to do that if you are using listings
the problem was the example I pasted didn't use listings :)
I am making a new one
 
@Anush Yes, with listings everything is easier:
\documentclass{beamer}
\beamertemplatenavigationsymbolsempty
\setbeamertemplate{frametitle}[default][center]
\newcommand{\Var}[1]{\ensuremath{\textcolor{varcolor}{#1}}}
\definecolor{varcolor}{RGB}{15,122,183}
\usepackage{listings}
\lstdefinestyle{duckstyle}{%
    moredelim=[is][\color{red}]{|}{|},
    mathescape=true,
    escapechar=@
}
\lstset{style=duckstyle}
\usepackage{tikz}
\usetikzlibrary{tikzmark,shapes.geometric}
\usetikzmarklibrary{listings}

\date{}
\begin{document}
\begin{frame}[fragile]{}
 
cool thanks
I was worried my tikzmark might be too old but it seems ok
 
@JosephWright Honestly, I find Till's part of the PGF quite okay to work with. I guess it's very different from beamer because that was his first bigger development. Also PGF being format independent means that there are no obscure workarounds for LaTeX internals because everything is built from scratch.
@JosephWright Christian's part of the code on the other hand is a complete nightmare. I have absolutely no idea what is going on in the externalization library.
@JosephWright The FPU code is also very hard to read.
 
10:28 AM
@HenriMenke There certainly are more comments in the pgf code; beamer is very hard to change as I've no real idea what Till was up to with a lot of it (@samcarter_is_at_topanswers.xyz). You are right that it shows that beamer was his first big project.
@HenriMenke Also helps that at least at the base pgf layer, things are reasonably-well self-contained so it's not so hard to track what they might be up to (based on re-working for l3draw)
 
@JosephWright I know the feeling. Sometimes I can't really figure out what's going on and I just have to guess. Right now I'm kind of scared to make a new release because I still have no idea whether this will break: github.com/pgf-tikz/pgf/commit/…
@JosephWright What's also a bit annoying is that at the time, Till apparently didn't know the proper rules for when spaces are ignored, so every line ends with % which is okay in most cases but sometimes TeX is looking for number and just keeps expanding.
 
argh.. one day I will get the hang of this. This still doesn't work for me for some reason bpa.st/U4PA
I really can't see how it is different from your code @samcarter_is_at_topanswers.xyz
am I doing something trivial wrong?
 
10:44 AM
@HenriMenke That's very true - I find that in beamer a lot
@HenriMenke One of the reasons for looking at l3draw, and other stuff, if I get to really check over this kind of thing - for the general graphics backends, we ported the ideas back to the 2e set up. If I spot any out-and-out bugs in pgf I'll let you know
@HenriMenke There's a sense to me that ideas got added without properly refactoring internals, so you don't get a sense of flow. Again, beamer is worse as a lot of the macros are enormous
@HenriMenke I'm lucky there: we have the L3 FPU, which is very heavily tested and I think has no major issues, plus of course Bruno is 'about' (I need to get him to finish of hyperbolics ...)
 
@Anush Two problems: the \usetikzmarklibrary{listings} is missing and you can't point the arrow to an empty line in the code
\documentclass{beamer}
\beamertemplatenavigationsymbolsempty
\setbeamertemplate{frametitle}[default][center]
\usepackage[many]{tcolorbox}
\usepackage{listings}
\lstdefinestyle{duckstyle}{%
    escapechar=@,
    basicstyle=\ttfamily,
}
\lstset{style=duckstyle}
\tcbuselibrary{skins}
\tcbset{
	arc=0pt,
	outer arc=0pt,
	colback=white,
}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
	shapes,
	tikzmark}
\usetikzlibrary{tikzmark,shapes.geometric}

\newcommand{\Proc}[1]{\textsc{#1}}
\newcommand{\Var}[1]{\ensuremath{\textcolor{varcolor}{#1}}}
 
11:10 AM
@samcarter_is_at_topanswers.xyz Thanks!
where would I add the bend command to \draw[->,overlay, dashed] (0,0) -- ([xshift=0.2cm, yshift=.25\baselineskip]pic cs:line-code-3-end); if I want it to look prettier?
I tried the obvious options but it didn't do anything
 
yo'
@PauloCereda this is so stupid that it's actually good :D
 
@yo' ooh a route :)
 
@DavidCarlisle (@HenriMenke) Just spotted pgfpict2e in the TikZ manual: Till did something along the lines of my experiments years ago :)
@DavidCarlisle I see he didn't actually replace picture or \put, rather just the actual drawing commands (so \line, etc.)
 
11:31 AM
@AlanMunn golf time? :) youtube.com/watch?v=aOoMYOQ22f0
 
@JosephWright I was going to comment yesterday that a perhaps safer thing (and what pspicture and pict2e do) is leave \put more or less as-is but do a back end drawing separately for its contents
 
11:59 AM
@DavidCarlisle Yes: it comes down to whether you want to make one 'picture' or have each element as a separate one
 
12:13 PM
@DavidCarlisle \def\ShowCommand{\let\protect\show} and call it a day :-)
 
12:39 PM
@DavidCarlisle what do you expect here to happen:
\documentclass{article}
\begin{document}
\shipout\null

blub
\end{document}

\show\x
 
1:01 PM
@daleif how would you emulate with memoir an a5paper with color=red,cross,a4,center crop options? (I'm trying to get an old atbegshi test working again which used some odd tricks)
 
@UlrikeFischer id expect to get two pages, one a bit sort. What actually happens?
 
@DavidCarlisle with latex-dev:
> \x=undefined.
l.8 \show\x
 
@UlrikeFischer I noticed your \show later:-)
 
@DavidCarlisle sneaky wasn't it?
 
@UlrikeFischer this seems somewhat broken
@UlrikeFischer error free document:
\documentclass{article}
\begin{document}
\shipout\null

blub
\end{document}

zzz

\end{document}

\stop
@Skillmonlikestopanswers.xyz -15 :(
 
1:19 PM
@DavidCarlisle I will open an issue (that was because I tried an old unused atbegshi test ;-()
 
@UlrikeFischer when will you learn to stop testing stuff.
 
@DavidCarlisle I didn't want to test, I only was lazy and thought I could reuse it to write the testfile Frank requested.
 
1:39 PM
\RequirePackage{kvoptions-patch}
\AddToHook{class/before/article}{\typeout{I don't work :(}}
\documentclass{article}
\begin{document}
\end{document}
@UlrikeFischer @DavidCarlisle kvoptions-patch doesn't work with hooks ^^
 
@PhelypeOleinik Probably doesn't work with lots of stuff!
 
@PhelypeOleinik god. Do we have a class/before hook?
 
@UlrikeFischer We seem to
 
@JosephWright :-)
 
@PhelypeOleinik It's not that widely used, is what I mean
 
1:42 PM
@JosephWright The class I wrote two years ago uses it (which is probably a bad sign :-)
 
@PhelypeOleinik Ah
 
@JosephWright nobody tells such things ;-). Can one use it with a wild card for arbitrary classes?
 
@PhelypeOleinik How? You have to load it before the \documentclass line for it to work ...
 
@UlrikeFischer \AddToHook{class/before}{\typeout{I appear in any class :D}}
@JosephWright I know (now)... No idea what 2018 me was doing :-)
 
@PhelypeOleinik You don't have 2005-ish you writing 'a few shortcuts'
 
1:45 PM
Jun 2 '18 at 14:01, by Harald Hanche-Olsen
@barbarabeeton LaTeX makes a great foot gun.
 
@HenriMenke (@DavidCarlisle) Meanwhile, I'm reading pgfmoduleshapes.code.tex and trying to decide the ideas belong in l3draw... as it's a bit more abstract than 'draw a line'
 
@Skillmonlikestopanswers.xyz you stole Bruno's tick from me
 
@DavidCarlisle oh, yes I did, but it's well earned :)
@DavidCarlisle I liked your loop, though.
 
@PhelypeOleinik that was only 2 years ago, it's harder knowing what a 1987 me was doing (basically doing what Joseph is doing now, and re-implementing picture back end commands:-)
 
2:02 PM
@PhelypeOleinik sounds like a reason the declare it obsolete ;-) <-- @DavidCarlisle
 
@DavidCarlisle :-)
@UlrikeFischer But then I would have to fix my class :(
 
@UlrikeFischer not understood? It it a5 on an a4 you are after or how should that info be interpreted?
 
@PhelypeOleinik hm, it not only breaks class hooks, but also packages hooks. So it is really incompatible. Unless someone wants to try to make it compatible with all the package hooks we should really declare it obsolete.
 
ohh the others are the equivalent crop options
How do you normally do that on say article?
JUst for reference
 
yes the test does `\documentclass[a5paper]{memoir}` and later `\expandafter\let\csname ver@crop.sty\endcsname\relax
\usepackage[color=red,cross,a4,center]{crop}` which looks rather odd.
@daleif but I don't need something exact, only more or less, so that I test a bit the atbegshi emulation.
 
2:12 PM
That is not how I'd make an a4paper to be trimmed down to a5.
 
@UlrikeFischer we really should look at saving the raw option lists again, so that many of the problems with expanding teh options that kvoptions-patch is trying to fix go away
 
@UlrikeFischer If there's still use for it I can make it compatible, otherwise I'm fine with marking obsolete. Or what David just said :-)
 
@PhelypeOleinik well I found in texlive three classes using it: confproc, doctools, latexdemo. So imho we would survive it if we remove it / make it inactive with a new latex.
 
@UlrikeFischer If only we had \declare@file@substitution to do that :-)
 
@PhelypeOleinik ;-). But we don't really need it, we can simply change and upload.
 
2:19 PM
@UlrikeFischer This is probably the equivalent memoir version
\documentclass[a4paper,showtrims]{memoir}
\usepackage{xcolor}
% this sets \paperwidth/height to A5
\pageav
% trim stock to a5 centered on the original A4
\setpagecc{\paperheight}{\paperwidth}{*}
\setlrmarginsandblock{2cm}{2cm}{*}
\setulmarginsandblock{2cm}{3cm}{*}
\setheadfoot{1cm}{1cm}
\checkandfixthelayout
\def\trimmarkscolor{\color{red}}
\usepackage{kantlipsum}
\begin{document}
\kant
\end{document}
Note I haven't yet send the -dev hook enabled version to CTAN (I ought to do that)
 
@DavidCarlisle July 2020: Paulo gives a talk and mentions Nintendo.
August 2020:
Nintendo announced its return to Brazilian market. :)
@samcarter_is_at_topanswers.xyz ^^ we ducks are very good at marketing :)
 
how can I align the two boxes at the top and move the right hand one to the right slightly? bpa.st/QBOQ
 
@PhelypeOleinik making the 2020 Phelype a better developer. <3
 
\documentclass{beamer}
\beamertemplatenavigationsymbolsempty
\setbeamertemplate{frametitle}[default][center]
\usepackage[many]{tcolorbox}
\usepackage{listings}
\lstdefinestyle{duckstyle}{%
    moredelim=[is][\color{red}]{|}{|},
    mathescape=true,
    escapechar=@,
    basicstyle=\ttfamily,
    columns=fullflexible
}
\lstset{style=duckstyle}
\newcommand{\ubar}[1]{\alt<+>{\underaccent{\bar}{#1}}{#1}}
\tcbuselibrary{skins}
\tcbset{
	arc=0pt,
	outer arc=0pt,
	colback=white,
}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
 
@PauloCereda Ooh <3
 
2:25 PM
Got fixed font to work!
 
@PhelypeOleinik revert this revert....? github.com/latex3/latex2e/commit/…
 
\hspace before the tcolorbox had no effect
 
@Anush spces at start of a line are always dropped, \hspace*
 
@DavidCarlisle Seems like a simple enough change. Though I'm looking at the number of packages that mess with \@onefilewithoptions, and I'm scared...
The answer to the question “What packages redefine <LaTeX internal macro>” seems to always include catoptions...
 
@PhelypeOleinik that's why we reverted.... but given that we're adding all the hook stuff this time, packages that are expecting no change there are already upset. I would probably do a simpler version though and just save the lists and not try to handle unused option checking
 
2:31 PM
@DavidCarlisle oh thanks! I see that is \vrule width 0pt \nobreak \hskip 1cm \hskip 0pt plus 0pt minus 0pt under the hood
 
@PhelypeOleinik catoptions is out of scope, context is more compatible with latex than catoptions is.
4
 
why aren't the two columns vertically aligned?
 
@DavidCarlisle I guess so. Probably better change everything in one go...
 
@Anush if you find yourself posting code more than a couple of times to chat it's probably best to not do that and post it to a question instead:-)
 
@DavidCarlisle it's not the same code :)
 
2:34 PM
@Anush exactly
 
oh I see.. you meant posting any code at all to chat
I am very grateful for all the help I have got here
 
22
A: Chat's etiquette regarding questions

David CarlisleIt's OK to ask on chat but you should not expect an answer (although you may get one anyway). The Q&A site is designed for asynchronous help, you ask a question and it stays visible and can be answered by anyone at any time that they feel convenient. If you ask in chat then although the archive...

 
very sorry for being annoying
I will restrict my question frequency on chat
 
@Anush no actually you are not being annoying, and it's far more on topic than ducks or vim, but generally here I'd only answer questions I can do by eye so the hspace one was easy (without seeing the code at all) but the alignment one would require copying and running the code which is a hint it's not really chatting but asking a question:-)
 
@DavidCarlisle oh :(
 
2:43 PM
@PauloCereda food isn't on topic so that's ducks out, and editors would be on topic but vim isn't a usable editor so that's out as well, sorry.
 
@DavidCarlisle oh
 
@PauloCereda pineapple pizza is OK though
 
@DavidCarlisle ooh and Nutella pizza too?
 
@PauloCereda they fall under the "@CarLaTeX says it's not food" rule.
 
@DavidCarlisle at least VIM is an editor, unlike Emacs, which is an OS, and OS is really out of scope.
 
2:45 PM
@DavidCarlisle I think I was spoiled by samcarter_is_at_topanswers.xyz who has very kindly been doing exactly that
 
@Anush well you see @samcarter_is_at_topanswers.xyz has to answer here as she doesn't answer questions on our Q&A site as she is at topanswers.xyz so you need a special @samcarter_is_at_topanswers.xyz exception to the don't ask questions here rule:-)
 
@DavidCarlisle ooh rules
 
@DavidCarlisle I would like to apply for that exception please!
 
@PhelypeOleinik that is now broken anyway, so we don't have to care.
 
@samcarter_is_at_topanswers.xyz Hi. Are you about by any chance?
I have attempted to ask a question on topanswers to see what happens :)
 
3:04 PM
@Anush hm, does this really compiles for you? For me the [<±>] breaks.
 
@UlrikeFischer this compiles bpa.st/YJ5A
 
@Anush then you should correct your question.
 
hmm... I didn't realise it was different
@UlrikeFischer should it be "code" or "block quote"?
 
@Anush I don't know, I have no account there.
 
and does it compile now?
@UlrikeFischer I made one minutes ago. The default is to be anonymous interestingly
 
3:12 PM
@Anush looks better.
 
great!
I do wonder what is going on... there is quite a steep learning curve for "non basic LaTeX"
 
3:24 PM
@UlrikeFischer do you answer questions on topanswers without an account?
 
@DavidCarlisle I'm very happy you learnt
 
@Anush no, sorry I'm not active there. You will have to wait for someone else.
 
@UlrikeFischer :( I was living in hope
I assume it's a trivial misunderstanding by me
 
@Anush well I assume that you forgot that you have two pages and so two sets of tikzmarks but I didn't really look.
 
interesting...
 
3:41 PM
ham
hamster
hamstest
ooh
 
4:11 PM
surely hamst is the first one
 
4:35 PM
@Anush basically it is this problem: tex.stackexchange.com/a/351374/2388
 
@UlrikeFischer shall I tell marmot? He is trying to solve it on topanswers
I wonder what the simplest and cleanest solution will be
 
cis
10vdsa
4000 times: Failed to upload image; couldn't reach imgur
What shall I do now?
 
I am regretting having asked on topanswers now and it seems like a complicated question
 
@Anush What's wrong with asking tricky questions?
@DavidCarlisle I thought I'd have a quick look over catoptions: it's over 6000 lines!
 
@JosephWright the traffic on topanswers is quite low
 
4:48 PM
@Anush Which question?
 
@Anush actually I think there is a bug somewhere. the line numbers of the listings looks wrong. the aux-file shows line number 0-3 for the first page and 3-6 for the second.
 
that definitely looks suspect
 
@Anush You can ask on TeX.SE, too, saying it was already asked on TA but the answer doesn't satisfy you. There is no problem!
 
@CarLaTeX ok cool. Just don't want to annoy anyone ! marmot says that only Andrew Stacey can solve it
 
5:02 PM
@Anush Don't worry, you don't annoy anyone unless you talk about ducks, soccer or pineapple pizza
 
:) I like the first and third!
well... I used to like the third
 
@Anush Better, lol. I'm Italian and pineapple pizza is heresy to us
 
I apologise. I think it's universal heresy unless you are under 15
 
@JosephWright don't dare to repair it ;-)
 
@Anush No need to apologise, I'm joking (even if pineapple pizza is heresy) :):):)
 
5:52 PM
@UlrikeFischer, @DavidCarlisle Seem to have upset Bruno :(
 
6:15 PM
@JosephWright some of them work
 
@Anush I'm here now. Are there any open problems left?
 
Hi! Commands like \newif should, in principle, also work in LaTeX3, right?
That means that \newif\mydoc_my_weird_bool should work and define command \ifmydoc_my_weird_bool and \mydoc_my_weird_booltrue and ...false, right?
 
@Gaussler well latex3 isn't really thing, latex3 (expl3) has its own notion of boolean that is distinct from that but you can still use \newif (best to use a token starting with if though., So I wouldn't use an expl3 style name with _ (even though it works)
 
@DavidCarlisle I know very well about the boolean machinery of expl3, but for technical reasons, I need the plain TeX syntax. But it seems that \mydoc_my_weird_booltrue throws an error
 
@Gaussler did you do \newif\mydoc_my_weird_bool as you said or ``\newif\ifmydoc_my_weird_bool` (which is what you want)
 
6:25 PM
@Gaussler \newif requires that the conditional name starts with if, so \newif\ifmydoc_my_weird_bool, but please don't :-)
 
@PhelypeOleinik the latex version doesn't actually require if (but it strips off the first two letters whatever they are so not using if makes odd names:-)
@Gaussler as i say it will work but why use an expl3 name if it isn't an expl3 construct?
 
@DavidCarlisle Details :-)
 
@Gaussler sorry but don't do this. This is really quite horrible code. If I see _bool I want to get a bool and not some arbitrary code.
 
@PhelypeOleinik I saved half a dozen bytes by re-implementing \newif at the time that mattered a lot:-)
 
It’s a very challenging, technical issue I have. I cannot see a way around using the \if... \else \fi vocabulary
 
6:30 PM
@Gaussler Also note that none of the expl3 \bool_... functions will work if you do that. Use a plain 2e name: \newif\if@my@less@weird@bool. You can then query them in expl3 with \legacy_if:n { @my@less@weird@bool } { true } { false }, if you need, or use \if@my@less@weird@bool.
 
@Gaussler yes you can use \newif but don't call it \my_thing_bool as it is unrelated to the expl3 bool module (or any expl3 module)
 
@Gaussler then use a different name for the if. Why do you want to end it with bool?
 
@DavidCarlisle I bet you used that half dozen bytes implementing picture :-)
 
@PhelypeOleinik well actually yes at Leslie's request we incorporated his bezier curves package into the kernel.....
 
@DavidCarlisle I knew it! :D
@Gaussler There probably is one (you can have endless fun/frustration with different ways to make conditional tests) that doesn't require butchering expl3 so hard. If you tell us what you need...
 
6:33 PM
@Gaussler so basically you can use \newif\if@mydoc@weird then you have \mydoc@weirdtrue available
 
It’s a very technical issue. I can try to explain it, but it’s very unlike that it will be understandable
I am the author of a package called SemanTeX, which provides keyval-based mathematics
So e.g. instead of f^{(n)}(x), you write \vf[der=\vn]{\vx}
\vf stands for “variable f”, and \vn stands for “variable n”
 
@samcarter_is_at_topanswers.xyz There was tex.stackexchange.com/questions/559301/… but it looks like it has been cracked
 
In any case, I build my own custom keyval interface
 
thanks @UlrikeFischer
 
And it can be customized by the user
In any case, you will have to use keyval syntax a lot, so therefore, I pre-process all the keys
So, you can write \vf[providebool=mybool,ifboolTF={mybool}{der=0}{der=1}]
If mybool is true, it derives 0 times, otherwise 1 time
Then imagine you define a key mykey to be equivalent to ifboolTF{mybool}{der=0}{der=1}
sorry, ifboolTF={mybool}{der=0}{der=1}
 
6:40 PM
@DavidCarlisle :)
 
Essentially, I need to convert this key into a command given by \long macro: #1 -> \long\semantex_data_bool_get:nnTF { #1 } { mybool } { \semantex_valuekey:nnn { #1 } { der } { 0 } } { \semantex_valuekey:nnn { #1 } { der } { 1 } }
This is only possible by first turning the definition into a token list containing #1’s and #2’s and then defining the macro to be given by this, using \cs_set:Npo
Here is the issue: you can do \tl_put_right:Nn \semantex_data_bool_get:nnTF { #1 } { mybool }, but you cannot do \tl_put_right:No { { \l__temporary_token_list_tl } } if \l__tempoary_token_list_tl contains #1
 
@Gaussler If you really want to pre-digest keyvals, have you looked at how xtemplate does it? That took a lot of work (the aim is to allow fast point-of-use stuff but keep keyvals as the interface, so you need to turn them into variable setting if at all possible)
 
@Anush well @samcarter_is_at_topanswers.xyz can perhaps decide if it is a beamer bug that the listings counter can not be reset, or if it is a listings problem.
 
However, you CAN do \tl_put_right:Nn\...{\else} and \tl_put_right:Nn\___{\fi}
@JosephWright I was wondering, how do expl3 and pgf do it? Do they pre-digest keys?
 
@Gaussler have you actually run timings to see how much (if any) time you save?
 
6:46 PM
@Gaussler expl3 'in general' no, \keyval_parse:nNN doesn't try to do that and l3keys doesn't at all, neither does pgf
 
yshift moves the arrow end, as in \draw[->,overlay, dashed] (pic cs:step1) to [bend right]([xshift=0.2cm, yshift=.25\baselineskip]pic cs:line-misra-6-end); How can you move the other end of the arrow?
 
@Gaussler xtemplate does, but it's based on code from the early 1990s and that may not be relevant today; ConTeXt uses keyval routinely and doesn't pre-digest (though of course it's moved a lot of code to Lua, so the performance is hard to compare)
 
@DavidCarlisle I did. When I did the initial pre-digesting of keys in version 0.3alpha of the package, individual equations ran six times faster, and whole documents ran twice faster
 
@DavidCarlisle xtemplate certainly would save a lot of time if we were using it for everything ... but it was a PITA to write and frankly I'm not sure it's worth it (nevermind the other xtemplate issues)
 
@JosephWright When using l3keys, you use #1 for the keys. Does that mean that below the hood, it actually defines a classical TeX command?
 
6:50 PM
@Gaussler What you do see, say in beamer, is quite a bit of mixing between hard-coded starting values and keyvals
 
@Gaussler yes, every key=val package does.
 
@Gaussler Of course :)
 
@JosephWright I imagined as much
:-)
 
@JosephWright yes bits of that go back to Frank and my original template code I guess (although haven't looked recently:-)
 
@Gaussler you could, in theory, define a single macro holding all the keys and definitions, but searching it would take so much time, nobody would actually want to implement it.
 
6:52 PM
Well, the ting is, in my package, you write whole math documents where 99 % is keyval, so any optimizations matter
You can see the SemanTeX manual to see what I mean
 
\keys_define:nn { mypkg } { foo .code:n = { } }
\cs_show:c { key ~ code ~ > ~ mypkg/foo }
@Gaussler ^^^
 
(worked it out)
 
@DavidCarlisle Yes: I re-wrote from scratch but used the older version; I'm not sure how much you'd recognise
@DavidCarlisle Re-write was while you were busy
 
@JosephWright yes I did look since then but it was a while back
 
@JosephWright the > a part of the gory details users shouldn't see ;-)
 
6:54 PM
Individual equations run about 50 times slower compared to raw code, which I consider not bad since siunitx (developed by Lord Joseph Wright the Great himself) is about 10 times slower than raw code, based on my tests. But Semantex requires a lot more work under the hood than siunitx
and whole documents run about 6 times slower, which isn’t bad considering the amount of keyval interface in it
 
@Gaussler But don't you mainly have keyvals in the document body then? The idea in xtemplate is that most design stuff is set-once, use-many
@Gaussler I need to finish v3: it's around 3-4 times faster depending on the use case (largely by reducing font switching, though I've pulled in every other trick I now know too)
 
\ExplSyntaxOn
\keys_define:nn { semantex }
  {
    providebool .code:n = { \bool_new:c { l__semantex_user_#1_bool } } ,
    ifboolTF .code:n = \__semantex_if_bool:nnn #1 ,
  }
\cs_new_protected:Npn \__semantex_if_bool:nnn #1 #2 #3
  {
    \bool_if:cTF { l__semantex_user_#1_bool }
      { \keys_set:nn { semantex } {#2} }
      { \keys_set:nn { semantex } {#3} }
  }

% just for the example
\keys_define:nn { semantex }
  {
    der .code:n = { \iow_term:n { Derivations~=~#1 } } ,
    boolfalse .code:n = { \bool_set_false:c { l__semantex_user_#1_bool } } ,
 
@UlrikeFischer With hindsight, perhaps I should have gone with \__keys_code_...:w, but at the time it looked like a good idea
 
@Gaussler If I understand your example (which I probably don't), I think you want something like this ↑↑↑
 
Semantex uses keyval all the time. It’s a lot of `\vf[der=\vn,res=\vU,der=7,conj]{\vx[2]}%, so LOTS of keyval interface
 
6:57 PM
@Gaussler the question is when do you pre-digest the keys if they are used mid-document?
 
@Gaussler exactly, so pre-digesting doesn't help
@DavidCarlisle What I said :)
 
@DavidCarlisle The pre-digesting helps for pre-defined keys
 
@Gaussler ?
 
You do \SetupClass\MyVar{ valuekeys={ {der}{ upper={ (#1) } } } }
then, whenever \vf belongs to class \MyVar, you can write \vf[der=3] etc
then you get f^{(n)}
 
@DavidCarlisle To be honest with xtemplate, I feel it's a waste-of-effort: the code is much harder to follow, and based on ConTeXt, I suspect the idea that performance is an issue is likely false
 
6:59 PM
Imagine you derived function 300 times in your document. Better to pre-digest the upper={ (#1) } part
And this is already being done in the current version of the package
 
@JosephWright yes well you were not watching documents take 5 minutes getting to page 1 :-)
 
I am just trying to extend it to logic keys
 
@DavidCarlisle Sure
@DavidCarlisle Frank still wants l3precomp too, I think, for LDB, but my feeling is the same
 
sorry, of course, \vf[der=3] yields f^{(3)}
 
@DavidCarlisle I see the argument of course that there's a performance hit, but I suspect once you allow for 'real world' cases where you've got local over-rides all over the place, it will be more effort than it's worth. Certainly re-writing xtemplate was an effort, and I'm not convinced by all of the interfaces one ends up with
@DavidCarlisle Of course, we know there are bigger issues with xtemplate nayway
@UlrikeFischer Logging hides this anyway, as a key has (potentially) multiple pieces of data, but that's not really important
 
7:04 PM
@JosephWright what is LDB?
 
@UlrikeFischer LaTeX DataBase
@UlrikeFischer You've never heard of the LDB? ;)
 
@UlrikeFischer CSS-for-latex-before-css-was-invented
 
@UlrikeFischer It's in l3trial
 
@Gaussler not sure I understand your comment about #1 above, I get no error for
\def\zz{}

\tl_put_right:No\zz{aaa #1bbb}

\show\zz
 
@DavidCarlisle Reminds me, must ask Frank again about Alice
 
7:05 PM
@DavidCarlisle cflbcwi sounds much more understandable.
 
@UlrikeFischer Sounds Welsh (where's cfr when you need her)
 
@JosephWright I heard she is in wonderland
 
@DavidCarlisle :)
 
@UlrikeFischer I'll have a look
 
> Out of the nearly 200 countries in the world, only 22 of them have never experienced a British invasion.
Hmmmmmmmm
 
7:11 PM
Then I’ll have to investigate the issue. In any case, if `\my_first_temp_tl` and `\my_second_temp_tl` contained `##1`s, then I got an error for `\cs_set:Npn\my_temp_cs:n#1
{
\tl_put_right:Nn\my_other_temp{\bool_if:NTF \my_bool }
\tl_put_right:No { { \my_first_temp_tl } }
\tl_put_right:No { { \my_second_temp_tl } }`
}
 
@PauloCereda could you clarify your definitions. Have we experienced or not experienced one of those?
 
@PauloCereda Sounds ... lower than I'd expect
@PauloCereda Think they've cheated: Vatican for example is questionable
 
@DavidCarlisle We never got Monty Python, Fawlty Towers, Blackadder, Jeeves and Wooster or Benny Hill...
 
@PauloCereda Perhaps we should just go for the full house
 
@JosephWright yep :)
@JosephWright ooh teh Pope
@DavidCarlisle ooh tallyho
 
7:18 PM
@PauloCereda start with the second one:-)
 
@DavidCarlisle :)
 
7:46 PM
> Microsoft 365 apps will end support for Internet Explorer 11 by the end of 2021, Microsoft announced in a company blog post this week.
 
@PauloCereda shame:-)
 
@DavidCarlisle :)
 
@DavidCarlisle I was thinking it looks like a 'complete the set' guide :)
@DavidCarlisle Declare war on them all plus catoptions? ;)
 
@JosephWright we can send missionaries to spread tabu
 
@DavidCarlisle Oh, I have a few on my hitlist (etextools ...)
 
8:03 PM
@JosephWright etex.sty. We could get @PauloCereda to recite "I've Got a Little List"
 
@DavidCarlisle We can probably do something abotu that one
 
@JosephWright I did try releasing it as a no-op but at the time it broke too much stuff but by now it could probably try harder to do nothing.
 
@DavidCarlisle Indeed
@DavidCarlisle Or we coudl disable from the kernel end
 
@JosephWright no point doing it the kernel really, I can just release it with a \PackageWarning and \endinput actually could put teh old version as a rollback dated thing so if you really must you can do \usepackage{etex}[0000/01/01]
 
@DavidCarlisle that reminds me of the *** mtpro2 problem. We could disable etex and write them that their package will break everywhere if they don't adapt it asap.
 
8:15 PM
@UlrikeFischer sounds vaguely familiar, what does it do exactly?
 
Nov 9 '19 at 17:44, by Ulrike Fischer
\documentclass{article}
%\usepackage{etex}
\usepackage{expl3}
\ExplSyntaxOn
\int_step_inline:nnnn {1}{1}{100} {\newcount\a}
\ExplSyntaxOff
\usepackage[lite]{mtpro2}
%\makeatletter
%\alloc@0\count\countdef\insc@unt\pointcount@ %from mtpro2.sty 2009/4/27 v2.3
%\makeatother
\begin{document}

\end{document}
 
@UlrikeFischer ah yes
 
@DavidCarlisle I'm loading etex in only one project, and only because mtpro2 would break without it. It is really a pain.
 
@UlrikeFischer couldn't we make that work? As far as I can see \alloc@ is just got left in but isn't actually used, can't we make it just adjust the arguments and call \e@alloc ?
 
@UlrikeFischer I can't get the dratted thing to download
 
8:25 PM
@JosephWright me neither, but there is a version on ctan.
 
\def\alloc@#1#2#3{\e@alloc#2#3{\count1#1}}
 
@UlrikeFischer Link?
 
@DavidCarlisle, @UlrikeFischer Ah: for pity's sake
 
8:32 PM
@JosephWright but David's code could work. Then I could at least get rid of etex.
 
@UlrikeFischer I think we should do that in the format, the old alloc@ just doesn't make sense, so having it there just so etex can redefine it to something that's almost as bad seems silly.
@UlrikeFischer I don't have the fonts so can't easily test, does that work?
 
@DavidCarlisle In my example I get an error:
! Undefined control sequence.
<argument> \pointcount@

l.139 \def
          \getpoints@#1.#2\getpoints@{\pointcount@#1\relax}
 
8:52 PM
@UlrikeFischer oh I must have the arguments in the wrong order, it's supposed to be defining that. I'll fix in a bit, but need to watch the news see if they have changed the rules for exam results again. (they are due out tomorrow, so they have plenty of time to devise a new system....)
 
@DavidCarlisle :)
@DavidCarlisle You want to work in a university
 
@JosephWright having a 16 year old at home is quite enough involvement, thanks (although they messed up A-level/university entrance even more than gcse's which takes some doing)
 
@DavidCarlisle Ah, yes - I tend to think we should abolish GCSEs (they are no longer school leaving exams ...)
 
@JosephWright they are 6th-form college entrance exams though
 
@DavidCarlisle don't worry. Imho we should simply tell the guy from mtpro that we will disable etex and this \alloc@ command in four weeks and everything will break ...
 
8:56 PM
@DavidCarlisle I'm from an area where sixth-forms are simply final two years of the same schools people are already at: I can see some issues would arise, but really I think it's solvable
 
@JosephWright actually that's what M plans to do as well but many switch at that stage (and even staying you have the same minimum levels)
@UlrikeFischer \def\alloc@#1#2#3#4{\e@alloc#2#3{\count1#1}#4\float@count}
 
02:00 - 21:0021:00 - 23:00

« first day (3580 days earlier)      last day (1370 days later) »