« first day (3241 days earlier)      last day (64 days later) » 

7:51 AM
A: hyperref warns when using cleveref in \section

Phelype OleinikAs I said in the comment, the issue is that cleveref's machinery is not expandable (the \@ifnextchar that hyperref complains about, for example, isn't expandable), so it can't be turned into a PDF string. The crossreftools package provides an expandable alternative for cross referencing commands...

@PhelypeOleinik ^^ (see Joseph's comment above:-)
8:04 AM
@DavidCarlisle Ah, yes
@DavidCarlisle I'm fiddling with some bits of the plan at the moment
@JosephWright I'm mostly offline today
@DavidCarlisle Cool: I'm doing set up, really
@DavidCarlisle Main thing I need at the moment is thoughts on the interfaces stuff in the debug tree
@JosephWright I was leaving that to others not done enough serious expl3 coding recently to have any novel thoughts about that interface
@DavidCarlisle OK, cool
@DavidCarlisle Looks like we might actually want to go with my suggestion: it was somewhat flippant, but there are advantages
In the category of disturbing polls - theguardian.com/politics/2019/sep/14/…
8:10 AM
@FaheemMitha Not a surprise
@JosephWright That (some) people still approve of Johnson, despite recent developments? I admit I would have hoped for slightly different numbers.
@JosephWright /me wonders what flippant TeX development looks like. But no doubt it's also secret.
@FaheemMitha The Brexiter types want no deal ...
@JosephWright Then they are clearly insane.
@FaheemMitha The idea of using \tl_lower_case:n to implement \MakeLowercase: it's a very different approach
@JosephWright expl3? Different from what?
8:13 AM
@FaheemMitha You might like to think so, I couldn't possibly comment
@JosephWright That's very restrained of you.
@FaheemMitha Current \MakeLowercase is a pretty thin wrapper around \lowercase, covering a few key macro-based inputs. \tl_lower_case:n is expandable, doesn't use \lowercase, can do context-based Unicode case changing: very different beast
@FaheemMitha I have some pro-Brexit colleagues, coming from the hard left position, so one gets used to being careful
@JosephWright I understand. Happily, however, I don't know your colleagues.
@JosephWright Is expl3 still in flux, then? I thought it was now stable.
@FaheemMitha My Mum knows various people on Facebook who are from the 'the UK is owed whatever deal it asks for' point of view
@FaheemMitha 'Broadly stable': we are still making adjustments, but there is a very clear approach to any breaking changes
@JosephWright Ok. Good to know.
@JosephWright Do you actually think the UK would be better off outside the EU?
8:22 AM
@FaheemMitha Me? No, not at all, but I see that the EU is more a social project than an economic one: the single market and all that is there to support the social project, not the central point of the EU
@JosephWright You might be right about the social project. I wouldn't know.
You mean something like European integration?
@FaheemMitha I'm not, though, seeing leaving as destroying the entire UK: we will survive, things will continue to work
@FaheemMitha Yes, that
@JosephWright Ok.
@JosephWright Right.
@FaheemMitha Hopefully the LaTeX team will still be able to meet up ;) Visa for Germany :)
@JosephWright Do you need one now?
8:26 AM
@FaheemMitha No :)
But it's not certain that Britain will actually leave, though.
@FaheemMitha Currently I'm an EU citizen so can travel and work anywhere in the EU without any (real) restrictions
@JosephWright Right. Because the UK is (still) in the EU.
@FaheemMitha I think it's pretty certain: people who voted leave did so for a variety of reasons, but one was 'politicians do no listen'. If we don't leave, there will be real damage to any sense of trust in democracy
@JosephWright Oh. Well, sorry to hear that.
Because I think it would be a bad move. Not that I'm an economic expert or anything.
But from my vantage point it looks like a decision made out of shared delusion.
I realise the EU isn't perfect, or anything, but I think it's a lot better than the alternatives.
8:31 AM
@FaheemMitha The issue from the start has been that 'leave' didn't have a detailed programme: what people thought they were voting for wasn't necessarily available or at least not clearly on offer
@JosephWright What did people think they were voting for?
@FaheemMitha A range of things, of course: the question was simply 'should we stay or leave'. One could interpret 'leave' in so many ways: could just mean technically leaving but actually staying in the single market, all the way to expecting to simply walk out the day after the vote and kick all non-UK nationals out of the UK
@FaheemMitha The biggest single 'position' was I think expecting a deal where the UK could still access the single market without having to stick to the 'rules'
@JosephWright So no consensus. And it doesn't sound like the people pushing the vote helped any.
@JosephWright Sounds optimistic.
@FaheemMitha Oh, no, they are a grubby bunch in the main
@FaheemMitha Delusional I think is closer to the mark
@JosephWright That Farage guy, I think he's kind of scary.
Maybe he means well, I don't know. But I watched him talk. I got bad vibes.
But I find a lot of politicians scary. Many of the Indian ones are.
But it's said people get the pols they deserve. They certainly get the ones they voted for.
8:38 AM
@FaheemMitha He's pretty clearly a spiv
@JosephWright Heh.
9:19 AM
Suppose I want to write my thesis using LaTeX. When I read a paper, I want to incrementally add to the content from it as I go. So I need somehow a note taking solution which also takes care of the references automatically so I could add to my thesis from paperA digest. How can I do this?
One solution is just add to the final LaTeX doc as I read papers so references are taken into account. But I want to have multiple independent files (one for each paper) and then integrate them into a single file.
I use Zotero btw.
2 hours later…
11:40 AM
@DavidCarlisle @JosephWright Answer to the Ultimate Question of Life, The Universe, and Everything: 42. Answer to all Expansion Issues in TeX and LaTeX Code: expl3 :-)
12:14 PM
@PhelypeOleinik nah, I'd say the answer is Bruno.
12:26 PM
@Skillmon Bruno wrote a lot of the expandable code, so it's implied ;-)
12:54 PM
If one is using \NewDocumentCommand, is it better to put optional arguments before the mandatory ones, or after?
The xparse document doesn't offer guidance, but perhaps it defers to LaTeX convention.
That seems to be optional first, in square brackets (though I could be wrong).
@FaheemMitha For \NewDocumentCommand it depends only on the interface you want to provide, there is no real "best" here besides an interface which makes sense. For \NewExpandableDocumentCommand you can't have an optional argument at the end of the list of arguments; the documentation lists this and other restrictions for expandable commands.
@FaheemMitha LaTeX's convention is optional first because \newcommand allows only that. However if the command is not built with \newcommand, that is not true anymore (\usepackage, for example, has a trailing optional argument).
1:15 PM
@PhelypeOleinik So it's essentially a "build according to taste" deal?
Do you have any opinions about which is best?
Personally, I'd lean towards optional first, but perhaps that is just because I'm conditioned by having seen it all over the place for many years.
@FaheemMitha For non-expandable commands, yes.
@FaheemMitha I think I'd need to see what the command does to have an opinion. But take siunitx as an example. The \si command takes the usual optional-mandatory, and the optional are key-val settings to the package. I think I'd find it odd if the settings came after the mandatory argument.
@PhelypeOleinik As it happens, the optional argument in this case is (optional) key-value settings. Mostly overrides to the default.
In this case, derived from a YAML file, but that's a detail.
@FaheemMitha On the other hand, \SI's signature is omom. The first o are settings, but the second one is "pre-unit", so it would look awkward placed anywhere else other than before the unit. As I said, depends on what the command does.
@FaheemMitha Then yes, I think om is the way to go :-)
@PhelypeOleinik Actually, omm. But that's a detail too. :-)
@FaheemMitha Another example which I like is fontspec. See section 5, Miscellaneous font selecting details, of the documentation (page 19 in my version). It explains why the \setmainfont command changed from om to mo (actually omo, but that's yet another detail :-).
1:26 PM
@PhelypeOleinik texdoc fontspec?
@FaheemMitha Yes
@PhelypeOleinik I know.
@PhelypeOleinik I see it. Starting with:
> For the first decade of fontspec’s life
@FaheemMitha That's the one :-)
@Skillmon In my todo list for the future: understand (at least a bit of) l3fp :-)
@PhelypeOleinik Ok.
1:30 PM
@FaheemMitha I didn't put the explanation here just because it would be lengthy and clutter the chat. But the moral is: there's no rule; do what looks best from the usage perspective.
@PhelypeOleinik never looked at the source code (and I'm too unfamiliar with many of the programmatic expl3 internals), but I'd love to understand l3fp :)
@Skillmon It's a good idea, actually. The expl3 source is not necessarily a good example of expl3 programming :-)
@Skillmon The (astouding, in my opinion) performance of l3fp is in part due to not following the expl3 guidelines. Most of the code (where performance is critical, at least) is basically primitives with _: in their name
@PhelypeOleinik I often don't follow the guidelines too strictly myself, and I love to write stuff up myself. But Bruno's code is on another level...
@Skillmon Even @egreg uses forbidden functions ;-)
@PhelypeOleinik Well, \filesize now is in the kernel.
1:45 PM
@egreg And @JosephWright said he would make an interface for \filedump :-)
@PhelypeOleinik Well, I mix L2 and expl3 syntax...
2:00 PM
@Skillmon Don't.
1 hour later…
3:07 PM
I typed in \Bbb{i}$ into my document, but what popped out was some sort of hebrew letter. I want i to be of the same font as \Bbb{R}, the real numbers.
How is this done?
3:18 PM
@user193319 \Bbb has been obsolete for 20+ years; use \mathbb, but note it doesn't work for lowercase letters.
\Bbb is obsolete? Whoops I only use that.
See the top of page two of this: arxiv.org/pdf/1212.1700.pdf
How do they get that font for the i?
I thought it would just be \mathbb{i}, but I guess I was wrong.
Q: Blackboard bold characters

Mark MeckesThe blackboard bold font in the AMSFonts package only has capital letters. I sometimes wish to use a blackboard bold "1", for which I can use \usepackage{bbold}. But this changes the entire blackboard bold font, and I like the original AMSFonts versions of the capital letters better. Is there a...

@user193319 ^^ should work, in theory. (Sorry, I can't test now)
Ah, I see. Thanks for the link!
2 hours later…
5:09 PM
Can someone tell me why this bit of Lua code doesn't work as expected? I'm trying to change the value of a variable inside a function.
xx = 0
local function yy(var)
   var = 1
print(string.format("xx is %s", xx))
This gives:
xx is 0
Presumably a scoping issue.
I guess maybe it's just that var is local to yy.
Yes, that seems the most likely possibility. Python has the same behavior, and I was able to find documentation on that.
1 hour later…
6:25 PM
Is there an expl3 interface to access the width of a character?
6:56 PM
@Skillmon That would be \box_wd:N on some temporary box
7:06 PM
@FaheemMitha Yes, it is
@JosephWright Thank you for the confirmation.
7:58 PM
@FaheemMitha xx is passed by value, not reference, hence the behavior.
8:16 PM
If you try the same example with tables, surely it will be modified, as tables are passed by reference.
@PauloCereda So not a scoping issue?
@FaheemMitha nope. :)
@PauloCereda Ah. Do you happen to know where this is documented?
@FaheemMitha not by heart, sorry. My guess this is documented somewhere in types or function calls...
@PauloCereda Ok. Thank you.
8:24 PM
@FaheemMitha perhaps a quick Google search on "Lua call by value" might help.
That brings up
Q: Function/variable scope (pass by value or reference?)

frooyoI'm completely confused by Lua's variable scoping and function argument passing (value or reference). See the code below: local a = 9 -- since it's define local, should not have func scope local t = {4,6} -- since it's define local, should not have func scope function moda(a) a = 1...

It's really aggravating having to understand a computer language in order to program in it.
@FaheemMitha I hope you are kidding.
@PauloCereda But not British humour.
8:44 PM
I tried to get the Lua intepreter to treat "{1-2}" as a string by wrapping it in tostring, but that didn't work. It tries to treat it as a table. It's coming from a iterator. Maybe I need to wrap it earlier?
@FaheemMitha huh?
> type(tostring({1-2}))
> type(tostring("{1-2}"))
@PauloCereda Like I said, maybe I need to do that conversion earlier.
The actual construction is:
for k, v in pairs(conf) do
	    configstr = configstr .. "," .. tostring(k) .. "=" .. tostring(v)
Where conf is a table.
9:05 PM
Interesting discussion about Lua here - reddit.com/r/lua/comments/60ynhr/…

« first day (3241 days earlier)      last day (64 days later) »