• How to increase the radius/bend of the voltage label arrow in CircuiTikZ?
    by ankit kumar on June 1, 2026 at 11:17 am

    I am a beginner at using LATEX. I have a question about increasing/decreasing the radius/curve/bulge of the voltage arrow. I am creating a very simple RLC series circuit along with a DC voltage source. I have attached my code below: \begin{circuitikz} \draw (0,0) to [american voltage source, invert, l=$V_s$] (0,6) to [R, l=$R_1$] ++(2.5,0) to [L, l_=$L$] ++(2.5,0) to [C, l=$C$, i=$i_C$, v^<=$v_C$] ++ (0,-6) to [short] ++(-5,0); \draw (2.5,6) to [R, l=$R_2$, *-*] ++(0,-6); \draw (0,0) node[ground, label=west:G] (GND) {}; \end{circuitikz} The output of this code is: As you can see, the text C and the arrow of v_c are sort of overlapping each other. I can easily overcome this issue by bringing the label C to the left or by bringing the voltage arrow to the left. However, I would like to know how I can manipulate the curvature of the arrow itself. I went through the CircuiTikZ User Manual, and questions such as this, this, this, and this but I was unable to solve the issue. I look forward to the opinion of the advanced LATEX users.

  • garamondx not working in MacTeX 2026
    by Student on June 1, 2026 at 11:16 am

    In MacTeX 2026, using the package garamondx doesn't seem to work for me. I have: Installed all non-free fonts using the getnonfreefonts script Run sudo updmap-sys to update the font map files Made sure my updmap.cfg (at /usr/local/texlive/2026/texmf-config/web2c/) contains the line "Map zgm.map" My MWE (with mathdesign commented out because I have read it could cause issues) \documentclass{scrartcl} \usepackage[full]{textcomp} %\usepackage[garamond]{mathdesign} \usepackage{garamondx} \begin{document} Hello World \end{document} This does not compile with the following error: [Loading MPS to PDF converter (version 2006.09.02).] ) (/usr/local/texlive/2026/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty (/usr/local/texlive/2026/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg)) [1{/usr/local/texlive/2026/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (/Users/friedrich/Documents/LaTeX/Projekte/Garamond Test/.texpadtmp/Test.aux) ) !pdfTeX error: /Library/TeX/texbin/pdflatex (file T1-zgm-r-lf): Font T1-zgm-r-lf at 657 not found ==> Fatal error occurred, no output PDF file produced!

  • fbox/parbox works well for text, but refuses to print code listings
    by Reinhard Neuwirth on June 1, 2026 at 4:46 am

    \documentclass{article} % RN. 1 June 2026 % BRIEF DESCRIPTION: % fbox/parbox works well for text but refuses to print code listings. %====================================================================== \usepackage{listings} \usepackage{color} \definecolor{macroscolor}{rgb}{0.8,0.85,1} \begin{document} \noindent\fbox{% \parbox{\textwidth}{% fbox/parbox works well for text, but refuses to print listings. Is there a work-around? %\lstset{language=Python} %\begin{lstlisting}[basicstyle=\small,backgroundcolor=\color{macroscolor},commentstyle=\color{red}, %caption={}, %label= ] %>>>matrix = [[1, 2, 3,], [4, 5, 6,], [7, 8, 9,], ] %>>>matrix %[[1, 2, 3], [4, 5, 6], [7, 8, 9]] %>>>flat = [item for sublist in matrix for item in sublist] %>>>flat %[1, 2, 3, 4, 5, 6, 7, 8, 9] %\end{lstlisting} }% } \lstset{language=Python} \begin{lstlisting}[basicstyle=\small,backgroundcolor=\color{macroscolor},commentstyle=\color{red}, caption={}, label= ] >>>matrix = [[1, 2, 3,], [4, 5, 6,], [7, 8, 9,], ] >>>matrix [[1, 2, 3], [4, 5, 6], [7, 8, 9]] >>>flat = [item for sublist in matrix for item in sublist] >>>flat [1, 2, 3, 4, 5, 6, 7, 8, 9] \end{lstlisting} \end{document}

  • Wrapping Text Around a Barcode within Minipage and Tikzpicture Environments
    by DDS on May 31, 2026 at 11:43 pm

    Consider the code: \documentclass[12pt,onecolumn,openany,final]{book} \usepackage[hmargin=0in,vmargin=0in,paperwidth=12.7525in,paperheight=9.25in]{geometry} \usepackage{pstricks,psvectorian,cabin} \usepackage{wrapfig} \usepackage{pst-barcode} \psset{unit=1in} \usepackage{tikz,xcolor} \usetikzlibrary{decorations.text} \usetikzlibrary{decorations.pathmorphing} \usetikzlibrary{positioning} \definecolor{myred}{RGB}{149, 7, 20} \definecolor{pylight}{RGB}{247, 235, 205} \definecolor{py}{RGB}{243, 224, 181} \definecolor{pydark}{RGB}{221, 182, 110} \definecolor{pyhighlight}{RGB}{254, 235, 204} \pgfdeclareverticalshading{parchment}{100bp}{% color(0bp)=(pydark); color(25bp)=(pydark); color(30bp)=(py); color(50bp)=(pylight); color(70bp)=(py); color(75bp)=(pydark); color(100bp)=(pydark)% } \pgfdeclareradialshading{rparchment}{\pgfpoint{0cm}{0cm}}{% color(0bp)=(pylight); color(13bp)=(pylight); color(20bp)=(py); color(40bp)=(pydark); color(60bp)=(pydark!50!black); color(100bp)=(black)% } \tikzset{ pencildraw/.style={% decorate, %decoration={% % random steps, segment length=1.1ex, amplitude=.5ex% % } }, drop shadow/.style={ blur shadow={% shadow xshift=.5pt, shadow yshift=-.5pt, shadow blur steps=9, shadow blur extra rounding=1.5pt% }, }, parchment fill/.style={ pencildraw, fill=pyhighlight, postaction={shading=parchment, opacity=1}, postaction={shading=rparchment, opacity=.7} } } \pagecolor{myred} \begin{document} \thispagestyle{empty} \setmainfont{Cabin} \noindent\begin{pspicture}(-6.37625,0)(6.37625,9.25) \psframe[fillcolor=myred,fillstyle=solid](-6.37625,0)(6.37625,9.25)% \psframe[linecolor=myred](-6.37625,0)(6.37625,9.25) % draws frame. \rput(-3.15,1.35){\begin{tikzpicture} \shade node[parchment fill, text width=14.15cm, text height=5.15cm, inner sep=.4, align=justify] {\hskip 12pt \begin{minipage}{5.25in}\vspace*{-155pt} {\fontsize{8.75}{8.25}\selectfont{This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. \begin{wrapfigure}{r}{4.75cm} \psbarcode{0-89555-821-1}{backgroundcolor=FFFFFF borderleft=15 borderright=15 bordertop=14 borderbottom=10 textsize=8 includetext height=0.7 width=1.3125}{isbn}% \end{wrapfigure} This is a sentence to be repeated many times. This is a sentence to be repeated many times.}\par} \end{minipage}}; \end{tikzpicture}} \end{pspicture} \end{document} which produces Within the tikzpicture, I have a minipage wherein I am trying to wrap the text around the barcode which I would like to place in the bottom right-hand corner of the minipage. QUESTION: How may I modify the code which will allow me to place the barcode in the lower right-hand corner of the minipage surrounded by text above it and to the left of it? I must compile with xelatex. Thank you.

  • In my list of references, why would there be no line break within certain links but right before them leaving most of the line blank?
    by Simon on May 31, 2026 at 10:21 pm

    I am required to break the links within url{} to my references only after / or //, not after any other symbol that also might occur in a link. As can be seen in this post, this was achieved by adding \def\UrlBigBreaks{\do\/} to my code. Fixing this issue made another problem apparent though, as there would be no line break within certain links but right before them, leaving most of the line blank. How can this problem be resolved? By given guidelines, the list of references is to be formatted left-aligned without hyphenation, yet, links can include a line break after said symbols. Please see the following MWE and its output, especially Reference 1: \documentclass{article} \usepackage[hidelinks]{hyperref} \def\UrlBigBreaks{\do\/} \begin{document} {\raggedright \begin{thebibliography}{} \bibitem[Reference 1]{reference1} Available at \url{https://tex.stackexchange.com/one/two-three/four_five_six} \bibitem[Reference 2]{reference2} Available at \url{https://tex.stackexchange.com/seven-eight-nine/ten_eleven/twelve} \end{thebibliography} } \end{document} Context: This is a follow-up question to a question that I posted some time ago. I already asked this follow-up question back then in a comment to an answer to my original question, however, I have neither received a response to it nor have I found a solution to it myself in the meantime.

  • Getting rid of extra horizontal space after proofs
    by X3nius on May 31, 2026 at 8:53 pm

    How do I get rid of an extra horizontal space after proofs? \documentclass{article} \usepackage[english]{babel} \usepackage{amsthm} \begin{document} \begin{proof} This is the proof. \end{proof} The next line starts here. \end{document} leads to this

  • TeX Gyre Pagella font: italic parentheses are missing
    by Denis Bitouzé on May 31, 2026 at 6:23 pm

    It looks like the TeX Gyre Pagella font is missing italic parentheses: \documentclass{article} \usepackage{fontspec} \begin{document} \emph{(foo)} \setmainfont{texgyrepagella} \emph{(foo)} (\emph{foo}) \end{document} Am I missing something?

  • `hypertarget` fails to go back to show the right block due to `uncover`
    by Davide Masi on May 31, 2026 at 6:20 pm

    I want to recall a previous Corollary in a proof, but the corollary is included in \uncover<4-> and the link takes me back to the first version of the slide, where the corollary is not visible yet. I used hypertarget ad hyperlink instead of \cref (which is the one I knew) because I had some trouble with it. This is what Overleaf said, by the way: Package cleveref Warning: hyperref package loaded with implicit=false option - disabling cleveref's hyperref support. This situation is not supported by cleveref, and there's no guarantee anything will work. You're on your own! on input line 2370. Here is what happens and the code of this minimal working example: \documentclass{beamer} \usepackage{amsfonts,oldgerm} \usepackage[italian]{babel} \newtheorem{thm}{Teorema} \newtheorem{defn}[thm]{Definizione} \newtheorem{cor}[thm]{Corollario} \newenvironment{pf}[1][] { \begin{block}{Dimostrazione\if\relax\detokenize{#1}\relax\else\ (#1)\fi} } \setbeamercovered{invisible} \begin{document} \begin{frame}{prova} See \hyperlink{corollario}{Corollario}. \end{frame} \begin{frame}{La costante di Landau} \uncover<1->{ \begin{defn}[costante di Landau] My definition \end{defn} }% \uncover<2->{ \begin{cor}\hypertarget{corollario}{} My corollary \end{cor} }% \end{frame} \end{document}

  • How to include a white background photo (jpg) in a 10% gray background?
    by Learner on May 31, 2026 at 11:20 am

    I am using \includegraphics{photo.jpg} to upload a photo in a 10% gray background. For 10% gray background INSIDE border \fill[gray!10] ($(current page.north west) + (1cm,-1cm)$) rectangle ($(current page.south east) + (-1cm,1cm)$); To upload the photo (with white background, I used \node at ($(current page.south)+( 6cm,5.2cm)$) { \includegraphics{sig_digital.jpg} }; This produced the following photo: We can see the background is not matching, the photo has white background. I have one option, I can make the background to be white. But I want to keep the background gray while adjust the photo background. Edit: I am adding the full latex code: \documentclass[12pt,reqno]{amsart} %\documentclass [border = .2cm] {standalone} \usepackage{pgfplots} \usepackage{tikz} \pgfplotsset{compat=newest} \topmargin=0.02cm \textwidth = 17cm \textheight = 23cm \baselineskip=11pt \usepackage{color} \makeatletter \renewcommand*{\@cite}[2]{\fcolorbox{black}{white}{#1\if@tempswa, #2\fi}} %\renewcommand*{\@cite}[2]{\fcolorbox{green}{white}{#1, #2}} \renewcommand*{\@biblabel}[1]{{\fcolorbox{green}{white}{#1}}\hfill} \makeatother \setlength{\oddsidemargin}{0.01 pt} \setlength{\evensidemargin}{0.01 pt} \renewcommand{\baselinestretch}{1.4} \usepackage{amsmath,amsfonts,amssymb,amsthm} \usepackage{graphicx} \graphicspath{ } \usetikzlibrary{intersections} \usetikzlibrary{patterns} \usepackage{dsfont} \usepackage{amssymb} \usepackage{relsize} \usepackage{soul} \usepackage{exercise} \usepackage{lipsum} \usepackage{epstopdf} \usepackage{pdflscape} \usepackage{csquotes} \usepackage{wrapfig} \usepackage{accents} \usepackage{adjustbox} \usepackage{tikz-3dplot} \usepackage{caption} \usepackage{subcaption} \usepackage{calligra} \usepackage[colorlinks]{hyperref} \hypersetup{citecolor=black} \newtheorem{fig}{figure}[section] \numberwithin{figure}{section} \newcommand\norm[1]{\left\lVert#1\right\rVert} \theoremstyle{plain} \newtheorem{thm}{Theorem}[section] \newtheorem*{thm*}{Theorem} \newtheorem{lem}[thm]{Lemma} \newtheorem{prop}[thm]{Proposition} \newtheorem{cor}{Corollary}[thm] \theoremstyle{definition} \newtheorem{defn}{Definition}[section] \newtheorem{conj}{Conjecture}[section] \newtheorem{exmp}{Example}[section] \theoremstyle{remark} \newtheorem{rem}{Remark} \newtheorem*{note}{Note} \usepackage{mathtools} \makeatletter \@namedef{subjclassname@2020}{% \textup{2020} Mathematics Subject Classification} \makeatother \renewcommand\ExerciseName{Question~} \renewcommand\ExerciseHeader{% \noindent\parbox[t]{.18\textwidth}{% \bfseries\large\ExerciseName\ExerciseHeaderNB\hfill}% \parbox[t]{.72\textwidth}{% \centering\bfseries\large% \ExerciseHeaderTitle\ExerciseHeaderOrigin}% \par\medskip } \newcommand{\md}[1]{\hfill\makebox[0pt][r]{[#1]}} %md=mark distribution \begin{document} \thispagestyle{empty} \begin{tikzpicture}[remember picture,overlay] % Light gray background INSIDE border \fill[gray!10] ($(current page.north west) + (1cm,-1cm)$) rectangle ($(current page.south east) + (-1cm,1cm)$); % Border \draw[line width=3pt] ($(current page.north west) + (1cm,-1cm)$) rectangle ($(current page.south east) + (-1cm,1cm)$); \draw[line width=1pt] ($(current page.north west) + (1.2cm,-1.2cm)$) rectangle ($(current page.south east) + (-1.2cm,1.2cm)$); % Title % Title (no node name needed) \node at ($(current page.north)+(0,-2.5cm)$) { {\Huge \bfseries Certificate of Presentation} }; % Main underline \draw[line width=1.3pt, color=blue] ($(current page.north)+(-4.7cm,-3.35cm)$) -- ($(current page.north)+(4.7cm,-3.35cm)$); % End dots \fill[color=blue] ($(current page.north)+(-4.9cm,-3.35cm)$) circle (2.2pt); \fill[color=blue] ($(current page.north)+(4.9cm,-3.35cm)$) circle (2.2pt); % Left stem \draw[line width=0.7pt, color=blue] ($(current page.north)+(-5.05cm,-3.35cm)$) -- ($(current page.north)+(-5.22cm,-3.35cm)$); % Left upper leaf \draw[line width=0.7pt, color=blue] ($(current page.north)+(-5.22cm,-3.35cm)$) .. controls +(-0.14,0.14) and +(0.14,0.11) .. ($(current page.north)+(-5.72cm,-3.16cm)$) .. controls +(-0.14,-0.11) and +(-0.10,0.00) .. ($(current page.north)+(-5.22cm,-3.35cm)$); % Left lower leaf \draw[line width=0.7pt, color=green] ($(current page.north)+(-5.22cm,-3.35cm)$) .. controls +(-0.14,-0.14) and +(0.14,-0.11) .. ($(current page.north)+(-5.72cm,-3.54cm)$) .. controls +(-0.14,0.11) and +(-0.10,0.00) .. ($(current page.north)+(-5.22cm,-3.35cm)$); % Right stem \draw[line width=0.7pt, color=blue] ($(current page.north)+(5.05cm,-3.35cm)$) -- ($(current page.north)+(5.22cm,-3.35cm)$); % Right upper leaf \draw[line width=0.7pt, color=blue] ($(current page.north)+(5.22cm,-3.35cm)$) .. controls +(0.14,0.14) and +(-0.14,0.11) .. ($(current page.north)+(5.72cm,-3.16cm)$) .. controls +(0.14,-0.11) and +(0.10,0.00) .. ($(current page.north)+(5.22cm,-3.35cm)$); % Right lower leaf \draw[line width=0.7pt, color=green] ($(current page.north)+(5.22cm,-3.35cm)$) .. controls +(0.14,-0.14) and +(-0.14,-0.11) .. ($(current page.north)+(5.72cm,-3.54cm)$) .. controls +(0.14,0.11) and +(0.10,0.00) .. ($(current page.north)+(5.22cm,-3.35cm)$); \node at ($(current page.north west)+(10.7cm,-5.6cm)$) { \includegraphics[width=4cm]{DHU_logo.png} }; % Body Text (for presenters) \node[align=center, text width=21cm] at ($(current page.center)+(0,0.1cm)$) { \large This is to certify that \\[0.5cm] {\LARGE \textbf{Participant Name}} \\[0.3cm] {\large (Affiliated to XYZ University)} \\[0.3cm] has presented a research paper titled \\[0.3cm] {\large \bfseries ``Title of the Research Paper''} \\[0.3cm] at the \\[0.1cm] { \color{blue!60!black}{{ $\mathbb{T}\mathbb{W}\mathbb{O}-$$\mathbb{DAY}$ $\mathbb{WORKSHOP}$ $\mathbb{AND}$ $\mathbb{CONFERENCE}$ $\mathbb{IN}$ $\mathbb{MATHEMATICS}$}\\[0.25cm] $\mathbb{HONORING}$ $\mathbb{SRINIVASA}$ $\mathbb{RAMANUJAN}$}}\\[0.6cm] held at Darjeeling Hills University from 2--3 July 2026.\\[0.4cm] We appreciate his/her valuable contribution to the conference. }; % Signature Lines \node at ($(current page.south)+( 6cm,3.5cm)$) { \begin{tabular}{c} \rule{5cm}{0.4pt}\\ (Organizer Name) \\ Affiliation \end{tabular} }; %add digital signature \node[scale=0.9] at ($(current page.south)+( 6cm,5.2cm)$) { \includegraphics{sig_digital.jpg} }; \end{tikzpicture} \end{document} The output is as follows: Here is the photo link

  • Why making integral sign upright works for some fonts but not others?
    by Nasser on May 31, 2026 at 1:03 am

    I found this code (bottom of page) which makes the integral sign upright, which I like more than slanted integral sign \usepackage{scalerel} \let\oldint\int \DeclareMathOperator*{\uint}{\scalerel*{\rotatebox{8}{$\textstyle\oldint$}}{\oldint}} \renewcommand{\int}{\uint} I noticed it works on some fonts but not others. Why is that? Is there a way to make either the above code works on all fonts, or a better way to make the integral sign upright for all fonts? Below I give examples where it works and examples where it does not, depending on which font is used. I use only lualatex Here is without adding the code \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \[ \int \sin x \, dx \] \end{document} When adding the above code to the preamble, here is the output Here is an example when using different font than default it no longer works \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{scalerel} \let\oldint\int \DeclareMathOperator*{\uint}{\scalerel*{\rotatebox{8}{$\textstyle\oldint$}}{\oldint}} \renewcommand{\int}{\uint} \usepackage{unicode-math} \setmainfont{STIX Two Text} \setmathfont{STIX Two Math} \begin{document} \[ \int \sin x \, dx \] \end{document} Here is an example where it worked when trying another font. First without the code \documentclass[12pt]{article} \usepackage{amsmath} \usepackage[T1]{fontenc} \usepackage[math]{anttor} \begin{document} \[ \int \sin x \, dx \] \end{document} When adding the code, it changes OK Is there a better method than the above trick which works for all fonts?

  • vertically centered contents of tables
    by user516076 on May 30, 2026 at 11:53 pm

    I don't know what else to do, but I sense the items inside the cells are not vertically centered. I know some eyes might not notice that from far view, but I'm meticulous myself, apologise my ADHD. You can see, x is centered, but not with y which goes lower and those numbers which go too high up. This is the code that I go with: {\renewcommand{\arraystretch}{1} \begin{tabular}{|c|c|c|c|c|c|c|c|} \hline $x$ & $0$ & $1$ & $2$ & $3$ & $4$ & $5$ & $6$ \\ \hline $y$ & & & & & & & \\ \hline \end{tabular} } How to make it perfectly centered vertically?

  • Automatically shift arrow heads in TikZ for piecewise defined functions or gaps
    by CampanIgnis on May 30, 2026 at 7:40 pm

    The tip of arrow heads in TikZ usually extends on exactly the specified coordinate, for example in \draw[->] (0,0) -- (1,1);. Is it possible to align the center of the end mark automatically at the specified coordinate? This is useful for plotting piecewise defined functions using * or o as arrow heads such as in https://commons.wikimedia.org/wiki/File:Discontinuity_jump.eps.png. Another way to achieve a similar result is by calculating the coordinates of the points and adding the points manually by \filldraw[fill=white] (1,0.5) circle (0.75pt);. To illustrate what I would like to have: The center of the two circles should be in the middle of the two blue lines of the MWE. It would also be great if we could define certain x-values to set marks at exactly desired points. MWE \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows} \begin{document} \begin{tikzpicture}[scale=3] \draw[blue!25,line width=4.80pt] (0,-0.25) -- ++(0,1.25) (1,-0.25) -- ++(0,1.25) ; \draw[domain=0:1, smooth, variable=\x, samples=4, *-o] plot ({\x}, {0.55}); \draw[->] (0,0) -- (1,0); \end{tikzpicture} \end{document}

  • Why does this block become longer despite \uncover?
    by Davide Masi on May 30, 2026 at 3:29 pm

    I am preparing a Beamer using Overleaf. I would like to have a long block where statements appear as I proceed. Everything except \uncover<4-> seems to work well. I mean that when "Per il principio del massimo modulo..." appears, the block becomes longer. This is the only instance where it occurs. I'll add two screens; the difference is not that easy to catch from them but it is clear from the presentation. Why is this the case? How can I solve this issue? Note: the environment {pf}, which I defined, simply creates a block entitled "Dimostrazione", that is "proof" in Italian. \documentclass{beamer} \usepackage{amsfonts,amsmath,oldgerm} \usepackage{amsthm} %\usetheme{dmpisa} \usepackage[italian]{babel} \newcommand{\testcolor}[1]{\colorbox{#1}{\textcolor{#1}{test}}~\texttt{#1}} \usefonttheme[onlymath]{serif} %\titlebackground*{assets/background} \newcommand{\hrefcol}[2]{\textcolor{cyan}{\href{#1}{#2}}} \setbeamercovered{invisible} \newenvironment{pf}{ \begin{block}{Dimostrazione} % Titolo personalizzato senza punto }{ \end{block} } \begin{document} \maketitle \begin{frame}{Il Teorema di Bloch} \begin{pf} \uncover<1->{ Siano \(k:[0,1] \to \mathbb R^+\) tale che \(k(r)=\max\{|f'(z)|: |z|=r\}\) e \(h:[0,1] \to \mathbb R^+\) tale che \(h(r)=(1-r)~k(r)\). Allora \(h\) è continua perché \(|f'|\) è uniformemente continua su \(\overline{\mathbb D}, ~ h(0)=|f'(0)|=0, ~ h(1)=0\). }\\ \uncover<2->{ Sia dunque \(r_0=\sup\{r :h(r)=1\}\). Allora \(h(r_0)=1\), \only<2-3,5->{\( r_0 < 1\) e \(h(r)<1\) se \(r>r_0\)}\only<4>{\alert{\(r_0 < 1\)} e \alert{\(h(r)<1\) se \(r>r_0\)}}, per continuità di \(h\) e definizione di \(\sup\). }\\ \uncover<3->{ Sia \(a\) tale che \(|a|=r_0\) e \(|f'(a)|=k(r_0) =\frac{h(r_0)}{1-r_0}=\frac{1}{1-r_0}\). %a che realizza il massimo Sia \(\rho_0=\frac{1-r_0}{2} \implies \only<3-5>{|f'(a)| = \frac{1}{2\rho_0}}\only<6>{\alert{|f'(a)| = \frac{1}{2\rho_0}}}\). Se \(z \in B(a, \rho_0) \implies |z|\le|z-a|+|a|<\frac{1-r_0}{2}+r_0<\frac{1+r_0}{2}.\) }\\ \uncover<4->{ Per il principio del massimo modulo: \only<4->{\(\alert<6>{|f'(z)|} \le k(\frac{1+r_0}{2})=h(\frac{1+r_0}{2})\cdot(1-\frac{1+r_0}{2})^{-1}=\alert<4>{h(\frac{1+r_0}{2})\cdot(\frac{1-r_0}{2})^{-1}\alert<6>{<}(\frac{1-r_0}{2})^{-1}}=\alert<6>{\frac{1}{\rho_0}}.\)} %dove abbiamo usato che \frac{1+r_0}{2} > r_0 \implies h(\frac{1+r_0}{2})<1 %dove abbiamo usato che \frac{1+r_0}{2} > r_0 \implies h(\frac{1+r_0}{2})<1 \uncover<6->{ Quindi \(|f'(z)-f'(a)| \le \alert{|f'(z)|+|f'(a)| < \frac{1}{\rho_0}+\frac{1}{2\rho_0}}=\frac{3}{2\rho_0}\) per ogni \(z \in B(a, \rho_0)\). } } \end{pf} \end{frame} \end{document}

  • Treating math mode sections created with $ as groups for listofitems parsing
    by Devin on May 30, 2026 at 2:43 pm

    Newbie here. I would like to able to separate text into individual words that I can then iterate over, but with anything between $$ treated as a single unit. E.g. I would like to be to take something like some text including $text between$ dollar signs and split it into some text including $text between$ dollar signs, so that I could then, say, add an X before each unit: Xsome Xtext Xincluding X$text between$ Xdollar Xsigns Using \setsepchar{ } in listofitems gets me the separation into words, but also breaks up spaces in the math environments. I tried using xstring to replace instances of $<stuff>$ with {$<stuff>$} before passing the text to \readlist, which works in some situations but gives errors in math mode (which is exactly where I need this, see below). My end goal is to create a command that will allow for breakable text-mode within a math environment without needing to manually add \\. My idea is to have a command \breaktext{<some text>} which replaces each <word> in <some text> with \text{<word>}\allowbreak\. (I realize this will lead to some ugly formatting but it's good enough for my purposes.) Unfortunately, because of the nature of my project, sometimes the text I need to break up includes stuff that itself is in math mode (there isn't really a good way around this). (On that note, it would also be great if my \breaktext command just added \allowbreak\ after stuff that's already in math-mode.) Let me know if there's a different way to accomplish the end goal!

  • Changing the light blue background color of baposter template in overleaf
    by Hope on May 30, 2026 at 2:21 pm

    Here is the look of the template and the preamble has a lot of parts in it that I do not know exactly which part I should include here Any advice on how to do that? Here is a link to the poster template https://www.overleaf.com/project/69e151706bf3d752d1c5d88e

  • setspace package seems to affect the vertical space between the first item of a list and its preceding text
    by glenncounty on May 30, 2026 at 5:46 am

    I want to reduce the line spacing within an item or items. In example 2, \setstretch{1} has a side effect that the vertical space between the first item and its preceding text (2A) is also narrowed (compare with 1A without the command). Strangely, the space between the last item and its following text remains the same (1B and 2B). In other words, \setstretch{1} command affects the space between the first item and its preceding text. Shouldn't it be independent from the line spacing command? (enumitem package manual on page 3 says that the space before the first item depends on \topsep + \parskip [+ \partopsep] which is the same as the space after the last item.) How can I make the two spaces (1A and 2A) same while using \setstretch{1} command? Or, is there any other valid solution for this? (Of course, I know a not-a-beautiful one that I can manually add a space.) Here is the example code: % !TeX encoding = UTF-8 % !TeX spellcheck = en_US % !TeX TS-program = lualatex % !TeX TXS-program:bibliography = txs:///biber \documentclass[letterpaper,10pt]{article} \usepackage{setspace} \usepackage{enumitem} \begin{document} \setstretch{2} I want to reduce the line spacing within an item or items. In example 2, {\ttfamily\textbackslash{setstretch\{1\}}} has a side effect that the vertical space between the first item and its preceding text (2A) is also narrowed (compare with 1A without the command). Strangely, the space between the last item and its following text remains the same (1B and 2B). In other words, {\ttfamily\textbackslash{setstretch\{1\}}} command affects the space between the first item and its preceding text. Shouldn't it be independent from the line spacing command? ({\ttfamily{enumitem}} package manual on page 3 says that the space before the first item depends on {\ttfamily{{\textbackslash}topsep + {\textbackslash}parskip [+ {\textbackslash}partopsep]}} which is the same as the space after the last item.) \noindent Example 1: \begin{itemize} \item This is a very long item, which has more than one line. This is a very long item, which has more than one line. \item This is a very long item, which has more than one line. This is a very long item, which has more than one line. \end{itemize} This is the end of example 1. \noindent Example 2 with {\ttfamily\textbackslash{setstretch\{1\}}} command: %\vspace*{0.5\baselineskip} %I don't like this. \begin{itemize} \setstretch{1} \item This is a very long item, which has more than one line. This is a very long item, which has more than one line. \item This is a very long item, which has more than one line. This is a very long item, which has more than one line. \end{itemize} This is the end of example 2. How can I make the two spaces same while using {\ttfamily\textbackslash{setstretch\{1\}}} command? Or, is there any other valid solution for this? (Of course, I know a not-a-beautiful one that I can manually add a space.) \end{document}

  • combination of enotez and xurl and hyperref not working in XeLaTeX
    by MadyYuvi on May 30, 2026 at 5:25 am

    I'm using (thanks to egreg for his advise) \documentclass{article} \usepackage{enotez} \usepackage{xurl} \usepackage{hyperref} \begin{document} This is for test\endnote{“General Election: Trump vs. Biden,” RealClear Politics, accessed June 24, 2021, \url{https://www.realclearpolitics.com/epolls/2020/president/us/general_election_trump_vs_biden-6247.html#polls}.} \printendnotes \end{document} It works fine with PDFLaTeX but doesn't with XeLaTeX, can anyone advise how to achieve this with XeLaTeX? Please Either the usage of enotez or endnotes, both are fine for me

  • Incorrect page size calculation in standalone when using mhchem with labels above/below the arrow
    by Арсений Еремеев on May 29, 2026 at 10:12 pm

    I am rendering chemical equations to PDF and SVG using LaTeX. I need the page size to exactly match the size of the equation (no extra margins). I am using the standalone class with border=0pt. My code: \documentclass[12pt, border=0pt]{standalone} \usepackage[version=4]{mhchem} \usepackage{lua-visual-debug} % to visualize boundaries \begin{document} \ce{HPO3 ->[][A] Na3P3O9, Na3PO4} \end{document} What happens: I expect the bottom page boundary to run exactly along the bottom edge of the letter "A" (which is placed below the arrow). The actual boundary is lower — exactly where an invisible kern ends (the yellow rectangle shown by lua-visual-debug). This kern is not visible without debug, but standalone takes it into account when calculating the page size. How can I force standalone to ignore this unwanted kern, or to crop the page strictly to the visible elements (in this case, to the letter "A")? In my case, these equations will be embedded into the text on a website, so even a few points of difference matter.

  • Stylizing the mathematical fraction (afrc)
    by Lars Malmsteen on May 29, 2026 at 3:49 pm

    I'm trying to stylize the mathematical fraction in such a way that both the numerator and the denominator will automatically shrink to roughly fit the line height and preferably the digits will be expanded horizontally to occupy more horizontal space. Being away from the TeX for the last 2-3 years I've consulted an AI-assistent first and it suggested using the afrc (Alternative Fractions) and the font Adobe Caslon Pro which it said supported the afrc but that didn't work out and I gave up asking the AI. "Almost" MWE \documentclass{article} \usepackage{fontspec} \defaultfontfeatures{Ligatures={TeX,Common}} \setmainfont{Adobe Caslon Pro}[] % it's installed on my system \begin{document} gimme {\addfontfeatures{RawFeature=+afrc}1/10} of your money % afrc -> Alternative Fractions \end{document}

  • Left-aligned caption of a figure with subfigures (subcaption package)
    by Folco on May 29, 2026 at 2:21 pm

    I am asked to produce a document where a figure caption is placed above the figure, and left-aligned (even though it is just a one-line caption). By using the subcaption package and the \captionsetup command it works fine when the figure contains only one image. However, when the figure contains several sub-figures, the sub-captions are always left-aligned, like the main caption. I would like to have the main caption left-aligned but the sub-captions (which are very short) centred below each sub-figure. The following MWE illustrates the problem. Figure 1 is the standard. Figures 2 and 3 have the main caption left-aligned as required, but also the sub-captions come out left-aligned. \documentclass{article} \usepackage[document]{ragged2e} % For left-aligned (ragged right) text \usepackage{subcaption} \usepackage{graphicx} \usepackage{lipsum} \begin{document} \lipsum[66] \begin{figure}[h] \caption{Centered caption above figure} \label{fig:f01} \centering \begin{subfigure}{0.30\textwidth}\includegraphics[width=\textwidth]{example-image-duck}\caption{1st}\label{subfig:1st}\end{subfigure} \begin{subfigure}{0.30\textwidth}\includegraphics[width=\textwidth]{example-image-duck}\caption{2nd}\label{subfig:2nd}\end{subfigure} \begin{subfigure}{0.30\textwidth}\includegraphics[width=\textwidth]{example-image-duck}\caption{3rd}\label{subfig:3rd}\end{subfigure} \end{figure} \lipsum[66] \begin{figure}[h] \captionsetup{singlelinecheck=off,justification=raggedright} \caption{Left-aligned caption above left-aligned figure} \label{fig:f02} \begin{subfigure}{0.30\textwidth}\includegraphics[width=\textwidth]{example-image-duck}\caption{1st}\label{subfig:1stb}\end{subfigure} \begin{subfigure}{0.30\textwidth}\includegraphics[width=\textwidth]{example-image-duck}\caption{2nd}\label{subfig:2ndb}\end{subfigure} \begin{subfigure}{0.30\textwidth}\includegraphics[width=\textwidth]{example-image-duck}\caption{3rd}\label{subfig:3rdb}\end{subfigure} \end{figure} \lipsum[66] \begin{figure}[h] \captionsetup{singlelinecheck=off,justification=raggedright} \caption{Left-aligned caption above centered figure} \label{fig:f03} \centering \begin{subfigure}{0.30\textwidth}\includegraphics[width=\textwidth]{example-image-duck}\caption{1st}\label{subfig:1stc}\end{subfigure} \begin{subfigure}{0.30\textwidth}\includegraphics[width=\textwidth]{example-image-duck}\caption{2nd}\label{subfig:2ndc}\end{subfigure} \begin{subfigure}{0.30\textwidth}\includegraphics[width=\textwidth]{example-image-duck}\caption{3rd}\label{subfig:3rdc}\end{subfigure} \end{figure} \end{document} Thank you for your suggestions. Folco

  • Prevent LTeX+ from generating any info/warning messages while mantaining squiggly underline in the code
    by Elías Guisado Villalgordo on May 29, 2026 at 12:38 pm

    I am using VS Code with LaTeX Workshop and LTeX+ for spell checking. LTeX+ generates by default a ton of info messages like this: (Most of them false positives) I would like for it to stop generating these info messages. Here it is explained that a solution is to add "ltex.diagnosticSeverity": "hint" to the settings.json file. Nonetheless, as it is explained in the documentation, this makes any spotted spelling error not be underlined and rather only subtly marked. I would like for the errors in my code to still be underlined with a squiggly line (like with the default "ltex.diagnosticSeverity": "information" value). How could I achieve this?

  • How to make the double arrow style more like the `single arrow` in `shapes.arrows`?
    by Explorer on May 29, 2026 at 10:30 am

    What I want to replicate originally is something as below: Now my key point is the arrow of the following style, similar to the single arrow shape in shapes.arrows: \documentclass[tikz,border=5pt]{standalone} \usetikzlibrary{arrows.meta,positioning,shapes.arrows,decorations.markings} \begin{document} \begin{tikzpicture}[ node distance=2cm and 1cm, shrink/.style={shorten >=#1cm,shorten <=#1cm}, myarrow/.style={ shrink=.75,thick,-Stealth, postaction=decorate, decoration={ markings,mark=at position .5 with { \draw[shrink=0,-] (-10pt,-10pt) -- (10pt,10pt); } } }, mysinglearrow/.style={ shape=single arrow,minimum height=1.5cm,inner sep=3pt,draw,line width=1.2pt, } ] \node[draw] (betaII) {AAAAAAAA}; \node[draw] (betaI)[below left=of betaII]{BBBBBBBBB}; \node[draw] (normal)[below right=of betaII]{CCCCCCCCC}; \draw[myarrow] (betaII.west) -- (betaI.north); \draw[myarrow] (normal.north) -- (betaII.east); \draw[myarrow] (betaI) -- (normal); \node[mysinglearrow,rotate=45] at (-1.75,-1.5) {}; \end{tikzpicture} \end{document} However, that is not behave as a "arrow", but a shape. I dislike the syntax: \node[mysinglearrow,rotate=45] at (-1.75,-1.5) {}; Here below is the simplified version, based on the similar solution code here: % Source - https://tex.stackexchange.com/a/662285 \documentclass[tikz,margin=1cm]{standalone} \usetikzlibrary{arrows.meta} \tikzset{ doubleTriangle/.style args={#1 and #2 colored by #3 and #4}{ -Triangle, line width=#1,#3, postaction={ draw, -Triangle,#4, line width=#2, /utils/exec=\pgfmathsetlengthmacro{\doubleTriangleShortenStart}{((#1)-(#2))/2}, /utils/exec=\pgfmathsetlengthmacro{\doubleTriangleShortenEnd}{1.2*(sqrt(3))*((#1)-(#2))}, shorten <=\doubleTriangleShortenStart, shorten >=\doubleTriangleShortenEnd, }, }, } \begin{document} \begin{tikzpicture} \node[draw,below left] at (0,0) {A}; \node[draw,above right] at (5,5) {B}; \draw[doubleTriangle=1cm and 0.7cm colored by black and white] (0,0) -- (5,5); % \draw[doubleTriangle=1cm and 0.7cm colored by black and white,shorten >=.5cm,shorten <=.5cm] (0,0) -- (5,5); \end{tikzpicture} \end{document} which gives: Noted that the arrow's width is not the same. What I was after as an arrow style, is something as below: Any suggestions on how to make more elegant syntax of this arrow style?

  • Why does tex4ht give "! LaTeX Error: There's no line here to end", but lualatex does not?
    by Nasser on May 29, 2026 at 7:48 am

    This file compiles OK with lualatex using TeX Live 2026 on Linux: \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \begin{minipage}{\textwidth}\raggedright \textbf{Problem number} : 1\\ \textbf{Problem} : $$\begin{gathered}\begin{aligned} y^{\prime}&=2 x +1\\ y \left(0\right) &= 3\\ \end{aligned} \end{gathered}$$\\ \textbf{Date solved} : \verb|Friday, May 29, 2026 at 12:37:02 AM| \\ \end{minipage} \end{document} And gives PDF But when doing make4ht -ulm default -a debug 5.tex "mathjax,htm" it gives error (/usr/local/texlive/2026/texmf-dist/tex/generic/tex4ht/html5.4ht)) (/usr/local/texlive/2026/texmf-dist/tex/latex/l3backend/l3backend-dvips.def) (./5.aux) ! LaTeX Error: There's no line here to end. Should it not also compile clean using tex4ht? I removed the \\ after the \end{gathered}$$\\ and now tex4ht is happy and does not give error and also PDF output remained the same as before. So I will remove this \\ from my code now. But the question is this: Why does tex4ht complain about \end{gathered}$$\\, but lualatex does not? >which make4ht /usr/local/texlive/2026/bin/x86_64-linux/make4ht

  • \wideoverbar is raised oddly high over narrow contents. How can I avoid this behavior?
    by disjunction on May 29, 2026 at 2:53 am

    When \wideoverbar is applied to a wide input, e.g., \wideoverbar{\alpha\alpha}, \wideoverbar{\alpha\alpha\alpha}, the bar is visually very snug up against the input, and this looks correct to me. However, when \wideoverbar is applied to a narrow input like \alpha, the depicted bar is raised significantly. I think \wideoverbar looks significantly better than \bar and \overbar in general, and would like to use it on narrow contents for reasons to do with both aesthetics and consistency. So, I am looking to get the behavior of wide inputs with narrow inputs. As some examples, \wideoverbar{\alpha} is spaced poorly, \wideoverbar{\alpha\alpha} is spaced well, \wideoverbar{\alpha.} is spaced well, but \wideoverbar{\alpha\!.} is spaced poorly. \wideoverbar{..} is spaced poorly, but \wideoverbar{...} is spaced well. Evidently, there is some "switch" on the vertical height of the bar which somehow depends on the width of the contents. I am using Lualatex with Unicode math + Libertinus math, in case that is relevant. For reference, here is a minimized compilable example of what I am working with: % !TEX program = lualatex \documentclass{acmart} \begin{document} $\wideoverbar{\iota}$, $\wideoverbar{\iota\iota}$, $\wideoverbar{\iota\iota\iota}$, $\wideoverbar{\iota\iota\iota\iota}$ \end{document} I find the vertical spacing on the right highly preferable. I had previously posted the question on reddit.

  • How to have a macro that expands to make an empty height argument to `minipage`?
    by Reuben Thomas on May 28, 2026 at 10:34 pm

    I have a macro that uses a minipage environment. Sometimes I need to set the height of the minipage; other times, I want it to have its natural height. I therefore open the minipage thus: \begin{minipage}[c][\minipageheight]{\minipagewidth} where \minipageheight and \minipagewidth are suitable \newcommand definitions. But I cannot find a way to set \minipageheight so that the minipage has its natural height, which requires the call to become: \begin{minipage}[c][]{\minipagewidth} In other words, how do I define \minipageheight so that it expands to an empty argument? I tried \let\minipageheight\empty, and \renewcommand{\minipageheight}{}, but neither works.

  • How can I produce a sequence of luadraw frames using a for loop? The usual way I do it with tikz is not working
    by Jasper on May 28, 2026 at 3:39 pm

    How can I produce a sequence of luadraw frames using a for loop? The usual way I do it with tikz is not working. % Source - https://tex.stackexchange.com/a/755801 % Posted by nidarfp % Retrieved 2026-05-28, License - CC BY-SA 4.0 \documentclass[tikz,border=5pt]{standalone}% compile with lualatex only \usepackage[svgnames]{xcolor} \usepackage[3d]{luadraw}%https://github.com/pfradin/luadraw \usepackage{fourier-otf} %https://tex.stackexchange.com/questions/755458/how-can-you-draw-more-than-three-intersecting-planes-which-are-bounded-by-a-cube \begin{document} \foreach \i in {1,...,24} { \begin{luadraw}{name=intersecting_planes} local g = graph3d:new{ adjust2d=true,bbox=false, viewdir={30,70+\i*360/24} } g:Dboxaxes3d({grid=true,gridcolor="gray",fillcolor="lightgray", drawbox=true}) local style = function(color) return {color=color, scale=1,opacity=0.8} end g:Dscene3d( g:addPlane({Origin,vecK}, style("LightBlue")), g:addPlane({-vecI,vecI+vecK-vecJ/2}, style("Yellow")), g:addPlane({vecJ,vecJ+vecK-vecI/2}, style("Crimson")), g:addPlane({vecI-vecJ,-vecJ}, style("ForestGreen")), g:addPlane({vecK,-vecJ/3+vecK}, style("Navy")), g:addPlane({3*vecI,vecI}, style("Beige")) ) g:Show() \end{luadraw}} \end{document}

  • Nomenclature does not show with only \include sections
    by ProodjePindakaas on May 28, 2026 at 8:01 am

    I'm having trouble with the nomenclature not showing up when all content enters via an \include statement. It seems the nomenclature cannot be compiled independently, but needs some content before it. A minimal not working example is: % main.tex \documentclass{article} \usepackage{nomencl} \makenomenclature \begin{document} % content \include{content} % nomenclature \nomenclature{\(c\)}{Speed of light in a vacuum} \nomenclature{\(h\)}{Planck constant} \printnomenclature \end{document} where content.tex is file with just the word 'test': % content.tex test A minimal working example would be exchanging \include{content} with test. How can I have my nomenclature show up and neatly separate all preceding sections with \include without having to add extraneous content?

  • How could make inkscape input path as single path but not filled area?
    by Explorer on May 28, 2026 at 5:10 am

    The question is similar to this classical one. I followed the following instructions with inkscape and svg2tikz: Procedure: import your bitmap image. vectorize it by Inkscape (potrace algorithm). delete bitmap image. adjust document to content. export it by inkscape2tikz extension. Then, export the svg figure with svg2tikz, it give me the following: \documentclass[tikz]{standalone} \begin{document} \def \globalscale {1.000000} \begin{tikzpicture}[y=1cm, x=1cm, yscale=-\globalscale,xscale=\globalscale, every node/.append style={scale=\globalscale}, inner sep=0pt, outer sep=0pt] \path[fill=black] (8.9, 20.3).. controls (8.8, 20.3) and (8.7, 20.2) .. (8.6, 20.2).. controls (8.6, 20.2) and (8.4, 20.2) .. (8.2, 20.2).. controls (8.1, 20.2) and (7.9, 20.1) .. (7.9, 20.1).. controls (7.8, 20.1) and (7.6, 20.0) .. (7.5, 20.0).. controls (7.4, 20.0) and (7.3, 20.0) .. (7.2, 20.0).. controls (7.2, 19.9) and (7.1, 19.9) .. (7.0, 19.9).. controls (6.8, 19.8) and (6.2, 19.5) .. (6.1, 19.5).. controls (6.1, 19.4) and (6.0, 19.4) .. (6.0, 19.4).. controls (5.9, 19.4) and (5.9, 19.3) .. (5.8, 19.3).. controls (5.8, 19.3) and (5.8, 19.3) .. (5.7, 19.2).. controls (5.7, 19.2) and (5.6, 19.2) .. (5.5, 19.1).. controls (5.4, 19.0) and (5.3, 19.0) .. (5.3, 18.9).. controls (5.1, 18.8) and (4.3, 18.1) .. (4.2, 18.0).. controls (4.2, 18.0) and (4.1, 17.9) .. (4.0, 17.8).. controls (3.9, 17.8) and (3.8, 17.6) .. (3.7, 17.6).. controls (3.6, 17.5) and (3.4, 17.3) .. (3.3, 17.2).. controls (2.7, 16.6) and (2.2, 16.1) .. (1.8, 15.5).. controls (1.7, 15.5) and (1.7, 15.4) .. (1.7, 15.3).. controls (1.6, 15.3) and (1.6, 15.2) .. (1.6, 15.2).. controls (1.5, 15.2) and (1.3, 14.6) .. (1.3, 14.4).. controls (1.3, 14.4) and (1.3, 14.3) .. (1.3, 14.2).. controls (1.2, 14.1) and (1.2, 13.9) .. (1.2, 13.7).. controls (1.2, 13.6) and (1.1, 13.3) .. (1.1, 13.2).. controls (1.1, 13.0) and (1.0, 12.7) .. (1.0, 12.3).. controls (1.0, 12.0) and (1.0, 11.7) .. (1.0, 11.6).. controls (0.9, 10.9) and (1.0, 9.6) .. (1.1, 9.3).. controls (1.1, 9.2) and (1.2, 9.1) .. (1.2, 8.9).. controls (1.2, 8.8) and (1.3, 8.7) .. (1.3, 8.6).. controls (1.3, 8.6) and (1.3, 8.5) .. (1.3, 8.4).. controls (1.4, 8.3) and (1.4, 8.3) .. (1.4, 8.2).. controls (1.4, 8.2) and (1.5, 8.1) .. (1.5, 8.0).. controls (1.5, 7.9) and (1.6, 7.8) .. (1.6, 7.8).. controls (1.6, 7.8) and (1.7, 7.7) .. (1.7, 7.7).. controls (1.7, 7.7) and (1.8, 7.4) .. (1.9, 7.3).. controls (1.9, 7.3) and (2.0, 7.2) .. (2.0, 7.1).. controls (2.1, 7.0) and (2.1, 6.9) .. (2.3, 6.8).. controls (2.4, 6.6) and (2.7, 6.2) .. (2.7, 6.2).. controls (2.8, 6.1) and (2.8, 6.1) .. (2.8, 6.1).. controls (2.8, 6.1) and (3.0, 5.8) .. (3.0, 5.7).. controls (3.1, 5.7) and (3.1, 5.6) .. (3.2, 5.5).. controls (3.3, 5.4) and (3.3, 5.4) .. (3.6, 5.0).. controls (3.7, 4.9) and (3.8, 4.7) .. (3.9, 4.6).. controls (4.0, 4.5) and (4.2, 4.4) .. (4.2, 4.3).. controls (4.4, 4.0) and (4.9, 3.5) .. (5.4, 3.1).. controls (5.5, 3.0) and (5.7, 2.9) .. (5.7, 2.8).. controls (5.9, 2.7) and (6.0, 2.6) .. (6.2, 2.5).. controls (6.2, 2.5) and (6.3, 2.4) .. (6.3, 2.4).. controls (6.3, 2.4) and (6.6, 2.2) .. (6.7, 2.2).. controls (6.7, 2.2) and (6.8, 2.1) .. (6.8, 2.1).. controls (6.8, 2.1) and (6.9, 2.1) .. (7.0, 2.0).. controls (7.1, 2.0) and (7.2, 2.0) .. (7.2, 1.9).. controls (7.3, 1.9) and (7.3, 1.9) .. (7.4, 1.9).. controls (7.4, 1.8) and (7.5, 1.8) .. (7.6, 1.8).. controls (7.6, 1.7) and (7.7, 1.7) .. (7.7, 1.7).. controls (7.7, 1.7) and (7.8, 1.7) .. (7.9, 1.6).. controls (8.0, 1.6) and (8.1, 1.6) .. (8.2, 1.5).. controls (8.3, 1.5) and (8.4, 1.5) .. (8.4, 1.5).. controls (8.4, 1.4) and (8.6, 1.4) .. (8.7, 1.4).. controls (8.9, 1.4) and (9.1, 1.3) .. (9.2, 1.3).. controls (9.3, 1.3) and (9.5, 1.2) .. (9.8, 1.2).. controls (10.0, 1.2) and (10.3, 1.2) .. (10.5, 1.1).. controls (10.8, 1.1) and (11.6, 1.1) .. (12.0, 1.1).. controls (12.2, 1.2) and (12.4, 1.2) .. (12.5, 1.2).. controls (12.6, 1.2) and (12.7, 1.3) .. (12.8, 1.3).. controls (12.8, 1.3) and (12.9, 1.4) .. (13.0, 1.4).. controls (13.1, 1.4) and (13.2, 1.4) .. (13.3, 1.5).. controls (13.3, 1.5) and (13.4, 1.5) .. (13.5, 1.5).. controls (13.6, 1.6) and (13.7, 1.6) .. (13.8, 1.6).. controls (13.8, 1.7) and (13.9, 1.7) .. (14.0, 1.8).. controls (14.4, 1.9) and (14.7, 2.1) .. (14.7, 2.1).. controls (14.7, 2.1) and (14.8, 2.2) .. (14.8, 2.2).. controls (14.9, 2.2) and (15.1, 2.4) .. (15.4, 2.6).. controls (15.6, 2.8) and (16.3, 3.6) .. (16.4, 3.7).. controls (16.5, 3.8) and (16.5, 3.9) .. (16.6, 3.9).. controls (16.7, 4.0) and (16.8, 4.1) .. (16.8, 4.2).. controls (16.8, 4.2) and (16.9, 4.3) .. (16.9, 4.3).. controls (16.9, 4.3) and (16.9, 4.3) .. (16.9, 4.3).. controls (16.9, 4.4) and (17.0, 4.5) .. (17.1, 4.6).. controls (17.1, 4.6) and (17.2, 4.8) .. (17.2, 4.8).. controls (17.3, 4.9) and (17.3, 5.0) .. (17.4, 5.1).. controls (17.5, 5.3) and (17.8, 5.9) .. (17.9, 6.0).. controls (17.9, 6.1) and (17.9, 6.2) .. (18.0, 6.3).. controls (18.0, 6.4) and (18.0, 6.4) .. (18.0, 6.5).. controls (18.0, 6.5) and (18.1, 6.6) .. (18.1, 6.8).. controls (18.2, 6.9) and (18.2, 7.0) .. (18.2, 7.1).. controls (18.2, 7.2) and (18.3, 7.3) .. (18.3, 7.3).. controls (18.3, 7.4) and (18.3, 7.5) .. (18.4, 7.6).. controls (18.4, 7.7) and (18.4, 7.9) .. (18.4, 8.0).. controls (18.6, 8.4) and (18.6, 10.2) .. (18.5, 10.9).. controls (18.4, 11.3) and (18.4, 11.5) .. (18.4, 12.2).. controls (18.3, 12.5) and (18.3, 12.9) .. (18.3, 13.1).. controls (18.3, 13.3) and (18.2, 13.6) .. (18.2, 13.7).. controls (18.2, 13.9) and (18.2, 14.1) .. (18.1, 14.2).. controls (18.1, 14.4) and (18.1, 14.5) .. (18.1, 14.6).. controls (18.0, 14.7) and (18.0, 14.8) .. (18.0, 14.9).. controls (17.9, 15.0) and (17.9, 15.1) .. (17.9, 15.2).. controls (17.9, 15.3) and (17.8, 15.4) .. (17.8, 15.5).. controls (17.8, 15.5) and (17.7, 15.6) .. (17.7, 15.6).. controls (17.7, 15.7) and (17.7, 15.8) .. (17.7, 15.8).. controls (17.6, 15.9) and (17.6, 16.0) .. (17.6, 16.0).. controls (17.6, 16.1) and (17.5, 16.2) .. (17.5, 16.2).. controls (17.5, 16.2) and (17.4, 16.3) .. (17.4, 16.4).. controls (17.4, 16.5) and (17.3, 16.6) .. (17.3, 16.6).. controls (17.3, 16.7) and (17.2, 16.7) .. (17.2, 16.8).. controls (17.2, 16.8) and (17.2, 16.9) .. (17.2, 16.9).. controls (17.1, 17.0) and (17.0, 17.1) .. (17.0, 17.2).. controls (16.9, 17.3) and (16.8, 17.4) .. (16.8, 17.4).. controls (16.8, 17.4) and (16.8, 17.5) .. (16.7, 17.6).. controls (16.6, 17.7) and (16.1, 18.2) .. (16.1, 18.2).. controls (16.0, 18.2) and (16.0, 18.3) .. (15.9, 18.3).. controls (15.9, 18.4) and (15.8, 18.4) .. (15.8, 18.4).. controls (15.7, 18.5) and (15.7, 18.5) .. (15.6, 18.5).. controls (15.6, 18.5) and (15.6, 18.6) .. (15.5, 18.6).. controls (15.5, 18.6) and (15.4, 18.7) .. (15.4, 18.7).. controls (15.4, 18.7) and (15.3, 18.8) .. (15.1, 18.8).. controls (15.0, 18.9) and (14.9, 18.9) .. (14.8, 19.0).. controls (14.6, 19.0) and (14.5, 19.1) .. (14.5, 19.1).. controls (14.5, 19.1) and (14.4, 19.1) .. (14.3, 19.2).. controls (14.3, 19.2) and (14.2, 19.2) .. (14.2, 19.2).. controls (14.1, 19.2) and (14.1, 19.3) .. (14.0, 19.3).. controls (13.9, 19.3) and (13.8, 19.4) .. (13.7, 19.4).. controls (13.6, 19.4) and (13.6, 19.4) .. (13.5, 19.5).. controls (13.5, 19.5) and (13.4, 19.5) .. (13.3, 19.5).. controls (13.3, 19.6) and (13.2, 19.6) .. (13.1, 19.6).. controls (13.1, 19.6) and (13.0, 19.7) .. (12.8, 19.7).. controls (12.7, 19.7) and (12.6, 19.8) .. (12.5, 19.8).. controls (12.1, 19.9) and (11.9, 20.0) .. (11.7, 20.0).. controls (11.6, 20.0) and (11.5, 20.1) .. (11.4, 20.1).. controls (11.3, 20.1) and (11.2, 20.2) .. (10.9, 20.2).. controls (10.7, 20.2) and (10.4, 20.2) .. (10.2, 20.3).. controls (10.0, 20.3) and (9.3, 20.3) .. (8.9, 20.3) -- cycle(10.4, 20.0).. controls (10.6, 19.9) and (10.8, 19.9) .. (10.9, 19.9).. controls (11.0, 19.9) and (11.2, 19.8) .. (11.3, 19.8).. controls (11.4, 19.8) and (11.6, 19.8) .. (11.7, 19.7).. controls (11.7, 19.7) and (11.9, 19.7) .. (12.0, 19.7).. controls (12.1, 19.7) and (12.2, 19.6) .. (12.3, 19.6).. controls (12.4, 19.5) and (12.5, 19.5) .. (12.6, 19.5).. controls (12.7, 19.5) and (12.8, 19.4) .. (12.8, 19.4).. controls (12.9, 19.4) and (13.0, 19.3) .. (13.1, 19.3).. controls (13.2, 19.3) and (13.3, 19.3) .. (13.3, 19.2).. controls (13.4, 19.2) and (13.5, 19.2) .. (13.5, 19.2).. controls (13.6, 19.1) and (13.7, 19.1) .. (13.8, 19.1).. controls (13.8, 19.1) and (13.9, 19.0) .. (14.0, 19.0).. controls (14.0, 19.0) and (14.1, 19.0) .. (14.1, 18.9).. controls (14.1, 18.9) and (14.2, 18.9) .. (14.3, 18.9).. controls (14.4, 18.8) and (14.5, 18.8) .. (14.6, 18.8).. controls (14.6, 18.7) and (14.7, 18.7) .. (14.7, 18.7).. controls (14.7, 18.7) and (15.2, 18.5) .. (15.2, 18.4).. controls (15.2, 18.4) and (15.3, 18.4) .. (15.3, 18.4).. controls (15.6, 18.3) and (16.4, 17.6) .. (16.6, 17.2).. controls (16.7, 17.0) and (16.8, 16.9) .. (16.8, 16.9).. controls (16.8, 16.9) and (17.2, 16.2) .. (17.2, 16.2).. controls (17.2, 16.1) and (17.3, 16.0) .. (17.3, 16.0).. controls (17.3, 15.9) and (17.4, 15.8) .. (17.4, 15.8).. controls (17.4, 15.7) and (17.4, 15.7) .. (17.4, 15.6).. controls (17.5, 15.6) and (17.5, 15.5) .. (17.5, 15.4).. controls (17.5, 15.4) and (17.6, 15.2) .. (17.6, 15.1).. controls (17.6, 15.0) and (17.7, 14.9) .. (17.7, 14.8).. controls (17.7, 14.8) and (17.7, 14.6) .. (17.8, 14.5).. controls (17.8, 14.4) and (17.8, 14.3) .. (17.8, 14.3).. controls (17.8, 14.2) and (17.9, 13.9) .. (17.9, 13.7).. controls (18.0, 13.6) and (18.0, 13.3) .. (18.0, 12.8).. controls (18.0, 12.5) and (18.1, 12.1) .. (18.1, 12.0).. controls (18.1, 11.9) and (18.1, 11.7) .. (18.1, 11.4).. controls (18.2, 10.8) and (18.2, 10.1) .. (18.3, 10.0).. controls (18.3, 9.9) and (18.3, 8.8) .. (18.3, 8.7).. controls (18.2, 8.7) and (18.2, 8.5) .. (18.2, 8.2).. controls (18.1, 7.8) and (18.1, 7.5) .. (17.9, 7.2).. controls (17.9, 7.1) and (17.9, 7.0) .. (17.8, 6.9).. controls (17.8, 6.8) and (17.8, 6.7) .. (17.8, 6.6).. controls (17.7, 6.6) and (17.7, 6.5) .. (17.7, 6.4).. controls (17.6, 6.2) and (17.5, 5.9) .. (17.4, 5.7).. controls (17.3, 5.6) and (17.3, 5.4) .. (17.2, 5.3).. controls (17.2, 5.3) and (17.1, 5.1) .. (17.0, 5.1).. controls (17.0, 5.0) and (16.9, 4.9) .. (16.9, 4.8).. controls (16.9, 4.8) and (16.8, 4.7) .. (16.7, 4.6).. controls (16.7, 4.5) and (16.6, 4.4) .. (16.6, 4.4).. controls (16.5, 4.1) and (15.7, 3.3) .. (15.2, 2.9).. controls (14.9, 2.6) and (14.9, 2.6) .. (14.6, 2.4).. controls (14.4, 2.2) and (14.1, 2.1) .. (14.0, 2.1).. controls (14.0, 2.1) and (13.9, 2.0) .. (13.9, 2.0).. controls (13.8, 2.0) and (13.7, 1.9) .. (13.6, 1.9).. controls (13.5, 1.9) and (13.5, 1.8) .. (13.5, 1.8).. controls (13.5, 1.8) and (13.4, 1.8) .. (13.3, 1.8).. controls (13.2, 1.7) and (13.1, 1.7) .. (13.0, 1.7).. controls (13.0, 1.6) and (12.9, 1.6) .. (12.8, 1.6).. controls (12.6, 1.6) and (12.5, 1.5) .. (12.5, 1.5).. controls (12.2, 1.4) and (10.2, 1.4) .. (10.0, 1.5).. controls (10.0, 1.5) and (9.8, 1.5) .. (9.6, 1.5).. controls (9.0, 1.6) and (8.5, 1.7) .. (8.2, 1.8).. controls (8.2, 1.8) and (8.1, 1.9) .. (8.0, 1.9).. controls (8.0, 1.9) and (7.8, 2.0) .. (7.7, 2.0).. controls (7.6, 2.1) and (7.5, 2.1) .. (7.4, 2.2).. controls (6.8, 2.4) and (6.4, 2.7) .. (5.9, 3.1).. controls (5.7, 3.2) and (5.5, 3.4) .. (5.4, 3.5).. controls (5.1, 3.7) and (5.0, 3.9) .. (4.8, 4.1).. controls (4.7, 4.2) and (4.5, 4.4) .. (4.4, 4.5).. controls (4.2, 4.7) and (4.1, 4.8) .. (4.1, 4.8).. controls (4.1, 4.8) and (4.1, 4.9) .. (4.0, 4.9).. controls (4.0, 5.0) and (3.9, 5.1) .. (3.9, 5.1).. controls (3.8, 5.2) and (3.8, 5.3) .. (3.7, 5.3).. controls (3.7, 5.4) and (3.6, 5.4) .. (3.6, 5.5).. controls (3.6, 5.5) and (3.5, 5.6) .. (3.5, 5.7).. controls (3.3, 5.8) and (3.2, 5.9) .. (3.2, 6.0).. controls (3.1, 6.1) and (3.1, 6.1) .. (3.1, 6.2).. controls (3.0, 6.3) and (3.0, 6.3) .. (2.9, 6.4).. controls (2.9, 6.5) and (2.8, 6.5) .. (2.8, 6.6).. controls (2.8, 6.6) and (2.7, 6.7) .. (2.7, 6.7).. controls (2.7, 6.8) and (2.6, 6.8) .. (2.6, 6.9).. controls (2.5, 6.9) and (2.5, 7.0) .. (2.4, 7.1).. controls (2.4, 7.1) and (2.3, 7.2) .. (2.3, 7.3).. controls (2.3, 7.3) and (2.2, 7.4) .. (2.2, 7.4).. controls (2.2, 7.5) and (2.1, 7.5) .. (2.1, 7.5).. controls (2.1, 7.5) and (2.1, 7.6) .. (2.0, 7.7).. controls (2.0, 7.7) and (1.9, 7.9) .. (1.9, 7.9).. controls (1.8, 8.0) and (1.7, 8.2) .. (1.7, 8.2).. controls (1.7, 8.3) and (1.7, 8.4) .. (1.6, 8.5).. controls (1.6, 8.5) and (1.6, 8.7) .. (1.5, 8.8).. controls (1.5, 8.9) and (1.5, 9.0) .. (1.5, 9.1).. controls (1.4, 9.1) and (1.4, 9.3) .. (1.4, 9.4).. controls (1.4, 9.6) and (1.3, 9.8) .. (1.3, 9.9).. controls (1.2, 10.2) and (1.2, 11.6) .. (1.3, 12.2).. controls (1.3, 12.3) and (1.4, 12.6) .. (1.4, 12.8).. controls (1.4, 13.3) and (1.4, 13.5) .. (1.5, 13.7).. controls (1.5, 13.8) and (1.5, 14.0) .. (1.6, 14.1).. controls (1.6, 14.3) and (1.6, 14.4) .. (1.6, 14.5).. controls (1.7, 14.5) and (1.7, 14.6) .. (1.7, 14.7).. controls (1.8, 14.9) and (2.0, 15.3) .. (2.1, 15.5).. controls (2.2, 15.6) and (2.7, 16.2) .. (2.8, 16.3).. controls (2.8, 16.3) and (2.9, 16.4) .. (3.0, 16.5).. controls (3.2, 16.7) and (3.5, 17.0) .. (3.9, 17.3).. controls (4.0, 17.4) and (4.1, 17.5) .. (4.1, 17.5).. controls (4.2, 17.6) and (5.0, 18.3) .. (5.2, 18.5).. controls (5.2, 18.5) and (5.3, 18.6) .. (5.4, 18.6).. controls (5.6, 18.8) and (5.9, 19.0) .. (6.0, 19.0).. controls (6.0, 19.0) and (6.0, 19.1) .. (6.1, 19.1).. controls (6.1, 19.1) and (6.2, 19.2) .. (6.2, 19.2).. controls (6.2, 19.2) and (6.3, 19.2) .. (6.3, 19.2).. controls (6.4, 19.3) and (6.5, 19.3) .. (6.5, 19.3).. controls (6.6, 19.3) and (6.6, 19.4) .. (6.7, 19.4).. controls (6.7, 19.4) and (6.8, 19.5) .. (6.9, 19.5).. controls (6.9, 19.5) and (7.0, 19.5) .. (7.1, 19.6).. controls (7.2, 19.6) and (7.3, 19.6) .. (7.3, 19.7).. controls (7.4, 19.7) and (7.5, 19.7) .. (7.6, 19.7).. controls (7.7, 19.8) and (7.8, 19.8) .. (7.9, 19.8).. controls (8.0, 19.8) and (8.1, 19.9) .. (8.2, 19.9).. controls (8.5, 20.0) and (9.7, 20.0) .. (10.4, 20.0) -- cycle; \end{tikzpicture} \end{document} which give me a filled area, but not a path. I would prefer a path with the same line width in my actual case. Here below is the original blurry image: Says that I want a closed and smooth path, any suggestion on the process above? Edited: I try with Gemini-3.5-Flash with the following prompt: Identify the path and return to me a smooth TikZ Bezier closed curve. Which give the code: \documentclass[tikz,border=10pt]{standalone} \begin{document} \begin{tikzpicture} \draw [ line width=1.5pt, color=black!80, line cap=round, line join=round ] (0.2, 2.2) .. controls (1.0, 2.2) and (1.5, 1.9) .. (1.8, 1.3) .. controls (2.1, 0.7) and (2.2, -0.2) .. (1.9, -0.9) .. controls (1.6, -1.6) and (0.9, -2.1) .. (0.0, -2.1) .. controls (-0.9, -2.1) and (-1.6, -1.7) .. (-2.0, -0.9) .. controls (-2.4, -0.1) and (-2.4, 0.8) .. (-1.8, 1.5) .. controls (-1.2, 2.2) and (-0.6, 2.2) .. (0.2, 2.2) -- cycle; \end{tikzpicture} \end{document} But the details is NOT what the original image is, and the output code is unstable(due to LLM's randomness limitation): The LLM solution is probably not what I was after here.

  • Conditionally skip `\item`s of a list
    by Sammy on May 27, 2026 at 10:08 pm

    I have a collection of exercise files that I later assemble into worksheets/tests. A simplified example looks like this: \begin{subexercises} \subexercise Hello \subexercise World \subexercise ! \subexercise ? \end{subexercises} \subexercise is a custom wrapper around \item that also handles additional formatting (margin notes, points, etc.). I would now like to selectively include only certain subexercises without editing the source files each time. For example, with something like \renewcommand{\subexselect}{1,4} I would want the output to contain only a) Hello b) ? So the numbering should remain continuous even though some subexercises are skipped. I also would like to keep the \item-like syntax \subexercise Hello instead of changing all files to something argument-based like \subexercise{Hello} because I already have many existing exercise files and like the syntax better (and partly also because I'm interested in how to achieve this and maybe learning something new that way). What I tried 1. Using conditionals inside \subexercise I experimented with \if...\fi constructs and tried to place balancing \iftrue / \fi pairs into begin/end hooks of the environment. I could not get this to work reliably. 2. Using pgfparser to gobble unwanted items I then tried parsing tokens until the next \subexercise and discarding them when the current item should not be printed. This almost works, except for the final item because there is no following \subexercise token to stop the parser. I also tried using \end{subexercises} as an alternative stop condition, but I could not figure out how to do this properly since it is not a single token. It works with an additional stop-marker at the end of the environment but having to manually insert this marker at the end of the environment is bad. Here is a minimal example of that attempt (when not including 4 in the list I get an emergency stop): \documentclass{article} \usepackage{enumitem} \usepackage{pgfparser} \newlist{subexercises}{enumerate}{1} \setlist[subexercises]{label=\alph*)} \newcommand{\subexselect}{} \newcounter{subexcount} \setcounter{subexcount}{0} \newcommand{\subexercise}[1][]{% \stepcounter{subexcount}% \ifnum\pdfmatch{\thesubexcount}{\subexselect}=1% \item \else \pgfparserparse{subex}% \fi } \pgfparserdef{subex}{all}\subexercise{\pgfparserswitch{final}\pgfparserreinsert} \pgfparserset{subex/silent=true} %\newcommand{subexend}{} %\pgfparserdef{subex}{all}subexend{\pgfparserswitch{final}} %\pgfparserdeffinal{subex}{} \begin{document} \renewcommand{\subexselect}{1,4} \begin{subexercises} \subexercise Hello \subexercise World \subexercise ! \subexercise ? %subexend \end{subexercises} \end{document} Question How can this kind of selective inclusion be implemented while preserving the \item-like syntax, i.e. not replacing subexercise by a macro that takes the body of the \item as argument?

  • Draw balls in Galton board
    by Stephen on May 26, 2026 at 9:06 am

    I need to draw some balls at the entrance (and if possible at the bottom) of the Galton board like the following picture: Code: \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture} \def\distance{0.3cm} \def\layer{10} \def\radius{2pt} % draw the nails \foreach \i in {0,...,\layer} { \foreach \j in {0,...,\numexpr\i+1\relax} { \draw ({-\distance*\i/2 + \distance*\j}, {-sqrt(3)*\distance*\i/2}) circle[radius=\radius]; } } % draw the slant board on both sides \draw ({-\layer*\distance/2-sqrt(3)*\radius}, {-sqrt(3)*\distance*\layer/2-\radius}) -- (0,2*\radius) -- +(-4pt,4pt); \draw ({-\layer*\distance/2+\distance*(\layer+1)+sqrt(3)*\radius}, {-sqrt(3)*\distance*\layer/2-\radius}) -- (\distance,2*\radius) -- +(4pt,4pt); % draw the separator plates \foreach \i in {0,...,\numexpr\layer+1\relax} { \draw ({-\layer*\distance/2 + \i*\distance}, {-sqrt(3)*\layer*\distance/2 - \radius}) -- ++ (0,-0.5cm); } % draw the bottom line \draw ({-\layer*\distance/2},{-sqrt(3)*\layer*\distance/2 - \radius - 0.5cm}) -- ++ ({(\layer+1)*\distance},0); % number the separated areas \foreach \i in {0,...,\numexpr\layer\relax} { \node at ({-\layer*\distance/2 + \distance*(\i+0.5)},{-sqrt(3)*\layer*\distance/2 - \radius - 0.7cm}) {\footnotesize\i}; } \end{tikzpicture} \end{document}