Hot
- Can I add a symbol to indicate that a footnote has been split across pages?by Draconis on January 23, 2026 at 9:05 pm
My university's thesis formatting guidelines are extremely stringent about margins, which means when a footnote gets split across pages (because the \footnotemark is on the bottom line of the page, so including the entire footnote would push the mark onto the next page), there's not much I can do to fix it. I can't, for example, expand the text box slightly, or insert some additional whitespace at the bottom. Proofreaders have found this confusing. So with the better typographical solutions being off-limits, I would like to at least indicate to the reader that the footnote continues on the next page. Is it possible to indicate some sort of symbol, such as a rightward-pointing arrow, at the point where a footnote has been split across pages, to indicate that it's continued elsewhere? I know some periodicals do this when an article is split across pages. MWE adapted from here: \documentclass[oneside]{book} \usepackage{lipsum} \usepackage[splitrule]{footmisc} \begin{document} \lipsum[1-3] \lipsum[1] New paragraph, which is really long, so long in fact that it spans more than one line. New paragraph, which is really long, so long in fact that it spans more than one line. \footnote{Here's a really long footnote that will probably be longer than one line, which could help to show the problematic behaviour. Here's a really long footnote that will probably be longer than one line, which could help to show the problematic behaviour. Here's a really long footnote that will probably be longer than one line, which could help to show the problematic behaviour. Here's a really long footnote that will probably be longer than one line, which could help to show the problematic behaviour.} % \lipsum \end{document} Current result: What I would like: some kind of symbol (perhaps a ➤?) at the end of the first page, showing that the footnote continues elsewhere and isn't just broken off. \usepackage[splitrule]{footmisc} indicates on the next page that there's a continuation, but I would like a marker on the first page as well. This question, this question, and this question ask the same thing, but none of them includes a MWE; I'm hoping that providing one will help find an answer.
- Include parts of single file document still presenving counters like \incudeonlyby Miguel V. S. Frasson on January 23, 2026 at 8:51 pm
I have a large book (750 pages) in a single file. One single file has advantages, like search/replace the entire TeX file without need of fancy multifile search features. But multiple files have the advantage of \includeonly feature: preserve counters (which preserves typesetting), faster compilation of fewer pages when fine-tunning. I wonder if there is a implementation of such \includeonly-like feature in single file documents, so I could (for instance) compile one chapter per time, preserving counters. Any thoughts? Edit: Another solution could be a set of macros that saves and restores the state of counters, like \includeonly does. If this is not implemented, maybe I could do it, but I prefer a ready-to-use solution, if any. M"W"E: if I omit or change argument of \includeonlyParts, I would get feature like \includeonly. \documentclass{report} \usepackage[T1]{fontenc} \providecommand{\savecounters}{} \providecommand{\restorecounters}{} \providecommand{\breakdoc}[1]{} \providecommand{\includeonlyParts}[1]{} \includeonlyParts{breakpoint-2} \begin{document} \breakdoc{breakpoint-1} \chapter{First} text \breakdoc{breakpoint-2} \chapter{Second} \breakdoc{breakpoint-3} \chapter{Third chapter} \end{document}
- How to position TikZ shapes directly centered under text labels in a table-like layout?by Oregon Math Tutor on January 23, 2026 at 7:13 pm
I'm creating a geometry reference sheet with a table-like layout using TikZ. I need: the shape label horizontally centered in the cell each figure centered beneath the label As the image shows, I can't achieve this alignment. This image shows my desired output: This image (partial screen shot) shows what the current code renders: Current approach: Using \node for labels positioned with anchor=east Drawing shapes inside \begin{scope}[shift={...}] blocks Each row has a label on the left, shape in the middle-left, and properties on the right Thanks very much for taking time to assist me! mwe: \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{tikz} \usepackage{amssymb} \usetikzlibrary{calc, shapes.geometric, arrows.meta, decorations.markings} % Use Helvetica (similar to Arial) for a clean look since custom fonts caused errors \usepackage{helvet} \renewcommand{\familydefault}{\sfdefault} % Define colors to match the original image \definecolor{colSquare}{RGB}{156, 188, 156} % Muted Green \definecolor{colRect}{RGB}{128, 128, 128} % Greyish \definecolor{colPara}{RGB}{255, 105, 120} % Pink/Red \definecolor{colRhom}{RGB}{190, 140, 190} % Purple \definecolor{colKite}{RGB}{180, 230, 200} % Mint Green \definecolor{colTrap}{RGB}{245, 170, 60} % Orange \definecolor{colText}{RGB}{128, 0, 128} % Purple text for headers \definecolor{colLine}{RGB}{70, 130, 180} % Blue grid lines \begin{document} \begin{tikzpicture}[ thick, % Style for shape outlines myshape/.style={draw=black, line width=1pt}, % Custom tick marks for sides tick/.style={postaction={decorate, decoration={markings, mark=at position 0.5 with {\draw[black, line width=1pt] (-2.5pt,-2.5pt) -- (2.5pt,2.5pt);}}}}, dtick/.style={postaction={decorate, decoration={markings, mark=at position 0.5 with {\draw[black, line width=1pt] (-1.5pt,-2.5pt) -- (2.5pt,2.5pt) (-4.5pt,-2.5pt) -- (-0.5pt,2.5pt);}}}}, % Custom arrows for parallel lines parrow/.style={postaction={decorate, decoration={markings, mark=at position 0.55 with {\arrow[scale=1.5,black]{>}}}}} ] % --- Grid Layout --- % Horizontal lines \draw[colLine] (-4, 1.5) -- (12, 1.5); \draw[colLine] (-4, 0) -- (12, 0); \draw[colLine] (-4, -4) -- (12, -4); \draw[colLine] (-4, -8) -- (12, -8); \draw[colLine] (-4, -12) -- (12, -12); \draw[colLine] (-4, -16) -- (12, -16); \draw[colLine] (-4, -20) -- (12, -20); \draw[colLine] (-4, -24) -- (12, -24); % Vertical separator \draw[colLine] (3.5, 1.5) -- (3.5, -24); % Headers \node[text=colText, scale=2] at (-0.25, 0.75) {Shape}; \node[text=colText, scale=2] at (7.75, 0.75) {Properties}; % --- Row 1: Square --- \begin{scope}[shift={(0,-2)}] \node[text=colText, scale=1.5, anchor=east] at (2,0) {Square}; \coordinate (S1) at (2.5, -1.2); \coordinate (S2) at (4.9, -1.2); \coordinate (S3) at (4.9, 1.2); \coordinate (S4) at (2.5, 1.2); \fill[colSquare] (S1) -- (S2) -- (S3) -- (S4) -- cycle; % Ticks drawn manually to ensure rotation alignment looks just like the image \draw[myshape] (S1) -- (S2) node[midway, sloped] {\tikz \draw[line width=1pt] (-2.5pt,-2.5pt)--(2.5pt,2.5pt);}; \draw[myshape] (S2) -- (S3) node[midway, sloped] {\tikz \draw[line width=1pt] (-2.5pt,-2.5pt)--(2.5pt,2.5pt);}; \draw[myshape] (S3) -- (S4) node[midway, sloped] {\tikz \draw[line width=1pt] (-2.5pt,-2.5pt)--(2.5pt,2.5pt);}; \draw[myshape] (S4) -- (S1) node[midway, sloped] {\tikz \draw[line width=1pt] (-2.5pt,-2.5pt)--(2.5pt,2.5pt);}; \draw (S1) -- (S3); \draw (S2) -- (S4); % Right angle at center \draw (3.7,0) ++(0.2,0.2) -- ++(-0.2,0.2) -- ++(-0.2,-0.2); % Corner right angles \draw (S1) ++(0.3,0) -- ++(0,0.3) -- ++(-0.3,0); \draw (S2) ++(-0.3,0) -- ++(0,0.3) -- ++(0.3,0); \draw (S3) ++(-0.3,0) -- ++(0,-0.3) -- ++(0.3,0); \draw (S4) ++(0.3,0) -- ++(0,-0.3) -- ++(-0.3,0); \node[anchor=west, align=left] at (4.2, 0) { \begin{minipage}{8cm} \begin{itemize} \setlength\itemsep{0.2em} \item All sides are equal. \item All angles are $90^\circ$. \item Diagonals are equal. \item Diagonals bisect at $90^\circ$. \end{itemize} \end{minipage} }; \end{scope} % --- Row 2: Rectangle --- \begin{scope}[shift={(0,-6)}] \node[text=colText, scale=1.5, anchor=east] at (2,0) {Rectangle}; \coordinate (R1) at (2.5, -0.9); \coordinate (R2) at (5.0, -0.9); \coordinate (R3) at (5.0, 0.9); \coordinate (R4) at (2.5, 0.9); \fill[colRect] (R1) -- (R2) -- (R3) -- (R4) -- cycle; % Sides ticks \draw[myshape] (R1) -- (R2) node[midway] {\tikz \draw[line width=1pt] (-1.5pt,-2.5pt)--(2.5pt,2.5pt) (-4.5pt,-2.5pt)--(-0.5pt,2.5pt);}; \draw[myshape] (R2) -- (R3) node[midway] {\tikz \draw[line width=1pt] (-2.5pt,-2.5pt)--(2.5pt,2.5pt);}; \draw[myshape] (R3) -- (R4) node[midway] {\tikz \draw[line width=1pt] (-1.5pt,-2.5pt)--(2.5pt,2.5pt) (-4.5pt,-2.5pt)--(-0.5pt,2.5pt);}; \draw[myshape] (R4) -- (R1) node[midway] {\tikz \draw[line width=1pt] (-2.5pt,-2.5pt)--(2.5pt,2.5pt);}; \draw (R1) -- (R3); \draw (R2) -- (R4); % Corners \draw (R1) ++(0.2,0) -- ++(0,0.2) -- ++(-0.2,0); \draw (R2) ++(-0.2,0) -- ++(0,0.2) -- ++(0.2,0); \draw (R3) ++(-0.2,0) -- ++(0,-0.2) -- ++(0.2,0); \draw (R4) ++(0.2,0) -- ++(0,-0.2) -- ++(-0.2,0); % Diagonal marks (triple tick) % Manually drawing triple ticks on diagonals \draw[line width=0.8pt] (3.2, 0.1) -- ++(0.1,0.2); \draw[line width=0.8pt] (3.3, 0.1) -- ++(0.1,0.2); \draw[line width=0.8pt] (3.4, 0.1) -- ++(0.1,0.2); \draw[line width=0.8pt] (4.1, 0.1) -- ++(0.1,0.2); \draw[line width=0.8pt] (4.2, 0.1) -- ++(0.1,0.2); \draw[line width=0.8pt] (4.3, 0.1) -- ++(0.1,0.2); \draw[line width=0.8pt] (3.2, -0.1) -- ++(0.1,-0.2); \draw[line width=0.8pt] (3.3, -0.1) -- ++(0.1,-0.2); \draw[line width=0.8pt] (3.4, -0.1) -- ++(0.1,-0.2); \draw[line width=0.8pt] (4.1, -0.1) -- ++(0.1,-0.2); \draw[line width=0.8pt] (4.2, -0.1) -- ++(0.1,-0.2); \draw[line width=0.8pt] (4.3, -0.1) -- ++(0.1,-0.2); \node[anchor=west, align=left] at (4.2, 0) { \begin{minipage}{8cm} \begin{itemize} \setlength\itemsep{0.2em} \item Opposite sides are equal. \item All angles are $90^\circ$. \item Diagonals are equal. \item Diagonals bisect each other. \end{itemize} \end{minipage} }; \end{scope} \end{tikzpicture} \end{document}
- Images confuse with 3D asymptoteby user386618 on January 23, 2026 at 6:23 pm
I'm trying to add a 2d image into a 3d graph using this Inserting graphics into asymptote or pgfplots but when i do this it creates 2 separate images one at the center and one at the coordinates (in 2 plane haven't work out yet) did anyone know how to do this. label(graphics(), triple) gets insane so i used regular points instead and setting settings.inlineimage=false; don't help at all if(!settings.multipleView) settings.batchView=false; settings.tex="pdflatex"; defaultfilename="draft-1"; if(settings.render < 0) settings.render=0; settings.outformat=""; settings.inlineimage=false; settings.embed=true; settings.toolbar=false; viewportmargin=(2,2); import graph3; size(6cm); defaultpen(1.5bp); currentprojection=perspective(8,6,3); currentlight=nolight; triple[][] V={{(0,0,0), (1,0,0), (1,1,0), (0,1,0)}, {(0,0,2), (1,0,2), (1,1,2), (0,1,2)}}; label(graphic("ladybug.png","width=1cm"), project((1.1,0,0))); draw(V[0][0]--V[1][0], gray); draw(V[0][0]--V[0][1], gray); draw(V[0][0]--V[0][3], gray); draw(V[0][1]--V[1][1]--V[1][2]--V[0][2]--cycle); draw(V[0][2]--V[1][2]--V[1][3]--V[0][3]--cycle); draw(V[1][0]--V[1][1]--V[1][2]--V[1][3]--cycle); label("$10cm$", V[0][1]--V[0][2]); label("$10cm$", V[0][2]--V[0][3]); label("$20cm$", V[0][3]--V[1][3]); dot(V[0][1], blue); dot(V[1][3], blue);
- Horizontal spacing smaller than \, (math mode) [duplicate]by Luis Mendo on January 23, 2026 at 5:27 pm
I like to use something like \,mathrm d t for the differential in an integral. That is, upright d for the differential symbl, with a bit of spacing before it, and then the variable t: However, the final t is too close to the d (I think they end up that close partly because the "d" is roman and the "t" is italic. Also, I'm using mathptmx in this example, but the question is in general). If I include \, between them, they become too separated: How can I easily get a fraction of the \, spacing in math mode? Ideally, for consistence, without manually specifying units like millimeters. For instance, something like \,[.4] (?) meaning "40% of the spacing provided by \,".
- dotfill and justificationby Phillip Helbig on January 23, 2026 at 3:59 pm
I have something like \parbox[b]{0.924\textwidth}{ SPACE\dotfill\quad\\bar\quad\SPACE } I want the space on the left to be a fixed amount of physical space so that the beginning of the dotfill lines up with that of another parbox which has \hangafter=1 and \hangindent=1em. However, I want the space at the right to be variable such that the expansion of \bar is flushright in the box. The problem is that \dotfill chooses one dot too few rather than one too many (which is good) if the expansion of \bar is not flushright. I can fool around with inserting space manually but that’s finicky.
- circuitikz: 'muxdemux' with exact same dimensions as an 'european resistor (inductor)'by cis on January 23, 2026 at 3:01 pm
Just out of interesst, I asked myself how to configure a muxdemux such that it has the exact same dimensions as an european resistor (european inductor), but with three muxdemux-pins on the underside. (Note: The exact target image is attached.) Here is my approach: \documentclass[border=5pt]{standalone} \usepackage{circuitikz} \begin{document} \begin{circuitikz}[european resistors, IPP/.style={muxdemux, muxdemux def={Lh=0.8, Rh=0.8, NL=1, NR=1, NB=3, NT=0, w=2}, %muxdemux label={B2=abc, BL1=1, BL2=2, BL3=3,}, %external pins width=0.4, circuitikz/muxdemuxes/fill=gray!25, }, ] \node [IPP, align=center](A) at (0,0) {}; \draw[] (-1,0.5) to[R, fill=gray!25] +(2,0); \end{circuitikz} \end{document}
- Raise integral signs with limitsby Knudsen on January 23, 2026 at 2:14 pm
Is there a way to raise an integral sign slightly and bring the limits together with it? For example, in \documentclass{report} \begin{document} \[ \int_0^1 \sqrt{a+b\sqrt{a+b\sqrt{a+b\sqrt{x}}}} dx \] \end{document} the integral can benefit from being enlarged and moved up a small bit, even if it going to take it out of alignment with part of the formula.
- Output not generated TeXLive 2025 [closed]by GowriSaro on January 23, 2026 at 2:14 pm
I got the below error in TeXLive 2025: ! Undefined control sequence. \@makecol ...vbox \@kludgeins \@makespecialcolbox \else \setbox \@outputbox ... But the same file works well in TeXLive 2024 The .tex file was huge, so couldn't able to post. Please advise
- Textfield onblur not workingby UniCoder1966 on January 23, 2026 at 1:26 pm
I'm new to LaTeX and creating a PDF document with textfields that are supposed to match. When I enter text in one field, it's supposed to appear in the other one. This works just fine for the first two textfields in the code, but not the last two ones. Why? MWE: \documentclass[ngerman, a4paper, fontsize=10pt headsepline=0.4pt]{scrartcl} \usepackage{insdljs} \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 } \begin{document} \textfield{verantwName}{}{7.5cm}{default=Vor- und Nachname, onblur={this.getField("verantwNameEN").value = event.value;}}{}\newline \textfield{verantwNameEN}{}{7.5cm}{default=Given and last name, onblur={this.getField("verantwName").value = event.value;}}{} \textfield{untName}{}{7.5cm}{default=Vor- und Nachname, onblur={this.getField("untNameEN").value = event.value;}}{}\newline \textfield{untNameEN}{}{7.5cm}{default=Given and last name, onblur={this.getField("untName").value = event.value;}}{} \end{document}
- tikz feynman W loop with Z radiationby Beth Long on January 23, 2026 at 12:55 pm
I want to make the following diagram: But this: \documentclass[a4paper,12pt]{article} \usepackage[compat=1.1.0]{tikz-feynman} \usepackage{xcolor} \definecolor{uctgreen}{rgb}{0,0.45,0} \newcommand\uct[0]{{\color{uctgreen}{u}\color{red}{c}\color{blue}{t}}} \tikzfeynmanset{ every diagram={very thick}, } \begin{document} \resizebox{5cm}{5cm}{ \begin{tikzpicture}[yscale=0.7, xscale=1.4] \begin{feynman} % ~~~ defining the vertices ~~~~~~ \vertex (i1) ; \vertex[below right=of i1] (v1); \vertex[ right=of v1] (v2); \vertex[above right=of v2] (o1); % ~~~ Z-related ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \vertex at ($(v1)!.5!(v2) - (0,15mm)$) (v3); % middle, below \vertex[below=1cm of v3] (v4); % <<< Z "length" % ~~~ lower part ~~~~~~~~~~~~~~ \vertex[below left = 2cm of v4] (i2); % one way to modify \vertex[below right= 2cm of v4] (o2); % ~~~ drawing this diagram ~~~~~~~~~~~~~~~~~~~~~ \diagram*{ {[edges={fermion}](i1) --[edge label=s] (v1) --[edge label=\uct] (v2) --[edge label=d] (o1)}, (v1) --[photon, half right, edge label'=W] (v2), (v3) --[photon, edge label'=Z] (v4), {[edges={fermion}](i2) --[edge label'=$\nu$] (v4) --[edge label'=$\nu$] (o2)}, }; \end{feynman} \end{tikzpicture} } \end{document} produces this: How can I add labels to both sides of the W and make the W-Z vertex match up?
- longtable breaks page headers (marks) when using titleps – headers stop updating after subsectionsby Mikael Gonzalez on January 23, 2026 at 12:13 pm
I am experiencing a persistent issue with page headers when using longtable. Section and subsection titles normally appear correctly in the header, but as soon as a longtable is introduced, the header stops updating. All subsequent pages keep showing the previous header, even after new \subsection commands. This does not happen with figures or normal tables, only with longtable. Reordering content confirms the issue: if figures come before the longtable, headers are correct; if they come after, headers are broken. I understand that longtable interferes with marks, but I have not found a robust solution that works in practice. Note that this behavior appears only when longtable spills onto mutliple pages. \documentclass{article} \usepackage{geometry} \usepackage{fancyhdr} \usepackage{longtable} \usepackage{booktabs} \pagestyle{fancy} \fancyhf{} \fancyhead[L]{\small\scshape\rightmark} \fancyfoot[C]{\thepage} \renewcommand{\sectionmark}[1]{% \markright{\thesection\quad #1} } \renewcommand{\subsectionmark}[1]{% \markright{\thesubsection\quad #1} } \makeatletter \patchcmd{\LT@array}{\@mkboth{}{}}{}{}{} \makeatother \begin{document} \section{Test section} \subsection{First subsection} Some text. \newpage \subsection{Subsection before longtable} Some text. \newpage \subsection{Longtable here, header never shows up} \begin{longtable}{ll} \toprule A & B\\ \midrule \endfirsthead \toprule A & B\\ \midrule \endhead 1 & 2\\ 3 & 4\\ 5 & 6\\ 1 & 2\\ 3 & 4\\ 5 & 6\\1 & 2\\ 3 & 4\\ 5 & 6\\1 & 2\\ 3 & 4\\ 5 & 6\\1 & 2\\ 3 & 4\\ 5 & 6\\1 & 2\\ 3 & 4\\ 5 & 6\\1 & 2\\ 3 & 4\\ 5 & 6\\1 & 2\\ 3 & 4\\ 5 & 6\\1 & 2\\ 3 & 4\\ 5 & 6\\1 & 2\\ 3 & 4\\ 5 & 6\\1 & 2\\ 3 & 4\\ 5 & 6\\1 & 2\\ 3 & 4\\ 5 & 6\\1 & 2\\ 3 & 4\\ 5 & 6\\1 & 2\\ 3 & 4\\ 5 & 6\\1 & 2\\ 3 & 4\\ 5 & 6\\1 & 2\\ \bottomrule \end{longtable} \newpage \subsection{Header must update} This header updates. \end{document} With resulting issue: I have tried using with no success: % Page style \newpagestyle{main}{ \setheadrule{.55pt} \sethead{\small\scshape\rightmark}{}{} \setfoot{}{\thepage}{} } % Subsection marks \renewcommand{\subsectionmark}[1]{% \markright{\thesubsection\quad #1} } \usepackage{etoolbox} \renewcommand{\subsectionmark}[1]{% \markright{\thesubsection\quad #1}% } \makeatletter \patchcmd{\LT@array}{\@mkboth{}{}}{}{}{} \makeatother Expected behavior: The page header should update to the current subsection title after a longtable, exactly as it does after figures or standard tables. Question: Is there a robust and recommended way to use longtable without breaking page headers? Or is this a fundamental limitation of longtable and marks?
- How to fill between decoratedpath to draw a rope in physics? I don't want those gray areas to be seenby Anastasios on January 23, 2026 at 9:36 am
\documentclass[12pt,a4paper,twoside]{report} \usepackage[english,greek]{babel} \usepackage[iso-8859-7]{inputenc} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsxtra} \usepackage{mathtools} \usepackage{fix-cm} \usepackage{graphicx} \usepackage{braket} \usepackage{tikz} \usepackage{framed} \usepackage{mdframed} \usepackage{pgffor} \usepackage{xcolor} \usetikzlibrary{plotmarks} \usepackage{pgfplots} \usetikzlibrary{arrows,shapes,positioning} \colorlet{shadecolor}{gray!20} \usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,matrix} \usetikzlibrary{decorations.pathmorphing,patterns} \usetikzlibrary{calc,patterns,decorations.markings} \usetikzlibrary{positioning} \usepackage{tikz,tikz-3dplot} \usetikzlibrary{fadings} \usetikzlibrary{shapes.geometric} \usepackage[left=1cm, right=1.2cm, top=2.5cm, bottom=1.5cm, includefoot, headheight=14.5pt]{geometry} \begin{document} \begin{center}{\begin{tikzpicture} \tikzstyle{platform}=[fill,pattern=north east lines,draw=none,minimum width=4cm,minimum height=0.3cm] \shade[ball color=gray!20] (0,0) circle (1.5); \draw[thick,double](0,0) circle (1.5); \draw[decorate,decoration={markings, mark=between positions 1mm and \pgfdecoratedpathlength-1.5mm step 1.5mm with {\draw[thick,black,fill=white] (-2.5mm,-0.5mm) to[out=0,in=160] (-1.5mm,-0.5mm) to[out=-20,in=160] (1.5mm,0.5mm) to[out=-20,in=180] (2.5mm,0.5mm); }}] (0,0.75) -- (4,0.75); \draw[thick,double](0,0) circle (0.75); \node[circle,draw,black,scale=0.3,fill=white] (b) at (3.8,0.75) {}; \node at (3.8,1){A}; \shade[ball color=white] (0,0) circle (0.71); \draw[thick,white,-stealth'](0,0)--(1.05,-1.05)node[pos=0.8,above]{${\ R}$}; \draw[thick,-stealth'](0,0)--(-0.63,-0.33)node[pos=0.3,below]{${ r}$}; \node [platform,anchor=south] at (0,-1.85) {}; \draw[thick,-](-2,-1.55)--(2,-1.55); \node[circle,draw,black,scale=0.2,fill=white] (b) at (0,0) {}; \end{tikzpicture} }\end{center} \end{document}
- Is it possible simplify this lualatex code?by xcn on January 23, 2026 at 8:39 am
The following code is used to retrieve and round a variable defined via \directlua. Is it possible to remove the luaround function and replace {\IfValueTF{#1} {luaround(#2, #1)} {#2}} with something like {\IfValueTF{#1} {("%." .. #1 .. "f"):format(#2)} {#2}}? \documentclass[12pt]{article} \usepackage{luacode} \begin{luacode*} function luaround(x, n) return string.format('%.' .. n .. 'f', x ) end \end{luacode*} \NewExpandableDocumentCommand{\usevar}{om}{% \directlua{tex.sprint(% {\IfValueTF{#1} {luaround(#2, #1)} {#2} } % IfValueTF )} } \begin{document} \directlua{ x=0.345 y=2 } \usevar[2]{x} \end{document}
- Having trouble getting \starttextbackground to do anythingby Gary on January 23, 2026 at 5:02 am
I'm trying to get a frame that spans a page break. According to the description of \startframedtext While this is a very powerful way to add decorations to a bit of text, note that framedtexts do not break across pages. See \starttextbackground for a similar environment that will break across pages. Perhaps, I'm not understanding what goes in the [name] part of the command, but I cannot get it to do anything. Would you please point me to what I'm failing to do? Thank you. The \framed and \startframedtext both respond in the example below, but the following two attempts of \starttextbackground do not. https://wiki.contextgarden.net/Command/setuptextbackground \starttext \framed[ frame=on, rulethickness=3pt, align=left] { Hello } \startframedtext[left][ frame=on, rulethickness=3pt, ] Hello \par Hello \stopframedtext % While this is a very powerful way to add decorations to a bit of text, % note that framedtexts do not break across pages. See \starttextbackground % for a similar environment that will break across pages. \starttextbackground[BG][ state=start, location=text, background=color, backgroundcolor=blue, frame=on, rulethickness=3pt, ] Hello \par Hello \stoptextbackground \setuptextbackground[BG][ state=start, location=text, background=color, backgroundcolor=blue, frame=on, rulethickness=3pt, ] \starttextbackground[BG] Hello \par Hello \stoptextbackground \stoptext
- Making messy notes with LaTeXby Edward Doolittle on January 23, 2026 at 2:57 am
There is a lot of information on how to make beautiful documents with LaTeX. However, I am thinking about setting up a note taking workflow and I purposely want to make things look messy. I suppose what I want to signal is that rough notes look messy, and that as I develop ideas into papers, as the narrative and reasoning get stronger and better, I can improve the aesthetics, so that beautiful content looks beautiful and rough content looks rough. What sort of settings do you all recommend for messy LaTeX output? I'm thinking bad line breaks, bad page breaks, ragged margins, poor or perhaps just thoughtless placement of floats, different fonts/colours for different environments (and even random switches in font/colour, within certain parameters ... the notes should still be readable, of course). I would like to mimic a "messy aesthetic" for note taking, which is easy enough to do with pen and paper. Marginal notes rotated. I'm sure there are hundreds of possibilities. It might be an interesting project to think of a spectrum, most messy look for most messy thinking, through some mid-range mess for improved thinking, eventually to most beautiful for most well-thought out and correct thinking. I plan to use Emacs org-mode or org-roam (which is already well on its way in the mess category 🙂 ) with export to LaTeX and then to PDF. But I also use pure LaTeX regularly.
- Is it possible to style (via command options) a specific line in an itemized list?by Gary on January 23, 2026 at 2:40 am
I'm trying to use the before option of \setupitemize but do not know how to determine the variable to test against. How can I determine what #1: \fi #2: \strc_itemgroups_tag_start_group translate to that can be used in the \doifelsevalue? Or is there a better method? So far, all I can do is change the color of all or none of the items. Thank you. % \define[2]\MyCmd{% % \type{##1: #1} % \type{##2: #2} % } % Result is: #1: \fi #2: \strc_itemgroups_tag_start_group \startTEXpage \setupitemize [1] % level of itemization [packed] [margin=no, distance=2em, stopper=, left={Step }, right={:}, leftmargin=18mm, before=\doifelsevalue{structurenumber}{5}{\setupcolors[textcolor=darkred]}{}, %MyCmd ] \startitemize[n] \startitem Title of first item step \stopitem \startitem Title of second item step \stopitem \startitem Title of third item step \stopitem \startitem Title of fourth item step \stopitem \startitem Title of fifth item step \stopitem \startitem Title of sixth item step \stopitem \startitem Title of seventh item step \stopitem \stopitemize \stopTEXpage
- Converting a LaTeX package to MathJax [closed]by karlh on January 23, 2026 at 1:11 am
I know that MathJax is a not-entirely-faithful subset of TeX, and that converting packages from LaTeX to MathJax is non-trivial and involves JavaScript. The MathJax documentation does exist, but it is difficult to parse for someone not immersed in it (which is common). It is also not obvious what one needs to do to implement a particular TeX macro so it works in MathJax. Can anyone recommend a "walk-through," example, or good description of how to translate a LaTeX package into a MathJax extension?
- Shuffle the puzzle pieces in TikZ interactive puzzle game (based on this TeX.SX project)by fsbmat on January 23, 2026 at 12:59 am
I’ve been working on a variation of the interactive puzzle from this excellent post on TeX StackExchange: 🔗 The TikZ Game Package – a TeX.SX Project ❓Goal I'd like to shuffle the pieces of the puzzle at the start (instead of them being in order) and still keep the interactive movement functionality working (i.e. clicking tiles to move them like a sliding puzzle). ✅ What I have working The puzzle layout builds correctly using TikZ, ocgx2, and media9. I implemented a manual shuffle using a LaTeX macro (\ShuffleIndex) to define the tile order. The initial view of the puzzle shows the image shuffled correctly. ❌ What is broken The JavaScript interaction no longer works after applying the shuffle. Clicking on the tiles gives an error: ReferenceError: onButtonClick is not defined It seems the function is not visible globally or the OCGs are not properly indexed. 💡 What I'm asking Would anyone be able to: Help fix the JavaScript so it works with the shuffled layout? Or alternatively — provide a working example based on the original post, but with the puzzle pieces already shuffled at start? 📎 What I’ve tried Here’s my current version (almost working, but with JS errors): \documentclass[tikz,margin=1mm]{standalone} \usepackage{xsavebox} \usepackage[tikz]{ocgx2} \usepackage{media9} \usepackage{multido} \usepackage{xcolor}\pagecolor{gray} \usepackage{multido} \usepackage{ifluatex} \ifluatex\def\pdfpageattr{\pdfvariable pageattr}\fi \usepackage{tikzmarmots} % imagem base \begin{xlrbox}{Image} \begin{tikzpicture} \useasboundingbox (0,0) rectangle (4.4,4.4); \node at (2.2,2.2) {\tikz\marmot[scale=2.1];}; \end{tikzpicture} \end{xlrbox} % peças do puzzle \multido{\nX=0+1.1,\iI=0+1}{4}{% \multido{\nY=3.3+-1.1,\iJ=0+1}{4}{% \ifnum\numexpr\iI+\iJ\relax>0 \begin{xlrbox}{Image.\the\numexpr\iI+\iJ*4\relax} \begin{tikzpicture} \clip (\nX,\nY) rectangle ++(1.1,1.1); \node[anchor=south west,inner sep=0pt] at (0,0) {\theImage}; \end{tikzpicture} \end{xlrbox} \fi } } \newcommand\MyStatus[2]{\ifnum#1=#2 visible\else invisible\fi} % JavaScript \pdfpageattr{ /AA << /O << /S/JavaScript /JS ( var tile=[], oldTile=[]; for(var i=0;i<4;i++){ tile[i]=[]; oldTile[i]=[]; for(var j=0;j<4;j++){ tile[i][j]=[]; oldTile[i][j]=i+j*4-1; } } var ocg=this.getOCGs(this.pageNum); for(var k in ocg){ var n=ocg[k].name.split('.'); tile[n[0]][n[1]][n[2]-1]=ocg[k]; } var si=0,sj=0; function onButtonClick(i,j){ if(si==i && sj!=j){ for(var y=sj;y!=j;sj<j?y++:y--){ if(y!=sj) tile[i][y][oldTile[i][y]].state=false; oldTile[i][y]=oldTile[i][sj<j?y+1:y-1]; tile[i][y][oldTile[i][y]].state=true; } } else if(sj==j && si!=i){ for(var x=si;x!=i;si<i?x++:x--){ if(x!=si) tile[x][j][oldTile[x][j]].state=false; oldTile[x][j]=oldTile[si<i?x+1:x-1][j]; tile[x][j][oldTile[x][j]].state=true; } } if(si==i||sj==j){ if(oldTile[i][j]>-1) tile[i][j][oldTile[i][j]].state=false; oldTile[i][j]=-1; si=i; sj=j; } } ) >> >> } \def\ShuffleIndex#1{% \csname ShuffleValue#1\endcsname% } \expandafter\def\csname ShuffleValue0\endcsname{5} \expandafter\def\csname ShuffleValue1\endcsname{12} \expandafter\def\csname ShuffleValue2\endcsname{3} \expandafter\def\csname ShuffleValue3\endcsname{14} \expandafter\def\csname ShuffleValue4\endcsname{1} \expandafter\def\csname ShuffleValue5\endcsname{6} \expandafter\def\csname ShuffleValue6\endcsname{11} \expandafter\def\csname ShuffleValue7\endcsname{9} \expandafter\def\csname ShuffleValue8\endcsname{8} \expandafter\def\csname ShuffleValue9\endcsname{2} \expandafter\def\csname ShuffleValue10\endcsname{7} \expandafter\def\csname ShuffleValue11\endcsname{10} \expandafter\def\csname ShuffleValue12\endcsname{15} \expandafter\def\csname ShuffleValue13\endcsname{4} \expandafter\def\csname ShuffleValue14\endcsname{13} \expandafter\def\csname ShuffleValue15\endcsname{0} \begin{document} \newcount\shufcount \shufcount=0 \begin{tikzpicture} \multido{\nX=0+1.1,\iI=0+1}{4}{% \multido{\nY=3.3+-1.1,\iJ=0+1}{4}{% \edef\CellIndex{\the\numexpr\iI+\iJ*4\relax}% \edef\RandIndex{\ShuffleIndex{\CellIndex}}% \multido{\iK=1+1}{15}{% \begin{scope}[ocg={ref=\iI.\iJ.\iK,% status=\MyStatus{\ShuffleIndex{\the\numexpr\iI+\iJ*4\relax}}{\iK}}]% \node[anchor=south west,inner sep=0pt]% at (\nX,\nY) {\xusebox{Image.\iK}};% \end{scope}% }% \draw[line width=0,% postaction={% path picture={% \node[anchor=south west,inner sep=0pt]% at (path picture bounding box.south west)% {\mediabutton[jsaction={onButtonClick(\iI,\iJ);}]{% \tikz \useasboundingbox% (path picture bounding box.south west)% rectangle% (path picture bounding box.north east);}};% }% }]% (\nX,\nY) rectangle ++(1.1,1.1);% }% }% \end{tikzpicture} \end{document} I’d appreciate any tips or corrections. If I’m handling the OCG indexing or JavaScript scope wrong, please let me know how to fix it. Thanks in advance!
- Tex Live updated package, now I get "Extra alignment tab has been changed to \cr." when I try to compile a NiceTabularby Andrew Swift on January 22, 2026 at 8:26 pm
I let Tex Live run package updates, and now my documents won't compile if they contain a NiceTabular. I always get the error "Extra alignment tab has been changed to \cr." I also tried downloading sample code from online examples to see if it was something specific about my document but none of those will compile either. This one that I tried. It works fine on an old computer but not on my updated one. \usepackage{nicematrix} \begin{document} \begin{table}[ht!] \centering \begin{NiceTabular}{c|c|c} Category & Cost & Value \\ Data A & 200 & 200 \\ Data B & 100& 200 \\ Data C & 300 & 100 \\ \end{NiceTabular} \end{table} \end{document} This is the console output: This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode (./test.tex LaTeX2e <2025-11-01> L3 programming layer <2026-01-10> (/usr/local/texlive/2025/texmf-dist/tex/latex/base/article.cls Document Class: article 2025/01/22 v1.4n Standard LaTeX document class (/usr/local/texlive/2025/texmf-dist/tex/latex/base/size10.clo)) (/usr/local/texlive/2025/texmf-dist/tex/latex/nicematrix/nicematrix.sty (/usr/local/texlive/2025/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty (/Users/aswift/Library/texmf/tex/latex/tmeslatex/graphicx.sty (/usr/local/texlive/2025/texmf-dist/tex/latex/graphics/keyval.sty) (/usr/local/texlive/2025/texmf-dist/tex/latex/graphics/graphics.sty (/usr/local/texlive/2025/texmf-dist/tex/latex/graphics/trig.sty) (/usr/local/texlive/2025/texmf-dist/tex/latex/graphics-cfg/graphics.cfg) (/usr/local/texlive/2025/texmf-dist/tex/latex/graphics-def/pdftex.def))) (/usr/local/texlive/2025/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty (/usr/local/texlive/2025/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.te x) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def ) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/pgf.revision.tex))) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/utilities/pgfkeyslibraryfil tered.code.tex)) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.d ef (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-p df.def))) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath. code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol. code.tex)) (/usr/local/texlive/2025/texmf-dist/tex/latex/xcolor/xcolor.sty (/usr/local/texlive/2025/texmf-dist/tex/latex/graphics-cfg/color.cfg) (/usr/local/texlive/2025/texmf-dist/tex/latex/graphics/mathcolor.ltx)) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex ) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code. tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic .code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigo nometric.code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.rando m.code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.compa rison.code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base. code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round .code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc. code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integ erarithmetics.code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex) ) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfint.code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.co de.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconst ruct.code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage .code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.co de.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicst ate.code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransform ations.code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.cod e.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.c ode.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathproce ssing.code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.co de.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.cod e.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.cod e.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal. code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.co de.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretranspare ncy.code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns. code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorerdf.code. tex))) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.cod e.tex) (/usr/local/texlive/2025/texmf-dist/tex/latex/amsmath/amsmath.sty For additional information on amsmath, use the `?' option. (/usr/local/texlive/2025/texmf-dist/tex/latex/amsmath/amstext.sty (/usr/local/texlive/2025/texmf-dist/tex/latex/amsmath/amsgen.sty)) (/Users/aswift/Library/texmf/tex/latex/tmeslatex/amsbsy.sty) (/usr/local/texlive/2025/texmf-dist/tex/latex/amsmath/amsopn.sty)) (/Users/aswift/Library/texmf/tex/latex/tools/array.sty)) (/usr/local/texlive/2025/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def) (./test.aux) (/usr/local/texlive/./test.tex:18: Extra alignment tab has been changed to \cr. <template> \endtemplate l.18 \end{NiceTabular} ? 2025/texmf-dist/tex/context/base/mkii/supp-pdf.mkii [Loading MPS to PDF converter (version 2006.09.02).] ) (/usr/local/texlive/2025/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty (/usr/local/texlive/2025/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg)) ./test.tex:18: Extra alignment tab has been changed to \cr. <template> \endtemplate l.18 \end{NiceTabular} ? And this is the log: This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025) (preloaded format=pdflatex 2026.1.21) 22 JAN 2026 15:30 entering extended mode restricted \write18 enabled. file:line:error style messages enabled. %&-line parsing enabled. **test.tex (./test.tex LaTeX2e <2025-11-01> L3 programming layer <2026-01-10> (/usr/local/texlive/2025/texmf-dist/tex/latex/base/article.cls Document Class: article 2025/01/22 v1.4n Standard LaTeX document class (/usr/local/texlive/2025/texmf-dist/tex/latex/base/size10.clo File: size10.clo 2025/01/22 v1.4n Standard LaTeX file (size option) ) \c@part=\count275 \c@section=\count276 \c@subsection=\count277 \c@subsubsection=\count278 \c@paragraph=\count279 \c@subparagraph=\count280 \c@figure=\count281 \c@table=\count282 \abovecaptionskip=\skip49 \belowcaptionskip=\skip50 \bibindent=\dimen148 ) (/usr/local/texlive/2025/texmf-dist/tex/latex/nicematrix/nicematrix.sty (/usr/local/texlive/2025/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty (/Users/aswift/Library/texmf/tex/latex/tmeslatex/graphicx.sty Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR) (/usr/local/texlive/2025/texmf-dist/tex/latex/graphics/keyval.sty Package: keyval 2022/05/29 v1.15 key=value parser (DPC) \KV@toks@=\toks17 ) (/usr/local/texlive/2025/texmf-dist/tex/latex/graphics/graphics.sty Package: graphics 2024/08/06 v1.4g Standard LaTeX Graphics (DPC,SPQR) (/usr/local/texlive/2025/texmf-dist/tex/latex/graphics/trig.sty Package: trig 2023/12/02 v1.11 sin cos tan (DPC) ) (/usr/local/texlive/2025/texmf-dist/tex/latex/graphics-cfg/graphics.cfg File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration ) Package graphics Info: Driver file: pdftex.def on input line 106. (/usr/local/texlive/2025/texmf-dist/tex/latex/graphics-def/pdftex.def File: pdftex.def 2025/09/29 v1.2d Graphics/color driver for pdftex )) \Gin@req@height=\dimen149 \Gin@req@width=\dimen150 ) (/usr/local/texlive/2025/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty (/usr/local/texlive/2025/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.te x \pgfutil@everybye=\toks18 \pgfutil@tempdima=\dimen151 \pgfutil@tempdimb=\dimen152 ) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def \pgfutil@abb=\box53 ) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/pgf.revision.tex) Package: pgfrcs 2025-08-29 v3.1.11a (3.1.11a) )) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex Package: pgfsys 2025-08-29 v3.1.11a (3.1.11a) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex \pgfkeys@pathtoks=\toks19 \pgfkeys@temptoks=\toks20 (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/utilities/pgfkeyslibraryfil tered.code.tex \pgfkeys@tmptoks=\toks21 )) \pgf@x=\dimen153 \pgf@y=\dimen154 \pgf@xa=\dimen155 \pgf@ya=\dimen156 \pgf@xb=\dimen157 \pgf@yb=\dimen158 \pgf@xc=\dimen159 \pgf@yc=\dimen160 \pgf@xd=\dimen161 \pgf@yd=\dimen162 \w@pgf@writea=\write3 \r@pgf@reada=\read2 \c@pgf@counta=\count283 \c@pgf@countb=\count284 \c@pgf@countc=\count285 \c@pgf@countd=\count286 \t@pgf@toka=\toks22 \t@pgf@tokb=\toks23 \t@pgf@tokc=\toks24 \pgf@sys@id@count=\count287 (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg File: pgf.cfg 2025-08-29 v3.1.11a (3.1.11a) ) Driver file for pgf: pgfsys-pdftex.def (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.d ef File: pgfsys-pdftex.def 2025-08-29 v3.1.11a (3.1.11a) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-p df.def File: pgfsys-common-pdf.def 2025-08-29 v3.1.11a (3.1.11a) ))) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath. code.tex File: pgfsyssoftpath.code.tex 2025-08-29 v3.1.11a (3.1.11a) \pgfsyssoftpath@smallbuffer@items=\count288 \pgfsyssoftpath@bigbuffer@items=\count289 ) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol. code.tex File: pgfsysprotocol.code.tex 2025-08-29 v3.1.11a (3.1.11a) )) (/usr/local/texlive/2025/texmf-dist/tex/latex/xcolor/xcolor.sty Package: xcolor 2024/09/29 v3.02 LaTeX color extensions (UK) (/usr/local/texlive/2025/texmf-dist/tex/latex/graphics-cfg/color.cfg File: color.cfg 2016/01/02 v1.6 sample color configuration ) Package xcolor Info: Driver file: pdftex.def on input line 274. (/usr/local/texlive/2025/texmf-dist/tex/latex/graphics/mathcolor.ltx) Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1349. Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1353. Package xcolor Info: Model `RGB' extended on input line 1365. Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1367. Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1368. Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1369. Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1370. Package xcolor Info: Model `Gray' substituted by `gray' on input line 1371. Package xcolor Info: Model `wave' substituted by `hsb' on input line 1372. ) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex Package: pgfcore 2025-08-29 v3.1.11a (3.1.11a) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex \pgfmath@dimen=\dimen163 \pgfmath@count=\count290 \pgfmath@box=\box54 \pgfmath@toks=\toks25 \pgfmath@stack@operand=\toks26 \pgfmath@stack@operation=\toks27 ) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code. tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic .code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigo nometric.code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.rando m.code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.compa rison.code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base. code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round .code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc. code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integ erarithmetics.code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex \c@pgfmathroundto@lastzeros=\count291 )) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfint.code.tex) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.co de.tex File: pgfcorepoints.code.tex 2025-08-29 v3.1.11a (3.1.11a) \pgf@picminx=\dimen164 \pgf@picmaxx=\dimen165 \pgf@picminy=\dimen166 \pgf@picmaxy=\dimen167 \pgf@pathminx=\dimen168 \pgf@pathmaxx=\dimen169 \pgf@pathminy=\dimen170 \pgf@pathmaxy=\dimen171 \pgf@xx=\dimen172 \pgf@xy=\dimen173 \pgf@yx=\dimen174 \pgf@yy=\dimen175 \pgf@zx=\dimen176 \pgf@zy=\dimen177 ) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconst ruct.code.tex File: pgfcorepathconstruct.code.tex 2025-08-29 v3.1.11a (3.1.11a) \pgf@path@lastx=\dimen178 \pgf@path@lasty=\dimen179 ) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage .code.tex File: pgfcorepathusage.code.tex 2025-08-29 v3.1.11a (3.1.11a) \pgf@shorten@end@additional=\dimen180 \pgf@shorten@start@additional=\dimen181 ) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.co de.tex File: pgfcorescopes.code.tex 2025-08-29 v3.1.11a (3.1.11a) \pgfpic=\box55 \pgf@hbox=\box56 \pgf@layerbox@main=\box57 \pgf@picture@serial@count=\count292 ) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicst ate.code.tex File: pgfcoregraphicstate.code.tex 2025-08-29 v3.1.11a (3.1.11a) \pgflinewidth=\dimen182 ) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransform ations.code.tex File: pgfcoretransformations.code.tex 2025-08-29 v3.1.11a (3.1.11a) \pgf@pt@x=\dimen183 \pgf@pt@y=\dimen184 \pgf@pt@temp=\dimen185 ) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.cod e.tex File: pgfcorequick.code.tex 2025-08-29 v3.1.11a (3.1.11a) ) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.c ode.tex File: pgfcoreobjects.code.tex 2025-08-29 v3.1.11a (3.1.11a) ) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathproce ssing.code.tex File: pgfcorepathprocessing.code.tex 2025-08-29 v3.1.11a (3.1.11a) ) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.co de.tex File: pgfcorearrows.code.tex 2025-08-29 v3.1.11a (3.1.11a) \pgfarrowsep=\dimen186 ) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.cod e.tex File: pgfcoreshade.code.tex 2025-08-29 v3.1.11a (3.1.11a) \pgf@max=\dimen187 \pgf@sys@shading@range@num=\count293 \pgf@shadingcount=\count294 ) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.cod e.tex File: pgfcoreimage.code.tex 2025-08-29 v3.1.11a (3.1.11a) ) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal. code.tex File: pgfcoreexternal.code.tex 2025-08-29 v3.1.11a (3.1.11a) \pgfexternal@startupbox=\box58 ) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.co de.tex File: pgfcorelayers.code.tex 2025-08-29 v3.1.11a (3.1.11a) ) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretranspare ncy.code.tex File: pgfcoretransparency.code.tex 2025-08-29 v3.1.11a (3.1.11a) ) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns. code.tex File: pgfcorepatterns.code.tex 2025-08-29 v3.1.11a (3.1.11a) ) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorerdf.code. tex File: pgfcorerdf.code.tex 2025-08-29 v3.1.11a (3.1.11a) ))) (/usr/local/texlive/2025/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.cod e.tex File: pgfmoduleshapes.code.tex 2025-08-29 v3.1.11a (3.1.11a) \pgfnodeparttextbox=\box59 ) Package: nicematrix 2026/01/05 v7.5a Enhanced arrays with the help of PGF/TikZ (/usr/local/texlive/2025/texmf-dist/tex/latex/amsmath/amsmath.sty Package: amsmath 2025/07/09 v2.17z AMS math features \@mathmargin=\skip51 For additional information on amsmath, use the `?' option. (/usr/local/texlive/2025/texmf-dist/tex/latex/amsmath/amstext.sty Package: amstext 2024/11/17 v2.01 AMS text (/usr/local/texlive/2025/texmf-dist/tex/latex/amsmath/amsgen.sty File: amsgen.sty 1999/11/30 v2.0 generic functions \@emptytoks=\toks28 \ex@=\dimen188 )) (/Users/aswift/Library/texmf/tex/latex/tmeslatex/amsbsy.sty Package: amsbsy 1999/11/29 v1.2d \pmbraise@=\dimen189 ) (/usr/local/texlive/2025/texmf-dist/tex/latex/amsmath/amsopn.sty Package: amsopn 2022/04/08 v2.04 operator names ) \inf@bad=\count295 LaTeX Info: Redefining \frac on input line 233. \uproot@=\count296 \leftroot@=\count297 LaTeX Info: Redefining \overline on input line 398. LaTeX Info: Redefining \colon on input line 409. \classnum@=\count298 \DOTSCASE@=\count299 LaTeX Info: Redefining \ldots on input line 495. LaTeX Info: Redefining \dots on input line 498. LaTeX Info: Redefining \cdots on input line 619. \Mathstrutbox@=\box60 \strutbox@=\box61 LaTeX Info: Redefining \big on input line 721. LaTeX Info: Redefining \Big on input line 722. LaTeX Info: Redefining \bigg on input line 723. LaTeX Info: Redefining \Bigg on input line 724. \big@size=\dimen190 LaTeX Font Info: Redeclaring font encoding OML on input line 742. LaTeX Font Info: Redeclaring font encoding OMS on input line 743. \macc@depth=\count300 LaTeX Info: Redefining \bmod on input line 904. LaTeX Info: Redefining \pmod on input line 909. LaTeX Info: Redefining \smash on input line 939. LaTeX Info: Redefining \relbar on input line 969. LaTeX Info: Redefining \Relbar on input line 970. \c@MaxMatrixCols=\count301 \dotsspace@=\muskip17 \c@parentequation=\count302 \dspbrk@lvl=\count303 \tag@help=\toks29 \row@=\count304 \column@=\count305 \maxfields@=\count306 \andhelp@=\toks30 \eqnshift@=\dimen191 \alignsep@=\dimen192 \tagshift@=\dimen193 \tagwidth@=\dimen194 \totwidth@=\dimen195 \lineht@=\dimen196 \@envbody=\toks31 \multlinegap=\skip52 \multlinetaggap=\skip53 \mathdisplay@stack=\toks32 LaTeX Info: Redefining \[ on input line 2950. LaTeX Info: Redefining \] on input line 2951. ) (/Users/aswift/Library/texmf/tex/latex/tools/array.sty Package: array 2005/08/23 v2.4b Tabular extension package (FMi) \col@sep=\dimen197 \extrarowheight=\dimen198 \NC@list=\toks33 \extratabsurround=\skip54 \backup@length=\skip55 ) \l__nicematrix_tmpc_dim=\dimen199 \l__nicematrix_tmpd_dim=\dimen256 \l__nicematrix_tmpc_int=\count307 \g__nicematrix_env_int=\count308 \l__nicematrix_the_array_box=\box62 \g__nicematrix_NiceMatrixBlock_int=\count309 \g__nicematrix_notes_caption_int=\count310 \l__nicematrix_columns_width_dim=\dimen257 \l__nicematrix_col_width_dim=\dimen258 \g__nicematrix_row_total_int=\count311 \g__nicematrix_col_total_int=\count312 \g__nicematrix_last_row_node_int=\count313 \l__nicematrix_key_nb_rows_int=\count314 \g__nicematrix_blocks_wd_dim=\dimen259 \g__nicematrix_blocks_ht_dim=\dimen260 \g__nicematrix_blocks_dp_dim=\dimen261 \l__nicematrix_width_dim=\dimen262 \l__nicematrix_tabular_width_dim=\dimen263 \l__nicematrix_rule_width_dim=\dimen264 \l__nicematrix_old_iRow_int=\count315 \l__nicematrix_old_jCol_int=\count316 \l__nicematrix_X_columns_dim=\dimen265 \l__nicematrix_brace_shift_dim=\dimen266 \l__nicematrix_x_initial_dim=\dimen267 \l__nicematrix_y_initial_dim=\dimen268 \l__nicematrix_x_final_dim=\dimen269 \l__nicematrix_y_final_dim=\dimen270 \g__nicematrix_dp_row_zero_dim=\dimen271 \g__nicematrix_ht_row_zero_dim=\dimen272 \g__nicematrix_ht_row_one_dim=\dimen273 \g__nicematrix_dp_ante_last_row_dim=\dimen274 \g__nicematrix_ht_last_row_dim=\dimen275 \g__nicematrix_dp_last_row_dim=\dimen276 \g__nicematrix_width_last_col_dim=\dimen277 \g__nicematrix_width_first_col_dim=\dimen278 \g__nicematrix_ddots_int=\count317 \g__nicematrix_iddots_int=\count318 \g__nicematrix_delta_x_one_dim=\dimen279 \g__nicematrix_delta_y_one_dim=\dimen280 \g__nicematrix_delta_x_two_dim=\dimen281 \g__nicematrix_delta_y_two_dim=\dimen282 \l__nicematrix_row_min_int=\count319 \l__nicematrix_row_max_int=\count320 \l__nicematrix_col_min_int=\count321 \l__nicematrix_col_max_int=\count322 \l__nicematrix_initial_i_int=\count323 \l__nicematrix_initial_j_int=\count324 \l__nicematrix_final_i_int=\count325 \l__nicematrix_final_j_int=\count326 \l__nicematrix_start_int=\count327 \l__nicematrix_end_int=\count328 \l__nicematrix_local_start_int=\count329 \l__nicematrix_local_end_int=\count330 \g__nicematrix_static_num_of_col_int=\count331 \l__nicematrix_rounded_corners_dim=\dimen283 \l__nicematrix_tab_rounded_corners_dim=\dimen284 \l__nicematrix_offset_dim=\dimen285 \l__nicematrix_line_width_dim=\dimen286 \g__nicematrix_block_box_int=\count332 \l__nicematrix_submatrix_extra_height_dim=\dimen287 \l__nicematrix_submatrix_left_xshift_dim=\dimen288 \l__nicematrix_submatrix_right_xshift_dim=\dimen289 \l__nicematrix_first_row_int=\count333 \l__nicematrix_first_col_int=\count334 \l__nicematrix_last_row_int=\count335 \l__nicematrix_last_col_int=\count336 \c@tabularnote=\count337 \g__nicematrix_tabularnote_int=\count338 \c@nicematrix_draft=\count339 \l__nicematrix_cell_space_top_limit_dim=\dimen290 \l__nicematrix_cell_space_bottom_limit_dim=\dimen291 \l__nicematrix_xdots_inter_dim=\dimen292 \l__nicematrix_xdots_shorten_start_dim=\dimen293 \l__nicematrix_xdots_shorten_end_dim=\dimen294 \l__nicematrix_xdots_radius_dim=\dimen295 \l__nicematrix_left_margin_dim=\dimen296 \l__nicematrix_right_margin_dim=\dimen297 \l__nicematrix_extra_left_margin_dim=\dimen298 \l__nicematrix_extra_right_margin_dim=\dimen299 \c__nicematrix_max_l_dim=\dimen300 \l__nicematrix_position_int=\count340 \l__nicematrix_multiplicity_int=\count341 \l__nicematrix_brace_yshift_dim=\dimen301 ) (/usr/local/texlive/2025/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def File: l3backend-pdftex.def 2025-10-09 L3 backend support: PDF o
- Spacing with xlopby Martin on January 22, 2026 at 7:41 pm
When using onehalfspacing from the setspace package, the spacing also applies to the display of calculations from the xlop package. Is it possible to change that so that these calculations are displayed with singlespacing? MWE: \documentclass[a4paper,12pt,ngerman]{article} \usepackage[top=1.5cm]{geometry} \usepackage{setspace} \onehalfspacing \usepackage{xlop} \begin{document} \begin{center} \opdiv[voperator=bottom,voperation=top,displayintermediary=all,decimalsepsymbol={,},shiftdecimalsep=divisor,maxdivstep=2,columnwidth=0.6em,decimalsepwidth=0.3em]{6543}{123} \end{center} \end{document}
- hyperref + algorithm2e + zref-clever = 🐛: referencing an algorithm and a line in it produces the same type name for both 😢by Mark McGregor on January 22, 2026 at 7:11 pm
We try to reference a line in a shy algorithm and the algorithm itself with zref-clever. Running pdflatex twice on \documentclass{article} \pagestyle{empty} \usepackage{hyperref} \usepackage{algorithm2e} \usepackage{zref-clever} \zcRefTypeSetup{algocf}{ name-sg=Alg.\@, Name-sg=Alg.\@ } \zcRefTypeSetup{AlgoLine}{ Name-sg=line, name-sg=line } \zcRefTypeSetup{algocfline}{ Name-sg=line, name-sg=line } \zcRefTypeSetup{line}{ Name-sg=line, name-sg=line } \begin{document} \begin{algorithm}\LinesNumbered \caption{My great algorithm}\label{algLabel} \KwOut{The oh so great output of my great algorithm} command1\; command2\nllabel{lineLabel}\; command3 \end{algorithm} \zcref[S]{algLabel} contains \zcref{lineLabel}. \end{document} yields As we see, the second type name is “Alg.”, whereas we'd expect “line”. If we comment out hyperref, we get “Alg. 1 contains line 2.” as expected. So far we failed to get different type names for the two references in the presence of hyperref, so you can blame it. At the same time, given that algorithm2e has been unmaintained for about 8½ years and zref-clever for slightly over 1 year, you can blame them, too. Anyway, what is the technical root cause of the failure? Any bugfix, patch, or workaround?
- Unexpected tabular vertical alignmentby itobito on January 22, 2026 at 4:52 pm
I'm having a difficult time understanding the vertical alignment of columns of tables created via tabular. My Code \documentclass{article} \usepackage{array} \begin{document} \begin{tabular}{ | p{2.5cm} | m{2.5cm}| b{2.5cm} | } \hline cell1 dummy text dummy text dummy text& cell2 & cell3 \\ \hline cell4 & cell5 dummy text dummy text dummy text & cell6 \\ \hline cell7 & cell8 & cell9 dummy text dummy text dummy text\\ \hline \end{tabular} \end{document} This example is pretty much taken directly from the Overleaf Tables documentation, with the difference being the varying column alignments. I'd expect the code above to produce Expected table with the text in the first column top-aligned, the text in the second column middle-aligned, and the text in the third column bottom-aligned. However, the code above actually produces Actual table I know it's possible (and easier) with the tabularray package, but I'd like to understand why. Why do my actual table's columns have seemingly incorrect vertical alignments?
- Weird \text{} interactions while using Mathjax [closed]by Dhairya Kumar on January 22, 2026 at 4:43 pm
I came across the error where the 'and' refused to bdge through and make a gap in between the code. Code: $$\overline{AM}=\overline{BN}=a,\overline{BP}=\overline{CQ}=b, \text{and} \overline{CR}=\overline{AS}=c$$ Help me overcome it.
- Subfigures from a comma list: add left-side A, B, C… labels aligned to the top, outside the imagesby taiwan12 on January 22, 2026 at 3:42 pm
I previously asked about creating a centered grid of subfigures from a comma-separated list with no gaps, and I received a working expl3 solution (thanks to jps) (The previously asked question can be found below, and the link.). Now I would like to extend this setup with letter labels placed next to each image, not overlaid on the image itself. Input \multipleIMG{<images per row>}{<comma-separated list of image files>}{<main label>}{<main caption>} Desired layout (conceptually): [A] [small gap] image1 [bigger gap] [B] [small gap] image2 [bigger gap] [C] [small gap] image3 More precisely: Each image should have a label A, B, C, … The label should be to the left of the image, not on top of it The label and the image should be top-left-aligned There should be a small horizontal space between the label and its image There should be a larger horizontal space between consecutive (label + image) groups The letters should be generated automatically from the image index The solution should integrate cleanly with the existing expl3 loop and preserve the centered grid layout Example about what I want: Input: \multimg{3} { example-image-duck, example-image-duck, example-image-duck, example-image-duck, example-image-duck } {fig:ducksI} {A happy duck family I} Output: jps answers (without top-left labels) \documentclass{article} \usepackage{graphicx} \usepackage{subcaption} \usepackage[colorlinks=true]{hyperref} \usepackage{float} \ExplSyntaxOn \dim_new:N \l__taiwan_img_width_dim \int_new:N \l__taiwan_img_index_int \cs_new:Npn \__taiwan_img_sublabel:n #1 {} \cs_generate_variant:Nn \__taiwan_img_sublabel:n { V } \NewDocumentCommand \multimg { m m m m } { \begin{figure}[H] \centering \int_zero:N \l__taiwan_img_index_int \dim_set:Nn \l__taiwan_img_width_dim { \linewidth / #1 } \cs_set:Npn \__taiwan_img_sublabel:n ##1 { \phantomcaption \label { #3_##1 } } \clist_map_inline:nn {#2} { \int_incr:N \l__taiwan_img_index_int \begin{subfigure}{\l__taiwan_img_width_dim} \includegraphics [width=\linewidth] {##1} \__taiwan_img_sublabel:V \l__taiwan_img_index_int \end{subfigure} \allowbreak } \caption { #4 \label {#3} } \end{figure} } \ExplSyntaxOff \usepackage{duckuments} % <- or otherwise we'd get the same duck every time \begin{document} \multimg{3} { example-image-duck, example-image-duck, example-image-duck, example-image-duck, example-image-duck } {fig:ducksI} {A happy duck family I} \multimg{5} { example-image-duck, example-image-duck, example-image-duck, example-image-duck, example-image-duck } {fig:ducksII} {A happy duck family II} Just take a look at the happy ducks in figure~\ref{fig:ducksI}. Aren't they majestic? Especially the duckling in figure~\ref{fig:ducksI_3}. \end{document} The previously asked question: I’m trying to define a LaTeX command that creates a figure containing multiple subfigures from a comma-separated list of image names. I’d like a macro with this interface: \multipleIMG{<images per row>}{<comma-separated list of image files>}{<main label>}{<main caption>} Requirements: Use the full available width (\linewidth). No horizontal and vertical gaps between images. Each row should be centered as a whole (even the last row if it’s not full). All images must have the same width (based on <images per row>). Create sublabels automatically as <main label>_1, <main label>_2, … (1, 2, 3, …). I’m using subcaption. I don’t want visible subcaptions, only labels for referencing (\phantomcaption is fine). Example input: \multipleIMG{3}{location-1,location-2,location-3,location-4,location-5}{fig:first}{Five Figure} This should produce 3 images in the first row, then 2 centered images in the second row, all with equal widths, and labels: fig:first_1, fig:first_2, fig:first_3, fig:first_4, fig:first_5 So that I can reference both the main figure and a subfigure like: \ref{fig:first}, \ref{fig:first_1}
- I need help with the bold command [closed]by FOMUM NDE ROLAND on January 22, 2026 at 2:29 pm
I used the code: \textbf{greatest} in my work, but the word "greatest" is not in bold. What must I do?
- Is it a good idea to create a Lua "class" with C++ style constructor and (function) pointers in LuaLaTeX?by dsacre on January 22, 2026 at 2:19 pm
Background Consider the following: One has several LuaLaTeX packages, which provide similar, but case specific functionality. Consequently, they have slightly different internal logic and require access to different external Lua modules. Instead of copying the code each time, making the necessary, minute adjustments and creating hard to maintain code duplication in the process, one wants to write a class-like wrapper. Since Lua has no class functionality built in, but supports meta programming via prototypes, the process is not straight forward. The following code is based upon the Lua documentation. MWE Since for this use case the only required change between "object instances" are function and data references, a C++ like "pointer" approach was used. Furthermore, to keep the code nice and compact, a C++ like "constructor" is implemented. Please note that in this very simplified example, there is only one external Lua logic module and one "database" included. In the actual use case, there are many more, which would justify the implementation efforts for a prototype. % !TeX program = lualatex \documentclass{article} \begin{filecontents*}{module.lua} -- DESCRIPTION: Provide database functionality function m_addData(a_database, a_key, a_data) a_database[a_key] = a_data end return { addDataModule = m_addData } \end{filecontents*} \begin{filecontents*}{class.lua} -- DESCRIPTION: Provide wrapper to re-use logic Class = {} -- DESCRIPTION: Function to add a new "object" instance function Class:new(o) o = o or {} setmetatable(o, self) self.__index = self -- DESCRIPTION: Loading of data specified -- by "constructor" into "object" self.database = o.database self.logic = o.logic return o end -- DESCRIPTION: Wrapper for database interaction function Class:addDataWrapper(a_key, a_data) self.logic.addDataModule( self.database, a_key, a_data ) end \end{filecontents*} \begin{document} Program execution \directlua{ % DESCRIPTION: Loading of Lua files require("./class") myModule = require("./module") % DESCRIPTION: Create the data structures myDatabase = {} myWrapper = Class:new{ database = myDatabase, logic = myModule } % DESCRIPTION: Call addData function directly from module % STATUS: WORKING myModule.addDataModule(myDatabase, "directly from module", "works") texio.write_nl("Database Entry: key = 'directly from module', value = '" .. myDatabase["directly from module"] .. "'") % DESCRIPTION: Call addData function from wrapper data path % STATUS: WORKING myWrapper.logic.addDataModule(myDatabase, "from wrapper data path", "works") texio.write_nl("Database Entry: key = 'from wrapper data path', value = '" .. myDatabase["from wrapper data path"] .. "'") % DESCRIPTION: Call addData function from wrapper data path % STATUS: FAILS myWrapper.addDataWrapper("directly from wrapper", "fails") } \end{document} Output Somehow the "pointers" are initialized, but not accessible directly via the wrapper. Database Entry: key = 'directly from module', value = 'works' Database Entry: key = 'from wrapper data path', value = 'works'./class.lua:20: attempt to index a nil value (field 'logic') stack traceback: ./class.lua:20: in field 'addDataWrapper' [\directlua]:1: in main chunk. l.69 } What was tried so far and did not work Separate initialization function Packing the external data passed in via the constructor as a meta table via setmetatable Different style of object initialization (see this article on the Lua users forum) Class = {} Class.__index = Class function Class:new(a_object) local tmp_class = {} setmetatable(tmp_class, Class) tmp_class.database = a_object.database tmp_class.logic = a_object.logic return tmp_class end Using inheritance like suggested in the Lua Manual to create a new prototype with all the required data, hoping that the references might be valid at the time the "member" functions of the new prototype would be created Update 2026-01-23 Thanks to the answer by @cfr I found the culprit: myWrapper.addDataWrapper("directly from wrapper", "fails") -- REMARK: WRONG SYNTAX myWrapper:addDataWrapper("directly from wrapper", "works") -- REMARK: CORRECT SYNTAX It is in this case necessary to use the : to call the "member" function, as otherwise - a bit oversimplified - the self will not be passed to the function and consequently the function cannot read the data and fails. @Jérôme LAURENS suggested to take a look at the penlight library, which is natively available in LuaLaTeX. It would provide a Class() function and allow for several C++-like features. I did not yet test it in this context, so I cannot comment on the limitations/potential issues. Question What would be the best practice to achieve the goal of C++ style classes with constructor and (function) pointers in Lua in general and in the LuaLaTeX specific case with the following restrictions: Lua Version 5.3 No external libraries or libraries that have to be included in the LuaLaTeX package Since there was some doubts in the comments whether Object Oriented Programming in Lua makes sense in this case, please suggest also non-oop approaches.
- Keep columns layout in the article version of a beamer presentationby Tobard on January 22, 2026 at 9:43 am
I use the beamerarticle package to generate both presentation frames and article notes. Everything goes well except I lose a lot of space in the article layout because the column formatting is not preserved. Here is my Article.tex file: % Article.tex \documentclass[a4paper]{article} \usepackage{beamerarticle} \input{content} Here is my Presentation.tex file: % Presentation.tex \documentclass[ignorenonframetext]{beamer} \input{content} And here is my content.tex file: % INITIAL content.tex \usepackage{tikz} \begin{document} \begin{frame}%<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< \frametitle{Test frame with columns}\small \begin{columns} \column<+->[t]{.3\textwidth} This is the content of the first column. \tikz{\draw (0,0) rectangle (3,2)node[midway]{1};} \column<+->[t]{.3\textwidth} This is the content of the second column. \tikz{\draw (0,0) rectangle (3,2)node[midway]{2};} \end{columns} \end{frame}%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> \end{document} And here are the results of both documents : Then I tried to modify the columns environment in the preamble of content.tex, but it works only if I redefine the columns with \begin{columns}{.3\textwidth} and \end{columns} rather than the simple and convenient \column{.3\textwidth} macro: % NEW content.tex \usepackage{tikz} \mode<article>{ \renewenvironment<>{columns}[1][]{}{} \renewenvironment<>{column}[2][]% {\begin{minipage}[t]{#2}}% {\end{minipage}\hfill} } \begin{document} \begin{frame}%<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< \frametitle{Test frame with columns}\small \begin{columns} % \column<+->[t]{.3\textwidth} \begin{column}<+->[t]{.3\textwidth} This is the content of the first column. \tikz{\draw (0,0) rectangle (3,2)node[midway]{1};} \end{column} % \column<+->[t]{.3\textwidth} \begin{column}<+->[t]{.3\textwidth} This is the content of the second column. \tikz{\draw (0,0) rectangle (3,2)node[midway]{2};} \end{column} \end{columns} \end{frame}%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> \end{document} What are the proper set of commands to use to preserve column behavior in article mode while using the \column{} macro ? Thank you for your help!
- When lemmas share the same counter as theorems, how to print “Lemma” in references produced by zcref-clever?by Mark McGregor on January 22, 2026 at 9:35 am
When cleveref died, we switched to zref-clever, but its \zcref refers to lemmas as theorems when we use the same counter. Namely, running pdflatex on \documentclass{article} \pagestyle{empty} \usepackage{zref-clever} \newtheorem{thm}{Theorem}[section] \newtheorem{lem}[thm]{Lemma} \zcRefTypeSetup{lem}{ name-sg=Lem. } \zcRefTypeSetup{thm}{ name-sg=Thm. } \begin{document} \section{My great section} \begin{lem}\label{lem}My great lemma.\end{lem} \begin{thm}\label{thm}My great theorem.\end{thm} According to \zcref{lem} \ldots \end{document} produces “According to Thm. 1.1 ...”: Above, we expected According to Lem. 1.1 ... though. Who is the culprit and what to do?
- Plotting a rational function in tikzby mf67 on January 21, 2026 at 9:17 pm
I'm trying to plot a rational function, but I constantly get dimensions too large, even if the plot frame is within the page and the function is within limits. \documentclass{book} \usepackage{pgf,tikz,pgfplots} \pgfplotsset{compat=1.15} \begin{document} \begin{tikzpicture}[declare function={r(\x)=(-\x*\x*\x*\x+600*\x*\x*\x-135000*\x*\x+10125000*\x)/(2109375*(30000-200*\x));}] \begin{axis}[ x=0.05cm,y=1cm, xmin=0, xmax=160, ymin=0, ymax=1, xlabel={\(x\)}, ylabel={\(y\)} ] \draw[domain=0:160,smooth,samples=100] plot ({\x},{r(\x)}); \end{axis} \end{tikzpicture} \end{document} What could be wrong? TIA. This is how the graph looks in Mathematica