Week
- 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 %%?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.
- \dbend symbol not working in macro encapsulationby youthdoo on June 14, 2026 at 10:08 am
The dangerous bend symbol is not working when encapsulated in a macro. \documentclass[11pt]{article} \usepackage{fontspec}\setmainfont{STIX Two Text} \usepackage{unicode-math}\setmathfont{STIX Two Math} \usepackage[b5paper,margin=2cm,top=1cm]{geometry} \usepackage{graphicx} \usepackage{manfnt} \newcommand\danger{% \par\noindent \hangindent2em \hangafter1 \makebox[2em][l]\dbend% } \begin{document} \par\noindent \hangindent2em \hangafter1 \makebox[2em][l]\dbend NORMAL paragraph with NORMAL wrapping paragraph content paragraph content paragraph content paragraph content paragraph content paragraph content paragraph content paragraph content paragraph content paragraph content \danger Problematic paragraph! \end{document} Observations: Currently, the first paragraph has the dangerous bend symbol rendered correctly. The second paragraph, while seemingly equivalent in terms of \dbend symbol use, renders a small square for the symbol. If we remove the unicode-math line, both paragraphs work. But I do need the packages for my document. So my questions are: why is unicode-math not working with \dbend? And even if they don't work together, why is the macro encapsulation causing further problems?
- 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}
- 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 blue [closed]by 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).
- Why doesn't \DeclareMathAlphabet applied with \bm or \boldsymbol automatically search for bx style edition?by mathrm alpha on June 12, 2026 at 9:26 pm
Although you can define \mathsfit or \mathsfbfit using \DeclareMathAlphabet, it \mathsfit doesn't work within \bm or \boldsymbol. The key point is that using \bm or \boldsymbol with the \DeclareMathAlphabet math-fonts format will not automatically search for the bx edition style. \documentclass{article} \usepackage{bm} \DeclareMathAlphabet{\mathsfit}{OT1}{lmss}{m}{sl} \DeclareMathAlphabet{\mathsfbfit}{OT1}{lmss}{bx}{sl} \begin{document} use boldsymbol: $\boldsymbol{\mathsfit{ABCabc}}$\\ use bm: $\bm{\mathsfit{ABCabc}}$\\ direct sans-serif bold italic: $\mathsfbfit{ABCabc}$\\ \end{document}
- vertical line between items symbol in itemize environmentby Aviroum on June 12, 2026 at 2:07 pm
Is it possible to add a vertical line to the itemize environment, starting before the first item and continuing between each item until the end? similar to this, but line start before. \starttext \startitemize[5] \item text \item text \item text text. \stopitemize \stoptext
- Unexpected sansmath behaviour after recent TeXLive updateby Marius Jansen on June 12, 2026 at 7:26 am
I have noticed that after a recent TexLive update, the behaviour of the sansmath package has changed. The two example below illustrate: The instructions: \documentclass{article} \usepackage{sansmath} \begin{document} \sansmath This is normal text. \begin{tabular}{ll} One & Two \\ \end{tabular} and the rest of the document follows. \end{document} result in the contents of the tabular environment to be italized (as if it is in a math environment). This is new, unexpected behaviour. If the \sansmath is omitted, then the content of the tabular environment is not placed in italics: \documentclass{article} \usepackage{sansmath} \begin{document} This is normal text. \begin{tabular}{ll} One & Two \\ \end{tabular} and the rest of the document follows. \end{document} I will greatly appreciate any advice on how to revert to the behaviour of \sansmath to what is expected: it impacts only math environments.
- How do I draw the feedback loop in my latex code for my research paper?by Sajid Mahfuz on June 11, 2026 at 10:21 pm
How do I create the feedback loop shown in the image? I’ve also been trying to make all the arrow lengths uniform, but I keep failing (bear with me, I’m a beginner in LaTeX), and I need the diagram to be larger. I’ve attached my code and the image. \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows.meta, positioning, calc} \begin{document} \begin{center} \begin{tikzpicture}[ node distance=1.2cm and 1.2cm, block/.style={ draw, rectangle, minimum width=2.5cm, minimum height=0.9cm, line width=1pt, align=center }, innerblock/.style={ draw, rectangle, minimum width=1.8cm, minimum height=0.9cm, line width=1pt, % changed from 0.5pt to 1pt align=center }, disturbance/.style={ draw, rectangle, minimum width=1.8cm, minimum height=0.9cm, fill=red!10, line width=1pt, align=center }, arrow/.style={-{Triangle[length=2mm,width=2mm]}, line width=1pt} ] % ================= INPUT ================= \node[circle, draw, minimum size=0.8cm, line width=1pt] (sum) at (0,0) {}; % changed to 1pt % X inside circle (also 1pt) \draw[line width=1pt] (sum.north east) -- (sum.south west); \draw[line width=1pt] (sum.north west) -- (sum.south east); \draw[arrow] (-1.2,0) -- (sum.west); \node[left=1.2cm] {$Z_D$}; % ================= CONTROL ================= \node[block, above right=0.5cm and 1.0cm of sum] (sdre) {SDRE}; \node[block, below right=0.5cm and 1.0cm of sum] (pi) {PI}; \draw[arrow] (sum.east) -- ++(0.2,0) |- (sdre.west); \draw[arrow] (sum.east) -- ++(0.2,0) |- (pi.west); % ================= ACTUATION ================= \node[block, right=1.0cm of sdre] (actuator) {Actuator}; \node[block, right=1.0cm of pi] (thrust) {Thrust}; \draw[arrow] (sdre.east) -- (actuator.west); \draw[arrow] (pi.east) -- (thrust.west); % ================= THRUST MAP ================= \node[block, below=0.8cm of pi] (thrustMap) {Thrust Map}; \draw[arrow] (pi.south) -- (thrustMap.north); \draw[arrow] (thrustMap.east) -| (thrust.south); % ================= DYNAMICS ================= \node[innerblock, right=1.0cm of actuator] (att_dyn) {Attitude Dynamics}; \node[innerblock, right=1.0cm of thrust] (alt_dyn) {Altitude Dynamics}; \draw[arrow] (actuator.east) -- (att_dyn.west); \draw[arrow] (thrust.east) -- (alt_dyn.west); % ================= DISTURBANCES ================= \node[disturbance, above=0.6cm of att_dyn] (distAtt) {Gust}; \node[disturbance, below=0.6cm of alt_dyn] (distAlt) {Gust}; \draw[arrow] (distAtt.south) -- (att_dyn.north); \draw[arrow] (distAlt.north) -- (alt_dyn.south); % ================= OUTPUT MERGE ================= \coordinate (mergeTop) at ($(att_dyn.east)+(0.6,0)$); \coordinate (mergeBottom) at ($(alt_dyn.east)+(0.6,0)$); \draw[line width=1pt] (att_dyn.east) -- (mergeTop); \draw[line width=1pt] (alt_dyn.east) -- (mergeBottom); \draw[line width=1pt] (mergeTop) -- (mergeBottom); % Midpoint of the vertical line \coordinate (mergeMid) at ($(mergeTop)!0.5!(mergeBottom)$); % Output arrow from that midpoint \draw[arrow] (mergeMid) -- ++(0.8,0) node[right] {Output}; \end{tikzpicture} \end{center} \end{document}
- How to define a 'smart', resizeable paired-brace delimiter macro that supports set-builder notation and line-breaking at commas in inline math mode?by Nyx on June 11, 2026 at 3:00 pm
In [1] we have the following MWE of the definition and use-cases of a \set macro, which is a resizeable paired-brace delimiter with \suchthat detection for set-builder notation. \documentclass[varwidth]{standalone} \usepackage{amsmath} \usepackage{xparse} \newcommand{\suchthat}{\mid} \ExplSyntaxOn \NewDocumentCommand{\set}{som} { % limit the scope for \suchthat \group_begin: \cs_set_protected:Npn \suchthat { \tl_use:N \l__egreg_set_st_tl } \IfBooleanTF{#1} { \egreg_set_auto:n { #3 } } { \egreg_set_fixed:nn { #2 } { #3 } } \group_end: } \tl_new:N \l__egreg_set_st_tl \cs_new_protected:Nn \__egreg_set_st:n { \tl_set:Nn \l__egreg_set_st_tl { #1 } } \cs_new_protected:Nn \egreg_set_auto:n { \__egreg_set_st:n { \nonscript\; \middle\vert \nonscript\; } \left\{ #1 \right\} } \cs_new_protected:Nn \egreg_set_fixed:nn { \tl_if_novalue:nTF { #1 } { \__egreg_set_st:n { \mid } \lbrace #2 \rbrace } { \__egreg_set_st:n { \mathrel{#1\vert} } \mathopen{#1\lbrace} #2 \mathclose{#1\rbrace} } } \ExplSyntaxOff \begin{document} $\set{a,b,c}\cup\set[\big]{a,b,c}$ $\set{x\suchthat a<x<b}$ $\set[\Big]{x\suchthat a<x<b}$ $\set*{x\suchthat \dfrac{1}{2}<x<3}$ \end{document} In [2] we have the following MWE of the definition and use-cases of a \splitatcommas macro, which allows for line breaks at commas inside inline math mode. \documentclass{article} \ExplSyntaxOn \NewDocumentCommand{\splitatcommas}{m} { \group_begin: \int_compare:nNnF { \char_value_mathcode:n {`,} }= {"8000} { \char_set_active_eq:nN {`,} \__kennytm_comma: \char_set_mathcode:nn {`,} {"8000} } #1 \group_end: } \cs_new_protected:Ne \__kennytm_comma: { \mathchar\char_value_mathcode:n {`,}~ \penalty0~\exp_not:n { \hspace{0pt plus 1em} } } \ExplSyntaxOff \newcommand{\tuple}[1]{(\splitatcommas{#1})} \newcommand{\set}[1]{\{\splitatcommas{#1}\}} \begin{document} \setlength{\lineskiplimit}{2pt}\setlength{\lineskip}{3pt} % for this particular case \setlength{\parindent}{0pt} % just for this example $\splitatcommas{ \frac{1}{2},\frac{3}{5},\frac{8}{13},\frac{21}{34},\frac{55}{89}, \frac{144}{233},\frac{377}{610},\frac{987}{1597},\frac{2584}{4181}, \frac{6765}{10946},\frac{17711}{28657},\frac{46368}{75025}, \frac{121393}{196418},\frac{317811}{514229},\frac{832040}{1346269}, \frac{2178309}{3524578},\frac{5702887}{9227465}, \frac{14930352}{24157817},\frac{39088169}{63245986},\frac{102334155}{165580141} }$ \medskip $\set{ \tuple{a,b,c,d},\tuple{1,2,3,4,5,6},\tuple{11,22,33,44,55,66,77,88}, \tuple{a,b,c,d},\tuple{1,2,3,4,5,6},\tuple{11,22,33,44,55,66,77,88}, \tuple{a,b,c,d},\tuple{1,2,3,4,5,6},\tuple{11,22,33,44,55,66,77,88}, \tuple{a,b,c,d},\tuple{1,2,3,4,5,6},\tuple{11,22,33,44,55,66,77,88} }$ \end{document} My question is How can I define a 'smart', resizeable paired-brace delimiter macro that supports set-builder notation and line-breaking at commas in inline math mode (i.e., combine \set from [1] and \splitatcommas from [2])? The following is an MWE of my attempt so far. \documentclass[ border={10pt}, varwidth, ]{standalone} \usepackage{unicode-math} % \usepackage{amsmath} % Loaded by `unicode-math` \usepackage[default]{fontsetup} % For NewCM \usepackage{mleftright} % \usepackage{xparse} % Integrated into the kernel from 2020-10-01 \newcommand{\suchthat}{\mid} \ExplSyntaxOn \NewDocumentCommand{\setaux}{som} { % limit the scope for \suchthat \group_begin: \cs_set_protected:Npn \suchthat { \tl_use:N \l__egreg_set_st_tl } \IfBooleanTF{#1} { \egreg_set_auto:n { #3 } } { \egreg_set_fixed:nn { #2 } { #3 } } \group_end: } \tl_new:N \l__egreg_set_st_tl \cs_new_protected:Nn \__egreg_set_st:n { \tl_set:Nn \l__egreg_set_st_tl { #1 } } \cs_new_protected:Nn \egreg_set_auto:n { \__egreg_set_st:n { \nonscript\; \middle\vert \nonscript\; } \left\{ #1 \right\} } \cs_new_protected:Nn \egreg_set_fixed:nn { \tl_if_novalue:nTF { #1 } { \__egreg_set_st:n { \mid } \lbrace #2 \rbrace } { \__egreg_set_st:n { \mathrel{#1\vert} } \mathopen{#1\lbrace} #2 \mathclose{#1\rbrace} } } \NewDocumentCommand{\splitatcommas}{m} { \group_begin: \int_compare:nNnF { \char_value_mathcode:n {`,} }= {"8000} { \char_set_active_eq:nN {`,} \__kennytm_comma: \char_set_mathcode:nn {`,} {"8000} } #1 \group_end: } \cs_new_protected:Ne \__kennytm_comma: { \mathchar\char_value_mathcode:n {`,}~ \penalty0~\exp_not:n { \hspace{0pt plus 1em} } } \ExplSyntaxOff % Combined macro \NewDocumentCommand{\set}{som}{ \IfBooleanTF{#1}{\splitatcommas{\setaux*{#3}}}{% \IfNoValueTF{#2}{% \splitatcommas{\setaux{#3}}% }{% \splitatcommas{\setaux[#2]{#3}}% } } } % Empty set \setmathfont[CharacterVariant=2]{NewCMMath-Regular.otf} \AtBeginDocument{% \renewcommand{\emptyset}{\char"2300}% \renewcommand{\varnothing}{\char"2205}} \begin{document} % \setlength{\lineskiplimit}{2pt}\setlength{\lineskip}{3pt} \setlength{\parindent}{0pt} % \(\set{a,b,c}\cup\set[\big]{a,b,c}\) \(\set{x\suchthat a<x<b}\) \(\set[\Big]{x\suchthat a<x<b}\) \(\set*{x\suchthat \dfrac{1}{2}<x<3}\) We have \(\emptyset = \set{}\) and \(\omega_0 = \set{ \emptyset, \set{\emptyset}, \set{\emptyset, \set{\emptyset}}, \set{\emptyset, \set{\emptyset}, \set{\emptyset, \set{\emptyset}}}, \set{\emptyset, \set{\emptyset}, \allowbreak {\set{\emptyset, \set{\emptyset}}, \set{\emptyset, \set{\emptyset}, \set{\emptyset, \set{\emptyset}}}}}, \dots }. \) % \end{document} References [1] E. Gregorio. (2020). TeX, LaTeX and math. TUGboat, 41(1), 43–53. https://www.latex-project.org/publications/2020-egreg-TUB-tb127gregorio-math.pdf [2] E. Gregorio. (2025, May 17). Allowing line break at ',' in inline math mode? (answer). TeX Stack Exchange. https://tex.stackexchange.com/a/309558
- Querying CTAN packages by licenceby Psychonaut on June 10, 2026 at 4:29 pm
Packages on CTAN are tagged according to their licence; this information is displayed on each package's page along with other basic metadata such as its name, version, maintainer, and topics. I know that I can browse or search for all packages assigned to a given topic using the topics index or using the extended search form. Is there any similarly easy way of finding all CTAN packages with a given licence? Here's what I've tried so far: I checked the master licence list, but if I click on one of the licences in the list, the page I'm taken to gives me only basic information about the licence and (in some cases) some statistics about the number of packages that use that licence. I checked the extended search form form. It doesn't have a dedicated field for the licence. If I do search for a licence name, then it returns only the individual licence pages described above, not the packages that use that licence. I checked the XML API and JSON API. They provide endpoints for listing all licences, and for listing all packages, but not for listing packages by licence. The entries returned by the "List of licenses" endpoints list only a unique ID, name, and free/non-free status for each licence, but not which packages use that licence. The entries returned by the "List of Packages" endpoints list only a unique ID, name, and brief description for that package, but not its licence. I could use the XML or JSON API to get a full list of packages, extract the unique IDs to construct the URL for each package's page on CTAN, download each of those pages, and then scrape the licence data. But there are currently almost 7000 packages, so scraping the site in this way will take a long time, and I'm not sure that the site operators would appreciate all that traffic. (My use case, in case anyone is wondering, is finding packages that are available on CTAN but that are not distributed with TeX Live due to licensing restrictions. I'm curious as to what sort of functionality I and other TeX Live users might be missing out on, and might decide to code freely licensed replacements for any seemingly useful non-free packages.)
- tikz: absolute coordinates of a node placed in a second node positioned relative to a third nodeby pluton on June 10, 2026 at 4:18 pm
A MWE is probably better than lengthy explanations: \documentclass[tikz,10pt]{standalone} \usetikzlibrary{positioning} % savedbox with a sketch \newsavebox{\sdbox} \sbox{\sdbox}{% \begin{tikzpicture}[scale=0.35] \node (rbox) [fill=red] at (1,0) {}; \node (bbox) [fill=blue] at (1,1) {}; \end{tikzpicture}% } \begin{document} \begin{tikzpicture}[scale=0.5,font=\small] % blocks \node (comp) {computer}; \node[right = 1cm of comp] (sb) {\usebox{\sdbox}}; % arrow \draw[->] (rbox) -- (comp); \end{tikzpicture} \end{document} Upon compilation, you'll notice that the arrow does not link the node (rbox) from its absolute position after the node (sb) is drawn, as it should go from the red rectangle to the computer box. Would it be possible to achieve that goal?
- How do I directly input foreign scripts into LuaLaTeX equations?by Sageof6Paths on June 10, 2026 at 4:03 pm
How do I directly input foreign scripts into LuaLaTeX equations? I'm using LuaLaTeX with the unicode-math package. I have text mode setup that uses fallback font for any glyphs not covered. I also want to do the same for math mode, but with different font choices. I'm currently unable to input a foreign script like Kanji and Thai without adding commands like \text{} around it, despite having fonts that support Kanji and Thai. I want to be able to input scripts like Kanji and Thai into equations without extra commands as long as I have the proper font for it. \documentclass{article} \usepackage{unicode-math} \directlua{ luaotfload.add_fallback ("textFallback", { "SimSun:mode=harf;", } ) } \setmainfont{Arial}[RawFeature={fallback=textFallback}] \setmathfont{Latin Modern Math} \begin{document} This is a sample text. この文章は日本語です。 $∀天∈ℝ, ∀ค∈ℝ, 天+ค∈ℝ$ \end{document} Edit: Added clarification and included the Thai script.
- Good way to write dynamical physics problems [closed]by Rassine Orange on June 10, 2026 at 3:58 pm
I'm a physics teacher and I'd like to share here my way to write "dynamical" exercises. After posting a couple of questions more or less related, I've read comments implying that my way of doing could be improved. When I say "dynamical" I mean that the variables of my problem (\mass, \speed, ...) are coded in the questions. I don't wanna hard-code for the following reasons: If I write everything with, say, m=3kg, and then I wanna change to m=2kg, I don't wanna rewrite everything. I can reuse the questions very fast with different values, e.g. for exams or for the students to practise. Below a MWE of a "typical" problem. Please, do not focus on the Physics, but on the LaTeX ideas, mainly: Could I improve the way I store variables and compute other quantities? For the units, which command should I use: mathrm; text ; textup; ... ? Anything else? I want to make clear that, even if in this example I use basic maths (mainly the 4 operations), I typically need all the usual fonctions (powers, log, sqrt, exp, trigo), so any solution that you suggest should handle all these functions. \documentclass{article} \usepackage{xfp} % provides \fpeval \usepackage{amsmath} \begin{document} \def\mass{3} \def\speed{10} \def\distance{1} \edef\Ekin{\fpeval{0.5*\mass*\speed^2}} \edef\force{\fpeval{0.5*\mass*\speed^2/\distance}} A mass $m=\mass\, \mathrm{kg}$ starts moving from rest. After a distance $d=\distance\, \textup{m}$ its velocity is $\speed\, \text{m} \times \text{s}^{-1}$\,. Compute the force. \vspace{5cm} Solution First you compute the kinetic energy $$ E=\frac 12 mv^2 = \Ekin\, \mathrm{J} $$ blabla more details, more equations, blablabla Use the work theorem to find $$ F=\frac{mv^2}{2d} = \force\, \mathrm{N}\,. $$ \end{document} Community Edit: Current output
- Custom section formatting with titlesec and ulem: making subsection underline span both number and titleby Nevpzo on June 10, 2026 at 2:52 pm
I found a section formatting style on TeX Stack Exchange that I really like. The only issue is that it applies the same formatting to sections, subsections, and subsubsections, whereas I would like a clearer hierarchy with sections having boxed number + colored underline; subsections having colored number + underline; subsubsections having colored number and text (no underline). My current implementation is below. It mostly works, but for some reason, there is a gap in the underline between the section number box and the title. I am using titlesec and ulem for the underlining. \documentclass{article} % === Required packages === \RequirePackage[explicit]{titlesec} \RequirePackage{soul} \RequirePackage{xcolor} \definecolor{titlepagecolor}{rgb}{.13, .36, .38} % === Underline helper === \newbox\TitleUnderlineTestBox \newcommand*\TitleUnderline[1]{% \bgroup \setbox\TitleUnderlineTestBox\hbox{\colorbox{titlepagecolor}\strut}% \setul{\dimexpr\dp\TitleUnderlineTestBox-.3ex\relax}{.3ex}% {\color{titlepagecolor}\ul{\mbox{#1}}}% \egroup } % === (sub)Section numbers === \newcommand*\SectionNumberBox[1]{% \colorbox{titlepagecolor}{% \makebox[2.5em][c]{% \color{white}\strut\csname the#1\endcsname }% }% \hspace{0.5em}% } \newcommand*\SubsectionNumberColored{% {\color{titlepagecolor}\thesubsection}% } % === Section === \titleformat{\section} {\Large\bfseries\sffamily\color{titlepagecolor}} {\SectionNumberBox{section}} {0pt} {\TitleUnderline{#1}} % === Subsection === \titleformat{\subsection} {\large\bfseries\sffamily} {} {0pt} {% \TitleUnderline{% \SubsectionNumberColored\hspace{0.8em}#1% }% } % === Subsubsection === \titleformat{\subsubsection} {\normalsize\bfseries\sffamily} {} {0pt} {\textcolor{titlepagecolor}{\thesubsubsection\hspace{0.8em}#1}} \begin{document} \section{Section} \subsection{Subsection} \subsubsection{Subsubsection} \end{document}
- rowcolor not fill properly when \multicolumn comesby MadyYuvi on June 10, 2026 at 1:47 pm
In my table, column heads are in shade and the text should be in white color, and the table body have alternative shades, I've try with: \documentclass{article} \usepackage{tabularx} \usepackage[table]{xcolor} \begin{document} \newcommand{\colhead}[1]{\color{white}#1} \newcolumntype{P}[1]{>{\raggedright\arraybackslash}p{#1}}% \def\toprule{\rowcolor{black!70}} \def\midrule{\relax} \rowcolors{0}{black!10}{black!20}% \arrayrulecolor{white} \setlength{\arrayrulewidth}{1pt} \begin{table} \caption{Party identification, by social characteristics, 2024} \begin{tabularx}{\textwidth}{ P{50pt}| P{45pt}|X|X|X|X|X|X|} \toprule \colhead{Category (Percentage of Sample)} &\multicolumn{2}{X}{\colhead{Democrats}} &\multicolumn{3}{X}{\colhead{Independents}} &\multicolumn{2}{X}{\colhead{Republicans}}\\ \toprule \colhead{} & \colhead{Strong} & \colhead{Weak} & \colhead{Lean Dem} & \colhead{Pure} & \colhead{Lean Rep} & \colhead{Weak} & \colhead{Strong}\\ \hline \midrule Men\index{Men} (48) & 20 & 9 & 17 & 5 & 20 & 10 & 19\\ \hline Women\index{Women} (52) & 24 & 16 & 16 & 6 & 13 & 9 & 16\\ \hline Whites (72) & 21 & 10 & 12 & 6 & 14 & 12 & 26\\ \hline \end{tabularx} \end{table} \end{document} when \multicolumn comes, shades for column heads not coming properly: Please advise.
- Custom optional parameters for classes in LaTeXby Zerina on June 10, 2026 at 9:46 am
I have customized a MyReport.cls file with a custom optional parameter "Reference", which functions as follows: It defaults to None. If the user passes a bib file path via \documentclass[Reference={ref.bib}]{MyReport}, then execute: \RequirePackage[hyperref=true,backend=biber,url=false,doi=false,sorting=none,style=gb7714-2015]{biblatex} \AtBeginDocument{\addbibresource{ref.bib}} \AtEndDocument{\printbibliography[heading=bibintoc]} How can I implement this feature? Here is the MyReport.cls \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} \ProvidesClass{MyReport}[2024/01/01 v1.0.0 My custom report class] \def\xjtuthesis{MyReport} \def\meta@version{1.0.0} \def\metaversion{\meta@version} \newcommand{\MyReport@bibfile}{} \DeclareOption{Reference}{ \renewcommand{\MyReport@bibfile}{#1} } \ProcessOptions\relax \LoadClass[twoside]{article} \RequirePackage[zihao=-4]{ctex} \RequirePackage[a4paper,left=2.54cm,right=2.54cm,top=3.18cm,bottom=3.18cm]{geometry} \RequirePackage[hidelinks,bookmarksnumbered=true]{hyperref} \makeatletter \ifx\MyReport@bibfile\@empty % do nothing \else \RequirePackage[hyperref=true,backend=biber,url=false,doi=false,sorting=none,style=gb7714-2015]{biblatex} \AtBeginDocument{\addbibresource{\MyReport@bibfile}} \AtEndDocument{ \clearpage \printbibliography[heading=bibintoc] } \fi \makeatother and the below is the main.tex \documentclass[Reference={ref.bib}]{MyReport} \begin{document} \section{test} text\cite{Deb2014} \end{document} the ref.bib: @article{Deb2014, title = {An {{Evolutionary Many-Objective Optimization Algorithm Using Reference-Point-Based Nondominated Sorting Approach}}, {{Part I}}: {{Solving Problems With Box Constraints}}}, shorttitle = {An {{Evolutionary Many-Objective Optimization Algorithm Using Reference-Point-Based Nondominated Sorting Approach}}, {{Part I}}}, author = {Deb, Kalyanmoy and Jain, Himanshu}, date = {2014-08}, journaltitle = {IEEE Transactions on Evolutionary Computation}, shortjournal = {IEEE Trans. Evol. Computat.}, volume = {18}, number = {4}, pages = {577--601}, issn = {1089-778X, 1089-778X, 1941-0026}, doi = {10.1109/TEVC.2013.2281535}, url = {http://ieeexplore.ieee.org/document/6600851/}, urldate = {2025-11-08}, langid = {english} } No matter how I try, although the compilation does not report an error, it prompts: LaTeX: Unused global option(s): [Reference]. LaTeX: Empty bibliography. In fact, there is no "References" section, as if the operation to generate the references was not executed. How can I solve this problem? Note: \documentclass{MyReport} \addbibresource{ref.bib} \begin{document} \section{test} text\cite{Deb2014} \printbibliography[heading=bibintoc] \end{document} This main.tex can be compiled successfully, indicating that the basic functionalities of ref.bib and MyReport.cls are correct.
- flipped \sum symbolsby mathrm alpha on June 10, 2026 at 7:57 am
I found that using it this way doesn't result in the same subscript and superscript positions as \sum, and it's even crooked, which is really undesirable. % Source - https://tex.stackexchange.com/a/689279 % Posted by egreg % Retrieved 2026-06-10, License - CC BY-SA 4.0 % Code modified by: @mathrm alpha \documentclass{article} \usepackage{amsmath,graphicx} \makeatletter \NewDocumentCommand{\flippedsum}{e{_^}}{% \mathop{\mathpalette\flippedsum@{{#1}{#2}}}% } \NewDocumentCommand{\flippedsum@}{mm}{% \flippedsum@@#1#2% } \NewDocumentCommand{\flippedsum@@}{mmm}{% \begingroup \sbox\z@{$\m@th#1\sum$}% \reflectbox{\usebox\z@}% \IfValueT{#2}{% subscript _{#2}% }% \IfValueT{#3}{% superscript ^{\kern-\ifx#1\displaystyle0.5\else0.4\fi\wd\z@#3}% }% \endgroup } \makeatother \begin{document} \[ \flippedsum_a^b \] \begin{center} $\flippedsum_a^b$\\ $\scriptstyle\flippedsum_a^b$\\ $\scriptscriptstyle\flippedsum_a^b$ \end{center} \end{document} References: Superscript horizontal alignment on flipped integral symbol
- Compression for subequations parent numbers with cleverefby Jonk on June 9, 2026 at 5:15 pm
With TeX Live 2024 cleveref can compress cross-references including subequations parent numbers, like so: \documentclass{article} \usepackage{amsmath} \usepackage{cleveref} \begin{document} \begin{subequations}\label{eqn:one} \begin{align} a\label{eqn:onea}\\ b\label{eqn:oneb} \end{align} \end{subequations} \begin{align} c\label{eqn:two}\\ d\label{eqn:three} \end{align} \cref{eqn:one,eqn:two,eqn:three} \end{document} The \cref command gives as desired eqs. (1) to (3) However, with TeX Live 2025 and 2026, the compression does not occur and I get eqs. (1), (2) and (3) Is there a way to obtain the compressed output with TeX Live 2025 and 2026, without explicitly requiring a range (e.g., with \crefrange)? (This question is similar to this one, but the answer seems to indicate that I shouldn't get the compressed output with TeX Live 2024, which I do.)
- autobreak. How make all lines flush to left when first line is long?by Nasser on June 9, 2026 at 12:17 pm
Consider this MWE \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{autobreak} \begin{document} \begin{align*} \begin{autobreak} A= (x + a + b +c+d+e+f+g) +y +z +(x + a + b +c+d+e+f+g) +e +d \end{autobreak} \end{align*} \end{document} Compile with lualatex gives I do not know how to make the output something like this (*), i.e. shift second and the rest of the lines more to the left. Using \MoveEqLeft from mathtools made it worst \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{autobreak} \usepackage{mathtools} %\MoveEqLeft \begin{document} \begin{align*} \MoveEqLeft \begin{autobreak} A= (x + a + b +c+d+e+f+g) +y +z +(x + a + b +c+d+e+f+g) +e +d \end{autobreak} \end{align*} \end{document} Without modifying the lines themselves inside the autobreak manually by rewriting them, is it possible to obtain the desired output shown above in (*) by adding something in preamble or some other option for autobreak? Lualatex, TL 2026
- How to make the parenthesis around equation number be colorful and hyperlinked too when using \eqref?by M. Logic on June 9, 2026 at 11:07 am
A minimal working sample is as follows. \documentclass{article} \usepackage{amsmath} \usepackage[colorlinks=true]{hyperref} %\makeatletter %\def\tagform@#1{\maketag@@@{(\ignorespaces#1\unskip\@@italiccorr)}} %\DeclareRobustCommand{\eqref}[1]{\textup{\tagform@{\ref{#1}}}} %\makeatother \begin{document} \begin{equation}\label{eq} 1+2=3 \end{equation} TEXT \eqref{eq} TEXT \end{document} As you see, when using \eqref on the equation number, it produce only colorful equation number but black parenthesis, and also it produce a hyperlink only on equation number but including no parenthesis. Then how to make the parenthesis around equation number be colorful and hyperlinked too when using \eqref? I hope, the color could change when I reset linkcolor in hyperref. is it possible to redefine some setting to make the equation number be around with parenthesis when using \ref? In this case I think the parenthesis must be colorful and hyperlinked too.
- Incompatibility between memoize and luacolorby PHL on June 9, 2026 at 5:13 am
The following MWE compile correctly, but if luacolor is uncommented the triangle is black instead of red. % !TEX TS-program = lualatex \documentclass{article} \usepackage{memoize} %\usepackage{luacolor} \usepackage{tikz} \begin{document} \begin{tikzpicture} \fill[red] (0,0)--(1,1)--(2,0)--cycle; \end{tikzpicture} \end{document} Is there a workaround? Or is this a bug in memoize and/or luacolor? (luacoloris needed for kerning reasons, that do not show in the above MWE.)
- ltx-talk overlay and tcolorbox?by Richard Wong on June 8, 2026 at 3:25 pm
I'm trying to modify the theorem environment in ltx-talk so that it visually resembles the theorem environment in beamer. I was able to do so using talkthemetcolorbox. However, my attempt breaks the uncover overlay specification in a way that I don't quite understand. (MWE example below) \DocumentMetadata{tagging = on} \documentclass[aspect-ratio=4:3]{ltx-talk} \usepackage{talkthemetcolorbox} %Create a custom tcolorbox style for theorems \newtcolorbox{mythmbox}[1]{ title=#1, boxrule=0pt, enhanced, } \newtheorem{theorem}{Theorem} \RenewDocumentEnvironment{theorem}{D<>{all} +m}{ \begin{uncoverenv}<#1> \begin{mythmbox}{Theorem (#2)} }{ \end{mythmbox} \end{uncoverenv} } \begin{document} \begin{frame} Text \pause \begin{theorem}<3->{Pythagoras} The square of the hypotenuse is equal to the sum of the squares of the other two sides: \[ a^2 + b^2 = c^2 \] \end{theorem} Text \end{frame} \end{document} The code above changes the theorem environment visually as I desire, but it doesn't have the intended uncover behavior. (e.g. I see the theorem on all three slides). However, the code does have the right visual theorem environment and respects the overlay if I replace uncoverenv with onlyenv. (e.g. I see the theorem only on slide 3, but the spacing on slide 2 is not what I desire). It also has the right uncover behavior, but the wrong visual theorem environment if I replace D<>{all} +m with d<>{all} +m. (e.g. I see the theorem only on slide 3 , and the spacing on slide 2 is right, but there is no tcolorbox).