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

  • Special use of includegraphics
    by user209882 on February 9, 2026 at 11:02 pm

    How can I make the included image larger than the surrounding \fbox{\includegraphics{img.png}}? I need to include an image with a transparent background that "spills" into adjacent cells of a (tabular) table -- I don't need the fbox finally.

  • 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

  • A .tex file calling texMemo.cls does not compile correctly
    by John Godfrey on February 9, 2026 at 6:34 pm

    My .tex file fails to fully compile on my own systems, due to an error with \logo. Here's the relevant error: ./ccmeeting30JAN26.tex:36: Undefined control sequence. l.36 \logo {\includegraphics[width=0.3\textwidth]{aglogo.jpg}} % Institution ... On overleaf, it compiles and adds the logo with no problems. pdflatex is finding all the needed files, so that's not the problem, as far as I can tell. Let me know if you'd like to see the code. Also, I've used the texMemo class for a few years, and this is a new problem for 2026. I'm running texlive 2025, with all updates. Thanks much in advance for any help you may offer. John % http://www.LaTeXTemplates.com % % Original author: % Rob Oakes (http://www.oak-tree.us) with modifications by: % Vel (vel@latextemplates.com) % % License: % CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[letterpaper,11pt]{texMemo} % Set the paper size (letterpaper, a4paper, etc) and font size (10pt, 11pt or 12pt) \usepackage{parskip} % Adds spacing between paragraphs \setlength{\parindent}{15pt} % Indent paragraphs %---------------------------------------------------------------------------------------- % MEMO INFORMATION %---------------------------------------------------------------------------------------- \memoto{Children's Church Teachers} % Recipient(s) \memofrom{John F. Godfrey, Pastor} % Sender(s) \memosubject{30JAN26 Meeting Notes} % Memo subject \memodate{Friday, February 06, 2026} % Date, set to \today for automatically printing todays date \logo{\includegraphics[width=0.3\textwidth]{aglogo.jpg}} % Institution logo at the top right of the memo, comment out this line for no logo %---------------------------------------------------------------------------------------- \begin{document} \maketitle % Print the memo header information %---------------------------------------------------------------------------------------- % MEMO CONTENT %---------------------------------------------------------------------------------------- Katie, Linda, Denise \& Mary, Matthew 28:18-20 was the theme of the meeting. We are not getting as much feedback as we might like concerning our teaching. It may be good both to ask the students and their parents how they think/feel the class is going. Are they learning, having fun, enjoying the class, etc.. Our current curriculum - \emph{2 or More} - is good. Liked more by Mary, but okay with Denise and Katie. Linda likes the BGMC curriculum. There are no particular problems, needs, questions or requests. One thing brought up by Denise was the lesson suggestion to get down on the floor and play with the younger kids. Too difficult for her. But we reassured Denise that that was not needed, if it was not possible. All of the teachers believe that they are doing a good job. Salvation and Discipleship are the goals of teaching. ``The teacher hasn't taught until the student has learned.'' May the Lord bless His work in and through you! God bless!\\ \\ \\ Pastor John %---------------------------------------------------------------------------------------- \end{document}

  • polytonicgreek in LaTeX document Nr2
    by Marek Stepanek on February 9, 2026 at 4:33 pm

    Follow question of "polytonicgreek in LaTeX document" polytonicgreek in LaTeX document : I am working on a large text, with some old greek citations. Ulrike Fischer solved my problem, but unfortunately it is not working anymore. The Ancient Greek fonts are not found. My base is classicthesis: </usr/local/texlive/2025/texmf-dist/doc/latex/classicthesis> - compiling with XeLaTeX. Errors coming from Das griechische Wort \enquote{panta rhei} (\foreignlanguage{greek}{πάντα ῥεῖ}) ist zutreffend \enquote{alles fließt}. Latexmk: ====Undefined refs and citations with line #s in .tex file: Missing character: There is no ά (U+03AC) in font [texgyrepagella-regular.otf]/ Missing character: There is no ά (U+03AC) in font [texgyrepagella-regular.otf]/OT:script=latn;language=dflt;+onum;mapping=tex-text;! Missing character: There is no ῥ (U+1FE5) in font [texgyrepagella-regular.otf]/ Missing character: There is no ῥ (U+1FE5) in font [texgyrepagella-regular.otf]/OT:script=latn;language=dflt;+onum;mapping=tex-text;! Missing character: There is no ῖ (U+1FD6) in font [texgyrepagella-regular.otf]/ Missing character: There is no ῖ (U+1FD6) in font [texgyrepagella-regular.otf]/OT:script=latn;language=dflt;+onum;mapping=tex-text;! Some other configurations provoke: The font "New10-Book" cannot be found;. Or newcomputermodern not found. Changing the font with \usepackage{newcomputermodern} helps, but is changing completely the outlook of classicalthesis. Actually I am using in structure.tex: % \usepackage{fontspec} % \usepackage[greek.ancient,ngerman]{babel} % \usepackage{newcomputermodern} \usepackage[polytonicgreek,ngerman]{babel} % \usepackage[ancientgreek,ngerman]{babel} % \newfontfamily{\greekfont}{GFS Didot} % \babelfont[ancientgreek]{rm}{New10-Book} % \babelfont[polytonicgreek]{rm}{New10-Book} \babelfont[greek]{rm}{New10-Book} % \newfontfamily{\greekfont}{newcomputermodern} % \setTransitionsForGreek{\begingroup\greekfont}{\endgroup} I reinstalled with tlmgr the font newcomputermodern - But no help! There must be a problem with classicalthesis ... Thank you for your help marek

  • Watermark misplacement with standalone class
    by Erwann on February 9, 2026 at 3:51 pm

    When using the standalone document class with a shipout hook to add a watermark, it fails to display. Output using article class is OK. \documentclass{standalone} %\documentclass{article} \usepackage{tikz} \AddToHook{shipout/background}{ \begin{tikzpicture}[remember picture, overlay, text=red] \node[ rotate=45, scale=1, opacity=0.5, anchor=center, font=\large] at (current page.center) {WATERMARK}; \end{tikzpicture} } \begin{document} % Uncomment for class article %\vspace*{\fill} %\begin{center} \begin{tikzpicture} \draw[thick] (0,0) rectangle (5,3); \node at (2.5,1.5) {Content}; \end{tikzpicture} %\end{center} % article %\vspace{\fill} % article \end{document} P.S. This requires two compilation passes.

  • Local table of content versus the main / global table of content
    by albert on February 9, 2026 at 2:45 pm

    When I have the following MWE: \documentclass{book} \usepackage{hyperref} \usepackage[deeplevels]{etoc} \usepackage{lipsum} \begin{document} \tableofcontents \setcounter{tocdepth}{3} \part{User Manual} \chapter{Chap} \section{Sect} \subsection{SubSect} \lipsum[1] \setcounter{tocdepth}{0} \addtocontents{toc}{\protect\setcounter{tocdepth}{0}} \part{Appendices} \appendix \chapter{Chap app} %\etocsetnexttocdepth{5} \setcounter{tocdepth}{3} \localtableofcontents \setcounter{tocdepth}{0} \section{Sect app} \subsection{SubSect app} \lipsum[2] \chapter{Chap app2} %\etocsetnexttocdepth{5} \localtableofcontents \section{Sect app2} \subsection{SubSect app2} \lipsum[3] \end{document} The result for the left navigation tree and the general table of contents is as I would like to have it: But the local table of contents in the appendices only contains the word "Contents": When enabling the line: \etocsetnexttocdepth{5} does not help, only reseting the lines: \setcounter{tocdepth}{0} \addtocontents{toc}{\protect\setcounter{tocdepth}{0}} brings the local table of contents but also changes the main table of contents and the later in not wanted. How can I get the local table of contents without the extra entries in the main table of contents?

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

  • pgfplots: align legend entries at a groupplot
    by cis on February 9, 2026 at 2:09 pm

    I have a groupplot where I want to use the legend as the title in the \nextgroupplots. And then I have a "Supertitel" that I would like to put in place of the first groupplot. How do I set it such that the text, like the small box, is aligned to the top edge? \documentclass[margin=5pt, varwidth]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \usepgfplotslibrary{groupplots} \usetikzlibrary{patterns} \begin{document} \begin{tikzpicture}[font=\footnotesize, mypattern/.style={% postaction={pattern=north east lines}, },% ] \begin{groupplot}[ group style={% group size=2 by 3, vertical sep=15mm, },% height=30mm,width=55mm, group/every plot/.style={%% ybar=0pt, bar width=1, bar shift=0pt, xmin=-0.5,% to see the bar at x=0 correctly ymin=0, xtick=data, },%% end of group/every plot/.style %% every axis plot/.style={ fill=lightgray, area legend,% legend as title 1/2 }, legend style={% legend as title 2/2 at={(0,1)}, yshift=6pt, anchor=south west, draw=none, fill=none, inner sep=0pt, cells={anchor=north, align=left},% PROBLEM HERE ..... },% ] \nextgroupplot[hide axis=true, title={Supertitle}, title style={at={(0.5,0.5)}, anchor=center, yshift=-6pt,% kill pgfplots's default draw=none, font=\bfseries\Large} ] \addplot[draw=none, fill=none]{x};% to avoid warning; don't know how to make this else \nextgroupplot[] \addplot[samples at={0,...,8}, forget plot]{x}; \addplot[mypattern, samples at={3,...,6}]{x}; \addlegendentry{plot 0: \\ plot good, \\ legend bad :(} \end{groupplot} \end{tikzpicture} \end{document}

  • \raisebox does not seem to work in this math mode command
    by Jinwen on February 9, 2026 at 12:42 pm

    Consider the following example, in which I wish to define a command that draws a bold dot over a symbol (ideally, the first optional argument adjusts horizontal position, and the second adjusts vertical position). However, I cannot seem to get \raisebox work: no matter what length value I put in, the dot always remains at the current position. May I ask where have I done wrong, and how to fix it? \documentclass{article} \usepackage{mathtools} \begin{document} \NewDocumentCommand \dotted { O{0mu} O{-.1em} m } { \smash{\overset{\raisebox{#2}{\scalebox{.5}{$\mspace{#1}\bullet$}}}{#3}} } \( \dotted[5mu]{M} \) \end{document}

  • Suppress warning from xassoccnt.sty about calc.sty
    by Jabot on February 9, 2026 at 10:56 am

    I am using xassoccnt.sty for coupling counters for equations and exe environment from gb4e.sty. However, it emits a warning (no error) because of using calc earlier. This screws up the submission system process when I have to submit a raw LaTeX file. Is it possible to hack xassoccnt and suppress this warning? silence didn't help here. MWE (note: I need to have xifthen): \documentclass[a4paper,oneside,12pt,leqno]{article} \usepackage{amsmath,amssymb,amsthm} \usepackage{xifthen} \usepackage{etoolbox} \usepackage[svgnames]{xcolor} \usepackage{xpatch} \usepackage{gb4e} \usepackage{xassoccnt} \DeclareCoupledCountersGroup{figuretablelistings} \DeclareCoupledCounters[name=figuretablelistings]{equation,xnumi,exx} \begin{document} \begin{exe} \ex test \end{exe} \begin{equation} \label{eq:1} 99 \end{equation} \begin{exe} \ex test \end{exe} \end{document}

  • No hyphens used by babel's IAST to Devanāgarī transform?
    by muk.li on February 9, 2026 at 10:45 am

    The following MWE makes use of a babel transform from IAST to Devanāgarī script for Sanskrit text. \documentclass{article} \usepackage[english]{babel} \babelprovide[transforms=transliteration.iast]{sanskrit} \babelfont{rm}{Noto Serif} \babelfont[*devanagari]{rm}[Renderer=Harfbuzz]{Noto Serif Devanagari} \newcommand\sa[1]{\foreignlanguage{sanskrit}{#1}} \begin{document} \begin{otherlanguage}{sanskrit} athety ayam adhikārārthaḥ. yogānuśāsanaṃ śāstram adhikṛtaṃ veditavyam. yogaḥ samādhiḥ. sa ca sārvabhaumaś cittasya dharmaḥ. kṣiptaṃ mūḍhaṃ vikṣiptam ekāgraṃ niruddham iti cittabhūmayaḥ. tatra vikṣipte cetasi vikṣepopasarjanībhūtaḥ samādhir na yogapakṣe vartate. yas tv ekāgre cetasi sadbhūtam arthaṃ pradyotayati kṣiṇoti ca kleśān karmabandhanāni ślathayati nirodham abhimukhaṃ karoti sa saṃprajñāto yoga ity ākhyāyate. sa ca vitarkānugato vicārānugata ānandānugato 'smitānugata ity upariṣṭān nivedayiṣyāmaḥ. sarvavṛttinirodhe tv asaṃprajñātaḥ samādhiḥ. 1.1 \end{otherlanguage} \end{document} In the output, however, it seems that while automatic hyphenation is applied, the actual hyphens are missing. In this sample, one would have expected a hyphen at the end of the third line, निरोधम-भिमुखं. Of course, this is a question of conventions, and perhaps the current transformation was made with a convention in mind that hyphenates without actually using hyphens, such as was done in most manuscripts. In modern typesetting however I would expect hyphens to be used. Perhaps it is just a bug?

  • Using witharrows package [closed]
    by Dhairya Kumar on February 9, 2026 at 10:24 am

    I intended to write the arrowhead made by myself during a problem, namely on the right-hand side named 'King's rule' in any way. My typesetting skills aren't too brilliant to write it. Help me.(I was writing these in Overleaf within math mode)

  • Using xint in pgfplots (example: binomial distribution)
    by cis on February 9, 2026 at 9:26 am

    If I have a function with xint, say % \bdceval{<n>}{<p>}{<k>} \xintNewFloatExpr{\bdeval}[3]{% %B(n,p,k) = binomial(n,k)*p^k*(1-p)^(n-k) % formula binomial(#1,#3)*#2^#3*(1-#2)^(#1-#3)} this works well in text (e.g. \bdeval{13}{0.4}{5}); but how can I use that in pgfplots? In the following MWE I have drawn an example using pgfplots; the same curve should result with xint. \documentclass[margin=5pt, varwidth]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \usepackage{xintexpr} %\usepackage{xinttools}% needed? % \bdceval{<n>}{<p>}{<k>} \xintNewFloatExpr{\bdeval}[3]{% %B(n,p,k) = binomial(n,k)*p^k*(1-p)^(n-k) % formula binomial(#1,#3)*#2^#3*(1-#2)^(#1-#3)} % \bd[<digits, default: 4>]{<n>}{<p>}{<k>} \NewExpandableDocumentCommand{\bd}{O{4} mmm}{% %\xinteval{round(#2+#3+#4,2)}% for tests \xintRound{#1}{\bdeval{#2}{#3}{#4}}% rounded bd-values } \begin{document} \section{xint in Text (works)} $B(13,0.4,5) =\bdeval{13}{0.4}{5} \approx \bd{13}{0.4}{5}$ \par $B(1000,0.4,50) =\bdeval{1000}{0.4}{50} \approx \bd{1000}{0.4}{50}$ \section{xint in pgfplots (works not)} \begin{tikzpicture}[font=\footnotesize, declare function={ binom(\n,\p,\k)=\n!/(\k!*(\n-\k)!)*\p^\k*(1-\p)^(\n-\k);% works %xbinom(\n,\p,\k)=\bdeval{\n}{\p}{\k};% works not } ] \begin{axis}[ title={\texttt{xint} in pgfplots?}, title style={fill=blue!25}, xlabel={$k$}, ylabel={$P(X=k)$}, yticklabel style={ /pgf/number format/fixed, /pgf/number format/fixed zerofill, /pgf/number format/precision=2 }, xtick=data, variable=\k, only marks, ] \addplot+[samples at={0,...,13}] {binom(13, 0.4, k)}; % DOES NOT WORK %\addplot [samples at={0,...,13}] {\bd{13}{0.4}{\k} }; \end{axis} \end{tikzpicture} \end{document}

  • Value of half a normal space *at given location*
    by Rpy on February 9, 2026 at 7:53 am

    I am trying to reproduce a manuscript as “photographically” as possible. Sometimes words have been added after a first draft, above a line, centered in between two words. To get this, I used a \makebox with the width of \space and centered content, and within that box, I placed a \raisebox to place the added content vertically. It seemed to do the job just fine until I noticed that the length \space (or " ") which I wanted the box to have gives that box a fixed length (and after all you would indeed expect that in a box), whereas I would like the interword spacing to have the flexibility it has elsewhere, and just obtain a box in the middle of that flexible space. I first thought of a fix that would simply involve putting a half normal space on both sides of a box without width, but I find no such command seems to exist! (\, does not do that). Any ideas?

  • How To Remove Line Between 2 Indices (LaTEX imakeidx)
    by Dao Minh Duc on February 9, 2026 at 6:16 am

    I am trying to make an index of players like this: But after using imakeidx packages and style like below My preamble.tex: \usepackage{imakeidx} \makeindex[name=players, columns=1, options= -s style.ist] \makeindex[name=openings, columns=1, options= -s style.ist] My style.ist: preamble "" postamble "" heading_prefix "" heading_suffix "\n" item_0 "\n" item_1 "\n" item_2 "\n" delim_0 ", " delim_1 ", " delim_2 ", " My list are having a line gap between 2 indices. Please kindly help me to fix that issue and thank you very much!

  • How to create a rectangle without tikzpicture
    by PureVessel on February 9, 2026 at 5:44 am

    I'm translating Kazakh problems for the Art of Problem Solving forum, and I faced an obstacle with this problem: It translates like: Aigerim and Batyrkhan play the following game. There is a board of size $2\times2024$ (2 rows and 2024 columns). They take turns, with Aigerim moving first. On her move, Aigerim places a horizontal domino on the board $\boxed{\phantom{a}}\boxed{\phantom{a}}$, covering exactly two squares. On his move, Batyrkhan places a vertical domino on the board $\begin{aligned} \fbox{\rule{0pt}{1.2em}\hspace{1.2em}}[0em] \fbox{\rule{0pt}{1.2em}\hspace{1.2em}} \end{aligned}$, also covering exactly two squares. A player who cannot make a move loses. (Dominoes may be placed only on empty squares.) Who wins if both players play optimally? and I don't know how to do the vertical domino without separation between the squares. AoPS doesn't support features like tikzpicture, so I need to come up with a different method.

  • How do I fix unwanted blank spaces and stretched paragraph spacing when using tcolorbox inside a 9-column multicols environment?
    by hjmonbld on February 9, 2026 at 4:41 am

    When using tcolorbox within multicols, it prematurely breaks columns, resulting in unexpected large blank spaces (as shown in the image), and the paragraph spacing between body text becomes excessively stretched. Corresponding code: \documentclass{article} \usepackage[a4paper,left=0.7cm,right=0.7cm,top=0.5cm,bottom=0.9cm,footskip=6.9pt]{geometry} \usepackage{multicol} \usepackage{tcolorbox} \usepackage{lipsum} \usepackage{fontspec} \setmainfont{Noto Sans} \def\@textbottom{\vskip \z@ \@plus \textheight} \setlength{\parskip}{0pt plus 0.00001pt} \usepackage{tcolorbox} \tcbuselibrary{skins,breakable} \renewtcolorbox{quote}[1][]{ breakable, enhanced, frame hidden, colback=white, left=0.5em, right=0pt, top=0pt, bottom=0pt, sharp corners, before skip=0.5\baselineskip, after skip=0.5\baselineskip, overlay={ \draw[line width=0.3pt, black]([shift={(0.5em, -0.5em)}]frame.north west) -- ([shift={(0.5em, 0.5em)}]frame.south west); }, parbox=false, #1 } \begin{document} \fontsize{4pt}{0.1}\selectfont \begin{multicols}{9} \lipsum[1] \begin{quote} QUOTE: \lipsum[2-7] ENDQUOTE \end{quote} \lipsum[3] \begin{quote} QUOTE: \lipsum[4-9] ENDQUOTE \end{quote} \begin{quote} QUOTE: \lipsum[5-15] ENDQUOTE \end{quote} \lipsum[6] \begin{quote} QUOTE: \lipsum[5-15] ENDQUOTE \end{quote} \lipsum[6] \begin{quote} QUOTE: \lipsum[5-15] ENDQUOTE \end{quote} \lipsum[6] \begin{quote} QUOTE: \lipsum[5-15] ENDQUOTE \end{quote} \lipsum[1-7] \end{multicols} \end{document}

  • How can I horizontally align two math labels by their baseline in TikZ?
    by Jasper on February 9, 2026 at 2:27 am

    How can I horizontally align two math labels by their baseline in TikZ? \documentclass[tikz,border=1cm]{standalone} \begin{document} \begin{tikzpicture} \node[below] at (0,0) {\(\frac{1}{1}\)}; \node[below] at (1,0) {\(1\)}; \end{tikzpicture} \end{document}

  • Tagging & tcolorbox - wrapping with minimal width
    by LeO on February 9, 2026 at 1:54 am

    I try to generate some colored box with predefined text which contain line breaks. I want to have the box width at a minimum width, meaning the longest line should be taken and wrapped. I've tried different approaches (e.g varwidth) but I didn't find a solution which is compatible with PDF-tagging. My MWE \DocumentMetadata{ tagging=on, lang=en } \documentclass{article} \usepackage{varwidth} \usepackage[most]{tcolorbox} \newtcolorbox{infobox}{ colback=gray!10,hbox } \begin{document} \begin{infobox} \begin{varwidth}{\textwidth} \textbf{Text which should be wrapped} \\ some location \\ anywhere \end{varwidth} \end{infobox} \begin{infobox} \begin{tabular}{@{}l@{}} Alternate to varwidth ? \\ some location \\ anywhere \end{tabular} \end{infobox} \end{document} Can I add some code which would make the result a valid tagged PDF? (Or perhaps there is a different approach?)

  • Standard practices in label decluttering: overcoming overlapping label lines
    by Jasper on February 8, 2026 at 11:59 pm

    I have a situation where I want to lable the sample points of a line segment, and also label the smaller line segments connecting those sample points. My labels are really cluttered right now. How can I make this more proper? \documentclass[tikz,border=1cm]{standalone} \begin{document} \begin{tikzpicture} \draw[thick,->] (-1,0) -- (5,0) node[below left] {\(x\)}; \fill (0.5,0) circle[radius = 3pt] node[above] {point}; \fill[gray] (0.5,0) circle[radius = 1.5pt]; \draw[] (0.5,0) -- (0.5,-2) -- (5,-2) node[right] {individual sample point}; \draw[line width = 6pt] (2,0) -- (3.5,0) node[above,pos=0.5]{line segment}; \foreach[count = \c from 1] \x in {2,2.5,...,3.5} { \fill[gray] (\x,0) circle[radius = 1.5pt]; \draw[] (\x,0) -- (4,-1); \ifnum\c=4\else\draw[thick,gray] (\x,0) -- ++(0.5,0);\fi } \draw[](4,-1) -- (5,-1) node[right] {multiple sample points}; \foreach[count = \c from 1] \x in {2.25,2.75,...,3.25} { \draw[] (\x,0) -- (4,-1.5); } \draw[](4,-1.5) -- (5,-1.5) node[right] {one or more line segments}; \end{tikzpicture} \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:

  • How to add line numbers to not all lines?
    by rensemil on February 8, 2026 at 6:28 pm

    I am typesetting a play in LaTeX. I would like all the lines to be numbered but of course the stage directions etc. should be excluded from the line numbers. In MS Word, this is easily by telling word to exclude some lines from the numbering, it then looks like this: Is there a way to acheive this in LaTeX too? My preferred way would be to tell the document to have line numbers everywhere except: in lines where there are stage directions (maybe this can be done by some command?) in lines that consist only of headings (i.e. scene numbering etc.). The numbers should only start after the actual play starts, not yet in the Dramatis Personae. Thanks in advance for any help!

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

  • tikz euclides draw circle hung
    by Vuvi Numa on February 8, 2026 at 1:49 pm

    The MWE below freezes on the commented out line, until it is killed with Ctrl-C. This is a part of an old manuscript that was published, several years in the past, so at some point it did work. \documentclass{standalone} \usepackage{tikz} \usepackage{tkz-euclide} \begin{document} \begin{tikzpicture} \draw(-1,-1) rectangle(1,1); \tkzDefPoint(3,-1){A}; \tkzDefPoint(6,-1){B}; \tkzDefPoint(3,1){C}; %\tkzDrawCircle[in](A,B,C); \end{tikzpicture} \end{document} The last few lines of pdflatex output are: (/usr/share/texlive/texmf-dist/tex/latex/tkz-euclide/tkz-draw-eu-protractor.tex 2023/02/03 5.02c tkz-obj-eu-protractor.tex )) No file test.aux. (/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii [Loading MPS to PDF converter (version 2006.09.02).] ) (/usr/share/texlive/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty (/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg)) Missing character: There is no ; in font nullfont! Missing character: There is no ; in font nullfont! Missing character: There is no ; in font nullfont! ^C! Interruption. \pgfkeys@parse ...uturelet \pgfkeys@possiblerelax \pgfkeys@parse@main l.12 \tkzDrawCircle[in](A,B,C) ; How can I fix the freeze and allow the arch to be drawn?

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

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

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