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

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

  • Water molecule in tikz [duplicate]
    by Andy Fletcher on June 29, 2026 at 3:26 pm

    How can I draw a water molecule using tikz like the ones in the image below with "H" in hydrogen atoms and "O" in oxygen atom?

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

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

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

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

  • How to align wrapped page numbers in a MakeIndex/imakeidx index
    by test on June 29, 2026 at 8:45 am

    I have a problem with the formatting of index entries. If an index entry has multiple page references and the list of page numbers wraps onto a new line, the continuation line starts flush left. Instead, I would like the continued page numbers to be either aligned under the first page number (i.e. in the middle) or right-aligned. In some cases, even the first line does not place the page numbers flush with the right margin (unfortunately, I am not able to reproduce it here). For example, I currently get: De Civitate Dei, 1 3 whereas I would like sth. like De Civitate Dei, 1 3 This is my ist-file: quote '+' headings_flag 0 heading_prefix "" heading_suffix "}\\nopagebreak\n" symhead_positive "Symbole" numhead_positive "" delim_0 "\\nobreak\\hfill " delim_1 "\\nobreak\\hfill " delim_2 "\\nobreak\\hfill " delim_n "\\nobreak, " suffix_2p "f." preamble "\\begin{theindex}\n\n" postamble "\n\n\\end{theindex}\n" item_0 "\n\n \\indexspace\n\n \\item " item_1 "\n \\indexspace\n \\subitem " item_2 "\n \\indexspace\n \\subsubitem " What I want is: a continuation indent for wrapped page-number lines. So the page numbers stay in a fixed “column”, and if they wrap, the second line is indented under that column, not flush left, like here: This is my MWE: \documentclass{scrbook} \usepackage{imakeidx} \usepackage{hyperref} \usepackage{showframe} \makeatletter \renewcommand{\@idxitem}{\par}% remove \hangindent40\p@ \makeatother \makeindex \makeatletter \patchcmd{\idx@@heading}{\section*}{\chapter*}{}{} \makeatother \makeatletter %\renewcommand\@idxitem{\par} \renewcommand\@idxitem{\par\vspace{13pt}} \renewcommand\subitem{\par} \renewcommand\subsubitem{\par} \makeatother \begin{document} \section{First section} Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam rutrum aliquet elit in pellentesque. Proin nulla eros, consequat nec\index{1@pu} convallis vel, vulputate vitae purus\index{0@purusu rusuru surus Schönheitswahnsinn}. Pellentesque consequat euismod sapien, ac porttitor diam laoreet id. Pellentesque habitant morbi tristique senectus\index{senectus} et netus et malesuada fames ac turpis egestas. Sed vehicula magna orci, nec congue sem congue ac. Sed fringilla aliquam interdum. Nullam quis commodo massa.\index{Schönheitswahnsinn abc def ghi jklmnopq} \pagebreak A \pagebreak TEST \pagebreak Test \pagebreak B \index{0@purusu rusuru surus Schönheitswahnsinn} \pagebreak C \pagebreak Test \pagebreak Test \pagebreak Test \index{0@purusu rusuru surus Schönheitswahnsinn} \pagebreak A \pagebreak TEST \pagebreak Test \pagebreak B \index{0@purusu rusuru surus Schönheitswahnsinn} \pagebreak C \pagebreak Test \pagebreak Test \pagebreak Test \index{0@purusu rusuru surus Schönheitswahnsinn} \pagebreak A \pagebreak TEST \pagebreak Test \pagebreak B \index{0@purusu rusuru surus Schönheitswahnsinn} \pagebreak C \pagebreak Test \pagebreak Test \pagebreak Test \index{0@purusu rusuru surus Schönheitswahnsinn} \pagebreak A \pagebreak TEST \pagebreak Test \pagebreak B \index{0@purusu rusuru surus Schönheitswahnsinn} \pagebreak C \pagebreak Test \pagebreak Test \pagebreak Test \index{0@purusu rusuru surus Schönheitswahnsinn} \printindex \end{document}

  • Node label style in TikZ cd
    by CarLaTeX on June 29, 2026 at 7:47 am

    Is it possible to set the font style of the node labels in tikz-cd? Pay attention: the node labels, not the arrow labels or the node itself. I tried with every label/.append style={font=\scriptstyle,}, but it doesn't work. In the following MWE, I would like to have all the node labels \scriptstyle, without writing it in every label. \documentclass{article} \usepackage{tikz-cd} \tikzset{punto/.style={ circle, fill=red, inner sep=2pt } } \begin{document} \begin{tikzcd}[ cells={nodes={punto}}, ] |[label=left:{\scriptstyle 1}]| & |[label=right:{\scriptstyle 2}]|\\ |[label=left:{\scriptstyle 3}]| & |[label=right:{\scriptstyle 4}]|\\ \end{tikzcd} \end{document}

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

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

  • draw line shadow or outline
    by Abd el hamid BENAOUM on June 29, 2026 at 12:01 am

    I am trying to draw a line in TikZ between two arbitrary points, for example, from $A(0,0)$ to $B(3,5)$, where the gradient (degradation) runs perpendicularly (transversely) to the path itself. The line should be solid black in the exact center and fade smoothly to white/transparent on both the top and bottom edges, looking like a soft or blurred brush stroke. like this: I managed to approximate this by drawing a manual path with calc offsets and calculating the specific shading angle manually: \begin{tikzpicture} % Define coordinates for the horizontal path (center-line) % A is the starting point, B is the ending point \coordinate (A) at (0,0); \coordinate (B) at (6,0); % Create a vertical degradation (fading) using a shaded rectangle. % We define a rectangle centered on the line, where: % - top color fades to white % - bottom color fades to white % - middle color is solid black % Adjust the height (e.g., 0.6cm) to make the bar and blur thicker or thinner. % Adjust the width (the X coordinate of B) to make it longer or shorter. \shade[top color=white, bottom color=white, middle color=black, line cap=butt] ($(A) + (0, 0.3cm)$) rectangle ($(B) + (0, -0.3cm)$); \end{tikzpicture}

  • Column break from multicol package seems to be ignored
    by Maniel SOTOMAYOR on June 28, 2026 at 10:57 pm

    I'm trying to work two parallel columns of text with the multicol package. When I try to break columns it seems to be ignored. Here's a MWE: \documentclass[b6paper, 10pt, twoside, openright, final]{memoir} \setlrmarginsandblock{1.5cm}{.5cm}{*} \setulmarginsandblock{1.5cm}{*}{1} \checkandfixthelayout{} \usepackage{multicol} \usepackage{xcolor} \usepackage{lipsum} \title{ My Memoir } \author{M} \date{June 28, 2026} \begin{document} \begin{multicols}{2} \parbox[t]{\columnwidth}{% \lipsum[1][1-2] } \vfill\ \columnbreak \parbox[t]{\columnwidth}{% \lipsum[2][1-2] } \vfill\ \end{multicols} \end{document} The text continues on the same paragraph without switching columns. How can I make sure the text switches from the left column into the right column?

  • How to add vertical space between index entries in LaTeX (without idxlayout) [duplicate]
    by test on June 28, 2026 at 6:01 pm

    I would like to insert a 3 pt vertical space between index entries. How can I achieve this? I have already tried unsuccessfully using \renewcommand{\indexspace}{\vspace{6pt}} and \renewcommand\@idxitem{\par\vspace{3pt}}. Here is my MWE: \documentclass{scrbook} \usepackage{imakeidx} \usepackage{hyperref} \usepackage{showframe} \makeatletter \renewcommand{\@idxitem}{\par}% remove \hangindent40\p@ \makeatother \makeindex \makeatletter \patchcmd{\idx@@heading}{\section*}{\chapter*}{}{} \makeatother \makeatletter %\renewcommand\@idxitem{\par} \renewcommand\@idxitem{\par\vspace{3pt}} \renewcommand\subitem{\par} \renewcommand\subsubitem{\par} \makeatother \makeatletter \renewcommand{\indexspace}{\vspace{30pt}} \makeatother \setlength{\itemsep}{3pt} \setlength{\parsep}{0pt} \setlength{\parskip}{0pt} \begin{document} \section{First section} Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam rutrum aliquet elit in pellentesque. Proin nulla eros, consequat nec convallis vel, vulputate vitae purus\index{purusu rusuru surus Schönheitswahnsinn}. Pellentesque consequat euismod sapien, ac porttitor diam laoreet id. Pellentesque habitant morbi tristique senectus\index{senectus} et netus et malesuada fames ac turpis egestas. Sed vehicula magna orci, nec congue sem congue ac. Sed fringilla aliquam interdum. Nullam quis commodo massa.\index{Schönheitswahnsinn abc def ghi jklmnopq} \printindex \end{document}

  • Table of contents: Page numbers for part and multiline centered title
    by Martin on June 28, 2026 at 3:44 pm

    I want to adjust the table of contents such that The names of \parts are centered in the toc and appear with page numbers and The name of the toc has two lines that are centered. When I center the \parts, and add page numbers, these are not aligned with the page numbers of my sections. How can I align them properly? When using two lines in the name of the toc, the centering does not work. MWE: \documentclass{report} \usepackage{lipsum} \usepackage[newparttoc]{titlesec} \usepackage{titletoc} \usepackage{tocloft} \titleformat{\part}[display]{\Huge}{}{20pt}{\thispagestyle{empty}} \titlecontents{part}[0pt]{\addvspace{2pc}\centering\large\bfseries}{\hfill}{}{\hfill \contentspage} \setlength{\cftbeforesecskip}{6pt} \setlength{\cftbeforetoctitleskip}{0pt} \renewcommand{\cftpnumalign}{c} \renewcommand{\cfttoctitlefont}{\hfil\Huge\scshape} \renewcommand{\cftaftertoctitle}{\hfil} \setcounter{secnumdepth}{0} \setcounter{tocdepth}{1} \begin{document} \renewcommand{\contentsname}{Contents title \\ \small{contents title part 2}} \tocloftpagestyle{empty}{\pagestyle{empty} \tableofcontents \clearpage} \part{First Part} \section{a1} \lipsum[1-100] \section{a2} \lipsum[1-100] \section{a3} \lipsum[1-100] \part{Second PartSecond Part} \section{a1} \lipsum[1-100] \section{a2} \lipsum[1-100] \section{a3} \lipsum[1-100] \part{Third PartThird PartThird Part} \section{a1} \lipsum[1-100] \section{a2} \lipsum[1-100] \section{a3} \lipsum[1-100] \end{document}

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

    A user ask to stack diacritics at small capitals in NewCM. Small Capitals are accessible with scmp from lowercase and with c2sc from uppercase. But stacking fails. When say A is followed by U+0304 (combining macron) with c2sc enabled the letter switches to the plain capital A. When U+0304 is removed the A in small capital is produced. NewCM contains information for stacking at its small capitals too but it seems that there is a but in the engine or something else happens which I do not understand. Here is a MWE: \documentclass{article} \usepackage[default]{fontsetup} \begin{document} \addfontfeatures{RawFeature=+c2sc} \textsc{ā, ī, ū, ṭ, ḍ, ḷ, ṁ, ṃ, ṇ, ṅ, ñ} \textsc{a}̄ \textsc{a} A Ā \end{document} Notice that sc n with tilde works because this character is precomposed in the font. But we can not expect the font to have all characters precomposed. This is why we have stacking. The output is erratic. The line \textsc{a}̄ is not a result of stacking but of negative width of the macron, this is why it is not centered. Notice that you may find another font that gives correct output. But this will happen just because it has the above characters precomposed. Stacking still fails. We cannot precompose everything.

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

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

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

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

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

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

  • How to remove the `:n` specifier when calling `\getdata:n { h }`?
    by xcn on June 28, 2026 at 4:41 am

    If I replace in: \cs_new:Nn \getdata:n { \prop_item:Nn \g_landingslab_data_prop {#1} } \cs_set:Npn \getdata #1 { \prop_item:Nn \g_landingslab_data_prop {#1} } then I can use \getdata{ h } instead of \getdata:n { h } , is it the correct way to do this ? \documentclass[12pt]{article} \usepackage[UTF8]{ctex} \usepackage{amsmath,siunitx} \ExplSyntaxOn \prop_new:N \g_landingslab_data_prop \cs_new:Nn \getdata:n { \prop_item:Nn \g_landingslab_data_prop {#1} } \cs_new:Nn \putdata:nn { \prop_put:Nnn \g_landingslab_data_prop {#1} {#2} } \keys_define:nn { landingslab } { width .code:n = { \putdata:nn { width } {#1} }, length .code:n = { \putdata:nn { length } {#1} }, h .code:n = { \putdata:nn { h } {#1} }, c .code:n = { \putdata:nn { c } {#1} }, d .code:n = { \putdata:nn { d } {#1} }, s .code:n = { \putdata:nn { s } {#1} }, frontfaceload .code:n = { \putdata:nn { frontfaceload } {#1} }, rearfaceload .code:n = { \putdata:nn { rearfaceload } {#1} }, } \cs_new_protected:Nn \l_landingslab_calc:n { \keys_set:nn { landingslab } {#1} \putdata:nn { h0 } { \fp_eval:n { \getdata:n { h } - \getdata:n { c } - \getdata:n { d } / 2 } } landing~slab~thickness: ~$ h = \getdata:n { h } \, \unit{mm} $\par slab~effective~depth:~$ h\sb 0 = \getdata:n { h0 }\, \unit{mm} $\par } \NewDocumentCommand{\stairPTB}{m}{ \l_landingslab_calc:n {#1} } \ExplSyntaxOff \begin{document} \begin{center}{\large\bfseries civil air\ defence\ stair }\end{center} \stairPTB{ width = 1.5, length = 2.9, h = 120, c = 20, d = 12, s = 200, frontfaceload = 60, rearfaceload = 30 } \end{document}

  • Formatting long division without the longdivision package
    by Matt on June 28, 2026 at 3:59 am

    I'm trying to make a worksheet where students need to fill out parts of a long division statement. I usually use the longdivision package, but realized that I can't cover up parts of it for students to fill out. Any suggestions? I've attached an image for reference.

  • Auto-calculate max/min/average for blood glucose table with longtblr, stats auto refresh after compiling
    by mike on June 28, 2026 at 3:59 am

    I want to create a blood glucose monitoring log with longtblr. The core requirement is: after I input glucose numbers inside table cells, the weekly and monthly statistical results (max value, min value, average value) can be automatically recalculated and updated every time I compile the document. My original code uses static text for statistics, which means I have to rewrite all stats manually every time I add new glucose data. This is inefficient. I hope to use LaTeX built-in calculation packages to extract all valid numbers from table cells and generate statistics automatically. Full original code below: \documentclass[a4paper,landscape,10pt]{article} \usepackage{ctex} \usepackage{geometry} \usepackage{array} \usepackage{tabularray} \usepackage{ninecolors} \usepackage{xcolor} \geometry{left=1.2cm,right=1.2cm,top=1.8cm,bottom=1.8cm} \newcommand{\zz}[1]{\ifnum#1<10 0#1\else#1\fi} \pagecolor{cyan!10} \begin{document} \title{\Large Blood Glucose Monitoring Log} \author{Name: \underline{\hspace{4cm}} \quad Normal fasting range:4.4~7.0 mmol/L} \date{} \maketitle {\centering \begin{longtblr}[caption={Blood Glucose Log}] { colspec = {c c c c c c c c c Q[8cm,c]}, rowhead = 1, column{3} = {bg=pink!15}, column{4-5} = {bg=green!15}, column{6-7} = {bg=orange!15}, column{8-9} = {bg=blue!15}, vlines, hlines } Date &Weekday &Fasting &1h After Breakfast &2h After Breakfast &1h After Lunch &2h After Lunch &1h After Dinner &2h After Dinner & Remarks \\ % Week 1, Jun 1–7 2026-\zz{6}-\zz{1} & Monday & & & & & & & & \\ 2026-\zz{6}-\zz{2} & Tuesday & & & & & & & & \\ 2026-\zz{6}-\zz{3} & Wednesday & & & & & & & & \\ 2026-\zz{6}-\zz{4} & Thursday & & & & & & & & \\ 2026-\zz{6}-\zz{5} & Friday & & & & & & & & \\ 2026-\zz{6}-\zz{6} & Saturday & & & & & & & & \\ 2026-\zz{6}-\zz{7} & Sunday & & & & & & & & \\ \SetCell[c=10]{l}{\textbf{【Jun 1–7】No measurements recorded this week}} & & & & & & & & & \\ % Week 2, Jun 8–14 2026-\zz{6}-\zz{8} & Monday & & & & & & & & \\ 2026-\zz{6}-\zz{9} & Tuesday & & & & & & & & \\ 2026-\zz{6}-\zz{10}& Wednesday & & & & & & & & \\ 2026-\zz{6}-\zz{11}& Thursday & & & & & & & & \\ 2026-\zz{6}-\zz{12}& Friday & & & & & & & & \\ 2026-\zz{6}-\zz{13}& Saturday & & & & & & & & \\ 2026-\zz{6}-\zz{14}& Sunday & & & & & & & & \\ \SetCell[c=10]{l}{\textbf{【Jun 8–14】No measurements recorded this week}} & & & & & & & & & \\ % Week 3, Jun 15–21 2026-\zz{6}-\zz{15}& Monday & & & & & & & & \\ 2026-\zz{6}-\zz{16}& Tuesday & & & & & & & & \\ 2026-\zz{6}-\zz{17}& Wednesday & & & & & & & & \\ 2026-\zz{6}-\zz{18}& Thursday & & & & & & & & \\ 2026-\zz{6}-\zz{19}& Friday & & & & & & & & \\ 2026-\zz{6}-\zz{20}& Saturday & & & & & & & & \\ 2026-\zz{6}-\zz{21}& Sunday & & & & & & & & \\ \SetCell[c=10]{l}{\textbf{【Jun 15–21】No measurements recorded this week}} & & & & & & & & & \\ % Week 4, Jun 22–28 (with sample data) 2026-\zz{6}-\zz{22}& Monday & & & & & & & & \\ 2026-\zz{6}-\zz{23}& Tuesday & & & & & & & & \\ 2026-\zz{6}-\zz{24}& Wednesday & & & & & & & & \\ 2026-\zz{6}-\zz{25}& Thursday & & & & & & & & \\ 2026-\zz{6}-\zz{26}& Friday &6.7(8:56) & & &7.3(13:41) & & &6.2(21:17) & Brisk walking for 40 minutes after lunch \\ 2026-\zz{6}-\zz{27}& Saturday &6.7(8:55) & & &6.8(14:09) & &7.0(20:44) & & Brisk walking after breakfast & lunch; aerobic exercise after dinner \\ 2026-\zz{6}-\zz{28}& Sunday &6.0(9:12) & & & & & & &Aerobic exercise after breakfast \\ \SetCell[c=10]{l}{\textbf{【Jun 22–28】Weekly stats: Fasting max 6.7, min 6.0, avg 6.47; 1h postprandial max 7.3, min 6.8, avg 7.05; 2h postprandial max 6.2, min 6.2, avg 6.2}} & & & & & & & & & \\ % Jun 29–30 2026-\zz{6}-\zz{29}& Monday & & & & & & & & \\ 2026-\zz{6}-\zz{30}& Tuesday & & & & & & & & \\ \SetCell[c=10]{l}{\color{blue}\textbf{【Whole June】Monthly stats: Fasting max 6.7, min 6.0, avg 6.47; 1h postprandial max 7.3, min 6.8, avg 7.05; 2h postprandial max 6.2, min 6.2, avg 6.2}} & & & & & & & & & \\ % July empty 2026-\zz{7}-\zz{1} & Wednesday & & & & & & & & \\ 2026-\zz{7}-\zz{2} & Thursday & & & & & & & & \\ 2026-\zz{7}-\zz{3} & Friday & & & & & & & & \\ 2026-\zz{7}-\zz{4} & Saturday & & & & & & & & \\ 2026-\zz{7}-\zz{5} & Sunday & & & & & & & & \\ 2026-\zz{7}-\zz{6} & Monday & & & & & & & & \\ 2026-\zz{7}-\zz{7} & Tuesday & & & & & & & & \\ \SetCell[c=10]{l}{\textbf{【Jul 1–7】No measurements recorded this week}} & & & & & & & & & \\ 2026-\zz{7}-\zz{8} & Wednesday & & & & & & & & \\ 2026-\zz{7}-\zz{9} & Thursday & & & & & & & & \\ 2026-\zz{7}-\zz{10}& Friday & & & & & & & & \\ 2026-\zz{7}-\zz{11}& Saturday & & & & & & & & \\ 2026-\zz{7}-\zz{12}& Sunday & & & & & & & & \\ 2026-\zz{7}-\zz{13}& Monday & & & & & & & & \\ 2026-\zz{7}-\zz{14}& Tuesday & & & & & & & & \\ \SetCell[c=10]{l}{\textbf{【Jul 8–14】No measurements recorded this week}} & & & & & & & & & \\ 2026-\zz{7}-\zz{15}& Wednesday & & & & & & & & \\ 2026-\zz{7}-\zz{16}& Thursday & & & & & & & & \\ 2026-\zz{7}-\zz{17}& Friday & & & & & & & & \\ 2026-\zz{7}-\zz{18}& Saturday & & & & & & & & \\ 2026-\zz{7}-\zz{19}& Sunday & & & & & & & & \\ 2026-\zz{7}-\zz{20}& Monday & & & & & & & & \\ 2026-\zz{7}-\zz{21}& Tuesday & & & & & & & & \\ \SetCell[c=10]{l}{\textbf{【Jul 15–21】No measurements recorded this week}} & & & & & & & & & \\ 2026-\zz{7}-\zz{22}& Wednesday & & & & & & & & \\ 2026-\zz{7}-\zz{23}& Thursday & & & & & & & & \\ 2026-\zz{7}-\zz{24}& Friday & & & & & & & & \\ 2026-\zz{7}-\zz{25}& Saturday & & & & & & & & \\ 2026-\zz{7}-\zz{26}& Sunday & & & & & & & & \\ 2026-\zz{7}-\zz{27}& Monday & & & & & & & & \\ 2026-\zz{7}-\zz{28}& Tuesday & & & & & & & & \\ \SetCell[c=10]{l}{\textbf{【Jul 22–28】No measurements recorded this week}} & & & & & & & & & \\ 2026-\zz{7}-\zz{29}& Wednesday & & & & & & & & \\ 2026-\zz{7}-\zz{30}& Thursday & & & & & & & & \\ 2026-\zz{7}-\zz{31}& Friday & & & & & & & & \\ \SetCell[c=10]{l}{\color{blue}\textbf{【Whole July】No valid measurement data}} & & & & & & & & & \\ % August empty 2026-\zz{8}-\zz{1} & Saturday & & & & & & & & \\ 2026-\zz{8}-\zz{2} & Sunday & & & & & & & & \\ 2026-\zz{8}-\zz{3} & Monday & & & & & & & & \\ 2026-\zz{8}-\zz{4} & Tuesday & & & & & & & & \\ 2026-\zz{8}-\zz{5} & Wednesday & & & & & & & & \\ 2026-\zz{8}-\zz{6} & Thursday & & & & & & & & \\ 2026-\zz{8}-\zz{7} & Friday & & & & & & & & \\ \SetCell[c=10]{l}{\textbf{【Aug 1–7】No measurements recorded this week}} & & & & & & & & & \\ 2026-\zz{8}-\zz{8} & Saturday & & & & & & & & \\ 2026-\zz{8}-\zz{9} & Sunday & & & & & & & & \\ 2026-\zz{8}-\zz{10}& Monday & & & & & & & & \\ 2026-\zz{8}-\zz{11}& Tuesday & & & & & & & & \\ 2026-\zz{8}-\zz{12}& Wednesday & & & & & & & & \\ 2026-\zz{8}-\zz{13}& Thursday & & & & & & & & \\ 2026-\zz{8}-\zz{14}& Friday & & & & & & & & \\ \SetCell[c=10]{l}{\textbf{【Aug 8–14】No measurements recorded this week}} & & & & & & & & & \\ 2026-\zz{8}-\zz{15}& Saturday & & & & & & & & \\ 2026-\zz{8}-\zz{16}& Sunday & & & & & & & & \\ 2026-\zz{8}-\zz{17}& Monday & & & & & & & & \\ 2026-\zz{8}-\zz{18}& Tuesday & & & & & & & & \\ 2026-\zz{8}-\zz{19}& Wednesday & & & & & & & & \\ 2026-\zz{8}-\zz{20}& Thursday & & & & & & & & \\ 2026-\zz{8}-\zz{21}& Friday & & & & & & & & \\ \SetCell[c=10]{l}{\textbf{【Aug 15–21】No measurements recorded this week}} & & & & & & & & & \\ 2026-\zz{8}-\zz{22}& Saturday & & & & & & & & \\ 2026-\zz{8}-\zz{23}& Sunday & & & & & & & & \\ 2026-\zz{8}-\zz{24}& Monday & & & & & & & & \\ 2026-\zz{8}-\zz{25}& Tuesday & & & & & & & & \\ 2026-\zz{8}-\zz{26}& Wednesday & & & & & & & & \\ 2026-\zz{8}-\zz{27}& Thursday & & & & & & & & \\ 2026-\zz{8}-\zz{28}& Friday & & & & & & & & \\ \SetCell[c=10]{l}{\textbf{【Aug 22–28】No measurements recorded this week}} & & & & & & & & & \\ 2026-\zz{8}-\zz{29}& Saturday & & & & & & & & \\ 2026-\zz{8}-\zz{30}& Sunday & & & & & & & & \\ 2026-\zz{8}-\zz{31}& Monday & & & & & & & & \\ \SetCell[c=10]{l}{\color{blue}\textbf{【Whole August】No valid measurement data}} & & & & & & & & & \\ \end{longtblr} } \section{Blood Glucose Statistical Summary} \subsection{Weekly Stats: Jun 22–28} \begin{itemize} \item Fasting glucose: Max 6.7, Min 6.0, Average 6.47 \item 1-hour postprandial glucose: Max 7.3, Min 6.8, Average 7.05 \item 2-hour postprandial glucose: Max 6.2, Min 6.2, Average 6.2 \end{itemize} \subsection{Whole June Monthly Stats} \begin{itemize} \item Fasting glucose: Max 6.7, Min 6.0, Average 6.47 \item 1-hour postprandial glucose: Max 7.3, Min 6.8, Average 7.05 \item 2-hour postprandial glucose: Max 6.2, Min 6.2, Average 6.2 \end{itemize} \subsection{July, August} No valid measurement data available. \end{document} My problems & requirements All current statistical texts are hard-coded static text. Every time I add or modify glucose values inside table cells, I have to manually recalculate and rewrite all max/min/average lines, which is tedious and error-prone. I need an automatic calculation mechanism: extract all decimal glucose numbers from specific table columns (Fasting, 1h postprandial, 2h postprandial), filter empty cells out, then compute maximum, minimum and average automatically. The computed weekly and monthly statistics should refresh automatically every time I compile the PDF, without manually editing statistic text blocks. The table uses longtblr for multi-page breaking and colored column backgrounds; please keep the original table layout, coloring and Chinese support (ctex package). Numbers inside cells have time suffix like 6.7(8:56); the parser only needs to extract the float value before the parenthesis and ignore time text. What packages/methods are suitable? Is it possible to use xfp, expl3 or pgfmath to collect numbers from longtblr cells and do batch statistics? If longtblr cannot expose cell contents to global macros, what alternative structure can I adopt to separate raw data storage and table display while retaining auto-statistics?

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

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

  • Beamer frame command without environment [duplicate]
    by Skeeve on June 27, 2026 at 7:37 am

    I would like to write two commands, \bframe and \eframe, so that \bframe Lorem ipsum \eframe is equivalent to \begin{frame} Lorem ipsum \end{frame} However the straightforward solution \newcommand{\bframe}{\begin{frame}} \newcommand{\eframe}{\end{frame}} leads to the error File ended while scanning use of \beamer@collect@@body, which I cannot understand. Any hints? P.S. The environment works just fine (but I don't understand why the separate commands behave in a different way): \newenvironment{myframe}{\begin{frame}}{\end{frame}}

  • Using two different fonts in math mode with LuaLaTeX
    by rahotep on June 27, 2026 at 5:55 am

    I'm trying to do the following in LuaLaTeX: having the main font be Arial; having the upper case letters in math font be Arial (if posible, not a strong requierement); having the lower case letters in math font be latin modern; having the numbers in math font be in Arial. To achieve these goals, I found out that the package mathastext could be a solution (as mentionned in a previous post), if used with the option "noletters". However, this option doesn't work as intended (or maybe I didn't understand what it was meant to do). Here is a MWE, with the result % !TEX TS-program = lualatex \documentclass[12pt,a4paper,french]{article} \usepackage{mathtools,amsfonts} % amsthm \usepackage[margin=1.5cm]{geometry} \usepackage{babel} \usepackage[no-math]{fontspec} % [no-math] \setmainfont{Arial} \usepackage[noletters,frenchmath*]{mathastext} % \MTmathstandardletters % \MTversion*{sans} \usepackage{lipsum} \begin{document} \lipsum[11] 1234567890 $1234567890$ $ABCDEFGHIKLMNOPQRSTUVWXYZ$ $abcdefghijklmnopqrstuvwxyz$ \end{document}

  • Arbitrary string for date ("saec\adddotspace 5") in biblatex-philosophy
    by Alexander Wittmann on June 27, 2026 at 1:05 am

    I want to include a manuscript in my bibliography. The date of the manuscript is "5. century (CE)", somewhere between 400 and 499, which reads as "saec. 5". That's all we know. The other entries are as usual. \documentclass{scrartcl} \begin{filecontents}{VergiliusRomanus.bib} @Book{Conte:VergilAeneis, editor = {Gian Biagio Conte}, title = {Publius Vergilius Maro \mkbibemph{Aeneis}}, publisher = {de Gruyter}, address = {Berlin}, year = 2019 } @Misc{VergiliusRomanus, author = {\mkbibemph{Vergilius Romanus}}, title = {Codex Vaticanus Latinus 3867}, date = {{saec\adddotspace 5}}, % <-- location = {Bibliotheca Apostolica Vaticana}, url = {https://commons.wikimedia.org/wiki/Category:Roman_Vergil} } \end{filecontents} \usepackage[main=german]{babel} \usepackage[style=philosophy-modern,sortlocale=de_DE,sorting=nyvt,% alldates=terse, labeldateparts=true, language=german,% origdate=comp, datezeros=false, backend=biber, % noroman=true, %? ]{biblatex} \addbibresource{VergiliusRomanus.bib} \begin{document} bla \nocite{*} \printbibliography{} \end{document}

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

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

  • Spacing TikZ pictures with \hspace and \vspace
    by LMPogoda on June 26, 2026 at 8:42 pm

    I have several TikZ pictures. These are a set of rectangles with some nodes inside, creating a grid on a page. These are spaced by \hspace horizontally and \vspace vertically. It mostly works unless \hspace is just after the \vspace. When I want to push a TikZ picture toward right margin after \vspace, \hspace doesn't work. I think it is related to a switch from vertical to horizontal mode, but I haven't mastered it yet. I removed the nodes from TikZ code, but what matters (and does not work) is left intact. \documentclass[a4paper]{article} \usepackage{geometry} \geometry{a4paper,top=10mm,bottom=27mm,hmargin=10.0mm} \usepackage{tikz} \usepackage{graphicx} \pagestyle{empty} \setlength\parindent{0pt} \begin{document} \begin{tikzpicture} \draw[rounded corners=2pt] (0,0) rectangle (60.00mm,60.00mm); \end{tikzpicture}\hspace{5mm} \begin{tikzpicture} \draw[rounded corners=2pt] (0,0) rectangle (60.00mm,60.00mm); \end{tikzpicture}\hspace{5mm} \begin{tikzpicture} \draw[rounded corners=2pt] (0,0) rectangle (60.00mm,60.00mm); \end{tikzpicture}\vspace{5mm} \hspace{65mm}\begin{tikzpicture} \draw[rounded corners=2pt] (0,0) rectangle (60.00mm,60.00mm); \end{tikzpicture}\hspace{5mm} \begin{tikzpicture} \draw[rounded corners=2pt] (0,0) rectangle (60.00mm,60.00mm); \end{tikzpicture}\vspace{5mm} \end{document} Edit: I replaced code snippet with complete document for better clarity.

  • Ordinal Date Suffixes not appearing using \datetime2 package
    by TheBeeTee on June 26, 2026 at 2:42 pm

    My document must display the date in US "long" format for all instances except the notary line where they want the fancy legalese "Sworn before me this Nth day of month, YYYY. I'm trying to define a new date format that does this and does not impact the day number as displayed in other instances. The global command \DTMlangsetup[en-US]{ord=raise} changes all instances, so not a solution. \documentclass[12pt, english]{article} \usepackage{babel} \usepackage[en-US]{datetime2} %\DTMlangsetup[en-US]{ord=raise}% This does not solve my problem. \DTMnewdatestyle{myFancyStyle}{% \renewcommand{\DTMdisplaydate}[4]{% \DTMenglishordinal{##3} day of % \DTMenglishmonthname{##2},~% \number##1% }% } \begin{document} Today's date in US long format: \textbf{\today} Today's date in pretentious legal format: \textbf{{\DTMsetdatestyle{myFancyStyle}\today}} It's supposed to be: \textbf{26\textsuperscript{th} day of June, 2026} \end{document}

  • Interaction between drawing something in the background and a page of floats
    by Werner on June 26, 2026 at 3:59 am

    In the following setup, I have a couple of images that forms part of a very large figure. The float ends up on a page of floats (on its own), because of the size. I plan on drawing some elements in the background, simulated by the background fill being the example images via \AddToHookNext{shipout/background}{<background drawing>}: \documentclass{article} \usepackage{lipsum,tikz} \begin{document} \lipsum[1-2] \begin{figure} \centering \tikz [remember picture] \node [inner sep = 10pt] (image-a) {\includegraphics[width = 0.5\linewidth]{example-image-a}}; \bigskip \tikz [remember picture] \node [inner sep = 10pt] (image-b) {\includegraphics[width = 0.5\linewidth]{example-image-b}}; \bigskip \tikz [remember picture] \node [inner sep = 10pt] (image-c) {\includegraphics[width = 0.5\linewidth]{example-image-c}}; \caption{A large figure} \AddToHookNext{shipout/background}{% \begin{tikzpicture}[remember picture, overlay] \filldraw [draw = red, fill = red!10!white, thick] (image-a.south west) rectangle (image-a.north east); \filldraw [draw = blue, fill = blue!10!white, thick] (image-b.south west) rectangle (image-b.north east); \filldraw [draw = green, fill = green!10!white, thick] (image-c.south west) rectangle (image-c.north east); \end{tikzpicture}} \end{figure} \lipsum[3-10] \end{document} Using this approach, however, puts the background drawing on the page where the original figure is processed, rather than where the actual figure is placed. How can I adjust the code so that the background content is placed correctly on the page where the float ends up? Ideally I'd like to keep the code as part of the figure as it semantically belongs with the figure, rather than placing it at some other bizarre place in the document just to make sure it fits there.

  • Vertically Center Text in Figure Environment [duplicate]
    by nebulisx on June 25, 2026 at 2:54 am

    I am trying to vertically center text in an figure in relation to the graphic inserted in the environment Here is the figure environment code I am using \begin{document} ... \begin{figure}[h] \includegraphics[scale=0.15]{test.jpg} \begin{minipage}[c][\columnsep][c]{1.0\linewidth} \hspace{2em} {\Large \today} \end{minipage} \end{figure} \newpage \includepdf[pages=-]{pdf.pdf} \newpage \end{document} This is the result: I can't entirely tell, but from playing with the position options the height of the figure environment may be different from the height of the images. Also this is a problem I am less worried about but for some reason if the figure goes off the page, it goes to the page after the inserted pdf from \includepdf rather than to the next page.

  • Coloring a region of a sphere in 3D using TikZ
    by John on June 23, 2026 at 11:15 am

    I have just started using the 3d library in TikZ (and I'm quite new to the tikz package itself). I am modelling a physics problem; I want to draw a sphere that represents my system. The particularity of that sphere is to have regions delimited by parallel circles around the North and South poles; I would like to color these regions in a different shade than the rest of the sphere. I have been looking everywhere and I can't find how to do this (if it is possible); using \path and \fill doesn't seem to work. Sorry if it's a stupid question, thanks for your help! Here is my code (I'm also showing the θ,φ parametrization in my sketch; in commentary, my failed attempts for coloring the North Pole): \documentclass{article} \usepackage{tikz} \usepackage{tikz-3dplot} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}[scale=3,tdplot_main_coords] \def\rvec{1.2} \def\thetavec{55} \def\phivec{35} \def\thetaRC{10} \shadedraw[tdplot_screen_coords,ball color = white] (0,0) circle (\rvec); \coordinate (O) at (0,0,0); \tdplotsetcoord{C}{\rvec}{\thetavec}{\phivec} \tdplotsetcoord{UD}{\rvec}{\thetaRC}{90} \tdplotsetcoord{UG}{\rvec}{\thetaRC}{-90} \draw[thick,->] (0,0,0) -- (1.7,0,0) node[anchor=north east]{$x$}; \draw[thick,->] (0,0,0) -- (0,1.7,0) node[anchor=north west]{$y$}; \draw[thick,->] (0,0,0) -- (0,0,1.7) node[anchor=south]{$z$}; \draw[-stealth,very thick,color=green!60!black] (O) -- (C) node[above right=-2] {P}; \draw[dashed, color=green!60!black] (O) -- (Cxy); \draw[dashed, color=green!60!black] (C) -- (Cxy); \tdplotdrawarc[color=green!40!black]{(O)}{0.4}{0}{\phivec}{anchor=north}{\(\varphi\)} \tdplotsetthetaplanecoords{\phivec} \tdplotdrawarc[color=green!40!black,tdplot_rotated_coords]{(0,0,0)}{0.7}{0}{\thetavec}{anchor=south west}{\(\theta\)} \draw[dashed] (\rvec,0,0) arc (0:360:\rvec); \draw[thick] (\rvec,0,0) arc (0:110:\rvec); \draw[thick] (\rvec,0,0) arc (0:-70:\rvec); %\tdplotdrawarc[fill=green!40!black]{(0,0,.995*\rvec)}{.0998}{0}{360}{anchor=south west}{\(\theta\)}; %\path[fill=red,fill opacity=0.5] (0,0,\rvec) -- plot[variable=\t,domain=0:360] (xyz spherical cs:radius=\rvec,longitude=\t,latitude=90-\thetaRC); \end{tikzpicture} \end{document}

  • Structuring text in multiple lines / How does TeX interpret newline?
    by user1 on June 22, 2026 at 7:49 pm

    I want to be able to easily comment out selected parts of my document, e.g., „Sentence two“ in the following example. It seems that, TeX interprets a newline as a space (except if the newline in preceded by a comment) ignores double spaces (ex. 6) and thus also newlines preceded by a space (ex. 2) Does this hold for every scenario? Is there anything I should be aware of? Or can I replace all of my spaces by newlines? So example 3 is the best way to go? Note: Some examples are just for illustration purposes / completeness. \documentclass{article} \begin{document} % 1. Normal written Sentence one. Sentence two. Sentence three. % 2. Space at end of every row Sentence one. Sentence two. Sentence three. % 3. No spaces at end of row Sentence one. Sentence two. Sentence three. % 4. Comment at end of every row Sentence one.% Sentence two.% Sentence three. % 5. Space and comment at end of every row Sentence one. % Sentence two. % Sentence three. % 6. Double spaces (bonus) Sentence one. Sentence two. Sentence three. \end{document}

  • Consistent vertical alignment for open access icons with biblatex-ext
    by user20478285 on June 21, 2026 at 7:55 pm

    How can I have the same alignment for the open access icon from the biblatex-ext package even when used in a quote or itemize environment? The open access icon is aligned properly when using a plain fullcite or in the bibliography and sits on the baseline of the first line. When used in a quote or itemize environment however, the alignment is off. MWE below: \documentclass{article} \usepackage[style=ext-alphabetic]{biblatex} \usepackage[enable=true, symbolpackage=tikz]{biblatex-ext-oa} \addbibresource{biblatex-examples.bib} \begin{document} \fullcite{baez/article} \begin{quote} \fullcite{baez/article} \end{quote} \begin{itemize} \item \fullcite{baez/article} \end{itemize} \printbibliography \end{document}