• Systeme: Sort variables on left hand side but not on the right hand side
    by Ryan Kong on November 3, 2025 at 9:35 am

    I current have the following system of equations: I want to keep the left hand side as it is, but remove the separation of variables on the right hand side (please refer to the picture below but ignore the left hand side of the equation. I made the right hand side possible by using align term = false, but it makes the alignment on the left hand side disappears, which is not something I want.) If possible, I would like to stick with systeme since I have many other systems of equations that are written in systeme and I want to keep my code consistent. The following is my MWE: \documentclass[]{minimal} \usepackage{systeme} \setsysteme{sort={x,y,z=*},sign space=0.5em, member sep space=0.5em} \begin{document} \systeme{4x+3y+z=0,6x+4y+z=1-k,3x+2y=k} \end{document} To sum up, I want the left hand side of the first picture and the right hand side of the second picture. Thank you in advance.

  • Number sign/hash (#) not allowed in environment defined with listings
    by Zeping Lee on November 3, 2025 at 8:31 am

    The number sign ("#") raises an error in an environment defined with \lstnewenvironment of listings package. This is possibly related to the recent changes in LaTeX2e kernel ( 2025-11-01) because the CI of my citeproc-lua package breaks without any modifications. LaTeX2e <2025-11-01> L3 programming layer <2025-10-24> Package: listings 2024/09/23 1.10c (Carsten Heinz) \documentclass{article} \usepackage{listings} \lstnewenvironment{bash}{% \lstset{language = bash}% }{} \begin{document} \begin{lstlisting}[language=bash] make install # This works \end{lstlisting} \begin{bash} make install # This doesn't work \end{bash} \end{document} Error: ./tmp.tex:13: You can't use `macro parameter character #' in horizontal mode. l.13 make install # This doesn't work

  • I want a command which can take two arbitrary ellipses, and shade the region between them, bounded by their mutual tangents
    by Jasper on November 2, 2025 at 9:31 pm

    I want a command which can take two arbitrary ellipses, and shade the region between them, bounded by their mutual tangents. \documentclass[tikz,border=1cm]{standalone} \begin{document} \begin{tikzpicture} \fill (-5,0) ellipse[x radius = 1, y radius = pi]; \fill ({sqrt(2)},e) ellipse[x radius = {sqrt(pi)}, y radius = {sqrt(e^sqrt(pi))}]; \end{tikzpicture} \end{document}

  • Problem trying to set color in dynamic in pgfplot [duplicate]
    by Liam Seddio on November 2, 2025 at 6:12 pm

    I'm trying to draw 10 functions of ten different colors (actually starting from red and ending with yellow) inside a tikzpicture environment. Problem is that the code reads only the first color (red) and then plot all 10 functions in green Here's the code: \documentclass{amsart} \usepackage[english]{babel} \usepackage{amsmath} \usepackage{hyperref} \usepackage[a4paper, margin=2.5cm]{geometry} \usepackage{pgfplots} \usepackage{xcolor} \pgfplotsset{compat=1.18} \usepackage{mdframed} \usepackage{subcaption} \begin{document} \begin{figure}[htb] \begin{mdframed} % un solo riquadro esterno per coerenza visiva \centering % --- PRIMA SUBFIGURE --- \begin{subfigure}[t]{0.45\textwidth} \centering \begin{tikzpicture} \begin{axis}[ axis lines=none, grid=none, width=\linewidth, height=0.8\linewidth, % stessa altezza per entrambi xmin=-1, xmax=4, ymin=-2, ymax=3, samples=200, domain=0:3.1416 ] \addplot[thick,smooth]{2*sin(deg(x))}; \addplot[only marks, mark=*] coordinates {(0,0)}; \addplot[only marks, mark=*] coordinates {(3.1416,0)}; \node[below left] at (axis cs:0,0) {$x_0$}; \node[below right] at (axis cs:3.1416,0) {$x_1$}; \node[below] at (axis cs:1.5,1.9) {$\gamma(t)$}; \end{axis} \end{tikzpicture} \end{subfigure}% \hfill % --- SECONDA SUBFIGURE --- \begin{subfigure}[t]{0.45\textwidth} \centering \begin{tikzpicture} \begin{axis}[ axis lines=none, grid=none, width=\linewidth, height=0.8\linewidth, xmin=-1.5, xmax=1.5, ymin=-1.5, ymax=1.5, samples=200, domain=0:360 ] \addplot[thick, parametric] ({-0.5+0.5*cos(x)}, {0.5*sin(x)}); \addplot[only marks, mark=*] coordinates {(0,0)}; \node[right] at (axis cs:0,0) {$x_0$}; \node[left] at (axis cs:-1,0) {$\mu(t)$}; \end{axis} \end{tikzpicture} \end{subfigure} \hfill \begin{subfigure}[t]{0.45\textwidth} \centering \begin{tikzpicture} \begin{axis}[ axis lines=none, grid=none, width=\linewidth, height=0.8\linewidth, xmin=-1, xmax=4, ymin=-3, ymax=3, samples=200, domain=0:3.1416 ] \addplot[thick,smooth]{2*sin(deg(x))}; \addplot[thick,smooth]{-sin(deg(x))}; \addplot[only marks, mark=*] coordinates {(0,0)}; \addplot[only marks, mark=*] coordinates {(3.1416,0)}; \foreach \n in {1,...,9} { \pgfmathsetmacro{\t}{\n/10} \pgfmathsetmacro{\coef}{2 - 3*\t} \pgfmathtruncatemacro{\perc}{100*\t} \addplot[ smooth, thick, red!\perc!black, % gradiente dal verde al blu domain=0:3.1416, samples=200 ] {\coef*sin(deg(x))}; } \node[below left] at (axis cs:0,0) {$x_0$}; \node[below right] at (axis cs:3.1416,0) {$x_1$}; \node[above] at (axis cs:1.5,1.9) {$\gamma_0(t)$}; \node[below right] at (axis cs:2.5,-0.4) {$\gamma_1(t)$}; \end{axis} \end{tikzpicture} \end{subfigure} \hfill \begin{subfigure}[t]{0.45\textwidth} %is here in this subfigure the problem \centering \begin{tikzpicture} \begin{axis}[ axis lines=none, grid=none, width=\linewidth, height=0.8\linewidth, xmin=-1.5, xmax=1.5, ymin=-1.5, ymax=1.5, samples=200, domain=0:360 ] \foreach \n in {1,...,9} { \pgfmathsetmacro{\t}{\n/10} \pgfmathsetmacro{\coefa}{-0.5 + 0.25*\t} \pgfmathsetmacro{\coefb}{-\coefa} \pgfmathtruncatemacro{\perc}{100*\t} \addplot[thick, parametric]({\coefa +\coefb*cos(x)},{\coefb*sin(x)}); }; \addplot[thick, parametric] ({-0.5+0.5*cos(x)}, {0.5*sin(x)}); \addplot[only marks, mark=*] coordinates {(0,0)}; \node[right] at (axis cs:0,0) {$x_0$}; \node[left] at (axis cs:-1,0) {$\mu_0(t)$}; \node[right] at (axis cs:-0.55,0) {$\mu_1(t)$}; \end{axis} \end{tikzpicture} \end{subfigure} \hfill \end{mdframed} \caption{Main Caption} \end{figure} \end{document} And the result is

  • Proper way to represent a cuboid in math mode
    by Stephen on November 2, 2025 at 4:02 pm

    It is well known that in LaTeX $ABCD$ is different from $\mathit{ABCD}$ as the former represents the multiplication of four variables while the latter represents some single object such as a rectangle. In solid geometry, suppose there is a cuboid ABCD-A1B1C1D1. Which one of the following is preferred/recommended? From the output it seems that \mathit is unnecessary for A1B1C1D1. \documentclass{article} \begin{document} \begin{itemize} \item $\mathit{ABCD}$-$\mathit{A_1B_1C_1D_1}$ \item $\mathit{ABCD}$-$\mathit{A_{\mathnormal{1}}B_{\mathnormal{1}}C_{\mathnormal{1}}D_{\mathnormal{1}}}$ \item $\mathit{ABCD}$-$A_1B_1C_1D_1$ \end{itemize} \end{document}

  • How to use right-to-left alignment in drop caps in Context?
    by Aryeh Zapinsky on November 2, 2025 at 3:35 pm

    Problem When trying to set up drop-cap for the first word of a paragraph, the characters do not maintain the right-to-left alignment. Questions How do you align Right-to-Left in the setupintial command? How do you setupinitial for words that include other characters, like Hebrew words that include vowels? How do you setupinitial by using spaces to delimit the words? Code examples and images of output \setupdirections[bidi=on] \setupinitial[n=2, text={וְעַל}, method=auto ] \placeinitial וְעַל הַכֹּל יְהֹוָה אֱלֺהֵֽינוּ אֲנַֽחְנוּ מוֹדִים לָךְ וּמְבָרְ֒כִים אוֹתָךְ יִתְבָּרַךְ שִׁמְךָ בְּפִי כָּל־חַי תָּמִיד לְעוֹלָם וָעֶד כַּכָּתוּב וְאָכַלְתָּ וְשָׂבָֽעְתָּ וּבֵרַכְתָּ אֶת־יְהֹוָה אֱלֺהֶֽיךָ עַל־הָאָֽרֶץ הַטּוֹבָה אֲשֶׁר נָתַן־לָךְ בָּרוּךְ אַתָּה יְהֹוָה עַל־הָאָֽרֶץ וְעַל־הַמָּזוֹן: The above illustrates that with the default of Left-to-Right alignment, the empty space is created on the left side of the page, but the words are printed on the right. When adding setup align, the space is created for the initial on the right side of the paragraph, but the initial is placed over the words in the paragraph: \setupalign[r2l] The above illustrates that the empty space is created in the correct place, but the drop-cap word is overlayed on the paragraph text itself and the characters are in reverse order still. With the addition of a non-Hebrew character, such as ,, the Hebrew characters are arranged in the proper Right-to-Left order with the corresponding vowels in the correct place. However, the empty space is not created correctly, the comma (,) is placed over the other characters, and the inclusion of the non-Hebrew character is problematic. \setupinitial[n=2, text={,וְעַל}, method=auto ] Version ConTeXt ver: 2025.08.21 23:32 LMTX fmt: 2025.9.2 int: english/english Background Trying to make a bencher page with drop-caps similar to the following image. Other notes I assume something needs to change in tex/texmf-context/tex/context/base/mkiv/typo-drp.mkiv or tex/texmf-context/tex/context/base/mkiv/typo-drp.lua, but I'm not sure where or what. Or maybe the approach should be more aligned with custom lua code like this answer, https://tex.stackexchange.com/a/531391/417053. Hebrew Font: https://fonts.google.com/noto/specimen/Noto+Sans+Hebrew?selection.family=Alef:wght@400;700|Frank+Ruhl+Libre:wght@300..900|Heebo:wght@100..900|Noto+Sans+Hebrew:wght@100..900|Noto+Serif+Hebrew:wght@100..900 Minimal file: \definefontfeature[minimal][default][ script=hebr ] \definefontfamily[hebrew] [rm] [notosanshebrew] [features=minimal] \setupbodyfont[hebrew, 20pt] \setupalign[r2l] \starttext \setupinitial[n=2, text={וְעַל}, method=auto, ] \placeinitial וְעַל הַכֹּל יְהֹוָה אֱלֺהֵֽינוּ אֲנַֽחְנוּ מוֹדִים לָךְ וּמְבָרְ֒כִים אוֹתָךְ יִתְבָּרַךְ שִׁמְךָ בְּפִי כָּל־חַי תָּמִיד לְעוֹלָם וָעֶד כַּכָּתוּב וְאָכַלְתָּ וְשָׂבָֽעְתָּ וּבֵרַכְתָּ אֶת־יְהֹוָה אֱלֺהֶֽיךָ עַל־הָאָֽרֶץ הַטּוֹבָה אֲשֶׁר נָתַן־לָךְ בָּרוּךְ אַתָּה יְהֹוָה עַל־הָאָֽרֶץ וְעַל־הַמָּזוֹן: \stoptext Thanks in advance for any suggestions and help!

  • How to remove automatic theorem counter from tcolorbox title while keeping manual counter in theorem body?
    by Student on November 2, 2025 at 5:53 am

    I'm using tcolorbox with \tcolorboxenvironment to style my theorem-like environments. However, I'm getting duplicate numbering: the box title shows one number (e.g., "Definition 1.0") and the theorem statement inside shows another (e.g., "Definition 1.1"). Here's my minimal working example: \documentclass[12pt,a4paper]{article} % ------------------------------------------------ % PACKAGES % ------------------------------------------------ \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath,amssymb,amsthm} \usepackage{xcolor} \usepackage{tcolorbox} \usepackage{geometry} \geometry{margin=2.5cm} % ------------------------------------------------ % COLORS % ------------------------------------------------ \definecolor{exo7blue}{RGB}{0,86,125} \definecolor{exo7gray}{RGB}{240,240,240} % ------------------------------------------------ % THEOREM STYLES % ------------------------------------------------ \theoremstyle{definition} \newtheorem{definition}{Definition}[section] \newtheorem{example}{Example}[section] \newtheorem{remark}{Remark}[section] \theoremstyle{plain} \newtheorem{theorem}{Theorem}[section] \newtheorem{corollary}{Corollary}[section] \newtheorem{proposition}{Proposition}[section] \newtheorem{exercise}{Exercise}[section] % ------------------------------------------------ % TCOLORBOX LINKED TO THEOREM COUNTERS % ------------------------------------------------ \tcolorboxenvironment{definition}{ colback=exo7gray!40, colframe=exo7blue, boxrule=0.7pt, arc=2pt, left=6pt,right=6pt,top=6pt,bottom=6pt, before skip=10pt, after skip=10pt, title={Definition~\thedefinition}, } \tcolorboxenvironment{example}{ colback=white, colframe=exo7blue, boxrule=0.6pt, arc=2pt, left=6pt,right=6pt,top=6pt,bottom=6pt, before skip=10pt, after skip=10pt, title={Example~\theexample}, } \tcolorboxenvironment{theorem}{ colback=exo7gray!30, colframe=black, boxrule=0.8pt, arc=2pt, left=6pt,right=6pt,top=6pt,bottom=6pt, before skip=10pt, after skip=10pt, title={Theorem~\thetheorem}, } \tcolorboxenvironment{proposition}{ colback=exo7gray!30, colframe=black, boxrule=0.8pt, arc=2pt, left=6pt,right=6pt,top=6pt,bottom=6pt, before skip=10pt, after skip=10pt, title={Proposition~\theproposition}, } \tcolorboxenvironment{corollary}{ colback=exo7gray!30, colframe=black, boxrule=0.8pt, arc=2pt, left=6pt,right=6pt,top=6pt,bottom=6pt, before skip=10pt, after skip=10pt, title={Corollary~\thecorollary}, } \tcolorboxenvironment{remark}{ colback=white, colframe=black!70, boxrule=0.5pt, arc=2pt, left=6pt,right=6pt,top=6pt,bottom=6pt, before skip=10pt, after skip=10pt, title={Remark~\theremark}, } \tcolorboxenvironment{exercise}{ colback=white, colframe=exo7blue, boxrule=0.6pt, arc=2pt, left=6pt,right=6pt,top=6pt,bottom=6pt, before skip=10pt, after skip=10pt, title={Exercise~\theexercise}, } % ------------------------------------------------ % DOCUMENT % ------------------------------------------------ \begin{document} \section{Functions of Several Variables} \begin{definition} If we are given an expression for $f(x_1, \dots, x_n)$, then the \emph{domain of definition} of $f$ is the largest subset $D_f \subset \mathbb{R}^n$ such that, for every $(x_1, \dots, x_n) \in D_f$, the value $f(x_1, \dots, x_n)$ is well defined. \end{definition} \begin{example} Let $f(x,y) = \ln(1 + x + y)$. To compute the logarithm, we must have $1+x+y>0$, hence: \[ D_f = \{(x,y) \in \mathbb{R}^2 \mid 1 + x + y > 0\}. \] \end{example} \begin{theorem} Let $f,g : D \subset \mathbb{R}^n \to \mathbb{R}$ be continuous. Then $f + g$ and $fg$ are continuous on $D$. \end{theorem} \end{document} Current output: The box title shows "Definition 1.0" and inside the box it says "Definition 1.1" Desired output: I want only "Definition 1.0" to appear in the box title, without the duplicate counter in the theorem body. Important constraint: I need to keep using the standard \begin{definition}...\end{definition} syntax (and similarly for \begin{theorem}, \begin{example}, etc.) in my document body. I cannot change to a custom command or different syntax for each theorem-like environment. How can I remove the "Definition 1.1" label from inside the box while keeping just the numbered title at the top of the tcolorbox?

  • List of symbols with page number by symbol location
    by Emad kareem on November 1, 2025 at 8:42 pm

    List of symbols with page numbers based on symbol position I'm using the code below to create a list of symbols consisting of the symbol, description, and page number. The problem is that the page number displayed is the number where the list appears, and it doesn't show the actual page numbers based on the symbol position, as shown in the attached image. \documentclass[12pt,a4paper]{report} \usepackage{geometry} \geometry{margin=1in} \usepackage{nomencl} \usepackage{fancyhdr} \usepackage{etoolbox} \usepackage{setspace} \usepackage{amsmath,amssymb} \usepackage{helvet} \renewcommand{\familydefault}{\sfdefault} \pagestyle{fancy} \fancyhf{} \fancyfoot[C]{\thepage} \renewcommand{\headrulewidth}{0pt} %--------------------------------- %--------------------------------- \makenomenclature \renewcommand{\nomname}{\centering\Large\bfseries List of Symbols} \setlength{\nomitemsep}{1\parsep} \newlength{\symbolwidth} \setlength{\symbolwidth}{3.2cm} \renewcommand{\nomlabel}[1]{\makebox[\symbolwidth][l]{#1} --- } \renewcommand{\nomentryend}{\dotfill\makebox[2em][r]{\thepage}} \patchcmd{\thenomenclature}{\section*{\nomname}}{% \chapter*{\nomname}% \addcontentsline{toc}{chapter}{List of Symbols}% \markboth{List of Symbols}{List of Symbols}}{}{} \begin{document} \chapter*{Abstract} \printnomenclature \chapter{Introduction} Example, $\lambda 1$ \nomenclature{$\lambda 1$}{example 1} \chapter{Ex 2} Example, $\lambda 2$ \nomenclature{$\lambda 2$}{example 2} \chapter{Ex 3} Example, $\lambda 3$ \nomenclature{$\lambda 3$}{example 3} \end{document} I use build.bat @echo off set FNAME=min echo 1) Running pdflatex (1st pass)... pdflatex -interaction=nonstopmode %FNAME%.tex echo. echo 2) Running makeindex for nomenclature... makeindex %FNAME%.nlo -s nomencl.ist -o %FNAME%.nls echo. echo 3) Running pdflatex (2nd pass)... pdflatex -interaction=nonstopmode %FNAME%.tex echo. echo Done. Check %FNAME%.pdf pause What is the problem with the correct page number not appearing? Please help.

  • Placing a tcolorbox around a theoremsty construction interferes with vertical spacing commands, usually specified by \topsep
    by keith77777 on November 1, 2025 at 5:00 pm

    I show a MWE of a remark with and without my attempt to add a border. In neither case does Latex indicate an error. \documentclass[ openright, % doublepage cleaning ends up right side 11pt, % font size ]{book}% \usepackage[fleqn]{amsmath} \usepackage{amssymb} \usepackage{amsthm} \usepackage[table]{xcolor} \usepackage[skins,theorems,most]{tcolorbox} \newtheoremstyle{thmstyspacing} {35pt} % 1 {25pt} % 2 {\normalfont\fontsize{11.25}{15}} % 3 {-6pt} % 4 {\sffamily} % 5 theorem head font {\\[3pt]} % 6 {0pt} % 7 space after theorem head {% {\textbf{\fontsize{12}{15}\selectfont{% 8 theorem head spec \thmname{#1}% \thmnumber{\hspace{2.4pt}#2}}}% {\normalfont\fontsize{11.25}{15}\textit{\thmnote{\hspace{5.4pt}#3}}} }} \theoremstyle{thmstyspacing} \newtheorem{remark}{Remark\hspace{3pt}} \newcommand{\theoremframe}[4]{% {\centering% \begin{tcolorbox}[width=125mm,boxrule=1.25pt,arc=2pt,colframe=#2,colback=#3,left=9.4pt,top=6pt,bottom=4.8pt]% \begin{#1} {#4} \end{#1} \end{tcolorbox} \par} } \begin{document} \section{called by `thmstyspacing'} \theoremframe{remark}{blue}{white} {First two arguments in thmstyspacing have no effect on spacing} \theoremframe{remark}{blue}{white} {First two arguments in thmstyspacing have no effect on spacing} A line of normal text of normal text of normal text of normal text. \vspace{18pt} \section{called directly from the routine `remark'} \begin{remark} First two arguments in thmstyspacing do affect vertical spacing. \end{remark} \begin{remark} First two arguments in thmstyspacing do affect vertical spacing. \end{remark} A line of normal text of normal text of normal text of normal text. \end{document}

  • Christmas decoration package
    by mlg on November 1, 2025 at 4:10 pm

    With Christmas coming up, I wanted to do a Christmas themed document. I did one in halloween using the package halloweenmath. Is there something similar for Christmas? For example trees, Santa's sleigh, snowflakes... I would like specifically math symbols, but anything is appreciated. Also answers with code that produces Christmas-related results are welcome.

  • How to prevent `\input` from appending an extra newline at the end of a file?
    by Junseok Lee on November 1, 2025 at 3:46 pm

    I'm trying to visualize newlines in an input file by making ^^M active and displaying it as \n. However, the \input command appears to append an extra empty line at the end of the file, which I don't want. According to tex.pdf: 486. An empty line is appended at the end of a read_file. Here's a minimal example demonstrating the issue: \documentclass{article} \begingroup \catcode`\^^M=13% \gdef\visiblenewline{% \catcode`\^^M=13% \def^^M{ \textbackslash n }% }% \endgroup \begin{document} \visiblenewline\input{file.txt}% \end{document} file.txt: Line 1 Line 2 Line 3 Line 4 Line 5 (Note: file.txt has no trailing empty lines) Expected Output Line 1 \n Line 2 \n Line 3 \n Line 4 \n Line 5 Actual Output Line 1 \n Line 2 \n Line 3 \n Line 4 \n Line 5 \n The extra \n at the end is the problem. How can I prevent this automatically appended empty line from appearing, or strip it during input? I'm looking for a TeX-level workaround for this behavior.

  • Passing a macro as the argument to an arbitrary arg-spec
    by Grass on November 1, 2025 at 2:55 pm

    MWE: \documentclass{article} \usepackage{mathtools} \begin{document} \ExplSyntaxOn \tl_new:N \g__mymodule_env_name_tl \tl_new:N \g__mymodule_env_args_tl % Defaults \tl_set:Nn \g__mymodule_env_name_tl { matrix } \keys_define:nn { mymodule/math } { ,env .tl_set:N = \g__mymodule_env_name_tl ,env-args .tl_set:N = \g__mymodule_env_args_tl } \NewDocumentCommand{\mat}{ O{} m }{ \keys_set:nn { mymodule/math } { #1 } \begin{\g__mymodule_env_name_tl}\g__mymodule_env_args_tl #2 \end{\g__mymodule_env_name_tl} } \NewDocumentEnvironment{funnymatrix}{ s O{} m }{ \begin{matrix} \text { (Star:~\bool_if:nTF { #1 } { T } { F }) (Optional:~#2) (Mandatory:~#3) } }{ \end{matrix} } \ExplSyntaxOff \section{Current output} Environment \verb|matrix|: \[\mat{1}\] Environment \verb|matrix*| with optional argument: \[\mat[env=matrix*,env-args=[l]]{1}\] Environment \verb|funnymatrix| with a star, mandatory and optional argument: \[\mat[env=funnymatrix,env-args=*[optional]{mandatory}]{1}\] \section{Desired output} Environment \verb|matrix|: \[\mat{1}\] Environment \verb|matrix*| with optional argument: \[\begin{matrix*}[l] 1 \end{matrix*}\] Environment \verb|funnymatrix| with a star, mandatory and optional argument: \[\begin{funnymatrix}*[optional]{mandatory} 1 \end{funnymatrix}\] \end{document} Edit Skillmon and egreg's solutions work very nicely, but they both seem to give a fatal error when compiling \mat[env=NiceArray,env-args={cc|cc}[baseline=line-3]]{1 & 1 & 1 & 1} (with the package nicematrix). How can either solution be modified such that this works?

  • Why are entries in pmatrix not horizontally centered?
    by user1362373 on November 1, 2025 at 2:05 pm

    Based on Section 4.4 in the "Short Math Guide for LaTeX", I expect entries in pmatrix to be horizontally centered, but this is not what I see. Consider the following MWE: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{displaymath} \begin{pmatrix} x_1 \\ \vdots \\ x_{n-1} \\ x_n \end{pmatrix} \end{displaymath} \end{document} This gives The entry $x_{n-1}$ is clearly not centered. Why is that and how can I fix it? Edit: Here's the output of the \listfiles command (posted here rather than in comments for legibility): article.cls 2025/01/22 v1.4n Standard LaTeX document class size10.clo 2025/01/22 v1.4n Standard LaTeX file (size option) amsmath.sty 2025/06/16 v2.17y AMS math features amstext.sty 2024/11/17 v2.01 AMS text amsgen.sty 1999/11/30 v2.0 generic functions amsbsy.sty 1999/11/29 v1.2d Bold Symbols amsopn.sty 2022/04/08 v2.04 operator names l3backend-pdftex.def 2025-10-09 L3 backend support: PDF output (pdfTeX)

  • pgfplots: declare function and parameters globally
    by PatrickT on November 1, 2025 at 12:11 am

    As I was intent on moving function declarations further up, so as to use them in multiple files, I noticed something unexpected. The first code plots a thin black line. The second code plots thick blue dots. I asked a well-known LLM and got a plausible explanation together with a hallucination. Do you have a suggestion to declare functions higher up while preserving the style? See a motivation further down. Example 1 \documentclass[border=3pt,tikz]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \tikzset{define functions/.style={% declare function={ A = 1.0; a = 0.5; f(\x) = A*\x^a; }, }, } \begin{document} \begin{tikzpicture} \begin{axis}[ domain=0:100, samples=100, ] \addplot[define functions] {f(x)}; \end{axis} \end{tikzpicture} \end{document} Example 2 \documentclass[border=3pt,tikz]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \tikzset{define functions/.style={% declare function={ A = 1.0; a = 0.5; f(\x) = A*\x^a; }, }, } \pgfplotsset{ every axis plot/.append style={define functions}, } \begin{document} \begin{tikzpicture} \begin{axis}[ domain=0:100, samples=100, ] % [define functions] not used here \addplot {f(x)}; \end{axis} \end{tikzpicture} \end{document} LLM talking now: Example 1 \addplot[define functions] {f(x)}; You explicitly attach the define functions style only to that plot. No other styles are affected. PGFPlots uses the default plot style, which is a thin black line (black, line width 0.4pt). Example 2 \pgfplotsset{every axis plot/.append style={define functions}} \addplot {f(x)}; You append the define functions style to every plot. But here’s the subtlety: every axis plot applies before the default plot style is applied, and declare function is a key that is not strictly separate from plotting keys. What happens internally: PGFPlots interprets your appended style as including both the function declaration and the style from the first plot in your style list. Because of key expansion order, the default line style is overridden. The plot falls back to the first "unknown" style PGFPlots sees for drawing, which is often the blue mark=* style (used for points), producing thick blue dots. Why this happens every axis plot is applied before \addplot options are merged. declare function is technically a "style key" in the PGFPlots system. PGFPlots sees a style (from every axis plot) that contains no explicit draw key, so it falls back to its default marker style (mark=*, thick, blue). When you attach [define functions] directly to \addplot, the default line style is preserved, so you get a thin black line. How to fix it You need to combine your define functions style with the standard line style: if you want to keep PGFPlots defaults but still append: \pgfplotsset{ every axis plot/.append style={define functions, /pgfplots/line} } Me speaking again: No this doesn't work and nor do the several other suggestions I received. Motivation: I would save different parameter values in distinct files and load them with, say \input{func1.tex}, so I can share code across multiple figures. The syntax used in declare function is natural, unlike an alternative like \pgfmathdeclarefunction{f}{1}{\pgfmathparse{1.0*#1^(0.5)}}. I'm not averse to trying something radically different from my current approach, including using LuaTeX or Python.

  • Stack characters closer than their outline
    by Alexander Z. on October 31, 2025 at 12:24 pm

    I am trying to create a custom binary operator from < with an arc convex upwards below it. I found \scoh from package smll a sensible way to model the latter, but I cannot figure out how to stack them close enough. My current attempt, \mathrel{\raisebox{-1em}{$<$}\atop\raisebox{1em}{$\scoh$}} still does not bring the characters sufficiently close enough; if I try to increase shifts, the characters still refuse to go closer, but only line height increases; apparently, \atop does not want the outline boxes of characters to overlap. How do I bring them close enough, to the \leqslant amount of distance (and preferrably with sensible capline and baseline, so that the usage of the character does not push the line far away from the neighbouring lines)? This is the closest distance I could achieve: \documentclass{article} \usepackage{amsmath,amssymb,amsthm,cmll,lipsum} \begin{document} \lipsum[1]$\mathrel{\raisebox{-1em}{$<$}\atop\raisebox{1em}{$\scoh$}}$\lipsum[1] \end{document}

  • With the Roboto Flex font, siunitx \micro not displayed with an upright mu
    by Denis Bitouzé on October 31, 2025 at 11:35 am

    The following MCE displays \unit{\micro\gram} as expected, that is with the (upright mu) Micro Sign character: \documentclass{article} \usepackage{fontspec} \usepackage{siunitx} \setmainfont{TeX Gyre Schola} % \setmainfont{RobotoFlex-VariableFont.ttf} \begin{document} \begin{itemize} \item Greek Small Letter Mu/Unicode char 03BC: μ/\char"03BC \item Micro Sign/Unicode char 00B5: µ/\char"00B5 \item \verb|\unit{\micro\gram}|: \unit{\micro\gram} \end{itemize} \end{document} However, if the TeX Gyre Schola font is replaced with the Roboto Flex font, \unit{\micro\gram} is displayed with a slanted mu, so not with a Micro Sign: I assume this is a bug in the Roboto Flex font, but is there anything that can be done on the (Lua)LaTeX side to resolve the issue?

  • Cannot pass command with large values as list to pie chart using pgf-pie package
    by Steven on October 31, 2025 at 9:27 am

    The MWE below should clearly demonstrate my problem. If I pass too large values, I get the error Dimension too large. <to be read again>. If I pass a command \list as the list, I get the errors Package PGF Math: Unknown function 'Contribution' (in '(0) + ( 100/Contribution, 50/Fundraising, 5/Grants )'). Package PGF Math: You've asked me to divide `0.0' by `0', but I cannot divide any number by `0' (in '0.5*((0.0pt)/(0)*360+(0))+0.5*(0.0pt/(0)*360+(0))'). Arithmetic overflow. \pgfmathdivide@ ...\pgfmath@x by\c@pgfmath@counta I feel like I'm trying to do simple things, but I couldn't find any solutions on the internet. MWE \documentclass{article} \usepackage{pgf-pie} \begin{document} % This works \begin{tikzpicture} \pie[ sum = auto ]{ 100/Contribution, 50/Fundraising, 5/Grants } \end{tikzpicture} % This doesn't work \begin{tikzpicture} \pie[ sum = auto ]{ 100000/Contribution, 50000/Fundraising, 5000/Grants } \end{tikzpicture} % This doesn't work either \def\list{ 100/Contribution, 50/Fundraising, 5/Grants } \begin{tikzpicture} \pie[ sum = auto ]{\list} \end{tikzpicture} \end{document}

  • What is the correct way to adjust section heading spacing in a tagged pdf?
    by James E Hanson on October 30, 2025 at 7:27 pm

    I'm trying to adapt an old style file for accessibility and I've run into an issue where some manual indentation on redefined section commands breaks tagging. Here's a MWE: \DocumentMetadata{tagging-setup} \documentclass{article} \renewcommand{\section}{\UseName{@startsection} {section}{1}{\UseName{z@}} {-3.5ex} {2.3ex} {\UseName{reset@font}\large\bfseries \hspace{0.25 in}}} \begin{document} \section{Section} Text. \end{document} This MWE throws the following error: ./MWE.tex:16: Package tagpdf Error: The number of automatic begin (3) and end (2) text (tagpdf) para hooks differ! The desired effect is to indent the heading of a section or subsection like this:

  • \Huge produces the same result as \huge when specifying 12pt font size
    by Pauline Hellio on October 30, 2025 at 4:45 pm

    I have the simplest but most mind boggling issue. \Huge does not seem to work anymore and produces the same size as \huge when the typesetting size is set to 12pt. Minimal example below: \documentclass[12pt]{article} \begin{document} {\Huge This is supposed to be Huge} {\huge This is supposed to be huge} \end{document} Will produce this : and \documentclass{article} \begin{document} {\Huge This is supposed to be Huge} {\huge This is supposed to be huge} \end{document} Will correctly size (but, obviously, with the wrong base size) : \documentclass[9pt, 10pt or 11pt]{article or book} also work fine, and \documentclass[12pt]{book} causes the same issue. I've been writing in 12pt for a while and only started having the issue today. For context I'm on mac and I've just updated my distribution through texLive, and I've tested the issue on plmlatex/overleaf and the problem remains. Is this a recent update?

  • Why does \AtBeginDocument have a different effect from within a class file than from without?
    by schtandard on October 30, 2025 at 4:33 pm

    Consider the following MWE, where I use a custom class test which loads the libertinus fonts and sets up selecting StylisticSet=2 in order to obtain a more harmonious italic J, as proposed in this answer. % !TeX program = lualatex \begin{filecontents}[overwrite]{test.cls} \NeedsTeXFormat{LaTeX2e} \ProvidesClass{diss} \LoadClass{article} \RequirePackage{libertinus} \AtBeginDocument{% \addfontfeatures{ ItalicFeatures={StylisticSet=2}, BoldItalicFeatures={StylisticSet=2}, }% } \end{filecontents} \documentclass{test} \usepackage[italian]{babel} \begin{document} J\textit{J\textbf{J}} \end{document} As you can see, the output is not as desired, \addfontfeatures seems not to have an effect. This seems to be due to some strange interaction with babel-italian which I can't pinpoint right now, but maybe one of you can1. What's even more surprising than \addfontfeatures not performing as desired, though, is that the problem disappears if I move the \AtBeginDocument from the class file to the document file, right after \documentclass. Since there is nothing between The end of the class file and Right after \documentclass except for the end of the file, and since the execution of \addfontfeatures is postponed until \begin{document} anyways, I would have expected identical outputs. And then loading babel-italian after all that also seems to be necessary for the problem to appear. What's going on? 1Note that, while I am interested in why \addfontfeatures fails, this question is not about how to get around that. A simple work-around is to use the defaultfeatures package option of libertinus instead, which works fine. \RequirePackage[ defaultfeatures={ ItalicFeatures={StylisticSet=2}, BoldItalicFeatures={StylisticSet=2}, }, ]{libertinus}

  • Pulling the subscripts up in New Computer Modern
    by Apoorv Potnis on October 30, 2025 at 3:03 pm

    I think that the maths subscripts are placed too low in the Latin Modern and the New Computer Modern fonts. Here's an example with the NewCM fonts, compiled with LuaLaTeX. \documentclass[12pt, a4paper]{article} \usepackage[newcmbb]{fontsetup} \DeclareMathOperator{\spec}{spec} \begin{document} \[ \spec_{\symrm{p}} \] \end{document} I think the p is too low. I however think that we get a better output with ConTeXt. \setuppapersize[A4] \setupbodyfont[newcomputermodern-book] \definemathfunction[spec] \starttext \startformula \spec_{\mathrm p} \stopformula \stoptext I believe this happens due to the way ConTeXt handles maths, and also due to the modifications done in the newcomputermodern-math.lfg goodie file. I believe the following modifications (lines 79 and 80) in the goodie file give the correct result. SubscriptBaselineDropMin = 50, -- 200 in font (multiplied by 0.59999/2.39868) SubscriptShiftDown = 150, -- 247 in font (multiplied to be consistent with cm) I tried to modify the SubscriptBaselineDropMin and SubscriptShiftDown parameters using LuaLaTeX, and expected to get the same result as in ConTeXt, but that does not seem to be the case. I believe 1 pt corresponds to 100 units in the goodie file. \documentclass[12pt, a4paper]{article} \usepackage[newcmbb]{fontsetup} \DeclareMathOperator{\spec}{spec} % code copied from here https://tex.stackexchange.com/a/82221/128462 % check pages 115 and 116 of https://mirrors.ibiblio.org/CTAN/systems/doc/luatex/luatex.pdf \everymath=\expandafter{% \the\everymath% \Umathsubshiftdown\textstyle=1.5pt\Umathsubshiftdrop\textstyle=0.5pt} \everydisplay=\expandafter{% \the\everydisplay% \Umathsubshiftdown\displaystyle=1.5pt\Umathsubshiftdrop\displaystyle=0.5pt} \begin{document} \[ \spec_{\symrm{p}} \] \end{document} The subscript p is certainly shifted upwards compared to the unmodified LuaLaTeX code, but not as much as the ConTeXt result. Why is that? Are there other parameters which are relevant here which need to be changed in order to get the ConTeXt result? I tried changing the \Umathsubshiftdown and \Umathsubshiftdrop to zero, and still did not get the desired result. Edit: It seems that the DeclareMathOperator is causing some things, as I see the following behaviour in pdflatex with CM, LuaLaTeX and ConTeXt. The subscripts of \mathrm{c} are lifted as compared to \spec.

  • ConTeXt: wrap text around figures that span more than one column of text
    by Georgian Ilie on October 30, 2025 at 9:03 am

    I would like to know whether ConTeXt implements a function to wrap figures embedded in multiple-column texts, whose dimensions is not a multiple of the column width. For instance, when I use a code like this: \mainlanguage[en] \definecolumnset[colll][n=3,distance=2em] \startcolumnset[colll] \noindent 20-10-2025 \starttext \startsection[title=Device Fabrication] The fabrication was performed on \chemical{Si/SiO_2} substrates patterned gold microelectrodes. Below is reported the layou of the used devices: \placefigure{tblr} {\externalfigure[Figures/Layout1.png][Layout1][width=\columnsetspanwidth{1.5}]} \samplefile{tufte} \samplefile{tufte} \samplefile{tufte} \stopcolumnset \stopsection \stoptext I obtain this: How can I fill up the white space at the right of the figure?

  • Difference between newtx and newpx
    by Akira on October 30, 2025 at 7:47 am

    I have been aware of newtx package which is a successor of mathptmx package: The bundle splits txfonts.sty (from the TX fonts distribution) into two independent packages, newtxtext.sty and newtxmath.sty, each with fixes and enhancements. newtxmath’s metrics have been re-evaluated to provide a less tight appearance, and to provide a libertine option that substitutes Libertine italic and Greek letter for the existing math italic and Greek glyphs, making a mathematics package that matches Libertine text quite well. newtxmath can also use the maths italic font provided with the garamondx package, thus offering a garamond-alike text-with-maths combination. Then I am aware of newpx package: This package, initially based on pxfonts, provides many fixes and enhancements to that package, and splits it in two parts (newpxtext and newpxmath) which may be run independently of one another. It provides scaling, improved metrics, and other options. Still, I could not figure out the practical difference between them. Could you elaborate on this aspect?

  • newtx incompatible with regexpatch
    by Akira on October 30, 2025 at 7:36 am

    I have a tex file \documentclass{amsart} \usepackage{newtx} \usepackage{amsthm} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Modifiy align environment % https://tex.stackexchange.com/a/750702/161639 \usepackage{regexpatch} \makeatletter \regexpatchcmd{\align@preamble}{\cP.\cP.}{\cP\#\cP\#{}}{}{} \makeatother \begin{document} We have \begin{align} & a \\ = & b \\ = & c . \end{align} \end{document} Then I have several errors LaTeX cmd: Command '\xshowcmd' already defined. LaTeX cmd: Command '\xpretocmd' already defined. Could you explain how to solve this problem? From this answer, I got that xpatch and regexpatch aren't compatible; and that newtx loads xpatch.

  • Redefinition of \begin and \end
    by Phillip Bachler on October 29, 2025 at 8:35 pm

    I have to use the following macros: \newcommand{\lbeq}[1]{\begin{equation}\label{#1}} \newcommand{\eeq}[1]{\end{equation}} I know this is bad style! Since I'm using TexStudio, there is the problem that it doesn't recognise these macros as math environment, but compiles properly; every math command is indicated as “math command outside math env” and highlighted red in my case. Is there a way to tell TexStudio that \lbeq{key} \eeq is a math environment like \begin{equation}\label{key} \end{equation}? \documentclass{article} \usepackage{amsmath} \newcommand{\lbeq}[1]{\begin{equation}\label{#1}} \newcommand{\eeq}[1]{\end{equation}} \begin{document} Ordinary equation: \begin{equation}\label{eq:one} c = \sqrt{ a^2 + b^2 } \end{equation} With macros: \lbeq{eq:two} c = \sqrt{ a^2 + b^2 } \eeq \end{document}

  • Error with `\DocumentMetadata` and nicematrix
    by Keks Dose on October 29, 2025 at 12:00 pm

    TexLive 2025, up to date MWE: \DocumentMetadata{pdfstandard=A-2b, lang=de-DE, pdfversion=1.7} \documentclass{article} \usepackage{nicematrix, array} \begin{document} \begin{NiceTabular}{p{4em}p{4em}p{4em}} \multicolumn{3}{p{8em}}{Überschrift}\\ $\downarrow$ & zwei & drei \\ \end{NiceTabular} \end{document} % Local Variables: % TeX-engine: luatex % End: Works, if I comment out the first line. Throws errors otherwise, first one: ./251029-lua-dev-nicematrix.tex:9: Use of \@@array doesn't match its definition. \@ifnextchar ...\reserved@d = #1\def \reserved@a { #2}\def \reserved@b {#3}\f... It took me hours to boil my file down to this mwe. The \downarrow line threw errors with the developer version of LuaLaTeX, I had to replace it with \(\downarrow\). And for whatever reason another error isn't visible, but there was another error with the dev version. I added here the tag "tagged-pdf", because neither "documentmetadata", nor PDF-management were predefined. Feel free to change to better fitting tag of this question.

  • Center align an arbitrary equation within an aligned environment?
    by jII on October 28, 2025 at 8:07 pm

    Is it possible to center align an arbitrary equation within an align environment (or similar), with equation numbers for each line? For example \begin{align} x & =y & w & =z \\ 2x & =-y & 3w & =\frac{1}{2}z \\ x&=1 (\mbox{center this line}) \end{align} Attempt 1 Using a sequence of two align. Requires manually adjusting spacing such as \setlength{\belowdisplayskip}{0pt} to avoid large gap, which may lead to inconsistent spacing \begin{align} x & =y & w & =z \\ 2x & =-y & 3w & =\frac{1}{2}z \end{align} \begin{align} x = 1 \end{align} Attempt 2 Use gather + aligned. But this approach does not give each line its own number. \begin{gather} \begin{aligned} x & =y & w & =z \\ 2x & =-y & 3w & =\frac{1}{2}z \end{aligned} \\ y = 1 \end{gather} Attempt 3 Use multispan. Equation of last line is too far. \begin{align} x & =y & w & =z \\ 2x & =-y & 3w & =\frac{1}{2}z \\ \multispan{4}{\hfill $y = 1$\hfill} \end{align}

  • How to get stripes in sections?
    by Ñupi on October 28, 2025 at 3:08 pm

    I'm trying to get the section title to have lines like the image. I've tried two ways but haven't been able to get it right. Perhaps you have a more suitable and elegant option? Thank you in advance. I tried to do it in two ways. first try: \documentclass{article} \usepackage{xcolor} \usepackage{titlesec} % Define the stripe color \definecolor{franjacolor}{RGB}{0,102,204} % ---- Custom macro: left stripe before number ---- \newcommand{\SectionLeftStripe}[1]{% % draw a small rule (stripe) on the left, aligned with the number \color{franjacolor}\rule[0.6ex]{1.2em}{1pt}\hspace{0.8em}% \color{black}#1% } % ---- Section format ---- \titleformat{\section} {\normalfont\Large\bfseries} % format of text {\SectionLeftStripe{\thesection.}} % number preceded by stripe {0.5em} % space between number and title {} % title text follows normally % ---- Section spacing ---- \titlespacing*{\section}{0pt}{3ex plus 1ex minus .2ex}{2ex plus .2ex} \begin{document} \section{Introduction} text text text text text text text text text text text text text text text texttext text text text text text text texttext text text text text text text text text text text text text text text text text text text text text text text texttext text text text text text text texttext text text text text text text text \section{Development} text text text text text text text text text text text text text text text texttext text text text text text text texttext text text text text text text text \section{Conclusion} text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text texttext text text text text text text text \end{document} Second try \documentclass{article} \usepackage{xcolor} \usepackage{titlesec} \usepackage{calc} % Define stripe color \definecolor{franjacolor}{RGB}{0,102,204} % --- Custom macro: left/right stripes with section number --- \newcommand{\SectionSideStripes}[1]{% \noindent % Left stripe \color{franjacolor}\rule[0.6ex]{1.2em}{1pt}\hspace{0.8em}% % Section number + title \color{black}#1% % Right stripe \hspace{0.8em}\color{franjacolor}\rule[0.6ex]{1.2em}{1pt}\par } % --- Section format --- \titleformat{\section} {\normalfont\Large\bfseries} % font and weight {\thesection.} % section number (with dot) {0.5em} % space between number and title {\SectionSideStripes} % macro for stripes % --- Spacing before/after section title --- \titlespacing*{\section}{0pt}{3ex plus 1ex minus .2ex}{2ex plus .2ex} \begin{document} \section{Introduction} text text text text text text text text text text text text text text text texttext text text text text text text texttext text text text text text text text text text text text text text text text text text text text text text text texttext text text text text text text texttext text text text text text text text \section{Development} text text text text text text text text text text text text text text text texttext text text text text text text texttext text text text text text text text \section{Conclusion} text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text texttext text text text text text text text \end{document}

  • Define a command that displays a macro’s full definition
    by KevinHeart on October 27, 2025 at 10:17 pm

    I’m trying to create a command that behaves like an “extended” version of \meaning, showing the full internal definition of a LaTeX macro, including the public command, its robust wrapper, and the underlying internal macro (for example \@genfrac from amsmath). You can see the image above for an example of how the result would be displayed (here being applied to \vector). Let's call it \csmeans for the sake of this post. For example, this is what I hope to achieve by the command \csmeans{genfrac}. genfrac = macro:->\protect \genfrac genfrac = \long macro:#1#2#3#4->\def \@tempa {#1#2}\edef \@tempb {\@nx \@genfrac \@mathstyle {#4}\csname @@\ifx @#3over\else above\fi \ifx \@tempa \@empty \else withdelims\fi \endcsname } \@tempb {#1#2#3} @genfrac = macro:#1#2#3#4#5->{#1{\begingroup #4\endgroup #2#3\relax #5}} Furthermore, I want a single user command that can take one or more control sequences and print them one after the other. Example: \csmeans{bf,bfseries} should produce the folliwng output: \bf = macro:->\protect\bf \bf = \long_macro:->\@fontswitch{\normalfont\bfseries}{\mathbf} \bfseries = macro:->\protect\bfseries \bfseries = \long_macro:->\not@math@alphabet\bfseries\mathbf \expand@font@defaults\maybe@update@bfseries@defaults \ifx\f@family\rmdef@ult\fontseries\bfseries@rm \else\ifx\f@family\sfdef@ult\fontseries\bfseries@sf \else\ifx\f@family\ttdef@ult\fontseries\bfseries@tt \else\fontseries\bfdefault\fi\fi\fi \UseHook{bfseries}\selectfont So the command should show the public robust meaning even if it is only \protect\foo. It should also show a matching internal worker macro if it exists. It is OK to require LaTeX3 tools if that makes it easier. It would also be nice if the command could display visible indicators for spaces, similar to how some editors or debugging tools show them. For example, something like printing \bf as \bf␣, so that every space in the macro definition is clearly visible. I’ve already tried some different approaches, including redefining \meaning, using internal \@-prefixed macros, and even experimenting with expl3 commands like \cs_parameter_spec:N and \cs_replacement_spec:N. Most of these attempts either produced only partial results (for example, showing \protect\genfrac but not the internal wrapper) or failed with expansion errors such as “Argument of \genfrac has an extra }.” I don't think I know or remember enough to achieve this command, and I’d really appreciate an explanation or working implementation from someone who understands how to introspect macros properly. EDIT: I've tried this code below which produces a good approximation for what I want above. \documentclass{article} \usepackage{amsmath} \makeatletter \def\@@csmean#1{% \begingroup \tt \frenchspacing {\slshape \expandafter\string\csname#1\endcsname} \ =\ \expandafter\meaning\csname #1\endcsname \endgraf \smallskip \endgroup } \def\@csmean#1{% \ifcsname#1\endcsname \@@csmean{#1}% \fi } \def\csmean#1{% \@csmean{#1}% \@csmean{#1 }% \@csmean{@#1}% \@csmean{@@#1}% \@csmean{x@#1}% \@csmean{x@@#1}% \@csmean{xeol@#1}% \@csmean{xeol@@#1}% \@csmean{xstar@#1}% \@csmean{xstar@@#1}% \@csmean{xopt@#1}% \@csmean{xopt@@#1}% \@csmean{#1@}% \@csmean{#1@@}% \@csmean{@#1@}% \@csmean{#1 code}% } \makeatother \begin{document} \csmean{genfrac} \end{document}

  • Parentheses with \numrange in siunitx
    by Nacho Antón on October 27, 2025 at 2:38 pm

    I would like to print parentheses before and after the two figures in \numrange, that is, obtaining (10, 20). I managed to change the separator with the option range-phrase, but I am not able to print the parentheses. According to the user manual (p. 35), it should be possible, but I do not know to activate the brackets. MWE \documentclass{article} \usepackage{siunitx} \sisetup{ range-phrase = {, }, range-open-bracket = {(}, range-close-bracket = {)} } \begin{document} \numrange{10}{20} \end{document}