Week
- Efficiency and Size trade-off when customize symbols?by Explorer on June 19, 2026 at 12:28 pm
This post originated wipet's comment here and here: The solution has one disadvantage and should not be used commonly with massive usage of these symbols. Each occurrence of this symbol saves to the PDF file a new code with all coordinates of all curves. This is not the same as if the font is used. Then the font is loaded only once to the PDF file (with curves of used characters) and then each occurence of the symbol in the document is realized as a reference to the font and its slot-code. The PDF is smaller. You can use \pdfxform or you can save the symbols to an external pdf and use \pdfximage primitives. I point out that saving a tikz picture into a box and usage of this box saves computation time needed by tikz which converts svg format to pdf format of curves specification, but it doesn't solve the problems mentioned in my comments above. Ad saving Tikz computation: we need not to use TikZ at all: Load svg image to inkscape and export it to eps format. Then cut the curves specification in the eps output and copy it to the \pdfliteral parameter. TikZ is not needed, the curves have native pdf format. In summary, I see four possible approaches to add custom symbol support: modify the LatinModernMath-Regular-Private.otf, add glyph slots to private area apply svg.path solution to define the symbol put svg.path symbol in a box to use for multiple times use primitive for example \pdfliteral to declare the symbols ... My question was: what is the trade-off here? Is there exists the best-practice? Feature Method1: patch font .otf file Method2: svg.path directly Method3: svg.path with box Method4: \pdfliteral primitive Depends on External Files Yes No No No Supports All Engines only unicode engines all engines all engines all engines(?) Runtime Efficiency High Low High Generated PDF File Size Small Big Big Supports Native Character Operations, e.g. \bm Yes (if coorresponding glyph was added) No (see for example) The same as left Edit Thr rows and columns of the table above could be extended freely, for example: "using a vector image (e.g. pdf)" or "use the xsavebox package or the pdfxform-commands in l3pdfxform to store the box, then it is an xobject and only stored once in the pdf" References: How to tweak the svg-symbol baseline and size to act exactly the same as `\ell`? Is that possible to get symbol-family like \ell for "k" and "h" with computer/latin modern math style? https://tex.stackexchange.com/a/763942/322482 https://tex.stackexchange.com/a/763984/322482 https://github.com/user-attachments/files/29108768/LatinModernMath-Regular-Private.zip
- NiceTabular - Default value for empty cellsby projetmbc on June 18, 2026 at 7:16 pm
In the code below, I want to only input the 1s and leave the zero cells blank. Is there an easy way to achieve this? \documentclass[border = 3pt]{standalone} \usepackage{nicematrix} \begin{document} \begin{NiceTabular}{>{\bfseries}*{6}{c}}[ hvlines, corners = NW ] \RowStyle{\bfseries} & A & B & C & D & E \\ A & 0 & 0 & 1 & 1 & 0 \\ B & 0 & 0 & 0 & 1 & 1 \\ C & 1 & 0 & 0 & 0 & 1 \\ D & 1 & 1 & 0 & 0 & 0 \\ E & 0 & 1 & 1 & 0 & 0 \end{NiceTabular} \end{document}
- Subitem arrowstyleby X3nius on June 18, 2026 at 3:27 pm
Is there an elegant way to define subitems as arrows? I've tried the following code, however, it is quite a circumstance to have to add [$\Rightarrow] for every subitem \documentclass[hyperref={pdfpagelabels=false}]{beamer} \usepackage{lmodern} \usepackage[english]{babel} \usepackage[T1]{fontenc} \usepackage{amsmath, amsfonts, amssymb} \usepackage{amsthm} \usepackage{beamerthemeshadow} \begin{document} \section{Section 1} \begin{frame} \begin{itemize} \item Item 1 \begin{itemize} \item[$\Rightarrow$] Subitem 1 \end{itemize} \end{itemize} \end{frame} \end{document}
- Print bibliography in subsections [duplicate]by X3nius on June 18, 2026 at 3:11 pm
Is there a way to force the printing of the bibliography in subsections using beamer class? When I try the code below, the the bibliography sections appear as sections, however, the first Subsection 1 is correct and appears in the blue field on the right hand side. What am I missing? Sample code: \documentclass{beamer} \usepackage[english]{babel} \usepackage[T1]{fontenc} \usepackage{beamerthemeshadow} \usepackage[backend=biber]{biblatex} \addbibresource{sources.bib} \begin{document} \begin{frame} \frametitle{Table of contents} \tableofcontents \end{frame} \section{Section 1} \begin{frame} \frametitle{Table of Contents} \tableofcontents[currentsection] \end{frame} \subsection{Subsection 1} \begin{frame} \end{frame} \section{Bibliography} \subsection{Books} \begin{frame} \nocite{*} \printbibliography[type=book,title={Books}] \end{frame} \subsection{Misc} \begin{frame} \nocite{*} \printbibliography[type=misc,title={Misc}] \end{frame} \end{document} sources.bib: @book{book, title = {Title}, author = {Author}, isbn = {1-23456-789}, publisher = {The Pubisher}, edition = {1. Edition} } @misc{wikipedia, title={Wikipedia}, author={Wikipedia}, year={2026}, url={https://en.wikipedia.org/wiki/Main_Page}, addendum={Accessed: 18 June 2026} }
- How to plot mark together with label with TikZ instead of pgfplots?by Explorer on June 18, 2026 at 1:45 pm
Claim: I don't want to use pgfplots in this post. For the sake of I have already have a bunch of non-pgfplots code as below, I don't want to switch to pgfplots solution. The code is as below: \documentclass[tikz]{standalone} \usepackage{fourier-otf} \begin{document} \begin{tikzpicture} \draw[-latex] (0,0) -- (12,0) node[right] {Team}; \draw[-latex] (0,0) -- (0,26/4) node[above] {Number}; \foreach \y in {0,5,10,15,20,25} \draw (0,{\y/4}) -- (-0.1,{\y/4}) node[left] {\y}; \foreach \y in {5,10,15,20,25} \draw[gray!30] (0,{\y/4}) -- (11.5,{\y/4}); \foreach \name[count=\n] in {A,...,K} { \draw (\n,0) -- (\n,-0.1) node[below] {\name}; } %%%%%%%%%%%%%%%%%%% % \draw[thick] plot[mark=*, mark size=2pt, mark options={fill=black}] coordinates { % (1,16/4) (2,4/4) (3,12/4) (4,6/4) (5,5/4) (6,16/4) (7,17/4) (8,8/4) (9,8/4) (10,15/4) (11,11/4) % }; % \foreach \i[count=\n] in {16,4,12,6,5,16,17,8,8,15,11} { % \node[above=3pt] at (\n,\i/4) {$\i$}; % } %%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%% \foreach \i[count=\n] in {16,4,12,6,5,16,17,8,8,15,11} { \node[fill=black,circle,inner sep=2pt,label={above:$\i$}] (tmp-\n) at (\n,{\i/4}) {}; } \draw foreach \i[count=\last] in{2,...,11} {(tmp-\last) -- (tmp-\i)}; % %%%%%%%%%%%%%%%%%%%% \end{tikzpicture} \end{document} I would prefer the syntax of plot only in tikz: \draw[thick] plot[mark=*, mark size=2pt, mark options={fill=black}] coordinates { (1,16/4) (2,4/4) (3,12/4) (4,6/4) (5,5/4) (6,16/4) (7,17/4) (8,8/4) (9,8/4) (10,15/4) (11,11/4)}; \foreach \i[count=\n] in {16,4,12,6,5,16,17,8,8,15,11} { \node[above=3pt] at (\n,\i/4) {$\i$}; } However, I didn't find some way to label when plot. Thus I have to repeat the data \foreach \i[count=\n] in {16,4,12,6,5,16,17,8,8,15,11}{...} for the second time, which is not considered as a good practice. Any suggestions on how to do this similar without pgfplots? I don't want two forloop/plots as possible.
- \DeclareFieldFormat seems to get ignored in after \clearname{author} in biblatex-ext-tabular bibliographyby Jonathan on June 18, 2026 at 12:23 pm
I have noticed some weird behaviour: When using the biblatex-ext-tabular package and \clearname{author} (or \usebibmacro{tabular:omitsortname}), \DelcareFieldFormat{title}{...} does not seem to have any effect: \documentclass{article} \usepackage[style=ext-authoryear]{biblatex} \usepackage{biblatex-ext-tabular} \addbibresource{biblatex-examples.bib} \DeclareFieldFormat{title}{banana} \defbibtabular{bibtabular}{}{}{\driver{\clearname{author}}\\} \begin{document} \cite{baez/online} \printbibtabular \end{document} The title ("Higher-Dimensional Algebra V: 2-Groups") is shown, although it should have been replaced by "banana". (Of course, that's not a meaningful example, but sensitive formatting instructions are ignored as well.) Any idea, why?
- Use of unicode-math range with direct Unicode inputby Socob on June 18, 2026 at 8:16 am
Using the range option in unicode-math to override specific symbol ranges, I would have expected that both the script selection commands (\mathbb etc.) and direct input via Unicode characters (e. g. ℝ) would produce the same result from the overriding font. However, this does not seem to be the case: \documentclass{article} \usepackage{unicode-math} \setmathfont{TeX Gyre Pagella Math} \setmathfont{Latin Modern Math}[range={bb}] \begin{document} \noindent Unicode input: $ℝ$ \noindent mathbb input: $\mathbb{R}$ \end{document} Output: I saw the question “Tell unicode-math how to translate unicode symbols (script vs calligraphic)”, but initially thought that the behavior there was due to complications of \mathcal and \mathscr representing the same Unicode codepoints. Am I correct in assuming that range will actually never affect the output for Unicode characters appearing literally in the TeX source, and that these will always try to use the main math font that was defined without range?
- correct way to reduce space above displayed equation which shows right below section header?by Nasser on June 18, 2026 at 2:25 am
When there is a displayed equation (say \begin{align*} first thing below section or subsection, the space between the section header and the equation is much larger than if the displayed equation was in middle with some text above it. Is there a way to make the space the same above the displayed equation, even if the equation is right below a section header? I tried adding this to preamble \setlength{\abovedisplayskip}{6pt} \setlength{\belowdisplayskip}{6pt} \setlength{\abovedisplayshortskip}{0pt} \setlength{\belowdisplayshortskip}{6pt} But the above had no effect. I can ofcourse add \vspace command with negative value above the displayed equation if it is first thing below section title, but this looks like a hack to me. Here is MWE. Compiled with lualatex using TL 2026 \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \section{Existence and uniqueness analysis} \begin{align*} y^{\prime}&=\left(x -2\right)^{2}\\ y \left(2\right) &= 1 \end{align*} This is a line here This is a line here This is a line here This is a line here \begin{align*} y^{\prime}&=\left(x -2\right)^{2}\\ y \left(2\right) &= 1 \end{align*} This is a line here This is a line here This is a line here This is a line here \begin{align*} y^{\prime}&=\left(x -2\right)^{2}\\ y \left(2\right) &= 1 \end{align*} \end{document} I also tried adding this to preamble but it had no effect \setlength{\abovedisplayskip}{3pt plus 1pt minus 2pt} \setlength{\abovedisplayshortskip}{0pt plus 1pt} \setlength{\belowdisplayskip}{3pt plus 1pt minus 2pt} \setlength{\belowdisplayshortskip}{3pt plus 1pt minus 2pt} Is there a global solution, I can add to preamble with having to manually use \vspace and such? Screen shot from actual latex pdf file I have: I do not like that extra vertical space above the first equation. I can rewrite things so first thing below section title is not an equation. But Latex should have solution not to add this extra space I thought.
- LaTeX old math symbolsby Dmelv on June 17, 2026 at 4:50 pm
Does anyone know if there are LaTeX codes for the old 17th- and 18th-century symbols for involution (powers) (kind of like an @ sign) and evolution (roots) (a sort of extended w)? Thanks.
- How to properly remove context and all dependencies from TeX Live 2026?by Aviroum on June 17, 2026 at 1:04 pm
I installed Context separately. Then I upgraded to texlive 2026. I encountered a lot of problems: fonts and fonts scripts not being recognised, and so many other issues. How do I properly remove Context from texlive 2026?
- How to include section template defined heading prefix in TOC?by David Purton on June 17, 2026 at 7:17 am
The new template based section heading definitions which support tagging include a prefix option which is added before the section number. What is the correct way to include this in the TOC? So in the below MWE, the contents ought to show: An Unnumbered Chapter Chapter Prefix 1 A Numbered Chapter MWE %! TeX Program = lualatex \DocumentMetadata { , lang = en , pdfstandard = ua-2 , tagging = on , tagging-setup = { math/mathml/luamml/load = false } } \documentclass{report} \EditInstance{heading}{chapter} { prefix = Chapter Prefix } \begin{document} \tableofcontents \addcontentsline{toc}{chapter}{An Unnumbered Chapter} \chapter{A Numbered Chapter} \end{document}
- Colouring the counting numbers of the framesby Carl on June 16, 2026 at 3:56 pm
In the following code, how can I colour the slide numbers on bottom right with the same color of frame title (or title frame)? \documentclass{beamer} \usetheme[microtype]{fibeamer} \title{Presentation Title} \subtitle{Presentation Subtitle} \author{Author's name} \begin{document} \begin{frame} How can I colour ``1/1’’ on the bottom? \end{frame} \end{document}
- Controlling text height, text width, and margins in just one frameby Carl on June 16, 2026 at 3:03 pm
I have the code below for a wider frame but there are several problems, namely, I can control only left and right margin with the same distance, and long text overlay slide numbers. So, how can I control left margin, right margin, text height and text width with different distances (and prevent text overlay)? \documentclass{beamer} \usetheme[microtype]{fibeamer} \usepackage{lipsum} \title{Presentation Title} \subtitle{Presentation Subtitle} \author{Author's name} \newcommand\Wider[2][3em]{% \makebox[\linewidth][c]{% \begin{minipage}{\dimexpr\textwidth+#1\relax} \raggedright#2 \end{minipage}% }% } \begin{document} \begin{frame}{Long text} \Wider{\lipsum} \end{frame} \end{document}
- How to compile the file mp.wby lazyboy on June 16, 2026 at 2:06 pm
I cloned the repository https://gitlab.lisn.upsaclay.fr/texlive/metapost/ and try to compile the file source\texk\web2c\mplibdir\mp.w with cweave like this: $ pwd /metapost/source/texk/web2c/mplibdir $ cweave mp.w $ pdftex mp.tex I got a error message: ! Missing $ inserted. <inserted text> $ <to be read again> _ <argument> \#define MPOST_ DEBUG_ENVELOPE \C #1->\5\5\quad $/\ast \,${\cmntfont #1 }$\,\ast /$ l.158 \M{5}\B\C{\#define MPOST_DEBUG_ENVELOPE } \6 Curiously there is no \M{5}\B\C on the line 158 in the file mp.tex. My question is: how can I compile the file mp.w correctly to a PDF file?
- TikZ move scope to bottom left of a figureby Thomas on June 16, 2026 at 7:42 am
I have a figure to which I add representation of axis. Using scope environment I'm able to scale and move it where I want on the figure. Would it be possible to make it always at a specific position in the figure (for instance bottom left), so if I change the content of the figure by adding other element, the scope would still be placed where I intended. For a node I would use anchor. Here is a MWE: \documentclass{article} \usepackage{tikz} \usetikzlibrary{backgrounds} \begin{document} \begin{tikzpicture}[show background rectangle] \draw[red,fill=yellow] (0,0,0) -- ++(-2,0,0) -- ++(0,-1,0) -- ++(2,0,0) -- cycle; \draw[red,fill=yellow] (0,0,0) -- ++(0,0,-1) -- ++(0,-1,0) -- ++(0,0,1) -- cycle; \draw[red,fill=yellow] (0,0,0) -- ++(-2,0,0) -- ++(0,0,-1) -- ++(2,0,0) -- cycle; \begin{scope}[xshift=-3cm, yshift=-0.56cm, scale=0.4] \draw[->, red] (0,0) -- (0,1) node[anchor=north east] {$x$}; \draw[->, green] (0,0) -- (-1,0) node[anchor=north west] {$y$}; \draw[blue] (0,0) node {$\odot$}; \draw[blue] (0,0) node[anchor=north west] {$z$}; \end{scope} \end{tikzpicture} \end{document} I manually set the xshift and yshift so the arrows are on the bottom part of the figure. (Note: here the scope does enlarge the figure on the left because there is nothing, but in my case where I'm facing this issue, there are other object on the top left part of it)
- How to design station signs for Taiwan Railway in TeX?by mathrm alpha on June 16, 2026 at 4:08 am
Although I wrote a LaTeX-like design for Taiwanese train station signs, the resemblance is still somewhat lacking. https://upload.wikimedia.org/wikipedia/commons/thumb/f/f1/ROC_Taiwan_Railways_Administration_Logo.svg/960px-ROC_Taiwan_Railways_Administration_Logo.svg.png \documentclass{article} \usepackage{xeCJK,amssymb} \usepackage[ paperwidth=5in, paperheight=3in, margin=0.2in ]{geometry} \usepackage{graphicx} \usepackage{tikz} \pagestyle{empty} \begin{document} \begin{tikzpicture}[remember picture,overlay] \node[anchor=north west, xshift=0in, yshift=0in] at (current page.north west) { \includegraphics[width=0.5in,height=0.5in]{960px-ROC_Taiwan_Railways_Administration_Logo.svg.png} }; \end{tikzpicture} \begin{tikzpicture}[remember picture,overlay] \node[align=center, text=black, yshift=0.25in] at (current page.center) { {\fontsize{28pt}{34pt}\selectfont Miaoli} \\[0.2em] {\fontsize{32pt}{38pt}\selectfont 苗栗} }; \end{tikzpicture} \begin{tikzpicture}[remember picture,overlay] \node[ draw, line width=0.8pt, minimum size=0.9in, inner sep=0pt, align=center, font=\fontsize{12pt}{12pt}\selectfont ] at ([xshift=1.25in, yshift=0.25in]current page.center) { 苗栗縣\\ 苗栗市 }; \end{tikzpicture} \begin{tikzpicture}[remember picture,overlay] \node[anchor=south west, xshift=0.2in, yshift=0.2in] at (current page.south west) { {\Large 豐富 Fengfu} }; \node[anchor=south east, xshift=-0.2in, yshift=0.2in] at (current page.south east) { {\Large 南勢 Nanshi} }; \end{tikzpicture} \begin{tikzpicture}[remember picture,overlay] \draw[green!60!black, line width=1.2pt] ([yshift=0.65in]current page.south west) -- ([yshift=0.65in]current page.south east); \node[anchor=west, text=green!60!black] at ([yshift=0.78in]current page.south west) {\large $\blacktriangleleft$ 3.9 公里 (km)}; \node[anchor=east, text=green!60!black] at ([yshift=0.78in]current page.south east) {\large 6.6 公里 (km) $\blacktriangleright$}; \end{tikzpicture} \end{document} A better version should be: Source: http://trstour.com/miao-li.htm
- Two numbered equations in one lineby X3nius on June 16, 2026 at 12:34 am
How can I create two numbered equations in one line? I've tried this, however the word "with" is not aligned. Code 1 \documentclass[a4paper,10pt]{article} \usepackage{amssymb,amsmath,amsfonts} \usepackage{amsthm,thmtools} \usepackage[english]{babel} \usepackage[T1]{fontenc} \begin{document} \begin{tabular}{p{5cm}p{1.5cm}p{6cm}} \begin{equation} \sum \limits_{k=-\infty}^{\infty}c_ke^{ikx} \end{equation} & \begin{equation*} \hspace{0.5cm}\text{with} \end{equation*} & \begin{equation} G:= \int \limits_a^b g(x)\; dx \end{equation} \end{tabular} \end{document} Code 2 \documentclass[a4paper,10pt]{article} \usepackage{amssymb,amsmath,amsfonts} \usepackage{amsthm,thmtools} \usepackage[english]{babel} \usepackage[T1]{fontenc} \begin{document} \section{Section 1} \subsection{Subsection 1} ELorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non orci vel augue pulvinar pretium in et turpis. Sed in dolor semper urna mattis vehicula. Suspendisse eu augue id nisi auctor venenatis. Maecenas tempor felis a sodales vehicula. Proin congue tellus lectus, sit amet ornare orci efficitur a. Duis dui sem, imperdiet ac commodo eu, semper porta odio. Praesent rhoncus sem ante, eget tincidunt massa ornare sed. Suspendisse a vehicula magna, mattis porttitor enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Duis vitae pulvinar risus. Nunc quis nisi libero.\\ \noindent \begin{minipage}{0.4\textwidth} \begin{equation}\label{(3.1)} f_{\infty}(x)=\sum \limits_{k=-\infty}^{\infty}c_{k}e^{ikx} \end{equation} \end{minipage} \hspace{1cm}with \begin{minipage}{0.5\textwidth} \begin{equation}\label{(3.2)} c_k:= \frac{1}{2\pi}\int_0^{2\pi}f(x)e^{-ikx} \; dx \;. \end{equation} \end{minipage} \bigskip\noindent Sed lacinia sem ac quam porttitor, vitae efficitur lorem pulvinar. \end{document}.
- Test if a macro argument matches saved sequence of tokens [duplicate]by Alex Nelson on June 15, 2026 at 6:57 pm
In plain TeX (not eTeX, and definitely not LaTeX), I am trying to test if a macro argument was just previously used (the last time the macro was invoked). The idea is I am trying to create an extremely crude "index", and I want to print all the references to the same entry on the same line. (The entries are already sorted, this is literally just a printing problem. I cannot determine if the current entry coincides with the entry "currently being worked on".) A minimal working example: \def\currentparam{} \def\printrefs#1#2{% \if#1\currentparam% -- apparently always false!? , #2% \else% \gdef\currentparam{#1}% \par\noindent#1 #2% \fi} \printrefs{Hilbert, David}{17} \printrefs{Hilbert, David}{23} \printrefs{Hilbert's programme}{2} \printrefs{Martin-L{\accent "7F o}f, Per}{3} \printrefs{Martin-L{\accent "7F o}f, Per}{19} \bye This will (sadly) print five lines, looking like: Hilbert, David 17 Hilbert, David 23 Hilbert's programme 2 Martin-L{\accent "7F o}f, Per 3 Martin-L{\accent "7F o}f, Per 19 Instead of the sought behavour of printing three lines: Hilbert, David 17, 23 Hilbert's programme 2 Martin-L{\accent "7F o}f, Per 3, 19 Something is going wrong with the \if#1\currentparam line to always evaluate to false, but the solution to the bug eludes me.
- With babel-french, fnpct and lualatex, footnotes not typeset according to the French typographic rules anymoreby Denis Bitouzé on June 15, 2026 at 3:02 pm
The following MCE: \documentclass[french]{article} % \usepackage{fnpct} \usepackage{babel} \pagestyle{empty} \begin{document} Foo\footnote{Bar.}\footnote{Baz.}. \end{document} compiled with current lualatex, typesets the footnotes according to the French typographic rules: Bar. Baz. But, if fnpct is loaded, that's not the case since the footnotes are typeset as follows: ¹Bar. ²Baz. At least with TeX Live 2025, we got the expected result even when fnpct was loaded. Here's what has changed since then: LuaHBTeX 1.22.0 (TL 2025) → 1.24.0 (TL 2026) keyval.sty 2022/05/29 v1.15 → 2026-05-17 v1.15 expl3.sty 2025-10-24 → 2026-05-26 l3backend-luatex.def 2025-10-09 → 2026-02-18 babel.sty 2025/10/22 v25.14 → 2026/06/14 v26.9 french.ldf 2025-08-15 v4.0e → 2026-06-06 v4.1a Do you know how to nowadays retrieve the previous, expected, behavior? Edit With current TL 2026, the result is the same with pdftex and with lualatex but, with TL 2025, the result is the expected one: not with pdflatex with lualatex.
- Wrong subscript position in a customized integralby CarLaTeX on June 15, 2026 at 8:29 am
I was trying to answer another question, but I can't create a customized integral that has the subscripts in the correct position. Why? egreg has already answered the other question. Hence, I'm not interested in the solution of the specific problem, but I'd like to know why mine doesn't work. \documentclass{article} \usepackage{amsmath} \usepackage{esint} \DeclareMathOperator{\oiiint}{\mathchoice{\oiint\mkern-24.3mu\int\mkern2mu} {\oiint\mkern-18mu\int\mkern2mu} {\scriptstyle\oiint\mkern-15.7mu\int\mkern2mu} {\scriptscriptstyle\oiint\mkern-13.15mu\int\mkern2mu}} \begin{document} $\oiiint^{A}_{B} \quad \int^{A}_{B}$\\ \[\oiiint^{A}_{B} \quad \int^{A}_{B}\] \[C_{\oiiint^{A}_{B}} \quad C_{\int^{A}_{B}}\] \[D_{C_{\oiiint^{A}_{B}}} \quad D_{C_{\int^{A}_{B}}}\] \end{document}
- Print service tells me the gradient I created with TikZ is longer than the Earth's circumferenceby flyx on June 15, 2026 at 8:08 am
I am designing playing cards, and I use a print service (https://meinspiel.de if that's relevant). I create my cards with a heading styled with tikz, like so: \documentclass{article} \usepackage[paperwidth=65mm,paperheight=97mm, margin=7mm]{geometry} \pagestyle{empty} \RequirePackage[x-4]{pdfx} \setCMYKcolorprofile{coated_FOGRA39L_argl.icc} {Coated FOGRA39} {FOGRA39 (ISO Coated v2 300\% (ECI))} {http://www.argyllcms.com/} \usepackage[overprint]{colorspace} \RequirePackage{tikz} \usetikzlibrary{positioning,shapes,calc,backgrounds} \definecolor{blue1}{cmyk}{0.6818,0.3939,0,0.7412} \definecolor{blue2}{cmyk}{0.6339,0.2768,0,0.5608} \tikzset{ pics/heading/.style={code={ \node[anchor=north west] (heading) at ($(current page.north west) + (7, -7)$) {\textoverprint[0]{\textcolor{white}{\textsf{#1}}}}; \begin{scope}[on background layer] \fill[top color=blue1, bottom color=blue2] (current page.north west) -- (heading.south west-|current page.north west) -- (heading.south east) .. controls +(right:5) and +(left:5) .. +(10, 2) -| (current page.north east) -- cycle; \end{scope} }} } \begin{document} \begin{tikzpicture}[x=1mm, y=1mm, remember picture, overlay] \pic {heading={My Heading}}; \end{tikzpicture} \end{document} As you can see, I set the card's dimensions, specify PDF/X-4 output and the ISO Coated v2 300% (ECI) color profile just like the print service requires. Then I enable overprint (unsure whether this is relevant for my issue) for black text (but the heading is white, so I disable it there again). I define a tikz pic to use for drawing the heading of each card. Finally, I create a document with a single card that uses that pic as heading. The result looks like this: I gave that to the printing service, and they printed the heading as two areas split horizontally with different colors, instead of the gradient. When I asked them what the problem is, they answered this (translated from German): The data is set up in a strange way. The gradient consists of two parts, which lead to it being cut back during conversion. Also, the size of the gradient is extremely huge. I don't exaggerate. It has a width of 352777777777,425mm, i.e. 352.777,78km! While we do have meter scale from time to time, I've never seen kilometers. (The circumference of Earth at the equator is about 40.075 km to put that into context.) It may be that this is why there was an error during conversion. We suggest to embed the gradient as picture to avoid such errors. Also, when gradients are pictures, the print is cleaner and smoother. So, I guess my question is: How do I create the gradient so that the print service is happy? I don't feel like I have enough control over whatever tikz does here.
- lua, how to tex.print %%? [duplicate]by projetmbc on June 14, 2026 at 4:58 pm
I fail to modify the following working code to change the printing of ** into %%. How can I do that? I fear that the answer is easy... Don't judge me, please. 🙂 % !TEX TS-program = lualatex \documentclass[varwidth, border = 3pt]{standalone} \usepackage{verbatim} \begin{document} \directlua{ local test = { "1", "**", "\\three", "++++" } tex.print("\\begin{verbatim}") for i, x in ipairs(test) do tex.print("[" .. i .. "] " .. x) end tex.print("\\end{verbatim}") } \end{document}
- Symbol of cannonby Sebastiano on June 14, 2026 at 12:15 pm
I want to reproduce a cannon considering in old style (one of these) considering that I have not seen a specific symbol. Does anyone know if there’s a symbol that resembles one of this image? I have not found anything.
- Table Captions in kaobook cause `! TeX capacity exceeded`by Floris on June 14, 2026 at 9:19 am
I have tried this with both the latest release of kaobook and the latest version in the main branch. This is an MWE, which includes my current setup and mirrors the compilation using xelatex. Any advice would be greatly appreciated. % !TEX program = xelatex \documentclass{kaobook} % Load siunitx to provide the 'S' column type used in your table \usepackage{siunitx} \usepackage{booktabs} \begin{document} \mainmatter \chapter{Testing Memory Error} % This section is designed to trigger the "TeX capacity exceeded" % error seen in kaobook. \begin{table}[htbp] \centering % The \caption{} command is the likely trigger for the recursion loop in kaobook \caption[ML on ds2]{Results from our trained models on ds2} \label{tab:test} \begin{tabular}{lSSS} \toprule {blocking} & {n\_pairs} & {n\_pred} & {pred\_rate} \\ \midrule Title Canopy & \num{1883498} & \num{43085} & \num{0.0228} \\ bibhash & \num{7374} & \num{7374} & \num{0.9909} \\ attr. bl. & \num{441997} & \num{7876} & \num{0.0178} \\ \bottomrule \end{tabular} \end{table} \end{document} The problem goes away when I use a table* environment instead. I previously thought that this may be connected to my use of the packages caption and/or subcaption, but removing those as dependencies did not solve my problem. Now, I am assuming that kaobook does something weird with table captions?
- fix spacing in ∰ \oiiintby mathrm alpha on June 14, 2026 at 5:59 am
Although I used his/her method and got \oiiint, the not big display mode spacing wasn't handled well. https://tex.stackexchange.com/a/404609/329597 \documentclass{article} \usepackage{esint} \newcommand{\oiiint}{\oiint \hspace{-13.5pt} \int} \begin{document} $A\oiiint B$\\ \[A \oiiint B\] \end{document} See in: Wrong subscript position in a customized integral
- TikZ snail's 🐌 outline rotation text layoutby mathrm alpha on June 14, 2026 at 2:31 am
Although this was mentioned last time: TeX chinese image poetry image text layout However, it seems no one has mentioned the layout of the snail's rotating circle text in the TeX code. Source: https://jedi.nehs.hc.edu.tw/newsletter/306/poem.html I wrote a LaTeX program that rotates text, but the result isn't quite like this image; it's just a reference to the circle rotation text format. Furthermore, the "比羚羊還要快。" part is missing display. \documentclass{article} \usepackage{tikz,xeCJK} \usepackage[margin=0.5in]{geometry} \setCJKmainfont{Noto Sans CJK TC} \usetikzlibrary{decorations.text} \begin{document} \centering \begin{tikzpicture} % Define colors based on the image \definecolor{snailbody}{RGB}{240, 200, 180} \definecolor{shellbase}{RGB}{220, 170, 150} % Body and Tail \fill[snailbody] (-3.5, 0.5) .. controls (-4, -1) and (-3.5, -3.5) .. (0, -3.5) -- (6, -2.5) -- (0, -2.8) .. controls (-2, -2.8) and (-3, -1) .. (-3.5, 0.5); % Head \fill[snailbody] (-3.5, 0.5) circle (0.9); % Antennae \draw[snailbody, line width=4pt] (-3.9, 1.2) -- (-4.3, 2.6); \fill[snailbody] (-4.3, 2.7) circle (0.2); \draw[snailbody, line width=4pt] (-3.1, 1.2) -- (-2.9, 2.6); \fill[snailbody] (-2.9, 2.7) circle (0.2); % Shell (large circle) \fill[shellbase] (0.5, 0) circle (3.7); %text parts \path [ decorate, decoration={ text along path, text={背著重重的家,上山下海,尋找食物,我總比別人慢一步,我想如果我拋棄沉重的家,我一定爬得比羚羊還要快。}, text align=center } ] (0.5, 0) ++(180:4.0) arc (180:0:4.0); \end{tikzpicture} \end{document} Although there are similar: How to fine tune rotation of text along circular path? However, There was no mention of a text rotation format resembling a snail's outline.
- Making only hyperref links to figures blueby X3nius on June 14, 2026 at 2:13 am
Is there a possibility to only make the hyperref links to figures blue? \documentclass[a4paper,10pt]{article} \usepackage{hyperref} \hypersetup{ colorlinks = true, linkcolor = blue } \usepackage[style=numeric, defernumbers, backend=biber]{biblatex} \addbibresource{sources.bib} \begin{document} \tableofcontents \section{Section 1} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. \subsection{Subsection 1} Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\\\\ You can now see \hyperref[f1]{Figure 1} \begin{figure}[h] \caption{This is a triangle} \label{f1} \end{figure} \nocite{*} \printbibliography \end{document} and only Figure 1, Figure 2 shall be printed in blue. However, in this case, also the table of contents is printed in blue and - I'm wondering why - the link in the bibliography is printed in pink? How can I make pink to "normal" here?
- Coil decoration on curved path looks strangeby nogrodrigo on June 13, 2026 at 3:52 pm
I am trying to achieve something like this in TikZ: The black path should go straight up and the red one should go down bent to the right, both must look like a coil. I have tried to do this using bezier curves and arcs, but the coil decoration of the bent path looks very strange, it's pointy in some parts. What am I doing wrong? MWE: \documentclass{article} \usepackage{xcolor} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \begin{document} \begin{tikzpicture} \draw[-latex, decorate, decoration = {coil, aspect = 1.2}, color = red] (0,2) arc (90:-90:1); \draw[-latex, decorate, decoration = {coil, aspect = 1.2}] (0,0) -- (0,2); \draw[-latex, decorate, decoration = {coil, aspect = 1.2}] (3,0) -- (3,2); \draw[-latex, decorate, decoration = {coil, aspect = 1.2}, color = red] (3,2) .. controls (4,2) and (4,0) .. (3,0); \end{tikzpicture} \end{document}
- TikZ customize in big operators symbols, can't display big TikZ operatorsby mathrm alpha on June 13, 2026 at 8:59 am
I followed the LaTeX question reference below to adapt it to the tikz big operators version, but it didn't display in tikz "⅌" symbol. How can I define a big plus operator that works like \bigcup? ⅌ apply in tikz text symbols? % Source - https://tex.stackexchange.com/a/394912 % Posted by GuM, modified by community. See post 'Timeline' for change history % Retrieved 2026-06-13, License - CC BY-SA 3.0 \documentclass{article} \usepackage{tikz,iftex,amsmath} \usepackage{graphicx} \makeatletter \newcommand*\@bigper[1]{\vcenter{\hbox{#1$\m@th ⅌$}}} \newcommand*\bigper{% \DOTSB % omit this line if you are not using the amsmath package \mathop{% \mathchoice {\@bigper ⅌}% {\@bigper \LARGE}% {\@bigper {}}% {\@bigper \footnotesize}% }% \slimits@ % omit this line if you are not using the amsmath package } \makeatother \ifPDFTeX \usepackage[utf8]{inputenc} \else \usepackage{newunicodechar} \fi \DeclareRobustCommand{\TikZPerSign}{% \tikz[ baseline=-.25ex, x=.13em, y=.13em, line cap=round, line join=round ]{% % Fixed box: this is important for text-like behaviour. \path[use as bounding box] (-3.05,-3.35) rectangle (3.95,4.35); % 1. The horizontal ellipse \draw[line width=.05em] (0.4,0) ellipse[x radius=2.2,y radius=.7]; % 2. The main U shape \draw[line width=.05em] (-.6,1.5) .. controls (-.6,-3.2) and (.6,-3.2) .. (.6,1.5); % 3. The top-left flourish \draw[line width=.05em] (-.6,1.5) .. controls (-1.8,2.8) and (-3.0,1.5) .. (-2.2,1.2); \fill (-.5,1.9) circle[radius=.22]; % 4. The large right loop \draw[line width=.05em] (.6,1.5) .. controls (.6,4.2) and (3.5,3.2) .. (3.5,.5) .. controls (3.5,-.8) and (2.5,-1.2) .. (1.8,-1.0); }% } \ifPDFTeX \DeclareUnicodeCharacter{214C}{\TikZPerSign} \else \newunicodechar{⅌}{\TikZPerSign} \fi \begin{document} $$\sum^1_2 \bigper^3_4$$ \end{document}
- Moving from listings to pitonby Pablo González L on June 13, 2026 at 1:04 am
I'm trying to migrate from listings to piton, but unfortunately, piton doesn't have native support for Lua. From what I can understand of the documentation, I've modified lstlang2 and converted it to piton, but I don't understand how \NewPitonLanguage works or how to color things with \SetPitonStyle. This is my compiled file, but it's not producing the expected result: \documentclass{article} \usepackage[osf,nomath,mono=false,ScaleSF=0.95,ScaleRM=0.95]{libertinus-otf} \usepackage{sourcecodepro} \defaultfontfeatures[\ttfamily] { Numbers = OldStyle, Scale = 0.84249, Extension = .otf, } \setmonofont[ UprightFont = *-Regular, ItalicFont = *-RegularIt, BoldFont = *-Semibold, BoldItalicFont = *-SemiboldIt, RawFeature = {+zero,+ss01}]{SourceCodePro} \usepackage{unicode-math} \setmathfont[Scale = 0.95]{latinmodern-math.otf} \usepackage{piton} % (Pygments colors) \definecolor{pyg_comment}{HTML}{408080} \definecolor{pyg_string}{HTML}{BA2121} \definecolor{pyg_keyword}{HTML}{000080} \definecolor{pyg_builtin}{HTML}{008000} \definecolor{pyg_function}{HTML}{0000FF} \definecolor{pyg_punct}{HTML}{A020F0} % New languaje \NewPitonLanguage{SpintentLua}{ sensitive = true, alsoletter = {.}, morecomment = [l]{--}, morecomment = [s]{--[[}{]]}, morestring = [b]", morestring = [b]', morestring = [s]{[[}{]]}, morekeywords = [Delim]{ (, ), [, ] }, % Clase nativa: Keyword (Por defecto si no se especifica corchetes) morekeywords = { and, break, do, else, elseif, end, false, for, function, goto, if, in, local, nil, not, or, repeat, return, then, true, until, while }, % Clase nativa: Name.Builtin (Para funciones del sistema) morekeywords = [Name.Builtin]{ _ENV, _G, _PROMPT, _PROMPT2, _VERSION, arg, assert, collectgarbage, coroutine, coroutine.create, coroutine.isyieldable, coroutine.resume, coroutine.running, coroutine.status, coroutine.wrap, coroutine.yield, debug, debug.debug, debug.gethook, debug.getinfo, debug.getlocal, debug.getmetatable, debug.getregistry, debug.getupvalue, debug.getuservalue, debug.sethook, debug.setlocal, debug.setmetatable, debug.setupvalue, debug.setuservalue, debug.traceback, debug.upvalueid, debug.upvaluejoin, dofile, error, getmetatable, io, io.close, io.flush, io.input, io.lines, io.open, io.output, io.popen, io.read, io.stderr, io.stdin, io.stdout, io.tmpfile, io.type, io.write, ipairs, load, loadfile, math, math.abs, math.acos, math.asin, math.atan, math.ceil, math.cos, math.deg, math.exp, math.floor, math.fmod, math.huge, math.log, math.max, math.maxinteger, math.min, math.mininteger, math.modf, math.pi, math.rad, math.random, math.randomseed, math.sin, math.sqrt, math.tan, math.tointeger, math.type, math.ult, next, os, os.clock, os.date, os.difftime, os.execute, os.exit, os.getenv, os.remove, os.rename, os.setlocale, os.time, os.tmpname, package, package.config, package.cpath, package.loaded, package.loadlib, package.path, package.preload, package.searchers, package.searchpath, pairs, pcall, print, rawequal, rawget, rawlen, rawset, require, select, setmetatable, string, string.byte, string.char, string.dump, string.find, string.format, string.gmatch, string.gsub, string.len, string.lower, string.match, string.pack, string.packsize, string.rep, string.reverse, string.sub, string.unpack, string.upper, table, table.concat, table.insert, table.move, table.pack, table.remove, table.sort, table.unpack, tonumber, tostring, type, utf8, utf8.char, utf8.charpattern, utf8.codepoint, utf8.codes, utf8.len, utf8.offset, xpcall }, % Clase nativa: Name.Function (custom API) morekeywords = [Name.Function]{ register_tex_cmd, scan_string, set_macro, clean_lexical_accents, luafun_spmoney_parse, __spintent_money_render, luafun_spdate_parse, luafun_sptime_parse, spintent_gcd_algorithm } } \SetPitonStyle { Comment = \color{pyg_comment}\fontfamily{lmtt}\small\itshape, String = \color{pyg_string} , Keyword = \color{pyg_keyword}\bfseries , Name.Builtin = \color{pyg_builtin}\bfseries , Name.Function = \color{pyg_function} , Delim = \color{pyg_punct}, } \NewPitonEnvironment{luapiton}{ !O{} } {\PitonOptions{language=SpintentLua, #1}}{} \begin{document} \begin{luapiton} -- "Submódulo Financiero: Core de validación estructural spintent" local token = token local luatexbase = luatexbase function luafun_spmoney_parse() -- Captura bidireccional nativa libre de expansiones TeX local raw_input = token.scan_string() local clean_num = string.gsub(raw_input, "%s+", "") if not clean_num:match("^[%+%-]?%d+$") then token.set_macro("l__spintent_money_status_str", "error") return "error" end -- El Puente del Millón requiere inyección canónica token.set_macro("l__spintent_money_bridge_str", "true") return "success" end local function spintent_gcd_algorithm(val_a, val_b) while val_b ~= 0 do val_a, val_b = val_b, val_a % val_b end return val_a end \end{luapiton} \end{document} How do I define a new language in piton so that it's beautifully colored? I want to copy more or less the style of the lua-widow-control documentation (which is written in ConTeXt).