27,630 reputation
283156
bio website users.aims.ac.za/~bruno
location France
age 24
visits member for 3 years, 7 months
seen 4 hours ago

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.


20h
revised Advantages and disadvantages of fully expandable macros
Small factual error
20h
comment Advantages and disadvantages of fully expandable macros
Nice answer! A small error though: \ifmmode can be true or false within an \edef: you might be confusing with \write (and \immediate\write) where indeed the mode is set to no mode. Test: $\edef\foo{\ifmmode Math\fi}\show\foo$\bye gives Math.
1d
answered List of all control sequences let to primitives in common formats
1d
comment List of all control sequences let to primitives in common formats
@egreg No problem if my code is loaded before: tokens can still only be defined through \def and friends. Such a package necessarily copies \def et al to some control sequence. As long as it does not explicitly make sure that it has the primitive (as some of Heiko Oberdiek's packages do), it won't realize that what it copied contained my hooks. Say some package author does \def\xdef#1{\message{\string#1 defined}\global\edef#1} (a very bad idea, on its own, since prefixes won't work). Then \xdef\foo{} will use my \global and my \edef hence be logged correctly.
1d
asked List of all control sequences let to primitives in common formats
2d
comment How to optimize pdf with many links and simple pages
1 percent gain in memory by doing \let\@linkbordercolor\undefined and \let\@pdfborder\@empty and \let\@pdfhighlight\@empty after loading hyperref.
Jul
21
awarded  Nice Answer
Jul
19
revised aliasing vs variants — preferred practices?
Typos
Jul
19
revised aliasing vs variants — preferred practices?
Code fix
Jul
19
comment LaTeX3: how to define a variable locally
Note for future readers: \tl_new:Nn has been deprecated for some months (but was not when the question was asked). Now, use \tl_new:N to declare the variable, then later on \tl_set:Nn to set the variable locally (or \tl_gset:Nn for a global assignment).
Jul
19
awarded  Nice Answer
Jul
18
comment Random form letter text
Now \tl_length:n should be replaced by \tl_count:n (not doing the change now, since this would bump the answer on the front page, and l3rand is still as experimental as always).
Jul
18
revised Iterating through two lists
Use \tl_new:c rather than deprecated \tl_new:cn
Jul
18
revised Removing duplicates from a list
Use \clist_set:Nn instead of deprecated \tl_new:Nn
Jul
18
revised Function like macro?
This answer led to the new l3fp. Use \tl_const:Nn instead of deprecated \tl_new:Nn.
Jul
18
revised Function like macro?
s = strrev(s) means s is a palindrome, not an anagram
Jul
18
awarded  Informed
Jul
17
awarded  Nice Question
Jul
17
accepted Measure total glue in a box
Jul
17
answered Measure total glue in a box