« first day (5041 days earlier)      last day (189 days later) » 

08:26
@samcarter very important news :)
@Skillmon So the precompiled list is just suppose to be executed afterwards? Not need to insert it into a key setter.
@Skillmon indeed! Let's look forward to the big round birthday next year :)
@daleif If you want to restore the defaults/initials on each usage of your macro you'd then need to reset them in that macro as well. So \NewDocumentCommand \usemymacro { O{} } { \l__my_initial_keyvalues_tl \keys_set:nn { myset } {#1} <whatever> }. The first execution of the precompiled list after \keys_precompile:nnN is just to ensure initial values are set.
More complicated is the usage of a \mysetup-macro, as you'd have to alter the \l__my_initial_keyvalues_tl without dropping the values of unaltered keys...
(or you could just add to it, building a longer and longer list, something like \NewDocumentCommand \mysetup { m } { \keys_precompile:nnN { myset } {#1} \l_tmpa_tl \tl_put_right:NN \l__my_initial_keyvalues_tl \l_tmpa_tl }. It'd degrade in performance with many usages, but shouldn't be a problem in practice.
yo'
yo'
09:21
@daleif Yeah, but I would still actually prefer to have an expl3 version of NewDocumentCommand where you could \cs_generate_variant {No} or {Ne}
09:44
@yo' agreed, some \ltcmd_new_command:Nnn would be great.
yo'
yo'
10:05
@Skillmon I added an answer showing how to do that for completeness...
10:32
@DavidCarlisle 2s ahead of me :(
Well you are so slow it's easy to be ahead
@DavidCarlisle Yes, even you manage. Sometimes.
(But I still haven't seen you on reddit...)
And I am hampered by having no electricity today. The electricity company are so risk averse they cut off the power to the village before sending employees up trees with a chain saw to clear the power lines.
@DavidCarlisle So duck BBQ for lunch?
@DavidCarlisle There is probably a subreddit for people who have power cuts...
10:46
@mickep r/poweroutage
@samcarter Hahaha
 
4 hours later…
14:32
Hi. Is it ok to ask a question here concerning alignment of an equation? My code is really short and I am pretty sure it has been asked before on the main site, however I haven't been successful in finding my answer. I'd be grateful for any help
My equation in one line of my alignment is too long and so I have to make a linebreak, and then I'm using the command \phantom to help me align the whole shebang, but it won't align properly.
14:48
I'll just post my code here for the interested reader:
\documentclass{article}
\usepackage{amsmath,amsthm,amssymb}
\usepackage{outlines}
\begin{document}
\begin{outline}
\1 Here's some text.
\2 Here follows the aligned environment.
\begin{align*}
        &\phantom{=} \{\ldots :(x,y,z)\in V^{(1)}\wedge (x,y,z)\in V^{(2)}\wedge (x,y,z)\in V^{(3)}\}\\
        &=\{\ldots: (x\in U_1\wedge y\in X_2\wedge\ldots)\wedge (x\in X_1\wedge\ldots)\wedge (x\in X_1\wedge\ldots)\}\\
        &=\{\ldots: x\in U_1\wedge y\in U_2\wedge z\in U_3\}\\
        &=U_1\times U_2\times U_3.
Maybe put the equal signs to the left of & and add {}?
@psie If you post your question on the main site, other users with the same problem will be able to benefit from any solutions you might get.
(But it could look better if the first line is in fact shoved to the left)
15:04
@mickep ok, thanks, I will think about it (meanwhile, your suggestion of putting the equal signs to the left of & and adding {} worked)
15:30
@psie OK, but this type of questions should in principle go to the site I think, as @samcarter says. Otherwise @DavidCarlisle and @egreg have have no points to fight about...
@mickep They could just start asking questions :)
@samcarter Ohh, don't give them ideas :)
ok, I thought my question was of such simple nature that it was ok to chat about, and that duplicates/or at least very similar questions should be avoided at all cost (I'm pretty sure a similar question is out there, I'm just not sure what to search for exactly). If my question has more meat on it, then I'll post it on the main next time :)
@psie Don't worry. I just saw an opportunity to tease/encourage David a bit. And indeed, similar questions have appeared, and it is not always easy to find them. But the worst thing that can happen if you post your question is that it gets closed as a duplicate of another question. And that is not really a problem.
15:45
ok 👍
16:15
@psie I agree with @mickep, but I'd use a smaller indent
\documentclass{article}
\usepackage{amsmath,amsthm,amssymb}
\begin{document}

\begin{align*}
\{\ldots
  &:(x,y,z)\in V^{(1)}\land (x,y,z)\in V^{(2)}\land (x,y,z)\in V^{(3)}\}\\
  &=\{\ldots: (x\in U_1\land y\in X_2\land\dotsb)
      \land (x\in X_1\land\dotsb)\land (x\in X_1\land\dotsb)\}\\
  &=\{\ldots: x\in U_1\land y\in U_2\land z\in U_3\}\\
  &=U_1\times U_2\times U_3.
\end{align*}

\end{document}
@psie Note \dotsb
@psie Also \land instead of \wedge: they're actually the same, but \land is semantically better.
@egreg I can live with the smaller indent as well.
Awesome, thanks!
16:45
user image
3
Oh, a print of the manual. Exclusive for meeting participants. :)
 
2 hours later…
18:55
@DavidCarlisle @mickep ooh negative NaN
 
2 hours later…
20:31
@PauloCereda Reminds me of when getting -0.00 in MetaPost and the sign really mattered.
 
1 hour later…
21:52
Would it be reasonable to have something like \bool_eval:n which returns \c_bool_true for 1 and "true" and \c_bool_false for 0 and "false"?
\documentclass{article}
\begin{document}
\ExplSyntaxOn

\keys_define:nn { foo } {
    my ~ key ~ a  .bool_set:N  = \l_mypkg_mybool_bool ,
    my ~ key ~ b  .code:n      = {
        \bool_set:Nn \l_mypkg_mybool_bool {#1}
    }
}

% works
\keys_set:nn { foo } { my ~ key ~ a = true }

% does not work
\keys_set:nn { foo } { my ~ key ~ b = true }

\ExplSyntaxOff
\end{document}
Things like the above where you need .code:n because you want do more than just setting the boolean would then be a bit easier to implement
Currently, \bool_set:Nn \l_mypkg_mybool_bool { \cs:w c_ #1 _bool \cs_end: } seems to work, but of course it does not test for correct input
22:14
This question is related to: tex.stackexchange.com/q/465998/47927

« first day (5041 days earlier)      last day (189 days later) »