« first day (3202 days earlier)      last day (1736 days later) » 

1:17 AM
@PauloCereda -- I have remembered that in the Latin translation, Piglet is called "Porcellus". I think that's my favorite.
 
 
5 hours later…
6:45 AM
@barbarabeeton Pay attention in calling someone "Porcellus" in Italy (there is a double or even triple meaning, lol)!
 
7:12 AM
Does anyone know of a way to extract cell values from a TeX tabular environment?
For example, do the alignment tabs mean anything to Lua?
 
@FaheemMitha there are answers on site doing things like column sums, or setting colours based on cell values just using tex, you don't really need lua, although it's easier if you start with a simpler markup like a csv table rather than tex markup (see eg datatool package) if doing it in lua you could parse the input source looking for & and split up the lines using Lua patterns, but harder to cope with any macros in the table cells then.
 
@DavidCarlisle One advantage of Lua is post-processing.
Like if you want to do calculations with numerical values.
I don't really know how tables work, so I don't know how one would handle it with Lua.
 
7:34 AM
@FaheemMitha yes, but as David says, it depends on your table. If all your table lines looks clean 1&2&3\\ it is easy. But if you have \bfseries 1&\itshape 2&\multicolumn{1}{|c|}{\textcolor{red!50!blue}{3}}\\ then it could be a bit difficult.
 
 
1 hour later…
8:40 AM
@UlrikeFischer awwww <3
@barbarabeeton ooh
 
Does an error thrown by Lua, say using error(). get sent to TeX standard error?
 
yo'
10:09 AM
@PauloCereda <3
 
@yo' <3
 
 
2 hours later…
12:23 PM
@FaheemMitha Not sure what you mean by that. If you mean the standard error output (a.k.a. stderr in C and many other languages, file descriptor 2), I don't think (lua)tex uses it at all. But here is an experiment from an interactive luatex showing what happens:
*\directlua{error("foo")}
[\directlua]:1: foo
stack traceback:
	[C]: in function 'error'
	[\directlua]:1: in main chunk.
<*> \directlua{error("foo")}

?
 
1:13 PM
@HaraldHanche-Olsen What I mean is that standard error (in Lua) should be passed on to TeX. In practical terms, this means that if there is an error in Lua, TeX will halt.
I think this must be the case, because TeX is already halting for me on Lua errors, though I'm not actually checked how it is set up.
@HaraldHanche-Olsen And yes, I guess that is compelling evidence.
Here we see Lua's awe-inspiringly detailed traceback. (Don't mean to be snippy, but sometimes it can get a little tiresome.)
Actually, in this case, it's relatively reasonable, since it's just throwing from the error function.
 
 
1 hour later…
2:21 PM
@FaheemMitha lua.org/pil/8.3.html Because Lua is an extension language, frequently embedded in an application, it cannot simply crash or exit when an error happens. Instead, whenever an error occurs, Lua ends the current chunk and returns to the application. If you want to catch errors look at the pcall function.
@FaheemMitha use xpcall to control how much of the stack trace is exposed on errors
 
@DavidCarlisle and add a handler. :)
 
@PauloCereda done
 
@DavidCarlisle ooh
 
@DavidCarlisle Thank you. That's a useful hint.
@DavidCarlisle Returning to the application is fine. But i want the application to then exit.
Because it's harder to catch error if you don't know they happened.
 
2:38 PM
@FaheemMitha look at the example at the end of latex.ltx that traps any errors from loading luaotfload if there are any it just sets the encoding back to OT1 but it could raise a tex error message or do anything else
 
@DavidCarlisle such as call os.exit(false), for example. (@FaheemMitha)
 
@DavidCarlisle /usr/share/texlive/texmf-dist/tex/latex/base/latex.ltx?
But I'm not sure exactly what part of that file you are referring to.
 
@FaheemMitha Search for luaotfload inside the file, and you will find it.
 
@HaraldHanche-Olsen Ok
@HaraldHanche-Olsen I see it. But I thought LaTeX was Lua-free.
 
@FaheemMitha That code is protected by an \if … it will only run if the underlying engine is luatex.
@FaheemMitha \ifx\directlua\@undefined\else …
So you could say that latex is definitely lua aware.
 
3:01 PM
@FaheemMitha the one instance of xpcall in that file
@HaraldHanche-Olsen I wonder how that happened
 
@HaraldHanche-Olsen This part? require('luaotfload-main')?
@DavidCarlisle Yes, I see. Thank you.
 
@FaheemMitha if you don't load that then you have no access to Unicode fonts in luatex,
 
@FaheemMitha Yes, it's wrapped up in an xpcall and there is an if statement checking the return value of that call. The else branch is executed if the call failed.
 
@DavidCarlisle ooh secret
 
@PauloCereda Possibly, github knows?
 
3:15 PM
@HaraldHanche-Olsen nah commits don't tell things :)
 
3:28 PM
@PauloCereda ^^^Efalant has taken up work!
 
@UlrikeFischer awwwww <3
 
@HaraldHanche-Olsen AHHH, it's gotten awareness, we must kill it before it's SkyNet.
 
@Skillmon too late
 
yo'
3:51 PM
@UlrikeFischer it looks the other way around: Efalant victim of an earthquake!
 
@yo' ohh no
 
4:32 PM
@yo' he is a bit like Atlas - carrying the world on his shoulders.
 
yo'
@UlrikeFischer :)
 
 
2 hours later…
6:09 PM
@DavidCarlisle Hey if you're online, I added a new image to demonstrate. Sorry, I was in a rush earlier.
 
6:55 PM
 
@AlanMunn LOL
 
7:42 PM
Sign that you haven't quite got math: "with two suspects, the danger doesn't double, it increases exponentially".
 
@AlanMunn Is that a quote from CSI?
 
@FaheemMitha No, a reporter reporting on the case of the pair of Canadian murder suspects being chased across the country for the past week or so. (They've now been found dead.)
 
@AlanMunn Oh
 
@tjt263 you haven't said what you want the over-wide table to be centred on, centred on the text block encroaching on both margins by the same amount? or (a bit harder as you have to account for the page parity) centred on the page even if the text block is not centred. I'm sure there are multiple answers on site for both.
 
8:34 PM
user image
2
 
yo'
@AlanMunn lol
 
Details at: uglygerry.com
 
yo'
@AlanMunn IIRC, there are examples (I think it could be U from the font) where it makes sense to have an oddly-shaped district
 
@yo' Yes, that's true. The U (which on a map is really lying on its side) connects some mainly Hispanic neighbourhoods in Chicago. theconversation.com/…
 
yo'
@AlanMunn so I remember it right from John Oliver :-)
 

« first day (3202 days earlier)      last day (1736 days later) »