Some TeX Developments

August 20, 2020

\NewDocumentCommand versus \newcommand versus ...

Creating new document commands in LaTeX has traditionally been the job of \newcommand. This lets you create command with mandatory arguments, and can also add a first optional argument. However, it can’t create more complex commands: LaTeX uses for example stars, multiple optional arguments, etc. To create these, the kernel itself uses lower-level TeX programming. But this is opaque to many users, and a variety of packages have been created to ease the burden.

August 19, 2020

The good, the bad and the ugly: creating document commands

Creating document commands in LaTeX has traditionally involved a mix of \newcommand, semi-internal kernel commands (like \@ifnextchar and \@ifstar) and low-level TeX programming using \def. As part of wider efforts to improve LaTeX, the team have over the past few years improved xparse to the point where it is capable of creating a vast array of document commands.

January 15, 2020

Case changing in expl3

A few years ago I wrote about the work the LaTeX team were doing on providing case changing functions in expl3. Since then, the code has been tested and revised, and very recently has moved to a ‘final’ home within expl3. It therefore seems like a good time to look again at what the challenges are and what tools we’ve provided.

November 2, 2019

siunitx v3 alpha 2

I’ve been talking about a new version of siunitx for a number of years now, and progress has been slower than I’d hoped.

September 6, 2019

Finding files by expansion

The TeX core situation

March 17, 2019

TeXworks v0.63

Regular readers will know that I’m a fan of the light-weight TeXworks editor. It keeps the user interface pared down, letting both new and experienced users focus on their input, whilst at the same time having lots of handy features.

March 7, 2019

Collecting environment content using xparse

LaTeX environments are almost always used for cases where the content does not make sense as a macro argument. That can happen for example because there are clear ‘start’ and ‘end’ conditions, because the content is long and open-ended, or because category code changes are needed.

January 1, 2019

Ten years of Some TeX Developments

Just over ten years ago, I decided to establish a blog about TeX matters. After a bit of consideration and searching, I found that texdev.net was available, and decided to call the blog Some TeX Developments.

December 9, 2018

Floating point calculations in LaTeX

TeX does not include any ‘native’ support for floating point calculations, but that has not stopped lots of (La)TeX users wanting to do sums (and more complicated things) in their document. As TeX is Turing complete, it’s not a surprise that there are several ways to implement calculations. For end users, the differences between these are not important: what is key is what to use. Here, I’ll give a bit of background, look at the various possibilities, then move on to give a recommendation.

December 6, 2018

Bringing XeTeX into line

In parallel with work on the \expanded primitive, I’ve been working recently on bringing the ‘utility’ primitives in XeTeX into line with those in pdfTeX, pTeX and upTeX.


Full post archive