27,755 reputation
283158
bio website users.aims.ac.za/~bruno
location France
age 24
visits member for 3 years, 8 months
seen 9 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.


Aug
16
comment Drawback of using a using a new command instead of \begin{something}?
@GonzaloMedina That changes nothing: with the OP's definition \btkz[...] would also expand to \begin{tikzpicture}[...]. I would say it's mostly a matter of taste.
Aug
16
awarded  Nice Question
Aug
12
comment Macro to close all open environments, groups and argument delimiters
It is essentially impossible to make the use case that was just added work, short of parsing the TeX file (doable with TeX itself) before feeding it to TeX. If you are ready to parse TeX, then you could get \newcommand\kk[1]\textcolor{RoyalBlue}\text\textup\textbf\texttt{#1} to work, as long as the code you use to parse knows how many arguments each command expects.
Aug
12
revised Macro to close all open environments, groups and argument delimiters
Typos in command names
Aug
7
comment Document requiring infinitely many compiler passes?
For those who wonder and are too lazy to compile: this crucially relies on the fact that in roman numerals, the page number IV takes more space than the page number V. This wouldn't work with Arabic page numbers, since increasing page numbers take increasing space.
Aug
7
comment Possibility of extending LaTeX capabilities given technology advancements?
One optimization that could be obtained by keeping the whole document in memory would be to first number all sections and equations etc, then resolve references done through \ref, then typeset. In the absence of \pageref, all of the typeset content would be known on a first pass, which reduces the total compilation time.
Aug
5
comment Debugging Advice: Dimension too large (Need stack trace)
\typeout{foobar} writes foobar to the log and terminal, while \immediate\write-1{foobar} writes foobar to the log only.
Aug
5
comment Debugging Advice: Dimension too large (Need stack trace)
Small correction to Andrew's comment: TeX dimensions are limited to 16383.99998pt, but TeX integers are limited to 2147483647.
Jul
31
comment Tikz: how to plot arcsec and arccos?
We do have asec and acsc in LaTeX3's l3fp, since it wasn't too hard to add.
Jul
31
comment Peek ahead a \vbox: \vsplit and reassemble again?
@egreg but less efficient memory-wise, which may occasionally matter.
Jul
26
comment Customizing names of auxiliary file: safe practices?
@egreg I like your last idea, with a first line such as %% File generated by the TeX package morewrites.
Jul
26
awarded  Nice Answer
Jul
26
asked Customizing names of auxiliary file: safe practices?
Jul
24
revised Advantages and disadvantages of fully expandable macros
Small factual error
Jul
24
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.
Jul
24
answered List of all control sequences let to primitives in common formats
Jul
24
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.
Jul
24
asked List of all control sequences let to primitives in common formats
Jul
23
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