• Problems with table wrapped with text
    by Daniel Neskorodov on July 1, 2026 at 5:29 pm

    I have the following \documentclass[12pt,a4paper]{article} \usepackage{amsmath,amssymb} \usepackage{geometry} \usepackage{lipsum} \geometry{margin=2cm} \setlength{\parindent}{0pt} \renewcommand{\arraystretch}{1.25} \newsavebox{\leftbox} \begin{document} \begin{lrbox}{\leftbox} \begin{minipage}[t]{0.33\textwidth} \textbf{Given:}\hspace{2.5cm}\textbf{SI:} \vspace{2mm} \begin{tabular}{@{}l|l@{}} $m_1=120$ g & $0.12$ kg\\ $m_2=50$ g & $0.05$ kg\\ $c_1=4200\ \dfrac{\text{J}}{\text{kg}\cdot^\circ\text{C}}$ &\\ $c_2=920\ \dfrac{\text{J}}{\text{kg}\cdot^\circ\text{C}}$ &\\ $R=2\ \Omega$ &\\ $U=5$ V &\\ $\Delta t=12^\circ\text{C}$ &\\ $\eta=20\%$ &\\ \hline \multicolumn{2}{@{}l@{}}{\textbf{Find:}}\\ \multicolumn{2}{@{}l@{}}{$U-?$} \end{tabular} \end{minipage} \end{lrbox} \noindent \usebox{\leftbox} \hfill \begin{minipage}[t][\dimexpr\ht\leftbox+\dp\leftbox\relax][t]{0.64\textwidth} \textbf{Solution:} \vspace{2mm} \lipsum[1] \vfill \end{minipage} \lipsum[1-2] \end{document} which gives me this However I would like to write text in the right minipage as a continuous text without the need to break it (now it is causing problems with overlapping). I also would like to automatically left align the word 'SI' with the letters below it. It obviously comes from the fact that neither 'SI' or 'Given' are in the table, but that's on purpose - I need 'Given', 'SI' and 'Solution' to be on the same level vertically. How do I do that?

  • braces in delimited arguments
    by user2026844 on July 1, 2026 at 3:10 pm

    I have a complicated environment that scans for presence of tokens and "patches" them by adding some tokens before. I implemented this using macros with arguments delimited by the tokens I want to patch. Once the patching is done, I'd like to respect the token stream as much as possible (i.e. make it as close to the original as possible). However, whenever the text between the delimiters is exactly of the form "{ text }", the braces are sadly removed. I'd like to find a way to avoid this behavior. I had a look here but I'm afraid this will change the token stream too much, so I'm wondering if there is a simpler fix. Edit: Better MWE based on David's reply. Goal: Implement such a patch command so that the token stream after \patch is as close as possible (identical?) to the original one. \documentclass{article} \def\Z{Z} % Does not work with first def of \A \def\patch\A#1\Z{patched:\A#1\Z} % Does not work with second def of \A \def\patch\A#1{\xpatch\A{{#1}}} \def\xpatch\A#1\Z{patched:\A#1\Z} \begin{document} First def of A :\def\A#1{(A #1)} \A{arg} \Z \patch\A{arg} \Z \A{arg}\Z \patch\A{arg}\Z Second def of A:\def\A[#1]{(A #1)} \A[arg] \Z \patch\A[arg] \Z \A[arg]\Z \patch\A[arg]\Z \end{document} Output (first def of \A) (A arg) Z patched:(A arg) Z (A arg)Z patched:(A a)rgZ Thanks a lot for your help!

  • Is that possible to declare harpoon arrow with two directions more compact without defining twice?
    by Explorer on July 1, 2026 at 2:09 pm

    I have the following code partly comes from here: \documentclass[tikz,border=5pt]{standalone} \usetikzlibrary{arrows.meta,bending,nfold} \makeatletter \tikzset{ shrink/.style={thick,shorten >=5pt,shorten <=5pt}, offset/.code= \tikz@addoption{% \pgfgetpath\tikz@temp \pgfsetpath\pgfutil@empty \pgfoffsetpath\tikz@temp{#1}% }, foo/.tip={Straight Barb[harpoon,length=5pt]}, foo'/.tip={Straight Barb[harpoon,swap,length=5pt]}, dualharpoon/.style={ draw=none, postaction={path only,draw,foo'-,shrink,offset=+#1ex}, postaction={path only,draw,-foo',shrink,offset=-#1ex}, }, dualharpoon/.default=1, dualharpoon'/.style={ draw=none, postaction={path only,draw,-foo,shrink,offset=+#1ex}, postaction={path only,draw,foo-,shrink,offset=-#1ex}, }, dualharpoon'/.default=1, relarrow/.style={ dualharpoon,orange,thick,#1 }, relarrow'/.style={ dualharpoon',orange,thick,#1 }, } \makeatother %%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} \begin{tikzpicture} \node[fill=cyan,circle] (A) at (-2,-1) {A}; \node[fill=magenta,circle] (B) at (2,-1) {B}; \node[fill=cyan,circle] (C) at (-2,1) {C}; \node[fill=magenta,circle] (D) at (2,1) {D}; \draw[relarrow=teal] (A) -- (B); \draw[relarrow'] (C) -- (D); \end{tikzpicture} \end{document} which declare two arrow style, relarrow and relarrow': However, I did the similar things twice here! Which I was not quite comfortable with dupliacted syntax: foo/.tip={Straight Barb[harpoon,length=5pt]}, foo'/.tip={Straight Barb[harpoon,swap,length=5pt]}, dualharpoon/.style={ draw=none, postaction={path only,draw,foo'-,shrink,offset=+#1ex}, postaction={path only,draw,-foo',shrink,offset=-#1ex}, }, dualharpoon/.default=1, dualharpoon'/.style={ draw=none, postaction={path only,draw,-foo,shrink,offset=+#1ex}, postaction={path only,draw,foo-,shrink,offset=-#1ex}, }, dualharpoon'/.default=1, relarrow/.style={ dualharpoon,orange,thick,#1 }, relarrow'/.style={ dualharpoon',orange,thick,#1 }, I wonder I could simplify the code to define the '-version in a reverse dualharpoon direction?

  • tabulary not stretching into column and text width
    by MadyYuvi on July 1, 2026 at 1:28 pm

    Tried with the below: (thanks to @David and @Stephan Is it possible to make an underfull tabulary spread out?): \documentclass[twocolumn]{article} \usepackage{lipsum} \usepackage{showframe} \usepackage{tabulary} \usepackage{etoolbox} \makeatletter \patchcmd\TY@checkmin {\def\TY@ratio{1}} {% \@tempdima\dimexpr\p@*\TY@linewidth/\TY@tablewidth\relax \edef\TY@ratio{\strip@pt\@tempdima}% }{}{} \let\TY@@checkmin\TY@checkmin \makeatother \begin{document} \lipsum[1-2] \begin{table} \caption{Table caption} \begin{tabulary}{\columnwidth}{@{\extracolsep\fill}LLLL@{\extracolsep\fill}} \hline 1 &2 &3 &4 \\ 1 &2 &3 &4 \\ 1 &2 &3 &4 \\ 1 &2 &3 &4 \\ \hline \end{tabulary} \end{table} \lipsum[1-2] \begin{table*} \caption{Table caption} \begin{tabulary}{\textwidth}{@{\extracolsep\fill}LLLL@{\extracolsep\fill}} \hline 1 &2 &3 &4 \\ 1 &2 &3 &4 \\ 1 &2 &3 &4 \\ 1 &2 &3 &4 \\ \hline \end{tabulary} \end{table*} \lipsum[1-3] \end{document} in the .log file, a warning message Package tabulary Warning: No suitable columns!, and the table doesn't stretched. Not sure what went wrong, please advise. I'm using Win11 and TL2024 and tabulary version tabulary 2024/06/04 v0.11 and XeLaTeX engine.

  • footnote rule in r2l document
    by Aviroum on July 1, 2026 at 11:24 am

    Is there a problem with the footnote rule? % !TEX TS-program= ConTeXt (LuaTeX) \mainlanguage[ar-dz] \setupdirections[bidi=global,method=one] \setuppapersize[A6] \usecolors[svg] \setupalign[r2l] \setupinteraction[state=start,color=navy,focus=standard] \setupwhitespace[small] \setupnote[numbercommand=\groupedcommand{(}{)}] \setupnotation [footnote] [alternative=serried, rule=paragraph, left={(}, align=r2l, %location=text, right={)}, headstyle=, stopper=] \setupfootnotes[way=bysection,align=r2l,color=navy] \setupmixedcolumns[direction=reverse] \setupbodyfont[amiri,12pt] \definestartstop[LTR] [before={\begingroup\lefttoright},after=\endgroup] \setuppagenumbering[location=] %================================ %================================ \starttext %================================ %================================ \startLTR from \goto{WikiPedia}[url(https://ar.wikipedia.org/wiki/السندباد_البحري)]: \stopLTR السِّندباد أو السِّندباد البحري\footnote{ موسوعة شبكة المعرفة الريفية نسخة محفوظة 07 مارس 2014 على موقع واي باك مشين.} هو شخصية أسطورية من شخصيات ألف ليلة وليلة وهو بحار من بغداد. عاش في فترة الخلافة العباسية، ويقال إن السندباد الحقيقي تاجر بغدادي مقيم في عُمان\footnote{د.عبد الرحمن عبد الكريم العاني، تاريخ عمان الإسلامي، مطبعة العاني، بغداد، 1985، "أطروحة دكتوراه" ص 23}. تعدّ حكاية السندباد البحري واحدة من أشهر حكايات ألف ليلة وليلة. زار السندباد الكثير من الأماكن السحرية والتقى بالكثير من الوحوش أثناء إبحاره في سواحل أفريقيا الشرقية وجنوب آسيا. \stoptext

  • adjust spacing of \addcontentsline in t.o.c [closed]
    by Nate on July 1, 2026 at 10:09 am

    I am using the book class and tocloft package. The following code: \include{ch2} \addcontentsline{toc}{part}{Part II: 2-Dimensional Geometry} produces: in the t.o.c., which is a little more vertical space than I'd like. Is there a way of adding a spacing argument to the \addcontentsline command that determines its vertical position relative to the automatically generated subsection, or another simple way of reducing the spacing? (ideally not requiring a custom command)

  • How to apply the `decorate`-friendly patched `offset` version correctly?
    by Explorer on July 1, 2026 at 9:57 am

    The question was originated from the previous question and the comment: The offset implementation of A763043 would shift the path before decorations which means yshifting in the markings wouldn't be necessary, they would however be moved towards the postactions of the offsetting. However, when I just copied the following patched-offset-trick: % https://tex.stackexchange.com/a/763043 \makeatletter % see Code B in https://tex.stackexchange.com/a/728379 \let\nfold@orig@tikz@finish\tikz@finish \def\tikz@finish{\tikz@nfold@do\nfold@orig@tikz@finish} \let\tikz@nfold@do\relax \tikzset{offset/.code=% \edef\tikz@temp{#1}\ifx\tikz@temp\tikz@nonetext \let\tikz@nfold@do\relax \else\def\tikz@nfold@do{\pgfgetpath\tikz@temp\pgfsetpath\pgfutil@empty\pgfoffsetpath\tikz@temp{#1}}% \fi} \makeatother and the complete code: % https://tex.stackexchange.com/a/96970 % https://tex.stackexchange.com/a/762399 \documentclass[tikz,border=5pt]{standalone} \usetikzlibrary{arrows.meta,bending,nfold,ext.nodes,decorations.markings} % https://tex.stackexchange.com/a/763043 % https://tex.stackexchange.com/questions/764317/how-to-better-design-the-binary-switch-option-in-tikz-case#comment1907525_764317 \makeatletter % see Code B in https://tex.stackexchange.com/a/728379 \let\nfold@orig@tikz@finish\tikz@finish \def\tikz@finish{\tikz@nfold@do\nfold@orig@tikz@finish} \let\tikz@nfold@do\relax \tikzset{offset/.code=% \edef\tikz@temp{#1}\ifx\tikz@temp\tikz@nonetext \let\tikz@nfold@do\relax \else\def\tikz@nfold@do{\pgfgetpath\tikz@temp\pgfsetpath\pgfutil@empty\pgfoffsetpath\tikz@temp{#1}}% \fi} \makeatother %%%%%%%%%%%%%%%%%%%%%%%%%% \tikzset{ foo/.tip={Straight Barb[harpoon,swap,length=5pt]}, shrink/.style={thick,shorten >=2pt,shorten <=2pt}, dualharpoon/.style={% draw=none, postaction={path only,draw,-foo,shrink,offset=-#1ex}, postaction={path only,draw,foo-,shrink,offset=+#1ex, decorate, decoration={markings, mark=at position 0.5 with { \draw[-,line cap=round,thick] ++ (-.15cm,-.15cm) -- (+.15cm,+.15cm); }}, }, }, dualharpoon/.default=.75, } \begin{document} \begin{tikzpicture}[ Qstyle/.style={ dualharpoon, % ext/auto with offset, % default true ext/auto offset=1ex, auto, }] \node[draw,circle,fill=teal] (A) at (0,1) {A}; \node[draw,circle,fill=magenta] (B) at (0,-1) {B}; \node[draw,circle,fill=cyan] (C) at (2.5,.5) {C}; \draw[magenta,Qstyle] (A) to[bend right] node {$\Delta$} node[swap]{$\nabla$} (B); \draw[teal,Qstyle] (B) to[bend right] node {$f(x)$} node[swap]{$g(x)$} (C); \draw[orange,Qstyle] (A) -- node {$x$} node[swap]{$y$} (C); \end{tikzpicture} \end{document} gives not the ideal result(?) Possibly I missed some important...

  • How to better design the binary switch option in tikz case?
    by Explorer on July 1, 2026 at 7:31 am

    I have the following code modified from my previous question: % https://tex.stackexchange.com/a/96970 % https://tex.stackexchange.com/a/762399 \documentclass[tikz,border=5pt]{standalone} \usetikzlibrary{arrows.meta,bending,nfold,ext.nodes,decorations.markings} \makeatletter \tikzset{ foo/.tip={Straight Barb[harpoon,swap,length=5pt]}, mystyle/.style={thick,shorten >=2pt,shorten <=2pt}, offset/.code= \tikz@addoption{% \pgfgetpath\tikz@temp \pgfsetpath\pgfutil@empty \pgfoffsetpath\tikz@temp{#1} }, dualharpoon/.style={ draw=none, postaction={path only,draw,foo-,mystyle,offset=+#1ex}, postaction={path only,draw,-foo,mystyle,offset=-#1ex}, postaction={decorate, decoration={markings, mark=at position 0.5 with { \begin{scope}[yshift=+#1ex] \draw[-,line cap=round,thick] ++ (-.15cm,-.15cm) -- (+.15cm,+.15cm); % \draw[-,line cap=round,thick] ++ (-.15cm,+.15cm) -- (+.15cm,-.15cm); \end{scope} \begin{scope}[yshift=-#1ex] \draw[-,line cap=round,thick] ++ (-.15cm,-.15cm) -- (+.15cm,+.15cm); % \draw[-,line cap=round,thick] ++ (-.15cm,+.15cm) -- (+.15cm,-.15cm); \end{scope} }}, }, }, dualharpoon/.default=.75, } \makeatother \begin{document} \begin{tikzpicture}[ Qstyle/.style={ dualharpoon, ext/auto with offset, % default true ext/auto offset=1ex, auto, }] \node[draw,circle,fill=teal] (A) at (0,1) {A}; \node[draw,circle,fill=magenta] (B) at (0,-1) {B}; \node[draw,circle,fill=cyan] (C) at (2.5,.5) {C}; \draw[magenta,Qstyle] (A) to[bend right] node {$\Delta$} node[swap]{$\nabla$} (B); \draw[teal,Qstyle] (B) to[bend right] node {$f(x)$} node[swap]{$g(x)$} (C); \draw[orange,Qstyle] (A) -- node {$x$} node[swap]{$y$} (C); \end{tikzpicture} \end{document} Now I want two control switches: which one to place slash: positive offset one? negetive one? or both? or none? which direction to put slash? forward: \draw[-,line cap=round,thick] ++ (-.15cm,-.15cm) -- (+.15cm,+.15cm); and \draw[-,line cap=round,thick] ++ (-.15cm,-.15cm) -- (+.15cm,+.15cm); backward: \draw[-,line cap=round,thick] ++ (-.15cm,+.15cm) -- (+.15cm,-.15cm); or \draw[-,line cap=round,thick] ++ (-.15cm,+.15cm) -- (+.15cm,-.15cm);? Or in other word, I want the syntax for example: \draw[magenta,Qstyle,slash side=both,slash direction=backward] (A) to[bend right] node {$\Delta$} node[swap]{$\nabla$} (B); \draw[teal,Qstyle,slash side=positive,slash direction=forward] (B) to[bend right] node {$f(x)$} node[swap]{$g(x)$} (C); \draw[orange,Qstyle,slash side=none] (A) -- node {$x$} node[swap]{$y$} (C); I was after a neat option syntax to encapsulate the logic above. Any suggestions?

  • How to Increase the Spacing Between Arched Letters?
    by DDS on June 30, 2026 at 10:57 pm

    Consider the code: \documentclass[12pt]{book} \usepackage{tikz,xcolor} \usetikzlibrary{decorations.text} % Spaceout Algorithm \def\theLetterSpace{0.5pt} \def\theWordSpace{1.5\LocalLetterSpace} \newlength\LocalLetterSpace \newcommand\spaceout[2][\theLetterSpace]{% \setlength\LocalLetterSpace{#1}\expandafter\spaceouthelpA#2 \relax\relax} \def\spaceouthelpA#1 #2\relax{% \spaceouthelpB#1\relax\relax% \ifx\relax#2\else\ \kern\theWordSpace\spaceouthelpA#2\relax\fi } \def\spaceouthelpB#1#2\relax{% #1% \ifx\relax#2\else \kern\LocalLetterSpace\spaceouthelpB#2\relax% \fi } \begin{document} \thispagestyle{empty} Here is some text. \vspace{10pt} {\spaceout[2pt]{Here is some "spaced out" text.}} \vspace{65pt} \begin{tikzpicture} \draw[-latex,white,postaction={decorate},decoration={text along path, text={I WOULD LIKE TO INCREASE SPACING BETWEEN THESE ARCHED LETTERS},text color={blue!85!black},text align=center}] (7,0) arc [start angle=180,end angle=0,radius=8]; \end{tikzpicture} \end{document} which produces: The above "spaceout" algorithm (if I recall correctly) cf. Steven B. Segeletes. As you can see, I have encountered no difficulty in applying the algorithm to a regular sentence. However, I have not been apply to apply it correctly to the arched words above. QUESTION: How may I, using this algorithm or by some other method, increase the spacing between the displayed arched letters? I compile the code with xelatex. Thank you.

  • Get an overbrace over a matrix, with entries aligned with columns and rows of matrix
    by jayant on June 30, 2026 at 7:32 pm

    I am trying to get a matrix with an overbrace and sidebrace which looks like the following; I tried the following code so far, \documentclass[12pt]{article} \usepackage{epsfig} \usepackage{amssymb} %\usepackage[dvips]{color} \usepackage{amsmath} \usepackage{amsthm} \[ \begin{array}{ccc} \overbrace{\text{Col 1}}^{\text{Label A}} & %\overbrace{\text{Col 2 \quad Col 3}}^{\text{Label B}} & %\overbrace{\text{Col 4}}^{\text{Label C}} \\ \begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{bmatrix} \end{array} \] \end{document} But it is not giving the desired output. Kindly help.

  • Line endings in catchfilebetweentags
    by Jim Hefferon on June 30, 2026 at 7:26 pm

    I have a textbook, and from it I have derived slides. To ensure that the slide contents match the book's I use catchfilebetweentags. I'm now working on the book's new edition and this package still correctly fetches the material between the tags, but it now omits spaces where the source file book.tex has line endings. Here is the derived file slides.tex. \documentclass{article} \usepackage{catchfilebetweentags} \newcommand{\catchfilefn}{book.tex} \begin{document} Introductory text \ExecuteMetaData[\catchfilefn]{firsttag} \ExecuteMetaData[\catchfilefn]{secondtag} \end{document} Here is the source file book.tex. \documentclass{book} \usepackage{blindtext} \begin{document} \blindtext %<*firsttag> Contents of first tag. This is a sentence with a line break in the middle. %</firsttag> \blindtext %<*secondtag> Contents of \textit{second} tag. One word has an\index{test} index entry. %</secondtag> \blindtext \end{document} In the output slides.pdf there is no space between the tag. and This. Similarly there is no space between a and line. Linewise for tag. and One, and an and index. I have used this package for years and not seen this behavior (its last update on CTAN is 2011). I have today's TeX Live.

  • Recent error from Latex during compilation of xcolor package. Unknown option 'pst'
    by Alberto Pettorossi on June 30, 2026 at 4:18 pm

    When I compile the following file: \documentclass[12pt,english,twoside]{amsbook} \usepackage[T1]{fontenc} \usepackage[latin1]{inputenc} \usepackage{geometry} \usepackage{amssymb} \usepackage{amsfonts} \usepackage{amsmath} \usepackage{babel} \usepackage{bm} \usepackage{balance} \usepackage{fancybox} \usepackage{epsfig} \usepackage{framed} \usepackage{graphics} \usepackage{graphicx} \usepackage{fancyhdr} \usepackage{latexsym} \usepackage{textcomp} \usepackage{stmaryrd} \usepackage{varioref} \usepackage{vaucanson-g} \usepackage{verbatim} \usepackage{wasysym} ... Then I get: ### This is /Library/TeX/texbin/simpdftex, Version 20221012 ### /Library/TeX/texbin/latex Main-ADP_PettorossiProietti_PredCalc_LogBook-Springer-main.tex This is pdfTeX, Version 3.141592653-2.6-1.40.29 (TeX Live 2026) (preloaded format=latex) restricted \write18 enabled. entering extended mode (./Main-ADP_PettorossiProietti_PredCalc_LogBook-Springer-main.tex LaTeX2e <2025-11-01> L3 programming layer <2026-01-19> (/usr/local/texlive/2026/texmf-dist/tex/latex/amscls/amsbook.cls Document Class: amsbook 2020/05/29 v2.20.6 (/usr/local/texlive/2026/texmf-dist/tex/latex/amsmath/amsmath.sty ... and after some more lines showing the compilation of various ...sty files, I get: /usr/local/texlive/2026/texmf-dist/tex/latex/xcolor/xcolor.sty:265: LaTeX Error: Unknown option 'pst' for package xcolor. For immediate help type H <return>. ... l.265 \ProcessKeyOptions\relax ? My file was used to compile without errors until about six months ago. Can you, please, help me? Thanks a lot in anticipation, Alberto

  • Dimensionating of color blocks in a matrix
    by Carl Anderson on June 30, 2026 at 3:57 pm

    By using nicematrix package and command \Block, I'm struggling to reduce the width and height of block colors, separately. Any hint? Below, find the code: \documentclass{article} \usepackage{nicematrix,tikz} \begin{document} \begin{equation*} \begin{bNiceArray}{cccc|c}[columns-width=5pt,margin] \Block[fill=red]{2-4}{} a_{11} & a_{12} & a_{13} & a_{14} & \Block[fill=yellow]{3-1}{} a_{15} \\ a_{21} & a_{22} & a_{23} & a_{24} & a_{25} \\ a_{31} & a_{32} & a_{33} & a_{34} & a_{35} \end{bNiceArray} \end{equation*} \end{document}

  • how to align axis-coordinate system with tikzpicture-coordinate system
    by flawr on June 30, 2026 at 3:13 pm

    I'd like to use a pgfplots axis environment to render some plots. I'd like them to be aligned with the surrounding TiKz graphics. However, I have not yet managed to find the correct options. I'm also only interested in the plotted line itself, so no ticks or axes need to be drawn in addition. So far I have this (failed) example. My goal would be aligning the coordinate system the axis environment such that the two curves are right on top of each other. With the width/height I assumed I could set the exact dimensions, but that already seems to be off. Is there a way to modify this axis-environment to match the coordinate system of the tikzpicture-environment? \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} \draw[lightgray] (-2, -3) grid (4, 4); \fill[lightgray] (0,0) circle (0.2); % origin \draw[green] plot [red, domain=-2:4, samples=200] (\x, {exp(-abs(\x)^2)}); \begin{axis}[ xtick=\empty, ytick=\empty, hide axis, xmin=-2, xmax=4, axis equal, width=6cm, height=7cm, anchor=south west, at={(-2cm,-2cm)}, ] \addplot [red, domain=-2:5, samples=200] (\x, {exp(-abs(\x)^2)}); \end{axis} \end{tikzpicture} \end{document}

  • skak, xskak, chessboard use black symbols font in move notation
    by Jielpe on June 30, 2026 at 12:40 pm

    I'm writing chesboards and move notation, I would like to use a black symbol when writing black move, \documentclass{article} \usepackage{xskak} \begin{document} \newchessgame \mainline[style=styleC]{1. d4 d5 2. Bf4 Nf6} \end{document} The knight symbol is the one from the white font, I'd like it to be the black one, not sure if i'm clear... [edit] I found another question related : Chess notation: Switch between color and notation style I've tried using what i've foud there but it doesn't seems to work with the styleC i'm using, \documentclass{article} \usepackage{xskak} \makeatletter \def\cfssfixbaseline#1{\raisebox{-0.31ex}{\setboardfontsize{\f@size}#1}} \def\useblackfig{\def\cfss@figlanguage{@BLSB}} \def\usewhitefig{\def\cfss@figlanguage{@WLSB}} \def\cfss@king@@WLSB{\cfssfixbaseline{\cfss@WhiteKingOnWhite}} \def\cfss@queen@@WLSB{\cfssfixbaseline{\cfss@WhiteQueenOnWhite}} \def\cfss@rook@@WLSB{\cfssfixbaseline{\cfss@WhiteRookOnWhite}} \def\cfss@bishop@@WLSB{\cfssfixbaseline{\cfss@WhiteBishopOnWhite}} \def\cfss@knight@@WLSB{\cfssfixbaseline{\cfss@WhiteKnightOnWhite}} \def\cfss@pawn@@WLSB{\cfssfixbaseline{\cfss@WhitePawnOnWhite}} \def\cfss@king@@BLSB{\cfssfixbaseline{\cfss@BlackKingOnWhite}} \def\cfss@queen@@BLSB{\cfssfixbaseline{\cfss@BlackQueenOnWhite}} \def\cfss@rook@@BLSB{\cfssfixbaseline{\cfss@BlackRookOnWhite}} \def\cfss@bishop@@BLSB{\cfssfixbaseline{\cfss@BlackBishopOnWhite}} \def\cfss@knight@@BLSB{\cfssfixbaseline{\cfss@BlackKnightOnWhite}} \def\cfss@pawn@@BLSB{\cfssfixbaseline{\cfss@BlackPawnOnWhite}} % % https://tex.stackexchange.com/a/312066/46023 \def\instring#1#2{TT\fi\begingroup \edef\x{\endgroup\noexpand\in@{#1}{#2}}\x\ifin@} % \def\isuppercase#1{% \instring{#1}{ABCDEFGHIJKLMNOPRSTUVYZ}% }% \makeatother \def\FirstArgX{text} \newcommand\skaksymb[2][]{\begingroup% \def\SecondArgX{#1}% \ifx\FirstArgX\SecondArgX \usetextfig\textsymfigsymbol{#2}\else% \if\isuppercase{#2}\textsymfigsymbol{#2}% \usewhitefig \else% \useblackfig\textsymfigsymbol{#2}\fi\fi% \endgroup} \begin{document} \xskaknewstyleitem[% template=UF,% I tried putting styleC here beforewhite={\usewhitefig}, beforeblack={\useblackfig}, afterblack=\color{black}\hspace{1.25ex} ]{myitems} \xskakaddtostyle[% font=\normalfont, styleitem=myitems ]{test} \newchessgame \hidemoves{1.d4 d5 2. Bf4 Nc6 } \printchessgame[style=test] \end{document} Gives :

  • Parskip and itemize packages - space after and before itemize depending on surrounding text
    by Zlog on June 30, 2026 at 11:04 am

    Below is my MWE: \documentclass[a4paper]{article} \usepackage{enumitem} \usepackage[skip=\baselineskip]{parskip} \setlist[itemize]{nosep} \newenvironment{nospitemize}{% \begin{itemize}[topsep=-\parskip]% }{ \end{itemize}% \leavevmode% } \begin{document} aaaa \begin{nospitemize} \item first item \item second item \end{nospitemize} bbbb \begin{nospitemize} \item first item \item second item \end{nospitemize} cccc \begin{nospitemize} \item first item of list that should be in "new" paragraph \item second item \end{nospitemize} dddd \end{document} What I want is so that \nospitemize does not start new paragraph on its own and also does not prevent from starting it. So the same as in code "aaaa", "bbbb" and "dddd" should stick to lists, but "cccc" should be in different paragraph then lists (at least visually). The closest I got is by also adding \leavevmode at the begining: \newenvironment{nospitemize}{% \leavevmode% \begin{itemize}[topsep=-\parskip]% }{ \end{itemize}% \leavevmode% } but that creates too large space between "cccc" and next itemize

  • Is it possible to use \includeonly with tex4ht?
    by Nasser on June 30, 2026 at 11:00 am

    I have large latex document which not able to compile to html due to limitation of DVI. One such example: (/mnt/g/public_html/my_notes/solving_ODE/current_version/OUTPUT/12223_Monday_Ma rch_31_2025_04_39_20_AM_3788059/header.tex) (./body.4ct) --- file bodysubsubsection40249.htm --- l.1405711 --- TeX4ht warning --- \Link{tailbodysubsubsection40249.htm}? --- [65531 ! ==> Fatal error occurred: total_pages>=65536, bad output DVI file produced! Here is how much of LuaTeX's memory you used: 1249728 strings out of 19975895 2842832,90996078 words of node,token memory allocated 132895 words of node memory still in use: 498 hlist, 14 vlist, 2 rule, 86 disc, 66 local_par, 1 dir, 4 math, 648 glue, 60 kern, 207 penalty, 1383 glyph, 27278 attribute, 104 glue_spec, 27278 attribut e_list, 1 temp, 5 if_stack, 44 write, 638 special nodes avail lists: 1:4,2:2534,3:6556,4:25,5:427377,6:990,7:25559,8:5,9:2528,10:22,1 1:1446 1119004 multiletter control sequences out of 65536+20000000 59 fonts using 3827759 bytes 142i,6n,149p,2546b,108609s stack positions out of 50000i,1000n,20000p,9000000b,2000000s Output written on body.dvi (65536 pages, 756696856 bytes). I was looking at using \includeonly by compiling each chapter one by one. This will limit the size of the DVI to only each chapter at time. I would need to edit index.tex by hand and change \includeonly until I finish all chapters. Here is MWE \documentclass{book} \ifdefined\HCode \includeonly{1} \fi \begin{document} \title{my title} \author{me} \date{\today} \maketitle % \tableofcontents \include{1} \include{2} \end{document} And 1.tex is \chapter{A} \section{A 1} some text And 2.tex is \chapter{B} \section{B 1} and some text Compiled using make4ht -ulm default -a debug index.tex "mathjax,htm,0" Now I edited index.tex again and changed \includeonly{1} to \includeonly{2} and saved the file. (made sure not to delete index.aux during this process). Then did make4ht -ulm default -a debug index.tex "mathjax,htm,0" But when I look at index.htm it only shows chapter 2. Chapter 1 is lost. I never used \includeonly before since not needed in PDF for me, as no problem compiling large pdf file. Is it possible to use this method to compile each chapter on its own to avoid the DVI limit and still get the final HTML page showing all chapters on it or is this not possible with tex4ht? TL 2026

  • How to have multiple hyperlinks in a TikZ picture with alt text and valid tagging?
    by Senex on June 30, 2026 at 10:02 am

    In the MWE below, the TikZ picture is a ‘roadmap’ showing how various lemmas combine in a proof (vastly simplified from my original), and I would like to have the hyperlinked \refs to the lemmas (which are spread over multiple pages in my original). But with alt={...}, VeraPDF complains that Link annotations that target different locations shall be in separate Link or Reference structure elements If I remove alt={...}, the PDF passes validation. If I change \ref to \ref* to remove the hyperlinks, the PDF passes validation. If there is only one hyperlink in the TikZ picture, the PDF passes validation. The same problem occurs replacing on alt={...} with artifact. I understand that tagging is in development, but is there any quick fix or workaround that allows multiple hyperlinks in a TikZ picture with alt text? (Or is there perhaps some fundamental incompatibility with tagging multiple hyperlinks inside a TikZ picture?) MWE: \DocumentMetadata{ pdfversion=2.0, pdfstandard=UA-2, lang=en-GB, tagging=on, } \documentclass{article} \usepackage{unicode-math} \usepackage{hyperref} \usepackage{tikz} \newtheorem{lemma}{Lemma} \title{Test} \begin{document} Roadmap of proving the theorem: \begin{tikzpicture}[alt={Roadmap}] \node (A) at (0,0) {$A$}; \node (B) at (2,0) {$B$}; \node (C) at (4,0) {$C$}; \draw[->] (A) edge node[auto] {Lem.~\ref{lem:ab}} (B); \draw[->] (B) edge node[auto] {Lem.~\ref{lem:bc}} (C); \end{tikzpicture} \begin{lemma} \label{lem:ab} If $A$, then $B$. \end{lemma} \begin{lemma} \label{lem:bc} If $B$, then $C$. \end{lemma} \end{document}

  • Why does physics enlarge brackets after \exp[...] but not after \log[...] or \ln[...]? [closed]
    by Firestar-Reimu on June 30, 2026 at 9:43 am

    I'm using the physics package and noticed an inconsistent behavior of its automatic delimiter feature. According to the package documentation, automatic bracing is extended to functions such as \exp, \log, \ln, \det, and \Pr. However, I found that parentheses and square brackets behave differently. Here is a minimal example: \documentclass{article} \usepackage{physics} \begin{document} \[ \exp[\frac{1}{x}] \] \[ \log[\frac{1}{x}] \] \[ \ln[\frac{1}{x}] \] \[ \det[\frac{1}{x}] \] \[ \Pr[\frac{1}{x}] \] \[ \exp(\frac{1}{x}) \] \[ \log(\frac{1}{x}) \] \[ \ln(\frac{1}{x}) \] \[ \det(\frac{1}{x}) \] \[ \Pr(\frac{1}{x}) \] \end{document} However, with the shorthand syntax, I observe the following behavior: \exp[...] → square brackets are automatically resized. \det[...] → square brackets are automatically resized. \Pr[...] → square brackets are automatically resized. \log[...] → square brackets are not resized. \ln[...] → square brackets are not resized. On the other hand, parentheses work correctly for all five functions: \exp(\frac{1}{x}) \log(\frac{1}{x}) \ln(\frac{1}{x}) \det(\frac{1}{x}) \Pr(\frac{1}{x}) all produce automatically sized parentheses. The physics manual only shows examples with parentheses, so I'm not sure whether the behavior for square brackets is intended. Also, if I use \ln\qty[\frac{1}{x}] and \log\qty[\frac{1}{x}], it can produce automatically sized parentheses. Question: Is this an intentional design choice, or is it a bug/inconsistency in physics? If intentional, why do \exp, \det, and \Pr accept automatic square brackets while \log and \ln do not?

  • Itemize bullets changed when loading fontsetup
    by rahotep on June 29, 2026 at 8:39 pm

    I am experiencing a unexpected interaction between the New Computer Modern fonts and the bullets used for itemize environments. They are replaced by squared bullets and I didn't see any reference about it the documentation. Here is a MWE % !TEX TS-program = lualatex \documentclass[12pt,a4paper]{article} \usepackage[sansdefault]{fontsetup} \usepackage{lipsum} \begin{document} \lipsum[1][1-5] \begin{itemize} \item item 1 \item item 2 \item item 3 \end{itemize} \lipsum[1][1-5] \end{document}

  • `memoize` and `PGFPlots`: multiple graphs get "merged" into one?
    by Thibault de Villèle on June 29, 2026 at 12:08 pm

    I've got a bunch of figures which are PGFPlots elements side by side, as such: \begin{figure}[ht]% \centering% \begin{subfigure}{.49\textwidth}% \centering% \sizedplot{../path/to/plot-dir/bunny-multires}{p1-rmse.tikz}% \end{subfigure}\hfill% \begin{subfigure}{.49\textwidth}% \centering% \sizedplot{../path/to/plot-dir/bunny-multires}{p1-times-graph.tikz}% \end{subfigure}\\[1pt]% % Note: the `bunny-multires-plot` key is defined as the "legend name" in p1-rmse.tikz: \pgfplotslegendfromname{bunny-multires-plot}% \caption{Blah, blah, blah.}% \label{fig/bunny-multires}% \end{figure}% Where the \sizedplot command is defined as such: \NewDocumentCommand{\sizedplot}{s O{\textwidth} m m}{% \bgroup% \def\basepath{#3}% \def\fullpath{\basepath/#4}% \mmznext{meaning to salt={\fullpath}}% \begin{memoize}% \IfBooleanTF{#1}% If star, do not resize to #2. {\begin{tikzpicture}\input{\fullpath}\end{tikzpicture}}% {\resizebox{#2}{!}{\begin{tikzpicture}\input{\fullpath}\end{tikzpicture}}}% \end{memoize}% \egroup% }% This indirection is mainly due to the fact I include data from CSV files relative to the path of the plots, like: \addplot table [options] {\basepath/losses.csv}. When doing this, and enabling external compilation through the use of the memoize package, both graphs (the subfigure elements) are detected as the same "source", leading to one of the graphs (often the second one in the order they were defined) being copied in both sub-figures after memoization + recompilation. What could go wrong here? I've added -- as shown above -- the full path as a source for the salt in memoize's options, hoping they would thus get detected as two different graphs, but nothing seems to make that specific use case work. If I only have one TikZ / PGFPlots image in a figure environment, it compiles just fine. Here is a MWE, with all contents laid inline (sorry, the file is a bit long as a result): \documentclass{scrarticle} \usepackage{subcaption} \usepackage{siunitx} \usepackage{tikz} \usepackage{pgfplots} % IMPORTANT: switch this on/off to see the changes. \usepackage{nomemoize} %\usepackage{memoize} \NewDocumentCommand{\ValeurLegende}{m}{\num[output-exponent-marker=e,tight-spacing=true]{#1}}% \NewDocumentCommand{\ValeurAnnotation}{m}{\bgroup\scriptsize\num[output-exponent-marker=e,tight-spacing=true]{#1}\egroup}% \mmzset{padding=0pt, include context in ccmemo, trace} \pgfplotsset{% rmse/.style={table/col sep=comma,table/x={iteration}, table/y={classic}},% timings/.style={table/col sep=comma,table/x={iteration}, table/y={time-ms}},% }% \NewDocumentCommand{\sizedplot}{s O{\textwidth} m m}{% \bgroup% \def\basepath{#3}% \def\fullpath{\basepath/#4}% \mmznext{meaning to salt={\fullpath}}% \mmznext{meaning to context={\fullpath}}% \begin{memoize}% \IfBooleanTF{#1}% If star, do not resize to #2. {\begin{tikzpicture}\input{\fullpath}\end{tikzpicture}}% {\resizebox{#2}{!}{\begin{tikzpicture}\input{\fullpath}\end{tikzpicture}}}% \end{memoize}% \egroup% }% \begin{filecontents}{inline-loss-1.csv} iteration,time-ms,loss-abs,loss-cen,loss-fro 0,217.78973,9.07334387e-02,3.75475502e-04,2.29247450e-03 1,13.39216,8.98691937e-02,3.73302639e-04,3.80451954e-03 2,11.54511,8.92234743e-02,3.69715272e-04,4.83295647e-03 3,11.24531,8.90074968e-02,3.68322566e-04,5.51446620e-03 4,11.06645,8.86987820e-02,3.66538385e-04,6.02372689e-03 5,11.16146,8.89326632e-02,3.68111941e-04,6.37550279e-03 6,11.35311,8.90174806e-02,3.68967390e-04,6.63577626e-03 \end{filecontents} \begin{filecontents}{inline-loss-7.csv} iteration,time-ms,loss-abs,loss-cen,loss-fro 0,440.79675,4.83646780e-01,8.67330883e-08,4.42878436e-03 1,120.62730,4.86005545e-01,9.31322575e-10,5.97733771e-03 2,121.23386,4.86002266e-01,9.31322575e-10,6.64955098e-03 \end{filecontents} \begin{filecontents}{inline-rmse-1.csv} iteration,classic,normalized,normalizedpercent 00000,2.43285656e-01,1.58218700e+00,158.22 00001,8.82571621e-04,2.21190803e-01,22.12 00002,8.10880039e-04,2.27497900e-01,22.75 00003,7.84764765e-04,2.19129181e-01,21.91 00004,7.73038832e-04,2.14945569e-01,21.49 00005,7.67099671e-04,2.28823943e-01,22.88 00006,7.63582473e-04,2.29091554e-01,22.91 \end{filecontents} \begin{filecontents}{inline-rmse-7.csv} iteration,classic,normalized,normalizedpercent 00000,2.43285656e-01,1.58218700e+00,158.22 00001,7.45367841e-04,1.91473720e-01,19.15 00002,6.76008989e-04,1.71335431e-01,17.13 \end{filecontents} \begin{filecontents}{inline-rmse.tikz} \begin{semilogyaxis}[% width=7cm,% height=5cm,% legend columns=7,% legend to name={plot-loss},% xtick pos=bottom,% ytick pos=left,% ylabel={\texttt{Losses}},% ]% \addplot table [rmse] {\basepath/inline-rmse-7.csv};% \addlegendentry{\(\epsilon=\ValeurLegende{1e-7}\)}% \addplot table [rmse] {\basepath/inline-rmse-1.csv};% \addlegendentry{\(\epsilon=\ValeurLegende{1e-1}\)}% \end{semilogyaxis}% \end{filecontents} \begin{filecontents}{inline-timings.tikz} \begin{semilogyaxis}[% width=7cm, height=5cm,% xtick pos=bottom, ytick pos=left,% ylabel={\(t_i~(\unit{\milli\second})\)}, log ticks with fixed point,% ]% \addplot table [timings] {\basepath/inline-loss-7.csv};% \addplot table [timings] {\basepath/inline-loss-1.csv};% \end{semilogyaxis}% \end{filecontents} \begin{document} \begin{figure}[ht]% \centering% \begin{subfigure}{.49\textwidth}% \centering% \sizedplot{.}{inline-rmse.tikz}% \end{subfigure}\hfill% \begin{subfigure}{.49\textwidth}% \centering% \sizedplot{.}{inline-timings.tikz}% \end{subfigure}\\[1pt]% \pgfplotslegendfromname{plot-loss}% \caption{Blah, blah, blah.}% \label{fig/losses}% \end{figure}% \end{document} Passing include context in ccmemo and trace both helped me discover memoize does not expand the macro \fullpath when trying to memoize the second graph (inline-timings.tikz). Instead, it only receives this bit of code to generate the hash: Code: \IfBooleanTF {\BooleanFalse }{\begin {tikzpicture}\input {\fullpath }\end {tikzpicture}}{\resizebox {\textwidth }{!}{\begin {tikzpicture}\input {\fullpath }\end {tikzpicture}}} And since it is the same for both pictures, this means the second graph (encountered later) will be saved under the "common" hash when compiling for the first time, leading to the graphs being the same on the final PDF... Now that I've discovered the cause, I need to dig deeper into why it happens 🙂

  • mhchem negative charge signs changes in math environments
    by Bekir Şahin on June 29, 2026 at 10:18 am

    While using ce in the body, the - signs for the charge looks smaller. However, while using it in a math environment, the minus sign gets elongated and becomes more pronounced, which looks completely different than the previous one. I am using New CM, with lualatex. Is there a bypass for that? \ce{B-} \(\ce{B-}\), \ce{B+} \(\ce{B+}\), \ce{B^{2-}} \(\ce{B^{2-}}\), \ce{B^{2+}} \(\ce{B^{2+}}\)

  • Font package, and disabling feature in main document
    by True-Dig on June 29, 2026 at 1:59 am

    We packaged a font so it can be reusable in different documents (see below). Is it the right way to do it? Comments welcome. The package is then used by simply adding \usepackage{ourfont}. We tried to look at various font packages but it seems to vary much between implementations... In a document (so without modifying the package), we want to disable ligatures for non-italic, or maybe just disable the Discretionary ones, tbd. Again, what is the right way to do this? This font (legally) comes from Adobe and is split into several .otf files for weight/style/optical sizes, hence the complexity of the loading... This is first way we do this, and fontspec seems to offer many solutions. All comments welcome. Thanks. \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{ourfont}[2026-06-28] \RequirePackage{fontspec} \setmainfont{OurFont}[ NFSSFamily = OurFont, Numbers = {OldStyle,Proportional}, Ligatures = {Common,Discretionary}, UprightFeatures = { Font = *, SizeFeatures = { {Size = -8.9, Font = *-Capt}, {Size = 9.0-14.9, Font = *}, {Size = 15.0-22.9, Font = *-Subh}, {Size = 23.0-, Font = *-Disp}, }, }, ItalicFeatures = { Font = *-It, SizeFeatures = { {Size = -8.9, Font = *-ItCapt}, {Size = 9.0-14.9, Font = *-It}, {Size = 15.0-22.9, Font = *-ItSubh}, {Size = 23.0-, Font = *-ItDisp}, }, }, BoldFeatures = { Font = *-Bd, SizeFeatures = { {Size = -8.9, Font = *-BdCapt}, {Size = 9.0-14.9, Font = *-Bd}, {Size = 15.0-22.9, Font = *-BdSubh}, {Size = 23.0-, Font = *-BdDisp}, }, }, BoldItalicFeatures = { Font = *-BdIt, SizeFeatures = { {Size = -8.9, Font = *-BdItCapt}, {Size = 9.0-14.9, Font = *-BdIt}, {Size = 15.0-22.9, Font = *-BdItSubh}, {Size = 23.0-, Font = *-BdItDisp}, }, }, FontFace = {l}{n}{ Font = *-LtDisp, }, FontFace = {l}{it}{ Font = *-LtItDisp, }, FontFace = {sb}{n}{ Font = *-Smbd, SizeFeatures = { {Size = -8.9, Font = *-SmbdCapt}, {Size = 9.0-14.9, Font = *-Smbd}, {Size = 15.0-22.9, Font = *-SmbdSubh}, {Size = 23.0-, Font = *-SmbdDisp}, }, }, FontFace = {sb}{it}{ Font = *-SmbdIt, SizeFeatures = { {Size = -8.9, Font = *-SmbdItCapt}, {Size = 9.0-14.9, Font = *-SmbdIt}, {Size = 15.0-22.9, Font = *-SmbdItSubh}, {Size = 23.0-, Font = *-SmbdItDisp}, }, }, ]

  • Stacking diacritics to small capitals
    by Antonis on June 28, 2026 at 1:36 pm

    A user asked how to stack diacritics on small capitals in NewCM. Small capitals are accessible via scmp from lowercase and via c2sc from uppercase, but stacking fails. For example, when A is followed by U+0304 (combining macron) with c2sc enabled, the letter switches to the plain capital A. When U+0304 is removed, the small capital A is produced correctly. NewCM contains information for stacking diacritics on its small capitals as well, but it seems there is a bug in the engine, or something else is happening that I do not understand. Here is an MWE: \documentclass{article} \usepackage[default]{fontsetup} \begin{document} \addfontfeatures{RawFeature=+c2sc} \textsc{ā, ī, ū, ṭ, ḍ, ḷ, ṁ, ṃ, ṇ, ṅ, ñ} \textsc{a}̄ \textsc{a} A Ā \end{document} Notice that small-cap n with tilde works because this character is precomposed in the font, but we cannot expect the font to have all characters precomposed, which is why we need stacking. The output is erratic. The line \textsc{a}̄ does not result from stacking but from the negative width of the macron, which is why it is not centered. Note that you may find another font that produces correct output, but this will only be because it has the above characters precomposed. Stacking still fails. We cannot precompose everything.

  • Straight lines in a matrix
    by Andy Fletcher on June 28, 2026 at 12:14 pm

    I'm trying to draw straight lines in a matrix using nicematrix, and I achived the code: \documentclass{article} \usepackage{nicematrix,tikz} \begin{document} \begin{equation*} \begin{bNiceMatrix} \CodeBefore[create-cell-nodes] \begin{tikzpicture} %\draw[blue,-] (3-1) -- (4-2) ; %\draw[blue,-] (4-2) -- (3-4) ; \draw[blue,-] (3-1.north west) -- (4-2.south east) ; \draw[blue,-] (4-2.south east) -- (3-4.north east) ; \end{tikzpicture} \Body a_{11} & a_{12} & a_{13} & a_{14} \\ a_{21} & a_{22} & a_{23} & a_{24} \\ a_{31} & a_{32} & a_{33} & a_{34} \\ a_{41} & a_{42} & a_{43} & a_{44} \end{bNiceMatrix} \end{equation*} \end{document} My problem is the straight lines are not centered in the entries of the matrix (see image below); I considered also \draw[blue,-] (3-1) -- (4-2) ; \draw[blue,-] (4-2) -- (3-4) ; instead of \draw[blue,-] (3-1.north west) -- (4-2.south east) ; \draw[blue,-] (4-2.south east) -- (3-4.north east) ; but in this case the two line are not linked. Any hint (desirably keeping the matrix created by nicematrix)? Thanks.

  • 'atableau.ini' not found [closed]
    by Sebastiano on June 28, 2026 at 11:29 am

    I use the v. 2.2.1 of atableau. Using this code this morning \documentclass{article} \usepackage{tikz} \usepackage{atableau} \begin{document} \Tableau[color theme=classic,box style={minimum size=4mm}]{123,456,789} \end{document} I get the error: ! LaTeX Error: File 'atableau.ini' not found. For immediate help type H <return>. ... l.59 \ior_open:Nn \g_tmpa_ior { atableau.ini } ? What happened?

  • ! TeX capacity exceeded, sorry [save size=500000]. How to increase limit?
    by Nasser on June 28, 2026 at 7:16 am

    I have large document with many \label{} and another document which does reference on these. This below is MWE to produce this error I get on my real document ! TeX capacity exceeded, sorry [save size=500000]. I tried to increase it in texmf.cnf but had no effect. (did rehash and rebuild formats, etc...) Is this hardcoded in lualatex? Is there a way to increase it? I know how to rebuild lualatex from source. I just now do not know where to look for this limit if it is hardcoded there or not to change it. \documentclass{book} \usepackage{hyperref} \begin{document} \chapter{A} \directlua{ for i = 1, 800000 do tex.print("\\section{" .. i .. "}\\label{".. i .."}") tex.print("some text") end } \end{document} Compile with lualatex gives (/usr/local/texlive/2026/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty (/usr/local/texlive/2026/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty ))) (/usr/local/texlive/2026/texmf-dist/tex/latex/l3backend/l3backend-luatex.def) (./A.aux) (./A.out) (./A.out ! TeX capacity exceeded, sorry [save size=500000]. \Hy@pstringdef ...->\begingroup \edef ~{\string ~} \xdef \Hy@gtemp {\pdf@esca... l.499937 ...4\0009\0009\0009\0003\0006}{chapter.1} % 499937 382 words of node memory still in use: 2 hlist, 1 rule, 1 dir, 3 kern, 1 glyph, 3 attribute, 49 glue_spec, 3 attrib ute_list, 1 if_stack, 1 write nodes avail lists: 2:12,3:2,4:1,5:3,6:1,7:2,9:3 ! ==> Fatal error occurred, no output PDF file produced! Transcript written on A.log. > info >which lualatex /usr/local/texlive/2026/bin/x86_64-linux/lualatex >lualatex --version This is LuaHBTeX, Version 1.24.0 (TeX Live 2026) Development id: 7724 I asked google AI but it did not know.

  • How to draw a diagram in math-mode or in-line LaTeX?, for example, the following kind of diagram? What packages do I require? [closed]
    by Sagnik Roy on June 28, 2026 at 7:04 am

    I need to draw the following and similar kind of diagrams with labels inside an LaTeX article.

  • Display and execute Latex code with Piton
    by Mariuslp on June 27, 2026 at 10:36 pm

    I am trying to replicate an example in the nicematrix guide, using piton to display latex code, execute it, and add an annotation with the code. However, while the code gets correctly displayed and annotated, the matrix is not displayed. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%% MUST USE LuaLatex %%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass{article} \usepackage{amsmath} \usepackage{piton} % using github version from 2026-06-27 since 'annotation' key comes from oct. 2025 and is not available on overleaf yet % copy-pasted files piton.lua and piton.sty % Taken from https://github.com/fpantigny/nicematrix/blob/master/nicematrix.tex#L78 \let\myrlap\rlap \PitonOptions{language = verbatim, detected-commands = {myrlap, emph,textsl}, splittable = 4} \SetPitonStyle{ Number = , Comment = } \ExplSyntaxOn \dim_new:N \l__pantigny_width_dim \keys_define:nn { pantigny } { width .dim_set:N = \l__pantigny_width_dim , annotation .code:n = \PitonOptions { annotation = #1 } } \NewPitonEnvironment { Code } { O { } } { \char_set_catcode_other:N | \cs_set_eq:NN \emph \emphase \dim_zero:N \l__pantigny_width_dim \PitonOptions { annotation,indent-broken-lines,continuation-symbol=\empty,end-of-broken-line=\empty, continuation-symbol-on-indentation=\hspace{2em} } \keys_set:nn { pantigny } { #1 } \color{gray} \dim_compare:nNnT \l__pantigny_width_dim > \c_zero_dim { \PitonOptions { width = \l__pantigny_width_dim } \begin{minipage}[c]{\l__pantigny_width_dim} } } { \dim_compare:nNnT \l__pantigny_width_dim > \c_zero_dim { \end{minipage} } } \ExplSyntaxOff \begin{document} displays the code but not the matrix: \begin{Code}[width=9cm] $\begin{pmatrix} \frac{1}{2} & -\frac{1}{2}\\ \frac{1}{3} & \frac{1}{4} \\ \end{pmatrix}$ \end{Code} matrix can get normally displayed: $\begin{pmatrix} \frac{1}{2} & -\frac{1}{2}\\ \frac{1}{3} & \frac{1}{4} \\ \end{pmatrix}$ \end{document} What am I doing wrong? Alternatively, if there is a way to obtain a similar result with tcblisting (code displayed and executed + pdf annotation using e.g. pdfcomment, that works for me too. Bonus points for latex syntax highlighting.

  • Context: How to add small font verbatim text to image caption?
    by Nasser on June 26, 2026 at 11:59 pm

    I have been working with google AI on this for one hr, the AI even gave up and suggested I try tex stackexchange. I simply want to add caption to an image. Easy, right? but the trick part is that part of the caption is verbatim and in small font. Here is the latex version \documentclass{article} \usepackage{graphicx} \begin{document} \begin{figure} \centering \includegraphics[width=0.7\textwidth]{example-image-a} \caption[]{verview of EJB security concepts. \tiny{ejb\_sec\_1.vsd}} \end{figure} \end{document} Compiled with lualatex gives The problem is how to translate the caption to context. Here are two trials out of dozen or so and none of them worked. \starttext \placefigure {verview of EJB security concepts. {\tpx ejb\_sec\_1.vsd}}%caption {\externalfigure[dummy][width=0.7\textwidth]} \placefigure {verview of EJB security concepts. {\tpx\type{ejb_sec_1.vsd}}}%caption {\externalfigure[dummy][width=0.7\textwidth]} \stoptext Both give long compile errors. This below works \starttext \placefigure {verview of EJB security concepts. \type{ejb_sec_1.vsd}} {\externalfigure[dummy][width=0.7\textwidth]} \stoptext But I want the text ejb_sec_1.vsd to be in small/tiny font. And this is where google AI could not figure how to do it. It tried to explain to me why this works in Latex something related to immediate macro expansion but in context it is passing things to lua engine and all that. All of it was over my head. Is there a simple way to do this in context? TL 2026 on linux