• pgfplots: Adjust groupplot to text width
    by cis on February 11, 2026 at 9:28 am

    I have a 2×2 groupplot (where the first plot should be replaced by a title "Supertitle") with titles in boxes. These "title boxes" should all have the same width, and boxes in the same row should have the same height. I achieved this using \vphantom{} because I didn't find a better method. How can I configure the settings such that the entire groupplot has a width of \textwidth? And a horizontal space between the columns like \tabcolsep (or something similar)? Is there a elegant way to do this by package keys? (resizebox etc. would certainly work, but that would be less elegant.) Ideally, it should stay a groupplot. PS: I'm using DIN A5 format here, but that shouldn't matter if the keys are set correctly. \documentclass[paper=a5]{scrartcl} \usepackage[margin=14mm, showframe]{geometry} \usepackage{pgfplots} \usepgfplotslibrary{groupplots} \pgfplotsset{compat=1.18} \begin{document} \section{Plots with Titles and Supertitle} \pgfmathsetlengthmacro\plotwidth{0.5*\textwidth-\the\arraycolsep} \begin{tikzpicture}[font=\footnotesize] \begin{groupplot}[ % Grouupplot settings ================== group style={ group size=2 by 2, % 2 columns, 2 rows vertical sep=25mm, horizontal sep=15mm, }, % Styles applied to all subplots ============== width=\plotwidth, height=30mm, % Title Styles ========================== title style={% at={(0,1)}, xshift=-3ex, align=left, anchor=south west, inner xsep=2pt, draw, fill=none, text width=0.925*\pgfkeysvalueof{/pgfplots/width}, },% ] % Title (Row 1, Col 1) \nextgroupplot[ % I don't know how to get this box to the same height without this trick: title={\vphantom{Plot 0} \\ \vphantom{000} \\ \vphantom{000}}, title style={name=super}, hide axis, ] \addplot[draw=none, samples={0}]{x}; % Plot 0 (Row 1, Col 2) \nextgroupplot[title={Title 0 \\ 000 \\ 000}] \addplot{x}; % Plot 1 (Row 2, Col 1) \nextgroupplot[title={Title 1 \\ 2-111 \\ 3-111 \\ 4-111}] \addplot{x^2}; % Plot 2 (Row 2, Col 2) \nextgroupplot[title={Title 2 \\ 2-222 \\ 3-222 \\ \vphantom{4-111}}] \addplot{x^3}; \end{groupplot} %% Supertitle \node[font=\bfseries\Large] at (super){Supertitle}; \node[anchor=north west, draw=none, align=left,] at (super.south west){ Some notes \\ below Supertitle}; \draw[cyan, very thick, |-|] (group c1r2.west) -- +(\plotwidth,0) node[midway, below, fill=yellow]{plotwidth =\plotwidth}; %% This gives a 'Overfull \hbox ' warning ================== \draw[red, thick, |-|, ] ([yshift=5mm]group c1r2.west) -- +(2*\plotwidth,0) node[midway, above, fill=yellow]{2*plotwidth =\plotwidth}; \end{tikzpicture} \end{document}

  • Highlighting matrix multiplication
    by Dimitrios ANAGNOSTOU on February 10, 2026 at 11:58 pm

    I know there are several relevant questions on TeX Stack Exchange about nicely highlighting matrix multiplication, and some of them have excellent answers. I apologize if my question is a duplicate. I have managed to highlight the various entries manually, but it requires quite a bit of work. Is there a way to automate this procedure? \documentclass{article} \usepackage{amsmath, amssymb} \usepackage{xcolor} \usepackage[margin=1.5cm]{geometry} \begin{document} \section*{Matrix Multiplication} We want to compute the product \(AB\) for \[ A = \begin{bmatrix} 3 & 1 & -1 \\ -1 & 0 & 4 \end{bmatrix}, \quad B = \begin{bmatrix} 2 & 1 & 3 \\ -1 & 3 & 4 \\ 0 & 2 & 5 \end{bmatrix}. \] We can illustrate the multiplication as follows, highlighting each row of \(A\) and each column of \(B\): \[ \begin{array}{c@{\hspace{2em}}c@{\hspace{1em}}c} & \begin{bmatrix} \color{blue}{2} & \color{orange}{1} & \color{purple}{3} \\ \color{blue}{-1} & \color{orange}{3} & \color{purple}{4} \\ \color{blue}{0} & \color{orange}{2} & \color{purple}{5} \end{bmatrix} & \\[1em] % \begin{bmatrix} \color{red}{3} & \color{red}{1} & \color{red}{-1} \\ \color{green}{-1} & \color{green}{0} & \color{green}{4} \end{bmatrix} & = & \begin{bmatrix} \underbrace{\color{red}{3}\cdot \color{blue}{2} + \color{red}{1}\cdot \color{blue}{-1} + \color{red}{-1}\cdot \color{blue}{0}}_{\color{black}{5}} & \underbrace{\color{red}{3}\cdot \color{orange}{1} + \color{red}{1}\cdot \color{orange}{3} + \color{red}{-1}\cdot \color{orange}{2}}_{\color{black}{4}} & \underbrace{\color{red}{3}\cdot \color{purple}{3} + \color{red}{1}\cdot \color{purple}{4} + \color{red}{-1}\cdot \color{purple}{5}}_{\color{black}{8}} \\[0.5em] % \underbrace{\color{green}{-1}\cdot \color{blue}{2} + \color{green}{0}\cdot \color{blue}{-1} + \color{green}{4}\cdot \color{blue}{0}}_{\color{black}{-2}} & \underbrace{\color{green}{-1}\cdot \color{orange}{1} + \color{green}{0}\cdot \color{orange}{3} + \color{green}{4}\cdot \color{orange}{2}}_{\color{black}{7}} & \underbrace{\color{green}{-1}\cdot \color{purple}{3} + \color{green}{0}\cdot \color{purple}{4} + \color{green}{4}\cdot \color{purple}{5}}_{\color{black}{17}} \end{bmatrix} \end{array} \] Thus, the final product is \[ AB = \begin{bmatrix} 5 & 4 & 8 \\ -2 & 7 & 17 \end{bmatrix}. \] \bigskip \textit{Note:} \(BA\) is not defined because \(B\) is \(3\times 3\) and \(A\) is \(2\times 3\); the number of columns of \(B\) (3) does not match the number of rows of \(A\) (2). In general, \(AB \neq BA\). \end{document}

  • Another way to write powers?
    by Lara de Assumpcao Maffei Piero on February 10, 2026 at 10:43 pm

    My new keyboard writes ^ as ˆ, and overleaf doesn't recognize these the same way. Is there an alternative symbol in latex for writting powers and indexes or some way to make overleaf recognize ˆ as ^?

  • Numbering equations in dcases without \usepackage{empheq}
    by Sebastiano on February 10, 2026 at 9:09 pm

    At the moment, I don't remember how to number the equations inside dcases , with the amsart class, without empheq, in order to assign a label to each one. \documentclass{amsart} \usepackage{mathtools} \begin{document} \begin{subequations} \begin{equation} \begin{dcases} 0 \le \frac{u+v}{2} \le 1 \\ 0 \le \frac{v-u}{2} \le 1 - \frac{u+v}{2} \end{dcases} \iff \begin{dcases} 0 \le u+v \le 2 \\ \label{Psojjn} 0 \le v-u \le 2 - (u+v) \end{dcases} \end{equation} \end{subequations} \end{document} Addendum: My desidered output.

  • Creating Circular Domains with TikZ [closed]
    by Assuério Cavalcante on February 10, 2026 at 3:45 pm

    First, apologies if this question has been asked before. I'm trying to create an image of a particular circular domain, but my limited TikZ knowledge has made this quite challenging. I've searched for similar examples online without success. Any guidance would be greatly appreciated!

  • Interesting dashed lines
    by Dhairya Kumar on February 10, 2026 at 10:50 am

    While writing down the above expression on Overleaf, I encountered the problem of drawing the dashed line in between the Left Hand Side and the Right Hand Side expressions. Do help me in writing it exactly that way. (I had written it in my own unique way, but without the dashed line, and would be intrigued to know if such a function existed.) My code & Output: \documentclass{article} \usepackage{amsmath} \begin{document} ARCTAN TERMS: \[\boxed{\sqrt{2}\zeta_1+1 \to \infty \implies \tan^{-1}(\sqrt{2}\zeta_1+1)\rightarrow \dfrac{\pi}{2}}\text{ and } \boxed{\sqrt{2}\zeta_1+1 \rightarrow -\infty \implies \tan^{-1}(\sqrt{2}\zeta_1+1)\to \dfrac{-\pi}{2}}\] \[\boxed{\sqrt{2}\zeta_1-1 \to \infty \implies \tan^{-1}(\sqrt{2}\zeta_1-1)\rightarrow \dfrac{\pi}{2}}\text{ and } \boxed{\sqrt{2}\zeta_1-1 \rightarrow -\infty \implies \tan^{-1}(\sqrt{2}\zeta_1-1)\to \dfrac{-\pi}{2}}\] Hence, \[\text{ Arctan terms evaluates to } \frac{\sqrt{2}}{4}\left(\frac{\pi}{2}+\frac{\pi}{2}-\left(\frac{-\pi}{2}-\frac{\pi}{2}\right)\right)=\frac{\pi}{\sqrt2}\] \end{document} Output:

  • Rows of 'cases' environment too close to each other
    by Dhairya Kumar on February 10, 2026 at 6:10 am

    I have an issue in typing the above equation in LaTeX, where the two rows of the cases environment are so close that they almost touch. Help me do it in a clean way. Code: \[ \boxed{ \displaystyle\int\limits_{0}^{\pi/2}\sin^{n}{x}dx= \displaystyle\int\limits_{0}^{\pi/2}\cos^{n}{x}dx= \begin{cases} \dfrac{n-1}{n}\cdot\dfrac{n-3}{n-2}\cdots \dfrac45 \cdot\dfrac23 \text{ if $n$ is odd}\\ \dfrac{n-1}{n}\cdot\dfrac{n-3}{n-2}\cdots \dfrac34 \cdot\dfrac12\cdot \dfrac{\pi}{2}\text{ if $n$ is even} } \]

  • How can the roots of a quadratic equation be written in radical form?
    by Laurenso on February 10, 2026 at 3:52 am

    I am trying to express the roots of a quadratic equation `t^2-3t-7=0' in radical form. I tried \documentclass[12pt]{article} \usepackage{polexpr} \usepackage{xint} \begin{document} \poldef f(t) = t^2-3t-7; \xintdefvar a = (f(2)-2*f(1)+f(0))/2; \xintdefvar c = f(0); \xintdefvar b = reduce(f(1)-a-c); \xintdefvar delta = b^2 - 4*a*c; \xintdefvar t1=reduce((-b+sqrt(delta))/2/a); \xintdefvar t2=reduce((-b-sqrt(delta))/2/a); \[\xinteval{t1}, \quad \xinteval{t2}\] \[t=\frac{1}{2} \left(3-\sqrt{37}\right)\lor t=\frac{1}{2} \left(3+\sqrt{37}\right).\] \end{document} I got How can I get?

  • TikZ curved arrow bisecting text - how to increase arc height to clear obstacle?
    by Oregon Math Tutor on February 9, 2026 at 8:19 pm

    I'm annotating a fraction with TikZ arrows pointing to specific parts. The blue arrow works fine, but the red curved arrow is bisecting the "3" in the denominator instead of arcing over it. Current behavior: The red arrow cuts straight through the middle of "3" Desired behavior: The red arrow should arc upward and over the "3" with clear space. I initially tried adjusting the out angle from 160° to 120° to make it launch upward, but this still results in the arrow bisecting the number. How do I increase the arc height to make the curve clear the "3" completely as shown in the 2nd image? Note: I'm still learning TikZ best practices. If you spot any obvious improvements to the code structure, please mention them. MWE \usepackage{mathtools} \usetikzlibrary{calc, arrows.meta} \definecolor{textBlue}{RGB}{50, 50, 255} \definecolor{deepRed}{RGB}{200, 40, 40} \begin{document} \begin{tikzpicture} % Math fraction \node (fraction) at (0,0) { \scalebox{1.8}{% $\displaystyle \frac{2x^3 - 5x^2 - x + 3}{x + 3}$ } }; % Blue annotation (works fine) \node[ellipse, draw=textBlue, dashed, minimum width=0.3cm, minimum height=0.6cm, xshift=-0.4cm, yshift=0.4cm] (blueCircle) at ($(fraction.south) + (-0.65, 0.28)$) {}; \node[draw=textBlue, text=textBlue, align=center, anchor=north] (blueLabel) at ($(blueCircle.south) + (0, -0.6)$) {coefficient\\must be 1}; \draw[textBlue, ->, >=latex] (blueLabel.north) -- (blueCircle.south); % Red annotation (PROBLEM: arrow bisects the "3") \node[circle, draw=deepRed, dashed, minimum size=0.2cm, xshift=-0.2cm, yshift=0.3cm] (redCircle) at ($(fraction.south) + (-0.2, 0.55)$) {}; \node[draw=deepRed, text=deepRed, align=left, anchor=west] (redLabel) at ($(fraction.south) + (0.8, 0.3)$) {exponent\\must be 1}; % This arrow bisects "3" - how to make it arc higher? \draw[deepRed, ->, >=latex] (redLabel.west) to[out=120, in=0] (redCircle.east); \end{tikzpicture} \end{document}``` [1]: https://i.sstatic.net/zirlpD5n.png [2]: https://i.sstatic.net/BOIovYSz.png

  • Format enumitem inline list
    by user1 on February 9, 2026 at 2:18 pm

    Outgoing from the question Dropping separator at line break in an inline list I want to achieve some more things: Line breaks should (if possible) only be placed between items The list should have a left and right margin (maybe it is easier to not use an inline list?) The list should be centered There should be no vspace inserted above or below the list Note that \textperiodcentered is a separator, not a label (aka. bullet point) The list should be startet at a new line and end with a line break (Done, but I guess (2.) solves this automatically. MWE: \documentclass[a4paper]{article} \usepackage{showframe} \newcommand{\middot}{~\textperiodcentered~} \usepackage{enumitem} \newlist{skills}{itemize*}{1} \setlist[skills]{label={}, afterlabel={}, leftmargin=2cm, rightmargin=2cm, before={\newline}, after={\newline}, itemjoin=\discretionary{}{}{\hbox{\middot}}} %TODO leftmargin and rightmargin have no effect \setlength{\parindent}{0pt} \begin{document} Text before \begin{skills} \item This \item list \item should \item only \item break \item between \item items \item and not inside a longer item \item Also \item this \item list \item should \item be \item centered \item and \item indented \end{skills} text after \vspace{2cm} The desired output is: Text before (no vspace before the list) \vspace{-3mm} \begin{center} This\hbox{\middot}list\hbox{\middot}should\hbox{\middot}only\hbox{\middot}break\hbox{\middot}between \hbox{\middot}items and not inside a longer item\hbox{\middot}Also\hbox{\middot}this\hbox{\middot}list\hbox{\middot}should\hbox{\middot}be centered\hbox{\middot}and\hbox{\middot}indented \end{center} \vspace{-3mm} text after (no vspace after the list) \end{document}

  • Twisted Equality
    by Entropy on February 8, 2026 at 8:14 pm

    I am trying to create a new math symbol. Could someone please help me with it? My current code: \documentclass[12pt]{report} \RequirePackage{tikz} \newcommand{\eq}{\begin{tikzpicture}% [scale=.175, line width=0.5pt] \draw (-1,1) -- (0,0); \draw (0,1) -- (-0.5,0.5); \draw (0,-1) -- (-1,0); \draw (-0.5,-0.5) -- (-1,-1); \end{tikzpicture}} \begin{document} \[ u - \eq - u \] \end{document} However, the symbol I am actually going for is this: I was using it for something like this:

  • pgfplots: axis-enlargement at a ybar plot (example: binomial distribution)
    by cis on February 8, 2026 at 4:34 pm

    I wanted to adapt this nice solution for my purposes. • I want to extend the x- and y-axes a bit. But, when I set enlarge y limits={upper, abs=0.125} it creates a strange gap (ymin=0 is no longer respected, and restrict y to domain=0:1 seems to have no effect). • Secondly, what's the best way to configure it so that bars with very small y-values ​​are also visible here? • Unfortunately, I saw this too late: I would also like to eliminate this x-gap between the first bar and the y-axis! \documentclass[margin=5pt]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture}[font=\footnotesize, declare function={ binom(\n,\p,\k)=\n!/(\k!*(\n-\k)!)*\p^\k*(1-\p)^(\n-\k); } ] \begin{axis}[%y=8mm, no effect ymin=0, xmin=0, axis lines=left, axis line style={-latex}, xlabel={$k$}, ylabel={$P(X=k)$}, x label style={at={(axis description cs:1,0)}, anchor=south east, inner xsep=0pt }, y label style={at={(axis description cs:0,1)}, rotate = -90, anchor=north west, inner ysep=0pt, }, yticklabel style={ /pgf/number format/fixed, /pgf/number format/fixed zerofill, /pgf/number format/precision=2 }, ybar=0pt, bar width=1, bar shift=0pt, samples at={0,...,13}, variable=\k, enlarge x limits={upper, abs=0.785}, enlarge y limits={upper, abs=0.125}, %restrict y to domain=0:1,% no effect.... ] \addplot [fill=gray!25] {binom(13, 0.4, k)}; %\addplot [fill=orange, samples at={0,...,4}] {binom(12,0.4,k)}; %\addplot [fill=cyan, samples at={7}] {binom(12,0.4,k)}; \end{axis} \end{tikzpicture} \end{document}

  • How can I draw a coloured factorization diagram?
    by Bayaraa Surenjav on February 8, 2026 at 4:11 pm

    My code is: \documentclass[tikz,border=10pt]{standalone} \usepackage[utf8]{inputenc} \usepackage[mongolian]{babel} \usepackage{amsmath} \usetikzlibrary{calc, positioning, arrows.meta, backgrounds, shapes.geometric} \begin{document} \begin{tikzpicture}[ num node/.style={ font=\Large\bfseries\rmfamily, % Serif font, Bold anchor=east, inner sep=3pt, minimum height=0.65cm }, div node/.style={ font=\Large\rmfamily, anchor=east, inner sep=3pt }, arrow style/.style={ ->, >=latex, draw=cyan!80!blue, line width=0.8pt }, label text/.style={ text=cyan!80!blue, font=\itshape, align=right }, % Үйлдлийн тэмдэг (div 2) op label/.style={ text=cyan!80!blue, font=\large, anchor=west, xshift=2pt } ] \def\rowh{0.9} \node[div node] (d1) at (0,0) {2)}; \node[num node] (n1) at (1.8,0) {120}; \draw[thick] (d1.south east) -- (n1.south east); \node[div node] (d2) at (0,-\rowh) {2)}; \node[num node] (n2) at (1.8,-\rowh) {60}; \draw[thick] (d2.south east) -- (n2.south east); \node[div node] (d3) at (0,-2*\rowh) {2)}; \node[fill=cyan!25, inner sep=2pt, minimum height=0.6cm, minimum width=0.8cm, anchor=east] at (1.85,-2*\rowh) {}; \node[num node, text=magenta] (n3) at (1.8,-2*\rowh) {30}; \draw[thick] (d3.south east) -- (n3.south east); \node[div node] (d4) at (0,-3*\rowh) {3)}; \node[num node] (n4) at (1.8,-3*\rowh) {15}; \draw[thick] (d4.south east) -- (n4.south east); \node[num node] (n5) at (1.8,-4*\rowh) {5}; \begin{scope}[on background layer] % Зүүн талын босоо багана (Хуваагчдыг хамарсан) \fill[cyan!15] (-0.8, 0.4) rectangle (0.2, -4.5*\rowh); \fill[cyan!15] (-0.8, -3.65*\rowh) rectangle (2.2, -4.5*\rowh); \end{scope} \def\arm{0.5} \draw[arrow style] (n1.east) -- ++(\arm,0) |- node[pos=0.25, op label] {$\div 2$} (n2.east); \draw[arrow style] (n2.east) -- ++(\arm,0) |- node[pos=0.25, op label] {$\div 2$} (n3.east); \draw[arrow style] (n3.east) -- ++(\arm,0) |- node[pos=0.25, op label] {$\div 2$} (n4.east); \draw[arrow style] (n4.east) -- ++(\arm,0) |- node[pos=0.25, op label] {$\div 3$} (n5.east); \node[label text] (txt1) at (-3.5, 0) {анхны тоогоор хуваах}; \draw[arrow style] (txt1) -- (d1.west); \node[label text] (txt2) at (-4, -4*\rowh) {анхны тоо гартал үргэлжлүүлнэ}; \draw[arrow style] (txt2) -- (n5.west); \end{tikzpicture} \end{document} Current: Intended:

  • Equation with caption
    by palloc on February 8, 2026 at 12:01 pm

    I would like to add caption to my equation, how could I do that? \documentclass{article} \begin{document} \begin{equation} E = mc^2 \label{eq:emc} \end{equation} \ref{eq:emc} \end{document}

  • I would like to number subcases as well with 1a, 1b
    by palloc on February 8, 2026 at 11:12 am

    I have the following code, I would like to number the subcases with 1a, 1b, so not just one big case with (1). \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} f(x) = \begin{cases} x^2& x \ge 0,\\ -x & x < 0. \end{cases} \end{equation} \end{document}

  • Configure `keytheorems` so that it produces the same output as `ntheorem`
    by Denis Bitouzé on February 8, 2026 at 9:48 am

    For a class of mine, I'm in the process to switch from ntheorem to keytheorems but, for compatibility reason, I would like to make the output of “theorems” as identical as possible. Unfortunately, it is not the case, as shown in the following M( non realistic )CE: \RequirePackage{comment} \includecomment{kt}\excludecomment{nt} % \includecomment{nt}\excludecomment{kt} \documentclass{article} \usepackage[ textwidth=12.75cm, paperwidth=14cm, paperheight=2cm, showframe ]{geometry} \begin{kt} \usepackage{keytheorems} \newkeytheoremstyle{rmk-style}{ inherit-style=definition, notefont=\bfseries, headpunct={~--} } \newkeytheorem{rmk}[style=rmk-style,name=Remark] \end{kt} \begin{nt} \usepackage{ntheorem} \theoremstyle{plain} \theoremheaderfont{\normalfont\bfseries} \theorembodyfont{\normalfont} \theoremseparator{~--} \theoremsymbol{} \newtheorem{rmk}{Remark} \end{nt} \begin{document} \begin{rmk}[Euler's identity] One of the most beautiful mathematical equation: \[ e^{i\pi}+1=0 \] \end{rmk} \end{document} As it is (keytheorems in force), the output is the following: whereas, if the second line is commented and the third one is uncommented (ntheorem in force), the output is the following: How could I configure keytheorems in order it produces the same output as ntheorem?

  • Why do I keep getting "database doesn't exist" error when I try to read a csv with datatool \DTLread[name=gradesDB,format=csv]{data.csv}?
    by nt54 on February 8, 2026 at 5:33 am

    I'm trying to read a simple csv into a datatool database and then populate a table with this data. The persistent error is reported as "Package datatool error: Database 'gradesDB doesn't exist' in the TeXworks console output. I'm using the current TeXworks 2025 full/complete installation. The csv was encoded as uft-8. This csv file is named data.csv (NOTE: In the preview of this post this file appears in a single row format. It is actually written as a 4 row x 3 column form with the first three rows terminated by CRLF) Name,Surname,Grade Albert,Einstein,147 Marie,Curie,159 Thomas,Edison,179 I've consulted online AI and version 3.4.3 2025-12-04 of The Datatool Bundle: Databases and Data Manipulation from Dickimaw Books for documentation. This package is new to me and I have a feeling is there is a simple error I'm not catching. I greatly appreciate any help you might offer. Thanks in advance. \documentclass{article} \usepackage{datatool} \usepackage{booktabs} % Optional: provides better horizontal lines (\\toprule, \\midrule, \\bottomrule) \usepackage[utf8]{inputenc} \DTLloaddb{gradesDB}{data.csv} \begin{document} \section{Student Grades} % Load the CSV file into a database named 'gradesDB' %% Note the following command is now deprecated according to docs %% \DTLloaddb[autonum=false]{gradesDB}{data.csv} \DTLnewdb{gradesDB} \DTLread[name=gradesDB,format=csv]{data.csv} % Begin the table environment \begin{table}[h] \centering \caption{Grades of Students} \label{tab:grades} % Begin the tabular environment with column specifications \begin{tabular}{c c c } \toprule \textbf{Name} & \textbf{Surname} & \textbf{Grade} \\ \midrule % Iterate through each row in the 'gradesDB' database \DTLforeach*{gradesDB}{% \Name=Name,% \Surname=Surname,% \Grade=Grade% }{% % Format each row \Name & \Surname & \Grade \\ } \bottomrule \end{tabular} \end{table} \end{document} The log file: This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025) (preloaded format=pdflatex 2026.2.7) 8 FEB 2026 00:19 entering extended mode restricted \write18 enabled. %&-line parsing enabled. **test_read.tex (./test_read.tex LaTeX2e <2025-11-01> L3 programming layer <2026-01-19> (c:/texlive/2025/texmf-dist/tex/latex/base/article.cls Document Class: article 2025/01/22 v1.4n Standard LaTeX document class (c:/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 ) (c:/texlive/2025/texmf-dist/tex/latex/datatool/datatool.sty Package: datatool 2025/12/04 v3.4.3 (NLCT) (c:/texlive/2025/texmf-dist/tex/latex/base/ifthen.sty Package: ifthen 2024/03/16 v1.1e Standard LaTeX ifthen package (DPC) ) (c:/texlive/2025/texmf-dist/tex/latex/xfor/xfor.sty Package: xfor 2009/02/05 v1.05 (NLCT) ) (c:/texlive/2025/texmf-dist/tex/latex/etoolbox/etoolbox.sty Package: etoolbox 2025/10/02 v2.5m e-TeX tools for LaTeX (JAW) \etb@tempcnta=\count283 ) (c:/texlive/2025/texmf-dist/tex/latex/tracklang/tracklang.sty Package: tracklang 2025/03/11 v1.6.6 (NLCT) Track Languages (c:/texlive/2025/texmf-dist/tex/generic/tracklang/tracklang.tex)) (c:/texlive/2025/texmf-dist/tex/latex/datatool/datatool-base.sty Package: datatool-base 2025/12/04 v3.4.3 (NLCT) (c:/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. (c:/texlive/2025/texmf-dist/tex/latex/amsmath/amstext.sty Package: amstext 2024/11/17 v2.01 AMS text (c:/texlive/2025/texmf-dist/tex/latex/amsmath/amsgen.sty File: amsgen.sty 1999/11/30 v2.0 generic functions \@emptytoks=\toks17 \ex@=\dimen149 )) (c:/texlive/2025/texmf-dist/tex/latex/amsmath/amsbsy.sty Package: amsbsy 1999/11/29 v1.2d Bold Symbols \pmbraise@=\dimen150 ) (c:/texlive/2025/texmf-dist/tex/latex/amsmath/amsopn.sty Package: amsopn 2022/04/08 v2.04 operator names ) \inf@bad=\count284 LaTeX Info: Redefining \frac on input line 233. \uproot@=\count285 \leftroot@=\count286 LaTeX Info: Redefining \overline on input line 398. LaTeX Info: Redefining \colon on input line 409. \classnum@=\count287 \DOTSCASE@=\count288 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@=\box53 \strutbox@=\box54 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=\dimen151 LaTeX Font Info: Redeclaring font encoding OML on input line 742. LaTeX Font Info: Redeclaring font encoding OMS on input line 743. \macc@depth=\count289 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=\count290 \dotsspace@=\muskip17 \c@parentequation=\count291 \dspbrk@lvl=\count292 \tag@help=\toks18 \row@=\count293 \column@=\count294 \maxfields@=\count295 \andhelp@=\toks19 \eqnshift@=\dimen152 \alignsep@=\dimen153 \tagshift@=\dimen154 \tagwidth@=\dimen155 \totwidth@=\dimen156 \lineht@=\dimen157 \@envbody=\toks20 \multlinegap=\skip52 \multlinetaggap=\skip53 \mathdisplay@stack=\toks21 LaTeX Info: Redefining \[ on input line 2950. LaTeX Info: Redefining \] on input line 2951. ) \l__datatool_tmpa_int=\count296 \l__datatool_tmpb_int=\count297 \l__datatool_tmpc_int=\count298 \l__datatool_tmpd_int=\count299 \l__datatool_count_int=\count300 \l__datatool_tmp_datatype_int=\count301 \l__datatool_tmpa_dim=\dimen158 \l__datatool_tmpb_dim=\dimen159 (c:/texlive/2025/texmf-dist/tex/latex/datatool/datatool-l3fp.def File: datatool-l3fp.def 2025/12/04 v3.4.3 (NLCT) ) \@dtl@toks=\toks22 \@dtl@tmpcount=\count302 \dtl@tmplength=\skip54 \l__datatool_measure_box=\box55 \dtl@sortresult=\count303 (c:/texlive/2025/texmf-dist/tex/latex/datatool/datatool-utf8.ldf File: datatool-utf8.ldf 2025/12/04 v3.4.3 (NLCT) ) \@dtl@datatype=\count304 \c_datatool_unknown_int=\count305 \l__datatool_year_int=\count306 \l__datatool_month_int=\count307 \l__datatool_day_int=\count308 \l__datatool_hour_int=\count309 \l__datatool_minute_int=\count310 \l__datatool_second_int=\count311 \l__datatool_tzhour_int=\count312 \l__datatool_tzminute_int=\count313 \l__datatool_julian_int=\count314 \l__datatool_local_julian_int=\count315 \l__datatool_prefix_int=\count316 \l__datatool_suffix_int=\count317 \@dtl@foreach@level=\count318 \dtl@codeA=\count319 \dtl@codeB=\count320 ) \l__datatool_max_cols_int=\count321 \l__datatool_col_idx_int=\count322 \l__datatool_row_idx_int=\count323 \l__datatool_item_type_int=\count324 \l__datatool_action_column_int=\count325 \l__datatool_action_column_ii_int=\count326 \l__datatool_action_row_int=\count327 \l__datatool_action_row_ii_int=\count328 \l__datatool_action_type_int=\count329 \l__datatool_action_datum_round_int=\count330 \dtlcolumnnum=\count331 \dtlrownum=\count332 \@dtl@before=\toks23 \@dtl@after=\toks24 \@dtl@colhead=\toks25 \dtlcurrentrow=\toks26 \dtlbeforerow=\toks27 \dtlafterrow=\toks28 \l__datatool_map_data_max_cols_int=\count333 \l__datatool_map_data_edit_column_int=\count334 \dtlforeachlevel=\count335 \c@DTLrow=\count336 \c@DTLrowi=\count337 \c@DTLrowii=\count338 \c@DTLrowiii=\count339 \dtl@rowi=\count340 \dtl@rowii=\count341 \dtl@rowiii=\count342 \g__filtered_row_i_int=\count343 \g__filtered_row_ii_int=\count344 \g__filtered_row_iii_int=\count345 \@dtl@curi=\toks29 \@dtl@previ=\toks30 \@dtl@nexti=\toks31 \@dtl@curii=\toks32 \@dtl@previi=\toks33 \@dtl@nextii=\toks34 \@dtl@curiii=\toks35 \@dtl@previii=\toks36 \@dtl@nextiii=\toks37 \l_datatool_display_per_row_int=\count346 \l_datatool_display_tab_rows_int=\count347 \@dtl@toksA=\toks38 \@dtl@toksB=\toks39 \@dtl@elements=\count348 \__datatool_sort_data_sortcol_int=\count349 \__datatool_sort_data_grpcol_int=\count350 \dtl@omitlines=\count351 \l__datatool_line_int=\count352 ) (c:/texlive/2025/texmf-dist/tex/latex/booktabs/booktabs.sty Package: booktabs 2020/01/12 v1.61803398 Publication quality tables \heavyrulewidth=\dimen160 \lightrulewidth=\dimen161 \cmidrulewidth=\dimen162 \belowrulesep=\dimen163 \belowbottomsep=\dimen164 \aboverulesep=\dimen165 \abovetopsep=\dimen166 \cmidrulesep=\dimen167 \cmidrulekern=\dimen168 \defaultaddspace=\dimen169 \@cmidla=\count353 \@cmidlb=\count354 \@aboverulesep=\dimen170 \@belowrulesep=\dimen171 \@thisruleclass=\count355 \@lastruleclass=\count356 \@thisrulewidth=\dimen172 ) (c:/texlive/2025/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def File: l3backend-pdftex.def 2025-10-09 L3 backend support: PDF output (pdfTeX) \l__color_backend_stack_int=\count357 ) (./test_read.aux) \openout1 = `test_read.aux'. LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. \dtldb@grades=\toks40 \dtlkeys@grades=\toks41 \dtlrows@grades=\count358 \dtlcols@grades=\count359 ! Package datatool Error: Database `gradesDB' doesn't exist. See the datatool package documentation for explanation.

  • Passing key-value pairs to setuphead and doif... expansion of \structureuservariable
    by Gary on February 8, 2026 at 4:49 am

    I'm trying to pass values to the command declared in setuphead and evaluate them in the command. Following the example at https://wiki.contextgarden.net/Command/_startsection under the heading of "Settings (instance variant)", it appears that the key-value pairs are being passed to the command. However, I do not understand either how if/then/else works in ConTeXt and/or when commands are expanded to their values. In the example below, the MySection command works because the test is for whether or not a user variable of pw has any value or something like that. But the MySectionBroken command fails because the attempted test on the value of user-variable ct is always false and there is not pw for the scenario when ct is equal to character l. It appears that \structureuservariable{pw} is converted to its value in \starttabulate but \structureuservariable{ct} is not in the if test. I see the many, many doifelse... commands in the big book of ConTeXt commands but did not see anything on the wiki that describes how they function. Would please point me to where this is explained? Thank you. P.S. I should've explained that I'd like to pass a column type and, when it is paragraph, a column width. I need the section number to remain more left than the text when it wraps. And, even though I'd be glad to learn of other ways to accomplish this, I'd really like to understand how the conditionals work in ConTeXt. Thanks. \setuplayout[ height=4in, width=4in ] \define[2]\MySection{% \placetable[middle,none][]{}{ \doifelsesomething{\structureuservariable{pw}}{% \starttabulate[|l|p(\structureuservariable{pw})|][frame=on] }{% \starttabulate[|l|l|][frame=on] }% \NC #1 \NC #2 \NC \NR \stoptabulate} } \define[2]\MySectionBroken{% \placetable[middle,none][]{}{ \doifelsevalue{\structureuservariable{ct}}{l}{% \starttabulate[|l|l|][frame=on] }{% \starttabulate[|l|p(\structureuservariable{pw})|][frame=on] }% \NC #1 \NC #2 \NC \NR \stoptabulate} } \setuphead[section][ conversion=Romannumerals, sectionstopper={.}, command=\MySection, ] \starttext \startsection[title={Title One}][ct={l}] A paragraph \ldots \stopsection \startsection[title={Title Two}][ct={p},pw={30mm}] A paragraph \ldots \stopsection \startsection[title={Title Three is\\a Multi-liner}][ct={p},pw={50mm}] A paragraph \ldots \stopsection \stoptext

  • xypic loop error
    by underwhelmer on February 7, 2026 at 6:51 pm

    Here are two different bits of code that difer by exactly one letter: Number 1: \documentclass{amsart} \usepackage[all]{xy} \begin{document} \begin{displaymath} \xymatrix{ { \begin{tabular}{c|c} \hline $x_2$ & 7 \\ \hline $x_3$ & 4 \\ \hline \end{tabular} } \ar@(ul,dl)[]_{\pi^0} } \end{displaymath} \end{document} Number 2: \documentclass{amsart} \usepackage[all]{xy} \begin{document} \begin{displaymath} \xymatrix{ { \begin{tabular}{c|c} \hline $x_2$ & 7 \\ \hline $x_3$ & 4 \\ \hline \end{tabular} } \ar@(l,dl)[]_{\pi^0} } \end{displaymath} \end{document} The difference is that in number 2, the arrow is modified with @(l,dl) while in number 1 it is modified with @(ul,dl) Number 1 doesn't compile. Number 2 does but looks ugly. I'd like Number 1 to compile and look better than Number 2 in the way it should. Since I know it will come up: no, I'm not willing to switch to tikz. Yes, I know tikz is better. But I know the syntax for xypic and have been using it for sneaking up on twenty years and I just turned 40 and am thus officially allowed to be a stick in the mud about things.

  • MakeLowercase not working with lipsum
    by Jonathan Webley on February 7, 2026 at 9:34 am

    This MWE: \documentclass{article} \usepackage{lipsum} \begin{document} \MakeLowercase{\lipsum[1][1]} \end{document} generates: Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

  • Where is the l3benchmark.sty file located?
    by Alain Matthes on February 7, 2026 at 8:24 am

    I wanted to test an old file, but I got an error. ! LaTeX Error: File `l3benchmark.sty' not found. My distribution is up to date, so I assume this file has been removed. What can I replace it with? \RequirePackage{l3benchmark} \ExplSyntaxOn \AtEndDocument { \benchmark_toc: } \benchmark_tic: \ExplSyntaxOff \documentclass{article} \usepackage{tikz} \begin{document} \directlua{ function f(t0, t1, n) local filename = tex.jobname .. ".table" local out = assert(io.open(filename, "w")) for t = t0, t1, (t1 - t0) / n do local x = math.sin(5*t) local y = math.cos(3*t) out:write(x, " ", y, " i", string.char(10)) % or out:write(x, " ", y, " i\string\n") end out:close() end } \begin{tikzpicture}[scale=4] \directlua{f(0, 2*math.pi, 256)}% \draw[red] plot[smooth] file {\jobname.table}; \end{tikzpicture} \end{document}

  • How to make f\left(x\right) not add extra space after f?
    by Nasser on February 6, 2026 at 8:01 pm

    I tried all answers in Spacing around \left and \right and none of them work. I use code generate by computer CAS. And all the code generates \left(...\right). So not possible to do any manual editing of latex code generated. Only issue is that something like f\left(x\right) adds extra space between function name f and the parentheses. I am not talking about any space inside parentheses, but the space outside between function name and starting (. I only want this space to be the same as if code was written using f(x). Nothing else change. First, here is MWE showing the issue \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage{kpfonts,baskervald} \usepackage{amsmath} \begin{document} \begin{align*} \int \frac{dy}{g(y)} &= \int f(x) \, dx\\ \int \frac{dy}{g\left(y\right)} &= \int f\left(x\right) \, dx \end{align*} \end{document} Compiled with lualatex gives Notice how the space after function name is larger when using \left(...\right) which is the second equation. I'd like the space after function names and starting ( in the second equation to be same as first equation as it looks better. Below are all my tries. Some of them fix the space after g and not after f and some solution fix the space after f but not after g. But there is no solution which produce same exact output for second equation as the first one. Try 1 (accepted answer in the above link) \documentclass[12pt]{article} \let\originalleft\left \let\originalright\right \renewcommand{\left}{\mathopen{}\mathclose\bgroup\originalleft} \renewcommand{\right}{\aftergroup\egroup\originalright} \usepackage[T1]{fontenc} \usepackage{kpfonts,baskervald} \usepackage{amsmath} \begin{document} \begin{align*} \int \frac{dy}{g(y)} &= \int f(x) \, dx\\ \int \frac{dy}{g\left(y\right)} &= \int f\left(x\right) \, dx \end{align*} \end{document} Gives Notice the space after g in second equation have become too small. Try 2 \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage{kpfonts,baskervald} \usepackage{amsmath} \usepackage{mathtools} \DeclarePairedDelimiter\pars{\lparen}{\rparen} \begin{document} \begin{align*} \int \frac{dy}{g(y)} &= \int f(x) \, dx\\ \int \frac{dy}{g\left(y\right)} &= \int f\left(x\right) \, dx \end{align*} \end{document} Gives No effect. Larger space after function names still exist. Try 3 \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage{kpfonts,baskervald} \usepackage{amsmath} \let\originalleft\left \let\originalright\right \def\left#1{\mathopen{}\originalleft#1} \def\right#1{\originalright#1\mathclose{}} \begin{document} \begin{align*} \int \frac{dy}{g(y)} &= \int f(x) \, dx\\ \int \frac{dy}{g\left(y\right)} &= \int f\left(x\right) \, dx \end{align*} \end{document} Gives Again, now space after g is too small. Try 4 \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage{kpfonts,baskervald} \usepackage{amsmath} \Umathopinnerspacing\displaystyle=0mu \Umathopinnerspacing\textstyle=0mu \begin{document} \begin{align*} \int \frac{dy}{g(y)} &= \int f(x) \, dx\\ \int \frac{dy}{g\left(y\right)} &= \int f\left(x\right) \, dx \end{align*} \end{document} Gives Still, the space between function names and ( is not same in second equation as first equation. try 5 \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage{kpfonts,baskervald} \usepackage{amsmath} \def\delim#1#2#3{ \mathopen{\left#1 \vphantom{#2} \right.} \kern-\nulldelimiterspace #2 \kern-\nulldelimiterspace \mathclose{ \left. \vphantom{#2} \right#3 } } \begin{document} \begin{align*} \int \frac{dy}{g(y)} &= \int f(x) \, dx\\ \int \frac{dy}{g\left(y\right)} &= \int f\left(x\right) \, dx \end{align*} \end{document} Gives Still, the space between function names and ( is not same in second equation as first equation. Try 6 \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage{kpfonts,baskervald} \usepackage{amsmath} \usepackage{mleftright} \renewcommand{\left}{\mleft} \renewcommand{\right}{\mright} \begin{document} \begin{align*} \int \frac{dy}{g(y)} &= \int f(x) \, dx\\ \int \frac{dy}{g\left(y\right)} &= \int f\left(x\right) \, dx \end{align*} \end{document} Gives The space after f looks same as in equation 1, but the space after g in second equation is now too small.

  • Unequal parens sizes in numerator and denominator of a fraction
    by Knudsen on February 6, 2026 at 2:22 pm

    Why are the parens on the numerator of this construction much bigger than the ones in the denominator? \documentclass{report} \usepackage{amsmath} \begin{document} \[ \frac{\left(q^k\right)} {\left(q^k\right)} \] \end{document}

  • How to use the \convolution operator command provided by fontsetup with OpTeX? (using PUA glyphs in OpTeX)
    by Apoorv Potnis on February 6, 2026 at 11:38 am

    The fontsetup package provides with a \convolution operator command to access a big star symbol from the New Computer Modern fonts. However, fontsetup works only with XeLaTeX and LuaLaTeX. How does one access this glyph from the NewCM fonts with OpTeX? The \convolution command is defined in fspdefault.tex as \DeclareMathOperator*{\convolution}{\mathchoice{\char"E037}{\char"E036}{\char"E038}{\char"E039}}. The question essentially asks about using glyphs not encoded their Unicode slots (Private Use Areas?), as a Unicode slot for the glyph does not exist. LuaLaTeX MWE: \documentclass{article} \usepackage[newcmbb]{fontsetup} \begin{document} \[ \convolution_{1\le i\le n} a_i \] \[ \sum_{i=1}^n \convolution_{i=1}^n x_i \qquad \textstyle \sum\convolution_{i=1}^n x_i \qquad \scriptstyle \sum\convolution_{i=1}^n x_i \qquad \scriptscriptstyle \sum\convolution_{i=1}^n x_i \] \end{document}

  • Finding and displaying the intersection points of two surfaces
    by SH.Madadpour on February 6, 2026 at 10:23 am

    How can I display the intersection of the following two surfaces in LaTeX? I have used the following codes as a default but I am not getting acceptable output. Is it possible to create a form to find its intersection points in LaTeX? Thanks a lot. \documentclass[border=3.14mm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.16} \begin{document} \begin{tikzpicture} \begin{axis}[domain=0.01:30,xlabel=$x$] \addplot3[surf,domain={0:1},color=green]{x^3+y^3}; \addplot3[surf,domain={0:1},color=red]{(x*(1-y^2)^(.5)+y*(1-x^2)^(.5))^3}; \end{axis} \end{tikzpicture} \end{document}

  • Tikzcd's "crossing over" option and transparent backgrounds
    by Ben Steffan on February 5, 2026 at 8:55 pm

    I currently have the following simple setup for producing commutative diagrams using tikzcd and exporting them to .svg's, following the two most popular answers on this question: Put the code for the diagram in a standalone tex file. Compile. Convert to .svg using dvisvgm. This... works, mostly (better ideas are warmly welcome), but I'm running into one issue in particular that is slightly annoying. Consider the following example: \documentclass[crop,tikz]{standalone} \usetikzlibrary{cd} \begin{document} \begin{tikzcd} & & & \{1\} \ar[dd] \ar[dl] \\ \{0\} \ar[rr] \ar[dd] & & \{0, 1\} \\ & \{2\} \ar[dl] \ar[rr] & & \{1, 2\} \ar[dl] \\ \{0, 2\} \ar[rr] & & \{0, 1, 2\} \ar[from=uu, crossing over] \end{tikzcd} \end{document} If you compile this, the resulting pdf looks like this: Great, that looks fantastic. But if you now go and run dvisvgm yourfilenamehere.dvi and drop the resulting svg into something with a non-white background, you get this: This is bad for two obvious reasons: Text and background color are way too similar, and the crossing over arrow now lives on top of a white box. This box is an artifact of the way crossing over works, which simply adds a preaction to the arrow path that draws a background color colored rectangle. Consequently, both problems can be avoided by setting color and background color to something that works, see e.g. this answer. Suppose now, however, that I don't know what color the background of the document/website/etc. the svg will be embedded in has. Perhaps I know that it's going to be a dark background, so that setting the text color to white will take care of the first issue, but unless I know the precise shade of the background I can't set the crossing over box' color to perfectly match. My question, thus, is whether there is a (nice) way to solve this second issue when the final background color is not precisely known (if you have a way to dynamically alter the text color, I'd be happy to hear about it as well). (By "nice" here I mean that e.g. it's obviously possible to draw the two "pieces" of the arrow being crossed over separately and avoid crossing over entirely, but this seems to annoying to do in general unless there is some way to package it up into a flexible macro/tikz key).

  • Make perfect circular diagrams
    by Fran on February 5, 2026 at 12:23 pm

    I know that I can make circular diagrams with the nice smartdiagram package, but arrows do not fit perfectly in a imaginary circle. In fact, the diagram is far from a circle when there are only two or three nodes: \documentclass{standalone} \usepackage{smartdiagram} \begin{document} \smartdiagramset{ connection color=red, module shape= circle, circular distance=2cm, uniform color list=white for 6 items, uniform arrow color=true, arrow color=black} \smartdiagram[circular diagram:clockwise]{foo, bar} \end{document} I know also that there are several examples in this site about making circular diagrams without this package, but translating these examples to diagrams with a different numbers of nodes is complex, so I tried an automated solution with tikz (without really knowing what I was doing, I have to admit) so that I only have to modify a list of nodes in \mylist and little more to obtain the result: \documentclass[border=2mm]{standalone} \usepackage{tikz} \usetikzlibrary{arrows.meta} \begin{document} \begin{tikzpicture}[ > = Stealth, every node/.style = {circle, draw, thick, minimum width=1cm, align=center} ] \def\mylist{foo, bar, baz} % play with this \foreach \x [count=\i from 1] in \mylist {\xdef\n{\i}} \def\radio{2cm} % and this if needed \foreach \texto [count=\i from 0] in \mylist{ \pgfmathsetmacro\ang{-\i*360/\n} \node (n\i) at (\ang:\radio) {\texto}; } \foreach \dummy [count=\i from 0] in \mylist{ \pgfmathsetmacro\j{int(mod(\i+1,\n))} \pgfmathsetmacro\angini{-\i*360/\n} \pgfmathsetmacro\angfin{-\j*360/\n} \pgfmathsetmacro\outang{mod(\angini - 90 + 720, 360)} \pgfmathsetmacro\inang {mod(\angfin + 90 + 720, 360)} \draw[->, thick, line width=1.4pt] (n\i) to[out=\outang, in=\inang, looseness=.9] (n\j); % and with the looseness } \end{tikzpicture} \end{document} Mainly it works. The problem is that like in smartdiagram, the arrows don't perfectly follow an imaginary circle, that was the idea behind getting involved in this business. Playing with looseness is possible to correct a bit the curvature of the arrows, but it's tedious and the result is never perfect. So, the result should be ideally near to the image below (that I modified manually in Inkscape) and still require minimal settings to adapt the code to diagrams of n nodes. Fixes of the MWE as well as alternative approaches are welcome. Edit Thank you all for the excellent suggestions. This time, I am truly sorry I can only accept one.

  • LuaLaTeX: changing relative position of letter and its bounding box in math mode
    by Jinwen on February 5, 2026 at 11:26 am

    Using the code adopted from this answer, I am able to modify the position and width of \check, \widehat, etc. for various math characters (as a first step towards answering this earlier question). However, as one can see, the letters are not "centered" in the bounding box. As a result, the spacing between different letters and symbols appears strange. (For example, to make the symbols on top placed at right place, I have to move the letters via xoffset, but then its position relative to the bounding box is not quite appropriate.) With the keywords known to me as in that answer, it seems one could only move the letter, but not its bounding box. Is there some other keywords one could use in order to have more control over this situation? (Actually, just out of curiosity, may I also ask where can one find a list of available keywords/switches that can be tweaked?) Below is a MWE. \documentclass{article} \usepackage{kpfonts-otf} \usepackage{unicode-math} \usepackage{luacode} \begin{luacode*} local adjustments = { ["Asana-Math.otf"] = { ["𝐿"] = { xoffset = 0.03, -- yoffset = -0.5, width = 0.75, -- height = 0.5, -- depth = 0, }, ["𝑀"] = { xoffset = -0.05, -- yoffset = -0.5, width = 0.9, -- height = 0.5, -- depth = 0, }, ["𝑁"] = { xoffset = -0.05, -- yoffset = -0.5, width = 0.9, -- height = 0.5, -- depth = 0, }, } } do local data = io.loaddata(kpse.find_file("font-cff.lmt")) data = data:gsub("<const>", ""):gsub("pack_result_tagged =", "fonts.handlers.otf.pack_result_tagged =") load(data, "font-cff.lua", "t", luaotfload.fontloader)() end luatexbase.add_to_callback( "luaotfload.patch_font", function(tfmdata, specification, font_id) local path = tfmdata.specification.filename local filename = file.basename(path) local by_filename = adjustments[filename] if not by_filename then return end tfmdata.streamprovider = 1 local size = tfmdata.size local units_per_em = tfmdata.units_per_em for character, adjustment in pairs(by_filename) do local codepoint = utf8.codepoint(character) local index = tfmdata.characters[codepoint].index local character = tfmdata.characters[codepoint] local shapes = fonts.hashes.shapes[font_id].glyphs local streams = fonts.hashes.streams[font_id].streams local original_shape = shapes[index] local new_stream = fonts.handlers.otf.pack_result_tagged( original_shape.segments, original_shape.width, (adjustment.xoffset or 0) * units_per_em, -(adjustment.yoffset or 0) * units_per_em ) streams[index] = new_stream for _, dimen in pairs { "width", "height", "depth" } do if adjustment[dimen] then character[dimen] = adjustment[dimen] * size end end end end, "rewrite-characters" ) \end{luacode*} \setmathfont{Asana-Math.otf}[range={it/{Latin,latin},bfit/{Latin,latin},up/num,bfup/num}] \begin{document} \[ \check{L} \check{M} \check{N} \] \[ \widehat{L} \widehat{M} \widehat{N} \] \[ \widetilde{L} \widetilde{M} \widetilde{N} \] \fbox{\( L \)} \fbox{\( \check{L} \)} \fbox{\( \widehat{L} \)} \fbox{\( M \)} \fbox{\( \check{M} \)} \fbox{\( \widehat{M} \)} \fbox{\( N \)} \fbox{\( \check{N} \)} \fbox{\( \widehat{N} \)} \end{document}

  • Looking for a symbol like big \ast
    by Dimitrios ANAGNOSTOU on February 5, 2026 at 9:16 am

    The question is rather simple. How to obtain the following big asterisk symbol? I apologize if it is duplicate. Thank you very much.

  • Left-aligning lines of text to left edge of right-aligned line?
    by Dan Li on February 5, 2026 at 1:36 am

    What I’m trying to accomplish is best illustrated as follows: The first line (“Monday, December 22, 2025, 16:00 EST”) is right-aligned to the text width (possibly by \hfill, but not a hard requirement). The second line (“New York City, New York”) needs to be left-aligned to the left edge of that first line. In other words, the start of the M in “Monday” and N in “New York” are vertically aligned. How can this be done?