<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en_GB"><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://www.texdev.net/feed.xml" rel="self" type="application/atom+xml" /><link href="https://www.texdev.net/" rel="alternate" type="text/html" hreflang="en_GB" /><updated>2025-09-22T10:44:28+00:00</updated><id>https://www.texdev.net/feed.xml</id><title type="html">Some TeX Developments</title><subtitle>Some TeX Developments</subtitle><author><name>Joseph Wright</name></author><entry><title type="html">Moving on from achemso</title><link href="https://www.texdev.net/2025/09/22/moving-on-from-achemso" rel="alternate" type="text/html" title="Moving on from achemso" /><published>2025-09-22T00:00:00+00:00</published><updated>2025-09-22T00:00:00+00:00</updated><id>https://www.texdev.net/2025/09/22/moving-on-from-achemso</id><content type="html" xml:base="https://www.texdev.net/2025/09/22/moving-on-from-achemso"><![CDATA[<p>The <a href="https://ctan.org/pkg/achemso"><code class="language-plaintext highlighter-rouge">achemso</code></a> package has provided the standard
BibTeX styles following the American Chemical Society (ACS) guidelines since
before I started using LaTeX. I’ve looked after <code class="language-plaintext highlighter-rouge">achemso</code> since 2008, and took
it from a simple BibTeX <code class="language-plaintext highlighter-rouge">.bst</code> to a bundle including submission class, a demo
document and other goodies.</p>

<p>I started the class many years ago, and with hindsight some of it was not such
a great plan. More importantly, the ACS have never used LaTeX in production,
which has always meant that using a dedicated class was a bit awkward: getting
things into a specific class only for them to strip that out again. I’ve
therefore recently agreed with the ACS to move from a dedicated class to a
simple template, now available <a href="https://github.com/josephwright/acs-template">on
GitHub</a> and soon to appear on the
ACS website. Authors can then simply use <code class="language-plaintext highlighter-rouge">article</code> with minor adjustments and
get something that is suitable for production.</p>

<p>At the same time, classical BibTeX styles, whilst still widely used, are
better replaced by <a href="https://ctan.org/pkg/biblatex"><code class="language-plaintext highlighter-rouge">biblatex</code></a> methods.
That opens up a lot of flexibility to the user, and avoids needing add-on
packages to provide control or compound citations.</p>

<p>So I’m marking <code class="language-plaintext highlighter-rouge">achemso</code> as for historical support only, and recommending all
new content shifts to updated approaches. I’ll keep <code class="language-plaintext highlighter-rouge">achemso</code> working of
course: not that there should be much to do! But it’s time for people to move
away from what was a rather rigid approach in new documents.</p>]]></content><author><name>Joseph Wright</name></author><category term="general" /><summary type="html"><![CDATA[The achemso package has provided the standard BibTeX styles following the American Chemical Society (ACS) guidelines since before I started using LaTeX. I’ve looked after achemso since 2008, and took it from a simple BibTeX .bst to a bundle including submission class, a demo document and other goodies.]]></summary></entry><entry><title type="html">ltx-talk: A new class for presentations</title><link href="https://www.texdev.net/2025/07/12/ltx-talk-a-new-class-for-presentations" rel="alternate" type="text/html" title="ltx-talk: A new class for presentations" /><published>2025-07-12T00:00:00+00:00</published><updated>2025-07-12T00:00:00+00:00</updated><id>https://www.texdev.net/2025/07/12/ltx-talk-a-new-class-for-presentations</id><content type="html" xml:base="https://www.texdev.net/2025/07/12/ltx-talk-a-new-class-for-presentations"><![CDATA[<p>I’ve just sent the first (v0.1.0) release of
<a href="https://ctan.org/pkg/ltx-talk"><code class="language-plaintext highlighter-rouge">ltx-talk</code></a> to CTAN. This is a new
tagging-aware class which works similarly to
<a href="https://ctan.org/pkg/beamer"><code class="language-plaintext highlighter-rouge">beamer</code></a>. I’ve <a href="/2025/02/28/the-tagging-project-and-beamer">talked
before</a> about the need to write a
class from scratch for tagged presentations, so this should be no real
surprise.</p>

<p>This is very much a work-in-progress, so don’t be surprised if things you’ve
used in <code class="language-plaintext highlighter-rouge">beamer</code> simply don’t work. But something like</p>
<div class="language-latex highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">\DocumentMetadata</span><span class="p">{</span>tagging = on<span class="p">}</span>
<span class="k">\documentclass</span><span class="p">{</span>ltx-talk<span class="p">}</span>

<span class="nt">\begin{document}</span>

<span class="nt">\begin{frame}</span>
  <span class="nt">\begin{itemize}</span>[&lt;+-&gt;]
    <span class="k">\item</span> First
    <span class="k">\item</span> Second
    <span class="k">\item</span> Third
  <span class="nt">\end{itemize}</span>
<span class="nt">\end{frame}</span>
</code></pre></div></div>
<p>will work fine.</p>

<p>If you want to see a full example, I’ve uploaded my <a href="/uploads/2025/07/Polymers.zip">lecture slides on polymer
chemistry</a>, which I’ve updated from <code class="language-plaintext highlighter-rouge">beamer</code> to
<code class="language-plaintext highlighter-rouge">ltx-talk</code> for teaching in the autumn.</p>]]></content><author><name>Joseph Wright</name></author><category term="general" /><summary type="html"><![CDATA[I’ve just sent the first (v0.1.0) release of ltx-talk to CTAN. This is a new tagging-aware class which works similarly to beamer. I’ve talked before about the need to write a class from scratch for tagged presentations, so this should be no real surprise.]]></summary></entry><entry><title type="html">ConTeXt in TeX Live</title><link href="https://www.texdev.net/2025/06/08/context-in-tex-live" rel="alternate" type="text/html" title="ConTeXt in TeX Live" /><published>2025-06-08T00:00:00+00:00</published><updated>2025-06-08T00:00:00+00:00</updated><id>https://www.texdev.net/2025/06/08/context-in-tex-live</id><content type="html" xml:base="https://www.texdev.net/2025/06/08/context-in-tex-live"><![CDATA[<p><a href="https://www.pragma-ade.nl/index.htm">ConTeXt</a> has traditionally had a somewhat
different distribution approach to other TeX code. The ConTeXt developers
provide a <a href="https://www.pragma-ade.nl/install.htm">stand-alone installer</a> which
provides the macro and Lua code which make up ConTeXt, the binaries which are
needed and fonts in a predictable way. This self-contained approach makes it
easier to ensure that macros, Lua and binaries are all matched up.</p>

<p>A version of ConTeXt does go into <a href="https://www.tug.org/texlive/">TeX Live</a>, but
to date that’s been a once-a-year change with some non-trivial work to match up
with how TeX Live works. That’s now changed: <a href="https://github.com/gucci-on-fleek">Max
Chernoff</a> has set up a <a href="https://github.com/gucci-on-fleek/context-packaging">scripted
approach</a> which
automatically does the work and means that ConTeXt in TeX Live will now only
be a day or two behind the official release.</p>

<p>This will be really useful for anyone working with mixed TeX formats (ConTeXt,
LaTeX, plain, OpTeX), as they’ll not have to worry if they are using ConTeXt
from TeX Live or from the standalone. It also means it will be easier to test
other TeX code against current ConTeXt just by using a single standard setup.
That should be good for example for testing generic
<a href="https://ctan.org/pkg/l3kernel"><code class="language-plaintext highlighter-rouge">expl3</code></a> loading in ConTeXt, something we’ve
<a href="https://github.com/latex3/latex3/issues/1724">worked on recently</a>.</p>]]></content><author><name>Joseph Wright</name></author><category term="general" /><summary type="html"><![CDATA[ConTeXt has traditionally had a somewhat different distribution approach to other TeX code. The ConTeXt developers provide a stand-alone installer which provides the macro and Lua code which make up ConTeXt, the binaries which are needed and fonts in a predictable way. This self-contained approach makes it easier to ensure that macros, Lua and binaries are all matched up.]]></summary></entry><entry><title type="html">The tagging project and beamer</title><link href="https://www.texdev.net/2025/02/28/the-tagging-project-and-beamer" rel="alternate" type="text/html" title="The tagging project and beamer" /><published>2025-02-28T00:00:00+00:00</published><updated>2025-02-28T00:00:00+00:00</updated><id>https://www.texdev.net/2025/02/28/the-tagging-project-and-beamer</id><content type="html" xml:base="https://www.texdev.net/2025/02/28/the-tagging-project-and-beamer"><![CDATA[<p>I talked <a href="/2024/09/07/tagging-project-progress">a little while ago</a> about work
that the LaTeX Project team are doing on creating tagged PDFs automatically
from ‘standard’ LaTeX sources. I promised to talk about how this might impact
<a href="https://ctan.org/pkg/beamer"><code class="language-plaintext highlighter-rouge">beamer</code></a>, and was recently reminded about that.</p>

<h2 id="the-nature-of-presentations">The nature of presentations</h2>

<p>The first thing to say is that <code class="language-plaintext highlighter-rouge">beamer</code> (or rather presentations/slides) are a
tricky topic. There is lots of (legal) pressure for people doing teaching to
provide accessible resources, which includes slides (at least to some extent).
On the other hand, there are a lot of structural things that make presentations
a lot more complexes from a tagging point of view than more classical
‘documents’ (articles and the like). Presentations also tend to be limited-life
documents: most people will revise slides each time they present, unlike an
article that once published is basically ‘frozen’. That means that the idea
that documents have to work ‘unchanged’ isn’t quite the same for <code class="language-plaintext highlighter-rouge">beamer</code> as it
is for say the <code class="language-plaintext highlighter-rouge">article</code> class. But work does need to be done.</p>

<h2 id="work-so-far">Work so far</h2>

<p>The wider reason that tagging currently doesn’t work at all with <code class="language-plaintext highlighter-rouge">beamer</code> is
that internally, the class is ‘interesting’. There is a lot of re-boxing
material, and very little in the way of semantic flow. The class also does
things its own way: that means that in a lot of places, standard LaTeX code is
ignored or overwritten, and so the work being done on tagging in general
doesn’t apply.</p>

<p>Along with other members of the team, I’ve looked at <code class="language-plaintext highlighter-rouge">beamer</code> in detail and
we’ve concluded that ‘upgrading’ to tagging isn’t realistic in the current
class. What’s needed instead is a <code class="language-plaintext highlighter-rouge">beamer</code> replacement, taking forward key
ideas (and as much of the syntax as we can), but starting from the idea of 
including tagging support.</p>

<h2 id="future-plans">Future plans</h2>

<p>Writing something that covers everything <code class="language-plaintext highlighter-rouge">beamer</code> does will take a long time,
so that’s not the initial target. Rather, we want to pick off specific areas.
First, the simple idea of a tagged structure that looks like a slide, then
moving on to simple overlays before even looking at the ‘visual effects’ that
people like to use in presentations. At the moment, the code for this effort is
not public, but once there is something that works for simple slides (like my
own teaching), that will change.</p>

<p>As well as the LaTeX Project team, there are a few other people with an
interest in this work. So I hope I can get things moving along once the basics
are in place.</p>

<h2 id="document-structure">Document structure</h2>

<p>There is a particular point to consider when tagging is that it makes little
sense to try to tag slides themselves, at least unless they use no
animations. If you think about a typical <code class="language-plaintext highlighter-rouge">beamer</code> slide such as</p>
<div class="language-latex highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">\begin{frame}</span>
  <span class="k">\frametitle</span><span class="p">{</span>Some things I did<span class="p">}</span>
  <span class="nt">\begin{itemize}</span>[&lt;+-&gt;]
    <span class="k">\item</span> One
    <span class="k">\item</span> Two
    <span class="k">\item</span> Three
  <span class="nt">\end{itemize}</span>
<span class="nt">\end{frame}</span>
</code></pre></div></div>
<p>the resulting PDF will have three pages, each of which contains at least one of
the list items, and all of which have the same title. For tagging/reuse, we
almost certainly don’t want that: we want the ‘flattened’ version (as you’d
have in an handout).</p>

<p>That looks OK if you take a simple example, but once authors start using
overlays to swap one image for another ‘in place’, <em>etc</em>., it’s no longer clear
what the right tagging might be. So part of the overall project here will be
about working with users to explore what the answers are.</p>]]></content><author><name>Joseph Wright</name></author><category term="tagging" /><summary type="html"><![CDATA[I talked a little while ago about work that the LaTeX Project team are doing on creating tagged PDFs automatically from ‘standard’ LaTeX sources. I promised to talk about how this might impact beamer, and was recently reminded about that.]]></summary></entry><entry><title type="html">LearnLaTeX in more languages</title><link href="https://www.texdev.net/2024/12/04/learnlatex-in-more-languages" rel="alternate" type="text/html" title="LearnLaTeX in more languages" /><published>2024-12-04T00:00:00+00:00</published><updated>2024-12-04T00:00:00+00:00</updated><id>https://www.texdev.net/2024/12/04/learnlatex-in-more-languages</id><content type="html" xml:base="https://www.texdev.net/2024/12/04/learnlatex-in-more-languages"><![CDATA[<p>We launched <a href="https://learnlatex.org">learnlatex</a> to provide high-quality
teaching of core LaTeX concepts with interactive examples. From the start, we
wanted to offer the ‘course’ in multiple languages: this was part of the
structure from the start.</p>

<p>Over time, several people have done the hard work of translation to several
languages. Recently, <a href="https://github.com/libralibra">Daniel Zhang</a> has
completed translations to <a href="https://www.learnlatex.org/zh-hans/">simplified</a> and
<a href="https://www.learnlatex.org/zh-hant/">traditional</a> Chinese. This meant working
on some technical aspects that don’t come up automatically for <em>e.g.</em> western
European languages. Many thanks to Daniel for the hard work.</p>

<p>There are a <a href="https://github.com/learnlatex/learnlatex.github.io/issues?q=is%3Aopen+is%3Aissue+label%3Atranslation">few
issues</a>
suggesting people started on other translations. It would be great if
interested (native) speakers took on the challenge of finishing for example
Japanese, Turkish and Korean translations, or started on other languages.</p>]]></content><author><name>Joseph Wright</name></author><category term="learnlatex" /><summary type="html"><![CDATA[We launched learnlatex to provide high-quality teaching of core LaTeX concepts with interactive examples. From the start, we wanted to offer the ‘course’ in multiple languages: this was part of the structure from the start.]]></summary></entry><entry><title type="html">The mythical LaTeX3</title><link href="https://www.texdev.net/2024/11/11/the-mythical-latex3" rel="alternate" type="text/html" title="The mythical LaTeX3" /><published>2024-11-11T00:00:00+00:00</published><updated>2024-11-11T00:00:00+00:00</updated><id>https://www.texdev.net/2024/11/11/the-mythical-latex3</id><content type="html" xml:base="https://www.texdev.net/2024/11/11/the-mythical-latex3"><![CDATA[<p>When the <a href="https://www.latex-project.org">LaTeX Project team</a> took over
maintenance of LaTeX from <a href="https://www.microsoft.com/en-us/research/people/lamport/">Leslie
Lamport</a>, LaTeX2e was
planned as an intermediate release to resolve immediate issues with the
then-current LaTeX2.09. The ‘e’ (or properly ε) was meant to indicate a small
change from LaTeX2.09, with longer-term plans centred on LaTeX3. As we know,
that proved rather hopeful, and we are still using LaTeX2e today: at least,
that’s how it still announces itself.</p>

<h2 id="the-1990s-plans">The 1990s plans</h2>

<p>The plans for LaTeX3 developed by the team in the early 1990s envisaged
reimplementing LaTeX with a much cleaner underlying programming framework and
well-defined separation of user interface, design functions and programming. A
lot of these ideas were prototyped very early on, with a version of the
programming layer created well before LaTeX2e was finalised. But performance
was the big issue: yes, you could test things as a developer, but that was
basically it. At the same time, some ideas were not fully ready: before e-TeX
(pdfTeX extensions, <em>etc.</em>), there was less that the engine could do, and
whilst Knuth’s TeX is an excellent piece of software, the LaTeX3 ideas pushed
it to the limit.</p>

<p>So LaTeX2e was released in 1994, and development focussed on packages for many
years. That meant that ‘LaTeX3’ became something of an amusing idea: talked
about but with no likelihood of (visible) delivery.</p>

<h2 id="development-into-the-2010s">Development into the 2010s</h2>

<p>Development of ‘LaTeX3’ ideas never stopped, of course: it was just that they
moved from being primarily targeting a new kernel to building on top of
LaTeX2e. That results in a bundle called <code class="language-plaintext highlighter-rouge">l3in2e</code> and one called <code class="language-plaintext highlighter-rouge">xpackages</code> on
CTAN, although both were marked as experimental.</p>

<p>When I joined the LaTeX Project team in 2009, that’s largely where things were.
However, the landscape had evolved: computers had become more powerful, e-TeX
and pdfTeX extensions to TeX were very widely available and development was
easier. That meant that LaTeX3 ideas, particularly the programming language
(<code class="language-plaintext highlighter-rouge">expl3</code>) was usable in real documents: the
<a href="https://ctan.org/pkg/fontsepc"><code class="language-plaintext highlighter-rouge">fontspec</code></a> package in particular was written
in <code class="language-plaintext highlighter-rouge">expl3</code> and was quite usable. I picked that up and wrote the second version
of <a href="jttps://ctan.org/pkg/siunitx"><code class="language-plaintext highlighter-rouge">siunitx</code></a> in <code class="language-plaintext highlighter-rouge">expl3</code>.</p>

<p>At the same time, some of my first work on the team was in getting <code class="language-plaintext highlighter-rouge">expl3</code> to
the point that the ‘experimental’ was no longer really true: you could use it
in a package and be happy that the code would continue to work between
releases. The other major task early in my team career was getting us into a
position that releases, first of <code class="language-plaintext highlighter-rouge">expl3</code> and then of the LaTeX2e kernel, were
easy to make from whatever platform we wanted: Linux, macOS and Windows.</p>

<p>Over the 2010s, this meant the team could round out ideas that had been
suggested first over 20 years before. Development was still as packages adding
on to the kernel, but <code class="language-plaintext highlighter-rouge">xparse</code> (document commands), <code class="language-plaintext highlighter-rouge">xtemplate</code> (flexible
document structures) and <code class="language-plaintext highlighter-rouge">xgalley</code> (a new approach to the main vertical list)
were all revised and testable.</p>

<h2 id="the-2020s-latex2e-2020-02-02-and-beyond">The 2020s: LaTeX2e 2020-02-02 and beyond</h2>

<p>By 2020, work on the core idea of a programming layer had reached the point
that the code was stable and performant, and that the team wanted to be able to
rely on it for  kernel developments. So we took the step to integrate loading
<code class="language-plaintext highlighter-rouge">expl3</code> into the LaTeX2e kernel, with the rather cryptic description ‘Improved
load times for <code class="language-plaintext highlighter-rouge">expl3</code>’ in <em>LaTeX News</em>. Following that, <code class="language-plaintext highlighter-rouge">xparse</code> and
<code class="language-plaintext highlighter-rouge">xtemplate</code> have also been (largely) added to the kernel, tightening up the
parts that worked from those that do turn out to have been purely experiments.</p>

<p>With this functionality available, new ideas such as hook management and
re-implementation of older ones such as lists is possible: some of that is
currently only activated if you use <code class="language-plaintext highlighter-rouge">\DocumentMetadata</code> as a ‘marker’. For
updated documents, that means many of the LaTeX3 ideas are being used: the
programming layer, a way of making document commands (<code class="language-plaintext highlighter-rouge">\NewDocumentCommand</code>
originally from <code class="language-plaintext highlighter-rouge">xparse</code>) and templates (originally from <code class="language-plaintext highlighter-rouge">xtemplate</code> and used
to update list code, etc.).</p>

<p>There are also more subtle changes across the kernel, for example updating
commands to use UTF-8 everywhere, make more functions engine-robust, etc. Put
together, the 2024 LaTeX2e is quite different from the 1994 one: but you can
still rely on the long-term stability that’s always been there.</p>

<h2 id="conclusions">Conclusions</h2>

<p>Whilst there will never be a stand-alone ‘LaTeX3’ format, the ideas that were
first explored by the LaTeX Project team in the early 1990s are now available
to users in the LaTeX kernel. They are being used to deliver an updated LaTeX
capable of producing accessible documents, and more widely to bring
customisation to the kernel. So whilst ‘LaTeX3’ might not be something you’ll
ever say you use, if you use LaTeX, you are getting those features today.</p>]]></content><author><name>Joseph Wright</name></author><category term="expl3" /><summary type="html"><![CDATA[When the LaTeX Project team took over maintenance of LaTeX from Leslie Lamport, LaTeX2e was planned as an intermediate release to resolve immediate issues with the then-current LaTeX2.09. The ‘e’ (or properly ε) was meant to indicate a small change from LaTeX2.09, with longer-term plans centred on LaTeX3. As we know, that proved rather hopeful, and we are still using LaTeX2e today: at least, that’s how it still announces itself.]]></summary></entry><entry><title type="html">Engine news from the LaTeX Project</title><link href="https://www.texdev.net/2024/11/05/engine-news-from-the-latex-project" rel="alternate" type="text/html" title="Engine news from the LaTeX Project" /><published>2024-11-05T00:00:00+00:00</published><updated>2024-11-05T00:00:00+00:00</updated><id>https://www.texdev.net/2024/11/05/engine-news-from-the-latex-project</id><content type="html" xml:base="https://www.texdev.net/2024/11/05/engine-news-from-the-latex-project"><![CDATA[<p>The latest release of LaTeX went to <a href="https://ctan.org">CTAN</a> on Friday, and
moves us forward in truly automatic tagging for PDFs, particularly for
mathematics. As part of the work, we have been looking at the capabilities of
different engines. Here, I want to summarise what users should take from that
for existing and for new documents.</p>

<h2 id="luatex">LuaTeX</h2>

<p>LuaTeX offers the widest range of features, including the ability to access the
node list as it’s constructed. We can use that to generate MathML automatically
for math mode fragments. It also allows us to do tagging in fewer passes than
in other engines and offers support for larger documents (due to dynamic memory
allocation). As such, LuaTeX is <em>the</em> recommended engine for all new documents.</p>

<p>Work is continuing on adjusting parts of the setup to improve automation here:
for the present, you should be using</p>
<div class="language-latex highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">\usepackage</span><span class="p">{</span>unicode-math<span class="p">}</span>
</code></pre></div></div>
<p>to get the best results for math mode.</p>

<h2 id="xetex">XeTeX</h2>

<p>The situation with XeTeX contrasts strongly with LuaTeX: although both are
Unicode engines, XeTeX has none of the flexibility available in LuaTeX. There
are significant technical limitations which mean that XeTeX cannot create
accessible PDFs at all: this is unlikely to change. The engine itself is
unmaintained, and with no access to internals, fixing the current issues alone
would not really help. XeTeX does not produce PDFs directly, and that
essentially rules out full tagging support (see below).</p>

<p>All of this means it is time to move away from XeTeX: certainly for new
documents, and even for existing ones. Users should look at alternative
approaches here, even if it means some source changes. This is most obvious for
users of <a href="https://ctan.org/pkg/xecjk"><code class="language-plaintext highlighter-rouge">xeCJK</code></a>, who will need to look at the
methods offered by <a href="https://ctan.org/pkg/luatexja"><code class="language-plaintext highlighter-rouge">luatexja</code></a> instead: whilst
the latter is described as for Japanese, the underlying mechanisms should be
suitable for other East Asian languages.</p>

<h2 id="pdftex">pdfTeX</h2>

<p>pdfTeX is widely used as it is superbly stable and fast, at least if you are
dealing with languages where an 8-bit approach works. There are as a result a
vast body of existing LaTeX documents which rely on pdfTeX. As such, the LaTeX
Project are working to produce fully tagged PDFs from these sources, although
we cannot do quite the same job as with LuaTeX.</p>

<p>For new documents, moving to LuaTeX is the recommended approach: it will
continue to offer the most complete tagging support. For existing documents,
tagging is available and we hope to improve it further: this may eventually use
a LuaTeX-based approach emulating 8-bit approaches. At present, however,
tagging in pdfTeX is more limited than in LuaTeX.</p>

<h2 id="other-engines">Other engines</h2>

<p>There are other engines, most notable (u)pTeX. Like XeTeX, these do not
generate PDF directly, so may well be more limited in tagging support. Unlike
XeTeX, other engines do have (small) support teams and so may see developments
that help with tagging. However, the LaTeX Project team do not test these
engines, and so where possible a move to LuaTeX is suggested.</p>

<h2 id="conclusions">Conclusions</h2>

<p>The time to move to LuaTeX for new LaTeX documents is here. For existing pdfTeX
sources, tagging will be available, although it may be more limited than for
LuaTeX. pdfTeX users can keep their existing sources and will see tagging
available. XeTeX users really do need to re-work their sources for LuaTeX.</p>]]></content><author><name>Joseph Wright</name></author><category term="General" /><summary type="html"><![CDATA[The latest release of LaTeX went to CTAN on Friday, and moves us forward in truly automatic tagging for PDFs, particularly for mathematics. As part of the work, we have been looking at the capabilities of different engines. Here, I want to summarise what users should take from that for existing and for new documents.]]></summary></entry><entry><title type="html">Tagging project progress</title><link href="https://www.texdev.net/2024/09/07/tagging-project-progress" rel="alternate" type="text/html" title="Tagging project progress" /><published>2024-09-07T00:00:00+00:00</published><updated>2024-09-07T00:00:00+00:00</updated><id>https://www.texdev.net/2024/09/07/tagging-project-progress</id><content type="html" xml:base="https://www.texdev.net/2024/09/07/tagging-project-progress"><![CDATA[<p>The <a href="https://www.latex-project-org/">LaTeX Project</a> have been working for about
4 years now on creation of automatically tagged PDFs from (more-or-less)
unmodified LaTeX documents. We’ve been reporting regularly in <em>LaTeX News</em>, and
things are moving forward nicely.</p>

<p>We (Frank, Ulrike and I) went to the recent <a href="https://www.documentengineering.org/doceng2024">DocEng
2024</a> conference in San José.
Ulrike presented a workshop showing what is doable right now with the updated
code. At present, this is still an opt-in testphase, but most of the time</p>
<div class="language-latex highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">\DocumentMetadata</span><span class="p">{</span>testphase = <span class="p">{</span>phase-III,firstaid,math,table,title<span class="p">}}</span>
</code></pre></div></div>
<p>is enough to use it. As you can probably tell, this uses the current (phase
III) code plus add-ons for maths, tables and titles: that is all a bit more
experimental but is worth exploring.</p>

<p>We are building up an idea of which packages and classes work out-of-the-box
with the latest code: you can <a href="https://latex3.github.io/tagging-project/tagging-status/">view the current list online</a>. It’s amazing how many
packages already work, but of course there is work to do. I’ve got some
adjustments to make for <a href="https://ctan.org/pkg/siunitx"><code class="language-plaintext highlighter-rouge">siunitx</code></a>, but as the
tagging structures are still not finalised, I’m waiting a bit. We also need to
look at performance: tagging takes time, but when we make it opt-out we need it
to be as fast as possible.</p>

<p>On the to-do list here is <code class="language-plaintext highlighter-rouge">beamer</code>: a complex class with a lot of challenges! I
think that deserves it’s own post, so I’ll return to that soon in a dedicated
post.</p>

<p>But for day-to-day use, I’m finding tagging something I can mainly switch on
and just use. So other than slides, all of my LaTeX work is now tagged - may
not perfectly just yet, but each release getting better and better.</p>]]></content><author><name>Joseph Wright</name></author><category term="tagging" /><summary type="html"><![CDATA[The LaTeX Project have been working for about 4 years now on creation of automatically tagged PDFs from (more-or-less) unmodified LaTeX documents. We’ve been reporting regularly in LaTeX News, and things are moving forward nicely.]]></summary></entry><entry><title type="html">Get the Jag: from x-type to e-type</title><link href="https://www.texdev.net/2023/10/10/get-the-jag-from-x-type-to-e-type" rel="alternate" type="text/html" title="Get the Jag: from x-type to e-type" /><published>2023-10-10T00:00:00+00:00</published><updated>2023-10-10T00:00:00+00:00</updated><id>https://www.texdev.net/2023/10/10/get-the-jag-from-x-type-to-e-type</id><content type="html" xml:base="https://www.texdev.net/2023/10/10/get-the-jag-from-x-type-to-e-type"><![CDATA[<p>Controlling expansion has been a key part of <code class="language-plaintext highlighter-rouge">expl3</code> from day one. A basic
<code class="language-plaintext highlighter-rouge">expl3</code> function name such as <code class="language-plaintext highlighter-rouge">\foo:nn</code> shows how many unmodified braced
arguments it takes: so called <code class="language-plaintext highlighter-rouge">n</code>-type arguments. We can then create <em>variants</em>,
which can lead to expansion only once (<code class="language-plaintext highlighter-rouge">o</code>-type), to the value of a variable
(<code class="language-plaintext highlighter-rouge">V</code>-type) or to the value retrieved by constructing the name of a variable and
<em>then</em> finding the value (<code class="language-plaintext highlighter-rouge">v</code>-type). We can do the same with single-token
(<code class="language-plaintext highlighter-rouge">N</code>-type) arguments, which are often themselves functions and can be given as a
constructed name (<code class="language-plaintext highlighter-rouge">c</code>-type).</p>

<p>How about exhaustively expanding <em>all</em> of the tokens in an argument? To date,
that has been handled by <code class="language-plaintext highlighter-rouge">x</code>-type expansion. This uses <code class="language-plaintext highlighter-rouge">\edef</code>
behind-the-scenes, so the experienced TeX programmer will see that it cannot
itself work in an expansion context. Using <code class="language-plaintext highlighter-rouge">\edef</code> also has the side effect that
<code class="language-plaintext highlighter-rouge">#</code> tokens need to be doubled in the input.</p>

<h2 id="enter-expanded">Enter <code class="language-plaintext highlighter-rouge">\expanded</code></h2>

<p>A little while ago now, the LaTeX Team arranged for a <a href="/2018/12/06/a-new-primitive-expanded">‘new’ primitive
<code class="language-plaintext highlighter-rouge">\expanded</code> to be added to the major TeX
engines</a>. This works almost in the same
way as <code class="language-plaintext highlighter-rouge">\edef</code> except that it is itself expandable <em>and</em> it does not require <code class="language-plaintext highlighter-rouge">#</code>
tokens to be doubled. Using this primitive, we added <code class="language-plaintext highlighter-rouge">e</code>-type expansion to
<code class="language-plaintext highlighter-rouge">expl3</code>, and have used it for creating variants of expandable functions.</p>

<p>That left us with two almost-identical variants and a tricky task giving an
explanation of which to use, as there are places we want <code class="language-plaintext highlighter-rouge">e</code>-type expansion even
if the underlying function isn’t expandable (where that <code class="language-plaintext highlighter-rouge">#</code> doubling business is
an issue). In particular, with a bit of care for a few edge cases, it turns out
that <em>everything</em> that is set up for <code class="language-plaintext highlighter-rouge">x</code>-type expansion can be converted to
<code class="language-plaintext highlighter-rouge">e</code>-type. That includes things like <code class="language-plaintext highlighter-rouge">\cs_set_nopar:Npx</code>, where when you look
closely we should have called it <code class="language-plaintext highlighter-rouge">\cs_set_nopar:Npe</code> from the word go: there’s
no <code class="language-plaintext highlighter-rouge">#</code> doubling as this is just <code class="language-plaintext highlighter-rouge">\edef</code> renamed.</p>

<h2 id="the-pivot">The pivot</h2>

<p>So we’ve now made the decision to pivot toward <code class="language-plaintext highlighter-rouge">e</code>-type expansion across the
board. We’ll be retaining the (now deprecated) <code class="language-plaintext highlighter-rouge">x</code>-type variants that are
already in <code class="language-plaintext highlighter-rouge">expl3</code>, but the documentation and all new variants will only be
<code class="language-plaintext highlighter-rouge">e</code>-type. Once the new release is out, package authors are encouraged to move
all of their <code class="language-plaintext highlighter-rouge">x</code>-type usage to <code class="language-plaintext highlighter-rouge">e</code>-type. The timeframe will of course depend on
the stability approach of individual package authors: for <code class="language-plaintext highlighter-rouge">siunitx</code>, I’m simply
going to step the minimum required <code class="language-plaintext highlighter-rouge">expl3</code> release and be done with it, but
others may be more cautious.</p>

<p>What is important here is that almost all users should see minimal impact:
provided the installed <code class="language-plaintext highlighter-rouge">expl3</code> core files match, there should be no obvious
change for end users. What we gain, though, at the code level is a lot more
consistency and clarity of design choice.</p>

<h2 id="one-last-variant">One last variant</h2>

<p>That leaves one additional variant: <code class="language-plaintext highlighter-rouge">f</code>-type, which is <em>almost</em> like <code class="language-plaintext highlighter-rouge">e</code>-type
but stops at the first non-expandable token. It exists largely as we needed
something expandable before we had <code class="language-plaintext highlighter-rouge">e</code>-type, but it still has a few edge use
cases. So we won’t be dropping it, but in almost all cases code using <code class="language-plaintext highlighter-rouge">f</code>-type
expansion can move to <code class="language-plaintext highlighter-rouge">e</code>-type. Again, I’ve done that in <code class="language-plaintext highlighter-rouge">siunitx</code> and will do a
sweep over the <code class="language-plaintext highlighter-rouge">expl3</code> core soon. So we can expect to see a move to almost no
use of <code class="language-plaintext highlighter-rouge">f</code>-type other than some specialist low-level places.</p>

<h2 id="a-more-consistent-variant-set">A (more) consistent variant set</h2>

<p>A key driver in the tidy up here is that we would like to provide as far as
possible pre-defined variants for the core <code class="language-plaintext highlighter-rouge">expl3</code> functions. That means having
some way of avoiding a combinatorial explosion: the more variants we need, the
more this is an issue. So we are aiming to get the ‘core’ set to <code class="language-plaintext highlighter-rouge">n</code>, <code class="language-plaintext highlighter-rouge">V</code>, <code class="language-plaintext highlighter-rouge">v</code>
and <code class="language-plaintext highlighter-rouge">e</code>, and <code class="language-plaintext highlighter-rouge">N</code> and <code class="language-plaintext highlighter-rouge">c</code>, with <code class="language-plaintext highlighter-rouge">o</code> and <code class="language-plaintext highlighter-rouge">f</code> where they are required. The latest
<code class="language-plaintext highlighter-rouge">expl3</code> release fleshes out more pre-defined variants for this set, and we
expect that to grow a little more as we try to standardise more functions around
this core set.</p>

<h2 id="programmer-action">Programmer action</h2>

<p>The keen <code class="language-plaintext highlighter-rouge">expl3</code> programmer is likely wondering what they need to do in detail.
Working on the basis that you are already requiring the <code class="language-plaintext highlighter-rouge">expl3</code> release with
these changes (2023-10-10), then</p>

<ul>
  <li>All <code class="language-plaintext highlighter-rouge">x</code>-type variants provided by <code class="language-plaintext highlighter-rouge">expl3</code> have now got a matching <code class="language-plaintext highlighter-rouge">e</code>-type, so
you can simply change the naming unless …</li>
  <li>… you have doubled <code class="language-plaintext highlighter-rouge">#</code> tokens in an argument, in which case you also need to
undouble them</li>
  <li>Replace your own <code class="language-plaintext highlighter-rouge">x</code>-type variants with <code class="language-plaintext highlighter-rouge">e</code>-type ones for internal code</li>
  <li>For your own documented variants, decide if you will retain, deprecate or
remove <code class="language-plaintext highlighter-rouge">x</code>-type</li>
</ul>

<p>As an example of the point on <code class="language-plaintext highlighter-rouge">#</code> tokens, you might currently have something like</p>
<div class="language-latex highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">\use</span>:x
  <span class="p">{</span>
    <span class="k">\cs</span><span class="p">_</span>new:Npn <span class="k">\exp</span><span class="p">_</span>not:N <span class="k">\mypkg</span><span class="p">_</span>foo:w ##1 <span class="k">\c</span><span class="p">_</span>colon<span class="p">_</span>str ##2 <span class="k">\c</span><span class="p">_</span>underscore<span class="p">_</span>str
      <span class="p">{</span>
        <span class="c">% Code using ##1 and ##2</span>
      <span class="p">}</span>
  <span class="p">}</span>
</code></pre></div></div>
<p>which would need to change to</p>
<div class="language-latex highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">\use</span>:e
  <span class="p">{</span>
    <span class="k">\cs</span><span class="p">_</span>new:Npn <span class="k">\exp</span><span class="p">_</span>not:N <span class="k">\mypkg</span><span class="p">_</span>foo:w #1 <span class="k">\c</span><span class="p">_</span>colon<span class="p">_</span>str #2 <span class="k">\c</span><span class="p">_</span>underscore<span class="p">_</span>str
      <span class="p">{</span>
        <span class="c">% Code using #1 and #2</span>
      <span class="p">}</span>
  <span class="p">}</span>
</code></pre></div></div>
<p>Of course, if there are no doubled <code class="language-plaintext highlighter-rouge">#</code> to worry about, it’s really just a
search-and-replace. So we can all now get on and use the ‘Jag’!</p>]]></content><author><name>Joseph Wright</name></author><category term="expl3" /><summary type="html"><![CDATA[Controlling expansion has been a key part of expl3 from day one. A basic expl3 function name such as \foo:nn shows how many unmodified braced arguments it takes: so called n-type arguments. We can then create variants, which can lead to expansion only once (o-type), to the value of a variable (V-type) or to the value retrieved by constructing the name of a variable and then finding the value (v-type). We can do the same with single-token (N-type) arguments, which are often themselves functions and can be given as a constructed name (c-type).]]></summary></entry><entry><title type="html">Uncertainties in siunitx</title><link href="https://www.texdev.net/2023/08/2/uncertainties-in-siunitx" rel="alternate" type="text/html" title="Uncertainties in siunitx" /><published>2023-08-02T00:00:00+00:00</published><updated>2023-08-02T00:00:00+00:00</updated><id>https://www.texdev.net/2023/08/2/uncertainties-in-siunitx</id><content type="html" xml:base="https://www.texdev.net/2023/08/2/uncertainties-in-siunitx"><![CDATA[<p>Right from the first version, <code class="language-plaintext highlighter-rouge">siunitx</code> has supported uncertainty values in
numbers. Uncertainties are a key piece of information about a lot of scientific
values, and so it’s important to have a convenient way to present them.</p>

<p>The most common uncertainty we see is one that is symmetrical, a value
plus-or-minus some number, for example 1.23 ± 0.04. This could be a standard
deviation from repeated measurement, or a tolerance, or derived some other way.
Luckily for me, the <em>source</em> of such a value doesn’t matter: <code class="language-plaintext highlighter-rouge">siunitx</code> just
needs to be able to read the input, store it and print the output. For both
reading and printing, <code class="language-plaintext highlighter-rouge">siunitx</code> has two ways of handling these symmetrical
uncertainties</p>

<ul>
  <li>A ‘long’ form, in which the uncertainty is given as a complete number, for
example 1.23 ± 0.04</li>
  <li>A ‘compact’ form, in which the uncertainly is shown relative to the digits in
the main value, for example 1.23(4)</li>
</ul>

<p>In version 3 of <code class="language-plaintext highlighter-rouge">siunitx</code>, I took that existing support and added a
long-requested new feature: rounding to an uncertainty. That means that if you
have something like 1.2345 ± 0.0367 and ask to round to one place, the
uncertainty is first rounded (to 0.04), then the main value is rounded to the
same precision (to 1.23).</p>

<p>Building on that, v3.1 added the idea of multiple uncertainties. These come up
in some areas (astronomy is one, particle physics another) where there are clear
sources of distinct uncertainty elements. Supporting multiple uncertainties also
means supporting <em>descriptions</em> for them: if you are dividing up uncertainty,
you likely want to say why. So in v3.1, you can say <code class="language-plaintext highlighter-rouge">1.23(4)(5)</code> or <code class="language-plaintext highlighter-rouge">1.23 ± 0.04
± 0.05</code>, and set up the descriptors, and have something like <code class="language-plaintext highlighter-rouge">1.23 ± 0.04 (sys)
± 0.05 (stat)</code> get printed. I’ve not had any feedback yet on this new feature:
fingers-crossed that means it all works 100%!</p>

<p>Now, for v3.3, I’ve looked at another long-standing request: asymmetric
uncertainties. For this release, I’ve kept this area simple, as it’s one I know
less about. There’s just a ‘compact’ input form, and one (compact) output form.
So we can input <code class="language-plaintext highlighter-rouge">1.23(4:5)</code> and get in TeX terms <code class="language-plaintext highlighter-rouge">$1.23^{+0.04}_{-0.05}$</code>
typeset. Asymmetric and symmetric uncertainties can be intermixed, and you can
have multiple asymmetric ones. I’m hoping this feature gets picked up by users,
and that I get some idea of what to do next. I suspect there might be
alternative output formats requested, and I wonder whether a ‘long’ input form
<code class="language-plaintext highlighter-rouge">1.23 + 0.04 - 0.05</code> will be asked for: I’ve not done that yet as it’s more
tricky if the user misses one part out!</p>

<p>Hopefully, with the introduction of asymmetric uncertainty support, <code class="language-plaintext highlighter-rouge">siunitx</code>
covers just about all types of uncertainty in scientific data: aiming to be a
<em>comprehensive</em> (SI) units package, after all!</p>]]></content><author><name>Joseph Wright</name></author><category term="siunitx" /><summary type="html"><![CDATA[Right from the first version, siunitx has supported uncertainty values in numbers. Uncertainties are a key piece of information about a lot of scientific values, and so it’s important to have a convenient way to present them.]]></summary></entry></feed>