• In what situations should I use \noexpand after \romannumeral?
    by Elayson Abreu on September 16, 2026 at 6:20 pm

    In what situations should I use \noexpand after \romannumeral? For example, the trimspaces package contains the following code: \catcode`\Q=3 \newcommand\trim@spaces[1]{% \romannumeral-`\q\trim@trim@\noexpand#1Q Q% } \long\def\trim@trim@#1 Q{\trim@trim@@#1Q} \long\def\trim@trim@@#1Q#2{#1} \catcode`\Q=11 Why is the \noexpand in \trim@spaces necessary? Edit: I managed to create an example where \noexpand does not seem to be important. % !TeX TS-program = lualatex \documentclass{article} \begin{document} \def\y{1} \expandafter\def\expandafter\x\expandafter{\romannumeral-`\. \y} \show\x % >\y . \end{document} Note how the \y macro survived expansion.

  • `ball color` with `fill opacity` for transparency would make the color darken with 3D object, any other schemes?
    by Explorer on September 16, 2026 at 5:28 pm

    Lead-in Claim: this part might be quite personal, but to show why, I decide to post it. The content was borrowed from here. Let's consider the following two series of images, just focus on the style: Group 1: Bright and Brilliant Group 2: Depressing and Gloomy Noted that was my personal perspective, I perferred the bright group. I like the real 3D style provided by ball color, It looks both professional and sophisticated. But not so good for me with opacity, it make the image looks seems a little bit depressing. So I was looking for any schemes with opacity that would not make the image too dark... Consider the pfradin's comment here and here, the difference: The real difference between the two groups is transparency. It is not luadraw that handles the ball color and fill opacity options, but TikZ, since it is responsible for the rendering. I therefore suggest you look into TikZ. Code Here below is my follow-up TikZ question: \documentclass[tikz,border=5pt]{standalone} \begin{document} \begin{tikzpicture} \node {case1:hidden}; \fill[magenta] circle[radius=1cm]; \end{tikzpicture} \begin{tikzpicture} \node {case1':hidden}; \fill[magenta,opacity=0.5] circle[radius=1cm]; \end{tikzpicture} \begin{tikzpicture} \node {case2:hidden}; \fill[ball color=magenta] circle[radius=1cm]; \end{tikzpicture} \begin{tikzpicture} \node {case2':hidden}; \fill[ball color=magenta,fill opacity=0.5] circle[radius=1cm]; \end{tikzpicture} \begin{tikzpicture} \node {case3:hidden}; \fill[left color=magenta!25, right color=magenta] circle[radius=1cm]; \end{tikzpicture} \begin{tikzpicture} \node {case3':hidden}; \fill[left color=magenta!25, right color=magenta,opacity=0.5] circle[radius=1cm]; \end{tikzpicture} \end{document} Here below is the version with tikz-3dplot: \documentclass[tikz,border=10pt]{standalone} \usepackage{tikz-3dplot} \begin{document} \tdplotsetmaincoords{70}{110} \begin{tikzpicture}[tdplot_main_coords] \begin{scope}[x={(1cm,0)}, y={(0,1cm)}] \node {hidden}; \shade[inner color=magenta!25, outer color=magenta] (0,0) circle (3cm); \end{scope} \end{tikzpicture} \begin{tikzpicture}[tdplot_main_coords] \begin{scope}[x={(1cm,0)}, y={(0,1cm)}] \node {hidden}; \shade[inner color=magenta!25, outer color=magenta,opacity=0.5] (0,0) circle (3cm); \end{scope} \end{tikzpicture} \end{document} It didn't get the things gloomy: Questions (sorry, option-based questuon, but not the key point here, no need to answer, but I wonder any preferences?) Would you prefer the Group A(bright 3D) instead of the Group B(dark-opacity 3D)? Is that possible for ball color and fill opacity not to make things darken and gloomy? How many shading stretagies could be used(provided with TikZ/pgf) to simulate the light and shadow of 3d-object? Is that exists one that would darken the color(It looks like tikz-3dplot used one)? Is that possible to support another shading color scheme similar to tikz-3dplot to mimic 3D with luadraw instead of the ball color now?

  • How to enlarge the bounding box of `tblr` with `tikz` if the `overlay` get out of the `tblr` itself?
    by Explorer on September 16, 2026 at 3:47 pm

    Just for fun, I try to mimic this question with tikz-extension with tabularray: \documentclass{article} \usepackage{tabularray} \UseTblrLibrary{tikz} \begin{document} \begin{tblr}{ colspec={*{3}{Q[c,m,12mm]}}, hlines,vlines, } multiple lines & b & c \\ d & multiple lines & f \\ g & h & i \\ \end{tblr} \bigskip \begin{tblr}{ colspec={*{3}{Q[c,m,12mm]}}, % hlines,vlines, rows={rowsep=+5pt}, columns={colsep=+5pt}, } multiple lines & b & c \\ d & multiple lines & f \\ g & h & i \begin{tblrtikzabove}% \foreach \i in {1,...,\arabic{rowcount}}{ \foreach \j in {1,...,\arabic{colcount}}{ \coordinate (A) at ([xshift=+2pt,yshift=-2pt]h\i-|v\j); \coordinate (B) at ([xshift=-2pt,yshift=+2pt]h\inteval{\i+1}-|v\inteval{\j+1}); \draw[cyan] (A) rectangle (B); } } \draw[magenta] ([xshift=-1.5pt,yshift=+1.5pt]h1-|v1) rectangle ([xshift=+1.5pt,yshift=-1.5pt]h\inteval{\arabic{rowcount}+1}-|v\inteval{\arabic{colcount}+1}); \end{tblrtikzabove}% \end{tblr} \end{document} However, the bounding box was enlarged with the overlay. It looks not a good idea to do so with tabularray...? Now I turn to focused, if we need to draw something outside the tblr, how to enlarge the corresponding bounding box?

  • The triple link no longer appears
    by Nicolas on September 16, 2026 at 3:26 pm

    I want to show a sequence of reaction, keeping the environment reaction: for the first alcyne, the triple bond is clearly visible; on the other hand, for the next two, it no longer appears \documentclass[a4paper,12pt]{article} \usepackage[T1]{fontenc} \usepackage{chemfig} \usepackage{chemmacros} \begin{document} \begin{reaction} \chemfig{R_1-C~C-H}->[ base~forte] "\chemfig{R_1-C~C\mch{}}" %+\ch{BH} ->[ "\chemfig{R_2-X}" ] "\chemfig{R_1-C~C-R_2}" \label{rxn:bilansnalcyne}% \end{reaction} \end{document}

  • Text in Devanāgarī, line numbering in Arabic
    by muk.li on September 16, 2026 at 1:24 pm

    In the following example, to be compiled with LuaLaTeX, I have a Sanskrit text which, while in the source file it is written in IAST transliteration, in the PDF output it is rendered in Devanāgarī, which is done by babel's transform mechanism. \documentclass{memoir} \usepackage{fontspec} \defaultfontfeatures{Ligatures=TeX} \setmainfont{Noto Serif} \usepackage[english]{babel} \babelprovide[% typography/prehyphenchar = `-, transforms=transliteration.iast, ]{sanskrit} \babelfont{rm}{Noto Serif} \babelfont[*devanagari]{rm}[Renderer=Harfbuzz]{Noto Serif Devanagari} \usepackage{reledmac} \linenumberstyle{arabic} \setcounter{firstlinenum}{1} \setcounter{linenumincrement}{1} \begin{document} \begin{otherlanguage}{sanskrit} \beginnumbering \pstart athety ayam adhikārārthaḥ. yogānuśāsanaṃ śāstram adhikṛtaṃ veditavyam. yogaḥ samādhiḥ. sa ca sārvabhaumaś cittasya dharmaḥ. kṣiptaṃ mūḍhaṃ vikṣiptam ekāgraṃ niruddham iti cittabhūmayaḥ. tatra vikṣipte cetasi vikṣepopasarjanībhūtaḥ samādhir na yogapakṣe vartate. yas tv ekāgre cetasi sadbhūtam arthaṃ pradyotayati kṣiṇoti ca kleśān karmabandhanāni ślathayati nirodham abhimukhaṃ karoti sa saṃprajñāto yoga ity ākhyāyate. sa ca vitarkānugato vicārānugata ānandānugato 'smitānugata ity upariṣṭān nivedayiṣyāmaḥ. sarvavṛttinirodhe tv asaṃprajñātaḥ samādhiḥ. 1.1 \pend \endnumbering \end{otherlanguage} \end{document} I would prefer the line numbering to be exempt from that transformation, so that the numbers in the left margin appear in the usual Arabic form. One possibility to do that could be to open the Sanskrit environment only after \pstart and close it before \pend, but that would then lead to the lemmas not being displayed properly, and possibly other complications. Is there a way to wrap the line numbers in an English language environment?

  • Tablecaption IEEEconf misaligned
    by binex6 on September 16, 2026 at 1:01 pm

    In my Latex IEEEconf paper (template ieeeconf.cls from here) I have a table, placed on top of the page. The table caption has to be placed above the table. Somehow, the caption is misaligned, same as in this question. It is placed to far towards the pages top. Instead of the letters written uppercase, the letters written in lowercase are perfectly aligned to the top margin. So exactly the difference between the lowercase and uppercase letters shifts the caption text to far towards the pages top. Nothing so far helped, I tried \vspace, \vspace*, \caption{\rule{0pt}{0.7\baselineskip}Caption Text}, minipages, etc... The same error occurs to all figures on top of pages but for figures it was easy to fix with \vspace*{0.2cm}, since the caption is placed below normal figures and therefore they are shifted with the figures content. For tables, it is not working because the caption is placed above the table itself. A minimal example is below. \documentclass[10pt, conference]{ieeeconf} % \IEEEoverridecommandlockouts \usepackage[utf8]{inputenc} \usepackage{graphicx} % Add graphics capabilities \usepackage{amsmath} % Better maths support \usepackage{amssymb} % Additional math symbols \usepackage[TS1,T1]{fontenc} \usepackage{multirow} \usepackage[labelfont=bf, ]{caption} \usepackage[bookmarksopen, colorlinks, linkcolor=black, urlcolor=black, citecolor=black, breaklinks, linktocpage=true]{hyperref} \usepackage{floatrow} \floatsetup[table]{capposition=top} \usepackage{orcidlink} \usepackage{microtype} \usepackage{makecell} % for multi-cell tables \usepackage{tikz} \usetikzlibrary{calc, backgrounds, positioning} \usepackage{pgfplots} \pgfplotsset{compat=1.18} % This draws border around page margins, which shows the table caption fail \usepackage{eso-pic} % For background placement in all modes \AtBeginDocument{% \AddToShipoutPictureBG{% \begin{tikzpicture}[remember picture, overlay] \path (current page.south west) ++(54pt,54pt) coordinate (original south west) (current page.north east) ++(-54pt,-54pt) coordinate (original north east); \draw[thin, lightgray](original south west) rectangle (original north east); \end{tikzpicture}%% }% } \usepackage{lipsum} \title{Title} \author{Authors% <-this stops a space \thanks{Partially supported by BLABLABLA}% } \begin{document} \maketitle \lipsum[1-15] \begin{table}[t] \centering \caption{Some Caption.} \begin{tabular}{l c c} & Col1 & Col2 \\ \hline Row1 & Num1 & Num2 \\ Row2 & Num3 & Num4 \\ \hline \end{tabular} \label{tab:label1} \end{table} \end{document}

  • LaTeX3: check if a macro is relaxed, and how \cs_if_exist:cTF works
    by Thibault de Villèle on September 16, 2026 at 12:49 pm

    I have the following in some parts of my code, which need to interact with LaTeX2ε code: \NewDocumentCommand{\foo}{m}{ %... \expandafter\gdef\csname cname@\@currentcounter\endcsname{\IfBlankTF{#1}{\relax}{#1}} %... } I expected the following to work in expl3 (because I use zref for some stuff): %... \bool_if:nTF { \cs_if_exist_p:c { cname@ \@currentcounter } } { do something with the value of \cname@.... } { do something else } %... But it seems like this is always evaluating to true, even when cname@\@currentcounter is set to \relax. The LaTeX3 manual states: \cs_if_exist_p:c Tests whether the <control sequence> is currently defined (whether as a function or another control sequence type), and its meaning is not the primitive \relax token. Is this expected behaviour? Are \gdef macros set to \relax somehow not set to "the primitive \relax token" ? MWE: \documentclass[varwidth, margin=1cm]{standalone} \NewDocumentCommand{\makecmdG}{m m}{\expandafter\gdef\csname mycommand#1\endcsname{\IfBlankTF{#2}{\relax}{#2}}}% \NewDocumentCommand{\makecmdX}{m m}{\expandafter\xdef\csname mycommand#1\endcsname{\IfBlankTF{#2}{\relax}{#2}}}% \ExplSyntaxOn \NewDocumentCommand{\checkcmd}{m}{ \bool_if:nTF { \cs_if_exist_p:c { mycommand#1 } } { defined~ } { undefined~ } and~ \cs_if_exist:cTF { mycommand#1 } { not-relaxed } { relaxed } \cs_log:c { mycommand#1 }} \ExplSyntaxOff \makecmdG{foo}{} \makecmdG{bar}{content} \makecmdX{FOO}{} \makecmdX{BAR}{CONTENT} \begin{document} \texttt{\string\mycommandfoo} is \checkcmd{foo}.\par% Expected: defined and relaxed. \texttt{\string\mycommandbar} is \checkcmd{bar}.\par% Expected: defined and not-relaxed. \texttt{\string\mycommandFOO} is \checkcmd{FOO}.\par% Expected: defined and relaxed. \texttt{\string\mycommandBAR} is \checkcmd{BAR}.\par% Expected: defined and not-relaxed. % Instead, all lines are equal to "... defined and not-relaxed." \end{document}

  • 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. Here is an MWE: \documentclass{article} \usepackage{acronym} \begin{document} \begin{acronym} \acro{ABC}{Long form (additional information)} \end{acronym} First occurrence: \ac{ABC}. Second occurrence: \ac{ABC}. I would like: First occurrence: Long form (additional information, ABC). \end{document}

  • 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:

  • 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.

  • 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

  • \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.)

  • How to make the 7th and 8th author align on the space? [duplicate]
    by Alastair Stratford on September 10, 2026 at 4:58 pm

    I hope you get this since I'm really bad at explaining. I get this LaTeX code from IEEE, and it only has 6 authors on the template. I am setting this since I'm transferring our research, and we are 8 authors. The thing is, the spacing is really off, and I want to align it in the spaces that the 1st-6th author, like the two spaces between the authors. PS: IEEE Conference template was the provided template given to us. I actually don't know why also. \documentclass[conference]{IEEEtran} \IEEEoverridecommandlockouts % The preceding line is only needed to identify funding in the first footnote. If that is unneeded, please comment it out. \usepackage{cite} \usepackage{amsmath,amssymb,amsfonts} \usepackage{algorithmic} \usepackage{graphicx} \usepackage{textcomp} \usepackage{xcolor} \def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}} \begin{document} \title{Conference Paper Title*\\ {\footnotesize \textsuperscript{*}Note: Sub-titles are not captured in Xplore and should not be used} \thanks{Identify applicable funding agency here. If none, delete this.} } \author{\IEEEauthorblockN{1\textsuperscript{st} Given Name Surname} \IEEEauthorblockA{\textit{dept. name of organization (of Aff.)} \\ \textit{name of organization (of Aff.)}\\ City, Country \\ email address or ORCID} \and \IEEEauthorblockN{2\textsuperscript{nd} Given Name Surname} \IEEEauthorblockA{\textit{dept. name of organization (of Aff.)} \\ \textit{name of organization (of Aff.)}\\ City, Country \\ email address or ORCID} \and \IEEEauthorblockN{3\textsuperscript{rd} Given Name Surname} \IEEEauthorblockA{\textit{dept. name of organization (of Aff.)} \\ \textit{name of organization (of Aff.)}\\ City, Country \\ email address or ORCID} \and \IEEEauthorblockN{4\textsuperscript{th} Given Name Surname} \IEEEauthorblockA{\textit{dept. name of organization (of Aff.)} \\ \textit{name of organization (of Aff.)}\\ City, Country \\ email address or ORCID} \and \IEEEauthorblockN{5\textsuperscript{th} Given Name Surname} \IEEEauthorblockA{\textit{dept. name of organization (of Aff.)} \\ \textit{name of organization (of Aff.)}\\ City, Country \\ email address or ORCID} \and \IEEEauthorblockN{6\textsuperscript{th} Given Name Surname} \IEEEauthorblockA{\textit{dept. name of organization (of Aff.)} \\ \textit{name of organization (of Aff.)}\\ City, Country \\ email address or ORCID} \and \IEEEauthorblockN{7\textsuperscript{th} Given Name Surname} \IEEEauthorblockA{\textit{dept. name of organization (of Aff.)} \\ \textit{name of organization (of Aff.)}\\ City, Country \\ email address or ORCID} \and \IEEEauthorblockN{8\textsuperscript{th} Given Name Surname} \IEEEauthorblockA{\textit{dept. name of organization (of Aff.)} \\ \textit{name of organization (of Aff.)}\\ City, Country \\ email address or ORCID} } \maketitle \end{document}

  • 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}

  • How to tweak the baseline of `exam-zh-choices` coffin within `minipage`s?
    by Explorer on September 10, 2026 at 7:35 am

    Here below is my test example with exam-zh-choices(by texdoc exam-zh, that is the manual): \documentclass{article} \usepackage{lua-visual-debug} \usepackage{graphicx} \usepackage[export]{adjustbox} \usepackage{lipsum} \usepackage{exam-zh-choices} \begin{document} \section{Example A} \lipsum[1][1-2]\par\noindent \begin{minipage}[t]{.6\linewidth}% \begin{choices} \item AAAA \item BBBB \item CCCC \item DDDD \end{choices} \end{minipage}\hfill% \begin{minipage}[t]{.4\linewidth} \lipsum[2][1-2] \end{minipage} \section{Example B} \lipsum[1][1-2]\par\noindent \begin{minipage}[t]{.6\linewidth}% \begin{choices} \item AAAA \item BBBB \item CCCC \item DDDD \end{choices} \end{minipage}\hfill% \begin{minipage}[t]{.4\linewidth} \includegraphics[valign=t,width=\linewidth]{example-image-duck} \end{minipage} \section{Example C} \lipsum[1][1-2]\par\noindent \begin{minipage}[t]{.6\linewidth}% \begin{choices} \item AAAA \item BBBB \item CCCC \item DDDD \end{choices} \end{minipage}\hfill% \begin{minipage}[t]{.4\linewidth} \includegraphics[valign=T,width=\linewidth]{example-image-duck} \end{minipage} \end{document} With lua-visual-debug, the baseline was shown with different "Top": What I want, is to ellinimate the gap before choices environment: Maybe \vspace{-2ex} would works, but I wonder whether some better approaches to handle the "Top" alignment here to tweak the baseline.

  • 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