• How to properly remove context and all dependencies from TeX Live 2026?
    by Aviroum on June 17, 2026 at 1:04 pm

    I installed Context separately. Then I upgraded to texlive 2026. I encountered a lot of problems: fonts and fonts scripts not being recognised, and so many other issues. How do I properly remove Context from texlive 2026?

  • Space at beginning of equation in tcolorbox
    by XY2580 on June 17, 2026 at 12:10 pm

    I've been trying to figure out why I keep getting a space at the beginning of this equation in this coloured box, but don't know how to remove this consistently for all instances I've written this. It seems to be fine for most expressions I write, and if I remove the multiplicative terms after \left( ... \right), it seems to be fine. I've been using \vspace to the times when this happens, but would rather a different option than a case-by-case solution. \documentclass{article} \usepackage{amsfonts,amsmath,amssymb,amsthm} \usepackage[most]{tcolorbox} \begin{document} \newenvironment{mathscolourbox*}[1]{ \begin{tcolorbox}[ colback=#1!10!white, colframe=#1!10!white, top=0pt, bottom=2pt, ams equation*] }% { \end{tcolorbox}} \begin{mathscolourbox*}{cyan} ds^2 = -\left(1-\frac{2GM}{c^2r}\right) c^2 dt^2 + {\left(1-\frac{2GM}{c^2r}\right)}^{-1}dr^2 + r^2\left(d\theta^2+\sin^2\theta \, d\phi^2\right) \end{mathscolourbox*} \begin{mathscolourbox*}{cyan} ds^2 = -\left(1-\frac{2GM}{c^2r}\right) + \left(1-\frac{2GM}{c^2r}\right) + r^2\left(d\theta^2+\sin^2\theta \, d\phi^2\right) \end{mathscolourbox*} \end{document}

  • How to include section template defined heading prefix in TOC?
    by David Purton on June 17, 2026 at 7:17 am

    The new template based section heading definitions which support tagging include a prefix option which is added before the section number. What is the correct way to include this in the TOC? So in the below MWE, the contents ought to show: An Unnumbered Chapter Chapter Prefix 1 A Numbered Chapter MWE %! TeX Program = lualatex \DocumentMetadata { , lang = en , pdfstandard = ua-2 , tagging = on , tagging-setup = { math/mathml/luamml/load = false } } \documentclass{report} \EditInstance{heading}{chapter} { prefix = Chapter Prefix } \begin{document} \tableofcontents \addcontentsline{toc}{chapter}{An Unnumbered Chapter} \chapter{A Numbered Chapter} \end{document}

  • Colouring the counting numbers of the frames
    by Carl on June 16, 2026 at 3:56 pm

    In the following code, how can I colour the slide numbers on bottom right with the same color of frame title (or title frame)? \documentclass{beamer} \usetheme[microtype]{fibeamer} \title{Presentation Title} \subtitle{Presentation Subtitle} \author{Author's name} \begin{document} \begin{frame} How can I colour ``1/1’’ on the bottom? \end{frame} \end{document}

  • Controlling text height, text width, and margins in just one frame
    by Carl on June 16, 2026 at 3:03 pm

    I have the code below for a wider frame but there are several problems, namely, I can control only left and right margin with the same distance, and long text overlay slide numbers. So, how can I control left margin, right margin, text height and text width with different distances (and prevent text overlay)? \documentclass{beamer} \usetheme[microtype]{fibeamer} \usepackage{lipsum} \title{Presentation Title} \subtitle{Presentation Subtitle} \author{Author's name} \newcommand\Wider[2][3em]{% \makebox[\linewidth][c]{% \begin{minipage}{\dimexpr\textwidth+#1\relax} \raggedright#2 \end{minipage}% }% } \begin{document} \begin{frame}{Long text} \Wider{\lipsum} \end{frame} \end{document}

  • How to compile the file mp.w
    by lazyboy on June 16, 2026 at 2:06 pm

    I cloned the repository https://gitlab.lisn.upsaclay.fr/texlive/metapost/ and try to compile the file source\texk\web2c\mplibdir\mp.w with cweave like this: $ pwd /metapost/source/texk/web2c/mplibdir $ cweave mp.w $ pdftex mp.tex I got a error message: ! Missing $ inserted. <inserted text> $ <to be read again> _ <argument> \#define MPOST_ DEBUG_ENVELOPE \C #1->\5\5\quad $/\ast \,${\cmntfont #1 }$\,\ast /$ l.158 \M{5}\B\C{\#define MPOST_DEBUG_ENVELOPE } \6 Curiously there is no \M{5}\B\C on the line 158 in the file mp.tex. My question is: how can I compile the file mp.w correctly to a PDF file?

  • TikZ move scope to bottom left of a figure
    by Thomas on June 16, 2026 at 7:42 am

    I have a figure to which I add representation of axis. Using scope environment I'm able to scale and move it where I want on the figure. Would it be possible to make it always at a specific position in the figure (for instance bottom left), so if I change the content of the figure by adding other element, the scope would still be placed where I intended. For a node I would use anchor. Here is a MWE: \documentclass{article} \usepackage{tikz} \usetikzlibrary{backgrounds} \begin{document} \begin{tikzpicture}[show background rectangle] \draw[red,fill=yellow] (0,0,0) -- ++(-2,0,0) -- ++(0,-1,0) -- ++(2,0,0) -- cycle; \draw[red,fill=yellow] (0,0,0) -- ++(0,0,-1) -- ++(0,-1,0) -- ++(0,0,1) -- cycle; \draw[red,fill=yellow] (0,0,0) -- ++(-2,0,0) -- ++(0,0,-1) -- ++(2,0,0) -- cycle; \begin{scope}[xshift=-3cm, yshift=-0.56cm, scale=0.4] \draw[->, red] (0,0) -- (0,1) node[anchor=north east] {$x$}; \draw[->, green] (0,0) -- (-1,0) node[anchor=north west] {$y$}; \draw[blue] (0,0) node {$\odot$}; \draw[blue] (0,0) node[anchor=north west] {$z$}; \end{scope} \end{tikzpicture} \end{document} I manually set the xshift and yshift so the arrows are on the bottom part of the figure. (Note: here the scope does enlarge the figure on the left because there is nothing, but in my case where I'm facing this issue, there are other object on the top left part of it)

  • How to design station signs for Taiwan Railway in TeX?
    by mathrm alpha on June 16, 2026 at 4:08 am

    Although I wrote a LaTeX-like design for Taiwanese train station signs, the resemblance is still somewhat lacking. https://upload.wikimedia.org/wikipedia/commons/thumb/f/f1/ROC_Taiwan_Railways_Administration_Logo.svg/960px-ROC_Taiwan_Railways_Administration_Logo.svg.png \documentclass{article} \usepackage{xeCJK,amssymb} \usepackage[ paperwidth=5in, paperheight=3in, margin=0.2in ]{geometry} \usepackage{graphicx} \usepackage{tikz} \pagestyle{empty} \begin{document} \begin{tikzpicture}[remember picture,overlay] \node[anchor=north west, xshift=0in, yshift=0in] at (current page.north west) { \includegraphics[width=0.5in,height=0.5in]{960px-ROC_Taiwan_Railways_Administration_Logo.svg.png} }; \end{tikzpicture} \begin{tikzpicture}[remember picture,overlay] \node[align=center, text=black, yshift=0.25in] at (current page.center) { {\fontsize{28pt}{34pt}\selectfont Miaoli} \\[0.2em] {\fontsize{32pt}{38pt}\selectfont 苗栗} }; \end{tikzpicture} \begin{tikzpicture}[remember picture,overlay] \node[ draw, line width=0.8pt, minimum size=0.9in, inner sep=0pt, align=center, font=\fontsize{12pt}{12pt}\selectfont ] at ([xshift=1.25in, yshift=0.25in]current page.center) { 苗栗縣\\ 苗栗市 }; \end{tikzpicture} \begin{tikzpicture}[remember picture,overlay] \node[anchor=south west, xshift=0.2in, yshift=0.2in] at (current page.south west) { {\Large 豐富 Fengfu} }; \node[anchor=south east, xshift=-0.2in, yshift=0.2in] at (current page.south east) { {\Large 南勢 Nanshi} }; \end{tikzpicture} \begin{tikzpicture}[remember picture,overlay] \draw[green!60!black, line width=1.2pt] ([yshift=0.65in]current page.south west) -- ([yshift=0.65in]current page.south east); \node[anchor=west, text=green!60!black] at ([yshift=0.78in]current page.south west) {\large $\blacktriangleleft$ 3.9 公里 (km)}; \node[anchor=east, text=green!60!black] at ([yshift=0.78in]current page.south east) {\large 6.6 公里 (km) $\blacktriangleright$}; \end{tikzpicture} \end{document} A better version should be: Source: http://trstour.com/miao-li.htm

  • Two numbered equations in one line
    by X3nius on June 16, 2026 at 12:34 am

    How can I create two numbered equations in one line? I've tried this, however the word "with" is not aligned. Code 1 \documentclass[a4paper,10pt]{article} \usepackage{amssymb,amsmath,amsfonts} \usepackage{amsthm,thmtools} \usepackage[english]{babel} \usepackage[T1]{fontenc} \begin{document} \begin{tabular}{p{5cm}p{1.5cm}p{6cm}} \begin{equation} \sum \limits_{k=-\infty}^{\infty}c_ke^{ikx} \end{equation} & \begin{equation*} \hspace{0.5cm}\text{with} \end{equation*} & \begin{equation} G:= \int \limits_a^b g(x)\; dx \end{equation} \end{tabular} \end{document} Code 2 \documentclass[a4paper,10pt]{article} \usepackage{amssymb,amsmath,amsfonts} \usepackage{amsthm,thmtools} \usepackage[english]{babel} \usepackage[T1]{fontenc} \begin{document} \section{Section 1} \subsection{Subsection 1} ELorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non orci vel augue pulvinar pretium in et turpis. Sed in dolor semper urna mattis vehicula. Suspendisse eu augue id nisi auctor venenatis. Maecenas tempor felis a sodales vehicula. Proin congue tellus lectus, sit amet ornare orci efficitur a. Duis dui sem, imperdiet ac commodo eu, semper porta odio. Praesent rhoncus sem ante, eget tincidunt massa ornare sed. Suspendisse a vehicula magna, mattis porttitor enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Duis vitae pulvinar risus. Nunc quis nisi libero.\\ \noindent \begin{minipage}{0.4\textwidth} \begin{equation}\label{(3.1)} f_{\infty}(x)=\sum \limits_{k=-\infty}^{\infty}c_{k}e^{ikx} \end{equation} \end{minipage} \hspace{1cm}with \begin{minipage}{0.5\textwidth} \begin{equation}\label{(3.2)} c_k:= \frac{1}{2\pi}\int_0^{2\pi}f(x)e^{-ikx} \; dx \;. \end{equation} \end{minipage} \bigskip\noindent Sed lacinia sem ac quam porttitor, vitae efficitur lorem pulvinar. \end{document}.

  • Test if a macro argument matches saved sequence of tokens [duplicate]
    by Alex Nelson on June 15, 2026 at 6:57 pm

    In plain TeX (not eTeX, and definitely not LaTeX), I am trying to test if a macro argument was just previously used (the last time the macro was invoked). The idea is I am trying to create an extremely crude "index", and I want to print all the references to the same entry on the same line. (The entries are already sorted, this is literally just a printing problem. I cannot determine if the current entry coincides with the entry "currently being worked on".) A minimal working example: \def\currentparam{} \def\printrefs#1#2{% \if#1\currentparam% -- apparently always false!? , #2% \else% \gdef\currentparam{#1}% \par\noindent#1 #2% \fi} \printrefs{Hilbert, David}{17} \printrefs{Hilbert, David}{23} \printrefs{Hilbert's programme}{2} \printrefs{Martin-L{\accent "7F o}f, Per}{3} \printrefs{Martin-L{\accent "7F o}f, Per}{19} \bye This will (sadly) print five lines, looking like: Hilbert, David 17 Hilbert, David 23 Hilbert's programme 2 Martin-L{\accent "7F o}f, Per 3 Martin-L{\accent "7F o}f, Per 19 Instead of the sought behavour of printing three lines: Hilbert, David 17, 23 Hilbert's programme 2 Martin-L{\accent "7F o}f, Per 3, 19 Something is going wrong with the \if#1\currentparam line to always evaluate to false, but the solution to the bug eludes me.

  • With babel-french, fnpct and lualatex, footnotes not typeset according to the French typographic rules anymore
    by Denis Bitouzé on June 15, 2026 at 3:02 pm

    The following MCE: \documentclass[french]{article} % \usepackage{fnpct} \usepackage{babel} \pagestyle{empty} \begin{document} Foo\footnote{Bar.}\footnote{Baz.}. \end{document} compiled with current lualatex, typesets the footnotes according to the French typographic rules: Bar. Baz. But, if fnpct is loaded, that's not the case since the footnotes are typeset as follows: ¹Bar. ²Baz. At least with TeX Live 2025, we got the expected result even when fnpct was loaded. Here's what has changed since then: LuaHBTeX 1.22.0 (TL 2025) → 1.24.0 (TL 2026) keyval.sty 2022/05/29 v1.15 → 2026-05-17 v1.15 expl3.sty 2025-10-24 → 2026-05-26 l3backend-luatex.def 2025-10-09 → 2026-02-18 babel.sty 2025/10/22 v25.14 → 2026/06/14 v26.9 french.ldf 2025-08-15 v4.0e → 2026-06-06 v4.1a Do you know how to nowadays retrieve the previous, expected, behavior? Edit With current TL 2026, the result is the same with pdftex and with lualatex but, with TL 2025, the result is the expected one: not with pdflatex with lualatex.

  • Wrong subscript position in a customized integral
    by CarLaTeX on June 15, 2026 at 8:29 am

    I was trying to answer another question, but I can't create a customized integral that has the subscripts in the correct position. Why? egreg has already answered the other question. Hence, I'm not interested in the solution of the specific problem, but I'd like to know why mine doesn't work. \documentclass{article} \usepackage{amsmath} \usepackage{esint} \DeclareMathOperator{\oiiint}{\mathchoice{\oiint\mkern-24.3mu\int\mkern2mu} {\oiint\mkern-18mu\int\mkern2mu} {\scriptstyle\oiint\mkern-15.7mu\int\mkern2mu} {\scriptscriptstyle\oiint\mkern-13.15mu\int\mkern2mu}} \begin{document} $\oiiint^{A}_{B} \quad \int^{A}_{B}$\\ \[\oiiint^{A}_{B} \quad \int^{A}_{B}\] \[C_{\oiiint^{A}_{B}} \quad C_{\int^{A}_{B}}\] \[D_{C_{\oiiint^{A}_{B}}} \quad D_{C_{\int^{A}_{B}}}\] \end{document}

  • Print service tells me the gradient I created with TikZ is longer than the Earth's circumference
    by flyx on June 15, 2026 at 8:08 am

    I am designing playing cards, and I use a print service (https://meinspiel.de if that's relevant). I create my cards with a heading styled with tikz, like so: \documentclass{article} \usepackage[paperwidth=65mm,paperheight=97mm, margin=7mm]{geometry} \pagestyle{empty} \RequirePackage[x-4]{pdfx} \setCMYKcolorprofile{coated_FOGRA39L_argl.icc} {Coated FOGRA39} {FOGRA39 (ISO Coated v2 300\% (ECI))} {http://www.argyllcms.com/} \usepackage[overprint]{colorspace} \RequirePackage{tikz} \usetikzlibrary{positioning,shapes,calc,backgrounds} \definecolor{blue1}{cmyk}{0.6818,0.3939,0,0.7412} \definecolor{blue2}{cmyk}{0.6339,0.2768,0,0.5608} \tikzset{ pics/heading/.style={code={ \node[anchor=north west] (heading) at ($(current page.north west) + (7, -7)$) {\textoverprint[0]{\textcolor{white}{\textsf{#1}}}}; \begin{scope}[on background layer] \fill[top color=blue1, bottom color=blue2] (current page.north west) -- (heading.south west-|current page.north west) -- (heading.south east) .. controls +(right:5) and +(left:5) .. +(10, 2) -| (current page.north east) -- cycle; \end{scope} }} } \begin{document} \begin{tikzpicture}[x=1mm, y=1mm, remember picture, overlay] \pic {heading={My Heading}}; \end{tikzpicture} \end{document} As you can see, I set the card's dimensions, specify PDF/X-4 output and the ISO Coated v2 300% (ECI) color profile just like the print service requires. Then I enable overprint (unsure whether this is relevant for my issue) for black text (but the heading is white, so I disable it there again). I define a tikz pic to use for drawing the heading of each card. Finally, I create a document with a single card that uses that pic as heading. The result looks like this: I gave that to the printing service, and they printed the heading as two areas split horizontally with different colors, instead of the gradient. When I asked them what the problem is, they answered this (translated from German): The data is set up in a strange way. The gradient consists of two parts, which lead to it being cut back during conversion. Also, the size of the gradient is extremely huge. I don't exaggerate. It has a width of 352777777777,425mm, i.e. 352.777,78km! While we do have meter scale from time to time, I've never seen kilometers. (The circumference of Earth at the equator is about 40.075 km to put that into context.) It may be that this is why there was an error during conversion. We suggest to embed the gradient as picture to avoid such errors. Also, when gradients are pictures, the print is cleaner and smoother. So, I guess my question is: How do I create the gradient so that the print service is happy? I don't feel like I have enough control over whatever tikz does here.

  • Making a question paper in Hindi in LaTeX
    by SCTU on June 14, 2026 at 6:16 pm

    I am making a question paper in Hindi using the 'exam' class. The numbering of the parts of a question are as "(a),(b), and so on" by default. I want them to be as "(क),(ख),(ग) and so on" i.e. the alphabetical order of the letters of the vyanjan varna in the Devanagari script. How can I achieve that ?

  • lua, how to tex.print %%? [duplicate]
    by projetmbc on June 14, 2026 at 4:58 pm

    I fail to modify the following working code to change the printing of ** into %%. How can I do that? I fear that the answer is easy... Don't judge me, please. 🙂 % !TEX TS-program = lualatex \documentclass[varwidth, border = 3pt]{standalone} \usepackage{verbatim} \begin{document} \directlua{ local test = { "1", "**", "\\three", "++++" } tex.print("\\begin{verbatim}") for i, x in ipairs(test) do tex.print("[" .. i .. "] " .. x) end tex.print("\\end{verbatim}") } \end{document}

  • Symbol of cannon
    by Sebastiano on June 14, 2026 at 12:15 pm

    I want to reproduce a cannon considering in old style (one of these) considering that I have not seen a specific symbol. Does anyone know if there’s a symbol that resembles one of this image? I have not found anything.

  • \dbend symbol not working in macro encapsulation
    by youthdoo on June 14, 2026 at 10:08 am

    The dangerous bend symbol is not working when encapsulated in a macro. \documentclass[11pt]{article} \usepackage{fontspec}\setmainfont{STIX Two Text} \usepackage{unicode-math}\setmathfont{STIX Two Math} \usepackage[b5paper,margin=2cm,top=1cm]{geometry} \usepackage{graphicx} \usepackage{manfnt} \newcommand\danger{% \par\noindent \hangindent2em \hangafter1 \makebox[2em][l]\dbend% } \begin{document} \par\noindent \hangindent2em \hangafter1 \makebox[2em][l]\dbend NORMAL paragraph with NORMAL wrapping paragraph content paragraph content paragraph content paragraph content paragraph content paragraph content paragraph content paragraph content paragraph content paragraph content \danger Problematic paragraph! \end{document} Observations: Currently, the first paragraph has the dangerous bend symbol rendered correctly. The second paragraph, while seemingly equivalent in terms of \dbend symbol use, renders a small square for the symbol. If we remove the unicode-math line, both paragraphs work. But I do need the packages for my document. So my questions are: why is unicode-math not working with \dbend? And even if they don't work together, why is the macro encapsulation causing further problems?

  • Table Captions in kaobook cause `! TeX capacity exceeded`
    by Floris on June 14, 2026 at 9:19 am

    I have tried this with both the latest release of kaobook and the latest version in the main branch. This is an MWE, which includes my current setup and mirrors the compilation using xelatex. Any advice would be greatly appreciated. % !TEX program = xelatex \documentclass{kaobook} % Load siunitx to provide the 'S' column type used in your table \usepackage{siunitx} \usepackage{booktabs} \begin{document} \mainmatter \chapter{Testing Memory Error} % This section is designed to trigger the "TeX capacity exceeded" % error seen in kaobook. \begin{table}[htbp] \centering % The \caption{} command is the likely trigger for the recursion loop in kaobook \caption[ML on ds2]{Results from our trained models on ds2} \label{tab:test} \begin{tabular}{lSSS} \toprule {blocking} & {n\_pairs} & {n\_pred} & {pred\_rate} \\ \midrule Title Canopy & \num{1883498} & \num{43085} & \num{0.0228} \\ bibhash & \num{7374} & \num{7374} & \num{0.9909} \\ attr. bl. & \num{441997} & \num{7876} & \num{0.0178} \\ \bottomrule \end{tabular} \end{table} \end{document} The problem goes away when I use a table* environment instead. I previously thought that this may be connected to my use of the packages caption and/or subcaption, but removing those as dependencies did not solve my problem. Now, I am assuming that kaobook does something weird with table captions?

  • fix spacing in ∰ \oiiint
    by mathrm alpha on June 14, 2026 at 5:59 am

    Although I used his/her method and got \oiiint, the not big display mode spacing wasn't handled well. https://tex.stackexchange.com/a/404609/329597 \documentclass{article} \usepackage{esint} \newcommand{\oiiint}{\oiint \hspace{-13.5pt} \int} \begin{document} $A\oiiint B$\\ \[A \oiiint B\] \end{document} See in: Wrong subscript position in a customized integral

  • TikZ snail's 🐌 outline rotation text layout
    by mathrm alpha on June 14, 2026 at 2:31 am

    Although this was mentioned last time: TeX chinese image poetry image text layout However, it seems no one has mentioned the layout of the snail's rotating circle text in the TeX code. Source: https://jedi.nehs.hc.edu.tw/newsletter/306/poem.html I wrote a LaTeX program that rotates text, but the result isn't quite like this image; it's just a reference to the circle rotation text format. Furthermore, the "比羚羊還要快。" part is missing display. \documentclass{article} \usepackage{tikz,xeCJK} \usepackage[margin=0.5in]{geometry} \setCJKmainfont{Noto Sans CJK TC} \usetikzlibrary{decorations.text} \begin{document} \centering \begin{tikzpicture} % Define colors based on the image \definecolor{snailbody}{RGB}{240, 200, 180} \definecolor{shellbase}{RGB}{220, 170, 150} % Body and Tail \fill[snailbody] (-3.5, 0.5) .. controls (-4, -1) and (-3.5, -3.5) .. (0, -3.5) -- (6, -2.5) -- (0, -2.8) .. controls (-2, -2.8) and (-3, -1) .. (-3.5, 0.5); % Head \fill[snailbody] (-3.5, 0.5) circle (0.9); % Antennae \draw[snailbody, line width=4pt] (-3.9, 1.2) -- (-4.3, 2.6); \fill[snailbody] (-4.3, 2.7) circle (0.2); \draw[snailbody, line width=4pt] (-3.1, 1.2) -- (-2.9, 2.6); \fill[snailbody] (-2.9, 2.7) circle (0.2); % Shell (large circle) \fill[shellbase] (0.5, 0) circle (3.7); %text parts \path [ decorate, decoration={ text along path, text={背著重重的家,上山下海,尋找食物,我總比別人慢一步,我想如果我拋棄沉重的家,我一定爬得比羚羊還要快。}, text align=center } ] (0.5, 0) ++(180:4.0) arc (180:0:4.0); \end{tikzpicture} \end{document} Although there are similar: How to fine tune rotation of text along circular path? However, There was no mention of a text rotation format resembling a snail's outline.

  • Making only hyperref links to figures blue [closed]
    by X3nius on June 14, 2026 at 2:13 am

    Is there a possibility to only make the hyperref links to figures blue? \documentclass[a4paper,10pt]{article} \usepackage{hyperref} \hypersetup{ colorlinks = true, linkcolor = blue } \usepackage[style=numeric, defernumbers, backend=biber]{biblatex} \addbibresource{sources.bib} \begin{document} \tableofcontents \section{Section 1} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. \subsection{Subsection 1} Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\\\\ You can now see \hyperref[f1]{Figure 1} \begin{figure}[h] \caption{This is a triangle} \label{f1} \end{figure} \nocite{*} \printbibliography \end{document} and only Figure 1, Figure 2 shall be printed in blue. However, in this case, also the table of contents is printed in blue and - I'm wondering why - the link in the bibliography is printed in pink? How can I make pink to "normal" here?

  • Coil decoration on curved path looks strange
    by nogrodrigo on June 13, 2026 at 3:52 pm

    I am trying to achieve something like this in TikZ: The black path should go straight up and the red one should go down bent to the right, both must look like a coil. I have tried to do this using bezier curves and arcs, but the coil decoration of the bent path looks very strange, it's pointy in some parts. What am I doing wrong? MWE: \documentclass{article} \usepackage{xcolor} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \begin{document} \begin{tikzpicture} \draw[-latex, decorate, decoration = {coil, aspect = 1.2}, color = red] (0,2) arc (90:-90:1); \draw[-latex, decorate, decoration = {coil, aspect = 1.2}] (0,0) -- (0,2); \draw[-latex, decorate, decoration = {coil, aspect = 1.2}] (3,0) -- (3,2); \draw[-latex, decorate, decoration = {coil, aspect = 1.2}, color = red] (3,2) .. controls (4,2) and (4,0) .. (3,0); \end{tikzpicture} \end{document}

  • TikZ customize in big operators symbols, can't display big TikZ operators
    by mathrm alpha on June 13, 2026 at 8:59 am

    I followed the LaTeX question reference below to adapt it to the tikz big operators version, but it didn't display in tikz "⅌" symbol. How can I define a big plus operator that works like \bigcup? ⅌ apply in tikz text symbols? % Source - https://tex.stackexchange.com/a/394912 % Posted by GuM, modified by community. See post 'Timeline' for change history % Retrieved 2026-06-13, License - CC BY-SA 3.0 \documentclass{article} \usepackage{tikz,iftex,amsmath} \usepackage{graphicx} \makeatletter \newcommand*\@bigper[1]{\vcenter{\hbox{#1$\m@th ⅌$}}} \newcommand*\bigper{% \DOTSB % omit this line if you are not using the amsmath package \mathop{% \mathchoice {\@bigper ⅌}% {\@bigper \LARGE}% {\@bigper {}}% {\@bigper \footnotesize}% }% \slimits@ % omit this line if you are not using the amsmath package } \makeatother \ifPDFTeX \usepackage[utf8]{inputenc} \else \usepackage{newunicodechar} \fi \DeclareRobustCommand{\TikZPerSign}{% \tikz[ baseline=-.25ex, x=.13em, y=.13em, line cap=round, line join=round ]{% % Fixed box: this is important for text-like behaviour. \path[use as bounding box] (-3.05,-3.35) rectangle (3.95,4.35); % 1. The horizontal ellipse \draw[line width=.05em] (0.4,0) ellipse[x radius=2.2,y radius=.7]; % 2. The main U shape \draw[line width=.05em] (-.6,1.5) .. controls (-.6,-3.2) and (.6,-3.2) .. (.6,1.5); % 3. The top-left flourish \draw[line width=.05em] (-.6,1.5) .. controls (-1.8,2.8) and (-3.0,1.5) .. (-2.2,1.2); \fill (-.5,1.9) circle[radius=.22]; % 4. The large right loop \draw[line width=.05em] (.6,1.5) .. controls (.6,4.2) and (3.5,3.2) .. (3.5,.5) .. controls (3.5,-.8) and (2.5,-1.2) .. (1.8,-1.0); }% } \ifPDFTeX \DeclareUnicodeCharacter{214C}{\TikZPerSign} \else \newunicodechar{⅌}{\TikZPerSign} \fi \begin{document} $$\sum^1_2 \bigper^3_4$$ \end{document}

  • Moving from listings to piton
    by Pablo González L on June 13, 2026 at 1:04 am

    I'm trying to migrate from listings to piton, but unfortunately, piton doesn't have native support for Lua. From what I can understand of the documentation, I've modified lstlang2 and converted it to piton, but I don't understand how \NewPitonLanguage works or how to color things with \SetPitonStyle. This is my compiled file, but it's not producing the expected result: \documentclass{article} \usepackage[osf,nomath,mono=false,ScaleSF=0.95,ScaleRM=0.95]{libertinus-otf} \usepackage{sourcecodepro} \defaultfontfeatures[\ttfamily] { Numbers = OldStyle, Scale = 0.84249, Extension = .otf, } \setmonofont[ UprightFont = *-Regular, ItalicFont = *-RegularIt, BoldFont = *-Semibold, BoldItalicFont = *-SemiboldIt, RawFeature = {+zero,+ss01}]{SourceCodePro} \usepackage{unicode-math} \setmathfont[Scale = 0.95]{latinmodern-math.otf} \usepackage{piton} % (Pygments colors) \definecolor{pyg_comment}{HTML}{408080} \definecolor{pyg_string}{HTML}{BA2121} \definecolor{pyg_keyword}{HTML}{000080} \definecolor{pyg_builtin}{HTML}{008000} \definecolor{pyg_function}{HTML}{0000FF} \definecolor{pyg_punct}{HTML}{A020F0} % New languaje \NewPitonLanguage{SpintentLua}{ sensitive = true, alsoletter = {.}, morecomment = [l]{--}, morecomment = [s]{--[[}{]]}, morestring = [b]", morestring = [b]', morestring = [s]{[[}{]]}, morekeywords = [Delim]{ (, ), [, ] }, % Clase nativa: Keyword (Por defecto si no se especifica corchetes) morekeywords = { and, break, do, else, elseif, end, false, for, function, goto, if, in, local, nil, not, or, repeat, return, then, true, until, while }, % Clase nativa: Name.Builtin (Para funciones del sistema) morekeywords = [Name.Builtin]{ _ENV, _G, _PROMPT, _PROMPT2, _VERSION, arg, assert, collectgarbage, coroutine, coroutine.create, coroutine.isyieldable, coroutine.resume, coroutine.running, coroutine.status, coroutine.wrap, coroutine.yield, debug, debug.debug, debug.gethook, debug.getinfo, debug.getlocal, debug.getmetatable, debug.getregistry, debug.getupvalue, debug.getuservalue, debug.sethook, debug.setlocal, debug.setmetatable, debug.setupvalue, debug.setuservalue, debug.traceback, debug.upvalueid, debug.upvaluejoin, dofile, error, getmetatable, io, io.close, io.flush, io.input, io.lines, io.open, io.output, io.popen, io.read, io.stderr, io.stdin, io.stdout, io.tmpfile, io.type, io.write, ipairs, load, loadfile, math, math.abs, math.acos, math.asin, math.atan, math.ceil, math.cos, math.deg, math.exp, math.floor, math.fmod, math.huge, math.log, math.max, math.maxinteger, math.min, math.mininteger, math.modf, math.pi, math.rad, math.random, math.randomseed, math.sin, math.sqrt, math.tan, math.tointeger, math.type, math.ult, next, os, os.clock, os.date, os.difftime, os.execute, os.exit, os.getenv, os.remove, os.rename, os.setlocale, os.time, os.tmpname, package, package.config, package.cpath, package.loaded, package.loadlib, package.path, package.preload, package.searchers, package.searchpath, pairs, pcall, print, rawequal, rawget, rawlen, rawset, require, select, setmetatable, string, string.byte, string.char, string.dump, string.find, string.format, string.gmatch, string.gsub, string.len, string.lower, string.match, string.pack, string.packsize, string.rep, string.reverse, string.sub, string.unpack, string.upper, table, table.concat, table.insert, table.move, table.pack, table.remove, table.sort, table.unpack, tonumber, tostring, type, utf8, utf8.char, utf8.charpattern, utf8.codepoint, utf8.codes, utf8.len, utf8.offset, xpcall }, % Clase nativa: Name.Function (custom API) morekeywords = [Name.Function]{ register_tex_cmd, scan_string, set_macro, clean_lexical_accents, luafun_spmoney_parse, __spintent_money_render, luafun_spdate_parse, luafun_sptime_parse, spintent_gcd_algorithm } } \SetPitonStyle { Comment = \color{pyg_comment}\fontfamily{lmtt}\small\itshape, String = \color{pyg_string} , Keyword = \color{pyg_keyword}\bfseries , Name.Builtin = \color{pyg_builtin}\bfseries , Name.Function = \color{pyg_function} , Delim = \color{pyg_punct}, } \NewPitonEnvironment{luapiton}{ !O{} } {\PitonOptions{language=SpintentLua, #1}}{} \begin{document} \begin{luapiton} -- "Submódulo Financiero: Core de validación estructural spintent" local token = token local luatexbase = luatexbase function luafun_spmoney_parse() -- Captura bidireccional nativa libre de expansiones TeX local raw_input = token.scan_string() local clean_num = string.gsub(raw_input, "%s+", "") if not clean_num:match("^[%+%-]?%d+$") then token.set_macro("l__spintent_money_status_str", "error") return "error" end -- El Puente del Millón requiere inyección canónica token.set_macro("l__spintent_money_bridge_str", "true") return "success" end local function spintent_gcd_algorithm(val_a, val_b) while val_b ~= 0 do val_a, val_b = val_b, val_a % val_b end return val_a end \end{luapiton} \end{document} How do I define a new language in piton so that it's beautifully colored? I want to copy more or less the style of the lua-widow-control documentation (which is written in ConTeXt).

  • Why doesn't \DeclareMathAlphabet applied with \bm or \boldsymbol automatically search for bx style edition?
    by mathrm alpha on June 12, 2026 at 9:26 pm

    Although you can define \mathsfit or \mathsfbfit using \DeclareMathAlphabet, it \mathsfit doesn't work within \bm or \boldsymbol. The key point is that using \bm or \boldsymbol with the \DeclareMathAlphabet math-fonts format will not automatically search for the bx edition style. \documentclass{article} \usepackage{bm} \DeclareMathAlphabet{\mathsfit}{OT1}{lmss}{m}{sl} \DeclareMathAlphabet{\mathsfbfit}{OT1}{lmss}{bx}{sl} \begin{document} use boldsymbol: $\boldsymbol{\mathsfit{ABCabc}}$\\ use bm: $\bm{\mathsfit{ABCabc}}$\\ direct sans-serif bold italic: $\mathsfbfit{ABCabc}$\\ \end{document}

  • Can enumext and enumext* share a counter?
    by Teepeemm on June 12, 2026 at 8:24 pm

    I would like to have enumext and enumext* share a counter in my tagged pdf. The best I've found so far is to use start={1+\value{enumXi}} or start={1+\value{enumXvii}}, depending on which environment came before. But that requires that I track which environment came before. Is there a way to make this happen automatically? The following outputs "1. one, 2. two, 1. three, 3. four". \documentclass{article} \usepackage{enumext} \begin{document} \begin{enumext} \item one \end{enumext} \begin{enumext}[resume] \item two \end{enumext} \begin{enumext*}[resume] \item three \end{enumext*} \begin{enumext}[resume] \item four \end{enumext} \end{document}

  • vertical line between items symbol in itemize environment
    by Aviroum on June 12, 2026 at 2:07 pm

    Is it possible to add a vertical line to the itemize environment, starting before the first item and continuing between each item until the end? similar to this, but line start before. \starttext \startitemize[5] \item text \item text \item text text. \stopitemize \stoptext

  • Unexpected sansmath behaviour after recent TeXLive update
    by Marius Jansen on June 12, 2026 at 7:26 am

    I have noticed that after a recent TexLive update, the behaviour of the sansmath package has changed. The two example below illustrate: The instructions: \documentclass{article} \usepackage{sansmath} \begin{document} \sansmath This is normal text. \begin{tabular}{ll} One & Two \\ \end{tabular} and the rest of the document follows. \end{document} result in the contents of the tabular environment to be italized (as if it is in a math environment). This is new, unexpected behaviour. If the \sansmath is omitted, then the content of the tabular environment is not placed in italics: \documentclass{article} \usepackage{sansmath} \begin{document} This is normal text. \begin{tabular}{ll} One & Two \\ \end{tabular} and the rest of the document follows. \end{document} I will greatly appreciate any advice on how to revert to the behaviour of \sansmath to what is expected: it impacts only math environments.

  • How do I draw the feedback loop in my latex code for my research paper?
    by Sajid Mahfuz on June 11, 2026 at 10:21 pm

    How do I create the feedback loop shown in the image? I’ve also been trying to make all the arrow lengths uniform, but I keep failing (bear with me, I’m a beginner in LaTeX), and I need the diagram to be larger. I’ve attached my code and the image. \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows.meta, positioning, calc} \begin{document} \begin{center} \begin{tikzpicture}[ node distance=1.2cm and 1.2cm, block/.style={ draw, rectangle, minimum width=2.5cm, minimum height=0.9cm, line width=1pt, align=center }, innerblock/.style={ draw, rectangle, minimum width=1.8cm, minimum height=0.9cm, line width=1pt, % changed from 0.5pt to 1pt align=center }, disturbance/.style={ draw, rectangle, minimum width=1.8cm, minimum height=0.9cm, fill=red!10, line width=1pt, align=center }, arrow/.style={-{Triangle[length=2mm,width=2mm]}, line width=1pt} ] % ================= INPUT ================= \node[circle, draw, minimum size=0.8cm, line width=1pt] (sum) at (0,0) {}; % changed to 1pt % X inside circle (also 1pt) \draw[line width=1pt] (sum.north east) -- (sum.south west); \draw[line width=1pt] (sum.north west) -- (sum.south east); \draw[arrow] (-1.2,0) -- (sum.west); \node[left=1.2cm] {$Z_D$}; % ================= CONTROL ================= \node[block, above right=0.5cm and 1.0cm of sum] (sdre) {SDRE}; \node[block, below right=0.5cm and 1.0cm of sum] (pi) {PI}; \draw[arrow] (sum.east) -- ++(0.2,0) |- (sdre.west); \draw[arrow] (sum.east) -- ++(0.2,0) |- (pi.west); % ================= ACTUATION ================= \node[block, right=1.0cm of sdre] (actuator) {Actuator}; \node[block, right=1.0cm of pi] (thrust) {Thrust}; \draw[arrow] (sdre.east) -- (actuator.west); \draw[arrow] (pi.east) -- (thrust.west); % ================= THRUST MAP ================= \node[block, below=0.8cm of pi] (thrustMap) {Thrust Map}; \draw[arrow] (pi.south) -- (thrustMap.north); \draw[arrow] (thrustMap.east) -| (thrust.south); % ================= DYNAMICS ================= \node[innerblock, right=1.0cm of actuator] (att_dyn) {Attitude Dynamics}; \node[innerblock, right=1.0cm of thrust] (alt_dyn) {Altitude Dynamics}; \draw[arrow] (actuator.east) -- (att_dyn.west); \draw[arrow] (thrust.east) -- (alt_dyn.west); % ================= DISTURBANCES ================= \node[disturbance, above=0.6cm of att_dyn] (distAtt) {Gust}; \node[disturbance, below=0.6cm of alt_dyn] (distAlt) {Gust}; \draw[arrow] (distAtt.south) -- (att_dyn.north); \draw[arrow] (distAlt.north) -- (alt_dyn.south); % ================= OUTPUT MERGE ================= \coordinate (mergeTop) at ($(att_dyn.east)+(0.6,0)$); \coordinate (mergeBottom) at ($(alt_dyn.east)+(0.6,0)$); \draw[line width=1pt] (att_dyn.east) -- (mergeTop); \draw[line width=1pt] (alt_dyn.east) -- (mergeBottom); \draw[line width=1pt] (mergeTop) -- (mergeBottom); % Midpoint of the vertical line \coordinate (mergeMid) at ($(mergeTop)!0.5!(mergeBottom)$); % Output arrow from that midpoint \draw[arrow] (mergeMid) -- ++(0.8,0) node[right] {Output}; \end{tikzpicture} \end{center} \end{document}

  • How to define a 'smart', resizeable paired-brace delimiter macro that supports set-builder notation and line-breaking at commas in inline math mode?
    by Nyx on June 11, 2026 at 3:00 pm

    In [1] we have the following MWE of the definition and use-cases of a \set macro, which is a resizeable paired-brace delimiter with \suchthat detection for set-builder notation. \documentclass[varwidth]{standalone} \usepackage{amsmath} \usepackage{xparse} \newcommand{\suchthat}{\mid} \ExplSyntaxOn \NewDocumentCommand{\set}{som} { % limit the scope for \suchthat \group_begin: \cs_set_protected:Npn \suchthat { \tl_use:N \l__egreg_set_st_tl } \IfBooleanTF{#1} { \egreg_set_auto:n { #3 } } { \egreg_set_fixed:nn { #2 } { #3 } } \group_end: } \tl_new:N \l__egreg_set_st_tl \cs_new_protected:Nn \__egreg_set_st:n { \tl_set:Nn \l__egreg_set_st_tl { #1 } } \cs_new_protected:Nn \egreg_set_auto:n { \__egreg_set_st:n { \nonscript\; \middle\vert \nonscript\; } \left\{ #1 \right\} } \cs_new_protected:Nn \egreg_set_fixed:nn { \tl_if_novalue:nTF { #1 } { \__egreg_set_st:n { \mid } \lbrace #2 \rbrace } { \__egreg_set_st:n { \mathrel{#1\vert} } \mathopen{#1\lbrace} #2 \mathclose{#1\rbrace} } } \ExplSyntaxOff \begin{document} $\set{a,b,c}\cup\set[\big]{a,b,c}$ $\set{x\suchthat a<x<b}$ $\set[\Big]{x\suchthat a<x<b}$ $\set*{x\suchthat \dfrac{1}{2}<x<3}$ \end{document} In [2] we have the following MWE of the definition and use-cases of a \splitatcommas macro, which allows for line breaks at commas inside inline math mode. \documentclass{article} \ExplSyntaxOn \NewDocumentCommand{\splitatcommas}{m} { \group_begin: \int_compare:nNnF { \char_value_mathcode:n {`,} }= {"8000} { \char_set_active_eq:nN {`,} \__kennytm_comma: \char_set_mathcode:nn {`,} {"8000} } #1 \group_end: } \cs_new_protected:Ne \__kennytm_comma: { \mathchar\char_value_mathcode:n {`,}~ \penalty0~\exp_not:n { \hspace{0pt plus 1em} } } \ExplSyntaxOff \newcommand{\tuple}[1]{(\splitatcommas{#1})} \newcommand{\set}[1]{\{\splitatcommas{#1}\}} \begin{document} \setlength{\lineskiplimit}{2pt}\setlength{\lineskip}{3pt} % for this particular case \setlength{\parindent}{0pt} % just for this example $\splitatcommas{ \frac{1}{2},\frac{3}{5},\frac{8}{13},\frac{21}{34},\frac{55}{89}, \frac{144}{233},\frac{377}{610},\frac{987}{1597},\frac{2584}{4181}, \frac{6765}{10946},\frac{17711}{28657},\frac{46368}{75025}, \frac{121393}{196418},\frac{317811}{514229},\frac{832040}{1346269}, \frac{2178309}{3524578},\frac{5702887}{9227465}, \frac{14930352}{24157817},\frac{39088169}{63245986},\frac{102334155}{165580141} }$ \medskip $\set{ \tuple{a,b,c,d},\tuple{1,2,3,4,5,6},\tuple{11,22,33,44,55,66,77,88}, \tuple{a,b,c,d},\tuple{1,2,3,4,5,6},\tuple{11,22,33,44,55,66,77,88}, \tuple{a,b,c,d},\tuple{1,2,3,4,5,6},\tuple{11,22,33,44,55,66,77,88}, \tuple{a,b,c,d},\tuple{1,2,3,4,5,6},\tuple{11,22,33,44,55,66,77,88} }$ \end{document} My question is How can I define a 'smart', resizeable paired-brace delimiter macro that supports set-builder notation and line-breaking at commas in inline math mode (i.e., combine \set from [1] and \splitatcommas from [2])? The following is an MWE of my attempt so far. \documentclass[ border={10pt}, varwidth, ]{standalone} \usepackage{unicode-math} % \usepackage{amsmath} % Loaded by `unicode-math` \usepackage[default]{fontsetup} % For NewCM \usepackage{mleftright} % \usepackage{xparse} % Integrated into the kernel from 2020-10-01 \newcommand{\suchthat}{\mid} \ExplSyntaxOn \NewDocumentCommand{\setaux}{som} { % limit the scope for \suchthat \group_begin: \cs_set_protected:Npn \suchthat { \tl_use:N \l__egreg_set_st_tl } \IfBooleanTF{#1} { \egreg_set_auto:n { #3 } } { \egreg_set_fixed:nn { #2 } { #3 } } \group_end: } \tl_new:N \l__egreg_set_st_tl \cs_new_protected:Nn \__egreg_set_st:n { \tl_set:Nn \l__egreg_set_st_tl { #1 } } \cs_new_protected:Nn \egreg_set_auto:n { \__egreg_set_st:n { \nonscript\; \middle\vert \nonscript\; } \left\{ #1 \right\} } \cs_new_protected:Nn \egreg_set_fixed:nn { \tl_if_novalue:nTF { #1 } { \__egreg_set_st:n { \mid } \lbrace #2 \rbrace } { \__egreg_set_st:n { \mathrel{#1\vert} } \mathopen{#1\lbrace} #2 \mathclose{#1\rbrace} } } \NewDocumentCommand{\splitatcommas}{m} { \group_begin: \int_compare:nNnF { \char_value_mathcode:n {`,} }= {"8000} { \char_set_active_eq:nN {`,} \__kennytm_comma: \char_set_mathcode:nn {`,} {"8000} } #1 \group_end: } \cs_new_protected:Ne \__kennytm_comma: { \mathchar\char_value_mathcode:n {`,}~ \penalty0~\exp_not:n { \hspace{0pt plus 1em} } } \ExplSyntaxOff % Combined macro \NewDocumentCommand{\set}{som}{ \IfBooleanTF{#1}{\splitatcommas{\setaux*{#3}}}{% \IfNoValueTF{#2}{% \splitatcommas{\setaux{#3}}% }{% \splitatcommas{\setaux[#2]{#3}}% } } } % Empty set \setmathfont[CharacterVariant=2]{NewCMMath-Regular.otf} \AtBeginDocument{% \renewcommand{\emptyset}{\char"2300}% \renewcommand{\varnothing}{\char"2205}} \begin{document} % \setlength{\lineskiplimit}{2pt}\setlength{\lineskip}{3pt} \setlength{\parindent}{0pt} % \(\set{a,b,c}\cup\set[\big]{a,b,c}\) \(\set{x\suchthat a<x<b}\) \(\set[\Big]{x\suchthat a<x<b}\) \(\set*{x\suchthat \dfrac{1}{2}<x<3}\) We have \(\emptyset = \set{}\) and \(\omega_0 = \set{ \emptyset, \set{\emptyset}, \set{\emptyset, \set{\emptyset}}, \set{\emptyset, \set{\emptyset}, \set{\emptyset, \set{\emptyset}}}, \set{\emptyset, \set{\emptyset}, \allowbreak {\set{\emptyset, \set{\emptyset}}, \set{\emptyset, \set{\emptyset}, \set{\emptyset, \set{\emptyset}}}}}, \dots }. \) % \end{document} References [1] E. Gregorio. (2020). TeX, LaTeX and math. TUGboat, 41(1), 43–53. https://www.latex-project.org/publications/2020-egreg-TUB-tb127gregorio-math.pdf [2] E. Gregorio. (2025, May 17). Allowing line break at ',' in inline math mode? (answer). TeX Stack Exchange. https://tex.stackexchange.com/a/309558