Chapter 16 – Exploring Technology: From Engines to AI

For the new third edition, I’ll add code for various TeX engines and formats that you can explore.

In addition, I’ll give examples of how to use AI tools for coding and improving content.

Stay tuned for a few days for more!

%!TEX lualatex
\documentclass[border=10pt]{standalone}
\usepackage{luacode}
\begin{luacode}
  function GCD(a,b)
    if b ~= 0 then
        return GCD(b, a % b)
    else
        return a
    end
  end
\end{luacode}
\begin{document}
The greatest common divisor of 96 and 36 is
\directlua{tex.sprint(GCD(96,36))}.
\end{document}
%!TEX context
\setuppapersize[A4]
\starttext
\startchapter[title={Equations}, reference=ch:eq]
\startsection[title={Quadratic equations}, reference=sec:quad]
A quadratic equation is an equation of the form
\startformula
  ax^2 + bx + c = 0
\stopformula
where \(a\), \(b\), and \(c\) are constants and \(a \neq 0\).
\stopsection
\stopchapter
\stoptext


This code is available on Github. It is licensed under the MIT License, a short and simple permissive license with conditions only requiring preservation of copyright and license notices.