• Overriding the column number for enumext inline list items
    by Teepeemm on May 9, 2026 at 2:34 pm

    The enumext package allows inline lists with a set number of columns that can be overridden, like this: \documentclass{article} \usepackage{enumext} \begin{document} \begin{enumext*}[columns=2] \item Short \item Short \item Short \item Short \item(2) A longer item that takes both columns to show \item Short \item Short \item Short \item Short \end{enumext*} \end{document} This works well if most items need the short column, and there's an occasional longer item. I have the opposite setup: most of my items are longer, but there's an occasional pair of short items. I could do this with: \documentclass{article} \usepackage{enumext} \begin{document} \begin{enumext*}[columns=2] \item(2) A longer item that takes both columns to show \item(2) A longer item that takes both columns to show \item Short \item Short \item(2) A longer item that takes both columns to show \item(2) A longer item that takes both columns to show \end{enumext*} \end{document} But writing (2) every time is annoying. Is there a way to say that (2) is the default, and then specify (1) for the short items? Something like: \documentclass{article} \usepackage{enumext} \begin{document} \begin{enumext*}[columns=2,item-columns=2] % Package enumext Error: The key 'item-columns=2' is unknown by environment 'enumext*' and is being ignored. \item A longer item that takes both columns to show \item A longer item that takes both columns to show \item(1) Short \item(1) Short \item A longer item that takes both columns to show \item A longer item that takes both columns to show \end{enumext*} \end{document} I've tried \NewCommandCopy\olditem\item \RenewDocumentCommand\item{D(2)}{\olditem(#1)} Within the {enumext*} environment this causes an error ("! Missing number, treated as zero." and then a fatal error). Outside the environment this causes the next item to display as "()2).[]", but with less spacing. (Note that this document needs to be tagged, so using the enumitem or enumerate packages is not an option.)

  • How to make the `\hrule` in custom math symbol rounded?
    by Explorer on May 9, 2026 at 1:05 pm

    Learning from the classical egreg's solution for example here and here, I try to construct the custom symbols: with the following code: \documentclass{article} \usepackage{amsmath} \makeatletter \newcommand{\myge}{\mathrel{\mathpalette\myrel@{\@firstoftwo}}} \newcommand{\myle}{\mathrel{\mathpalette\myrel@{\@secondoftwo}}} \newcommand{\myrel@}[2]{% \begingroup \setbox\z@=\hbox{$\m@th#1=$}% \vcenter to \dimexpr.75\ht\z@\relax{% #2{% \hrule width \dimexpr2\wd\z@\relax \vfill \hrule width \wd\z@ }{% \hrule width \wd\z@ \vfill \hrule width \dimexpr2\wd\z@\relax }% }% \endgroup } \makeatother \begin{document} \[ a \myge b \quad a \myle b \] \[ \displaystyle a \myge b \quad \textstyle a \myge b \quad {}_{\scriptstyle a \myge b} \quad {}_{\scriptscriptstyle a \myge b} \] \[ \displaystyle a \myle b \quad \textstyle a \myle b \quad {}_{\scriptstyle a \myle b} \quad {}_{\scriptscriptstyle a \myle b} \] \end{document} but which gives: I want to know that, based on my code, any suggestions to change the rule from butt to rounded? I don't think with tikz is a good choice... here...

  • Lua based solution for tracking equivalent to fontspec LetterSpace Opentype feature
    by David Purton on May 9, 2026 at 10:41 am

    I've been using the OpenType LetterSpace font feature to adjust tracking. It does what I want, but has the side effect of creating a new font instance, which is annoying when babel is in use as the newly created instance is not known to babel. I'd like a drop in alternative implemented in Lua that behaves the same. But it's beyond my skill and understanding. Requirements: No change in the word spacing (like fontspec). Like for like behaviour when same number is supplied as I was using with LetterSpace (I already spent time tuning things to this number). Group safe. Switch-like behaviour (like \bfseries). Optional compatibility with the microtype package if loaded. I probably don't care specifically what happens if you try and use both tracking methods at the same time – one or the other in use is sufficient. But other microtype features need to still work (like protrusion, etc.). Here's a MWE that shows the current behaviour I have with the LetterSpace option. If possible, I'd like the numbers and output to match. %! TeX Program = lualatex \documentclass{article} \pagestyle{empty} \usepackage{fontspec} \setmainfont{Noto Serif} \newlength{\testlen} \newcommand{\settracking}[1]{% \addfontfeatures{LetterSpace=#1}} \begin{document} \begin{tabbing} \settowidth{\global\testlen}{Test Test} Test Test \= width: \the\testlen \\ \settracking{-5}\settowidth{\global\testlen}{Test Test} Test Test \> width: \the\testlen \\ \settowidth{\global\testlen}{Test Test} Test Test \> width: \the\testlen \\ \end{tabbing} \end{document}

  • negating math symbols
    by Antonis on May 9, 2026 at 10:36 am

    I have been asked to introduced negated mathrel symbols in NewCM that do not exist in Unicode standard. Before I get into adding extra symbols in NewCMMath I would like to make sure that a macro does not suffice. I tested with the \not command or relative packages like centernot without good results. Then there is \ooalign. For example, \documentclass{article} \usepackage[olddefault]{fontsetup} \makeatletter \newcommand{\ndisin}{\mathrel{\mathpalette\overlay@slash\disin}} \newcommand{\overlay@slash}[2]{% \ooalign{$\m@th#1#2$\cr\hss$\m@th#1/$\hss}% } \makeatother \begin{document} $y\ndisin A_{y\ndisin A_{y\ndisin A}}$ \end{document} Produces This shows that exactly centering the two symbols is not always good. The slash should be better placed a bit to the right (centered with respect to \in). So the question is if it is possible to make such adjustments on the above or other code to get the desired result, or one has to go to the font level and design new characters.

  • Paragraph numbering breaks after description environment
    by Daniel Zuluaga on May 9, 2026 at 10:14 am

    I cannot figure out, why this paragraph numbering breaks after the description environment and would value any insight into the problem! \documentclass{article} \usepackage{lipsum} % For dummy text \usepackage{etoolbox} % For \preto % Paragraph numbering setup \normalmarginpar \setlength{\marginparwidth}{0.7cm} \setlength{\marginparsep}{0.5em} \newcounter{parnum} \newif\ifnumberparagraphs \numberparagraphstrue \newcommand*{\numberedparagraph}{% \ifnumberparagraphs \leavevmode\refstepcounter{parnum}% \label{par:\thesection.\arabic{parnum}}% \marginpar{\raggedleft\scriptsize\thesection.\arabic{parnum}}% \fi } \makeatletter % Reset counter at each section \preto\section{\setcounter{parnum}{0}} % Auto-number paragraphs \renewcommand{\@afterheading}{% \@nobreaktrue \everypar{% \if@nobreak \@nobreakfalse \clubpenalty\@M \if@afterindent \else {\setbox\z@\lastbox}\fi \else \clubpenalty\@clubpenalty \fi \numberedparagraph }% } \makeatother \setlength{\parindent}{2em} \setlength{\parskip}{0.5\baselineskip} \begin{document} \section{Testing Paragraph Numbering After Description} \subsection{Before the description environment} This is the first paragraph. It should be numbered 1.1.1. This is the second paragraph. It should be numbered 1.1.2. This is the third paragraph. It should be numbered 1.1.3. \subsection{Now with a description environment} Here's a paragraph right before the description. It should be numbered 1.2.1. \begin{description} \item[First Term] This is the description for the first term. No paragraph numbers should appear inside the description environment. \item[Second Term] This is the description for the second term. These lines are part of the description and should not have numbers. \item[Third Term] This description spans multiple lines. Still no paragraph numbers here. \end{description} This is the first paragraph AFTER the description environment. With our fix, it should be numbered 1.2.2. This is the second paragraph after the description. It should be numbered 1.2.3. This is the third paragraph after the description. It should be numbered 1.2.4. \subsection{Multiple description environments in a row} Paragraph before second description. Should be numbered 1.3.1. \begin{description} \item[Test A] Description A \item[Test B] Description B \end{description} First paragraph after second description. Should be numbered 1.3.2. Second paragraph after second description. Should be numbered 1.3.3. \begin{description} \item[Example 1] Example description 1 \item[Example 2] Example description 2 \end{description} First paragraph after third description. Should be numbered 1.3.4. \subsection{Nested environments} Paragraph before nested environment. Should be numbered 1.4.1. \begin{description} \item[Outer Term] \begin{description} \item[Inner Term] Inner description \end{description} This is still part of the outer description. \end{description} First paragraph after nested description. Should be numbered 1.4.2. Second paragraph after nested description. Should be numbered 1.4.3. \section{Second Section} \subsection{New section, new numbering} Paragraph in new section. Should be numbered 2.1.1. \begin{description} \item[Something] Some description \end{description} Paragraph after description in new section. Should be numbered 2.1.2. This is another paragraph. Should be numbered 2.1.3. \subsection{Testing with longer text} \lipsum[1][1-2] \begin{description} \item[Key Point] This is an important description that might span multiple lines. \item[Another Point] Yet another description. \end{description} \lipsum[2][1-3] \lipsum[3][1-2] \section{Conclusion} The fix works correctly if you see consecutive paragraph numbers (1.5.1, 1.5.2, 1.5.3, etc.) both before and after all description environments, with no gaps or missing numbers. \end{document}

  • HyperSnips extension triggers \dots when typing a period in LaTeX, interfering with normal punctuation in VSCode
    by user199927 on May 9, 2026 at 4:42 am

    I am using VS Code with the LaTeX Workshop extension on Windows 11. Recently, I installed HyperSnips and encountered an annoying issue: whenever I type a period (.), it automatically triggers a suggestion for \dots. This is particularly frustrating when ending a sentence and starting a new line. I've tried several workarounds, but none have worked. The issue disappears when I uninstall HyperSnips, but returns as soon as I reinstall it. I’ve searched through my latex.hsnips file but couldn't find any snippet matching this behavior. I even tried deleting the file entirely, but the issue persists. How can I disable this specific behavior? Has anyone else encountered this issue? Thank you! Here is the screenshot:

  • tablenotes, spacing of superscript before right bracket
    by N. Hunt on May 9, 2026 at 4:36 am

    I am having problems with superscripts in tablenotes, specifically, when the superscript comes before a right parenthesis, they are correct, but before a right bracket, extra space is being inserted. I initially was just using the plain tnote, but that behaviour was even worse; I discovered a workaround with 'xspace' and this works apart from what I have just described. This lualatex, by the way. \documentclass[a4paper,14pt]{extarticle} \usepackage[a4paper,left=0.75in,top=0.25in,bottom=0.25in,landscape]{geometry} \usepackage{fontspec} \usepackage[main=greek]{babel} \babelprovide[onchar=ids]{american} \setmainfont[Ligatures=TeX]{Gentium} \usepackage{booktabs} \usepackage{array} \usepackage[flushleft]{threeparttable} \usepackage{xspace} \setlength{\tabcolsep}{10pt} \setlength{\parindent}{0pt} \begin{document} \thispagestyle{empty} \renewcommand{\arraystretch}{1.25} \newcommand{\tss}[1]{\textsuperscript{#1}\xspace} \begin{threeparttable} \begin{tabular}{l !{\kern20pt} l} \multicolumn{2}{c}{\textsc{First Declension}}\\ \multicolumn{1}{c}{\textsc{Masc.}} & \multicolumn{1}{c}{\textsc{Fem.}} \\ xxx, xxxx & xxx, xxx, x \\ xxx, [xxx\tss{9}] & xxx, xxxx \\ x, x & x, x \\ xxx, xxxx\phantom{, xxx} & xxx, (xxx\tss{10}), xxxx \\ xxx, xxx\tss{11}, x & [xxx\tss{12}], xxx, x \\ \multicolumn{2}{c}{x} \\ \multicolumn{2}{c}{xxx} \\ \multicolumn{2}{c}{xxx} \\ \multicolumn{2}{c}{xxx, [xxxx\tss{13}]} \\ \multicolumn{2}{c}{xxx, [xxx, xxxx, xxxx, xxx, xxxx]} \\ \multicolumn{2}{c}{xxxx} \\ \end{tabular} \begin{tablenotes} \small \item [9] Some proper names in Lesser Quux. \item [10] Some proper names in Plat., Xen., Thuc., etc. \item [11] Aristophanes and Plutarch. \item [12] Often in the poets and inscrr.; sometimes in Plato. \item [13] Foobar. \end{tablenotes} \end{threeparttable} \end{document}

  • How to use idiosyncratic fonts in current TeX
    by F. Bartlett on May 8, 2026 at 5:17 pm

    I have been using TeX since 1986 and Type 1 fonts since the early 90s, courtesy of Berthold Horn. Moreover, I created my own fontnames and mappings for T1 fonts and, therefore, tfm files. I should also mention that I have a long-standing allergy to LaTeX and its derivatives, and so work only in plain TeX. But now I have somehow modernized my TeX installation due to a disastrous update to Fedora 44, so none of my non-CM Type 1 fonts work at all. When I attempt to use, say, AGaramond-Regular, I get mktexnam errors (yes, all my font files have Adobe PostScript names): kpathsea: Running mktextfm AGaramond-Regular /usr/share/texlive/texmf-dist/web2c/mktexnam: Could not map source abbreviation A for AGaramond-Regular. /usr/share/texlive/texmf-dist/web2c/mktexnam: Need to update /usr/share/texlive/texmf-dist/fonts/map/fontname/special.map? mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; ; nonstopmode; input AGaramond-Regular This is METAFONT, Version 2.71828182 (TeX Live 2023) (preloaded base=mf) Of course, METAFONT fails in short order. Any suggestions? My preference would be to ignore all the font-handling changes made in the last few years, but I suspect that that’s a lost cause. Thanks! Fred

  • How can I list or visualize all available anchors of a CircuitTikZ component?
    by internet on May 8, 2026 at 9:31 am

    I am using CircuitTikZ and often need to connect wires or labels to component anchors. However, it is not always easy to know which anchors are available for a specific component. For example, different components may provide anchors such as north, south, in, out, gate, collector, emitter, etc., and the available anchors vary depending on the component type. When building more complicated schematics, I frequently need to stop and search through the documentation to check anchor names. I was wondering whether there is a way to programmatically: List all available anchors of a given CircuitTikZ/TikZ shape/components, and/or Visualize those anchors directly on the rendered component. For example, something conceptually like: \showanchors{a component/shape} that would either print all anchor names and draw markers/labels on the component itself. So my question is: Is there a practical way to list all anchors associated with a TikZ/CircuitTikZ shape? My motivation is mainly usability and workflow efficiency. A tool like this would make it much easier to explore unfamiliar components and reduce the need to constantly check the manual, especially for beginners or occasional CircuitTikZ users. This is an example of visualizing the anchors to help wiring from CircuiTikz documentation. A possible MWE (clearly, the pin thing must be adjusted somehow to have a better distribution, and to take into account that labels can have spaces and strange characters, but well...). The task it to substitute the \allanchors definition with something automatic, see the comment above it. \documentclass[border=10pt]{standalone} \usepackage[T1]{fontenc} \usepackage[siunitx, RPvoltages]{circuitikz} \begin{document} \begin{tikzpicture}[every pin/.append style={text=red, inner sep=1pt, font=\tiny\ttfamily}] \node [npn](myshape) at (0,0) {}; % Example: this should be autofilled % Basically, for every shape named, say, "gizmo", the anchor "spot" % is a macro named pgf@anchor@gizmo@spot % --- so to do what you want, you should be able to find all % the macros with that pattern that exist % (and I do not know if this is possible in TeX in general, % maybe in LuaTeX...). \newcommand{\allanchors}{center,E,B,south} \foreach \anc in \allanchors { \node[circ, pin=45:\anc] at (myshape.\anc) {}; } \end{tikzpicture} \end{document}

  • How to specify the empty column width in the align* environment?
    by M. Logic on May 8, 2026 at 7:14 am

    First an MWE is as follows. \documentclass{article} \usepackage{amsmath} \usepackage{amsthm} \begin{document} \begin{proof} \begin{align*}{2} x&=y&\quad&\text{test test}\\ &=z&&\text{test.}\qedhere \end{align*} \end{proof} \end{document} As you see, to make the texts be aligned left, I add an empty column in the align* environment. But the width of the empty column is too big, so is there any way to specify it? By the way, I have to use align* or align to make the square be aligned to right in the final line in proofs. Summary Combining @cfr 's solution and the solution here, the problem is solved.

  • How to get a line segment to line up nicely with a fill in TikZ?
    by Jasper on May 7, 2026 at 11:19 pm

    I have this MWE (it must be zoomed in on): I want the red line to go all the way to the green one on the top, but not exceed the dark gray on the bottom. Likewise, the green should be bounded by, and extruded to the boundary also. (The green one goes beyone on top, but we just can't see it due to the ligh gray triangle occluding it). I would like for this to be as automatic as possible. I want it to look like this: This is my use case: \documentclass[tikz,border=1cm]{standalone} \begin{document} \begin{tikzpicture} \fill[gray] (0,0) -- (1,1) -- (1,0) -- cycle; \draw[thick,green] (0.75,0.25) -- (0.25,0.25); \fill[gray!50!white] (0,0) -- (1,1) -- (0,1) -- cycle; \draw[thick,red] (0.1,0.25) -- (0.25,0.25); \end{tikzpicture} \end{document}

  • How to tell arara to output in a given directory?
    by Erwann on May 7, 2026 at 4:03 pm

    The option -output-directory works as expected using pdflatex directly, but not through an arara directive, as shown below. A similar issued was raised in 2016; checking to see what the status is. tex % arara: pdflatex: { options: "-output-directory=/home/erwann/build" } % arara: clean: { extensions: [ aux, log, listing ] } \documentclass{article} \usepackage{lipsum} \begin{document} \lipsum[1][1] \end{document} shell $ source="mwe-013.tex" dir="$HOME/build" target="${source%.tex}.pdf" wrong="$PWD/$target" expected="$dir/$target" # remove both possible outputs for file in "$wrong" "$expected"; do [[ -f "$file" ]] && rm "$file" done # run arara arara "$source" # verify output for file in "$wrong" "$expected"; do [[ -f "$file" ]] && printf "\e[31mfile exists: %s\e[0m\n" "$file" done # try with pdlatex pdflatex -output-directory="${dir}" "$source" # verify output for file in "$wrong" "$expected"; do [[ -f "$file" ]] && printf "\e[31mfile exists: %s\e[0m\n" "$file" done __ _ _ __ __ _ _ __ __ _ / _` | '__/ _` | '__/ _` | | (_| | | | (_| | | | (_| | \__,_|_| \__,_|_| \__,_| Processing "mwe-013.tex" (size: 215 B, last modified: 2026-05-07 15:54:56), please wait. (PDFLaTeX) PDFLaTeX engine .............................. SUCCESS (Clean) Cleaning feature ................................ SUCCESS (Clean) Cleaning feature ................................ SUCCESS (Clean) Cleaning feature ................................ SUCCESS Total: 0.909 seconds file exists: /home/erwann/src/tex/example/mwe-013.pdf This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode (./mwe-013.tex LaTeX2e <2025-06-01> patch level 1 L3 programming layer <2025-08-13> (/opt/texlive/2025/texmf-dist/tex/latex/base/article.cls Document Class: article 2025/01/22 v1.4n Standard LaTeX document class (/opt/texlive/2025/texmf-dist/tex/latex/base/size10.clo)) (/opt/texlive/2025/texmf-dist/tex/latex/lipsum/lipsum.sty (/opt/texlive/2025/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty (/opt/texlive/2025/texmf-dist/tex/latex/l3kernel/expl3.sty (/opt/texlive/2025/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def))) (/opt/texlive/2025/texmf-dist/tex/latex/lipsum/lipsum.ltd.tex)) (/home/erwann/build/mwe-013.aux) [1{/opt/texlive/2025/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (/home/erwann/build/mwe-013.aux) )</opt/texlive/2025/texmf-dist/fonts/type1/pub lic/amsfonts/cm/cmr10.pfb> Output written on /home/erwann/build/mwe-013.pdf (1 page, 14666 bytes). Transcript written on /home/erwann/build/mwe-013.log. file exists: /home/erwann/src/tex/example/mwe-013.pdf file exists: /home/erwann/build/mwe-013.pdf

  • Chemfig compilation error
    by Sebastian Cikes on May 7, 2026 at 3:13 pm

    I have a problem compiling a latex file. ! Undefined control sequence. \CF_compound ...ge {90=\|,-90=\|}{O}-H} \chemsign {+} \chemfig {H^{\oplus }} l.21 \chemfig {R-\chembelow{O}{\scriptstyle\oplus}(-[:90]H)-H} %% thi... ? I tried compiling without the mhchem package and various tips I found online but none of them worked. Also tried to reinstall the chemfig package but doesn't want to work. The problem also appears with simpler formulas like \chemfig{R-O}. \documentclass{article} \usepackage[version=4,arrows=pgf-filled, textfontname=sffamily, mathfontname=mathsf]{mhchem} \usepackage{chemfig} \setchemfig{atom sep=2.5em, bond offset=1pt, double bond sep=3pt} \begin{document} Meccanismo di addizione: \vspace{0.5cm} \centering \schemestart\chemfig{R-\charge{90=\|,-90=\|}{O}-H} \chemsign{+} \chemfig{H^{\oplus}} \arrow{->} \chemfig{R-\chembelow{O}{\scriptstyle\oplus}(-[:90]H)-H} %% this is the problem \schemestop \end{document} Thanks in advance. Sebastian

  • Class memoir Warning: \addtodef is marked deprecated and will be removed in 2026, but \addtodef is not being used anywhere
    by marshmelou on May 7, 2026 at 10:20 am

    I am using the memoir class to write my thesis, and I found that this warning regarding \addtodef being deprecated is triggered whenever I load the natbib package. Below is a MWE: \documentclass{memoir} \usepackage{natbib} \begin{document} Hello \end{document} If I comment out \usepackage{natbib}, the warning goes away. Does anyone know the reason for that? Is this safe to ignore? I'm just worried that I'll carry on using this and then at some point in 2026 \addtodef will be removed and for some reason that will mess up my document. Just to clarify, I am using natbib over biblatex because I am already used to it and I found biblatex to be a nightmare to format it the way I would like it to be. For completion, the full warning message is: Class memoir Warning: \addtodef is marked deprecated and will be removed in 2026, use instead \patchcmd, \pretocmd or \apptocmd from the etoolbox package (which is autoloaded by the class) on input line 5.

  • Why is there no spacing around the plus sign?
    by John Sullivan on May 7, 2026 at 10:02 am

    Why is there nice spacing around the + inside the parentheses, but not around the one just after the parentheses? \documentclass{article} \begin{document} $$-\tau N = B'=-\theta'\bigl(\cos\theta\, U + \sin\theta\, V\bigl) + 0 T = -\theta' N$$ \end{document}

  • How can I automatically adapt LaTeX content to different minipage widths, including automatic line breaks in long display equations?
    by ljguo on May 7, 2026 at 7:04 am

    I am trying to typeset exercise/question content inside containers of different widths. For example, the same content may be placed inside a minipage of width 21cm, or inside a narrower minipage of width 10cm. The content may include normal text, images, tables, and display equations. My goal is that the layout should adapt automatically to the available width. In particular, long display equations should be broken automatically when the width becomes smaller. Here is a simplified example: \documentclass{article} \usepackage{amsmath} \usepackage{graphicx} \usepackage{array} \usepackage{booktabs} \usepackage{mwe} \begin{document} \noindent \begin{minipage}{21cm} \textbf{Question 1.} A particle moves along a straight line. Its position at time \(t\) is given by the function \[ s(t)=3t^4-8t^3+6t^2-12t+5. \] The following diagram illustrates the motion of the particle: \[ \includegraphics[width=0.6\linewidth]{example-image} \] The table below gives some measured values: \[ \begin{array}{c|c|c|c|c} t & 0 & 1 & 2 & 3 \\ \hline s(t) & 5 & -6 & 9 & 86 \end{array} \] Find the velocity and acceleration of the particle at \(t=2\). Also simplify the following expression: \[ \frac{(x^2+2xy+y^2)(a^2-b^2)+(x-y)(a+b)^2} {\sqrt{x^4+2x^2y^2+y^4}+a^3b-ab^3+x^2a^2-y^2b^2} \] \end{minipage} \vspace{1cm} \noindent \begin{minipage}{10cm} \textbf{Question 1.} A particle moves along a straight line. Its position at time \(t\) is given by the function \[ s(t)=3t^4-8t^3+6t^2-12t+5. \] The following diagram illustrates the motion of the particle: \[ \includegraphics[width=0.6\linewidth]{example-image} \] The table below gives some measured values: \[ \begin{array}{c|c|c|c|c} t & 0 & 1 & 2 & 3 \\ \hline s(t) & 5 & -6 & 9 & 86 \end{array} \] Find the velocity and acceleration of the particle at \(t=2\). Also simplify the following expression: \[ \frac{(x^2+2xy+y^2)(a^2-b^2)+(x-y)(a+b)^2} {\sqrt{x^4+2x^2y^2+y^4}+a^3b-ab^3+x^2a^2-y^2b^2} \] \end{minipage} \end{document} In the wider minipage, the content looks acceptable. However, in the narrower minipage, the long display equation overflows the available width. What I would like is something like an “automatic responsive layout”: Text should wrap according to the current minipage width. Images should scale relative to the current width, for example using \linewidth. Tables should ideally fit or adapt to the available width. Long display equations should automatically break into multiple lines when necessary. I know that I can manually rewrite the long equation using environments such as align, aligned, multline, or split, for example: \begin{multline} \frac{(x^2+2xy+y^2)(a^2-b^2)+(x-y)(a+b)^2} {\sqrt{x^4+2x^2y^2+y^4}+a^3b-ab^3+x^2a^2-y^2b^2} \end{multline} But in my real use case, the LaTeX content is generated automatically, and the container width may vary. Therefore, I would prefer not to manually decide where every long formula should be broken. In my actual project, the LaTeX source is not written manually. It is generated from structured exercise data. The same exercise may be rendered in different layouts, such as a full-page layout, a two-column layout, or a card-like layout. Therefore, I am looking for a robust strategy rather than a one-off manual fix for a single equation. My questions are: Is there a recommended way in LaTeX to make mathematical content adapt automatically to different container widths? Can display equations be automatically line-broken depending on the current \linewidth? If full automatic line breaking is not possible, what is the usual robust approach for generating such content automatically? Are packages such as breqn, tabularx, adjustbox, or resizebox appropriate for this kind of problem? What is the best practice for this situation?

  • LaTeX compilation feels much slower after update
    by user3605616 on May 7, 2026 at 6:52 am

    I'm using TeXLive on a Fedora installation. I updated Fedora 43 to Fedora 44 last week, and TeXLive was updated in the process. The version used now is LaTeX2e <2025-11-01> L3 programming layer <2026-01-19> but I don't remember the previous version number. Compiling even small documents feels much slower than before (about 4 to 5 times slower). I didn't change anything to my TeX configuration. I'd like to find the cause and a solution. Is there any way to measure performance (document processing, then disk reads/writes) for TeX itself to identify the bottleneck(s)? Incidentally, the engine I use is XeTeX 3.141592653-2.6-0.999998 (TeX Live 2026) with kpathsea version 6.4.2 Thanks for any hint! Thanks

  • spacing in array environment
    by Stefan Müller on May 6, 2026 at 5:04 pm

    I have a macro for typesetting Attribute Value Matrices (AVMs). Sometimes I want to add a little bit of vertical space. My understanding is that I type \\[2mm] and then 2mm space is inserted. But this is not what happens. Sometimes I have to add 8mm or 10 or 12. It somehow seems to depend on what happened before. But why? And how does it work and is there anything I can do to get the desired behavior? \documentclass{scrartcl} \usepackage{etex} \usepackage{array} \newcommand{\nliste}[1]{% \mbox{$\langle$\upshape\normalfont#1$\rangle$}% } \newcommand{\eliste}{% \mbox{% $\left\langle\right\rangle$}% } \newcommand{\ms}[2][]{% \ifdim\lastskip=-1pt % flag value \mbox{}\\*[-.8\baselineskip]% \else \ifnum\lastpenalty=-10000 % other flag value \mbox{}\\*[-.8\baselineskip]% \fi \fi \mbox{% \delimiterfactor=1000 \delimitershortfall=0pt\tabcolsep=0pt% $\hspace{-2pt}\left[% \begin{tabular}{>{\upshape\scshape}l@{}>{\hspace*{5pt}\normalfont\itshape}l} \if\relax\detokenize{#1}\relax\else \multicolumn{2}{>{\normalfont\itshape}l}{#1}% \\% \fi% #2% \end{tabular}% \right]\hspace{-2pt}$% }% % \par\vspace{1mm}% \vspace{1mm}% } \newcommand{\ibox}[1]{{% \setlength{\fboxsep}{1.25pt}% \fbox{$\scriptstyle #1$}% }} \newcommand{\liste}[1]{% \mbox{% $% \left\langle\mbox{\upshape\normalfont#1}\right\rangle% $% }%\\[2pt]% } \newcommand{\ind}[1]{\mbox{$_{\ibox{#1}}$}} \begin{document} \ms{ \ldots & \ms{ cat & \ms{% head & verb \\ arg-st & \ibox{1} $\oplus$ \ibox{2} $\oplus$ \nliste{ V[\textit{inf}, \textsc{lex}+, \textsc{subj}~\ibox{1}, \textsc{comps}~\ibox{2}, \textsc{ltop} \ibox{3} ] } }\\ cont & \ms{ ltop & \ibox{4}\\ ind & \ibox{5} event } }\\ rels & \liste{ \ms[scheinen]{ lbl & \ibox{4}\\ arg0 & \ibox{5}\\ arg1 & \ibox{6}\\ } }\\[10mm] hcons & \liste{ \ms[qeq]{ harg & \ibox{6}\\ larg & \ibox{3}} } } \end{document}

  • Consistent scaling of Greek letters and operators when using mathptmx/Error messages with newtx
    by Dimitrios ANAGNOSTOU on May 6, 2026 at 4:14 pm

    EDIT I am using the mathptmx package to achieve a Times New Roman aesthetic. However, it seems to me that the Greek letters ($\lambda, \mu, \omega$) seem to lose their relative weight or scale inconsistently compared to the Latin constants. Is this an inherent limitation of the virtual fonts in mathptmx, and how can I force a more robust scaling for these mathematical elements? Working example: \documentclass{article} %\usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{mathptmx} % Times New Roman style \usepackage{amsmath,amssymb,amsthm} %------------------------------------------------------------- % Custom macros %------------------------------------------------------------- \newcommand{\cL}{c_{\mathrm{L}}} % longitudinal wave speed \newcommand{\cT}{c_{\mathrm{T}}} % shear wave speed \begin{document} (...) The material is assumed to be homogeneous, isotropic, linearly elastic, and lossless (non-dissipative), characterised by the real-valued Lam\'e constants $\lambda$ and $\mu$ (with $\mu > 0$ and $3\lambda + 2\mu > 0$) and mass density $\rho > 0$. The corresponding longitudinal and shear wave speeds are % \begin{equation} \cL = \sqrt{\frac{\lambda + 2\mu}{\rho}}, \qquad \cT = \sqrt{\frac{\mu}{\rho}}, \label{eq:wavespeeds} \end{equation} % with $\cL > \cT > 0$. The material obeys the generalised Hooke's law % \begin{equation} \sigma_{ij} = \lambda\,\delta_{ij}\,\varepsilon_{kk} + 2\mu\,\varepsilon_{ij}, \qquad \varepsilon_{ij} = \tfrac{1}{2}(U_{i,j} + U_{j,i}), \label{eq:hooke} \end{equation} % where $\delta_{ij}$ is the Kronecker delta and the usual summation convention over repeated indices is employed. Substituting \eqref{eq:hooke} into the equations of motion $\sigma_{ij,j} + \rho\,\partial_{tt} U_i = 0$ and using the time-harmonic ansatz, so that $\partial_{tt} \to -\omega^2$ and hence $\ddot{U}_i = -\omega^2 U_i$, yields the time-harmonic Navier equations: % \begin{equation} \mu\,\nabla^2 \mathbf{U} + (\lambda+\mu)\,\nabla(\nabla\cdot\mathbf{U}) + \rho\omega^2\,\mathbf{U} = \mathbf{0} \quad \text{in } \Omega, \label{eq:navier} \end{equation} % where $\nabla^2 = \partial^2/\partial x^2 + \partial^2/\partial y^2$ is the two-dimensional Laplacian. Equation~\eqref{eq:navier} is a system of two coupled second-order partial differential equations for $U_x$ and $U_y$. \end{document} When using the more recent \usepackage{newtx} I get error messages. LaTeX Error: Command \openbox already defined. amsthm.sty:426 Or name \end... illegal, see p.192 of the manual.name \@backslashchar \@qend ... illegal, see p.192 of the manual. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help\@err@ l.426 \vrule\hfil}} Your command was ignored. Type I <command> <return> to replace it with another command, or <return> to continue without it. LaTeX Error: Command `\Bbbk' already defined. amssymb.sty:261 See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ->\errmessage LaTeX Error: Command `\string \Bbbk ' already defined. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help\@err@ l.261 \DeclareMathSymbol{\Bbbk} {\mathord}{AMSb}{"7C} Your command was ignored. Type I <command> <return> to replace it with another command, or <return> to continue without it. Afficher moins

  • LuaLaTeX not embedding fonts
    by UniCoder1966 on May 6, 2026 at 2:31 pm

    when I open the pdf of my MWE in Adobe Acrobat and try to sign the signature field, I get the error 2013 which warns me that my fonts are not embedded. To be more precise, it's the Helvetica font that's not embedded. I thought that compiling with LuaLaTeX would make all my fonts embedded, but that's not the case. I assume that Helvetica is used by the \textfieldnew command, despite f.textFont = 'ArialMT'. \documentclass[ a4paper, fontsize=10pt headsepline=0.4pt ]{scrartcl} \usepackage[english, main=ngerman, shorthands=off]{babel} \usepackage{fontspec} \setmainfont{Arial} \setsansfont{Arial} \usepackage{eforms} \begin{document} \newcommand{\textfield}[5]{ \edef\Titel{#2} \TextField[name=#1, width=#3, charsize=10pt, height=1em, format = { var f = this.getField('#1'); f.textFont = 'ArialMT';}, #4]{}#5 } \newcommand{\textfieldnew}[5]{% \edef\Titel{#2}% \TextField[name=#1, width=#3, charsize=10pt, height=1em, format = { var f = this.getField('#1'); f.textFont = 'ArialMT';}, #4]{}% #5% } \textfieldnew{Test}{}{7.5cm}{default={Test}, onblur={this.getField('TestEN').value = event.value;}}{} \sigField{Signatur1}{7.5cm}{1.2cm} \end{document} Is there any way to embed the fonts in LaTeX or change the font of the textfields? Doing it in Adobe Acrobat is no option for me.

  • How to change the pagestyle, beginning with the first page after the table of contents, from the preamble?
    by Simon on May 6, 2026 at 1:24 pm

    Beginning with the first page after the table of contents, I want to change the pagestlye (from standard plain.scrheadings) to scrheadings, like so: \pagestyle{plain.scrheadings} \tableofcontents \clearpage \pagestyle{scrheadings} I now want to transfer these lines' effect to the preamble (located in a *.cls if this makes a difference). I would have come up with \pagestyle{plain.scrheadings} \AfterStartingTOC[toc]{ \clearpage \pagestyle{scrheadings} } that doesn't do anything (I guess it is run locally?) which is why instead I tried \pagestyle{plain.scrheadings} \AfterStartingTOC[toc]{ \clearpage \pagestyle{scrheadings} \global\let\currentpagestyle\currentpagestyle } that also doesn't do anything (although now defined globally?). I then included \pagestyle{plain.scrheadings} \AfterStartingTOC[toc]{ \clearpage \pagestyle{scrheadings} \makeatletter \global\let\@evenhead\@evenhead \global\let\@oddhead\@oddhead \global\let\@evenfoot\@evenfoot \global\let\@oddfoot\@oddfoot \makeatother } which eventually seems to have the same effect as the first lines. Is this the way to go or are there better implementations? Like this for example? \let\OldTableOfContents\tableofcontents \renewcommand{\tableofcontents}{% \OldTableOfContents \clearpage \pagestyle{scrheadings} } The MWE: \documentclass{scrreprt} \usepackage[plainheadsepline,headsepline,singlespacing]{scrlayer-scrpage} \clearpairofpagestyles \lohead*{Name} \rohead*{Thesis Type} \rofoot{\pagemark} \pagestyle{plain.scrheadings} \begin{document} \chapter*{Chapter before the ToC} \tableofcontents %These lines' effect should be transferred to the preamble: \clearpage \pagestyle{scrheadings} % \chapter{Chapter after the ToC} There is text here ...\newpage ... and here ... \end{document}

  • Drawing a half-space figure (à la elasticity/elastodynamics books)
    by Dimitrios ANAGNOSTOU on May 6, 2026 at 11:46 am

    Extension of my question for half plane. I want to be able to draw figures like the following one (i.e. figures for the classic Boussinesq/Lamb problems). After some trial and error, inspired by the following answer in a recent question of mine I got something not bad. \documentclass{standalone} \usepackage{tikz} \usepackage{amsmath} \usetikzlibrary{decorations.pathmorphing, shadings, arrows.meta, calc} \tikzset{ potato/.style={ rounded corners=2pt, decorate, decoration={random steps, segment length=5mm, amplitude=3pt}, } } \begin{document} \begin{tikzpicture} \pgfmathsetseed{2345} \begin{scope} \clip (-4, -6) rectangle (4, 0); \draw[potato, top color=gray!15, bottom color=gray!50] (0,0) ellipse[x radius=3.2cm, y radius=3.2cm]; \end{scope} \fill[gray!10] (0,0) ellipse[x radius=3.2cm, y radius=0.9cm]; \draw[thick] (0,0) ellipse[x radius=3.2cm, y radius=0.9cm]; \draw[-{latex}, thick] (0,0) -- (0, -2.4) node[below] {$z$}; \draw[-{latex}, thick] (0,0) -- (3.8, 0) node[right] {$x$}; \draw[-{latex}, thick] (0,0) -- (-2.55, -0.93) node[below left] {$y$}; \filldraw[black] (0,0) circle (2pt) node[below left] {$O$}; \draw[-{Stealth}, very thick] (0, 2.0) -- (0, 0.05) node[right, yshift=1.5cm] {$P$}; \end{tikzpicture} \end{document} There are a couple of issues as shown in the figure. First why the white space below the figure and second it appears to me that the 'wiggy' curve does not fit correctly to the ellipse. Thanks for any improvements.

  • Shade (gray fill) a 'wiggy' half-plane
    by Dimitrios ANAGNOSTOU on May 5, 2026 at 5:42 pm

    Follow-up to my previous question. How to fill/shade the plotted area? % Source - https://tex.stackexchange.com/a/762539 % Posted by kabenyuk % Retrieved 2026-05-04, License - CC BY-SA 4.0 \documentclass[tikz,border=10pt]{standalone} \usepackage{amsmath} \begin{document} \begin{tikzpicture}[>=latex] % Draw the wavy boundary % We use a parabola-like base: 0.2*x^2 - 2 % We add a small sine component for the "roughness" \begin{scope} \clip (-3.5,-2.5) rectangle (3.5,0); \draw[thick] plot [domain=-3.3:3.3, samples=100, smooth] (\x, {0.2*\x*\x - 2 + 0.08*sin(200*\x)}); \end{scope} % Draw Horizontal Axis (x) \draw[->] (-3.5,0) -- (3.5,0) node[below right] {$x$}; % Draw Vertical Axis (y) \draw[->] (0,0.25) -- (0,-1.5) node[right] {$y$}; % Origin label \node[below left] at (0,0) {$0$}; %--- Material label --- \node at (-1.5,-1) {$\lambda,\,\mu,\,\rho$}; \end{tikzpicture} \end{document}

  • Font cminch with German umlauts – ÄÖÜ?
    by Hans Ginzel on May 5, 2026 at 7:48 am

    Is there a version of the original display Computer Modern font cminch extended with German umlauts – letters with diaeresis – ÄÖÜ? I have found csinch and plinch fonts with Czech and Polish letters but still missing umlauts. Or which alternatives do you suggest for notice plate?

  • Mysterious LuaLaTeX Math kerning issue
    by Ooooscar on May 5, 2026 at 2:29 am

    So I'm compiling with lualatex, using fontspec with unicode-math. It seems that both NewComputerModernMath and LatinModernMath produce a kerning issue with the letter "T". Just build $(T)$ or $\bigl( T \bigr)$ - or see the screenshot below. With the help from AI, I currently have a totally MYSTERIOUS result: for math inside \[ \], the patch only works for sized parentheses (e.g. T \bigr)), but not the plain ones; for math inside \begin{aligned*} \end{aligned*}, the patch only works for plain parentheses, but not the sized ones. Any help for a fix is appreciated - I mean, at least it's a fun puzzle, not trivially solved by an AI 🙂 MWE Code: \documentclass{article} \usepackage[no-math]{fontspec} \usepackage{mathtools} \usepackage{unicode-math} \AtBeginDocument{\directlua{ local glyph_id = node.id("glyph") local kern_id = node.id("kern") local hlist_id = node.id("hlist") local invocation = 0 luatexbase.add_to_callback("post_mlist_to_hlist_filter", function(head) invocation = invocation + 1 local inv = invocation for n in node.traverse(head) do if n.id == glyph_id and (n.char == 0x54 or n.char == 0x1D447) then local k = n.next if k then if k.id == kern_id then local after = k.next if after and after.id == glyph_id and (after.char == 0x29 or after.char == 0x28) then texio.write_nl("[" .. inv .. "] removing plain kern") head = node.remove(head, k) node.free(k) end elseif k.id == hlist_id and k.subtype == 2 then texio.write_nl("[" .. inv .. "] inserting big kern") local new_k = node.new(kern_id, 1) new_k.kern = 113643 head = node.insert_after(head, n, new_k) end end end end return head end, "fix_T_parens") }} \begin{document} \[ (T) \bigl(T\bigr) \Bigl(T\Bigr) \biggl(T\biggr) \Biggl(T\Biggr) \] \begin{align*} (T) \bigl(T\bigr) \Bigl(T\Bigr) \biggl(T\biggr) \Biggl(T\Biggr) \end{align*} \end{document} Also see these questions for some context: LuaLaTeX ignores kerning pairs among math glyphs, Kerning with Lualatex

  • How to show (python) code chunk in ltx-talk?
    by Polly Nomial on May 5, 2026 at 1:36 am

    I am trying to include some blocks of code in a ltx-talk slide. The code below uses listings as an example that works for me if I use Beamer, but now I get the errors shown below. How can I show some python code in ltx-talk? (If a solution using listings is not possible, I would be fine even with something like a verbatim block.) \DocumentMetadata{lang = en, tagging = on} \documentclass{ltx-talk} \usepackage{listings} \begin{document} \begin{frame}{Important talking point} \begin{lstlisting}[language=python] print('Help, World!') \end{lstlisting} \end{frame} \end{document} pdflatex run 1...error Errors: mwe.tex:13: Extra }, or forgotten \endgroup mwe.tex:13: LaTeX Error: \begin{lstlisting} on input line 13 ended by \end{frame} mwe.tex:13: Missing } inserted mwe.tex:13: Paragraph ended before \lst@next was complete mwe.tex:15: LaTeX Error: \begin{frame} on input line 7 ended by \end{document} mwe.tex:15: You can't use `\end' in internal vertical mode

  • I am trying to create my first custom package. I am not understanding how LaTeX parses arguments?
    by Brion on May 4, 2026 at 11:19 pm

    I am using a MiKTex Windows distribution of LaTeX and trying to create a custom package. I am unclear how Latex parses arguments and expl3 makes absolutely no sense to me! For now, what I would like to accomplish is a routine the passes arguments to a .sty file and for the file to do basic error checking and print the values passed to it for confirmation. Thanks for any assistance! I am trying to learn and improve. Here is a MWE of what i have so far % test function using custom package called mypackage.sty located in same folder as .tex file % I am using a MiKTeX for Windows distribution. I have been unsuccessful locating .sty files anywhere else ! % % What I am trying to accomplish is to create some functions in a custom package with optional arguments and % error handling i.e. non-existent function or value out of range % % i am able to sucessfuly compile my functions in a standalone .tex file, but unable to create a package % with arguments and do not no how latex parses arguements % % This is my MWE: % % project1.tex \documentclass{article} \usepackage[draft]{MyPackage} % Just checking to see if I cans successfully pass an argument at package call \usepackage{lipsum} \newcommand{\mycolor}{black} \newcommand{\mylocation}{(0,0)} % (x,y) for cartesian coordinates or (r:Angle) for polar coordinates \newcommand{\myshow}{T} % a boolean value T or F \newcommand{\argfour}{} % mandatory vale that error handling should catch and display appropriate % message "required argument not present" or "argument out of range" \begin{document} \lipsum[1][1-2]\\ \myfunctA[\mycolor,\mylocation,\myshow] % optional arguments, location can be (x,y) or (r:Angle) \myfunctB{\argfour} % mandatory argunt that error handler flags as out off range \myfunctC % non-existent funtion that error handling routine should flag and print error msg. \end{document} The .sty file looks like this: % This is my custom package MWE % It dosn't perform any functions right now, but I would like it to perform basic error handling % and print the agruments and values pased to it. do these routines care what order optional arguments % are passed to them? how do you refer to the individedual arguments passes? % Currently, this code just handles a parameter passed at the "usepackage[]{MyPackage}" level. [draft or final] \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{MyPackage}[2026/05/03 My Custom Package] \RequirePackage{xcolor-2022-06-12} \newif\if@draft \DeclareOption{draft}{\@drafttrue} \DeclareOption{final}{\@draftfalse} \ProcessOptions\relax \if@draft \newcommand{\myfunctA}[1]{\textcolor{yellow}{\textbf{\Huge SORRY! FEATURE Under Construction}}} \else \newcommand{\functB}[1]{\textcolor{red}{\textbf{\Huge HTTP 404! Command Not Found}}} \fi

  • Draw a half-plane figure (à la elasticity/solid mechanics books)
    by Dimitrios ANAGNOSTOU on May 4, 2026 at 9:21 am

    How can one create a figure like the following? Here is my attempt. I use the plot function with a combination of a parabola (for the general shape) and a sine wave (to create the "wiggles"). \documentclass[tikz,border=10pt]{standalone} \usepackage{amsmath} \begin{document} \begin{tikzpicture}[>=latex] % Draw the wavy boundary % We use a parabola-like base: 0.2*x^2 - 2 % We add a small sine component for the "roughness" \draw[thick] plot [domain=-3.2:3.2, samples=100, smooth] (\x, {0.2*\x*\x - 2 + 0.08*sin(600*\x)}); % Draw Horizontal Axis (x, u) \draw[->] (-3.5,0) -- (3.5,0) node[below right] {$x, u$}; % Draw Vertical Axis (y, v) \draw[->] (0,-2.5) -- (0,0.8) node[right] {$y, v$}; % Origin label \node[below left] at (0,0) {$0$}; \end{tikzpicture} \end{document} My problem is that the boundary appears too 'wavy'. Also there is a small unecessary part above the x-axis. Any ideas to improve the figure?

  • is there an easier way to draw a dotplot
    by Arne Timperman on May 2, 2026 at 7:23 am

    I want to draw this dotplot: The only way I could think of is: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \usepackage{statistics} \usetikzlibrary{patterns} \begin{document} \begin{tikzpicture} \begin{axis}[ width=12cm, height=5cm, ymin=0, ymax=20, xmin=0, xmax=1.3, axis y line=left, axis x line=bottom, ytick=\empty, xlabel={$x$}, tick style={draw=none} ] % Dotplot (voorbeelddata) \addplot[ only marks, mark=*, mark size=2.5pt, green!70!black ] coordinates { % linkerzijde (0.35,1) (0.40,1) (0.45,1) (0.40,2) (0.45,2) (0.50,2) (0.45,3) (0.50,3) (0.55,3) (0.50,4) (0.55,4) (0.60,4) % midden (hoogste stapel) (0.60,1) (0.65,1) (0.70,1) (0.75,1) (0.60,2) (0.65,2) (0.70,2) (0.75,2) (0.60,3) (0.65,3) (0.70,3) (0.75,3) (0.65,4) (0.70,4) (0.65,5) (0.70,5) (0.65,6) (0.65,7) % rechterzijde (0.80,1) (0.85,1) (0.80,2) (0.85,2) (0.85,3) }; \end{axis} \end{tikzpicture} \end{document} Resulting in this not very satisfying result: Any suggestions?

  • Draw simple figures: l3draw vs PGF performances
    by PHL on April 30, 2026 at 3:08 am

    I have some lua code that generates coordinates of many triangles/quadrilaterals I then want to draw/fill. See this answer about Penrose tilings for a concrete example. The drawing is actually done in TikZ via the luadraw package, but I am wondering if I can make the code faster by replacing TikZ with l3draw. Rewriting my actual code to remove TikZ and luadraw dependences (and use l3draw or any other drawing tool) is not a complex task, but will ask me some time due to my limited programming skills. So I would prefer to know in advance if this is a good idea or not. Apart possibly performance, is there any other reasons to use l3draw over pgf for this kind of task? Edit: I am not using TikZ/pgf for the rest of the document. Suggesting to use another environment (as picture) is a valid answer.