20,962 reputation
257114
bio website users.aims.ac.za/~bruno
location France
age 23
visits member for 2 years, 4 months
seen 14 mins ago
stats profile views 1,599

I've been using LaTeX more and more in the past nine years, initially typesetting solutions to maths problems, later taking notes in class for more than a year.

A few months back I had some ideas about writing a package. I was (un?)fortunate enough to find a copy of the TeXbook in my school's library. Since then, I have been hooked by the strange style of programming that TeX macros provide.

This has led me to become a member of the LaTeX3 team in May 2011. This was an exciting time to join the project: the team improved consistency of the expl3 language provided by l3kernel considerably, and we have seen people starting to code in the language. I have focussed in making the l3kernel code as fast and bullet-proof as possible (two often conflicting aims).

Current LaTeX projects:

  • Get l3fp to reach full IEEE-754 (2008) compliance. This module, which I am quite proud of, lets us parse expandably floating point expressions, in a way similar to eTeX's \the\numexpr...\relax for integers. The main missing parts are signalling NaNs and subnormal numbers, as well as providing functions to control the rounding mode.

  • Enrich l3fp with more functions, such as atan.

  • Clean up l3regex, the LaTeX3 regular expression engine, marking it as stable. In particular, add functions to act on a file, sed-like.

  • Write a PEG parser operating on strings. This could in principle be done expandably, but I am not yet sure whether it is necessarily useful.

  • Write a C compiler (this is not for LaTeX3, mostly to learn how compilers work). Having a full C-to-TeX compiler would immediately provide access to many other languages from TeX, since many compilers are written in C. Of course, the code would run rather slowly, and much slower than using LuaTeX.

  • Enable TeX to produce text output instead of pdf. This could be done either by using LuaTeX, or by modifying an engine, or by emulating TeX within TeX (which I have partly done).

  • Help with debugging macros either by providing a graphical interface to visualize expansion, or (easier, and partly done) by performing steps of expansion or assignments one by one and showing partial results with \typeout within TeX.

  • Understand how to best generalize LaTeX3's \tl_expandable_lowercase:n to do more general token-list transformations expandably. This might combine with the idea of a parser.

  • Perform partial macro expansion in a file, which would distinguish between user-defined macros and macros defined in a package.

  • Write an os-independent Makefile-like Lua program.

  • A few dormant packages, including the one that brought me to the TeX path two years ago.


3h
comment How do I create an expandable conditional with a loop inside?
Given the functions currently available in expl3, yes, this is the solution I would suggest.
7h
comment correct pronunciation of TeX
It would be helpful if you could clarify how this question differs from tex.stackexchange.com/q/17502/2707 . @egreg, modern Greeks appear to pronounce χ in a way very similar to the h in 'he', as the OP mentions, but I may be wrong.
7h
comment What is the correct pronunciation of TeX and LaTeX?
One should note, however, that the Greek χ (chi) is pronounced (at least by the very few Greek people I've met) closer to the English word 'he' than to the German 'ach', so I would question whether Knuth's explanation is fully consistent with modern Greek pronunciation.
23h
revised Get the head, the tail, and the last element of a comma-separated list
set_eq is not safe for clist, unless the RHS is also a LaTeX3 clist (those are somewhat normalized)
23h
comment Get the head, the tail, and the last element of a comma-separated list
@egreg Ah, I had forgotten \clist_pop. If I remember correctly, \clist_set_eq should exist, so the solution you gave with \clist_pop can be made into clean expl3 (and no need for the map_inline version).
1d
comment Get the head, the tail, and the last element of a comma-separated list
How about getting all items but the first? (I think that is what John Wickerson had in mind when saying tail)
1d
comment Get the head, the tail, and the last element of a comma-separated list
I think that John Wickerson wants all items except the first. And we haven't provided a function to extract a range of items of a clist (we have that for strings).
1d
comment Get the head, the tail, and the last element of a comma-separated list
I think John Wickerson was thinking of the tail as all items except the head (so 3,5,7 in your example).
1d
comment Get the head, the tail, and the last element of a comma-separated list
We don't have clist_head or clist_tail functions in expl3 because we take the approach that clists are only for user input and not for further processing, so there is no built-in way to get the tail. Assuming that the clist is already normalized to some extent, one could write \int_compare:nNnF { \clist_count:n {#1} } < 2 { \jb_skip:w #1 }, where \jb_skip:w is defined as \cs_new:Npn \jb_skip:w #1 , {}.
1d
comment Checking if a string contains # with its original catcode
I think you forgot to save your edit: I am seeing the same code as yesterday (and the page says "edited yesterday").
1d
answered Can I store sequences in sequences with expl3
1d
comment Checking if a string contains # with its original catcode
It is very often better to edit the previous solution rather than posting a new one. A few comments on that one: (1) I suspect that you intended to wrap the code in \lowercase, otherwise the \lccode assignments are not needed; (2) The use of \@cdr fails if the argument of \docheckhash is blank (only made of explicit (32, 10) spaces), in particular \checkhash{{}} fails.
1d
comment Checking if a string contains # with its original catcode
@AhmedMusa: You are asking if your solution is fool-proof. It is not fool-proof, even in the absence of brace group, because it tests for the presence of a token whose \meaning contains macro parameter character, rather than for the presence of an actual macro parameter character. \bcheckhash was just a convenient available example to break your code. By the way, I can't remember well, but was it you who said you would learn expl3 once it contained the expandable floating point parser?
1d
comment How to include SVG diagrams in LaTeX?
@lazyboy because rasterisation denotes the act of converting a vector graphic (where shapes are given by coordinates) into a raster format (typically described by its pixels or similarly lossy data), but pdf is able to contain vector graphics. So the rasterizer does more than just rasterize.
2d
comment What is an “implementation of TeX”
For the record, the Github repo for TeX++, it seems.
2d
comment How to apply a macro to each row of a table
@JoachimBreitner My worry is that their versions would be too old. As far as I can tell, this code requires an expl3 more recent than 2012-07-02, relatively more recent than what journals would have.
2d
revised Simple way to multiply two values
Add minimum date to expl3.
2d
comment Simple way to multiply two values
@Veger: your expl3 is too old, it does not have \fp_eval:n.
2d
comment Simple way to multiply two values
Sorry about that, I had not tested appropriately.
2d
answered How to apply a macro to each row of a table