• No closing and opening parenthesis in acronyms
    by muggi on September 16, 2026 at 9:20 am

    I am using the LaTeX package acronym. I have abbreviations whose long form ends with text in parentheses. In the document, the output shouldn't contain ) (; instead, I'd like to have a comma (and a normal whitespace) at that position (, ). How can I achieve this? My input: \acro{ABC}{Long form (additional information)} Output on the first occurrence: Long form (additional information) (ABC) % actual Long form (additional information, ABC) % desired On all subsequent occurrences, \ac{ABC} should behave as usual and only print ABC. For not all long forms have additional information, I think I'd need some kind of distinction of cases. I didn't find anything in the documentation.

  • Where was \selectlanguage defined in the LaTeX kernel?
    by Elayson Abreu on September 15, 2026 at 8:40 pm

    My code: % !TeX TS-program = lualatex \documentclass{article} \begin{document} \meaning\selectlanguage \end{document} Result: Where was \selectlanguage defined? When I try to find the definition in source2e.pdf, I can't find it. What caused my doubt is that I recently needed to define \selectlanguage using \providecommand because my macros use \selectlanguage internally. Instead, it seems more correct to use \@ifpackageloaded{babel}, but I would expect, in cases like this, that a \providecommand would be enough. Thank you in advance. Obs.: LaTeX2e <2026-06-01> L3 programming layer <2026-06-18>

  • how to make a simple leaflet for food products [closed]
    by RenatoP on September 15, 2026 at 6:36 pm

    Do someone has an example of something like? Just name, price and product image. Can someone suggest me how can I develop it in laTeX? I mean something like this: Thanks you Renato

  • Adding an arrowhead at the bottom of \rceil and \lceil
    by J.-E. Pin on September 15, 2026 at 10:54 am

    As indicated in the title, I am trying to create new delimiters (variable-sized if possible!) derived from the pair (\rceil, \lceil) by adding an arrowhead at the bottom of these symbols. After looking at these questions How do I superimpose two math symbols? Exact positioning of superimposed symbols How do you superimpose two symbols over each other? I tried to superimpose \downarrow and \rceil (respectively \lceil), using the following code \documentclass[]{article} \newcommand{\da}{\downarrow} \makeatletter \newcommand{\dar}{\mathrel{\mathpalette\eqdr@t\relax}} \newcommand{\eqdr@t}[2]{% \ooalign{% $\m@th#1\rceil$\cr \hidewidth$\m@th#1\da$\hidewidth\cr }% } \newcommand{\dal}{\mathrel{\mathpalette\eqdl@t\relax}} \newcommand{\eqdl@t}[2]{% \ooalign{% $\m@th#1\lceil$\cr \hidewidth$\m@th#1\da$\hidewidth\cr }% } \makeatother \begin{document} $u\dal I \dar$ \qquad $u\dal I \cup J \dar$ \end{document} but, as you can see on the picture, the downarrow is slightly too high and does not superimpose perfectly. I'm not particularly keen on using \downarrow if there are better ways to obtain the arrowheads.

  • Blank Console when Compiling [closed]
    by Vikram on September 14, 2026 at 9:45 pm

    After updating to MacOS27, I'm getting a completely blank console when I try to compile .tex files in TeXShop. Nothing shows up at all. Is there anything I can do to fix this?

  • Writing of a reaction with integration of molecules chemfig
    by Nicolas on September 14, 2026 at 8:12 pm

    I want to write the balance sheet of this reaction but I can't add the mole of RCOOH. \documentclass[a4paper,12pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{chemfig} \usepackage{chemmacros} \begin{document} \begin{reaction} \chemfig[baseline=-29pt]{R_1-[:-60]C(-[:-120]R_2)=C(-[:60]R_3)-[:-60]R_4}~+~RCO$\sb{3}$H-> "\chemfig{[:30]C(-[:-90]R_2)(-[:180]R_1)*3(-C(-[:0]R_3)(-[:-90]R_4)-O-)}" \end{reaction} \end{document}

  • Why didn't this URL break, even though the `biburllcpenalty` counter was configured?
    by Elayson Abreu on September 14, 2026 at 6:01 pm

    Im using biblatex 2025/07/10 v3.21. My code: % !TeX TS-program = lualatex \documentclass{article} \usepackage{biblatex} \addbibresource{file.bib} \setcounter{biburllcpenalty}{10000} \begin{document} \nocite{*} \printbibliography \end{document} file.bib: @book{key, author = {Author}, title = {My title}, date = {2000-01-01}, url = {https://www.site.com.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}, urldate = {2001-01-01} } Result: Why didn't the URL break? Thanks in advance. Obs.: I didn't use the filecontents environment because it doesn't work properly with biblatex: updating the BIB file produces no result.

  • TIkZ: draw only a group/scope from a larger TikZ picture?
    by Thibault de Villèle on September 14, 2026 at 9:30 am

    I have a large TikZ picture showing the different steps from a pipeline. I have grouped different steps inside their own scope, to make it easier to differentiate paths and file names (which have similar names). In the main text, I describe the different steps of the pipeline. My advisor suggested putting the picture of the steps I'm describing in a small picture next to the paragraphs (as the description goes on for a while). Here is a MWE, which should convey what I want to to in my document: \documentclass{scrarticle} \KOMAoption{parskip}{half-} \usepackage{tikz} \usetikzlibrary{arrows.meta, fit, math, positioning} \begin{document} \begin{filecontents}[overwrite]{pipeline.tikz} \begin{tikzpicture}[x = 1cm, y = 1cm, inner sep=0pt, outer sep=0pt]% \begin{scope}[local bounding box=setup]% \draw[red,fill=red!90!white] (-2, 0) circle [radius=1cm];% \end{scope}% \begin{scope}[local bounding box=result]% \draw[blue,fill=blue!90!white] (1.5, -1) rectangle (3.5, 1);% \end{scope}% \draw[->,thick] ([xshift=5mm]setup.east) -- ([xshift=-5mm]result.west);% \end{tikzpicture}% \end{filecontents} \begin{figure}% \centering% \input{pipeline.tikz}% \caption{The whole pipeline.}% \label{fig/pipeline}% \end{figure}% This text is supposed to explain the pipeline: \begin{itemize} \begin{minipage}{.7\textwidth}% \item% This is the first step of the pipeline. A long text is supposed to explain what exactly is going on, which can be quite long. Sometimes, the description goes on for more than three lines! \end{minipage}\hfill% \begin{minipage}{.28\textwidth}% \centering% \includegraphics[width=.8\textwidth,height=2\baselineskip]{example-image-a}\\% Should be the scope \texttt{setup} from figure 1. \end{minipage}\\% \begin{minipage}{.7\textwidth}% \item% This is the second step of the pipeline. An even longer text is supposed to explain what exactly is going on, which can be quite long. And even then, three lines are the minimum; sometimes I get crazy and get to four lines! \end{minipage}\hfill% \begin{minipage}{.28\textwidth}% \centering% \includegraphics[width=.8\textwidth,height=2\baselineskip]{example-image-b}\\% Should be the scope \texttt{result} from figure 1. \end{minipage} \end{itemize} \end{document} Which gives the following (LuaLaTeX from TeXLive 2026): Is there a way to tell TikZ to only draw a certain scope from a larger TikZ picture ? Or should I maybe do an export of the steps in a PDF file and only include them when necessary ? I'm looking for a TeX/TikZ-only solution to avoid having picture contents "out of sync", since I will have to tweak the larger pipeline picture a bit. Note: As far as I can tell, the spy library (related question here) cannot help me here, as my text should live outside of the TikZ picture.

  • How can I change the color inside a command [closed]
    by InfiniteLooper on September 14, 2026 at 6:10 am

    I know how to change color for a block of text. I want to program a command, \command1 upon which some stuff is done with a change of the color of the following text in the document. Something like color{clr}. Writing this color command in my command does not have any effect. I think it has to go with scope of variable. Maybe it would be better as a environment. \begin{document} \usepackage{xcolor} \newcommand{\mycmd}{ %Other stuff \color{red} } Some text in black \mycmd Some text in red \end{document}

  • stubbornly persistent extra page [closed]
    by Nate on September 13, 2026 at 9:04 pm

    I am using \documentclass[12pt, letterpaper, openany]{book} in my document. In my main file, after including my last chapter, I tried both \let\cleardoublepage\clearpage and \let\cleardoublepage=\clearpage, the standard remedy (with no space between the chapter include and that command, which I had to include for formatting here). \include{ch12} \let\cleardoublepage=\clearpage \appendix but the blank page between the main matter and back matter is still there: I also tried adding \backmatter before \appendix but that didn't work either. Is there an alternative command to remove it?

  • Internal coloring scheme of beamer
    by underflow on September 13, 2026 at 4:58 pm

    How can I find the exact color scheme beamer uses internally? For example, I'd like to use the same color as the default \frametitle, but I'm having trouble reproducing it manually. Is there a way to query or extract the underlying color definition (e.g. RGB values) that a given beamer color style resolves to, so I don't have to guess it by eye?

  • LaTeX API Documentation?
    by ana on September 13, 2026 at 2:42 pm

    Is there "official documentation" for what commands, macros and APIs are available in LaTeX? In modern projects like Rust, there is a definitive place to look for that information. Is there an equivalent for LaTeX? For example, I was recently looking for information on relative paths in LaTeX. It's not obvious where to look on the LaTeX or TeXdoc pages. Searching "latex relative path" won't find it. I eventually found the import package, then the related currfile package and then the \CurrentFilePath macro (introduced in 2020). But searching "latex currentfilepath" doesn't turn up documentation for it either, just Stack Exchange posts, some Reddit posts, and currfile. Eventually, I hit on the Hook Management document, but that was only after I was specifically targeting this macro trying to figure out if it was documented at all. Is there a go-to place to look for documentation on how LaTeX works?

  • Change color of footnotes in memoir
    by Marek Stepanek on September 13, 2026 at 9:58 am

    I just changed from KOMA to memoir package. I am correcting long memories and I would like to have all my suggestions in blue. But to change the color of the footnotes turns out to be impossible to solve for a memoir beginner. My attempts before pasting a MWE: % \renewcommand\footnote[1]{\textcolor{myblue}{#1}} % \renewcommand{\foottextfont}{\color{myblue}} % \renewcommand{\footnotelayout}{\color{myblue}} % \renewcommand{\footnotelayout}{\color{myblue}\relax} % \renewcommand\thefootnote{\color{myblue}\thefootnote} % \renewcommand{\foottextfont}{\color{myblue}\reset@font} % \renewcommand{\foottextfont}{\color{myblue}\normalfont} % \renewcommand{\foottextfont}{{\color{myblue}\normalfont}} % \usepackage{etoolbox} % \makeatletter % \pretocmd{\@makefntext}{\begingroup\color{myblue}}{}{} % \apptocmd{\@makefntext}{\endgroup}{}{} % \makeatother % \footmarkstyle{\color{myblue}\textsuperscript{#1}} % \renewcommand{\foottextfont}{\color{myblue}\footnotesize} % \color{myblue} % \definecolor{Normalcolor}{myblue}{0.8} % \newcommand{\splcolor}{\color{Normalcolor}} % \let\normalcolor\splcolor This MWE looks good (first page), but changing the page, the color of the footnote spills over to the main text on the next page. (Compiled with XeLaTeX) \documentclass[a4paper]{memoir} \usepackage{xcolor} \usepackage{lipsum} \usepackage{xcolor} \definecolor{myblue}{rgb}{0.25,0.45,0.75} \usepackage{pdfcolfoot} \renewcommand{\foottextfont}{\color{myblue}\footnotesize} \begin{document} \lipsum[1]\footnote{footnote 1} This works fine.\footnote{footnote 2} This creates problems.\footnote{footnote 3} This creates even more problems.\footnote{footnote 4} \lipsum[6-7]\footnote{first footmarker on next page} More text.\footnote{second footmarker on next page} \newpage \lipsum[9]\footnote{Which color?} \end{document} Perhaps should I go back to KOMA packages? thx marek

  • new package required when code from the main file of one document is copied to the main file of a new document [closed]
    by Nate on September 12, 2026 at 11:16 pm

    In the main file of a book I am writing I've used the following code: \makeindex[options={-s indexstyle.ist}] with the makeidx package, and it's always worked fine. Today I started a new document and copied that code into the new document's main file, and the compiler said it requires the package tikzpingus. (Both documents are using the book class.) Is there some type of restriction where this can only be used for one file? I can't think of any other reason I'd suddenly need to install a new package for it. Preamble of original document that compiles: Preamble of new document that compiles due to commenting out commands: The new requirement in the new document (and only the new document) comes when I uncomment \printindex

  • \uline of the ulem package does not break lines in presence of commands
    by Mehrshad Khansarian on September 12, 2026 at 5:35 pm

    Consider the following MWE: \documentclass{article} \usepackage{ulem} \newcommand{\parenthesize}[1]{(#1)} \begin{document} \uline{This sentence is about to be repeated. This sentence is about to be repeated. This sentence is about to be repeated. This sentence is about to be repeated. } \uline{This sentence is about to be repeated. \parenthesize{This sentence is about to be repeated. This sentence is about to be repeated. } This sentence is about to be repeated. } \end{document} Here's the output: As you can see, the first invocation of \uline, whose argument calls no commands, is just fine. However, the second invocation, which calls \parenthesize somewhere in the middle, fails to break the paragraph. I realize this has to do with TeX's macro expansion mechanism, and \expandafter might be part of the solution, but I do not know how to fix it. This post is the closest fix, but since in my case, I invoke the command somewhere inside the argument to \uline, it does not apply to me. I have also read two other posts. Their solutions do not apply either. Also, using \ul of soul or soulutf8 in place of \uline gives an error. Just to be clear, here's the question: How do I produce the correct output in the second invocation of \uline?

  • Latex table goes below the footnote
    by barej on September 12, 2026 at 11:07 am

    I have a latex code and I prefer the table to be above the footnote. I do not understand why latex by default puts the table below footnote. How to fix it? \documentclass{article} \usepackage{graphicx} \begin{document} \maketitle \section{Introduction} This is a test table\footnote{This is a footnote}: \begin{table}[!b] \centering \begin{tabular}{|c|c|} \hline \textbf{Header 1} & \textbf{Header 2} \\ \hline Row 1, Cell 1 & Row 1, Cell 2 \\ \hline Row 2, Cell 1 & Row 2, Cell 2 \\ \hline \end{tabular} \caption{A small bottom-aligned table} \label{tab:small_table} \end{table} \end{document} Note: I am not talking about footnote of a table. The footnote is outside of the table. Note: The table is to be at the bottom of the page yet above the footnote. I know already putting it on the top will solve the problem. Update: Thanks David, I am after something like this:

  • Issue in getting ribbon effects using Latex on Arrow in the infographics
    by Kashi on September 12, 2026 at 8:31 am

    I am trying to create the this Infographic Image using Latextikz library: However, I am unable to get the ribbon effects for the arrow hiding behind the information card. Here is my example code: \documentclass[tikz]{standalone} \usepackage[T1]{fontenc} \usepackage{helvet} \renewcommand{\familydefault}{\sfdefault} \usetikzlibrary{shadows,calc} % ---- Colour palette (sampled from the source infographic) ---- \definecolor{ifsiBlue}{HTML}{5B9BD5} \definecolor{ifsiGreen}{HTML}{7F9B72} \definecolor{ifsiTeal}{HTML}{1D9AA6} \definecolor{ifsiOrange}{HTML}{E8912D} \definecolor{ifsiNavy}{HTML}{1B3A8C} \definecolor{ifsiDark}{HTML}{2B2B2B} \definecolor{ifsiRule}{HTML}{8A8A8A} % ---- Ribbon-arrow shape, drawn pointing in the +x direction, then rotated --- \newcommand{\ribbonShape}{% (0,-0.6) rectangle (3.0,0.6); (3.0,-1.2) -- (4.6,0) -- (3.0,1.2) -- cycle; } \newcommand{\ribbonArrow}[4]{% \begin{scope}[shift={(#1,#2)}, rotate=#3] % ---- soft contained drop shadow (concentric, same direction, growing blur) ---- \foreach \r/\op in {0.30/0.05, 0.22/0.07, 0.15/0.10, 0.09/0.14} { \begin{scope}[shift={(\r,-\r)}] \fill[black, opacity=\op, rounded corners=1pt] (0,-0.62) rectangle (3.0,0.62); \fill[black, opacity=\op] (3.0,-1.22) -- (4.62,0) -- (3.0,1.22) -- cycle; \fill[black, opacity=\op] (0,-0.62) -- (-0.58,-0.30) -- (-0.58,0.30) -- (0,0.62) -- cycle; \end{scope} } % ---- fold flap (darker underside), drawn behind the body ---- \fill[#4!52!black] (0,-0.6) -- (-0.58,-0.30) -- (-0.58,0.30) -- (0,0.6) -- cycle; \draw[#4!30!white, line width=0.7pt] (-0.58,-0.30) -- (0,-0.6); % ---- main ribbon body ---- \fill[#4] (0,-0.6) rectangle (3.0,0.6); % ---- arrow head ---- \fill[#4] (3.0,-1.2) -- (4.6,0) -- (3.0,1.2) -- cycle; % ---- thin highlight along the top edge for a touch of depth ---- \draw[#4!35!white, line width=0.6pt] (0,0.6) -- (3.0,0.6) -- (4.6,0); \end{scope} } \begin{document} \begin{tikzpicture}[ font=\sffamily, >=stealth ] % ============ Canvas: 34 wide x 20 tall ============ \useasboundingbox (0,0) rectangle (34,20); % ============ Four ribbon arrows: confined to the centre band, converging on the middle ============ \ribbonArrow{12.2}{15.9}{-45}{ifsiBlue} % top-left -> points down-right toward centre \ribbonArrow{21.8}{15.9}{225}{ifsiGreen} % top-right -> points down-left toward centre \ribbonArrow{12.2}{4.1}{45}{ifsiTeal} % bottom-left -> points up-right toward centre \ribbonArrow{21.8}{4.1}{135}{ifsiOrange} % bottom-right -> points up-left toward centre % ============ TOP-LEFT: Islamic Banking ============ \node[anchor=east, text=ifsiBlue, font=\sffamily\bfseries\fontsize{50}{50}\selectfont] at (5.6,16.15) {9.7\%}; \draw[ifsiRule, line width=0.7pt] (5.95,15.35) -- (5.95,16.95); \node[anchor=north west, text=ifsiDark, align=left, font=\sffamily\fontsize{18}{20}\selectfont] at (6.3,17.15) {Islamic Banking\\[2pt] YoY Growth}; \node[anchor=north west, text=ifsiDark, font=\sffamily\bfseries\fontsize{17}{17}\selectfont] at (6.3,15.45) {69.3\% of IFSI}; % bank icon \begin{scope}[shift={(10.7,16.15)}, ifsiRule, line width=1.1pt] \draw (-0.5,-0.38) -- (0.5,-0.38); \draw (-0.34,-0.38) -- (-0.34,0.09); \draw (-0.12,-0.38) -- (-0.12,0.09); \draw (0.11,-0.38) -- (0.11,0.09); \draw (0.33,-0.38) -- (0.33,0.09); \draw (-0.55,0.09) -- (0.55,0.09) -- (0,0.52) -- (-0.55,0.09) -- cycle; \draw[->] (-0.24,0.38) -- (-0.24,-0.62); \draw[->] (0.02,0.38) -- (0.02,-0.62); \end{scope} % ============ TOP-RIGHT: Sukuk Outstanding ============ \node[anchor=west, text=ifsiGreen, font=\sffamily\bfseries\fontsize{50}{50}\selectfont] at (28.4,16.15) {21.8\%}; \draw[ifsiRule, line width=0.7pt] (28.05,15.35) -- (28.05,16.95); \node[anchor=north east, text=ifsiDark, align=right, font=\sffamily\fontsize{18}{20}\selectfont] at (27.7,17.9) {Suk\=uk\\[2pt] Outstanding\\[2pt] YoY Growth}; \node[anchor=north east, text=ifsiDark, font=\sffamily\bfseries\fontsize{17}{17}\selectfont] at (27.7,15.05) {>USD 1tn milestone}; % growth chart icon \begin{scope}[shift={(23.3,16.15)}, ifsiRule, line width=1.1pt] \draw (-0.55,-0.44) -- (-0.55,0.46) -- (0.55,0.46); \draw (-0.38,-0.44) rectangle (-0.2,-0.05); \draw (-0.09,-0.44) rectangle (0.09,0.11); \draw (0.2,-0.44) rectangle (0.38,0.27); \draw[->] (-0.46,0.0) -- (0.02,0.31) -- (0.38,0.44); \end{scope} % ============ BOTTOM-LEFT: Islamic Funds ============ \node[anchor=east, text=ifsiTeal, font=\sffamily\bfseries\fontsize{50}{50}\selectfont] at (5.6,3.85) {25.6\%}; \draw[ifsiRule, line width=0.7pt] (5.95,3.05) -- (5.95,4.65); \node[anchor=north west, text=ifsiDark, align=left, font=\sffamily\fontsize{18}{20}\selectfont] at (6.3,4.85) {Islamic Funds\\[2pt] YoY Growth}; \node[anchor=north west, text=ifsiDark, font=\sffamily\bfseries\fontsize{17}{17}\selectfont] at (6.3,3.15) {4.1\% of IFSI}; % hand + coin icon \begin{scope}[shift={(10.7,4.15)}, ifsiRule, line width=1.1pt] \draw (-0.55,-0.34) .. controls (-0.32,-0.54) and (0.17,-0.54) .. (0.34,-0.24); \draw (-0.55,-0.34) -- (-0.55,-0.06) -- (-0.05,-0.06); \draw (0.11,0.22) circle (0.22); \draw (0.02,0.22) -- (0.2,0.22); \end{scope} % ============ BOTTOM-RIGHT: Islamic Insurance ============ \node[anchor=west, text=ifsiOrange, font=\sffamily\bfseries\fontsize{50}{50}\selectfont] at (28.4,3.85) {13.9\%}; \draw[ifsiRule, line width=0.7pt] (28.05,3.05) -- (28.05,4.65); \node[anchor=north east, text=ifsiDark, align=right, font=\sffamily\fontsize{18}{20}\selectfont] at (27.7,5.6) {Islamic\\[2pt] Insurance\\[2pt] YoY Growth}; \node[anchor=north east, text=ifsiDark, font=\sffamily\bfseries\fontsize{17}{17}\selectfont] at (27.7,2.85) {1.6\% of IFSI}; % umbrella icon \begin{scope}[shift={(23.3,4.15)}, ifsiRule, line width=1.1pt] \draw (-0.54,0.06) .. controls (-0.54,0.46) and (0.54,0.46) .. (0.54,0.06); \draw (-0.54,0.06) .. controls (-0.35,0.24) .. (-0.18,0.06); \draw (-0.18,0.06) .. controls (0,0.24) .. (0.18,0.06); \draw (0.18,0.06) .. controls (0.35,0.24) .. (0.54,0.06); \draw (0,0.06) -- (0,-0.43); \draw (0,-0.43) .. controls (-0.18,-0.43) and (-0.18,-0.61) .. (0,-0.61); \draw (0.43,-0.1) circle (0.15); \node[font=\small] at (0.43,-0.1) {\$}; \end{scope} % ============ CENTRE BLOCK ============ \node[text=ifsiNavy, font=\sffamily\bfseries\fontsize{58}{58}\selectfont] at (17,10.9) {USD 4.40tn}; \node[text=ifsiNavy, font=\sffamily\fontsize{27}{27}\selectfont] at (17,9.35) {Total IFSI Assets Q3 2025}; \draw[fill=ifsiNavy, draw=none, rounded corners=17pt] (14.3,7.9) rectangle (19.7,8.75); \node[text=white, font=\sffamily\bfseries\fontsize{20}{20}\selectfont] at (17,8.325) {+13.4\% YoY}; \end{tikzpicture} \end{document} It gives the following: I would like to get the exact curves and ribbon effects on for each arrow. What I am missing and how I can create arrow curves and ribbon effects. Any advice or support would be greatly appreciated.

  • Undersetting a hat is creating a lot of extra space
    by Sriotchilism O'Zaic on September 12, 2026 at 12:56 am

    I would like to put a hat under a symbol. I have the following solution right now: \NewDocumentCommand{\underhat}{m}{\underset{\widehat{}}{#1}} This looks correct, except that tex considers this symbol to extend much further below the baseline than it visually does. So for example: \documentclass{article} \usepackage{amsmath} \NewDocumentCommand{\underhat}{m}{\underset{\widehat{}}{#1}} \begin{document} $\left(\underhat{x}\right)+\left(x\right)$ \end{document} looks absolutely bizarre, with the parentheses seemingly three times the height of the visible content. But more generally this creates spacing issues every time it is used. Is there some way to avoid this spacing issue?

  • How to have centred text within reduced margins?
    by Sho on September 11, 2026 at 4:59 pm

    I'm writing a text and I'd like to quote a small rhyme in the middle of my paragraphs. I'd like it for the rhyme to be centered and specifically for all its verses to occupy the same length (that is, for the rhyme to look like a square basically, margins-wise, instead of a line followed by a longer line, then a shorter one, etc.). What I'd been writing till now was something like \begin{center} \textit{Littera gesta docet;} \\ \textit{quid credas Allegoria.} \\ \textit{Moralis quid agas;} \\ \textit{quo tendas, Anagogia} \end{center}`. This, as I said, doesn't give me what I want, for, say, the second line ends up longer than the first. I'd like it for the whole rhyme to have "margins," as long as its longest line, and have the other, shorter lines, perhaps stretched just a tiny bit so that they all fit this length. (Normally this might not be all that desirable, but since all the lines of this rhyme don't differ that much in length, I figured it wouldn't look all that bad visually speaking.)

  • showlabels shift vertically while taking up space
    by user20478285 on September 11, 2026 at 12:53 pm

    Following up on the answer given here about how to vertically shift the label from the showlabels package, I'm wondering is there a way to not just shift the label but to also have it "take up space" so that it doesn't overlap with other elements? I don't really explain it very well, but ideally it wouldn't just push the label down but also reserve space, so that the "Lorem ipsum..." would also be pushed down a bit. \documentclass[12pt]{article} \usepackage[math]{blindtext} \usepackage{amsmath} \usepackage[inline]{showlabels} \renewcommand{\showlabelfont}{\scriptsize\ttfamily} \renewcommand{\showlabelsetlabel}[1]{\raise-8ex\hbox{\fbox{\showlabelfont #1}}} \begin{document} \blindtext \begin{equation}\label{eq:some-long-formula-name} e^{i\phi}=\cos\phi+i\sin\phi, \qquad e^{i\pi}+1=0, \qquad \lim\limits_{n\to\infty}\left(1+\frac1n\right)^n=e \end{equation} \blindtext \end{document}

  • Why \fi inside /.code of pgfkeys causes error
    by lyl on September 11, 2026 at 5:49 am

    \documentclass{article} \usepackage{geometry,pgfkeys,fancyhdr} \pagestyle{fancy} \pgfkeys{/page/.cd, marginless/.code={ \newdimen\oldparindent% \oldparindent=\parindent% \setlength{\parindent}{0pt}% \newif\ifparindentchanged\parindentchangedtrue }, restore/.code={ \restoregeometry \pagestyle{fancy} \ifdefined\ifparindentchanged \ifparindentchanged \parindent=\oldparindent \parindentchangedfalse \fi% \fi% } } \newcommand\setpage[1][]{ \pgfkeys{/page/.cd,#1} } \begin{document} \newgeometry{margin=0pt,nohead,nofoot} \parindent0pt \pagestyle{empty} first page \setpage[restore] second page \end{document} Running this code causes this error: ERROR: Extra \fi. --- TeX said --- \pgfkeys@unpack ...else \pgfkeys@case@one \fi \fi l.32 \setpage[restore] Though the logical switch \ifparindentchanged has not been defined when doing \setpage[restore], I think it would do nothing about \parindent rather than an error. Why? How to correct it?

  • NVDA pronounces the phrase "temp name" when matrix is raised to a power
    by mathmandan on September 10, 2026 at 9:53 pm

    Consider the following example: \DocumentMetadata{%uncompress, language = en-US, % pdfversion = 2.0, % pdfstandard = {ua-2, A-4f}, % tagging = on, % tagging-setup = {math/setup=mathml-SE, extra-modules={verbatim-mo}} % } \documentclass{article} %\usepackage{mathtools} % optional \begin{document} \[ {% \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}% }^{2} \] \end{document} The document compiles just fine. (Using LuaLaTeX, in TeXLive installation, up-to-date as of September 10, 2026.) When I open the compiled .pdf in the free version of Adobe Reader (up-to-date, version 26.002.21901), and use the NVDA screen reader (also free, also up-to-date, version 2026.2.0.57664), NVDA reads this aloud as: temp name of the two by two matrix row one: one, two row two: three, four squared Question I am not sure where the phrase "temp name of" is coming from: is it a bug, my own user error, or intended behavior? (If it is a bug, where should it be reported?) Notes If I remove the exponent on the matrix, then the phrase "temp name of" is no longer spoken aloud. It's possible that other combinations of pdf viewer + screen reader might give better results--recommendations are welcome. (I'm really pretty happy with this reading, but it would be even better if the phrase "temp name of" were omitted.)

  • Small caps with Linux Libertine 0
    by user242399 on September 10, 2026 at 10:50 am

    I am writing a document using XeLaTeX and I use fontspec with Linux Libertine O as the main font. When I use small caps (\textsc), the text looks correct in the compiled document, but if I copy and paste the text, the characters K and R are uppercase and the rest lowercase. This is what it looks like in the compiled document: This is what the text looks like if I copy and paste it somewhere else: I would like to know what causes this and if there is any way to unify it, either all uppercase or all lowercase. \documentclass{article} \usepackage{fontspec} \setmainfont{Linux Libertine O} \begin{document} \textsc{abcdefghijklmnopqrstuvwxyz} \end{document}

  • Accessibility: alt-text for a math environment
    by Danner on September 9, 2026 at 8:31 pm

    As I want a client who uses a screen reader to have a nice experience, I want to somehow overwrite the alt-text(*see edit) of a whole math environment. All examples that I have seen add alt text to a figure or tikzcd etc. I have a long equation that I am spreading across multiple lines. One might use the packages Breqn or Tabstackengine to typeset this, but I don't think these generate alt-text (per https://latex3.github.io/tagging-project/tagging-status/). How do I do this? What are the complicating factors? *EDIT: I have been convinced: I must do tagging. To that end, I did basic research. Tug 2021 Frank Mittelbach’s “Taming the Beast: Advances in paragraph tagging with pdfTeX and XeTeX” PDF Days Europe 2025 Ulrike Fischer & Frank Mittelbach’s “Tagged and Accessible PDF with LaTeX — revisited” The documentation for the tagpdf research package The tagging project instructions: Using Latex to produce accessible pdf Here is a minimal working example \documentclass[letterpaper, oneside, 12pt, openany]{book} % For special alignment of math % This is very helpful for typesetting elementary algebra \usepackage{tabstackengine} \usepackage{mathtools} \DeclareMathOperator{\Conjunct}{\textup{ and }} \DeclareMathOperator{\Followedby}{;} \begin{document} %visual ouptut \[ (P \Followedby Q) \Followedby R = \left\{ x \in S \middle| \Centerstack[l]{% $P_1(x) \Conjunct $ \\$P_2(x) \Conjunct $ \\$P_3(x)$}\right\} \] %alt text should be this \[ (P \Followedby Q) \Followedby R = \left\{ x \in S \middle| P_1(x) \Conjunct P_2(x) \Conjunct P_3(x)\right\} \] \end{document} and the output

  • trying to understand xcolor colorlet
    by JamesM on September 9, 2026 at 3:28 pm

    I'm having difficulty understanding the use of the ! operator in xcolor: as I understand it from reading around (including xcolor documentation, but not the code itself): \colorlet{newcolour}{red!60} creates a color which is 60% red and the remainder (40% I guess) white. OK. \colorlet{newcolour}{red!60!blue} is 60% red and 40% blue - is that right? But why is this different from \colorlet{newcolour}{red!60!blue!40}? Here is a MWE, and all 4 colours ought to be the same (from my understanding, which is obviously wrong). Can someone explain? \documentclass{standalone} \usepackage{xcolor} \colorlet{mycolorA}{red!60!blue} \colorlet{mycolorB}{red!60!blue!40!} \colorlet{mycolorC}{red!60!blue!40!green!} \colorlet{mycolorD}{red!60!blue!40!green!0} \begin{document} \Large \parbox{0.75\textwidth}{ Here is the test: \color{mycolorA} mycolorA = \{red!60!blue\} is this \color{mycolorB} mycolorB = \{red!60!blue!40\} is this \color{mycolorC} mycolorC = \{red!60!blue!40!green\} is this \color{mycolorD} mycolorD = \{red!60!blue!40!green!0\} is this \color{black} the colorD line, but in black, reads: \\ mycolorD = \{red!60!blue!40!green!0\} is this (it's invisible!) } \end{document} Giving

  • Reason for char2path bug in the handler with space from TikZ in the latest TL26?
    by Explorer on September 9, 2026 at 2:36 pm

    I have the following code: \documentclass{article} \usepackage{char2path} \begin{document} x \end{document} It works fine with TL26(the frozen version in March, or says with Overleaf,TL26), but complained that with the lastest one: ! Package pgfkeys Error: I do not know the key '/tikz/cs/point/.storein', to wh ich you passed '\tikz@cs@point ', and I am going to ignore it. Perhaps you miss pelled it. See the pgfkeys package documentation for explanation. Type H <return> for immediate help. ... l.410 \tikzset{cs/point/.store in=\tikz@cs@point} % ? I opened the issue here, but I was wonder what is changed here, to prevent the handler /.store in was used in the package? It looks like a breaking change for me. Here below are two lists of the \listfiles: List 1. worked. *File List* article.cls 2025/01/22 v1.4n Standard LaTeX document class size10.clo 2025/01/22 v1.4n Standard LaTeX file (size option) char2path.sty 2025-07-28 v1.0.0 A LaTeX package that converts characters into TikZ paths tikz.sty 2025-08-29 v3.1.11a (3.1.11a) pgf.sty 2025-08-29 v3.1.11a (3.1.11a) pgfrcs.sty 2025-08-29 v3.1.11a (3.1.11a) pgfrcs.code.tex pgfcore.sty 2025-08-29 v3.1.11a (3.1.11a) graphicx.sty 2026-05-17 v1.2e Enhanced LaTeX Graphics (DPC,SPQR) keyval.sty 2026-05-17 v1.15 key=value parser (DPC) graphics.sty 2026-05-17 v1.4h Standard LaTeX Graphics (DPC,SPQR) trig.sty 2023/12/02 v1.11 sin cos tan (DPC) graphics.cfg 2016/06/04 v1.11 sample graphics configuration pdftex.def 2025/09/29 v1.2d Graphics/color driver for pdftex pgfsys.sty 2025-08-29 v3.1.11a (3.1.11a) pgfsys.code.tex pgfsyssoftpath.code.tex 2025-08-29 v3.1.11a (3.1.11a) pgfsysprotocol.code.tex 2025-08-29 v3.1.11a (3.1.11a) xcolor.sty 2024/09/29 v3.02 LaTeX color extensions (UK) color.cfg 2016/01/02 v1.6 sample color configuration mathcolor.ltx pgfcore.code.tex pgfcomp-version-0-65.sty 2025-08-29 v3.1.11a (3.1.11a) pgfcomp-version-1-18.sty 2025-08-29 v3.1.11a (3.1.11a) pgffor.sty 2025-08-29 v3.1.11a (3.1.11a) pgfkeys.sty pgfkeys.code.tex pgfmath.sty pgfmath.code.tex pgffor.code.tex tikz.code.tex etoolbox.sty 2025/10/02 v2.5m e-TeX tools for LaTeX (JAW) l3backend-pdftex.def 2026-02-18 L3 backend support: PDF output (pdfTeX) supp-pdf.mkii epstopdf-base.sty 2020-01-24 v2.11 Base part for package epstopdf epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live *********** List 2. Not worked... *File List* article.cls 2025/01/22 v1.4n Standard LaTeX document class size10.clo 2025/01/22 v1.4n Standard LaTeX file (size option) char2path.sty 2025-07-28 v1.0.0 A LaTeX package that converts characters int o TikZ paths tikz.sty 2026-08-01 v3.1.12 (3.1.12) pgf.sty 2026-08-01 v3.1.12 (3.1.12) pgfrcs.sty 2026-08-01 v3.1.12 (3.1.12) pgfutil-common.tex pgfutil-latex.def pgfrcs.code.tex pgf.revision.tex pgfcore.sty 2026-08-01 v3.1.12 (3.1.12) graphicx.sty 2026-05-17 v1.2e Enhanced LaTeX Graphics (DPC,SPQR) keyval.sty 2026-05-17 v1.15 key=value parser (DPC) graphics.sty 2026-05-17 v1.4h Standard LaTeX Graphics (DPC,SPQR) trig.sty 2023/12/02 v1.11 sin cos tan (DPC) graphics.cfg 2016/06/04 v1.11 sample graphics configuration pdftex.def 2025/09/29 v1.2d Graphics/color driver for pdftex pgfsys.sty 2026-08-01 v3.1.12 (3.1.12) pgfsys.code.tex pgfkeys.code.tex pgfkeyslibraryfiltered.code.tex pgf.cfg 2026-08-01 v3.1.12 (3.1.12) pgfsys-pdftex.def 2026-08-01 v3.1.12 (3.1.12) pgfsys-common-pdf.def 2026-08-01 v3.1.12 (3.1.12) pgfsyssoftpath.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfsysprotocol.code.tex 2026-08-01 v3.1.12 (3.1.12) xcolor.sty 2024/09/29 v3.02 LaTeX color extensions (UK) color.cfg 2016/01/02 v1.6 sample color configuration mathcolor.ltx pgfcore.code.tex pgfmath.code.tex pgfmathutil.code.tex pgfmathparser.code.tex pgfmathfunctions.code.tex pgfmathfunctions.basic.code.tex pgfmathfunctions.trigonometric.code.tex pgfmathfunctions.random.code.tex pgfmathfunctions.comparison.code.tex pgfmathfunctions.base.code.tex pgfmathfunctions.round.code.tex pgfmathfunctions.misc.code.tex pgfmathfunctions.integerarithmetics.code.tex pgfmathcalc.code.tex pgfmathfloat.code.tex pgfint.code.tex pgfcorepoints.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorepathconstruct.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorepathusage.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorescopes.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcoregraphicstate.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcoretransformations.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorequick.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcoreobjects.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorepathprocessing.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorearrows.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcoreshade.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcoreimage.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcoreexternal.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorelayers.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcoretransparency.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorepatterns.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorerdf.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfmoduleshapes.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfmoduleplot.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcomp-version-0-65.sty 2026-08-01 v3.1.12 (3.1.12) pgfcomp-version-1-18.sty 2026-08-01 v3.1.12 (3.1.12) pgffor.sty 2026-08-01 v3.1.12 (3.1.12) pgfkeys.sty pgfkeys.code.tex pgfmath.sty pgfmath.code.tex pgffor.code.tex tikz.code.tex pgflibraryplothandlers.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfmodulematrix.code.tex 2026-08-01 v3.1.12 (3.1.12) tikzlibrarytopaths.code.tex 2026-08-01 v3.1.12 (3.1.12) etoolbox.sty 2025/10/02 v2.5m e-TeX tools for LaTeX (JAW) tikzlibrarypatterns.code.tex 2026-08-01 v3.1.12 (3.1.12) pgflibrarypatterns.code.tex 2026-08-01 v3.1.12 (3.1.12) tikzlibraryfadings.code.tex 2026-08-01 v3.1.12 (3.1.12) pgflibraryfadings.code.tex 2026-08-01 v3.1.12 (3.1.12) tikzlibrarycalc.code.tex 2026-08-01 v3.1.12 (3.1.12) l3backend-pdftex.def 2026-08-10 L3 backend support: PDF output (pdfTeX) supp-pdf.mkii epstopdf-base.sty 2020-01-24 v2.11 Base part for package epstopdf epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live *********** Edit I found a simpler version: \documentclass{article} \usepackage{tikz} \ExplSyntaxOn \usetikzlibrary{calc} \ExplSyntaxOff \begin{document} x \end{document} My follow-up question is, it looks like a breaking change for me... Would this change break plenty of packages? Because before 2026, maybe March(?) It's allowed to put \usetikzlibrary{calc} within .dtx(or expl3 environment,which leave off <space>) directly? But now not allowed? The most immediate impression seems to be that the author of dtx needs to make an additional protective switch due to the use of \usetikzlibrary{calc}? I don't think that is convenient....

  • When I use "\d{ð}" to get letter "eth" with dot below, the dot appears under the previous letter
    by David Graff on September 8, 2026 at 10:44 pm

    Here's the "minimal" example. I'm working on an Arabic-to-English dictionary, so I need English, Arabic and Phonetic Alphabet. The parts of the example that involve Arabic are commented out, and apparently don't affect the underdot problem. \documentclass[notitlepage]{article} \usepackage[english,arabic]{babel} % \usepackage{luabidi} \usepackage{titlesec} \usepackage{textcomp} \usepackage{fontspec} \babelfont[*english, *arabic]{rm}{Times New Roman} \begin{document} \pagestyle{empty} % \paragraph{\RLE{أظرَف}} blah blah. % \RLE{ ماأَظرفِك... مِالصّين.} [ma\d{ð}irfik ... ʔi\d{s}\d{s}ħan ... miṣṣiːn.] Blah blah. \end{document} I'm using LuaLaTeX. Note that the example uses both "ṣ" and "\d{s}", and these are rendered correctly, but the dot for ð appears under the preceding "a".

  • Composite function diagram
    by D G on September 8, 2026 at 10:59 am

    Expected result: Except for the order of composition. Need help for: middle arrows intersection regions with color and labels adding cutting curve in the most right ellipse \documentclass[tikz,border=1cm,12pt]{standalone} \usepackage{fouriernc} \usetikzlibrary{calc,positioning,shapes.geometric} \tikzset{ elps/.style 2 args={ draw, ellipse, minimum width=#1, minimum height=#2 }, node distance=3cm, >=latex } \begin{document} \begin{tikzpicture} \node(Df) [elps={3cm}{5cm},label={above:$D_f$}] {}; \node(Rf) [elps={3cm}{5cm},right=of Df,label={above:$R_f$}] {}; \node(fiDg) [elps={3cm}{5cm},below=-2cm of Df,label={below:$f^{-1}\left(D_g\right)$}] {}; \node(Dg) [elps={3cm}{5cm},below=-2cm of Rf,label={below:$D_g$}] {}; \node(Rg) [elps={3cm}{5cm},right=of Dg,label={below:$R_g$}] {}; \draw[->] (Df) to[bend left=30] node[above] {$f$} (Rf); \draw[->] (Dg) to[bend left=30] node[above] {$g$} (Rg); \draw[->] (Dg) to[bend left=30] node[above] {$f^{-1}$} (fiDg); \end{tikzpicture} \end{document}

  • Memoir: Why does the placement of \usepackage[T1]{fontenc} affect the page layout when using \linespread in memoir?
    by user1362373 on September 8, 2026 at 8:59 am

    In memoir, I noticed that when I use \linespread command, the placement of \usepackage[T1]{fontenc} affects the page layout. Consider the following MWE: \documentclass[a4paper,10pt]{memoir} \usepackage[T1]{fontenc} \usepackage[osf]{newpx} \linespread{1.05} \usepackage{lipsum} \checkandfixthelayout \begin{document} \typeout{The value of baselineskip is \the\baselineskip} \typeout{The value of topskip is \the\topskip} \typeout{The value of parskip is \the\parskip} \lipsum[1-6] \end{document} The relevant lines in the output of \checkandfixthelayout are: Text height and width: 598pt by 341pt Upper and lower margins: 125.33748pt and 121.70937pt If I change the order of the lines to \usepackage[osf]{newpx} \linespread{1.05} \usepackage[T1]{fontenc} I get Text height and width: 602.20172pt by 341pt Upper and lower margins: 125.33748pt and 117.50764pt The values of \baselineskip, \topskip and \parskip are not changed. Thus, the order affects the text height and the lower margin (with the sum being unaffected). If I remove the \linespread command, the order of using fontenc and newpx makes no difference. What's the explanation for this behaviour? (Background: I use \linespread{1.05} because this is what was recommended by the LaTeX font catalogue for URW Palladio, which is the font I used before switching to newpx in response to @egreg's answer. The usage example for URW Palladio had the order \usepackage{mathpazo}, \linespread{1.05} and \usepackage[T1]{fontenc}. I noticed the effect of the order when I tried to find the cause for different page layouts after switching from mathpazo to newpx.)

  • Immediate expanding of \clist_map for use with expand= in tblr environment
    by Don Hosek on September 7, 2026 at 1:07 am

    For maintainability in a tblr, I’ve developed a macro that works from lists to handle setting the entries. It works pretty well but with one exception: I would like to have it expand the following: \clist_map_inline:Nn \l_fd_clist { & csname pl_##1endcsname } for filling in the cells of a row (the various pl_WHATEVER macros are set earlier in the process). But apparently the expansion is only one level deep (which most of the time is good because otherwise the earlier list handling wouldn’t work correctly). I could split out the code that interprets the input lists and that sets the line and only have the latter part of the expand= option, which might be the best option (it would also allow me to deal with the awkwardness of the fact that I still have a manually generated header row which needs to be kept in sync with the body), but I don’t really like the idea of having to have two macros for each line instead of one like I have now. (Although as I think about it, it also occurs to me that I could do something like \edef\fdline#1#2#3#4{% \noexpand\setfdline{#1}{#2}{#3}{#4}% \clist_map_inline … } but I’d figured I’d see if there was something added in to the TeX core that I’m unfamiliar with or if in the course of writing out this question I’ve come across the best solution. Edited to add: OK, this is deep into yak-shaving territory here,¹ but closing my question nerd-sniped me. So here’s a MWE showing the ugly implementation: \documentclass{article} \usepackage{tabularray} \begin{document} \ExplSyntaxOn \clist_new:N \l_fd_clist \clist_set:Nn \l_fd_clist {A, B, C} \def\test#1{ \clist_map_inline:Nn \l_fd_clist { \expandafter\gdef \csname pl_##1\endcsname {} } \clist_map_inline:nn {#1} { \expandafter\gdef \csname pl_##1\endcsname {X} } & \pl_A & \pl_B & \pl_C\\ % ❶ } \ExplSyntaxOff \begin{tblr}[expand=\test]{cccc} \test{A,C} \test{B,C} \end{tblr} \end{document} The line marked ❶ is where I want something more elegant. The ideal would be something like: \expanded\clist_map_function:NN \l_fd_clist \cell_def with \celldef defined as: \def\cell_def#1{& \csname pl_#1\endcsname} which gives as its first error: ! Missing { inserted. <to be read again> & l.29 \end {tblr} (Removing \expanded gives the Misplaced alignment tab character & error which indicates that it didn’t even get there). I had decided to just leave the ugly version of the table be since the fancy version wasn’t working.