Hot
- Manual specification of alt text for individual mathematical symbols or expressions within the (Lua)LaTeX Tagging Projectby Paul J Hurtado on March 20, 2026 at 7:40 pm
I have (finally!) been able to input custom alt text for a non-standard symbol, to be used as a mathematical operator, which is also actually read correctly by a screen reader (NVDA 2026.1beta6, I believe, with Adobe Acrobat). A working example (with some non-working attempts commented out) is below. I'm trying to incorporate this example into some guidelines for submitting accessible mathematics thesis documents based on the new (in progress!) LaTeX Tagging (PDF 2.0 UA/2) capabilities. My question: does anyone know if this way of manually giving a "new" symbol (or existing symbol) screen readable alt text is likely to persist, or are there other alternatives to doing this that (1) work, and (2) are more likely to become the standard approach in the next year or two? Thanks! \DocumentMetadata{ lang = en-US, tagging = on, testphase = {latest,math,firstaid}, tagging-setup = {math/setup={mathml-SE,mathml-AF}}, pdfstandard = ua-2, pdfstandard = a-4f, uncompress } \documentclass{article} \usepackage[hidelinks]{hyperref} %\usepackage{accsupp} % NEEDED FOR THE FIRST TWO ATTEMPTS BELOW, BUT NOT THE THIRD \usepackage{utfsym} % for an example symbol with no unicode alternative (see below) \usepackage{unicode-math} \setmathfont{Latin Modern Math} %% Goal: A \hammerwrench{} function (see the symbol) similar in usage to \sqrt{} % OPTION A: None of these four options give a readable symbol/function %\newcommand{\hammerwrench}[1]{% hammer-X-wrench symbol % \BeginAccSupp{ActualText={hammer wrench}}% %% \BeginAccSupp{method=pdfstringdef,ActualText={hammer wrench}}% % \usym{1F6E0}(#1)% %% \ensuremath{\usym{1F6E0}(#1)}% % \EndAccSupp{}% %} % OPTION B: did not give a readable symbol/function %\newcommand{\hammerwrenchop}{% % \mathop{% % \BeginAccSupp{method=pdfstringdef,ActualText={hammer wrench}}% % \text{\usym{1F6E0}}% % \EndAccSupp{}% % }\nolimits %} % %\newcommand{\hammerwrench}[1]{% % \BeginAccSupp{method=pdfstringdef,ActualText={hammer wrench of #1}}% % \hammerwrenchop\!\left(#1\right)% % \EndAccSupp{}% %} % OPTION C: Trying to use the new access to MathML intent attributes - IT WORKS!!! \newcommand{\hammerwrench}[1]{% \MathMLintent{hammer-wrench($x)}% {{\usym{1F6E0}\!\left(\MathMLarg{x}{#1}\right)}}% } % Now let's look at some symbols that WOULD have readable default MathML tags \newcommand{\Jac}{% \MathMLintent{Jacobian}% {\mathbf{J}}% } \newcommand{\J}{% \MathMLintent{Poisson-matrix}% {J}% } \begin{document} \noindent Here is an example use of the hammerwrench function: $\sin\big(\sqrt{\hammerwrench{x}}\big)$. \\ \noindent Now let's see if it will override MathML. If I write something similar but for calling \verb|$\mathbf{J}$| the Jacobian and \verb|$J$| the Poisson Matrix, I get that $$\Jac \neq \J \neq J.$$ \noindent If you don't have a good (MathML capable) screen reader handy, here is how the above is read using the latest beta version of the NVDA screen reader and Adobe Acrobat:\\[2em] \hrule ~\\ \noindent Here is an example use of the hammerwrench function: sine of, open paren, the square root of hammer-wrench of x, close paren, dot\\ \noindent Now let's see if it will override MathML. If I write something similar but for calling dollar mathbf [the "bf" is barely audible] J dollar, the Jay-cobian and dollar J dollar the Poisson Matrix, I get that Jay-cobian is not equal to Poisson Matrix not equal to Jay ~\\ \hrule ~\\[2em] \noindent Yay! Not only can we override MathML, we can even specify different text to be read for the same visual symbol if they're generated with different macros (not that one should ever do this, it was just for demonstration purposes). \end{document}
- How can Initials with special characters (e.g. German Umlaute) be designed?by Thomkrates on March 20, 2026 at 6:56 pm
I would like to use Initials in a nice poetry book and need for German Umlaute (Ä Ö Ü) those designs. And the general question is: Why are Initials always without special characters, also for other languages other than German? And for now: How is it possible to produce Ä Ü Ö manually? \documentclass[a4paper]{article} \input Zallman.fd \pagestyle{empty} \begin{document} \begin{center} \fontsize{60pt}{72pt}\usefont{U}{Zallman}{xl}{n} ABCDE \\ FGHIJK \\ LMNOP \\ QRSTU \\ VWXYZ \\ ÄÖÜ \\%<-- Special characters Umlaute Initials?! \end{center} \vfill \begin{center} Font name: ``Zallman'' (ZallmanCaps) \end{center} \end{document} Is there a trick to get them nice?
- How to rotate the watermark text in a tcolorbox?by Mika Ike on March 20, 2026 at 6:48 pm
\documentclass[12pt]{article} \usepackage[spanish]{babel} \usepackage[dvipsnames,svgnames,x11names,table]{xcolor} \usepackage[most]{tcolorbox} \tcbset{ enhanced jigsaw, boxsep=0.1cm, colframe=red, colback=red!16, coltitle=red!16, colupper=blue, collower=blue, breakable, pad at break*=1mm } \usepackage{lipsum} \usepackage{graphicx} % \begin{document} Hello \rotatebox[origin=c]{45}{France} \begin{tcolorbox}[enhanced jigsaw, watermark color=purple!64!white,watermark text={My name will be here. My company will be here. Letters will be here.},remember as=one] %,watermark tikz={rotate=1, scale=1} \lipsum[1] \end{tcolorbox} % $x^2-x-1=0$ % \end{document} O tried with this option in the tcolorbox enviroment ,watermark tikz={rotate=1, scale=1} but no success.
- The \pushbutton disappears in the document when an animation from the `animate` package is usedby ThomasO on March 20, 2026 at 6:42 pm
In one particular case, I wanted to use an animation from the animate package and also include buttons from the Acrotex package aebpro, or eforms (from the tlcontrib repository with TeX Live). When I try this, the buttons are no longer visible. If you know where they are, you can click on them with the mouse in the PDF. To find their location, I placed the buttons in a \fbox. All actions (for example, JS code) are still executed, even if the buttons are not visible. I tried using JavaScript to trigger the buttons’ appearance. Interestingly, this only works on the first page. The buttons then become visible again. But not on the second and subsequent pages. If anyone knows how to make the buttons remain visible on subsequent pages, I would be very grateful for any advice. \documentclass{article} %% compile with LaTeX + dvips + ps2pdf %% or with LaTeX + dvips + distiller \usepackage[% driver=dvips, eforms={useui}, uselayers, ]{aeb_pro} \usepackage{animate} %============== comment this code ======================== \begin{insDLJS}{refreshButtons}{Refresh button appearances} function refreshButtonAppearances() { try { for (var i=0; i<this.numFields; i++) { var nm = this.getNthFieldName(i); var f = this.getField(nm); if (f && f.type === "button") { // Caption "neu setzen" triggert oft die Appearance-Erzeugung var cap = f.buttonGetCaption(); f.buttonSetCaption(cap); } } } catch (e) {} } refreshButtonAppearances(); \end{insDLJS} %========================================================== \begin{document} \fbox{\pushButton[\CA{A}\A{\JS{%app.alert("You chose A"); toggleSetThisLayer("l1");}}]{I}{8cm}{1cm}}% \xBld{l1} Text on layer l1 \eBld \begin{animateinline}[% controls, begin={\begin{minipage}[t]{10cm}}, end={\rule[-0.5cm]{0pt}{2cm}\end{minipage}}, ]{2}% 2 images/s \multiframe{5}{nA=0+1}{% \rule{\nA cm}{15pt}Text } \end{animateinline} \bigskip \fbox{\pushButton[\CA{B}\A{\JS{app.alert("You chose B");}}]{II}{8cm}{1cm}}% \newpage Text on side 2 \fbox{\pushButton[\CA{C}\A{\JS{app.alert("You chose C");}}]{III}{8cm}{1cm}}% end \newpage Text on side 3 \fbox{\pushButton[\CA{D}\A{\JS{app.alert("You chose D");}}]{IV}{8cm}{1cm}}% end \end{document}
- Accessible (LuaLaTeX) PDF, Table of Contents giving Lbl/LBody failures in Adobe Acrobat (still a checker issue?)by Paul J Hurtado on March 20, 2026 at 6:34 pm
I've seen assertions (some going back a few years) that the Adobe Acrobat accessibility checker falsely gives failures for some list tagging structures. The automatically generated Table of Contents is one particular example. Is this true for the following minimal example, compiled using the current lualatex, or is there actually something wrong with the tagging structure? If passing the Adobe checker were to be required by your institution, is there a way to somehow force a ToC tagging structure that would pass the Adobe accessibility checker? \DocumentMetadata{ lang=en, tagging=on, testphase={latest,firstaid}, pdfversion=2.0, pdfstandard={ua-2,a-4f}, uncompress } \title{Minimal Example} \documentclass{report} \usepackage[linktoc=none,pdfusetitle]{hyperref} %linktoc = section, page, both, or none \begin{document} \tableofcontents \chapter{One} \section{Two} \end{document}
- decision tree with irregular position [duplicate]by underflow on March 20, 2026 at 5:26 pm
I need to make a decision-tree that goes sideway, and if possible I do not want to use a diamond for the "decision" node because I need to fit a lot of text in the decision node. I have sent along a hacky sample to show you want I have mind. I wonder if there are existing latex package that could automate the making of such decision trees? i.e. I do not have to manually position each node/arrow. Bonus request: I would like to have rounded corners for the rectangular boxes. Thanks for your help.
- Cropping an image using a lookup tableby mf67 on March 20, 2026 at 2:36 pm
I have a large set of images that I reuse in a book. They all have different bottom crop and so far I have used the macro \image{21}{002} to show image 002.pdf with a 21 bottom crop. I would like to use a macro that, based on the image ID (e.g. 002), looks up the corresponding value (21) and applies the crop consistently. I have tried \documentclass[11pt]{book} \usepackage{graphicx} \usepackage{pgf,tikz,pgfplots} \pgfplotsset{compat=1.15} \def\image#1#2{ \medskip\par\nobreak \centerline{ \begin{tikzpicture} \draw[below right] (0, 0) node[inner sep=0] {\fbox{\includegraphics[trim={25 #1 25 10},clip]{graphics/chorales/#2.pdf}}}; \end{tikzpicture} } } \def\imageAuto#1{ \medskip\par\nobreak \def\cropvalue{10} \ifnum #1=002 \def\cropvalue{21} \fi \centerline{ \begin{tikzpicture} \draw[below right] (0, 0) node[inner sep=0] {\fbox{\includegraphics[trim={25 \cropvalue 25 10},clip]{graphics/chorales/#1.pdf}}};}; \end{tikzpicture} } \begin{document} \image{21}{002} \imageAuto{002} \end{document} with \imageAuto a ‘basic’ solution for a look-up-function (with the default 10), but it does not work. Is there a (better) solution to my problem? PS. The reason for using TikZ is that I need to place text objects on the image, but I have removed those lines for clarity in this post.
- xint: calc array with binomial coefficients only one timeby cis on March 20, 2026 at 2:12 pm
I need all binomial coefficients for n=1..100 and k=1..100 several times, so I wrote a code with xint: \xintdefvar BinomialArray = ndseq(binomial(n,k), n=1..100; k=1..100); \xintdeffunc abinomial(n,k):=BinomialArray[n-1,k-1]; I measured out for that: ******************************************** *** TOTAL COMPILATION TIME REPORT: *** (l3benchmark) + TOC: 2.27 s ******************************************** This is OK, but I asked myself: Is there any way I can store the array (in a file?) so that it doesn't have to be recalculated on every new run? \documentclass[paper=a5, paper=landscape]{scrarticle} \usepackage[margin=10mm]{geometry} \usepackage{xintexpr} \usepackage{amsmath} \begin{document} \xintdefvar BinomialArray = ndseq(binomial(n,k), n=1..100; k=1..100); \xintdeffunc abinomial(n,k):=BinomialArray[n-1,k-1]; %Test: \xinteval{BinomialArray[100-1,50-1]} works Test: $\dbinom{100}{50}=\xinteval{abinomial(100, 50)}$ % Show complete array - on your own risk :() %\newpage %\begingroup %\tiny %BinomialArray = \xintthealign\xintexpr BinomialArray\relax %\endgroup \end{document}
- How can I customize the vertical space between list items when using a LaTeX preamble with pandoc on a github-flavored markdown source file?by Rich006 on March 20, 2026 at 12:59 pm
Based on this answer, I am using a latex preamble file to customize a bulleted list in a PDF created by pandoc from a github-flavored markdown source file. I would like to also customize the vertical space between list items. I would expect adding a line ,itemsep = 1cm would do that, but it has no effect. The preamble file is % Source - https://tex.stackexchange.com/a/760974 % Posted by jlab % Retrieved 2026-03-20, License - CC BY-SA 4.0 \usepackage{enumitem} \newcommand{\signatureline}{\rule[-2pt]{2cm}{1pt}} \setlist[itemize]{ ,label = \signatureline ,labelindent = \parindent ,labelsep = 2pt ,labelwidth = 2cm ,leftmargin = * }
- Creating a triangle using intersection and automatically clipping the exceeding lineby user516076 on March 20, 2026 at 3:18 am
As what my knowledge could tell, It's possible to create a triangle with only 2 coordinates to make real angles to be exact, and using path to create long rays and naming the intersection of those rays and finally connect them with \draw. MWE: \documentclass[tikz, border=10pt]{standalone} \usepackage{siunitx} \usetikzlibrary{intersections} \begin{document} \begin{tikzpicture}[scale=2] \clip (0,0) rectangle (5,2.1); \coordinate (A) at (0,0); \coordinate (C) at (5,0); \path[name path=AB] (A) -- ++(37:4); \path[name path=BC] (C) -- ++(137:4); \path[name intersections={of=AB and BC, by=B}]; \draw[thick] (A) -- (B) -- (C) -- cycle; \end{tikzpicture} \end{document} There is a noticable difference if I comment \clip in the 6th line. Without it, it's going to be a white space... It's impractical to calculate the height of the object if I make another drawing with more complicated shape. So, is it possible to autocrop the exceeding lines? What I meant by exceeding lines is like the cyan lines in the figure below. It's because they contribute to white space if I change \draw to \path: So, if possible, I want TikZ to automate cropping the intersection, in other words, getting rid of those exceeding lines without estimating like how much the height is (would consume loads of time if I make other complicated figures with intersections). To illustrate what I actually want, roughly I want something like this: Yes, I deliberately cropped it poorly to give an example as to what it shows if I gave them an incorrect clipping, which I wish I didn't need to clip it, but instead, I wish TikZ only read the intersection point and two given coordinates to draw.
- LyX does not see styles in TEXMFHOME and will not render to PDFby bshane on March 20, 2026 at 2:23 am
I'm having trouble rendering pdf through LyX, even though command-line tools confirm that all necessary components are installed and functioning. What works I have a LyX document I'd like to render to PDF. LyX will generate LaTeX of the document via File -> Export -> LaTeX (pdflatex). The LaTeX will then render to pdf via command-line pdflatex my-paper.tex, and the output looks correct: all equations are properly rendered, and so on. What doesn't work File -> Export -> Export [PDF (pdflatex)] is grayed-out and unclickable. Relatedly (I suspect), Tools -> TeX information does not show any LaTeX styles or classes, even after rescanning. When I open my document, LyX complains that amsart.cls, xcolor.sty, and ulem.sty are all unavailable. System information I'm on Ubuntu 24.04.4 LTS. LyX is Version 2.5.0, recently installed from source. pdfTeX is v 3.141592653-2.6-1.40.29 (TeX Live 2026), with kpathsea version 6.4.2. amsart.cls, xcolor.sty, and ulem.sty are all recent versions from CTAN. They are all in TEXMFHOME, which is the default ~/texmf. xcolor has a .ins; I have run latex xcolor.ins (I have also run the .ins for all other .ins files that came with package amsart, xcolor, and ulem). What I have tried I have run texhash, LyX Tools -> reconfigure, and restarted LyX multiple times. texhash notes that it doesn't have write-permission to TEXMFLOCAL, but I think this is a red herring because texhash ~/texmf updates without comment and all styles and classes are in TEXMFHOME. I have updated LyX Tools -> Preferences -> Paths -> Document templates to ~/texmf/. I've re-run texhash and Tools -> reconfigure, and restarted LyX several times. Still no change.
- Colored rectangle box around title with text side by sideby Victoria Vega on March 19, 2026 at 9:41 pm
I want to place a rectangle box around by title and near I want to add some text to be aligned with the rectangle. I managed to do that with author \author{ $\vcenter{\hbox{ \begin{tcolorbox}[ colframe=red, colback=white, sharp corners, hbox, bottom=2mm ] Prenume Numescu, grupa 10LF421 \end{tcolorbox} }}$ $\rightarrow$ $\vcenter{\hbox{ \parbox[c]{7cm}{ aici înlocuiți textul din template cu nume, prenume, grupa și indicativul grupei } }}$ } but the same style is not applying correctly to the title. How can I fix that and make it to work for the title?
- Reversed logical character ordering in generated pdf [babel with LuaLaTeX]by TheBooker66 aka Ethan on March 19, 2026 at 7:48 pm
I've been using LaTeX (in LyX, usually, but that's besides the point) for a long time. Usually I write my documents in Hebrew, with a bit of English, and compile to a pdf via XeLaTeX. Recently, I wanted to start using LuaLaTeX, as it is apparently the recommended engine,1 and XeLaTeX is no longer supported (also, XeLaTeX is problematic with images, for some reason, and don't close brackets correctly when in a different language). However, I've encountered an a problem: while visually the text looks alright in the pdf (see example ahead), logically there are problems. In Chrome, which uses PDFium, the text is backwards, meaning I can't ctrl+f or copy text, and in FireFox, which uses PDF.js, when copying the spaces don't get copied. Here is a MNWE for LuaLaTex: \documentclass[english,hebrew]{article} \usepackage[provide=*, bidi=basic]{babel} \babelfont{rm}[Ligatures=TeX]{Times New Roman} \begin{document} \selectlanguage{hebrew} שלום, קוראים לי בוט. \end{document} And Here's a MWE for XeLaTeX: \documentclass[english,hebrew]{article} \usepackage[provide=*, bidi=default]{babel} \babelfont{rm}[Ligatures=TeX]{Times New Roman} \begin{document} \selectlanguage{hebrew} שלום, קוראים לי בוט. \end{document} The differences between them are only in the Babel config – bidi=basic vs bidi=default/bidi – according to Babel's manual, section 5.10. By the way, using Babel and not Polyglossia for the same reason I want to start using LuaLaTeX. Both product this output, visually: But logically, LuaLaTeX produces ".טובילםיארוק,םולש", and XeLaTeX produces "שלום, קוראים לי בוט." (both in Chrome). I'm using the latest versions of both engines: LuaHBTeX 1.24.0 XeTeX 3.141592653-2.6-0.999998 Both via TeX Live 2026 with TeX 3.141592653 on Arch Linux 6.19.8. I'd appreciate any help. Thank you. Footnotes: As evidenced here and recommended by everyone in this thread. Also, when compiling using XeLaTeX, I get this warning: "Package babel Error: [...] If possible, switch to luatex, as xetex is not recommend anymore."
- Unwanted horizontal shift of equation* on overlay when \label is present and equation ends with , or ;by João Alves Jr. on March 19, 2026 at 7:26 pm
Since sometime between August 2025 and March 2026, a \label inside equation* causes an unwanted horizontal shift of the displayed equation when advancing overlays, provided the equation ends with , or ;. (Text removed: ̶T̶h̶e̶ ̶s̶h̶i̶f̶t̶ ̶d̶o̶e̶s̶ ̶n̶o̶t̶ ̶o̶c̶c̶u̶r̶ ̶w̶h̶e̶n̶ ̶t̶h̶e̶ ̶e̶q̶u̶a̶t̶i̶o̶n̶ ̶e̶n̶d̶s̶ ̶w̶i̶t̶h̶ ̶̶.̶̶,̶ ̶n̶o̶r̶ ̶w̶h̶e̶n̶ ̶̶e̶q̶u̶a̶t̶i̶o̶n̶̶ ̶(̶n̶u̶m̶b̶e̶r̶e̶d̶)̶ ̶i̶s̶ ̶u̶s̶e̶d̶ ̶i̶n̶s̶t̶e̶a̶d̶ ̶o̶f̶ ̶̶e̶q̶u̶a̶t̶i̶o̶n̶*̶̶,̶ ̶n̶o̶r̶ ̶w̶h̶e̶n̶ ̶̶\̶l̶a̶b̶e̶l̶̶ ̶i̶s̶ ̶a̶b̶s̶e̶n̶t̶.̶ ) Update: Further testing shows that the conditions are more general than initially described. The shift does not occur when \label is absent (this seems to be a necessary condition in all cases identified so far). However, with \label present, the bug also occurs with equation (numbered), and can be triggered by other elements affecting horizontal spacing in math mode, such as an operator defined via \DeclareMathOperator — regardless of the final punctuation character. The conditions listed below reflect only the cases identified so far and may not be exhaustive. The following MWE reproduces the problem: \documentclass{beamer} \begin{document} \begin{frame}{Test} \begin{equation*}\label{E:Test} A, \end{equation*} \pause Text. \end{frame} \end{document} Observed behavior: On overlay 1, the equation appears at one horizontal position. After advancing to overlay 2 (via \pause), the equation shifts slightly to the right. Expected behavior: The equation should remain at the same horizontal position across all overlays. Conditions that trigger the bug (all three must hold simultaneously): (Text removed: ̶e̶q̶u̶a̶t̶i̶o̶n̶*̶̶ ̶(̶u̶n̶n̶u̶m̶b̶e̶r̶e̶d̶)̶;̶ ) equation* (unnumbered) or equation (numbered); \label{...} inside it; (Text removed: t̶h̶e̶ ̶e̶q̶u̶a̶t̶i̶o̶n̶ ̶e̶n̶d̶s̶ ̶w̶i̶t̶h̶ ̶̶,̶̶ ̶o̶r̶ ̶̶;̶̶ ̶(̶m̶a̶t̶h̶e̶m̶a̶t̶i̶c̶a̶l̶ ̶p̶u̶n̶c̶t̶u̶a̶t̶i̶o̶n̶,̶ ̶i̶.̶e̶.̶ ̶̶\̶m̶a̶t̶h̶p̶u̶n̶c̶t̶̶)̶.̶ ) the equation ends with , or ; (mathematical punctuation, i.e. \mathpunct), or contains certain elements that affect horizontal spacing in math mode, such as an operator defined via \DeclareMathOperator. Conditions under which the bug does not occur: \label removed from the equation environment; (Text removed:̶e̶q̶u̶a̶t̶i̶o̶n̶̶ ̶(̶n̶u̶m̶b̶e̶r̶e̶d̶)̶ ̶u̶s̶e̶d̶ ̶i̶n̶s̶t̶e̶a̶d̶ ̶o̶f̶ ̶̶e̶q̶u̶a̶t̶i̶o̶n̶*̶̶;̶ ) (Text removed: e̶q̶u̶a̶t̶i̶o̶n̶ ̶e̶n̶d̶s̶ ̶w̶i̶t̶h̶ ̶̶.̶̶ ̶i̶n̶s̶t̶e̶a̶d̶ ̶o̶f̶ ̶̶,̶̶ ̶o̶r̶ ̶̶;̶̶.̶ ) equation ends with . instead of , or ; in some cases. Suspected cause: During the overlay retypsetting pass, the \label inside the equation environment triggers a write to the .aux file. This side effect appears to disturb the internal state of display math mode at the moment the final content is processed. Since , and ; are \mathpunct and insert spacing via \mskip, they are sensitive to the math mode state at that point; . is not a \mathpunct in math mode. Similarly, \DeclareMathOperator also involves spacing adjustments that appear sensitive to the same disturbance. Workaround: Remove \label from equation environments, or place it at the very end of the equation, just before \end{equation*} (credit: greg). Note that a \label inside equation* is semantically questionable in any case, since an unnumbered equation cannot be meaningfully referenced; however, keeping labels in slides that share code with a book may be a legitimate reason to have them. Environment: MiKTeX (updated) with a recent Beamer version. The problem was not present in August 2025 and began occurring by March 2026 or before, suggesting it was introduced by an update to Beamer or one of its dependencies in that interval.
- xint / pgffor: Loop-wise calculation of the values of the cumulative binomial distribution - performanceby cis on March 19, 2026 at 3:53 pm
I have some code here that calculates the functions \bdceval{\n}{\p}{\k}, row by row, for fixed \n and \k values and values p from a list \def\pList{0.1, 1/6, 0.25, 0.3, 0.4, 0.5}. It works and is correct. But I'm wondering: Is this well-designed in terms of performance? I can only manage to implement \makePListRow{\n}{\k} with two commands. \documentclass{article} \usepackage{tikz} \usepackage{xintexpr} \def\pList{0.1, 1/6, 0.25, 0.3, 0.4, 0.5} % Function: \xintNewFloatExpr{\bdceval}[3]{add(binomial(#1,v)*#2^v*(1-#2)^(#1-v), v=0..#3)} % Commands for List: \newcommand{\myRowMapper}[1]{\xintRound{4}{\bdceval{\n}{#1}{\k}}} \NewExpandableDocumentCommand{\makePListRow}{mm}{% \xintListWithSep{, }{% \xintApply{\myRowMapper}{\xintCSVtoList{\pList}}% }% } \begin{document} \foreach \n in {2,3,7}{% \foreach \k in {0,...,\n}{% \n, \k, \makePListRow{\n}{\k} \par }% } \end{document}
- Accessible PDF, include pdf with pdfpages and add alt textby YamiOmar88 on March 19, 2026 at 10:44 am
I am creating an accessible PDF using tagpdf as follows: \DocumentMetadata{ lang = fr-FR, pdfversion = 2.0, pdfstandard = ua-2, pdfstandard = a-4f, %or a-4 tagging = on, tagging-setup={math/setup=mathml-SE} } \documentclass[a4paper,11pt]{article} % Page layout \usepackage[margin=2.5cm]{geometry} \usepackage{pdfpages} % General information \author[]{YamiOmar88} \title{Some Title} \date{} % remove semantic paragraphs: \AssignTaggingSocketPlug{para/semantic/begin}{noop} \AssignTaggingSocketPlug{para/semantic/end}{noop} \begin{document} % --- Poster pages (NOT accessible, marked as artifacts) --- \tagstructbegin{tag=Artifact, alt={Tableau de bord non accessible}} \includepdf[pages=1, fitpaper=true, artifact]{example-image.pdf} \includepdf[pages=1, fitpaper=true, artifact]{example-image.pdf} \tagstructend \end{document} I include pages from another PDF file using the pdfpages package and the command \includepdf. Here, for this example I'm always including the same page #1 and using a sample image to be able to compile it. When I look at my tags I see this: <Document> <Private> <Figure> <p> <Figure> <p> As I declared the artifact, the <Private> tag shows the appropriate alt-text. However, the <Figure> tags contain the path to the image as alt text. How can I change that? I do not want that path to be made public. And what are the <p> tags? Where did they come from? Note: The code is compiled with LuaLaTeX using MiKTeX 26.2. My LaTeX version is LaTeX2e <2025-11-01>, L3 programming layer <2026-01-19>.
- Accessible PDF, declaring an artifact for included pdf pagesby YamiOmar88 on March 19, 2026 at 10:34 am
I am building an accessible PDF using tagpdf as follows: \DocumentMetadata{ lang = fr-FR, pdfversion = 2.0, pdfstandard = ua-2, pdfstandard = a-4f, %or a-4 tagging = on, tagging-setup={math/setup=mathml-SE} } \documentclass[a4paper,11pt]{article} % Page layout \usepackage[margin=2.5cm]{geometry} \usepackage{lipsum} \usepackage{pdfpages} % General information \author[]{YamiOmar88} \title{Some Title} \date{} % remove semantic paragraphs: \AssignTaggingSocketPlug{para/semantic/begin}{noop} \AssignTaggingSocketPlug{para/semantic/end}{noop} \begin{document} \maketitle \section*{Some Section} \lipsum[1] \clearpage % --- Poster pages (NOT accessible, marked as artifacts) --- \tagstructbegin{tag=Artifact, alt={Tableau de bord non accessible}} \includepdf[pages=1, fitpaper=true, artifact]{example-image.pdf} \includepdf[pages=1, fitpaper=true, artifact]{example-image.pdf} \tagstructend \end{document} As it can be seen, I add pages using \includepdf. For this example purpose, I'm adding the example-image.pdf as a page so the code can be compiled without external files. The <Artifact> I declare shows as a <Private> tag inside the <Sect> tag. But in this particular file I'm working, it would make more sense for it to be at the same level as the <Sect> tag instead of inside it. Is this possible? In other words, I want this: <Document> <p> <p> <Sect> <H1> <p> <Private> instead of this: <Document> <p> <p> <Sect> <H1> <p> <Private> Note: The code is compiled with LuaLaTeX using MiKTeX 26.2. My LaTeX version is LaTeX2e <2025-11-01>, L3 programming layer <2026-01-19>.
- Drawing a parallel line that is perpendicular to another line and connecting the end linesby user516076 on March 19, 2026 at 9:39 am
I wish to draw something like this: I can draw the two lines, though it is difficult to be precise. However I don't know what to do next as for the dashed line and the arrow line. The dashed lines are perpendicular to MK and JL, but the arrow line are parallel to those lines. And the difficult part is connecting the dashed line with the arrow line. I failed to draw the 90 degree sign, it looks too big and ugly. My attempt: \documentclass[tikz,border=3pt]{standalone} \usepackage{amsmath} \usetikzlibrary{calc,intersections,angles,quotes,arrows.meta} \begin{document} \begin{tikzpicture}[line cap=round,line join=round,>=Stealth] % ---------- circle ---------- \def\r{3.0} \coordinate (O) at (0,0); % points on the circle chosen by polar coordinates % (this is the important part) \coordinate (J) at (86:\r); \coordinate (M) at (142:\r); \coordinate (L) at (232:\r); \coordinate (K) at (332:\r); % circle \draw[black,line width=0.9pt] (O) circle (\r); % ---------- cyan lines ---------- \colorlet{mycyan}{cyan!70!blue} % main solid chords \path[name path=JL] (J) -- (L); \path[name path=MK] (M) -- (K); \draw[mycyan,line width=1.1pt] (J) -- (L); \draw[mycyan,line width=1.1pt] (M) -- (K); % intersection N \path[name intersections={of=JL and MK, by=N}]; % ---------- right-angle mark at N ---------- \coordinate (Nu) at ($(N)!0.42!(M)$); \coordinate (Nv) at ($(N)!0.42!(J)$); \coordinate (Nw) at ($(Nu)+(Nv)-(N)$); \draw[black,line width=0.8pt] (Nu) -- (Nw) -- (Nv); % ---------- center ---------- \fill (O) circle (2.2pt); % ---------- labels ---------- \node[font=\fontsize{21}{21}\selectfont] at ($(J)+(0.02,0.35)$) {$J$}; \node[font=\fontsize{21}{21}\selectfont] at ($(M)+(-0.45,0.08)$) {$M$}; \node[font=\fontsize{21}{21}\selectfont] at ($(L)+(-0.28,-0.18)$) {$L$}; \node[font=\fontsize{21}{21}\selectfont] at ($(K)+(0.5,-0.02)$) {$K$}; \node[font=\fontsize{21}{21}\selectfont] at ($(N)+(0.38,0.02)$) {$N$}; \node[font=\fontsize{25}{25}\selectfont] at ($(O)+(0,-0.55)$) {$O$}; \end{tikzpicture} \end{document} Also, explain to me what the trick is, so that I can implement it in other cases.
- Extra Part tags in accessible, tagged PDFby YamiOmar88 on March 19, 2026 at 9:10 am
I am creating an accessible PDF using tagpdf as follows: \DocumentMetadata{ lang = fr-FR, pdfversion = 2.0, pdfstandard = ua-2, pdfstandard = a-4f, %or a-4 tagging = on, tagging-setup={math/setup=mathml-SE} } \documentclass[a4paper,11pt]{article} % Page layout \usepackage[margin=2.5cm]{geometry} \usepackage{lipsum} % General information \author[]{YamiOmar88} \title{Some Title} \date{} \begin{document} \maketitle \section*{Some Section} \lipsum[1-3] \begin{itemize} \item The first item \item Something here \item A final item \end{itemize} \end{document} When I check the PDF with the PDF Accessibility Checker a.k.a. PAC (or look at the tags in PDF-XChange Editor) I see that before each <p> or <L> tag there is a <Part> tag. The PAC complains that this tag is being misused. But I don't know how to tell LaTeX to not put it there. Is there anything I should be doing differently? The code is compiled with LuaLaTeX using MiKTeX 26.2. My LaTeX version is LaTeX2e <2025-11-01>, L3 programming layer <2026-01-19>. Note: I read your comments about minimizing my sample code. I'm trying to improve. Hope this was better.
- Chronos: Fully disable year labelsby Anoduck - The Anonymous Duck on March 19, 2026 at 8:25 am
Working on a timeline for a legal case in which all events occurred over five months. So far, I have twelve events and two time periods, and I still need to add more. I need to disable the output of years on all labels, since it is not necessary and is cluttering up the timeline. \documentclass[12pt]{standalone} \usepackage[utf8]{inputenc} \usepackage{chronos} \usepackage{amsmath} \usepackage{csquotes} \begin{document} \begin{chronos} [ %debug, event splitter, no color rotation, colour scheme=default, frame=true, %levels=3:5, event/colour rotation=false, period/colour rotation=false, every text tags+={font=\normalfont\footnotesize}, timeline={% timeline font=\normalfont\footnotesize, dates={2020-05-01}:{2020-09-30}, every date format={!d/!m}, timeline show years=false } ] \chronosmaintitle{% name=Timeline of Events, at=current bounding box.north, yshift=120pt } \chronosevent{% date={2020-05-10}, name=event1 } \chronosperiod{ dates={2020-05-01}:{2020-06-01}, name=period1, yshift=80pt } \chronosevent{ date={2020-06-10}, name=event2 } \chronosevent{% date={2020-06-20}, name=event3, yshift=15pt } \chronosevent{% date={2020-07-01}, name=event4, yshift=25pt } \chronosevent{% date={2020-07-15}, name=event5, yshift=10pt, xshift=-10pt } \chronosperiod{ dates={2020-06-20}:{2020-07-20}, name=period2, yshift=80pt } \chronosevent{% date={2020-07-20}, name=event6, yshift=20pt, xshift=20pt } \chronosevent{% date={2020-07-25}, name=event7, yshift=40pt, xshift=20pt } \chronosevent{% date={2020-07-30}, name=event8, yshift=60pt, xshift=20pt } \chronosevent{% date={2020-08-05}, name=event9 } \chronosevent{% date={2020-08-15}, name=event10, yshift=12pt } \chronosevent{% date={2020-09-10}, name=event11 } \chronosevent{% date={2020-09-25}, name=event12, yshift=15pt } \end{chronos} \end{document}
- What are the meaningful differences between cloud LaTeX editors in 2026, especially for AI-assisted writing?by Nilofer on March 19, 2026 at 5:28 am
I'm a PhD student evaluating cloud LaTeX editors for writing my dissertation. I've used Overleaf for years but I'm noticing a new wave of editors claiming AI-powered features. I've looked at: Overleaf — familiar, but not reliable, and compilation is slow on large documents OpenAI Prism — new, AI-native, backed by OpenAI (I don't trust OpenAI) Papeeria — free tier, minimal AI Bibby AI (trybibby.com) — seems focused on bibliography error detection specifically with a good AI benchmark they published outperforming OpenAI and Overleaf. My question is: for someone writing a 200-page dissertation with 300+ citations, what are the meaningful technical differences between these editors, particularly: How does real-time bibliography validation differ across platforms? Do any of them integrate with arXiv directly? Is AI autocomplete in LaTeX actually useful or is it mostly marketing?
- Biblatex failing when citations contain volume numberby PunySoloist on March 19, 2026 at 2:57 am
I'm having some issues with biblatex, where the code seems to mysteriously fail if certain fields are included in the references file. Here's a MWE: this is my main document. \documentclass[11pt]{scrartcl} \usepackage{biblatex} \addbibresource{references.bib} \begin{document} Hi!~\cite{prime_counting} \printbibliography[title=References] \end{document} After much experimentation (and binary search), I realized the following. The below document corresponds to references.bib. @article{prime_counting, title={On the exact number of primes below a given limit}, author={Brauer, Alfred}, journal={The American Mathematical Monthly}, % volume={53}, % number={9}, % pages={67--69}, % year={67}, % publisher={JSTOR} } This code compiles correctly. However, if the volume number is uncommented, the code fails. Here are my error messages: Package biblatex: Please (re)run Biber on the file: (biblatex) scratch_paper (biblatex) and rerun LaTeX afterwards. LaTeX: Citation 'prime_counting' on page 1 undefined. LaTeX: Empty bibliography. If I have other references, if even one of them contains a volume field, all of them fail. I'm not sure why this is; any help would be greatly appreciated. The same error occurs regardless of if I use the recipe latexmk or latexmk -> biber -> latexmk x2. I'm on Mac. More info from comment: I see no .blg file in my directory. Also, I have deleted the cache and reran, but the problem is still present. My setup used to work (a few months ago), but I tried it again yesterday and it mysteriously did not.
- Use lining figures in \url when font defaults to old style figureby David Purton on March 19, 2026 at 12:57 am
Some fonts use old style figures by default, but allow lining figures to be selected using OpenType features. When lining fugures are selected by default, how can I get lining figures also in the \url command to match? One option is to use \href, but this loses the line breaking features of \url. MWE % TeX Program = lualatex \documentclass{article} \usepackage{fontspec} \setmainfont{Cormorant Garamond}[Numbers=Lining] \usepackage{url} \urlstyle{same} \begin{document} test123 \url{test123} \end{document}
- TexLive 2026 package installation problemby Horas on March 18, 2026 at 4:06 pm
I am installing TexLive 2026. And I got this message. Regrettably, I don't find a way to run the solution: tlmgr update --all --reinstall-forcibly-removed Can someone help me please? Thank you in advance. *** PLEASE READ THIS WARNING *********************************** The following (inessential) packages failed to install properly: aboensis adigraph adrconv alertmessage alpha-persian answers apprendre-a-programmer-en-tex arsclassica avremu babel-basque babel-catalan babel-croatian babel-czech babel-interlingua babel-irish babel-kurmanji babel-piedmontese babel-romansh babel-slovak babel-thai barracuda beamercolorthemeowl beamertheme-cleaneasy beamertheme-cuerna beamertheme-focus beamertheme-pure-minimalistic beamertheme-saintpetersburg beamerthemenord beautybook beautynote biber biber-ms bibleref bjfuthesis bmstu bookcover bophook burmese businesscard-qrcode c90 ccicons chappg chapterfolder chktex cjk classicthesis cleanthesis cluttex cmbright confproc context-notes-zh-cn context-simpleslides conv-xkv cora-macs cqubeamer dashbox decimal dlrg-templates doclicense drac dynblocks ebezier elegantbook elegantpaper elmath els-cas-templates elteiktdk elteikthesis emo endnotes-hy epiolmec etdipa europasscv europecv exam-lite exam-n exam-zh fancymag fancytooltips faq-fr-gutenberg fascicules fast-diagram fcltxdoc featpost feupphdteses fithesis foliono fontinst formation-latex-ul ftc-notebook fundus-calligra fundus-sueterlin gentium-sil graphicxbox gridslides ha-prosper hebdomon hfutthesis histogr hithesis hitreport hitszbeamer hitszthesis hpsdiss hu-berlin-bundle hypdvips hyph-utf8 hyphen-hungarian imtekda inline-images iodhbwm is-bst jeuxcartes jourcl jourrr kastrup ketcindy keyfloat knuth-pdf koma-script-examples kotex-utf ktbox ku-template l3experimental l3packages latex-course latex-for-undergraduates lcg lengthconvert letgut lilyglyphs lisp-on-tex listbib mahjong makecookbook manfnt margbib mathcomp mcmthesis mdsymbol minitoc multibbl multicap musixtex mycv navydocs ndsu-thesis-2022 novel nwafuthesis nwejm nxuthesis ogham oldstyle opbible panneauxroute papertex patch pbsheet pdfscreen pdfslide permute pgf-periodictable plantslabels powerdot-tuliplab proflycee pst-barcode pst-shell pst-solides3d pst-spinner pstricks q-and-a quantumcubemodel qyxf-book rcs-multi realhats rebuttal recipebook revtex4-1 runtexfile savefnmark sduthesis sectsty semantic seuthesis seuthesix sitem sjtutex skb spelatex sseq stellenbosch stellenbosch-2 stex svn-multi svn-prov tabularborder tcolorbox tex-virtual-academy-pl texlive-ja texlive-sr texproposal texworks.windows thesis-gwu tiet-question-paper tikz-network tile-graphic tlc-article tlcockpit tlmgr-intro-zh-cn todonotes tudscr uafthesis ualberta uantwerpendocs udesoftec udiss uestcthesis uiucredborder unamth-template unbtex underlin vgrid visualfaq-fr vlna vmargin wallcalendar wintools.windows xcookybooky xebaposter xepersian xtuthesis yathesis yazd-thesis zbmath-review-template You can fix this by running this command: tlmgr update --all --reinstall-forcibly-removed to complete the installation. Blockquote
- Is there currently a way to use custom lists in slides with ltx-talk class?by ChristopherE on March 18, 2026 at 2:13 pm
The ltx-talk class for slides defines its own basic lists, so that they can be used with overlays. I am interested in using custom lists, for example ones that pre-format dialogue. Doing this in the usual way with enumitem currently fails. A brief example follows. Is there a way to insulate custom lists from the class's baked-in list definitions, so that this will work, by putting them in something like a minipage environment? Failure case \DocumentMetadata{tagging = on, lang = en-us} \documentclass[aspect-ratio=4:3]{ltx-talk} \usepackage{enumitem} \newlist{dialist}{description}{1} \setlist[dialist]{font=\textsc, leftmargin=2cm, style=nextline} \begin{document} \begin{frame} \frametitle{Dialogue} \begin{dialist} \item[Socrates] And your opinion is right, as you can prove in this way: if some one asked you “Is there, Gorgias, a false and a true belief?” you would say, Yes, I imagine. \item[Gorgias] I should. \item[Socrates] But now, is there a false and a true knowledge? \end{dialist} \end{frame} \end{document} error: ! Package enumitem Error: Non standard \item.
- plain TeX to LaTeX conversionby GowriSaro on March 18, 2026 at 10:22 am
I'm having bunch of Plain TeX equations, few examples given below: $$ a+b=c $$ $$ - {\pi \over 2} < \theta < {\pi \over 2}.\eqno{(1)} $$ $$ \left\{ \matrix{ \dot{\varphi}_1 = \varphi_2 \cr \dot{\varphi}_2 = M^{-1} ( \varphi_1) \cr } \right. , $$ \bye Is there any possibility to convert those to LaTeX format, please advise.
- Commutative diagram in xy-picby Olga on March 18, 2026 at 8:08 am
I want to draw a commutative diagram like the figure below using xy-pic package. But I don't know how to draw a vertical arrow \mapsto in xy-pic. Edit: \documentclass{article} \usepackage[all,cmtip]{xy} \newcommand{\tuple}[1]{\langle #1 \rangle} \begin{document} \[\begin{xy} {\ar@{|->}(0,0)*{};(10,0)*{}}; \end{xy}\] \end{document} I know how to draw commutative diagrams in the \begin{CD} ... \end{CD} environment. But I have a big problem understanding the order of commands in xy-pic
- How to print the solutions for xsim exercises alongside multiple-choice questions?by Laurenso on March 17, 2026 at 11:00 pm
I want to print Exwercises with solutions alongside multiple-choice questions. I tried \documentclass[12pt,a4paper]{article} \usepackage{xsim} \usepackage{tasks} \usepackage[left=2cm,right=2 cm,top=1.5cm,bottom=2cm]{geometry} \ExplSyntaxOn % function to shuffle list name constructed from argument #1 \cs_new_protected:Npn \xsim_shuffle_random_list:n #1 {% make sure lists exists before attempting to shuffle it \xsim_random_list_if_exist:nT {#1} { \xsim_verbose:n {Shuffling~ random~ list~ `#1'} \seq_gshuffle:c {g__xsim_random_#1_seq} } } % modify \printrandomexercises command to shuffle the exercise list first \AddToHook{cmd/printrandomexercises/before}{ \group_begin: % call the shuffle function with the alphabetic representation of the list counter \xsim_shuffle_random_list:n { \int_to_alph:n { \g__xsim_random_list_id_int + 1 } } \group_end: } \ExplSyntaxOff % all code below is unchanged from https://tex.stackexchange.com/a/582183 \NewTasksEnvironment[ label = \textbf{\Alph*.} , label-width = 15pt ]{choice}[\choice](4) \DeclareExerciseEnvironmentTemplate{item} {\description\item[\GetExerciseName~\GetExerciseProperty{counter}]} {\enddescription} \DeclareExerciseEnvironmentTemplate{space} {\textbf{\GetExerciseProperty{counter}} } {\quad} \newcommand*\answer[1]{% \XSIMexpandcode{% \SetExerciseProperty{solution-body} {\noexpand{\Alph{task}}}}% #1% } \DeclareExerciseCollection{part-A} \xsimsetup{ exercise/template = item , solution/template = space , exercise/name = Question , exercise/the-counter = \arabic{exercise}. , exercise/collect , %random/sort = false } \begin{document} \collectexercises{part-A} \begin{exercise} What is the product of $-2$ and $3$? \begin{choice} \choice \answer{$-6$} \choice $6$ \choice $5$ \choice $-5$ \end{choice} \end{exercise} \begin{exercise} What is the sum of the sides of a polygon called? \begin{choice}(2) \choice Leg \choice \answer{Perimeter} \choice Area \choice Volume \end{choice} \end{exercise} \begin{exercise} What is the sum of $-2$ and $-3$? \begin{choice} \choice $-6$ \choice $6$ \choice $5$ \choice \answer{$-5$} \end{choice} \end{exercise} \begin{exercise} Number four \end{exercise} \begin{exercise} Number five \end{exercise} \begin{exercise} What is the sum of $-2$ and $-3$? \begin{choice} \choice $-6$ \choice $6$ \choice $5$ \choice \answer{$-5$} \end{choice} \end{exercise} \collectexercisesstop{part-A} \section{Problems} \printrandomexercises[collection=part-A]{6} \section{Answers} \begin{exercise} first exercise \end{exercise} \begin{solution} first solution \end{solution} \begin{exercise} second exercise \end{exercise} \begin{solution} second solution \end{solution} \begin{exercise} third exercise \end{exercise} \begin{solution} third solution \end{solution} \printsolutions[headings=false] \end{document} I only get I can not print the exercises and solutions in second part: \begin{exercise} first exercise \end{exercise} \begin{solution} first solution \end{solution} \begin{exercise} second exercise \end{exercise} \begin{solution} second solution \end{solution} \begin{exercise} third exercise \end{exercise} \begin{solution} third solution \end{solution} How can I print them?
- Projective limit spanish acute accentby Esteban Saldarriaga-Marin on March 17, 2026 at 7:24 pm
I am using babel package with Spanish style (in amsart class), which puts acute accents in math symbols such as \lim, \max, \inf, etc. It is actually nice, because it keeps all the formatting in the same language and style. However, it doesn't put the accent in \varprojlim, which doesn't go with the general layout. Is it possible to make \varprojlim have the accent as everything else? MWE: \documentclass{amsart} \usepackage[spanish]{babel} \usepackage{amssymb,amsfonts,amsmath} \begin{document} \[ \lim \; \inf \; \max \] \[ \varprojlim \] \end{document} Result:
- tikz, scaling widths of linesby Zarko on March 17, 2026 at 2:39 pm
It seems (or is apparently) that thickness of lines is hard coded. Consequently when drawing a line, the use for example of scale=2 only makes the line longer and its thickness is not changed, see MWE below: \documentclass[margin=3mm, varwidth]{standalone} \usepackage{tikz} \usetikzlibrary{arrows.meta} \tikzset{LA/.style = {-Straight Barb, line width=1mm}} \begin{document} \begin{tikzpicture} \draw[LA] (0,0) -- ++ (2,0); \end{tikzpicture} \begin{tikzpicture}[scale=2] \draw[LA] (0,0) -- ++ (2,0); \end{tikzpicture} \end{document} Is there some trick by which the thickness of the line will also be scaled? The best way would be as option of the line style, which will have effect just on this particular line. My quick search on this site so far didn't give me any suggestion ...