• Diagonal Arrows Under an Equation
    by Lucy on December 4, 2025 at 10:13 am

    I need to put diagonal arrows under an equation (the red ones in the picture). I tried using \swarrow \qquad \searrow, but they are not positioned where I need them. I would prefer not to use tikzmark. Is there another way to achieve this? Thanks for your help. \documentclass[11pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[czech]{babel} \usepackage[T1]{fontenc} \usepackage{pgfplots} \usepackage{multicol,array,tabularx,xcolor,enumitem} \usepackage{amsmath,amsfonts,amssymb,mathrsfs} \pagestyle{empty} % % % % \definecolor{modra}{cmyk}{1,0,0,0} %%%%DEFINCIE%%%%%BARVY \definecolor{cerna}{cmyk}{0,0,0,1} \definecolor{bila}{cmyk}{0,0,0,0} % %\color{modra} % \begin{document} \begin{align*} S & = \rho \cdot \dfrac{a + b +c}{2} & S & = \dfrac{a \cdot b}{2} \\ \rho \cdot \dfrac{a + b +c}{2} & = \dfrac{a \cdot b}{2} \qquad | \cdot 2 & & \\ 18 (a +b+ c ) & = a \cdot b & a & = b \\ 18 (a + a + c ) & = a \cdot a & c^2 & = a^2 + b^2 \\ 18 (2a + c ) & = a^2 & c^2 & = a^2 + a^2 = 2a^2 \\ 36 a + 18 c & = a^2 & c & = \sqrt{2a^2} = a \sqrt{2} \\ 36 a + 18 a \sqrt{2} & = a^2 & & \\ a^2 - 36 a - 18 a \sqrt{2} & = 0 & & \\ a \left( a - 36 - 18 \sqrt{2} \right) & = 0 & & \\ \Large \swarrow \qquad \searrow \end{align*} % % \end{document}

  • The defined date command doesn't work before \today when invoking babel
    by M. Logic on December 4, 2025 at 4:41 am

    A MWS is as follows. \documentclass{ctexart} \usepackage[main=chinese, provide=*]{babel}% \babelprovide{greek} \babelfont[greek]{rm}[Scale=MatchUppercase, ItalicFont={GFSArtemisiaIt.otf}, BoldFont={GFSArtemisiaBold.otf}, BoldItalicFont={GFSArtemisiaBoldIt.otf}]{GFSArtemisia.otf} \usepackage{datetime}%after babel package \newdateformat{eightdate}{\THEYEAR\twodigit{\THEMONTH}\twodigit{\THEDAY}} \title{测试} \author{佚名} \date{} \begin{document} \maketitle \verb|\today| works fine, i.e., it produces \today. While \verb|\eightdate| doesn't work before \verb|\today|, i.e., \verb|\eightdate\today| also produces \today, but I'd like \verb|\eightdate\today| to produce 20251204. \end{document} \today works fine, i.e., it produces 2025年12月4日. While \eightdate doesn't work before \today, i.e., \eightdate\today also produces 2025年12月4日, but I'd like \eightdate\today to produce 20251204. Then how to make both \today and \eightdate\today work as desired when invoking babel and datetime? Note that \usepackage[main=chinese, provide=*]{babel} is for special use.

  • Dynamic calculation of part number width in the memoir table of contents
    by nowox on December 3, 2025 at 6:07 pm

    In this simple example, I have a memoir document with eight parts. By default, LaTeX doesn’t know how wide the part number in the table of contents will be. Since \cftpartnumwidth requires a fixed width, it has to be adjusted manually for every document, and updated every time I add a new part — which makes no sense. I understand the goal is to align titles, so a fixed width is reasonable, but alternatives like the tabbed environment can align entries without hard-coding lengths. Ideally, I’d like LaTeX to determine the correct width automatically, regardless of the document content. I love LaTeX, but sometimes it feels unnecessarily rigid… Here is the example: \documentclass{memoir} \begin{document} \tableofcontents* \part{First} \part{Second} \part{Third} \part{Fourth} \part{Fifth} \part{Sixth} \part{Seventh} \part{Eighth} \end{document} What currently works for me (since I generate the document programmatically) is something like: \newlength{\maxpartnumwidth} \newcounter{maxpart} \setcounter{maxpart}{8} \AtBeginDocument{% \settowidth{\maxpartnumwidth}{Part~\Roman{maxpart}} \addtolength{\maxpartnumwidth}{1em} \setlength{\cftpartnumwidth}{\maxpartnumwidth}% } But this approach is fragile: “Part” is hard-coded, and I don’t know the final font or font size, so the result may not be accurate. Is there a cleaner or more robust way to do this automatically?

  • How to reset poles of coffins with two attachment?
    by Explorer on December 3, 2025 at 5:07 pm

    I have the following code: \documentclass{article} \usepackage{cmupint} \usepackage{fixdif} \DeclareRobustCommand{\myint}{$\displaystyle\int\nolimits$} \begin{document} \ExplSyntaxOn \coffin_new:N \l_int_left_coffin \coffin_new:N \l_int_right_coffin \coffin_new:N \l_base_int_coffin \hcoffin_set:Nn \l_base_int_coffin { \myint } \coffin_new:N \l_dx_int_coffin \hcoffin_set:Nn \l_dx_int_coffin { $\d x$ } \coffin_new:N \l_tmp_coffin \coffin_set_eq:NN \l_tmp_coffin \l_base_int_coffin \coffin_scale:Nnn \l_tmp_coffin { .5 } { .5 } % first \coffin_attach:NnnNnnnn \l_base_int_coffin { r } { t } \l_tmp_coffin { l } { vc } { 0pt } { 0pt } % second \coffin_join:NnnNnnnn \l_base_int_coffin { r } { b } \l_tmp_coffin { l } { vc } { 0pt } { 0pt } \coffin_reset_poles:N \l_base_int_coffin \coffin_display_handles:Nn \l_base_int_coffin {magenta} \ExplSyntaxOff \end{document} Now the poles is as below: What I want, is the GREEN coffin's border. The key code here is: % first \coffin_attach:NnnNnnnn \l_base_int_coffin { r } { t } \l_tmp_coffin { l } { vc } { 0pt } { 0pt } % second \coffin_join:NnnNnnnn \l_base_int_coffin { r } { b } \l_tmp_coffin { l } { vc } { 0pt } { 0pt } If I use two join, two small \int is not vertical align. I also try to make the final \l_base_int_coffin into a \fbox, together with two attach, but also failed, the border is still not what I want: \documentclass{article} \usepackage{cmupint} \usepackage{fixdif} \DeclareRobustCommand{\myint}{$\displaystyle\int\nolimits$} \begin{document} \ExplSyntaxOn \coffin_new:N \l_int_left_coffin \coffin_new:N \l_int_right_coffin \coffin_new:N \l_base_int_coffin \hcoffin_set:Nn \l_base_int_coffin { \myint } \coffin_new:N \l_dx_int_coffin \hcoffin_set:Nn \l_dx_int_coffin { $\d x$ } \coffin_new:N \l_tmp_coffin \coffin_set_eq:NN \l_tmp_coffin \l_base_int_coffin \coffin_scale:Nnn \l_tmp_coffin { .5 } { .5 } % first \coffin_attach:NnnNnnnn \l_base_int_coffin { r } { t } \l_tmp_coffin { l } { vc } { 0pt } { 0pt } % second \coffin_attach:NnnNnnnn \l_base_int_coffin { r } { b } \l_tmp_coffin { l } { vc } { 0pt } { 0pt } \coffin_reset_poles:N \l_base_int_coffin \hcoffin_set:Nn \l_tmpa_coffin { \fbox{\coffin_typeset:Nnnnn \l_base_int_coffin{l}{vc}{0pt}{0pt}} } \coffin_display_handles:Nn \l_tmpa_coffin {magenta} \ExplSyntaxOff \end{document} Is there elegant method to get my desired \l_base_int_coffin's border? Edit with more general case Since cfr has given a tricky r handles' solution to solve my original question, but my case has a more widely-extensive case(Let's consider that the TWO sub-coffins is not hold the some width): \documentclass{article} \usepackage{cmupint} \usepackage{fixdif} \DeclareRobustCommand{\myint}{$\displaystyle\int\nolimits$} \begin{document} \ExplSyntaxOn \coffin_new:N \l_explorer_int_left_coffin \coffin_new:N \l_explorer_int_right_coffin \coffin_new:N \l_explorer_base_int_coffin \coffin_new:N \l_explorer_dx_int_coffin \coffin_new:N \l_explorer_tmp_coffin \coffin_new:N \l_explorer_tmpA_coffin \coffin_new:N \l_explorer_tmpB_coffin \hcoffin_set:Nn \l_explorer_base_int_coffin { \myint } \hcoffin_set:Nn \l_explorer_dx_int_coffin { $\d x$ } \coffin_set_eq:NN \l_explorer_tmp_coffin \l_explorer_base_int_coffin \coffin_set_eq:NN \l_explorer_tmpA_coffin \l_explorer_base_int_coffin \coffin_set_eq:NN \l_explorer_tmpB_coffin \l_explorer_base_int_coffin \coffin_scale:Nnn \l_explorer_tmpA_coffin { .5 } { .5 } \coffin_scale:Nnn \l_explorer_tmpB_coffin { 1.5 } { .25 } % first \coffin_attach:NnnNnnnn \l_explorer_base_int_coffin { r } { t } \l_explorer_tmpA_coffin { l } { vc } { 0pt } { 0pt } % second \coffin_attach:NnnNnnnn \l_explorer_base_int_coffin { r } { b } \l_explorer_tmpB_coffin { l } { vc } { 0pt } { 0pt } % just use `r' would shift back too much, for not the same width of `\l_explorer_tmpA_coffin' and `\l_explorer_tmpB_coffin' % \coffin_join:NnnNnnnn \l_explorer_base_int_coffin { r } { b } \l_explorer_tmpB_coffin { r } { vc } { 0pt } { 0pt } \coffin_reset_poles:N \l_explorer_base_int_coffin \coffin_display_handles:Nn \l_explorer_base_int_coffin {magenta} \ExplSyntaxOff \end{document}

  • Why does forest baseline alignment seem to stop, once drawing circles around each node?
    by MS-SPO on December 3, 2025 at 10:05 am

    Situation While working on this forest-based solution I was puzzled by the vertical alignment, once I draw circles around the nodes. So for test purposes I copied said basic tree three times: left: without any forest preamble right: preamble only names nodes (for later use) middle: also draws a circle around each node Observations Comparing left and right all characters seem to align by their baselines (light-blue). For the middle one this is more puzzling: light-pink: b, c, d seem to match baselines, but this can be accidental e and f as well, while g and i clearly don't light-blue: k, l, m, y, z seem to "do what they want" orange: there seems to be a tendency to roughly align the circles south (with content dependent size variation from Tikz) Question Actually I have two questions, which are connected like face and back of a coin: how to understand the forest-way of these vertical alignments (middle)? how to obtain baseline alignments for the nodes content (characters, light-blue) instead of the shapes south? I see that this solution seems to solve a similar problem, but honestly I'm lost at the moment in identifying the relevant alignment statements introduced. Code \documentclass[10pt,border=3mm]{standalone} \usepackage{forest} \begin{document} % ~~~ correct baselining ~~~~~~~~~~~ \begin{forest} [a, label=north:baselined [b [e [k][l]] [f [m]]] [c [g [y][z]]] [d [i]] ] \end{forest} % ~~~ incorrect/unexpected ~~~~~~~~~~~~ \begin{forest} delay={ for tree={ name/.option=content,% now node name is same as content circle,draw, % nodes as circles, }, } [a, label=north:{well \dots} [b [e [k][l]] [f [m]]] [c [g [y][z]]] [d [i]] ] \end{forest} % ~~~ correct ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \begin{forest} delay={ for tree={ name/.option=content,% now node name is same as content % circle,draw, % nodes as circles, }, } [a, label=north:baselined [b [e [k][l]] [f [m]]] [c [g [y][z]]] [d [i]] ] \end{forest} \end{document}

  • Hyphenation in slash constructions not working anymore
    by suricata78 on December 3, 2025 at 7:58 am

    With the recent updates of the babel and the listings packages (for me that meant babel 25.14 --> 25.16 and listings 1.10c --> 1.11b), I encountered a change in the hyphenation behavior in my documents: Before the updates, compounds like "linebreaking/hyphenation" would be hyphenated wherever needed, including in the second word. After the updates, this does not work anymore, "hyphenation" is not hyphenated but runs into the margin. In the log file I see these lines now: ==> First Aid for listings.sty no longer applied! Expected: 2024/09/23 1.10c (Carsten Heinz) but found: 2025/11/14 1.11b (Carsten Heinz) so I'm assuming it got fixed. where before the update it said ==> First Aid for listings.sty applied! Please see the following MWE for testing. \documentclass{article} \usepackage[english]{babel} \usepackage{listings} \begin{document} asfölkjhasdöflhaöeoikljhkjhlkjhsaldkjfaösdljkaöslkjhöklkjhlö linebreaking/hyphenation \end{document} If the listings package is loaded and the file is compiled with the old versions of babel and listings, "linebreaking/hyphenation" is hyphenated like this (which is what I want): I know I could use shorthands and other "manual" hyphenation solutions, but this would seem like a big step back from this working so nicely and automatically. So my question is: Is there a way to get the First Aid solution back? Note: I am actually using the listings package to print code snippets in my documents. I was surprised to see it affects hyphenation outside listings environments - it was an unknown but much appreciated side effect 🙂

  • Inconsistent spacing behavior between `equation`s with `fleqn` option?
    by Explorer on December 3, 2025 at 6:38 am

    Let's see the following two codes: \documentclass[12pt,a4paper]{article} \usepackage{showframe} \usepackage{amsmath} \usepackage{lipsum} \begin{document} \lipsum[1][1-3] \begin{equation}% x^2+y^2=z^2 \label{eq:1} \end{equation}% \lipsum[1][1-3] \begin{equation}% x^2+y^2=z^2 \label{eq:2} \end{equation}% \lipsum[1][1-3] \begin{equation}% x^2+y^2=z^2 \label{eq:3} \end{equation}% \lipsum[1][1-3] aa \eqref{eq:1} and \eqref{eq:2} and \eqref{eq:3} \end{document} It gives normally: While, when I add fleqn: \documentclass[12pt,a4paper,fleqn]{article} \usepackage{showframe} \usepackage{amsmath} \usepackage{lipsum} \begin{document} \lipsum[1][1-3] \begin{equation}% x^2+y^2=z^2 \label{eq:1} \end{equation}% \lipsum[1][1-3] \begin{equation}% x^2+y^2=z^2 \label{eq:2} \end{equation}% \lipsum[1][1-3] \begin{equation}% x^2+y^2=z^2 \label{eq:3} \end{equation}% \lipsum[1][1-3] aa \eqref{eq:1} and \eqref{eq:2} and \eqref{eq:3} \end{document} The spacing expand unexpectedly. IMHO, flqno.clo just move the formula left, without adding the spacing. I want to know how to keep the \above(below)display(short)skip the same as the reqno's case. I found two (maybe) relative links.... But not exactly the same, I think(they both relative with hyperref)... https://tex.stackexchange.com/a/235837/322482 https://tex.stackexchange.com/a/122358/322482

  • Shaded Tabular table not working as expected
    by Álvaro on December 3, 2025 at 4:27 am

    I have this code: \documentclass{article} \usepackage{array,multirow,xcolor,colortbl} \definecolor{tableheadercolor}{HTML}{FFCE63} % Orange from the Keams template \colorlet{tablerowcolor}{tableheadercolor!20} % 20% header color + 80% white \begin{document} \begin{table}[ht] \centering \caption{Opened and Closed JIRA Tickets for ED by Month} \begin{tabular}{| >{\centering\arraybackslash}m{0.1\textwidth}| >{\centering\arraybackslash}m{0.15\textwidth}| >{\centering\arraybackslash}m{0.15\textwidth}| >{\centering\arraybackslash}m{0.15\textwidth}|} \hline \rowcolor{tableheadercolor} \textbf{Year} & \textbf{Month} & \textbf{Opened JIRAs} & \textbf{Closed JIRAs} \\ \hline \multirow{1}{*}{\centering 2023} & December & 2 & 1 \\ \hline \multirow{12}{*}{\cellcolor{tablerowcolor}\centering 2024} & \cellcolor{tablerowcolor} January & \cellcolor{tablerowcolor} 1 & \cellcolor{tablerowcolor} 0 \\ \cline{2-4} & February & 0 & 1 \\ \cline{2-4} & \cellcolor{tablerowcolor} March & \cellcolor{tablerowcolor} 0 & \cellcolor{tablerowcolor} 0 \\ \cline{2-4} & April & 0 & 0 \\ \cline{2-4} & \cellcolor{tablerowcolor} May & \cellcolor{tablerowcolor} 3 & \cellcolor{tablerowcolor} 1 \\ \cline{2-4} & June & 0 & 0 \\ \cline{2-4} & \cellcolor{tablerowcolor} July & \cellcolor{tablerowcolor} 0 & \cellcolor{tablerowcolor} 0 \\ \cline{2-4} & August & 2 & 2 \\ \cline{2-4} & \cellcolor{tablerowcolor} September & \cellcolor{tablerowcolor} 0 & \cellcolor{tablerowcolor} 0 \\ \cline{2-4} & October & 1 & 0 \\ \cline{2-4} & \cellcolor{tablerowcolor} November & \cellcolor{tablerowcolor} 1 & \cellcolor{tablerowcolor} 0 \\ \cline{2-4} & December & 2 & 1 \\ \hline \multirow{11}{*}{\centering 2025} & \cellcolor{tablerowcolor} January & \cellcolor{tablerowcolor} 2 & \cellcolor{tablerowcolor} 8 \\ \cline{2-4} & February & 4 & 2 \\ \cline{2-4} & \cellcolor{tablerowcolor} March & \cellcolor{tablerowcolor} 0 & \cellcolor{tablerowcolor} 3 \\ \cline{2-4} & April & 8 & 4 \\ \cline{2-4} & \cellcolor{tablerowcolor} May & \cellcolor{tablerowcolor} 2 & \cellcolor{tablerowcolor} 0 \\ \cline{2-4} & June & 2 & 4 \\ \cline{2-4} & \cellcolor{tablerowcolor} July & \cellcolor{tablerowcolor} 1 & \cellcolor{tablerowcolor} 4 \\ \cline{2-4} & August & 2 & 1 \\ \cline{2-4} & \cellcolor{tablerowcolor} September & \cellcolor{tablerowcolor} 1 & \cellcolor{tablerowcolor} 3 \\ \cline{2-4} & October & 2 & 0 \\ \cline{2-4} & \cellcolor{tablerowcolor} November & \cellcolor{tablerowcolor} 0 & \cellcolor{tablerowcolor} 1 \\ \hline \end{tabular} \end{table} \end{document} However, the row for year 2024 is not correctly shaded: What I want to achieve is rows with alternate shading.

  • Is there a way in TikZ or Lua to make a short function which converts letters to their corresponding alphabetical position (and vice versa)?
    by Jasper on December 2, 2025 at 5:38 pm

    Is there a way in TikZ or Lua to make a short function which converts letters to their corresponding alphabetical position (and vice versa)? The only way I can think of it so string check each letter, but that sounds too computationally expensive. M(non)WE: \documentclass[tikz,border=1cm]{standalone} \newcommand{\letterpos}[1]{ \pgfmathparse{#1 == a} \ifnum\pgfmathresult=1 1 \fi \pgfmathparse{#1 == ab} \ifnum\pgfmathresult=1 2 \fi \pgfmathparse{#1 == c} \ifnum\pgfmathresult=1 3 \fi \pgfmathparse{#1 == d} \ifnum\pgfmathresult=1 4 \fi \pgfmathparse{#1 == e} \ifnum\pgfmathresult=1 5 \fi } \begin{document} \begin{tikzpicture} \foreach \letter in {a,b,...,e} { \node at (\letterpos{\letter},0) {\letter}; } \end{tikzpicture} \end{document}

  • Redefine quotation environment to remove initial indent
    by agoldst on December 2, 2025 at 4:13 pm

    The default LaTeX quotation environment starts each paragraph with an indentation. I prefer for a multi-paragraph block quote not to indent the first paragraph (as recommended by the Chicago Manual of Style, for example). It is of course possible to write \begin{quotation}\noindent every time. But I would like to redefine the environment. I tried to modify the default article.cls definition of quotation minimally, but the result somehow puts a word space at the start of the quotation. How do I avoid this space without having to manually begin every block quote with a \noindent? Example: \documentclass{article} \newenvironment{lquote}{\list{}{\listparindent 1.5em% \itemindent\listparindent \rightmargin \leftmargin \parsep 0pt plus 1pt}\item\noindent\relax}% {\endlist} \begin{document} Quotation environment with explicit noindent: \begin{quotation} \noindent He finally lit on the ground and walked around the body to see if it were really dead. Peered into its nose and mouth. Examined it well from end to end and leaped upon it and bowed, and the others danced a response. That being over, he balanced and asked: ``What killed this man?'' \end{quotation} Custom environment attempting to put noindent at the beginning \begin{lquote} He finally lit on the ground and walked around the body to see if it were really dead. Peered into its nose and mouth. Examined it well from end to end and leaped upon it and bowed, and the others danced a response. That being over, he balanced and asked: ``What killed this man?'' \end{lquote} \end{document} On my system, pdflatex gives this:

  • Section title with \star
    by Roberto Rastapopoulos on December 2, 2025 at 1:47 pm

    I am trying to get the following: But when I insert it in this way: \documentclass[a4paper,12pt]{amsart} \usepackage{hyperref} \begin{document} \tableofcontents \section{Introduction} \subsection{$\star$ N-Soliton solutions} Some text about N-soliton solutions... \end{document} I get the error "Package hyperref Warning: Token not allowed in a PDF string (Unicode): removing `math shift' [...]". When I write \subsection{\star N-Soliton solutions} I get How can I get the first one without the error? I have tried several things, but all come with another problem.

  • Under `zref-clever`, command to retrieve name strings of a given reference type?
    by Peter LeFanu Lumsdaine on December 2, 2025 at 12:50 pm

    I’m using zref-clever, and looking for a way to explicitly retrieve the various name strings associated to a given reference type — so I can write e.g. \zcrefgetstring{theorem}{Name-pl} and get “Theorems”. Presumably the package must already include some command that does roughly this, but as far as I can find, it’s not documented in the user manual, so must be internal-only. I am searching through the code, which is excellently documented but quite long and complex — so I am also asking here, either in case someone who knows the package better can give the answer quicker than I can find it, and (even if I find it first myself) to make the answer more easily searchable in future. MWE, showing approximate desired usage; expected output is hopefully clear: \documentclass{article} \usepackage{zref-clever} \newcommand{\zcrefgetstring}[2]{UNDEFINED} \begin{document} The reference type \texttt{theorem} has name \zcrefgetstring{theorem}{name-sg}. Capitalised and in plural, it is \zcrefgetstring{theorem}{Name-pl}. \end{document}

  • xcolor not fully colouring commutative diagrams drawn by tikzcd
    by Ishan Deo on December 2, 2025 at 3:12 am

    I'm using xcolor in a table whose cells contain commutative diagrams drawn by tikzcd. However, the colour from xcolor is not fully going through these commutative diagrams, as can be seen by the image below Here is a MWP for the code \documentclass[12pt]{article} \usepackage[svgnames,table]{xcolor} \usepackage{tikz-cd} \begin{document} \begin{table} \centering \rowcolors{1}{Gray!10}{} \begin{tabular}{c} $\displaystyle \begin{tikzcd}[column sep=huge, ampersand replacement=\&] * \arrow[r, bend left = 40, "\,", ""{name=U, inner sep=1pt, below}] \arrow[r, bend right = 40, "\,"{below}, ""{name=D, inner sep=1pt}] \& \arrow[Rightarrow, from=U, to=D, "\alpha"] * \end{tikzcd}$ \end{tabular} \end{table} \end{document} Why is this error happening? And how can I fix it?

  • AMSrefs incorrectly uses singular "ed." instead of "eds." for a second bibitem with the same editors
    by LSpice on December 1, 2025 at 8:13 pm

    The problem description is in the title: AMSrefs incorrectly uses singular "ed." instead of "eds." for a second bibitem with the same editors. I'm not sure if it's OK to report such bugs here, but I have done so successfully in the past, so hopefully this is OK, too. Here's a MWE (or maybe not really M, but hopefully acceptably brief): \documentclass{article} \usepackage{amsrefs} \begin{document} \begin{bibdiv} \begin{biblist} \bib{SGA-3.1}{book}{ editor={Demazure, Michel}, editor={Grothendieck, Alexander}, title={Sch\'emas en groupes. I: Propri\'et\'es g\'en\'erales des sch\'emas en groupes}, } \bib{SGA-3.2}{book}{ editor={Demazure, Michel}, editor={Grothendieck, Alexander}, title={Sch\'emas en groupes. II: Groupes de type multiplicatif, et structure des sch\'emas en groupes g\'en\'eraux}, } \end{biblist} \end{bibdiv} \end{document} The expected outcome is that the first entry is listed with "Michel Demazure and Alexander Grothendieck (eds.)", and the second entry is listed with "————— (eds.)". Actually the second entry is listed with "————— (ed.)".

  • Splitting a sentence into characters (incl. spaces) and displaying each character in a tikz node
    by Ted Black on December 1, 2025 at 5:50 pm

    I have written the following code using expl3 \documentclass{article} \usepackage{tikz} \ExplSyntaxOn \NewDocumentCommand{\boxedglyphs}{m} { \mgs_box_chars:n { #1 } } \cs_new_protected:Npn \mgs_box_chars:n #1 { \seq_set_split:Nnn \l_tmpa_seq {} {#1} \seq_map_inline:Nn \l_tmpa_seq { \mgs_box_one_char:n { ##1 } } } \cs_new_protected:Npn \mgs_box_one_char:n #1 { \tl_if_blank:nTF { #1 } {\tikz{\node[draw=red] {\textvisiblespace};}} {\tikz{\node[draw=red,inner~sep=0pt,outer~sep=0pt,minimum~height=2ex,] {#1};}} } \ExplSyntaxOff \newcommand{\new}{new} \begin{document} \boxedglyphs{Hello~brave~\new~world!} \end{document} The code is used to break a sentence in individual characters and/or words/subwords. The code works well except with spaces. The output I get is The code does not recognize blank spaces in \tl_if_blank; instead it just goes to the false branch and prints a node with a blank space. I am sure I am missing something elementary but having looked through the documentation of interface3 I am no wiser. Any hints would be appreciated.

  • Missing hyphens with IBM Plex fonts and `\DocumentMetadata`
    by chrispi_cookie on December 1, 2025 at 3:38 pm

    I would like to use IBM Plex Serif (and other IBM Plex fonts) for my documents. Everything works fine without \DocumentMetadata. But if I use \DocumentMetadata TeX is hangry and eats all my hyphens. See the mwe and pdf output below. \DocumentMetadata{lang=de} \documentclass{article} \usepackage{unicode-math} \setmainfont{IBM Plex Serif} \begin{document} test test test test test test test test test test test test test test Schifffahrtsbauergasse \end{document} I'm aware of the discussion at GitHub regarding missing hyphens with \DocumentMetadata (https://github.com/latex3/tagging-project/issues/967). However, I have absolutely no real knowledge of fonts, other than that I use them. As this is the tagging repo I thought it has something to do with tagging. But even without tagging=on or no tagging option at all the hyphens are missing. The following workaround was described in the discussion, but I'm not sure if that is a good idea (and it doesn't work for me neither). \tagpdfsetup{activate/softhyphen=false} Is there something (maybe a working workaround) I can do to use IBM Plex together with \DocumentMetadata and correct hyphenation (and enable tagging) at the moment? If required I am using a current LaTeX version: LaTeX2e <2025-11-01> L3 programming layer <2025-11-14>

  • Numbering only in a specific line of an align environment (without \tag or extra packages)
    by Sebastiano on December 1, 2025 at 9:56 am

    I’m trying to number a system of equations using the amsmath package, but I would like the equation number to appear on a specific line within the align environment. In my example, I want the numbering to appear on the second line instead of the first one. Here is the code: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align}\label{498h} \mathcal{L}\left\{ t \cos(a t) \right\} & = \frac{ s^2 - a^2 }{ (s^2 + a^2)^2 } \int_0^t \frac{\partial{K(\sigma,\gamma)}}{\partial \sigma}K_L e(\sigma) \\ & = \frac{8 h^3}{a^3}-\frac{8 (h^2-1) h}{a^3}+\frac{16 u}{a^2} \end{align} I want the numered equation on the 2nd \eqref{498h} \end{document} I would like only the second line to be numbered, leaving the first one unnumbered. Moreover, I do not want to use additional packages or the \tag command or \nonumber. In general, for example, if I have 35 line of equation, how is it possible to put, the number in the 24-th equation? I have not checked whether a similar question has already been answered on the site. Thank you all!

  • French spacing conflicts with cleveref
    by Erwann on December 1, 2025 at 5:41 am

    In this example I must choose between \cref{sec:bar} and French spacing (o/w disabled using \NoAutoSpace; I presume because sec:bar is read sec\thinspacing:bar. Is there a solution? \documentclass{article} \usepackage[T1]{fontenc} \usepackage[french]{babel} %\NoAutoSpacing \usepackage{cleveref} \begin{document} \section{Foo} bonjour: monde; oui? non! «aujourd'hui» % Voir~\cref{sec:bar} %(./debug-108.aux) %! Missing \endcsname inserted. %<to be read again> % \unskip %l.14 Voir~\cref{sec:bar} % %? \section{Bar}\label{sec:bar} bonjour: monde; oui? non! « aujourd'hui » \end{document}

  • How can I mainpulate the arguments in a function defined with \fp_new_function:n?
    by LaTeXereXeTaL on December 1, 2025 at 4:40 am

    I just discovered that we can now create new functions (fp words) that can be evaluated inside \fp_eval:n per page 273 of interface3.pdf (it also seems to work with \fpeval). This is straightforward as the demo shows. What if I want, or need, to manipulate the function arguments to get the returned result? I can't get that to work. This functionality may not be provided yet, but I don't see it mentioned in the documentatin and searching this site turned up nothing (or I somehow missed it). MWE: % !TEX program = lualatexmk % !TEX encoding = UTF-8 Unicode \documentclass{article} \ExplSyntaxOn % This works. \fp_new_function:n { npow } \fp_set_function:nnn { npow } { a,b } { a**b } % This does not work. \fp_new_function:n { biggerof } \fp_set_function:nnn { biggerof } { a,b } { \fp_compare:nTF { a < b } { b } { a } } \ExplSyntaxOff \begin{document} \( \alpha = \fpeval{npow(2,3)} \) \( \alpha = \fpeval{biggerof(2,3)} \) \end{document}

  • Practical guidelines for using sockets
    by Niranjan on December 1, 2025 at 4:22 am

    I have read the documentation of sockets and I was wondering how sockets can be used for practical use-cases. While surfing SE, I found this discussion around the topic and this mesmerizing picture-mode-illustrated answer 😛, but still didn't find a straight forward example. I asked AI to give a sample code and got the following (some manual cleanup done and some deprecated commands removed from the original AI-response): \DocumentMetadata{tagging=on} \documentclass{article} \begin{document} \NewSocket{greeting-socket}{0} \NewSocketPlug{greeting-socket}{formal}{Dear ma’am/sir,} \NewSocketPlug{greeting-socket}{informal}{Hi there,} \NewSocketPlug{greeting-socket}{friendly}{Hello, friend!} \NewSocket{closing-socket}{0} \NewSocketPlug{closing-socket}{formal}{Sincerely,} \NewSocketPlug{closing-socket}{informal}{Cheers,} \section*{Formal Letter} \AssignSocketPlug{greeting-socket}{formal} \AssignSocketPlug{closing-socket}{formal} \UseSocket{greeting-socket} This is a formal letter content. \UseSocket{closing-socket} John Doe \section*{Informal Note} \AssignSocketPlug{greeting-socket}{informal} \AssignSocketPlug{closing-socket}{informal} \UseSocket{greeting-socket} This is an informal note. \UseSocket{closing-socket} Jane \section*{Friendly Message} \AssignSocketPlug{greeting-socket}{friendly} \AssignSocketPlug{closing-socket}{informal} \UseSocket{greeting-socket} Just a quick message to say hi. \UseSocket{closing-socket} Your pal \end{document} Now the question is if this type of usage can be called "standard"? Imagine I have some code instead of the un-expandable text in the given example. Here are some questions: Are the names used here recommendable? What names do the kernel use-cases of sockets use? What should package authors use? (The documentation says: Best practice naming conventions are . . . to be documented but it is dated 2024-12-27 which is quite old now, so I assume some recommendations can be given?) Usually it is said that sockets are to be used only once unlike hooks. Does that mean multiple usages of \AssignSocketPlug wrong? The documentation does say: If the programming logic should change, then all that is necessary is to make a new assignment with \AssignSocketPlug to a different {⟨socket-plug-name⟩}. but it also says: A socket is typically only used in one place in code, but this is not a requirement, i.e., if the same operation with the same inputs need to be carried out in several places the same named socket can be used. So I am confused. In the given example, what exactly is wrong (or atypical)? The multiple uses of \AssignSocketPlug or \UseSocket? Theoretically both seem to be fine, but not sure what is expected. Is there any general consensus on what should not be used in sockets? Anything else regarding sockets based on the example or beyond it?

  • What are CTAN package modifications that don't affect the package files and why do they happen?
    by schtandard on November 30, 2025 at 11:25 pm

    Today, I updated my TeX Live installation and noticed that a lot of packages were updated where the old and the new version number were identical. Looking into some examples, it seems like the packages are indeed unchanged. There seems to have been a modification in the CTAN catalogue that did not affect the package files at all. What is it and why did it happen? An example: One of the "updated" packages was lipsum, from version 2.7 to version 2.7. Looking at its directory page, all files date from 2021, so there was no recent change justifying an update. However, when I search for lipsum, the search result is marked as "Last modified in Catalogue: 2025-11-11 12:35". This modification must be what triggered the update. However, I could not find this date or any reference to this modification on the package page this search result entry links to (or anywhere else, for that matter).

  • Adding math kerns (aka cut-ins or staircase kerning) to OpenType math fonts
    by Apoorv Potnis on November 30, 2025 at 12:10 pm

    Is it possible to add math kerns (aka cut-ins or staircase kerning) to OpenType math fonts? If yes, how? I am personally looking for something which works for LuaLaTeX (using fonts.handlers.otf.addfeature?), but I would be happy for other solutions as well. For example, I want to add a bottom right math kern to \lmathccal{O}. \documentclass{article} \usepackage[newcmbb]{fontsetup} % Below code copied from here: https://tex.stackexchange.com/a/373539/128462. \DeclareFontFamily{U}{mathc}{} \DeclareFontShape{U}{mathc}{m}{it}% {<->s*[1.03] mathc10}{} \DeclareMathAlphabet{\lmathccal}{U}{mathc}{m}{it} % \DeclareMathAlphabet\cmmathcal{OMS}{cmsy}{m}{n} % \renewcommand{\symcal}{\lmathccal} \begin{document} \(\lmathccal{O}_i\) \(\symcal{O}_i\) \end{document}

  • \newcommands and align environment: How to get the correct alignment?
    by Grey Eminence on November 29, 2025 at 2:06 pm

    When using the \labelrel command (with \overset instead of \stackrel as \stackrel is obsolete: Differences between \stackrel and \stackbin) from @Circumscribe Put reference above equal sign and refer to it in an align-environment the alignment is not correct: \documentclass{article} \usepackage{mathtools} \newcounter{relctr} %% <- counter for relations \renewcommand*\therelctr{\alph{relctr}} %% <- label format \newcommand\labelrel[2]{% \begingroup \refstepcounter{relctr}% \overset{\textnormal{(\alph{relctr})}}{\mathstrut{#1}}% \originallabel{#2}% \endgroup } \AtBeginDocument{\let\originallabel\label} %% <- store original definition \begin{document} \begin{align*} a &= b \\ &\labelrel{=}{someLabel} c \end{align*} \end{document} This seems to be a well known problem with the \overset command: \overset and align environment: how to get correct alignment? where the aligned-overset package offers a nice solution. So my question is how one can achieve similar behavior for the \labelrel command or even more generally specify the behavior with align for new commands. I don't have any experience with coding new commands myself but I decided to post this as a new questions as this may be an interesting question for other users as well. Here is what I tried: Search the internet Try using the aligned-overset in the definition of \labelrel but I had no idea on how to pass the & from align to the definition Look at the implementation of aligned-overset to copy the relevant code however I almost didn't understand anything.

  • Replace glyph from font A with a glyph from font B in LuaLaTeX/Node?
    by Alain Stalder on November 29, 2025 at 6:22 am

    The issue is that I have a font that has 9 different glyphs per characters, glyphs called e.g. a, a.2, … a.8 for the lowercase a; and the glyphs look similar per character and have the identical metrics. Those glyphs are rotated cyclically via the GSUB font table and there is a large kerning table for pairs for all glyphs. This works fine in most places today, including in LuaLaTeX with HarfBuzz renderer and in XeLaTeX, but it is not fully supported with LuaLaTeX with the default Node renderer, there kerning is only correct in part of the cases. Since it looks like it would not be practical to fix this in the source codes, see this luaoftload github issue of mine from 2021, I was wondering if I could maybe find a workaround using Lua hooks, but have not found out so far if there would be such a hook. Specifically, I know that kerning works fine if I reduce the font to just use one glyph per character, let me call that font "A". The idea would now be to use that font via fontspec and use a Lua hook late in the process, when "typesetting" has already happened (kerning, hyphenation, etc.), i.e. when it has been determined where each glyph will be placed on the output and then replace the glyphs with pseudo-randomly one from the full font "B", e.g. replace glyph a from font A with a.5 from font B. Is there such a hook, or would anybody know of a different way achieving this in LuaLaTeX (with Node renderer)? I guess, if not possible, it would in principle be possible to do this afterwards in the resulting pdf, and I could probably figure out how to do this (or ask elsewhere), but that would not be ideal, also because it would be two steps, e.g. not visible in TexShop while writing. Added same day: Here is a specific example. The font with the GSUB rotation is Jackwrite.ttf and I have created a variant with just a single glyph per character, see links in the example. While I am at it, I am also showing an example with the opposite, a font Stoicheoin that has two chars per glyph, uppercase A and lowercase a for glyph A and also there I created a variant with one glyph (duplicated) for each char. I have also added the output of the nodetree package for the Jackwrite case... % !TEX TS-program = lualatex \documentclass{article} \usepackage{fontspec} \usepackage{nodetree} % https://jack-daw.com/fonts/stoicheion.zip => Stoicheion.ttf \newfontfamily\stoicheion{Stoicheion.ttf} % % https://jack-daw.com/fonts/StoicheionSingleCharPerGlyphDoNotDistribute.ttf \newfontfamily\stoicheionsimple{StoicheionSingleCharPerGlyphDoNotDistribute.ttf} % https://jack-daw.com/fonts/jackwrite.zip => Jackwrite.ttf \newfontfamily\jackwrite{Jackwrite.ttf} % https://jack-daw.com/fonts/JackwriteSingleGlyphPerCharDoNotDistribute.ttf \newfontfamily\jackwritesimple{JackwriteSingleGlyphPerCharDoNotDistribute.ttf} \begin{document} \Large \section*{\stoicheion{Full Featured Fonts Yes}} \jackwrite{iiiiiiiii} \section*{\stoicheionsimple{Full Featured Fonts No}} \jackwritesimple{iiiiiiiii} \end{document} And here the output of fontree, first for the simpler font because there the result seems to be simpler (Jackwrite case, the 9 i's): ├─GLUE (baselineskip) wd 9.26pt └─HLIST (line) wd 345pt, dp 0.33pt, ht 8.41pt ╚═head ├─LOCAL_PAR ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt ├─KERN (fontkern) -2.88pt ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═ props {['injections'] = {['leftkern'] = -188743.6}} ├─DISC (regular) penalty 50 │ ╠═replace │ ║ └─KERN (fontkern) -2.88pt │ ╚═pre │ ├─KERN (fontkern) -1.44pt │ └─GLYPH (glyph) '-', font 30, wd 7.88pt, ht 3.61pt │ props {['preinjections'] = {['leftkern'] = -94371.8}} ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═ props {['emptyinjections'] = {['leftkern'] = -188743.6}} ├─DISC (regular) penalty 50 │ ╠═replace │ ║ └─KERN (fontkern) -2.88pt │ ╚═pre │ ├─KERN (fontkern) -1.44pt │ └─GLYPH (glyph) '-', font 30, wd 7.88pt, ht 3.61pt │ props {['preinjections'] = {['leftkern'] = -94371.8}} ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═ props {['emptyinjections'] = {['leftkern'] = -188743.6}} ├─DISC (regular) penalty 50 │ ╠═replace │ ║ └─KERN (fontkern) -2.88pt │ ╚═pre │ ├─KERN (fontkern) -1.44pt │ └─GLYPH (glyph) '-', font 30, wd 7.88pt, ht 3.61pt │ props {['preinjections'] = {['leftkern'] = -94371.8}} ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═ props {['emptyinjections'] = {['leftkern'] = -188743.6}} ├─DISC (regular) penalty 50 │ ╠═replace │ ║ └─KERN (fontkern) -2.88pt │ ╚═pre │ ├─KERN (fontkern) -1.44pt │ └─GLYPH (glyph) '-', font 30, wd 7.88pt, ht 3.61pt │ props {['preinjections'] = {['leftkern'] = -94371.8}} ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═ props {['emptyinjections'] = {['leftkern'] = -188743.6}} ├─DISC (regular) penalty 50 │ ╠═replace │ ║ └─KERN (fontkern) -2.88pt │ ╚═pre │ ├─KERN (fontkern) -1.44pt │ └─GLYPH (glyph) '-', font 30, wd 7.88pt, ht 3.61pt │ props {['preinjections'] = {['leftkern'] = -94371.8}} ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═ props {['emptyinjections'] = {['leftkern'] = -188743.6}} ├─KERN (fontkern) -2.88pt ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═ props {['injections'] = {['leftkern'] = -188743.6}} ├─KERN (fontkern) -2.88pt ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═ props {['injections'] = {['leftkern'] = -188743.6}} ├─PENALTY (linepenalty) 10000 ├─GLUE (parfillskip) plus +1fil └─GLUE (rightskip) Looks like it would simply allow to hyphenate anywhere except between first and last pairs of "ii", which makes sense. And here the output with the regular font with GSUB rotation (again Jackwrite case, the 9 i's): ├─GLUE (baselineskip) wd 9.27pt └─HLIST (line) wd 345pt, dp 0.42pt, ht 8.42pt ╚═head ├─LOCAL_PAR ├─GLYPH (glyph) 'i', font 28, wd 7.88pt, ht 8.41pt, dp 0.33pt ├─KERN (fontkern) -2.88pt ├─GLYPH (glyph) '󰀋', font 28, wd 7.88pt, ht 8.32pt, dp 0.42pt │ ╚═ props {['injections'] = {['leftkern'] = -188743.6}} ├─KERN (fontkern) -2.88pt ├─GLYPH (glyph) '󰁧', font 28, wd 7.88pt, ht 8.37pt, dp 0.35pt │ ╚═ props {['injections'] = {['leftkern'] = -188743.6}} ├─KERN (fontkern) -2.88pt ├─GLYPH (glyph) '󰃃', font 28, wd 7.88pt, ht 8.32pt, dp 0.33pt │ ╚═ props {['injections'] = {['leftkern'] = -188743.6}} ├─KERN (fontkern) -2.88pt ├─GLYPH (glyph) '󰄟', font 28, wd 7.88pt, ht 8.41pt, dp 0.36pt │ ╚═ props {['injections'] = {['leftkern'] = -188743.6}} ├─KERN (fontkern) -2.88pt ├─GLYPH (glyph) '󰅻', font 28, wd 7.88pt, ht 8.32pt, dp 0.35pt │ ╚═ props {['injections'] = {['leftkern'] = -188743.6}} ├─DISC (regular) penalty 50 │ ╠═replace │ ║ ├─KERN (fontkern) -2.88pt │ ║ ├─GLYPH (glyph) '󰇗', font 28, wd 7.88pt, ht 8.42pt, dp 0.39pt │ ║ │ props {['replaceinjections'] = {['leftkern'] = -188743.6}} │ ║ ├─GLYPH (glyph) 'i', font 28, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ║ ├─KERN (fontkern) -2.88pt │ ║ └─GLYPH (glyph) '󰀋', font 28, wd 7.88pt, ht 8.32pt, dp 0.42pt │ ║ props {['injections'] = {['leftkern'] = -188743.6}} │ ╠═post │ ║ ├─GLYPH (glyph) 'i', font 28, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ║ ├─KERN (fontkern) -2.88pt │ ║ ├─GLYPH (glyph) '󰀋', font 28, wd 7.88pt, ht 8.32pt, dp 0.42pt │ ║ │ props {['injections'] = {['leftkern'] = -188743.6}} │ ║ └─GLYPH (glyph) 'i', font 28, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═pre │ └─GLYPH (glyph) '󰁓', font 28, wd 7.88pt, ht 3.6pt ├─PENALTY (linepenalty) 10000 ├─GLUE (parfillskip) plus +1fil └─GLUE (rightskip) I do not really understand what it does, but looks like I if I just used the simpler font and found out how to replace the GLYPH settings with the desired glyph (identify it how exactly?) and font 28 instead of 30 (get these numbers from where?), this could yield the desired result… Added same day as asked: Based on Max Cherkoff's answer I managed to make a quick demo that his answer would also work in my case. I am just replacing one of the rs in the example with one with a more prominent "typewriter" glitch, using for the demo just the numbers of the fonts and the glyphs, but would certainly also work along what Max did: % !TEX TS-program = lualatex \documentclass{article} \usepackage{fontspec} \usepackage{luacode} \begin{luacode} local function recurse(head, indent) for n in node.traverse(head) do print(string.rep("-", indent) .. ">>") if n.id == node.id("glyph") then print(string.rep("-", indent) .. "char " .. n.char .. " of font " .. n.font) if n.char == 114 and n.font == 23 then n.char = 983520 n.font = 22 end elseif n.head or n.replace then if n.head then n.head = recurse(n.head, indent+2) end if n.replace then if n.pre then n.pre = recurse(n.pre, indent+2) end if n.post then n.post = recurse(n.post, indent+2) end n.replace = recurse(n.replace, indent+2) end end print(string.rep("-", indent) .. "<<") end return head end local function show_fonts_and_chars(head) print() print("show fonts and chars...") return recurse(head, 0) end luatexbase.add_to_callback("post_linebreak_filter", show_fonts_and_chars, "demo") \end{luacode} % https://jack-daw.com/fonts/jackwrite.zip => Jackwrite.ttf \newfontfamily\jackwrite{Jackwrite.ttf} % https://jack-daw.com/fonts/JackwriteSingleGlyphPerCharDoNotDistribute.ttf \newfontfamily\jackwritesimple{JackwriteSingleGlyphPerCharDoNotDistribute.ttf} \begin{document} \Huge \jackwrite{iiiiiiiiii rrrrrrrrrr} \jackwritesimple{iiiiiiiiii rrrrrrrrrr} \end{document} Output:

  • About \def parameter list
    by YCH817 on November 28, 2025 at 9:44 am

    I try to implement the currying function , and I start from implement the following : \myproc<=b<=a will print a \mapsto b \mapsto {\rm output} \myproc<=b will print {\bf a} \mapsto b \mapsto {\rm output} \myproc<<=a will print a \mapsto {\bf b} \mapsto {\rm output} the next step is to make \myproc<<=a be the function that accepts b as input (e.g. \myproc<<=a<=b outputs \myproc<=b<=a) where the \bf stands for the default value . However when I replace the a / b by x_1 / and x_2 , something undesired happened : Here is the MWE : https://www.overleaf.com/9672474965wszpvxnkwkpr#bdc9bc Here is the code in case you cannot access to the overleaf link : \documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsfonts} \usepackage{mathtools} \usepackage{tikz} \begin{document} \makeatletter \def\myproc<{% \@ifnextchar <% {\myproc@NopB} {\myproc@YopB} } \def\myproc@NopB<=#1{% \myproc@YopB@YopA{{\bf x}_2}<={#1}% } \def\myproc@YopB=#1{%<=#2 \@ifnextchar <% {\myproc@YopB@YopA#1}% myproc <=b<=a myproc@YopB =b<=a myproc@YopB@YopA b<=a {\myproc@YopB@NopA#1}% myproc <=b myproc@YopB =b myproc@YopB@NopA b } \def\myproc@YopB@NopA#1{% \myproc@YopB@YopA{#1}<={{\bf x}_1}% } \def\myproc@YopB@YopA#1<=#2{ {#2} \mapsto {#1} \mapsto {\rm output}% } \makeatother % \myproc@NopB \(\myproc<<={x_1}\)\par \(\myproc<={x_2}\)\par \(\myproc<={x_2}<={x_1}\) \vspace{10pt} The desire result should be\par \(x_1\mapsto {\bf x}_2\mapsto {\rm output}\)\par \({\bf x}_1\mapsto x_2\mapsto {\rm output}\)\par \(x_1 \mapsto x_2 \mapsto {\rm output}\) \end{document}

  • Status of the tabularray package?
    by albert on November 28, 2025 at 9:20 am

    I saw something worrying on gthub regarding the status of the package tabularay: Does anyone know how the future will look like for this package? Will there someone who will take over its maintenance?

  • Why does LaTeX put the PDF tags for floats at the end of the document?
    by Mörkö on November 28, 2025 at 8:34 am

    Background I am trying to produce a reasonably accessible document template at work. I have worked out basic tagging, reasonably structured tables, alt text for images and mathml output for inline and block math envs. I have been testing this document with NVDA + MathCAT + Adobe Acrobat, which I understand to be a "known good" reader + screen reader combo. (I am sighted and don't use screen readers in my daily life: please correct me if this is an unreasonable test setup!) I have also been inspecting the thing with PAC and the ngpdf editor. Everything I'm showing here is compiled with the lualatex-dev demo here https://latex3.github.io/tagging-project/documentation/wtpdf/small-example (though I did also test it with overleaf's newest release and got the same outcomes) Issue with tagging structure My issue concerns floats (at least tables and figures): whereas LaTeX places them among the text in the visual part of the pdf, the relevant accessibility tags are at the very end of the document. Specifically (per the ngpdf editor) the document ends with a tables element that contains both tables (see screenshot below; I collapsed the table structure itself to save space). Therefore, when just reading the document using a screen reader from top to bottom, the float doesn't get read in the relevant chapter. If I navigate past the end of the document, I can find (and read) my floats there. I believe this not to be a problem with my reader setup, because the ngpdf editor also places these items at the end of the document and the html derivation algorithm implemented by ngpdf places them at the end of the document. I have created what I think of as a minimal repro: \DocumentMetadata{ lang = en, pdfstandard = ua-2, pdfstandard = a-4f, %or a-4 tagging=on, tagging-setup={math/setup=mathml-SE}, testphase={math} } \documentclass{article} \usepackage{graphicx} % Required for inserting images \usepackage{hyperref} \title{Figure repro} \begin{document} \maketitle This document has multiple floats (\ref{tab:A} and \ref{tab:B}). \begin{table}[h] \centering \begin{tabular}{c|c} A & B \\ C & D \end{tabular} \caption{Letters} \label{tab:A} \end{table} Then it has a paragraph of text \begin{table}[h] \centering \begin{tabular}{c|c} 1 & 2 \\ 3 & 4 \end{tabular} \caption{Numbers} \label{tab:B} \end{table} In conclusion: lorem ipsum. \url{https://ctan.org} \end{document} Corresponding html output: https://ngpdf.com/resources/html/df185aa3-feee-4946-8d0d-6ed438c568cd/2f659711-f19d-454c-a710-165dc27b36fd.html ngpdf editor: https://ngpdf.com/editor/editFile Accessibility ramifications As I read the repro with NVDA from top to bottom, I get: figure repro november twenty-eighth this document has multiple floats link go to destination table dot struct dot fourteen and link go destination link table dot struct dot thirty then it has a paragraph of text in conclusion [small pause] lorem ipsum [long pause] link https slash slash ctan dot org caption table one letters out of caption table with two rows and two columns row one column one a [pronouced ey] column two b [pronounced bee] row two column one c [pronounced cee] row two column two d [pronounced dee] out of table caption table two numbers out of caption table with two rows and two columns row one column one one column two two row two column one three row two column two four If I press k (go to next link) at "this document has multiple floats link go to destination table dot struct dot fourteen and link go destination", NVDA announces "link go to destination table dot struct dot fourteen link". When I then press enter, the box surrounding the link in acrobat changes from the purple that hyperref sets it to to a black-on-white dotted line: I would interpret that as having been visited. The same k-and-then-enter maneuver seems to work for the url link and opens a browser. I am therefore reasonably confident this activates the link. However, after activating the table link, I get silence. Then when I press down again, I get "link table dot struct dot thirty" and so on: it does not navigate me to the table. Actual questions Is having all the floats at the end the expected behaviour? I as a sighted person that isn't used to screen readers feel that the floats being at the end of the document makes navigating the document significantly harder. If the floats being at the end is not the expected behaviour, should I report a bug? Is there a known work-around to this? Besides trying to produce reasonable pdf output, I am also interested in deriving HTML / epub (potentially using the html derivation algorithm) for more general ergonomics and access reasons. I would at least want to have the figure placement controllable in that case. (Though in the html produced by ngpdf, the links do at least work) Am I missing something with the non-followable links in acrobat or is acrobat just broken? Can the link titles be made more human readable? The HTML output for reference I don't know how long the ngpdf links last so here is the html output: <!DOCTYPE html> <html lang="en"><head> <title>Figure repro</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <meta name="derivation-algorithm-version" content="1.1"/> <meta name="derivation-algorithm-producer" content="ngPDF"/> <style> li > span[data-pdf-se-type=Lbl] { font-style: bold;margin-right:.5em;display:inline-block;vertical-align:top;} div[data-pdf-se-type=LBody] > div { vertical-align:top;} div[data-pdf-se-type=LBody] > div:first-child > p:first-child { margin-top:0} </style> <style> mtable.align > mtr > mtd:nth-child(2n), mtable.flalign > mtr > mtd:nth-child(2n), mtable.alignat > mtr > mtd:nth-child(2n), mtable.aligned > mtr > mtd:nth-child(2n+1), mtable.alignedat > mtr > mtd:nth-child(2n+1), mtable.split > mtr > mtd:nth-child(2n+1) { padding-right:0;text-align:right;text-align:-moz-right;text-align:-webkit-right; } mtable.align > mtr > mtd:nth-child(2n+3), mtable.flalign > mtr > mtd:nth-child(2n+3), mtable.alignat > mtr > mtd:nth-child(2n+3), mtable.aligned > mtr > mtd:nth-child(2n), mtable.alignedat > mtr > mtd:nth-child(2n), mtable.split > mtr > mtd:nth-child(2n) { padding-left:0;text-align:left;text-align:-moz-left;text-align:-webkit-left; } /* use float right for safari */ @supports (-webkit-appearance:none) and (stroke-color:transparent) { mtable.align > mtr > mtd:nth-child(2n), mtable.flalign > mtr > mtd:nth-child(2n), mtable.alignat > mtr > mtd:nth-child(2n), mtable.aligned > mtr > mtd:nth-child(2n+1), mtable.alignedat > mtr > mtd:nth-child(2n+1), mtable.split > mtr > mtd:nth-child(2n+1) { padding-right:0;text-align:right;float:right:display:math; } } mtable.align > mtr > mtd:nth-child(2n) {border margin-left:1em; padding-left:1em; } mtable.alignat > mtr > mtd { margin-left:0em; margin-right:0em; padding-left:0em; padding-right:0em;} mtable.flalign {width:100%} mtd[intent=":no-equation-label"], mtd[intent=":equation-label"] { position:relative; left:-2em; } </style> </head> <body lang="en"><nav hidden id="PDF-PageNavigation" role="doc-pagelist"><a href="#page-0">1</a></nav><div data-pdf-se-type="Document" id="ID.002"><div data-pdf-se-type-original="text-unit" data-pdf-se-type="Part" id="ID.005"><div data-pdf-se-type="Title" id="ID.006"><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="center" style="text-align:center;" id="ID.007"><span id="page-0" role="doc-pagebreak" aria-label="1"></span>Figure repro</p></div><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="center" style="text-align:center;" id="ID.008"></p><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="center" style="text-align:center;" id="ID.009">November 28, 2025</p></div><div data-pdf-se-type-original="text-unit" data-pdf-se-type="Part" id="ID.010"><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="justify" style="text-align:justify;" id="ID.011">This document has multiple floats (<a href="#ID.014" data-pdf-se-type="Link" id="ID.012">1</a> and <a href="#ID.030" data-pdf-se-type="Link" id="ID.013">2</a>).</p></div><div data-pdf-se-type-original="text-unit" data-pdf-se-type="Part" id="ID.028"><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="justify" style="text-align:justify;" id="ID.029">Then it has a paragraph of text</p></div><div data-pdf-se-type-original="text-unit" data-pdf-se-type="Part" id="ID.044"><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="justify" style="text-align:justify;" id="ID.045">In conclusion: lorem ipsum. <a href="https://ctan.org" data-pdf-se-type="Link" id="ID.046">https://ctan.org</a></p></div><section data-pdf-se-type-original="tables" data-pdf-se-type="Sect" id="ID.004"><aside data-pdf-se-type-original="float" data-pdf-se-type="Aside" id="ID.014"><div data-pdf-se-type="Caption" id="ID.025"><span data-pdf-se-type="Lbl" id="ID.026">Table 1: </span><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="center" style="text-align:center;" id="ID.027">Letters</p></div><div data-pdf-se-type-original="text-unit" data-pdf-se-type="Part" id="ID.015"><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="center" style="text-align:center;" id="ID.016"></p><table data-pdf-se-type="Table" id="ID.017"><tr data-pdf-se-type="TR" id="ID.018"><td data-pdf-se-type="TD" id="ID.019">A</td><td data-pdf-se-type="TD" id="ID.020">B</td></tr><tr data-pdf-se-type="TR" id="ID.021"><td data-pdf-se-type="TD" id="ID.022">C</td><td data-pdf-se-type="TD" id="ID.023">D</td></tr></table><p data-pdf-se-type-original="text" data-pdf-se-type="P" id="ID.024"></p></div></aside><aside data-pdf-se-type-original="float" data-pdf-se-type="Aside" id="ID.030"><div data-pdf-se-type="Caption" id="ID.041"><span data-pdf-se-type="Lbl" id="ID.042">Table 2: </span><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="center" style="text-align:center;" id="ID.043">Numbers</p></div><div data-pdf-se-type-original="text-unit" data-pdf-se-type="Part" id="ID.031"><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="center" style="text-align:center;" id="ID.032"></p><table data-pdf-se-type="Table" id="ID.033"><tr data-pdf-se-type="TR" id="ID.034"><td data-pdf-se-type="TD" id="ID.035">1</td><td data-pdf-se-type="TD" id="ID.036">2</td></tr><tr data-pdf-se-type="TR" id="ID.037"><td data-pdf-se-type="TD" id="ID.038">3</td><td data-pdf-se-type="TD" id="ID.039">4</td></tr></table><p data-pdf-se-type-original="text" data-pdf-se-type="P" id="ID.040"></p></div></aside></section></div></body></html>

  • Circuitikz: customize the style of the rotary switch position display
    by cis on November 27, 2025 at 8:54 pm

    I've been experimenting with a rotary switch. I want 7 switch positions with a gap at the bottom. My question is: can the thick black line be replaced with a nice arrow? By the way: it seems exceptionally difficult to set the switch to a specific position (1, 2, ..., 7). My method of calculating the angle \s works, but if there's an easier way, please let me know. \documentclass[margin=5pt, multi=circuitikz]{standalone} \usepackage[]{circuitikz} \def\S{5}% switch position 1,2,...,7; 7=\N \pgfmathsetmacro\s{-2*(\S+4)*180/8}% switch angle <-- I do not know a easier methode \def\No{7}% number of switch positons \pgfmathsetmacro\RSangle{6*180/8}% complete angle of the rotary switch <-- seems to be good \begin{document} \begin{circuitikz} \draw (0,0) node[rotary switch=\No in \RSangle wiper \s, rotate=90, ](S){}; \foreach \i in {1,...,\No}{%% requires "calc" \path[] ($(S.aout \i)!1ex!(S.sqout \i)$) node[font=\tiny, text=red]{\i}; }%% \end{circuitikz} \end{document}

  • How to Color the Hollyberries Red in a Psvectorian Ornament?
    by DDS on November 27, 2025 at 5:08 pm

    Consider the code: \documentclass[12pt]{book} \usepackage{pstricks,psvectorian} \usepackage{color} \begin{document} \thispagestyle{empty} \begin{pspicture}(-5,-5)(4,4)% \psframe[fillcolor=blue!30!black,fillstyle=solid](-5,-5)(4,4) \psframe[linecolor=blue!30!black](-5,-5)(4,4) \rput[tr]{-0}(0,3){\psvectorian[color=green!35!black,width=3.5cm]{78}} \end{pspicture}% \end{document} which produces QUESTION: How may I make the hollyberries in this ornament red? (I compile with xelatex) Thank you.

  • Table with HIRAGANA alignments issues
    by Fr3d on November 27, 2025 at 4:19 pm

    Good evening, so lately I started a Japanese course and for now I wanted to replicate a table I've seen, grouping the Hiragana with similar strokes; as to have a "quick to find" abstract/summary. But my first attempt had a vertical misalignment, so I tried a second version, which looks way better unless someone looks at the TSU-U tile, or the TA-NA tile, which show an horizontal misalignment. Is there an easy fix for that? BTW I'm still searching for a comprehensive xeCJK guide in English, which I think would be more helpful in the future (only found one in Chinese and one in Japanese, which I can not read for the time being. \documentclass{article} \usepackage{xeCJK} \usepackage{fontspec} \usepackage{tikz} \usepackage{geometry}% \geometry{ %% a4paper, left=6mm, right=6mm, top=4mm, bottom=4mm, } \usepackage{adjustbox} % \usepackage{lscape} \usepackage{hyperref} \usepackage{booktabs, tabularx} \usepackage{multirow} \usepackage{multicol} \setlength{\columnsep}{9.5mm} \usepackage{makecell} \usepackage{pbox} \usepackage{tcolorbox} \usepackage{footnote} \usepackage{tablefootnote} \usepackage{longtable} \usepackage{enumerate} % in quest'ordine altrimenti non trova i vari parsep \usepackage{enumitem} \setCJKmainfont{MS Mincho} % for \rmfamily \setCJKsansfont{MS Gothic} % for \sffamily %\setCJKmainfont{IPAMincho} %\setCJKsansfont{IPAGothic} %\setCJKmonofont{IPAGothic} \begin{document} \section{ひらがな} \begin{center} % \fontsize{8pt}{9pt}\selectfont \setlength{\tabcolsep}{2.5pt} \sffamily \begin{tabular}{*9{c}} \toprule \multicolumn{2}{c}{あ お} & \multicolumn{4}{|c}{さ き ち ら} & \multicolumn{2}{|c|}{し も} & い\\ \multicolumn{2}{c}{A O} & \multicolumn{4}{|c}{SA KI CHI RA} & \multicolumn{2}{|c|}{SHI MO} & I\\ \midrule \multicolumn{6}{c}{に け は ほ ま よ} & \multicolumn{2}{|c|}{つ う} & え \\ \multicolumn{6}{c}{NI KE HA HO MA YO} & \multicolumn{2}{|c|}{TSU U} & E \\ \midrule \multicolumn{3}{c}{の め ぬ} & \multicolumn{3}{|c}{わ ね れ} & \multicolumn{3}{|c}{た に こ} \\ \multicolumn{3}{c}{NO ME NU} & \multicolumn{3}{|c}{WA NE RE} & \multicolumn{3}{|c}{TA NI KO} \\ \midrule \multicolumn{5}{c}{ろ る み そ を} & \multicolumn{2}{|c}{た な} & \multicolumn{2}{|c}{て そ} \\ \multicolumn{5}{c}{RO RU MI SO WO } & \multicolumn{2}{|c}{TA NA} & \multicolumn{2}{|c}{TE SO} \\ \bottomrule \end{tabular} \end{center} \begin{center} % \fontsize{8pt}{9pt}\selectfont \setlength{\tabcolsep}{2.5pt} \sffamily \begin{tabular}{*9{c}} \toprule \multicolumn{2}{c}{ \multirow{2}{*}{\makecell{あ\\A}}\hspace{0.6ex} \multirow{2}{*}{\makecell{お\\O}} } & \multicolumn{4}{|c}{ \multirow{2}{*}{\makecell{さ\\SA}}\hspace{0.6ex} \multirow{2}{*}{\makecell{き\\KI}}\hspace{0.6ex} \multirow{2}{*}{\makecell{ち\\CHI}}\hspace{0.6ex} \multirow{2}{*}{\makecell{ら\\RA}} } & \multicolumn{2}{|c|}{ \multirow{2}{*}{\makecell{し\\SHI}}\hspace{0.6ex} \multirow{2}{*}{\makecell{も\\MO}} } & \multirow{2}{*}{\makecell{い\\I}} \\ \multicolumn{2}{c}{} & \multicolumn{4}{|c}{} & \multicolumn{2}{|c|}{ } & \\ \midrule \multicolumn{6}{c}{ \multirow{2}{*}{\makecell{に\\SA}}\hspace{0.6ex} \multirow{2}{*}{\makecell{け\\KE}}\hspace{0.6ex} \multirow{2}{*}{\makecell{は\\HA}}\hspace{0.6ex} \multirow{2}{*}{\makecell{ら\\HO}}\hspace{0.6ex} \multirow{2}{*}{\makecell{ま\\MA}}\hspace{0.6ex} \multirow{2}{*}{\makecell{よ\\YO}} } & \multicolumn{2}{|c|}{ \multirow{2}{*}{\makecell{つ\\TSU}}\hspace{0.6ex} \multirow{2}{*}{\makecell{う\\U}}} & \multirow{2}{*}{\makecell{え\\E}} \\ \multicolumn{6}{c}{} & \multicolumn{2}{|c|}{ } & \\ \midrule \multicolumn{3}{c}{ \multirow{2}{*}{\makecell{の\\NO}}\hspace{0.6ex} \multirow{2}{*}{\makecell{め\\ME}}\hspace{0.6ex} \multirow{2}{*}{\makecell{ぬ\\NU}} } & \multicolumn{3}{|c}{ \multirow{2}{*}{\makecell{わ\\WA}}\hspace{0.6ex} \multirow{2}{*}{\makecell{ね\\NE}}\hspace{0.6ex} \multirow{2}{*}{\makecell{れ\\RE}} } & \multicolumn{3}{|c}{ \multirow{2}{*}{\makecell{た\\TA}}\hspace{0.6ex} \multirow{2}{*}{\makecell{に\\NI}}\hspace{0.6ex} \multirow{2}{*}{\makecell{こ\\KO}} } \\ \multicolumn{3}{c}{} & \multicolumn{3}{|c}{} & \multicolumn{3}{|c}{ } \\ \midrule \multicolumn{5}{c}{ \multirow{2}{*}{\makecell{ろ\\RO}}\hspace{0.6ex} \multirow{2}{*}{\makecell{る\\RU}}\hspace{0.6ex} \multirow{2}{*}{\makecell{み\\MI}}\hspace{0.6ex} \multirow{2}{*}{\makecell{そ\\SO}}\hspace{0.6ex} \multirow{2}{*}{\makecell{を\\WO}} } & \multicolumn{2}{|c}{ \multirow{2}{*}{\makecell{た\\TA}}\hspace{0.6ex} \multirow{2}{*}{\makecell{な\\NA}} } & \multicolumn{2}{|c}{ \multirow{2}{*}{\makecell{て\\TE}}\hspace{0.6ex} \multirow{2}{*}{\makecell{そ\\SO}} } \\ \multicolumn{5}{c}{} & \multicolumn{2}{|c}{} & \multicolumn{2}{|c}{} \\ \bottomrule \end{tabular} \end{center} \end{document} I had to keep a blank copy of the multicolumn setting for the vertical separation line, otherwise it wouldn't show; it would stop in the middle.