• Interlinear glossing - Notes above the text that wrap with the paragraph
    by J. M. on May 11, 2026 at 11:29 am

    I have been trying to create a feature that would allow me to add translations into another language in small font above the sentences in the source paragraph. The translations must start above the target word (at the beginning of the sentence), but then flow with the rest of the main paragraph and wrap along with it (or at least give that impression visually). The goal here is not to translate word for word— I could easily add a note with translated word above the source words separately. The font is set to a small size to ensure that the translation does not overflow the end of the source sentence. This is best illustrated by the image: I have carried out this successful attempt in the HTML / CSS / JS using latex.css, but the process fails when paginating with paged.js—the source paragraph wraps when transitioning from page to page, but the added translation sentences are problematic in this regard, as they are simply separately generated paragraphs with calculated first-line indentation (x coordinate shift) and wide line spacing that is shifted above the target coordinate (y coordinate shift). Since I plan to print the final result as a language teaching material, pagination and layout are crucial, so I’ve decided to switch to LaTeX instead. Since I have been unable to achieve the desired result through various methods there, I would like to ask for your help in finding or creating a feature that produces the same effect. I haven't been involved with LaTeX for very long, and I admit that I may be missing some knowledge needed to achieve the goal. GPT is not much help with this particular problem. Thank you very much for your willingness to help and for your time

  • How to draw two squares beside each other?
    by Intuition on May 11, 2026 at 11:23 am

    Here is the picture I want to draw: I know how to draw just one colored square, for example here is a code to it: \documentclass[12pt]{article} \usepackage[utf8]{inputenc} \usepackage[a4paper, margin=1.5in]{geometry} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{tikz-cd} \usepackage{amsmath,amsfonts,amssymb} \usepackage{amsthm} \usepackage{graphicx} \usepackage[all,cmtip]{xy} \usepackage[english]{babel} \usepackage{xurl} \usetikzlibrary{positioning, shapes.geometric} \begin{document} \begin{tikzpicture}[ every path/.style={thick}, every node/.style={circle,fill=black,draw,inner sep = 0pt, minimum size= 2pt} ] \draw[red] (0,0)--(2,0); \draw[cyan] (2,0)--(2,2); \draw[yellow] (2,2)--(0,2); \draw[red] (0,2)--(0,0); \draw[green] (0,0)--(2,2); %\draw[green] (0,2)--(2,0); \foreach \corner in {(0,0), (2,0), (2,2), (0,2)} \node at \corner {}; \end{tikzpicture} \end{document} Also, how to remove the common edge if I aligned the two squares beside each other? Any help will be greatly appreciated.

  • Sans serif font
    by m4r35n357 on May 11, 2026 at 11:04 am

    How do I set a sans-serif document font in Latex? This simple question does not seem to have an answer here at all - everyone already seems to know it and nobody asks. MWE (two solutions commented out): \documentclass{book} \usepackage[T1]{fontenc} %\usepackage{sans} \author{me} \title{Blah} \date{never} \begin{document} % start document %\sffamily \frontmatter % the front of the book has roman numerals \maketitle\tableofcontents % generates a titlepage and Contents \mainmatter % the main part of the book will have standard pages Hello \end{document}

  • Has processing of blank source lines in array environments changed?
    by Klaus on May 11, 2026 at 10:00 am

    I have a LaTeX source text which I could run through pdflatex on April 15 but which fails today May 11. I can make the source text work again by deleting blank lines in array environments (400 places in my case). Here is a minimal failing example of a source text which does not compile: \documentclass{article} \begin{document} \[\begin{array}{l} foo \end{array}\] \end{document} In contrast, this compiles: \documentclass{article} \begin{document} \[\begin{array}{l} foo \end{array}\] \end{document} Also, this compiles: \documentclass{article} \begin{document} \[\begin{array}{l} foo \\ \end{array}\] \end{document} So my question is: what makes the minimal failing example above fail today? Or, equivalently, what made it work on April 15? Between April 15 and today I have upgraded my Fedora Linux installation so, in particular, I have upgraded TeX related packages. My guess is that some TeX related package has changed. My LaTeX source text which worked on April 15 used the following packages: centernot latexsym amssymb graphicx amsmath url enumitem stackengine accents printlen cancel tocloft makeidx tikz. So it could be that one of those packages made the minimal failing example work previously but not anymore.

  • Best tool for PDF to LaTeX conversion? Has anyone tried ilovemylatex.com?
    by Fabrice on May 11, 2026 at 9:59 am

    Yo, does anyone know a solid SaaS for converting PDF to LaTeX? I have a massive report due and I’m losing my mind trying to retype everything. I stumbled upon ilovemylatex.com—has anyone tried it yet? It looks brand new and supposedly the code is super clean, but I wanted to see if it’s legit before I dive in. Let me know if you guys have any other recs!

  • TeX4ht fails to find image if make4ht -B option is used
    by oleksii.markovets on May 11, 2026 at 8:18 am

    I'm compiling my document in 3 different formats (pdf, odt, html), in order to avoid conflicts I'm using separate build directories for each format. But compilation to odt/html fails if document contains images and -B/--build-dir is used. Here is my sources test.tex: \documentclass{article} \usepackage{graphicx} \begin{document} test \begin{figure} \centering \includegraphics{img/test.eps} \caption{Test} \label{fig:test} \end{figure} \end{document} test.mk: Make:latexmk {} And here is compilation output: $ make4ht -e test.mk4 -B odt-build -d odt-out -f odt --lua test [STATUS] make4ht: Conversion started [STATUS] make4ht: Input file: test --- error --- Can't find/open file `img/test.png.4og' [FATAL] make4ht-lib: Fatal error. Command tex4ht returned exit code 1 But if I don't use -B option, it compiles just fine: $ make4ht -e test.mk4 -d odt-out -f odt --lua test [STATUS] make4ht: Conversion started [STATUS] make4ht: Input file: test [STATUS] make4ht: Conversion finished

  • How to use/define longtblr (from tabularray) with two independent caption counters
    by Vitor Coimbra on May 11, 2026 at 12:58 am

    For a document I'm working on, there's a distinction between "frames" and "tables". Long story short, tables are for purely numerical data, while frames can contain text. Because they're separate entities, I need to make sure they're also indexed separately. I managed to somehow figure out how to do that for normal tblrs by creating my own floating environments, which can easily keep track of their own counters. Main issue is that I'm working with some massive tables of numbers and text, meaning I need to use longtblrs for both of these entities pretty much everywhere. longtblrs, however, seem to embed caption stuff into their own innards and so far all my attempts to get independent counters to work have not worked. Here's the latest attempt I've made: \documentclass{article} \usepackage{tabularray} \DeclareTblrTemplate{caption-sep}{default}{ -- } \UseTblrLibrary{counter} \newcounter{framecounter} \NewTblrTheme{frame}{ \DeclareTblrTemplate{caption-tag}{default}{ \stepcounter{framecounter} Frame\ \theframecounter } } \begin{document} \begin{tblr}[ long, caption = {This should be Frame 1}, label = {frm:testframe1}, theme=frame ]{ colspec = {X[c]X[c]}, hlines, vlines } This is & a table test \\ to see & if counters work \\ \end{tblr} \begin{tblr}[ long, caption = {This should be Table 1}, label = {tab:testtable1}, ]{ colspec = {X[c]|X[c]}, hlines } This is & a table test \\ to see & if counters work \\ \end{tblr} \begin{tblr}[ long, caption = {This should be Frame 2}, label = {frm:testframe2}, theme=frame ]{ colspec = {X[c]X[c]}, hlines, vlines } This is & a table test \\ to see & if counters work \\ \end{tblr} References (and what they should be, in brackets): Frame \ref{frm:testframe1} (1), Table \ref{tab:testtable1} (1), Frame \ref{frm:testframe2} (2) \end{document} And what it looks like:

  • ATS-compliant CV: suppress text of an icon when coping from PDF
    by Akira on May 10, 2026 at 7:33 pm

    I am compiling my CV with lualatex. I would like to make my CV ATS-compliant where ATS is "Applicant Tracking System". \documentclass{article} \usepackage{fontawesome5} \newcommand{\iconExternal}{{\tiny \faExternalLink*} } \begin{document} I have an icon \iconExternal which is beautiful. \end{document} gives When I copy the content from the PDF, I get I have an icon External-Link-Alt which is beautiful. I would like to ask how to suppress External-Link-Alt when copying. Thank you for your elaboration.

  • Tikz node text width and alignment messed up spaces and indentation
    by aky-her on May 10, 2026 at 5:52 pm

    I have a mono-spaced font (TeX Gyre Cursor), but when I use it in a Tikz node with text width = XYcm the spaces change size. Is there a way to either preserve the space size with the width command, or achieve automatic line breaks in tikz node in some other way that does not break the spaces? Additionally, when using alignemnt, it inserts an indent at the start of the text, which I was not able to remove with \setlength{parindent}{0pt}. What causes this indent and how can I remove it? Here is my full node code: \node at (3, 1.75) [ align = left, text width = 4.6cm, ] {\setlength{\parindent}{0pt}\textbf{\setfontsz{\sztext} Text line 1, Longer text line 2, Even way way way way longer text line 3, Text line 4}}; EDIT: here is the full code: \documentclass{article} \usepackage[paperheight=8cm, paperwidth=6cm, left=0pt, top=0pt, right=0pt, bottom=0pt]{geometry} \usepackage{tikz} \usepackage{fontspec} \usepackage{array} \setmainfont{TeX Gyre Cursor} \newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}} %% horizontal centering \newcommand{\setfontsz}[1]{ \fontsize{#1}{1.2#1} \selectfont } \pagestyle{empty} %\renewcommand{\arraystretch}{2.2} \newcommand{\sztext}{8pt} \begin{document} %\vspace*{-\baselineskip} \begin{tikzpicture}[remember picture, overlay, shift = {(current page.south west)}] \node at (current page.center) [] {\includegraphics[height=\paperheight]{example-image-a.png}}; \node at (3, 1.75) [ align = left, text width = 4.6cm, ] {\setlength{\parindent}{0pt}\textbf{\setfontsz{\sztext} Text line 1, Longer text line 2, Even way way way way longer text line 3, Text line 4}}; \end{tikzpicture} \end{document}

  • Arrows pointing into dots
    by Tala Cruz on May 10, 2026 at 11:51 am

    I am trying to draw a diagram that shows an equivalence chain between statements. I am trying to use tikz-cd to achieve this, here is my code. \[ \begin{tikzcd} \exists \alpha_1,\cdots,\alpha_n \in \mathbb{R} \;\; f(\alpha_1,\cdots,\alpha_n) < 0 \ar[d, Leftrightarrow] \\ \exists \alpha_1,\cdots,\alpha_n \in \mathbb{R}(X_1) \;\; f(\alpha_1,\cdots,\alpha_n) \prec 0 \ar[d, Leftrightarrow] \\ \exists \alpha_1,\cdots,\alpha_n \in \mathbb{R}(X_1,X_2) \;\; f(\alpha_1,\cdots,\alpha_n) \prec 0 \ar[d, Leftrightarrow] \\ \vdots \ar[d, Leftrightarrow] \\ \exists \alpha_1,\cdots,\alpha_n \in \mathbb{R}(X_1,\cdots,X_n) \;\; f(\alpha_1,\cdots,\alpha_n) \prec 0 \end{tikzcd} \] However, there is an undesired space above the \vdots, as shown: I have tried using \raisebox but it only seems to make the lower gap larger. Is there a way to make the dots’ spacing the same as the other lines? (I am also fine with a solution that does not need tikz-cd).

  • “This page intentionally left blank” after \part when titlesec is used
    by John C on May 10, 2026 at 9:12 am

    I wanted the text "This page intentionally left blank." to appear in the book class whenever a new chapter starts leaving the preceding even page empty. I solved this problem a few years ago by adding the following code to the preamble: \makeatletter \def\cleardoublepage{\clearpage% \if@twoside \ifodd\c@page\else \vspace*{\fill} \hfill \begin{center} \emph{This page intentionally left blank.} \end{center} \vspace{\fill} \thispagestyle{empty} \newpage \if@twocolumn\hbox{}\newpage\fi \fi \fi } \makeatother Recently, I noticed that the page following \part was completely empty. I found the solution here “This page intentionally left blank” after \part, where it was suggested to modify the \@endpart command as follows: \makeatletter \def\@endpart{\vfil\newpage\if@twoside \if@openright \mbox{} \vspace*{\fill} \begin{center} \emph{This page intentionally left blank.} \end{center} \vspace{\fill} \thispagestyle{empty} \newpage\fi\fi \if@tempswa\twocolumn\fi} \makeatother However, when formatting the titles with titlesec, the problem reappears: pages inserted after \part are completely empty, ignoring the previous instructions. Nevertheless, the empty page before \part correctly mainteins the text "This page intentionally left blank.". Is there a way to solve this problem? Below is a minimal working example showing what I have been able to achieve so far: \documentclass{book} % This page intentionally left blank \makeatletter \def\cleardoublepage{\clearpage% \if@twoside \ifodd\c@page\else \vspace*{\fill} \hfill \begin{center} \emph{This page intentionally left blank.} \end{center} \vspace{\fill} \thispagestyle{empty} \newpage \if@twocolumn\hbox{}\newpage\fi \fi \fi } \makeatother % This page intentionally left blank after "\part" \makeatletter \def\@endpart{\vfil\newpage\if@twoside \if@openright \mbox{} \vspace*{\fill} \begin{center} \emph{This page intentionally left blank.} \end{center} \vspace{\fill} \thispagestyle{empty} \newpage\fi\fi \if@tempswa\twocolumn\fi} \makeatother \usepackage{titlesec} \usepackage{xcolor} \titleformat{\part}[display]{\centering\sffamily\huge\bfseries\color{red}}{\partname\ \thepart}{20pt}{\Huge} \begin{document} Text \part{Text} Text \end{document}

  • Best base class for developing class to match existing MS word template
    by James Tocknell on May 10, 2026 at 6:09 am

    I have an existing MQ word template (.dotx) that I would like to translate to a LaTeX class. It is not an especially complex template: a standard header and footer which could be reproduced using fancyhdr and minipage (though the first page footer is different to the rest of the pages), an inline (i.e. not full page) title with custom style, a document revision table and table of contents, and follows similar rules to the article class (though with some extra metadata, no abstract and section (not subsection) headers are coloured). I could start with the article class and add extra packages on top, but I'm wondering is there a better base class which might save me some time/effort and be more maintainable? I'm aware of both the koma-script and memoir classes: I'm not familiar with koma-script (and I can't read German, though this is for an AU-based organisation, so might benefit from choices there), and memoir seems to be designed for much larger documents than this?

  • Getting file icon in forest directory structure [duplicate]
    by Zilore Mumba on May 9, 2026 at 10:13 pm

    I am trying to draw a directory structure using the forest package and an adaptation of Gonzalo Medina's solution here Making a (simple) directory tree. My adaptation works, but I would .xlsx, .pl .pdf and .sh structures to appear as files icons. So far I am getting every thing as folders. Is this possible? Please help. My code below. %https://tex.stackexchange.com/questions/5073/making-a-simple-directory-tree \documentclass[]{article} \usepackage[edges]{forest} \usepackage{array} \usepackage[usegeometry]{typearea}% load before geometry %\usepackage[a4paper,width=150mm,vmargin=21mm,bindingoffset=12mm]{geometry} \usepackage[left=2.5cm,top=2.5cm,bottom=2.5cm,right=2.5cm]{geometry} \definecolor{folderbg}{RGB}{124,166,198} \definecolor{folderborder}{RGB}{110,144,169} \newlength\Size \setlength\Size{4pt} \tikzset{% folder/.pic={% \filldraw [draw=folderborder, top color=folderbg!50, bottom color=folderbg] (-1.05*\Size,0.2\Size+5pt) rectangle ++(.75*\Size,-0.2\Size-5pt); \filldraw [draw=folderborder, top color=folderbg!50, bottom color=folderbg] (-1.15*\Size,-\Size) rectangle (1.45*\Size,\Size); }, file/.pic={% \filldraw [draw=folderborder, top color=folderbg!5, bottom color=folderbg!10] (-\Size,.4*\Size+5pt) coordinate (a) |- (\Size,-1.4*\Size) coordinate (b) -- ++(0,1.8*\Size) coordinate (c) -- ++(-5pt,5pt) coordinate (d) -- cycle (d) |- (c) ; }, } \forestset{% declare autowrapped toks={pic me}{}, pic dir tree/.style={% for tree={% folder, font=\itshape, grow'=0, }, before typesetting nodes={% for tree={% edge label+/.option={pic me}, }, }, }, pic me set/.code n args=2{% \forestset{% #1/.style={% inner xsep=2\Size, pic me={pic {#2}}, } } }, pic me set={directory}{folder}, pic me set={file}{file}, } \newcommand{\fname}[2]{\begin{tabular}{m{3.25cm}@{\quad}m{15cm}}#1 & \normalfont#2\end{tabular}} \begin{document} \begin{forest} pic dir tree, where level=0{}{% folder icons by default; override using file for file icons directory, }, [\textbf{\underline{DA}} [\textbf{AWSdata\_Proc} [\fname{\textbf{Data}}{Raw AWS Data Contained in Date Files} ] [\fname{\textbf{Docs}}{Folder Containing Documentation} [\fname{AWS\_stations\_for\_WRF.xlsx}{} ] [\fname{AWSdata\_proc.pdf}{This document} ] ] [\fname{\textbf{Output}}{Contains Output of 01\_readawshrly.pl, Reformatted AWS Data} [\fname{kolbere.csv}{One Station, Output of 01\_readawshrly.pl} ] [\fname{....}{} ] ] [\fname{\textbf{Scripts}}{Folder Containing Scripts for Processing \& Uploading Data to MySql Database} [\fname{00\_get\_aws.sh}{Gets Data From AWS Server and Runs 01\_readawshrly.pl} ] [\fname{01\_readawshrly.pl}{Reformats the AWS Data \& Written into Output Folder} ] ] ] ] \end{forest} \end{document}

  • Conditionally show per-author annotations in biblatex note field using \ifIDequal
    by lukascbossert on May 9, 2026 at 9:16 pm

    I maintain a publication list where the same .bib file is reused for multiple PIs. Each entry carries short annotations that should appear only for the PI whose list is being printed. The conditional \ifIDequal lives in the note field of the .bib itself. Defining \ifIDequal as \protected causes a runaway-argument error: Runaway argument? {\ifIDequal {schneider}{First and second author contributed equally \ETC. ! File ended while scanning use of \field. The additional requirements are: The annotation must stay in the .bib file (shared infrastructure). The note field must print after addendum. Equal-contribution asterisks appear on author names via author+an. Here is my MWE \begin{filecontents}[overwrite]{mwe.bib} @String{equal = {\textit{*equal contribution}}} @String{sharedlast = {\textit{*shared last authorship}}} @article{schneider2020a, author = {Schneider, Kai Markus and Elfers, Carsten and Trautwein, Christian}, author+an = {1=equal;2=equal}, date = 2020, title = {Intestinal Dysbiosis Amplifies Acetaminophen-Induced Acute Liver Injury}, journal = {Cellular and Molecular Gastroenterology and Hepatology}, volume = 11, number = 4, pages = {909--933}, doi = {10.1016/j.jcmgh.2020.11.002}, addendum = equal, note = {\ifIDequal{schneider}{First and second author contributed equally; we conducted the metabolomic analysis together.}% \ifIDequal{pabst}{Schneider et al. demonstrated key dysbiosis mechanisms relevant to the gut-liver axis.}}, } @article{simons2025clonal, author = {Simons, Bastian and Pabst, Oliver}, date = 2025, title = {Clonal persistence dominates homeostatic intestinal IgA responses}, journal = {Immunity}, volume = 58, pages = {3061--3074.e5}, doi = {10.1016/j.immuni.2025.11.005}, note = {\ifIDequal{pabst}{This study combined single-cell sequencing, in vivo cell tracking and new bioinformatics tools to demonstrate antibody specificity maintenance.}}, } \end{filecontents} \documentclass{article} \usepackage[english]{babel} \usepackage{xcolor,marginalia} \usepackage[ backend=biber, style=ext-numeric-comp, sorting=none, ]{biblatex} \addbibresource{mwe.bib} \ExplSyntaxOn \tl_new:N \g_dfg_current_pi_tl \NewDocumentCommand \SetCurrentPI { m } { \tl_gset:Nn \g_dfg_current_pi_tl {#1} } \NewExpandableDocumentCommand \ifIDequal { m m } { \str_if_eq:eeTF {#1} { \tl_use:N \g_dfg_current_pi_tl } {#2} {} } \DeclareFieldFormat{note} { \tl_if_blank:nF {#1} { \par \itshape #1 } } \ExplSyntaxOff \AtEveryBibitem{% \iffieldundef{note}{}{\printfield{note}}% } % ============================================================ % Equal-contribution / shared-last-authorship markers % ============================================================ \newcommand{\addendumasterisk}{\ifbibliography{*}{}} \renewcommand*{\mkbibnamefamily}[1]{% \ifitemannotation{equal} {#1\addendumasterisk} {\ifitemannotation{sharedLast}{#1\addendumasterisk}{#1}}% } % ============================================================ % Document % ============================================================ \begin{document} \section*{Pabst's publications} \SetCurrentPI{pabst} \nocite{*} \printbibliography[heading=none] \section*{Schneider's publications} \SetCurrentPI{schneider} \printbibliography[heading=none] \end{document} Edit I was able to get it partially how I would like to have it: \begin{filecontents}[overwrite]{mwe.bib} @String{equal = {\textit{*equal contribution}}} @String{sharedlast = {\textit{*shared last authorship}}} @article{schneider2020a, author = {Schneider, Kai Markus and Elfers, Carsten and Trautwein, Christian}, author+an = {1=equal;2=equal}, date = 2020, title = {Intestinal Dysbiosis Amplifies Acetaminophen-Induced Acute Liver Injury}, journal = {Cellular and Molecular Gastroenterology and Hepatology}, volume = 11, number = 4, pages = {909--933}, doi = {10.1016/j.jcmgh.2020.11.002}, addendum = equal, note = {\ifIDequal{schneider}{First and second author contributed equally; we conducted the metabolomic analysis together.}\ifIDequal{pabst}{Schneider et al. demonstrated key dysbiosis mechanisms relevant to the gut-liver axis.}}, } @article{simons2025clonal, author = {Simons, Bastian and Pabst, Oliver}, date = 2025, title = {Clonal persistence dominates homeostatic intestinal IgA responses}, journal = {Immunity}, volume = 58, pages = {3061--3074.e5}, doi = {10.1016/j.immuni.2025.11.005}, note = {\ifIDequal{pabst}{This study combined single-cell sequencing, in vivo cell tracking and new bioinformatics tools to demonstrate antibody specificity maintenance.}}, } \end{filecontents} \documentclass{article} \usepackage[english]{babel} \usepackage{xcolor} \usepackage[ backend=biber, style=ext-numeric-comp, sorting=none, ]{biblatex} \addbibresource{mwe.bib} % ============================================================ % Per-PI conditional % ============================================================ \ExplSyntaxOn \tl_new:N \g_dfg_current_pi_tl \NewDocumentCommand \SetCurrentPI { m } { \tl_gset:Nn \g_dfg_current_pi_tl {#1} } \makeatletter \newcommand{\ifIDequal}[2]{% \begingroup \edef\@tempa{\detokenize{#1}}% \edef\@tempb{\detokenize\expandafter{\g_dfg_current_pi_tl}}% \ifx\@tempa\@tempb \endgroup #2% \else \endgroup \fi } \makeatother \ExplSyntaxOff % ============================================================ % Print note at the very end of every entry, via \finentry % ============================================================ \DeclareFieldFormat{note}{\par\color{red}\itshape #1} \DeclareSourcemap{ \maps[datatype=bibtex]{ \map[overwrite=false]{ \step[fieldsource=note] \step[fieldset=addendum, origfieldval, final] \step[fieldset=note, null] } } } % ============================================================ % Equal-contribution / shared-last-authorship markers % ============================================================ \newcommand{\addendumasterisk}{\ifbibliography{*}{}} \renewcommand*{\mkbibnamefamily}[1]{% \ifitemannotation{equal} {#1\addendumasterisk} {\ifitemannotation{sharedLast}{#1\addendumasterisk}{#1}}% } \begin{document} \section*{Pabst's publications} \SetCurrentPI{pabst} \nocite{*} \printbibliography[heading=none] \section*{Schneider's publications} \SetCurrentPI{schneider} \printbibliography[heading=none] \end{document} The problem now is, that note is shown partly as defined in the note-field declaration, but (like the marked part) also not. And the order is still not right. note should be the very last part of a bibliography entry.

  • Overriding the column number for enumext inline list items
    by Teepeemm on May 9, 2026 at 2:34 pm

    The enumext package allows inline lists with a set number of columns that can be overridden, like this: \documentclass{article} \usepackage{enumext} \begin{document} \begin{enumext*}[columns=2] \item Short \item Short \item Short \item Short \item(2) A longer item that takes both columns to show \item Short \item Short \item Short \item Short \end{enumext*} \end{document} This works well if most items need the short column, and there's an occasional longer item. I have the opposite setup: most of my items are longer, but there's an occasional pair of short items. I could do this with: \documentclass{article} \usepackage{enumext} \begin{document} \begin{enumext*}[columns=2] \item(2) A longer item that takes both columns to show \item(2) A longer item that takes both columns to show \item Short \item Short \item(2) A longer item that takes both columns to show \item(2) A longer item that takes both columns to show \end{enumext*} \end{document} But writing (2) every time is annoying. Is there a way to say that (2) is the default, and then specify (1) for the short items? Something like: \documentclass{article} \usepackage{enumext} \begin{document} \begin{enumext*}[columns=2,item-columns=2] % Package enumext Error: The key 'item-columns=2' is unknown by environment 'enumext*' and is being ignored. \item A longer item that takes both columns to show \item A longer item that takes both columns to show \item(1) Short \item(1) Short \item A longer item that takes both columns to show \item A longer item that takes both columns to show \end{enumext*} \end{document} I've tried \NewCommandCopy\olditem\item \RenewDocumentCommand\item{D(2)}{\olditem(#1)} Within the {enumext*} environment this causes an error ("! Missing number, treated as zero." and then a fatal error). Outside the environment this causes the next item to display as "()2).[]", but with less spacing. (Note that this document needs to be tagged, so using the enumitem or enumerate packages is not an option.)

  • How to make the `\hrule` in custom math symbol rounded?
    by Explorer on May 9, 2026 at 1:05 pm

    Learning from the classical egreg's solution for example here and here, I try to construct the custom symbols: with the following code: \documentclass{article} \usepackage{amsmath} \makeatletter \newcommand{\myge}{\mathrel{\mathpalette\myrel@{\@firstoftwo}}} \newcommand{\myle}{\mathrel{\mathpalette\myrel@{\@secondoftwo}}} \newcommand{\myrel@}[2]{% \begingroup \setbox\z@=\hbox{$\m@th#1=$}% \vcenter to \dimexpr.75\ht\z@\relax{% #2{% \hrule width \dimexpr2\wd\z@\relax \vfill \hrule width \wd\z@ }{% \hrule width \wd\z@ \vfill \hrule width \dimexpr2\wd\z@\relax }% }% \endgroup } \makeatother \begin{document} \[ a \myge b \quad a \myle b \] \[ \displaystyle a \myge b \quad \textstyle a \myge b \quad {}_{\scriptstyle a \myge b} \quad {}_{\scriptscriptstyle a \myge b} \] \[ \displaystyle a \myle b \quad \textstyle a \myle b \quad {}_{\scriptstyle a \myle b} \quad {}_{\scriptscriptstyle a \myle b} \] \end{document} but which gives: I want to know that, based on my code, any suggestions to change the rule from butt to rounded? I don't think with tikz is a good choice... here...

  • Lua based solution for tracking equivalent to fontspec LetterSpace Opentype feature
    by David Purton on May 9, 2026 at 10:41 am

    I've been using the OpenType LetterSpace font feature to adjust tracking. It does what I want, but has the side effect of creating a new font instance, which is annoying when babel is in use as the newly created instance is not known to babel. I'd like a drop in alternative implemented in Lua that behaves the same. But it's beyond my skill and understanding. Requirements: No change in the word spacing (like fontspec). Like for like behaviour when same number is supplied as I was using with LetterSpace (I already spent time tuning things to this number). Group safe. Switch-like behaviour (like \bfseries). Optional compatibility with the microtype package if loaded. I probably don't care specifically what happens if you try and use both tracking methods at the same time – one or the other in use is sufficient. But other microtype features need to still work (like protrusion, etc.). Here's a MWE that shows the current behaviour I have with the LetterSpace option. If possible, I'd like the numbers and output to match. %! TeX Program = lualatex \documentclass{article} \pagestyle{empty} \usepackage{fontspec} \setmainfont{Noto Serif} \newlength{\testlen} \newcommand{\settracking}[1]{% \addfontfeatures{LetterSpace=#1}} \begin{document} \begin{tabbing} \settowidth{\global\testlen}{Test Test} Test Test \= width: \the\testlen \\ \settracking{-5}\settowidth{\global\testlen}{Test Test} Test Test \> width: \the\testlen \\ \settowidth{\global\testlen}{Test Test} Test Test \> width: \the\testlen \\ \end{tabbing} \end{document}

  • negating math symbols
    by Antonis on May 9, 2026 at 10:36 am

    I have been asked to introduced negated mathrel symbols in NewCM that do not exist in Unicode standard. Before I get into adding extra symbols in NewCMMath I would like to make sure that a macro does not suffice. I tested with the \not command or relative packages like centernot without good results. Then there is \ooalign. For example, \documentclass{article} \usepackage[olddefault]{fontsetup} \makeatletter \newcommand{\ndisin}{\mathrel{\mathpalette\overlay@slash\disin}} \newcommand{\overlay@slash}[2]{% \ooalign{$\m@th#1#2$\cr\hss$\m@th#1/$\hss}% } \makeatother \begin{document} $y\ndisin A_{y\ndisin A_{y\ndisin A}}$ \end{document} Produces This shows that exactly centering the two symbols is not always good. The slash should be better placed a bit to the right (centered with respect to \in). So the question is if it is possible to make such adjustments on the above or other code to get the desired result, or one has to go to the font level and design new characters.

  • Paragraph numbering breaks after description environment
    by Daniel Zuluaga on May 9, 2026 at 10:14 am

    I cannot figure out, why this paragraph numbering breaks after the description environment and would value any insight into the problem! \documentclass{article} \usepackage{lipsum} % For dummy text \usepackage{etoolbox} % For \preto % Paragraph numbering setup \normalmarginpar \setlength{\marginparwidth}{0.7cm} \setlength{\marginparsep}{0.5em} \newcounter{parnum} \newif\ifnumberparagraphs \numberparagraphstrue \newcommand*{\numberedparagraph}{% \ifnumberparagraphs \leavevmode\refstepcounter{parnum}% \label{par:\thesection.\arabic{parnum}}% \marginpar{\raggedleft\scriptsize\thesection.\arabic{parnum}}% \fi } \makeatletter % Reset counter at each section \preto\section{\setcounter{parnum}{0}} % Auto-number paragraphs \renewcommand{\@afterheading}{% \@nobreaktrue \everypar{% \if@nobreak \@nobreakfalse \clubpenalty\@M \if@afterindent \else {\setbox\z@\lastbox}\fi \else \clubpenalty\@clubpenalty \fi \numberedparagraph }% } \makeatother \setlength{\parindent}{2em} \setlength{\parskip}{0.5\baselineskip} \begin{document} \section{Testing Paragraph Numbering After Description} \subsection{Before the description environment} This is the first paragraph. It should be numbered 1.1.1. This is the second paragraph. It should be numbered 1.1.2. This is the third paragraph. It should be numbered 1.1.3. \subsection{Now with a description environment} Here's a paragraph right before the description. It should be numbered 1.2.1. \begin{description} \item[First Term] This is the description for the first term. No paragraph numbers should appear inside the description environment. \item[Second Term] This is the description for the second term. These lines are part of the description and should not have numbers. \item[Third Term] This description spans multiple lines. Still no paragraph numbers here. \end{description} This is the first paragraph AFTER the description environment. With our fix, it should be numbered 1.2.2. This is the second paragraph after the description. It should be numbered 1.2.3. This is the third paragraph after the description. It should be numbered 1.2.4. \subsection{Multiple description environments in a row} Paragraph before second description. Should be numbered 1.3.1. \begin{description} \item[Test A] Description A \item[Test B] Description B \end{description} First paragraph after second description. Should be numbered 1.3.2. Second paragraph after second description. Should be numbered 1.3.3. \begin{description} \item[Example 1] Example description 1 \item[Example 2] Example description 2 \end{description} First paragraph after third description. Should be numbered 1.3.4. \subsection{Nested environments} Paragraph before nested environment. Should be numbered 1.4.1. \begin{description} \item[Outer Term] \begin{description} \item[Inner Term] Inner description \end{description} This is still part of the outer description. \end{description} First paragraph after nested description. Should be numbered 1.4.2. Second paragraph after nested description. Should be numbered 1.4.3. \section{Second Section} \subsection{New section, new numbering} Paragraph in new section. Should be numbered 2.1.1. \begin{description} \item[Something] Some description \end{description} Paragraph after description in new section. Should be numbered 2.1.2. This is another paragraph. Should be numbered 2.1.3. \subsection{Testing with longer text} \lipsum[1][1-2] \begin{description} \item[Key Point] This is an important description that might span multiple lines. \item[Another Point] Yet another description. \end{description} \lipsum[2][1-3] \lipsum[3][1-2] \section{Conclusion} The fix works correctly if you see consecutive paragraph numbers (1.5.1, 1.5.2, 1.5.3, etc.) both before and after all description environments, with no gaps or missing numbers. \end{document}

  • HyperSnips extension triggers \dots when typing a period in LaTeX, interfering with normal punctuation in VSCode
    by user199927 on May 9, 2026 at 4:42 am

    I am using VS Code with the LaTeX Workshop extension on Windows 11. Recently, I installed HyperSnips and encountered an annoying issue: whenever I type a period (.), it automatically triggers a suggestion for \dots. This is particularly frustrating when ending a sentence and starting a new line. I've tried several workarounds, but none have worked. The issue disappears when I uninstall HyperSnips, but returns as soon as I reinstall it. I’ve searched through my latex.hsnips file but couldn't find any snippet matching this behavior. I even tried deleting the file entirely, but the issue persists. How can I disable this specific behavior? Has anyone else encountered this issue? Thank you! Here is the screenshot:

  • tablenotes, spacing of superscript before right bracket
    by N. Hunt on May 9, 2026 at 4:36 am

    I am having problems with superscripts in tablenotes, specifically, when the superscript comes before a right parenthesis, they are correct, but before a right bracket, extra space is being inserted. I initially was just using the plain tnote, but that behaviour was even worse; I discovered a workaround with 'xspace' and this works apart from what I have just described. This lualatex, by the way. \documentclass[a4paper,14pt]{extarticle} \usepackage[a4paper,left=0.75in,top=0.25in,bottom=0.25in,landscape]{geometry} \usepackage{fontspec} \usepackage[main=greek]{babel} \babelprovide[onchar=ids]{american} \setmainfont[Ligatures=TeX]{Gentium} \usepackage{booktabs} \usepackage{array} \usepackage[flushleft]{threeparttable} \usepackage{xspace} \setlength{\tabcolsep}{10pt} \setlength{\parindent}{0pt} \begin{document} \thispagestyle{empty} \renewcommand{\arraystretch}{1.25} \newcommand{\tss}[1]{\textsuperscript{#1}\xspace} \begin{threeparttable} \begin{tabular}{l !{\kern20pt} l} \multicolumn{2}{c}{\textsc{First Declension}}\\ \multicolumn{1}{c}{\textsc{Masc.}} & \multicolumn{1}{c}{\textsc{Fem.}} \\ xxx, xxxx & xxx, xxx, x \\ xxx, [xxx\tss{9}] & xxx, xxxx \\ x, x & x, x \\ xxx, xxxx\phantom{, xxx} & xxx, (xxx\tss{10}), xxxx \\ xxx, xxx\tss{11}, x & [xxx\tss{12}], xxx, x \\ \multicolumn{2}{c}{x} \\ \multicolumn{2}{c}{xxx} \\ \multicolumn{2}{c}{xxx} \\ \multicolumn{2}{c}{xxx, [xxxx\tss{13}]} \\ \multicolumn{2}{c}{xxx, [xxx, xxxx, xxxx, xxx, xxxx]} \\ \multicolumn{2}{c}{xxxx} \\ \end{tabular} \begin{tablenotes} \small \item [9] Some proper names in Lesser Quux. \item [10] Some proper names in Plat., Xen., Thuc., etc. \item [11] Aristophanes and Plutarch. \item [12] Often in the poets and inscrr.; sometimes in Plato. \item [13] Foobar. \end{tablenotes} \end{threeparttable} \end{document}

  • How to use idiosyncratic fonts in current TeX
    by F. Bartlett on May 8, 2026 at 5:17 pm

    I have been using TeX since 1986 and Type 1 fonts since the early 90s, courtesy of Berthold Horn. Moreover, I created my own fontnames and mappings for T1 fonts and, therefore, tfm files. I should also mention that I have a long-standing allergy to LaTeX and its derivatives, and so work only in plain TeX. But now I have somehow modernized my TeX installation due to a disastrous update to Fedora 44, so none of my non-CM Type 1 fonts work at all. When I attempt to use, say, AGaramond-Regular, I get mktexnam errors (yes, all my font files have Adobe PostScript names): kpathsea: Running mktextfm AGaramond-Regular /usr/share/texlive/texmf-dist/web2c/mktexnam: Could not map source abbreviation A for AGaramond-Regular. /usr/share/texlive/texmf-dist/web2c/mktexnam: Need to update /usr/share/texlive/texmf-dist/fonts/map/fontname/special.map? mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; ; nonstopmode; input AGaramond-Regular This is METAFONT, Version 2.71828182 (TeX Live 2023) (preloaded base=mf) Of course, METAFONT fails in short order. Any suggestions? My preference would be to ignore all the font-handling changes made in the last few years, but I suspect that that’s a lost cause. Thanks! Fred

  • How can I list or visualize all available anchors of a CircuitTikZ component?
    by internet on May 8, 2026 at 9:31 am

    I am using CircuitTikZ and often need to connect wires or labels to component anchors. However, it is not always easy to know which anchors are available for a specific component. For example, different components may provide anchors such as north, south, in, out, gate, collector, emitter, etc., and the available anchors vary depending on the component type. When building more complicated schematics, I frequently need to stop and search through the documentation to check anchor names. I was wondering whether there is a way to programmatically: List all available anchors of a given CircuitTikZ/TikZ shape/components, and/or Visualize those anchors directly on the rendered component. For example, something conceptually like: \showanchors{a component/shape} that would either print all anchor names and draw markers/labels on the component itself. So my question is: Is there a practical way to list all anchors associated with a TikZ/CircuitTikZ shape? My motivation is mainly usability and workflow efficiency. A tool like this would make it much easier to explore unfamiliar components and reduce the need to constantly check the manual, especially for beginners or occasional CircuitTikZ users. This is an example of visualizing the anchors to help wiring from CircuiTikz documentation. A possible MWE (clearly, the pin thing must be adjusted somehow to have a better distribution, and to take into account that labels can have spaces and strange characters, but well...). The task it to substitute the \allanchors definition with something automatic, see the comment above it. \documentclass[border=10pt]{standalone} \usepackage[T1]{fontenc} \usepackage[siunitx, RPvoltages]{circuitikz} \begin{document} \begin{tikzpicture}[every pin/.append style={text=red, inner sep=1pt, font=\tiny\ttfamily}] \node [npn](myshape) at (0,0) {}; % Example: this should be autofilled % Basically, for every shape named, say, "gizmo", the anchor "spot" % is a macro named pgf@anchor@gizmo@spot % --- so to do what you want, you should be able to find all % the macros with that pattern that exist % (and I do not know if this is possible in TeX in general, % maybe in LuaTeX...). \newcommand{\allanchors}{center,E,B,south} \foreach \anc in \allanchors { \node[circ, pin=45:\anc] at (myshape.\anc) {}; } \end{tikzpicture} \end{document}

  • How to specify the empty column width in the align* environment?
    by M. Logic on May 8, 2026 at 7:14 am

    First an MWE is as follows. \documentclass{article} \usepackage{amsmath} \usepackage{amsthm} \begin{document} \begin{proof} \begin{align*}{2} x&=y&\quad&\text{test test}\\ &=z&&\text{test.}\qedhere \end{align*} \end{proof} \end{document} As you see, to make the texts be aligned left, I add an empty column in the align* environment. But the width of the empty column is too big, so is there any way to specify it? By the way, I have to use align* or align to make the square be aligned to right in the final line in proofs. Summary Combining @cfr 's solution and the solution here, the problem is solved.

  • How to get a line segment to line up nicely with a fill in TikZ?
    by Jasper on May 7, 2026 at 11:19 pm

    I have this MWE (it must be zoomed in on): I want the red line to go all the way to the green one on the top, but not exceed the dark gray on the bottom. Likewise, the green should be bounded by, and extruded to the boundary also. (The green one goes beyone on top, but we just can't see it due to the ligh gray triangle occluding it). I would like for this to be as automatic as possible. I want it to look like this: This is my use case: \documentclass[tikz,border=1cm]{standalone} \begin{document} \begin{tikzpicture} \fill[gray] (0,0) -- (1,1) -- (1,0) -- cycle; \draw[thick,green] (0.75,0.25) -- (0.25,0.25); \fill[gray!50!white] (0,0) -- (1,1) -- (0,1) -- cycle; \draw[thick,red] (0.1,0.25) -- (0.25,0.25); \end{tikzpicture} \end{document}

  • Class memoir Warning: \addtodef is marked deprecated and will be removed in 2026, but \addtodef is not being used anywhere
    by marshmelou on May 7, 2026 at 10:20 am

    I am using the memoir class to write my thesis, and I found that this warning regarding \addtodef being deprecated is triggered whenever I load the natbib package. Below is a MWE: \documentclass{memoir} \usepackage{natbib} \begin{document} Hello \end{document} If I comment out \usepackage{natbib}, the warning goes away. Does anyone know the reason for that? Is this safe to ignore? I'm just worried that I'll carry on using this and then at some point in 2026 \addtodef will be removed and for some reason that will mess up my document. Just to clarify, I am using natbib over biblatex because I am already used to it and I found biblatex to be a nightmare to format it the way I would like it to be. For completion, the full warning message is: Class memoir Warning: \addtodef is marked deprecated and will be removed in 2026, use instead \patchcmd, \pretocmd or \apptocmd from the etoolbox package (which is autoloaded by the class) on input line 5.

  • Why is there no spacing around the plus sign?
    by John Sullivan on May 7, 2026 at 10:02 am

    Why is there nice spacing around the + inside the parentheses, but not around the one just after the parentheses? \documentclass{article} \begin{document} $$-\tau N = B'=-\theta'\bigl(\cos\theta\, U + \sin\theta\, V\bigl) + 0 T = -\theta' N$$ \end{document}

  • LuaLaTeX not embedding fonts
    by UniCoder1966 on May 6, 2026 at 2:31 pm

    When I open the pdf of my MWE in Adobe Acrobat and try to sign the signature field, I get the error 2013 which warns me that my fonts are not embedded. To be more precise, it's the Helvetica font that's not embedded. I thought that compiling with LuaLaTeX would make all my fonts embedded, but that's not the case. I assume that Helvetica is used by the \textfieldnew command, despite f.textFont = 'ArialMT'. \documentclass[ a4paper, fontsize=10pt headsepline=0.4pt ]{scrartcl} \usepackage[english, main=ngerman, shorthands=off]{babel} \usepackage{fontspec} \setmainfont{Arial} \setsansfont{Arial} \usepackage{eforms} \begin{document} \newcommand{\textfield}[5]{ \edef\Titel{#2} \TextField[name=#1, width=#3, charsize=10pt, height=1em, format = { var f = this.getField('#1'); f.textFont = 'ArialMT';}, #4]{}#5 } \newcommand{\textfieldnew}[5]{% \edef\Titel{#2}% \TextField[name=#1, width=#3, charsize=10pt, height=1em, format = { var f = this.getField('#1'); f.textFont = 'ArialMT';}, #4]{}% #5% } \textfieldnew{Test}{}{7.5cm}{default={Test}, onblur={this.getField('TestEN').value = event.value;}}{} \sigField{Signatur1}{7.5cm}{1.2cm} \end{document} Is there any way to embed the fonts in LaTeX or change the font of the textfields? Doing it in Adobe Acrobat is no option for me.

  • How to show (python) code chunk in ltx-talk?
    by Polly Nomial on May 5, 2026 at 1:36 am

    I am trying to include some blocks of code in a ltx-talk slide. The code below uses listings as an example that works for me if I use Beamer, but now I get the errors shown below. How can I show some python code in ltx-talk? (If a solution using listings is not possible, I would be fine even with something like a verbatim block.) \DocumentMetadata{lang = en, tagging = on} \documentclass{ltx-talk} \usepackage{listings} \begin{document} \begin{frame}{Important talking point} \begin{lstlisting}[language=python] print('Help, World!') \end{lstlisting} \end{frame} \end{document} pdflatex run 1...error Errors: mwe.tex:13: Extra }, or forgotten \endgroup mwe.tex:13: LaTeX Error: \begin{lstlisting} on input line 13 ended by \end{frame} mwe.tex:13: Missing } inserted mwe.tex:13: Paragraph ended before \lst@next was complete mwe.tex:15: LaTeX Error: \begin{frame} on input line 7 ended by \end{document} mwe.tex:15: You can't use `\end' in internal vertical mode

  • Column alignment in a table
    by N. Hunt on May 3, 2026 at 11:16 pm

    From the following tex, \documentclass[a4paper,14pt]{extarticle} \usepackage[a4paper,left=0.75in,top=0.25in,bottom=0.25in,landscape]{geometry} \usepackage{fontspec} \usepackage{polyglossia} \setmainfont[Ligatures=TeX]{Gentium} \usepackage[Latin,Greek]{ucharclasses} \usepackage{multicol} \usepackage{booktabs} \usepackage{multirow} \setromanfont{Gentium-Regular} \setmainlanguage{greek} \setotherlanguage{english} \setlength{\tabcolsep}{10pt} \setlength{\parindent}{0pt} \begin{document} \thispagestyle{empty} \begin{table}[!ht] \renewcommand{\arraystretch}{1.25} \begin{tabular}{l c l} \multicolumn{3}{c}{\textsc{First Declension}}\\ \multicolumn{1}{c}{\textsc{Masc.}} & & \multicolumn{1}{c}{\textsc{Fem.}} \\ xxx, xxxx & & xxx, xxx, x \\ xxx, [xxx] & & xxx, xxxx \\ x, x & & x, x \\ xxx, xxxx & & xxx, xxx, xxxx \\ xxx, xxx, x & & xxx, xxx, x \\ \multicolumn{3}{c}{x} \\ \multicolumn{3}{c}{xxx} \\ \multicolumn{3}{c}{xxx} \\ \multicolumn{3}{c}{xxx, [xxxx]} \\ \multicolumn{3}{c}{xxx, [xxx, xxxx, xxxx, xxx, xxxx]} \\ \multicolumn{3}{c}{xxxx} \\ \end{tabular} \end{table} \end{document} I get this output: I would like to know how to get the right-hand column, specifically, the top 5 rows of the right-hand column, moved to the right, to give a better appearance of the bottom 6 rows being centered.