« first day (5023 days earlier)      last day (75 days later) » 

6:11 AM
@UlrichDiez I'll fix
 
2 hours later…
7:54 AM
@DavidCarlisle \fontsize{\dimexpr #1 * \fpeval{0.93/088}\relax}{#1} was working tuesday when I was updating some font packages. And then stopped working when I used a doc that loaded calc. Is there a preference on this one: \fontsize{\dim_use:N \l_tmpa_dim}{#1} or is \fontsize{\l_tmpa_dim}{#1} enough?
8:06 AM
@daleif You don't need the accessor in places TeX expects a dimen - so here I'd just use the dimen directly
@JosephWright I just got confused by the result when trying to print it out.
8:42 AM
Anyone had the situation with an expl3 sty or cls where ~ no longer printed a space, but {~} does? Not sure what I did wrong. It is inside a \parbox if that is relevant.
@daleif In expl3, ~ is a normal space - if you are somewhere TeX ignores spaces, it will be dropped, e.g. start-of-line
Hmm, something else is going on here I currently have
\_foo_get_kw:n {foo}
\nobreakspace
\_foo_get_kw:n {bar}
which leaves no space
but
\_foo_get_kw:n {foo}
\nobreakspace
a
\_foo_get_kw:n {bar}
Does. I've probably forgotten something.
9:03 AM
@daleif Need a longer example
@JosephWright I know, I'll come back ot it later. Is slowly converting a 3-4k cls file to expl3.
@daleif :)
9:52 AM
@daleif I tried the doc you posted above (with calc commented out) in texlive 2022/23/24 at overleaf and also locally and all gave same error ! Improper at' size (0.0pt), replaced by 10pt` I don't see any change in behaviour recently?
@DavidCarlisle For some reason the code did work for me on tuesday and not on wednesday? No idea why.
For some reason I'd like to auto generate macro setters from a clist of keywords/names. They setters may take an optional argument, do we then need to use something like \NewDocumentCommand{\csname set#1\endcsname}{om}{....}?
Oct 4, 2016 at 22:18, by David Carlisle
@Canageek 1st rule of tex support: never believe users when they describe what happened.
@daleif \ExpandArgs{c}\NewDocumentCommand{set#1}{om}{...]
@DavidCarlisle :)
@daleif or if you are in expl3 code \exp_args:Nc (which is the same thing)
10:22 AM
@UlrikeFischer not quite understod. I think I'll just go with \ExplSyntaxOff \input \ExplSyntaxOn for now
What exactly does this error mean: LaTeX Error: \RequirePackage or \LoadClass in Options Section? I'm playing with \DeclareKeys and \ProcessKeyOptions to be used as class options. The \RequirePackage comes after \ProcessKeyOptions as the load depends on the value of the class option.
@daleif You can't have \DeclareOption{<thing>}{\RequirePackage{...}} or similar - you have to use a switch and load after option processing
@JosephWright I haven't even used \DeclareOption, only \DeclareKeys, and as I mentioned the error comes some lines after \ProcessKeyOptions (and is actually a switch statement). Perhaps there is some interaction with still loading xkeyval (I'm switching between the two to see if the behavior is correct).
@daleif Are you trying to load a package in the code which implements a key used as an option?
@daleif Can I see the \DeclareKeys info?
@JosephWright no
@JosephWright for now all the keys does hadly anything, either .code, .if or .bool_set:N
The error message strigger is also strange, If I have this

\ProcessKeyOptions

\RequirePackage{iftex}
\providecommand\foo{}
then the error is
LaTeX Error: \RequirePackage or \LoadClass in Options
Section.

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...

l.1572 \providecommand
\foo{}
(here I have loaded iftex much earlier and not inside \DeclareKeys.
I'm thinking there is some strange interaction with xkeyval still. I'd better eat some lunch and come back to it.
10:40 AM
@daleif the error shows on the next line as RequirePackage has a trailing optional argument and latex has looked ahead for that, so it is unrelated to the \providecommand, that's why you often see \RequirePackage{iftex} \relax to keep any error message reporting that line not the next
None of the \DeclareOptionX (from xkeyval contains \RequirePackage either)
@DavidCarlisle that make sense
10:57 AM
It is interaction with xkeyval. MWE:
\begin{filecontents*}[overwrite]{foobar.cls}
\ProvidesExplClass{foobar}{2024-08-01}{v0.01}{test}

% contentes of a modified version of size11.clo
\DeclareRobustCommand\normalsize{%
   \@setfontsize\normalsize{10.5pt}{14pt}%
   \abovedisplayskip 10.5\p@ \@plus3\p@ \@minus6\p@
   \abovedisplayshortskip \z@ \@plus3\p@
   \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
   \belowdisplayskip \abovedisplayskip
   \let\@listi\@listI}
\normalsize

\DeclareKeys{
  foo .code = {}
}

\RequirePackage{xkeyval}
If I remove \DeclareOptionX then I no longer get the error on the \RequirePackage.
11:09 AM
@daleif having \DeclareOption(X) between \DeclareKeys and \ProcessKeyOptions seems a bit brave, why interleave the two mechanisms in the same class, I'd handle the options with one or the other not try to use both for the same option list.
@DavidCarlisle Yup
@DavidCarlisle because I'm converting from one to the other, not writing from scratch. In many cases it is useful to lave the old code just to double check. I think I'll just redefine \DeclareOptionX to eat its arg. I have to setup a lot of code before \ProcessKeyOption, including autogenerated class options.
@daleif no really not here. You can convert the class in stages, but handling the option list is an atomic operation (and tricky at the best of times) running the entire list through two competing option handlers will lead to pain even if you manage to find an order that avoids errors.
11:44 AM
When working with \DeclareKeys, if key foo implies also setting bar, whould that then be foo .code = { <foo code> \SetKeys{ bar = true } },
 
1 hour later…
12:46 PM
@daleif either that or .meta:n with an internal key implementing the real <foo code>.
@Skillmon internal key?
1:10 PM
@daleif an undocumented one. Something like \keys_define:nn { daleif } { foo-internal .code:n = { <foo code> }, foo .meta:n = { foo-internal={#1}, bar } } and you only document foo, not foo-internal.
1:31 PM
In LaTeX what is best practice
IF TEST faild
\ClassEror
FI
code
or (because of batchmode)
IF TEST faild
\ClassEror
ELSE
code
FI
The first one leads to cleaner code, the latter perhaps better because of batch mode
@daleif don't put large code blocks in an if-fi nested region, it's a source of future bugs... If you are worried about people scrolling past the error in batch mode, make the error fatal eg \RequireLuaTeX and similar commands in iftex.sty simply stop at that point if the test fails.
@DavidCarlisle I will probably convert most \ClassError to expl error and fatal later
@daleif use the first form then
@DavidCarlisle why not the latter? (the fatal commands)
@daleif as i say I'd always avoid having an \if...\fi covering an extended region, it's just too easy to have code using an if that goes wrong there \newif\ifoo being the classic example. less likely in expl3 code that mostly hides primitive ifs but still....
@daleif that is: compare your two versions if code is \newif\ifabc \ifabc abc\fi
2:34 PM
With regards to the implicit \ExplSyntaxOff at the end of an ExplClass, is it then save to end a class with a conditional \endinput? (I'm assuming it is). Wanted to only include the last part of the class if a certain option was active
@daleif yes \endinput looks like end of file to tex latex really can't see the difference
2:57 PM
@DavidCarlisle I was just worried that \ExprSyntaxOff was never executed, but I'm guessing that is added via hooks
3:19 PM
@daleif yes that's what I mean any code that runs at end of file rather than from a command within the file will run on \endinput as latex really can't tell the difference
3:32 PM
@DavidCarlisle any idea what I could do to pause compilation for 5 seconds in xelatex?
3:43 PM
@UlrikeFischer get it to look for a file in a large directory not indexed by fc-cache or kpathsea?
@UlrikeFischer you need 5 seconds more for xkcd.com/303 ?
3:57 PM
@samcarter I have a question about multiple compilation per shell-escape in a loop that fails sometimes and want to check if it is a timing problem.
@UlrikeFischer do you mean you want to pause, or are you asking what could have caused a pause?
@DavidCarlisle I want to pause.
@UlrikeFischer \count0=\elapsedtime \loop \ifnum \elapsedtine<\numexpr\count0+something \repeat\fi
@DavidCarlisle oh it is called \elapsedtime in xelatex?
@UlrikeFischer yes but a modern person like yourself will use the normalised expl3 name
4:05 PM
@UlrikeFischer \tex_elapsedtime:D
 
1 hour later…
5:09 PM
@JosephWright oh, a happy control sequence.
2
 
2 hours later…
6:46 PM
user image
2
@DavidCarlisle @JosephWright ^^ ooh rule Britannia
@JosephWright :D
@PauloCereda shockingly notes featuring Lula da Silva are not accepted by those machines either.
@DavidCarlisle that's the beauty of our money, we have wacky figures on it + cool animals. :)
@PauloCereda but no proper currency symbol such as £
@DavidCarlisle no, just old boring R$
@PauloCereda at least you have real dollars not fake ones like that country to the north
7:02 PM
ooh
 
1 hour later…
8:45 PM
@mickep nothing from you?
@DavidCarlisle Oh, I go under the radar...
@mickep I suppose they only want speakers who know stuff
@DavidCarlisle Yes, no boring math people.
ctan is down
@DavidCarlisle Then the more surprising that you won't talk, btw...
8:54 PM
@mickep I refer you to my earlier comment
@UlrikeFischer So, no new easybook for you.
@mickep I got a new easybook, but the webpage is down.
@UlrikeFischer Ah, so the evening is after all saved.

« first day (5023 days earlier)      last day (75 days later) »