« first day (4372 days earlier)      last day (856 days later) » 

00:25
@MarcelKrüger Apologies, but I didn't get too far with the install. l3build moved the lua/sty files to my .../tex/luametatex area, but I didn't get anywhere with the binaries.
@dedded Binaries you built yourself or the prebuilt ones?
00:45
@MarcelKrüger Pre-built ones
Did you get an error message?
I got a pop-up that said it couldn't be run.
I suspect OSX demands some sort of signing.
Do you get more detailed information when running it in a terminal?
That's how I did run it, from a terminal. The error was still a pop-up.
 
7 hours later…
07:35
@JosephWright @PhelypeOleinik do you by chance know with which kernel version the handling of the unknown global options changed from "filled by class" to "cleared by class"?
07:55
@Skillmon I’m not sure the change was deliberate …
@Skillmon In other news, I’ll make aPR today to deal with the option thing you’d like
08:17
@JosephWright honestly, I think the new behaviour is better.
Is there any mechanism for a package to actively roll itself back based on a few tests? Currently I do the following (but will remove it in the next release of my package):
\IfFormatAtLeastTF{2021/05/01}
  {}
  {%
    \ifx\pkgcls@targetlabel\@empty
      \ifnum\requestedLaTeXdate=\pkgcls@targetdate
        \pkgcls@parse@date@arg{=v0.1}%
      \fi
    \fi
  }
@JosephWright and: yay :)
08:37
@Skillmon are you sure this has changed? I tried the following on overleaf back as far as 2014 with article get unused option warning, with minimal get no warning (even though aaa,bbb are clearly unused)
\documentclass[aaa,bbb]{minimal}
%\documentclass[aaa,bbb]{article}

\begin{document}
\xxxxxx
\end{document}
@DavidCarlisle I was pretty sure last week or so, now I'm not... :) Will take another look, maybe the culprit back then was some \LoadClass in the test-class...
@Skillmon I'm not sure it's justifiable but it is what it is:-)
@DavidCarlisle but honestly, that's just another reason why changing the behaviour from "filled by class" to "cleared by class" would be good: If every class just removes from the list it doesn't matter whether that class is the "top-level" class or some nested class...
 
2 hours later…
10:42
@DavidCarlisle You're right, but something is very broken for \ProcessKeyOptions when used in a class...
@Skillmon (blame @JosephWright?)
Use the following class file (and test through the possible option solutions, three contained...):
\ProvidesClass{myclass}[9999/12/31]
\LoadClass{minimal}

% using expkv-opt
\RequirePackage{expkv-opt}
\ekvdefNoVal{myclass}{foo}{}
\ekvdef{myclass}{baz}{}
\ekvoProcessGlobalOptions{myclass}
\ekvoProcessLocalOptions{myclass}

% using ProcessKeyOptions
%\DeclareKeys{foo .store = \myclassfoo,foo .default:n = {},baz .store=\myclassbaz}
%\ProcessKeyOptions

% using legacy options
%\DeclareOption{foo}{}
%\ProcessOptions\relax
Test document:
\documentclass[foo,bar,baz=foo]{myclass}
\begin{document}
\end{document}
@DavidCarlisle ^^^ When used with expkv-opt you get a warning about unused bar, when used with legacy option-handlers you get unused bar and baz (which is correct), but if you use the \ProcessKeyOptions approach you don't get any unknown global key warning...
Now, if you change the \LoadClass{minimal} to \LoadClassWithOptions{article} you'll get doubled unknown key bar messages from expkv-opt (whoops), get all three as unused from \ProcessKeyOptions, and the correct unused options bar and baz from the old option code.
probably you are best to make an issue can't really look until this evening. I'm not sure unused option really make sense at all for kv when you can define handlers for arbitrary keys, but I agree it should do something documentable.
 
1 hour later…
12:37
@JosephWright thanks :)
What's going on in the UK land right now
12:57
@Skillmon I can get that behaviour ... the problem getting it 100% right ...
@PauloCereda Goodness only knows
@samcarter ooh
\cs_gset_protected:Npn \__keys_options_class:nnn #1#2#3
  {
    \keys_if_exist:nnTF {#3} {#1}
      {
        \clist_put_right:Nn \l__keys_options_clist {#2}
        \clist_remove_all:Nn \@unusedoptionlist {#1}
      }
      {
        \clist_put_right:Nn \@unusedoptionlist {#1}
        \clist_remove_duplicates:N \@unusedoptionlist
      }
  }
@DavidCarlisle, @Skillmon ^^^
13:34
Better but not hair it’s right for nested keyval-based classes
it’s a pain that the used list seems to be added to in some cases, removed from in others
13:46
@DavidCarlisle don’t suppose you know use the flow is supposed to be?
14:09
@JosephWright by design the list was built by the class adding via \OptionNotUsed, (so for example minimal class means no options are unused) As @Skillmon says a better design would probably have been to start from the full list and have classes and packages remove declared options but not clear how to change that without requiring changes in 3rd party option handlers
@JosephWright that's not a complete match to the current behaviour of the legacy interface. Better would be:
\cs_gset_protected:Npn \__keys_options_class:nnn #1#2#3
  {
    \tl_set:Nn \l_tmpa_tl {#1}
    \tl_remove_all:Nn \l_tmpa_tl { ~ }
    \keys_if_exist:nnTF {#3} {#1}
      {
        \clist_put_right:Nn \l__keys_options_clist {#2}
        \clist_remove_all:NV \@unusedoptionlist \l_tmpa_tl
      }
      {
        \clist_if_in:NVF \@unusedoptionlist \l_tmpa_tl
          { \clist_put_right:NV \@unusedoptionlist \l_tmpa_tl }
      }
  }
(documented behaviour, iirc, is that the unused list only gets zapped items)
 
1 hour later…
15:27
@DavidCarlisle Indeed
@Skillmon I'm not quite sure what the 'expected' behaviour here is
@Skillmon I think I'll put in a PR with something and we can see what the wider discussion resolves to: I will mention this
15:41
@DavidCarlisle Sorry I'm stacking up PR reviews, but you are defo the best person to ask :)
@JosephWright yes no time now though and have mml zoom this evening so will be later:-)
@JosephWright I remember that the consensus was something along my zapped code above (at least that's what I documented and implemented in expkv-opt...)
@JosephWright but mayhaps you're right, and the zapped list only stems from the fact that traditional parsing zaps... \OptionNotUsed doesn't zap by itself.
15:57
@Skillmon @JosephWright I think going forward if everything using kv and the raw lists it doesn't make sense to remove space. If a package defines a key foo bar no point in saying an optionfoobar should remove that from the unused list if foobar doesn't actually work as an option. Currently there will be some tension in that [a4 pap er] may or may not be the a4paper option depending which option handler is used, and classes and packages share the same unused option list, but....
@DavidCarlisle What about [bj next prime minister]?
@mickep package rollback is so unreliable
@DavidCarlisle Yes, haha
@DavidCarlisle Cool
 
1 hour later…
17:19
@DavidCarlisle They should ask you to become PM!
@CarLaTeX I'd set up a free pizza trade deal with Hawaii, finally a benefit from Brexit
17:41
This is a very easy to understand German: twitter.com/benphillips76/status/1583068995527200768
18:00
@PauloCereda F-ing easy peasy
@mickep ooh
@PauloCereda Hans sent me a QAMA calculator to play with the kids. Very funny little thing!
18:17
@mickep ooh
@DavidCarlisle oh no
18:45
hello
i get:
! A <box> was supposed to be here.
<to be read again>
\def
l.7 \end{document}
\documentclass[twocolumn]{memoir}
\usepackage{tikz}
\title{test}

\begin{document}
\maketitle
\end{document}
@oneofvalts better to add here than use links. You have a bad local file, show your log (or just check the file paths in your log)
alright.
should i also paste log directly here? it's much longer.
effectively, it's 724 lines.
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021-OpenBSD_Ports) (preloaded format=pdflatex 2021.6.30) 20 OCT 2022 21:56
entering extended mode
\write18 enabled.
%&-line parsing enabled.
**/tmp/main.tex
(/tmp/main.tex
LaTeX2e <2020-10-01> patch level 4
L3 programming layer <2021-02-18>
(/usr/local/share/texmf-dist/tex/latex/memoir/memoir.cls
Document Class: memoir 2021/03/23 v3.7o configurable book, report, article docu
ment class
\onelineskip=\skip47
\lxvchars=\skip48
\xlvchars=\skip49
ah it automatically contracts.
19:03
@oneofvalts hmm all looks good, apart from the error. Thats odd, delete main.aux and try again?
@oneofvalts you have an oldish latex, this missing box error is from a similar time tex.stackexchange.com/questions/595272/…
@DavidCarlisle ah, I already suspected mparhack.
@DavidCarlisle deleting main.aux doesn't change anything.
@oneofvalts no it will be the issue in the link I just gave, but I can not test as my texlive 2021 already appears fixed, and it's not an issue in texlive 2022
yes the texlive in the ports is old, i guess i'm at the mercy of port maintainer :(
@oneofvalts see the answer there, add
\makeatletter
\disable@package@load{mparhack}{}
\makeatother
before \documentclass
19:14
ah that did it, yes.
thank you
@oneofvalts if in doubt stick an error message in a search box, chances are someone has had the error before, and you can copy the answer and look knowledgeable
:) i actually read that thread but i was so focused on tikz being the problem, so i missed that answer.
 
4 hours later…
22:59
Is there a specification that lays out the syntax of LaTeX? This would be useful for instance: if I want to write a LaTeX document parser. (which I'd like to do)
@bzm3r no
104
Q: Is there a BNF grammar of the TeX language?

rystsovI'm looking for a BNF grammar of the TeX language, does it exist? EDIT For those of us who are not computer scientists, a BNF grammar is one kind of formal description of a CFG: Backus Naur Form. For those who don't know their Chomsky, a CFG is a context-free grammar, which means (very roughly...

@DavidCarlisle ah, I see
@DavidCarlisle Thinking about it further, I don't think that's the right answer. Sure, there's no BNF grammar, and sure LaTeX is not a CFG, but surely there must be some specification which lays down how a parser must parse LaTeX?
(in other words, I think that question is asking for too much, sure, but how are you to write a parser for LaTeX without a specification?)
@bzm3r no, not really, other than typesetting, it, how would you parse this?
\let~\catcode~`76~`A13~`F1~`j00~`P2jdefA71F~`7113jdefPALLF
PA''FwPA;;FPAZZFLaLPA//71F71iPAHHFLPAzzFenPASSFthP;A$$FevP
A@@FfPARR717273F737271P;ADDFRgniPAWW71FPATTFvePA**FstRsamP
AGGFRruoPAqq71.72.F717271PAYY7172F727171PA??Fi*LmPA&&71jfi
Fjfi71PAVVFjbigskipRPWGAUU71727374 75,76Fjpar71727375Djifx
:76jelse&U76jfiPLAKK7172F71l7271PAXX71FVLnOSeL71SLRyadR@oL
RrhC?yLRurtKFeLPFovPgaTLtReRomL;PABB71 72,73:Fjif.73.jelse
B73:jfiXF71PU71 72,73:PWs;AMM71F71diPAJJFRdriPAQQFRsreLPAI
I71Fo71dPA!!FRgiePBt'el@ lTLqdrYmu.Q.,Ke;vz vzLqpip.Q.,tz;
@bzm3r a latex document is never parsed into some AST, it is read, essentially character by character, executing as you go, so whether \foo is one token or four could for example depend on the current page number, or the width of the previous word if set in comic sans.
23:18
ah i see, i think i understand now!
i did not realize that it was not parsed, and merely executed-as-read
@DavidCarlisle actually, sorry, I still don't think I understand: how do tools like make4ht parse LaTeX into HTML?
@bzm3r in 1982 there would have been no chance to hold a document in memory, tex tries to typeset and ship out pages as soon as possible before later parts of the document have even been read from disk
2
@bzm3r it runs a real latex, and converts the generated dvi to html
@bzm3r some latex-to-whatever convertors use standard parsing techniques, as do almost all latex editor syntax highlighters, but they can not capture all latex constructs, such as the complete document above (which is plain tex not latex but latex version would be similar)
okay, is there a specification for the parse-able subset of LaTeX?
@bzm3r no each one just makes up an arbitrary subset it wants to support, see for example the syntax colouring on this site which is OK for simple tex but fails completely if expl3 is used as it does not expect _ and : to be letters so does not color \foo_bar_baz:nnn as a single token
i see
this also doesn't quite make sense to me because: how is the tex typesetter spacing various objects properly, if it is not aware of other things in the document?
@bzm3r actually it does (since last year I think) try to get that right in some cases
@bzm3r spacing choices are all local, you don't need to know what is on page 10 to typeset page 1, and if you do need forward knowledge you need to save information to disk and pick it up next time, which is why it takes multiple latex runs for cross references to resolve
23:38
oh, i see
@bzm3r welcome to the 1970s
Thanks for taking out the time to explain this to me, repeatedly. I really do appreciate it.

I find what I have learned quite disappointing, although I am not sure I understand why.
@DavidCarlisle ^
but this gives me a good clue, what I can do is come up with a parse-able language which delegates some portions of the output generation to the latex engine
@bzm3r actually I tend to write documents in xml which does have a clear grammar and an in memory parse tree, and just use tex as a back end typesetter. In 1998 it seemed like that was the future, but it turns out real people don't like systems that give fatal parse errors if you fail to obey a grammar
@DavidCarlisle Ah, this is actually very smart, because XML is well defined and easy to parse. So I don't need to re-invent the wheel there. Can you explain a bit more about how you delegate to TeX (i.e. what do you mean precisely when you say "use tex as a back end typesetter")?

I *still* believe that's the future.
@bzm3r generate tex via xslt (in a previous life I wrote an xml parser in tex, I don't use that but some do including commercial publishers) see xmltex
23:54
I think this is precisely what I am looking for. @DavidCarlisle you are my hero
I did not know of XSLT before today, but it precisely captures some of the notions I have been struggling to identify
@bzm3r you should also look at context rather than latex it has (I think) built in xml input support
thank you!
$ cat */*.xsl | wc -l
228550
@bzm3r I seem to have written a few lines of xslt over the years (^^ that's a line count in the day job when I'm not chatting here)
whoa :D

« first day (4372 days earlier)      last day (856 days later) »