Week
- xcolor not fully colouring commutative diagrams drawn by tikzcdby Ishan Deo on December 2, 2025 at 3:12 am
I'm using xcolor in a table whose cells contain commutative diagrams drawn by tikzcd. However, the colour from xcolor is not fully going through these commutative diagrams, as can be seen by the image below Here is a MWP for the code \documentclass[12pt]{article} \usepackage[svgnames,table]{xcolor} \usepackage{tikz-cd} \begin{document} \begin{table} \centering \rowcolors{1}{Gray!10}{} \begin{tabular}{c} $\displaystyle \begin{tikzcd}[column sep=huge, ampersand replacement=\&] * \arrow[r, bend left = 40, "\,", ""{name=U, inner sep=1pt, below}] \arrow[r, bend right = 40, "\,"{below}, ""{name=D, inner sep=1pt}] \& \arrow[Rightarrow, from=U, to=D, "\alpha"] * \end{tikzcd}$ \end{tabular} \end{table} \end{document} Why is this error happening? And how can I fix it?
- AMSrefs incorrectly uses singular "ed." instead of "eds." for a second bibitem with the same editorsby LSpice on December 1, 2025 at 8:13 pm
The problem description is in the title: AMSrefs incorrectly uses singular "ed." instead of "eds." for a second bibitem with the same editors. I'm not sure if it's OK to report such bugs here, but I have done so successfully in the past, so hopefully this is OK, too. Here's a MWE (or maybe not really M, but hopefully acceptably brief): \documentclass{article} \usepackage{amsrefs} \begin{document} \begin{bibdiv} \begin{biblist} \bib{SGA-3.1}{book}{ editor={Demazure, Michel}, editor={Grothendieck, Alexander}, title={Sch\'emas en groupes. I: Propri\'et\'es g\'en\'erales des sch\'emas en groupes}, } \bib{SGA-3.2}{book}{ editor={Demazure, Michel}, editor={Grothendieck, Alexander}, title={Sch\'emas en groupes. II: Groupes de type multiplicatif, et structure des sch\'emas en groupes g\'en\'eraux}, } \end{biblist} \end{bibdiv} \end{document} The expected outcome is that the first entry is listed with "Michel Demazure and Alexander Grothendieck (eds.)", and the second entry is listed with "————— (eds.)". Actually the second entry is listed with "————— (ed.)".
- Splitting a sentence into characters (incl. spaces) and displaying each character in a tikz nodeby Ted Black on December 1, 2025 at 5:50 pm
I have written the following code using expl3 \documentclass{article} \usepackage{tikz} \ExplSyntaxOn \NewDocumentCommand{\boxedglyphs}{m} { \mgs_box_chars:n { #1 } } \cs_new_protected:Npn \mgs_box_chars:n #1 { \seq_set_split:Nnn \l_tmpa_seq {} {#1} \seq_map_inline:Nn \l_tmpa_seq { \mgs_box_one_char:n { ##1 } } } \cs_new_protected:Npn \mgs_box_one_char:n #1 { \tl_if_blank:nTF { #1 } {\tikz{\node[draw=red] {\textvisiblespace};}} {\tikz{\node[draw=red,inner~sep=0pt,outer~sep=0pt,minimum~height=2ex,] {#1};}} } \ExplSyntaxOff \newcommand{\new}{new} \begin{document} \boxedglyphs{Hello~brave~\new~world!} \end{document} The code is used to break a sentence in individual characters and/or words/subwords. The code works well except with spaces. The output I get is The code does not recognize blank spaces in \tl_if_blank; instead it just goes to the false branch and prints a node with a blank space. I am sure I am missing something elementary but having looked through the documentation of interface3 I am no wiser. Any hints would be appreciated.
- Missing hyphens with IBM Plex fonts and `\DocumentMetadata`by chrispi_cookie on December 1, 2025 at 3:38 pm
I would like to use IBM Plex Serif (and other IBM Plex fonts) for my documents. Everything works fine without \DocumentMetadata. But if I use \DocumentMetadata TeX is hangry and eats all my hyphens. See the mwe and pdf output below. \DocumentMetadata{lang=de} \documentclass{article} \usepackage{unicode-math} \setmainfont{IBM Plex Serif} \begin{document} test test test test test test test test test test test test test test Schifffahrtsbauergasse \end{document} I'm aware of the discussion at GitHub regarding missing hyphens with \DocumentMetadata (https://github.com/latex3/tagging-project/issues/967). However, I have absolutely no real knowledge of fonts, other than that I use them. As this is the tagging repo I thought it has something to do with tagging. But even without tagging=on or no tagging option at all the hyphens are missing. The following workaround was described in the discussion, but I'm not sure if that is a good idea (and it doesn't work for me neither). \tagpdfsetup{activate/softhyphen=false} Is there something (maybe a working workaround) I can do to use IBM Plex together with \DocumentMetadata and correct hyphenation (and enable tagging) at the moment? If required I am using a current LaTeX version: LaTeX2e <2025-11-01> L3 programming layer <2025-11-14>
- Numbering only in a specific line of an align environment (without \tag or extra packages)by Sebastiano on December 1, 2025 at 9:56 am
I’m trying to number a system of equations using the amsmath package, but I would like the equation number to appear on a specific line within the align environment. In my example, I want the numbering to appear on the second line instead of the first one. Here is the code: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align}\label{498h} \mathcal{L}\left\{ t \cos(a t) \right\} & = \frac{ s^2 - a^2 }{ (s^2 + a^2)^2 } \int_0^t \frac{\partial{K(\sigma,\gamma)}}{\partial \sigma}K_L e(\sigma) \\ & = \frac{8 h^3}{a^3}-\frac{8 (h^2-1) h}{a^3}+\frac{16 u}{a^2} \end{align} I want the numered equation on the 2nd \eqref{498h} \end{document} I would like only the second line to be numbered, leaving the first one unnumbered. Moreover, I do not want to use additional packages or the \tag command or \nonumber. In general, for example, if I have 35 line of equation, how is it possible to put, the number in the 24-th equation? I have not checked whether a similar question has already been answered on the site. Thank you all!
- French spacing conflicts with cleverefby Erwann on December 1, 2025 at 5:41 am
In this example I must choose between \cref{sec:bar} and French spacing (o/w disabled using \NoAutoSpace; I presume because sec:bar is read sec\thinspacing:bar. Is there a solution? \documentclass{article} \usepackage[T1]{fontenc} \usepackage[french]{babel} %\NoAutoSpacing \usepackage{cleveref} \begin{document} \section{Foo} bonjour: monde; oui? non! «aujourd'hui» % Voir~\cref{sec:bar} %(./debug-108.aux) %! Missing \endcsname inserted. %<to be read again> % \unskip %l.14 Voir~\cref{sec:bar} % %? \section{Bar}\label{sec:bar} bonjour: monde; oui? non! « aujourd'hui » \end{document}
- How can I mainpulate the arguments in a function defined with \fp_new_function:n?by LaTeXereXeTaL on December 1, 2025 at 4:40 am
I just discovered that we can now create new functions (fp words) that can be evaluated inside \fp_eval:n per page 273 of interface3.pdf (it also seems to work with \fpeval). This is straightforward as the demo shows. What if I want, or need, to manipulate the function arguments to get the returned result? I can't get that to work. This functionality may not be provided yet, but I don't see it mentioned in the documentatin and searching this site turned up nothing (or I somehow missed it). MWE: % !TEX program = lualatexmk % !TEX encoding = UTF-8 Unicode \documentclass{article} \ExplSyntaxOn % This works. \fp_new_function:n { npow } \fp_set_function:nnn { npow } { a,b } { a**b } % This does not work. \fp_new_function:n { biggerof } \fp_set_function:nnn { biggerof } { a,b } { \fp_compare:nTF { a < b } { b } { a } } \ExplSyntaxOff \begin{document} \( \alpha = \fpeval{npow(2,3)} \) \( \alpha = \fpeval{biggerof(2,3)} \) \end{document}
- Practical guidelines for using socketsby Niranjan on December 1, 2025 at 4:22 am
I have read the documentation of sockets and I was wondering how sockets can be used for practical use-cases. While surfing SE, I found this discussion around the topic and this mesmerizing picture-mode-illustrated answer 😛, but still didn't find a straight forward example. I asked AI to give a sample code and got the following (some manual cleanup done and some deprecated commands removed from the original AI-response): \DocumentMetadata{tagging=on} \documentclass{article} \begin{document} \NewSocket{greeting-socket}{0} \NewSocketPlug{greeting-socket}{formal}{Dear ma’am/sir,} \NewSocketPlug{greeting-socket}{informal}{Hi there,} \NewSocketPlug{greeting-socket}{friendly}{Hello, friend!} \NewSocket{closing-socket}{0} \NewSocketPlug{closing-socket}{formal}{Sincerely,} \NewSocketPlug{closing-socket}{informal}{Cheers,} \section*{Formal Letter} \AssignSocketPlug{greeting-socket}{formal} \AssignSocketPlug{closing-socket}{formal} \UseSocket{greeting-socket} This is a formal letter content. \UseSocket{closing-socket} John Doe \section*{Informal Note} \AssignSocketPlug{greeting-socket}{informal} \AssignSocketPlug{closing-socket}{informal} \UseSocket{greeting-socket} This is an informal note. \UseSocket{closing-socket} Jane \section*{Friendly Message} \AssignSocketPlug{greeting-socket}{friendly} \AssignSocketPlug{closing-socket}{informal} \UseSocket{greeting-socket} Just a quick message to say hi. \UseSocket{closing-socket} Your pal \end{document} Now the question is if this type of usage can be called "standard"? Imagine I have some code instead of the un-expandable text in the given example. Here are some questions: Are the names used here recommendable? What names do the kernel use-cases of sockets use? What should package authors use? (The documentation says: Best practice naming conventions are . . . to be documented but it is dated 2024-12-27 which is quite old now, so I assume some recommendations can be given?) Usually it is said that sockets are to be used only once unlike hooks. Does that mean multiple usages of \AssignSocketPlug wrong? The documentation does say: If the programming logic should change, then all that is necessary is to make a new assignment with \AssignSocketPlug to a different {⟨socket-plug-name⟩}. but it also says: A socket is typically only used in one place in code, but this is not a requirement, i.e., if the same operation with the same inputs need to be carried out in several places the same named socket can be used. So I am confused. In the given example, what exactly is wrong (or atypical)? The multiple uses of \AssignSocketPlug or \UseSocket? Theoretically both seem to be fine, but not sure what is expected. Is there any general consensus on what should not be used in sockets? Anything else regarding sockets based on the example or beyond it?
- What are CTAN package modifications that don't affect the package files and why do they happen?by schtandard on November 30, 2025 at 11:25 pm
Today, I updated my TeX Live installation and noticed that a lot of packages were updated where the old and the new version number were identical. Looking into some examples, it seems like the packages are indeed unchanged. There seems to have been a modification in the CTAN catalogue that did not affect the package files at all. What is it and why did it happen? An example: One of the "updated" packages was lipsum, from version 2.7 to version 2.7. Looking at its directory page, all files date from 2021, so there was no recent change justifying an update. However, when I search for lipsum, the search result is marked as "Last modified in Catalogue: 2025-11-11 12:35". This modification must be what triggered the update. However, I could not find this date or any reference to this modification on the package page this search result entry links to (or anywhere else, for that matter).
- Adding math kerns (aka cut-ins or staircase kerning) to OpenType math fontsby Apoorv Potnis on November 30, 2025 at 12:10 pm
Is it possible to add math kerns (aka cut-ins or staircase kerning) to OpenType math fonts? If yes, how? I am personally looking for something which works for LuaLaTeX (using fonts.handlers.otf.addfeature?), but I would be happy for other solutions as well. For example, I want to add a bottom right math kern to \lmathccal{O}. \documentclass{article} \usepackage[newcmbb]{fontsetup} % Below code copied from here: https://tex.stackexchange.com/a/373539/128462. \DeclareFontFamily{U}{mathc}{} \DeclareFontShape{U}{mathc}{m}{it}% {<->s*[1.03] mathc10}{} \DeclareMathAlphabet{\lmathccal}{U}{mathc}{m}{it} % \DeclareMathAlphabet\cmmathcal{OMS}{cmsy}{m}{n} % \renewcommand{\symcal}{\lmathccal} \begin{document} \(\lmathccal{O}_i\) \(\symcal{O}_i\) \end{document}
- White-space around counter valuesby Subhajit Paul on November 30, 2025 at 8:15 am
I have created an almost perfect 24-hour format time counter; only to discover unwanted white-spaces appearing around the values. How do I remove them? \documentclass{article} \newcounter{hour} \newcounter{minute} \newcommand{\Time}[2]{ \setcounter{hour}{#1} \setcounter{minute}{#2} } \newcommand*{\Next}[1][20]{ \addtocounter{minute}{#1} { \ifnum\value{minute}>59 \refstepcounter{hour} \addtocounter{minute}{-60} \else\relax \fi } { \ifnum\value{minute}=0 \ifnum\value{hour}<10 0\thehour:\theminute0 \else \thehour:\theminute0 \fi \else \ifnum\value{hour}<10 0\thehour:\theminute \else \thehour:\theminute \fi \fi } } \begin{document} \Time{8}{0} Given time is \thehour:\theminute, properly written as \Next[0]. Next default time slot is at \Next. Next slot in 10 minutes is at \Next[10]. \end{document}
- Change figure caption from 1 to Abb. 1 (Fig. 1) with correct indentation in ToF? [duplicate]by Lennart Herrmann on November 29, 2025 at 5:25 pm
Im trying to change the figure enumeration in the list of figures as many people have tried before me. The answer I most commonly read is by using \renewcommand{\thefigure}{Abb. \arabic{figure}} or \addto\captionsngerman{\renewcommand{\thefigure}{Abb. \arabic{figure}}} In my case, however, the newly set figure enumeration is clipping into the figure name, like so: Also, in text the figures get doubled captions, like so: Im also trying to apply the same change to the list of tables, but i suspect it to be solved by one solution. MWE: \documentclass{article} \usepackage[ngerman]{babel} % \renewcommand{\thefigure}{Abb. \arabic{figure}} \addto\captionsngerman{\renewcommand{\thefigure}{Abb. \arabic{figure}}} % \renewcommand{\thetable}{Tab. \arabic{figure}} \begin{document} \listoffigures \listoftables \newpage \begin{figure} \caption{Testfigure} \end{figure} \begin{figure} \caption{Testfigure2} \end{figure} \begin{table}[] \centering \begin{tabular}{c|c} & \\ & \end{tabular} \caption{Testtable1} \label{tab:placeholder} \end{table} \begin{table}[] \centering \begin{tabular}{c|c} & \\ & \end{tabular} \caption{Testtable2} \label{tab:placeholder} \end{table} \end{document}
- \newcommands and align environment: How to get the correct alignment?by Grey Eminence on November 29, 2025 at 2:06 pm
When using the \labelrel command (with \overset instead of \stackrel as \stackrel is obsolete: Differences between \stackrel and \stackbin) from @Circumscribe Put reference above equal sign and refer to it in an align-environment the alignment is not correct: \documentclass{article} \usepackage{mathtools} \newcounter{relctr} %% <- counter for relations \renewcommand*\therelctr{\alph{relctr}} %% <- label format \newcommand\labelrel[2]{% \begingroup \refstepcounter{relctr}% \overset{\textnormal{(\alph{relctr})}}{\mathstrut{#1}}% \originallabel{#2}% \endgroup } \AtBeginDocument{\let\originallabel\label} %% <- store original definition \begin{document} \begin{align*} a &= b \\ &\labelrel{=}{someLabel} c \end{align*} \end{document} This seems to be a well known problem with the \overset command: \overset and align environment: how to get correct alignment? where the aligned-overset package offers a nice solution. So my question is how one can achieve similar behavior for the \labelrel command or even more generally specify the behavior with align for new commands. I don't have any experience with coding new commands myself but I decided to post this as a new questions as this may be an interesting question for other users as well. Here is what I tried: Search the internet Try using the aligned-overset in the definition of \labelrel but I had no idea on how to pass the & from align to the definition Look at the implementation of aligned-overset to copy the relevant code however I almost didn't understand anything.
- Replace glyph from font A with a glyph from font B in LuaLaTeX/Node?by Alain Stalder on November 29, 2025 at 6:22 am
The issue is that I have a font that has 9 different glyphs per characters, glyphs called e.g. a, a.2, … a.8 for the lowercase a; and the glyphs look similar per character and have the identical metrics. Those glyphs are rotated cyclically via the GSUB font table and there is a large kerning table for pairs for all glyphs. This works fine in most places today, including in LuaLaTeX with HarfBuzz renderer and in XeLaTeX, but it is not fully supported with LuaLaTeX with the default Node renderer, there kerning is only correct in part of the cases. Since it looks like it would not be practical to fix this in the source codes, see this luaoftload github issue of mine from 2021, I was wondering if I could maybe find a workaround using Lua hooks, but have not found out so far if there would be such a hook. Specifically, I know that kerning works fine if I reduce the font to just use one glyph per character, let me call that font "A". The idea would now be to use that font via fontspec and use a Lua hook late in the process, when "typesetting" has already happened (kerning, hyphenation, etc.), i.e. when it has been determined where each glyph will be placed on the output and then replace the glyphs with pseudo-randomly one from the full font "B", e.g. replace glyph a from font A with a.5 from font B. Is there such a hook, or would anybody know of a different way achieving this in LuaLaTeX (with Node renderer)? I guess, if not possible, it would in principle be possible to do this afterwards in the resulting pdf, and I could probably figure out how to do this (or ask elsewhere), but that would not be ideal, also because it would be two steps, e.g. not visible in TexShop while writing. Added same day: Here is a specific example. The font with the GSUB rotation is Jackwrite.ttf and I have created a variant with just a single glyph per character, see links in the example. While I am at it, I am also showing an example with the opposite, a font Stoicheoin that has two chars per glyph, uppercase A and lowercase a for glyph A and also there I created a variant with one glyph (duplicated) for each char. I have also added the output of the nodetree package for the Jackwrite case... % !TEX TS-program = lualatex \documentclass{article} \usepackage{fontspec} \usepackage{nodetree} % https://jack-daw.com/fonts/stoicheion.zip => Stoicheion.ttf \newfontfamily\stoicheion{Stoicheion.ttf} % % https://jack-daw.com/fonts/StoicheionSingleCharPerGlyphDoNotDistribute.ttf \newfontfamily\stoicheionsimple{StoicheionSingleCharPerGlyphDoNotDistribute.ttf} % https://jack-daw.com/fonts/jackwrite.zip => Jackwrite.ttf \newfontfamily\jackwrite{Jackwrite.ttf} % https://jack-daw.com/fonts/JackwriteSingleGlyphPerCharDoNotDistribute.ttf \newfontfamily\jackwritesimple{JackwriteSingleGlyphPerCharDoNotDistribute.ttf} \begin{document} \Large \section*{\stoicheion{Full Featured Fonts Yes}} \jackwrite{iiiiiiiii} \section*{\stoicheionsimple{Full Featured Fonts No}} \jackwritesimple{iiiiiiiii} \end{document} And here the output of fontree, first for the simpler font because there the result seems to be simpler (Jackwrite case, the 9 i's): ├─GLUE (baselineskip) wd 9.26pt └─HLIST (line) wd 345pt, dp 0.33pt, ht 8.41pt ╚═head ├─LOCAL_PAR ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt ├─KERN (fontkern) -2.88pt ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═ props {['injections'] = {['leftkern'] = -188743.6}} ├─DISC (regular) penalty 50 │ ╠═replace │ ║ └─KERN (fontkern) -2.88pt │ ╚═pre │ ├─KERN (fontkern) -1.44pt │ └─GLYPH (glyph) '-', font 30, wd 7.88pt, ht 3.61pt │ props {['preinjections'] = {['leftkern'] = -94371.8}} ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═ props {['emptyinjections'] = {['leftkern'] = -188743.6}} ├─DISC (regular) penalty 50 │ ╠═replace │ ║ └─KERN (fontkern) -2.88pt │ ╚═pre │ ├─KERN (fontkern) -1.44pt │ └─GLYPH (glyph) '-', font 30, wd 7.88pt, ht 3.61pt │ props {['preinjections'] = {['leftkern'] = -94371.8}} ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═ props {['emptyinjections'] = {['leftkern'] = -188743.6}} ├─DISC (regular) penalty 50 │ ╠═replace │ ║ └─KERN (fontkern) -2.88pt │ ╚═pre │ ├─KERN (fontkern) -1.44pt │ └─GLYPH (glyph) '-', font 30, wd 7.88pt, ht 3.61pt │ props {['preinjections'] = {['leftkern'] = -94371.8}} ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═ props {['emptyinjections'] = {['leftkern'] = -188743.6}} ├─DISC (regular) penalty 50 │ ╠═replace │ ║ └─KERN (fontkern) -2.88pt │ ╚═pre │ ├─KERN (fontkern) -1.44pt │ └─GLYPH (glyph) '-', font 30, wd 7.88pt, ht 3.61pt │ props {['preinjections'] = {['leftkern'] = -94371.8}} ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═ props {['emptyinjections'] = {['leftkern'] = -188743.6}} ├─DISC (regular) penalty 50 │ ╠═replace │ ║ └─KERN (fontkern) -2.88pt │ ╚═pre │ ├─KERN (fontkern) -1.44pt │ └─GLYPH (glyph) '-', font 30, wd 7.88pt, ht 3.61pt │ props {['preinjections'] = {['leftkern'] = -94371.8}} ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═ props {['emptyinjections'] = {['leftkern'] = -188743.6}} ├─KERN (fontkern) -2.88pt ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═ props {['injections'] = {['leftkern'] = -188743.6}} ├─KERN (fontkern) -2.88pt ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═ props {['injections'] = {['leftkern'] = -188743.6}} ├─PENALTY (linepenalty) 10000 ├─GLUE (parfillskip) plus +1fil └─GLUE (rightskip) Looks like it would simply allow to hyphenate anywhere except between first and last pairs of "ii", which makes sense. And here the output with the regular font with GSUB rotation (again Jackwrite case, the 9 i's): ├─GLUE (baselineskip) wd 9.27pt └─HLIST (line) wd 345pt, dp 0.42pt, ht 8.42pt ╚═head ├─LOCAL_PAR ├─GLYPH (glyph) 'i', font 28, wd 7.88pt, ht 8.41pt, dp 0.33pt ├─KERN (fontkern) -2.88pt ├─GLYPH (glyph) '', font 28, wd 7.88pt, ht 8.32pt, dp 0.42pt │ ╚═ props {['injections'] = {['leftkern'] = -188743.6}} ├─KERN (fontkern) -2.88pt ├─GLYPH (glyph) '', font 28, wd 7.88pt, ht 8.37pt, dp 0.35pt │ ╚═ props {['injections'] = {['leftkern'] = -188743.6}} ├─KERN (fontkern) -2.88pt ├─GLYPH (glyph) '', font 28, wd 7.88pt, ht 8.32pt, dp 0.33pt │ ╚═ props {['injections'] = {['leftkern'] = -188743.6}} ├─KERN (fontkern) -2.88pt ├─GLYPH (glyph) '', font 28, wd 7.88pt, ht 8.41pt, dp 0.36pt │ ╚═ props {['injections'] = {['leftkern'] = -188743.6}} ├─KERN (fontkern) -2.88pt ├─GLYPH (glyph) '', font 28, wd 7.88pt, ht 8.32pt, dp 0.35pt │ ╚═ props {['injections'] = {['leftkern'] = -188743.6}} ├─DISC (regular) penalty 50 │ ╠═replace │ ║ ├─KERN (fontkern) -2.88pt │ ║ ├─GLYPH (glyph) '', font 28, wd 7.88pt, ht 8.42pt, dp 0.39pt │ ║ │ props {['replaceinjections'] = {['leftkern'] = -188743.6}} │ ║ ├─GLYPH (glyph) 'i', font 28, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ║ ├─KERN (fontkern) -2.88pt │ ║ └─GLYPH (glyph) '', font 28, wd 7.88pt, ht 8.32pt, dp 0.42pt │ ║ props {['injections'] = {['leftkern'] = -188743.6}} │ ╠═post │ ║ ├─GLYPH (glyph) 'i', font 28, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ║ ├─KERN (fontkern) -2.88pt │ ║ ├─GLYPH (glyph) '', font 28, wd 7.88pt, ht 8.32pt, dp 0.42pt │ ║ │ props {['injections'] = {['leftkern'] = -188743.6}} │ ║ └─GLYPH (glyph) 'i', font 28, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═pre │ └─GLYPH (glyph) '', font 28, wd 7.88pt, ht 3.6pt ├─PENALTY (linepenalty) 10000 ├─GLUE (parfillskip) plus +1fil └─GLUE (rightskip) I do not really understand what it does, but looks like I if I just used the simpler font and found out how to replace the GLYPH settings with the desired glyph (identify it how exactly?) and font 28 instead of 30 (get these numbers from where?), this could yield the desired result… Added same day as asked: Based on Max Cherkoff's answer I managed to make a quick demo that his answer would also work in my case. I am just replacing one of the rs in the example with one with a more prominent "typewriter" glitch, using for the demo just the numbers of the fonts and the glyphs, but would certainly also work along what Max did: % !TEX TS-program = lualatex \documentclass{article} \usepackage{fontspec} \usepackage{luacode} \begin{luacode} local function recurse(head, indent) for n in node.traverse(head) do print(string.rep("-", indent) .. ">>") if n.id == node.id("glyph") then print(string.rep("-", indent) .. "char " .. n.char .. " of font " .. n.font) if n.char == 114 and n.font == 23 then n.char = 983520 n.font = 22 end elseif n.head or n.replace then if n.head then n.head = recurse(n.head, indent+2) end if n.replace then if n.pre then n.pre = recurse(n.pre, indent+2) end if n.post then n.post = recurse(n.post, indent+2) end n.replace = recurse(n.replace, indent+2) end end print(string.rep("-", indent) .. "<<") end return head end local function show_fonts_and_chars(head) print() print("show fonts and chars...") return recurse(head, 0) end luatexbase.add_to_callback("post_linebreak_filter", show_fonts_and_chars, "demo") \end{luacode} % https://jack-daw.com/fonts/jackwrite.zip => Jackwrite.ttf \newfontfamily\jackwrite{Jackwrite.ttf} % https://jack-daw.com/fonts/JackwriteSingleGlyphPerCharDoNotDistribute.ttf \newfontfamily\jackwritesimple{JackwriteSingleGlyphPerCharDoNotDistribute.ttf} \begin{document} \Huge \jackwrite{iiiiiiiiii rrrrrrrrrr} \jackwritesimple{iiiiiiiiii rrrrrrrrrr} \end{document} Output:
- About \def parameter listby YCH817 on November 28, 2025 at 9:44 am
I try to implement the currying function , and I start from implement the following : \myproc<=b<=a will print a \mapsto b \mapsto {\rm output} \myproc<=b will print {\bf a} \mapsto b \mapsto {\rm output} \myproc<<=a will print a \mapsto {\bf b} \mapsto {\rm output} the next step is to make \myproc<<=a be the function that accepts b as input (e.g. \myproc<<=a<=b outputs \myproc<=b<=a) where the \bf stands for the default value . However when I replace the a / b by x_1 / and x_2 , something undesired happened : Here is the MWE : https://www.overleaf.com/9672474965wszpvxnkwkpr#bdc9bc Here is the code in case you cannot access to the overleaf link : \documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsfonts} \usepackage{mathtools} \usepackage{tikz} \begin{document} \makeatletter \def\myproc<{% \@ifnextchar <% {\myproc@NopB} {\myproc@YopB} } \def\myproc@NopB<=#1{% \myproc@YopB@YopA{{\bf x}_2}<={#1}% } \def\myproc@YopB=#1{%<=#2 \@ifnextchar <% {\myproc@YopB@YopA#1}% myproc <=b<=a myproc@YopB =b<=a myproc@YopB@YopA b<=a {\myproc@YopB@NopA#1}% myproc <=b myproc@YopB =b myproc@YopB@NopA b } \def\myproc@YopB@NopA#1{% \myproc@YopB@YopA{#1}<={{\bf x}_1}% } \def\myproc@YopB@YopA#1<=#2{ {#2} \mapsto {#1} \mapsto {\rm output}% } \makeatother % \myproc@NopB \(\myproc<<={x_1}\)\par \(\myproc<={x_2}\)\par \(\myproc<={x_2}<={x_1}\) \vspace{10pt} The desire result should be\par \(x_1\mapsto {\bf x}_2\mapsto {\rm output}\)\par \({\bf x}_1\mapsto x_2\mapsto {\rm output}\)\par \(x_1 \mapsto x_2 \mapsto {\rm output}\) \end{document}
- Status of the tabularray package?by albert on November 28, 2025 at 9:20 am
I saw something worrying on gthub regarding the status of the package tabularay: Does anyone know how the future will look like for this package? Will there someone who will take over its maintenance?
- Why does LaTeX put the PDF tags for floats at the end of the document?by Mörkö on November 28, 2025 at 8:34 am
Background I am trying to produce a reasonably accessible document template at work. I have worked out basic tagging, reasonably structured tables, alt text for images and mathml output for inline and block math envs. I have been testing this document with NVDA + MathCAT + Adobe Acrobat, which I understand to be a "known good" reader + screen reader combo. (I am sighted and don't use screen readers in my daily life: please correct me if this is an unreasonable test setup!) I have also been inspecting the thing with PAC and the ngpdf editor. Everything I'm showing here is compiled with the lualatex-dev demo here https://latex3.github.io/tagging-project/documentation/wtpdf/small-example (though I did also test it with overleaf's newest release and got the same outcomes) Issue with tagging structure My issue concerns floats (at least tables and figures): whereas LaTeX places them among the text in the visual part of the pdf, the relevant accessibility tags are at the very end of the document. Specifically (per the ngpdf editor) the document ends with a tables element that contains both tables (see screenshot below; I collapsed the table structure itself to save space). Therefore, when just reading the document using a screen reader from top to bottom, the float doesn't get read in the relevant chapter. If I navigate past the end of the document, I can find (and read) my floats there. I believe this not to be a problem with my reader setup, because the ngpdf editor also places these items at the end of the document and the html derivation algorithm implemented by ngpdf places them at the end of the document. I have created what I think of as a minimal repro: \DocumentMetadata{ lang = en, pdfstandard = ua-2, pdfstandard = a-4f, %or a-4 tagging=on, tagging-setup={math/setup=mathml-SE}, testphase={math} } \documentclass{article} \usepackage{graphicx} % Required for inserting images \usepackage{hyperref} \title{Figure repro} \begin{document} \maketitle This document has multiple floats (\ref{tab:A} and \ref{tab:B}). \begin{table}[h] \centering \begin{tabular}{c|c} A & B \\ C & D \end{tabular} \caption{Letters} \label{tab:A} \end{table} Then it has a paragraph of text \begin{table}[h] \centering \begin{tabular}{c|c} 1 & 2 \\ 3 & 4 \end{tabular} \caption{Numbers} \label{tab:B} \end{table} In conclusion: lorem ipsum. \url{https://ctan.org} \end{document} Corresponding html output: https://ngpdf.com/resources/html/df185aa3-feee-4946-8d0d-6ed438c568cd/2f659711-f19d-454c-a710-165dc27b36fd.html ngpdf editor: https://ngpdf.com/editor/editFile Accessibility ramifications As I read the repro with NVDA from top to bottom, I get: figure repro november twenty-eighth this document has multiple floats link go to destination table dot struct dot fourteen and link go destination link table dot struct dot thirty then it has a paragraph of text in conclusion [small pause] lorem ipsum [long pause] link https slash slash ctan dot org caption table one letters out of caption table with two rows and two columns row one column one a [pronouced ey] column two b [pronounced bee] row two column one c [pronounced cee] row two column two d [pronounced dee] out of table caption table two numbers out of caption table with two rows and two columns row one column one one column two two row two column one three row two column two four If I press k (go to next link) at "this document has multiple floats link go to destination table dot struct dot fourteen and link go destination", NVDA announces "link go to destination table dot struct dot fourteen link". When I then press enter, the box surrounding the link in acrobat changes from the purple that hyperref sets it to to a black-on-white dotted line: I would interpret that as having been visited. The same k-and-then-enter maneuver seems to work for the url link and opens a browser. I am therefore reasonably confident this activates the link. However, after activating the table link, I get silence. Then when I press down again, I get "link table dot struct dot thirty" and so on: it does not navigate me to the table. Actual questions Is having all the floats at the end the expected behaviour? I as a sighted person that isn't used to screen readers feel that the floats being at the end of the document makes navigating the document significantly harder. If the floats being at the end is not the expected behaviour, should I report a bug? Is there a known work-around to this? Besides trying to produce reasonable pdf output, I am also interested in deriving HTML / epub (potentially using the html derivation algorithm) for more general ergonomics and access reasons. I would at least want to have the figure placement controllable in that case. (Though in the html produced by ngpdf, the links do at least work) Am I missing something with the non-followable links in acrobat or is acrobat just broken? Can the link titles be made more human readable? The HTML output for reference I don't know how long the ngpdf links last so here is the html output: <!DOCTYPE html> <html lang="en"><head> <title>Figure repro</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <meta name="derivation-algorithm-version" content="1.1"/> <meta name="derivation-algorithm-producer" content="ngPDF"/> <style> li > span[data-pdf-se-type=Lbl] { font-style: bold;margin-right:.5em;display:inline-block;vertical-align:top;} div[data-pdf-se-type=LBody] > div { vertical-align:top;} div[data-pdf-se-type=LBody] > div:first-child > p:first-child { margin-top:0} </style> <style> mtable.align > mtr > mtd:nth-child(2n), mtable.flalign > mtr > mtd:nth-child(2n), mtable.alignat > mtr > mtd:nth-child(2n), mtable.aligned > mtr > mtd:nth-child(2n+1), mtable.alignedat > mtr > mtd:nth-child(2n+1), mtable.split > mtr > mtd:nth-child(2n+1) { padding-right:0;text-align:right;text-align:-moz-right;text-align:-webkit-right; } mtable.align > mtr > mtd:nth-child(2n+3), mtable.flalign > mtr > mtd:nth-child(2n+3), mtable.alignat > mtr > mtd:nth-child(2n+3), mtable.aligned > mtr > mtd:nth-child(2n), mtable.alignedat > mtr > mtd:nth-child(2n), mtable.split > mtr > mtd:nth-child(2n) { padding-left:0;text-align:left;text-align:-moz-left;text-align:-webkit-left; } /* use float right for safari */ @supports (-webkit-appearance:none) and (stroke-color:transparent) { mtable.align > mtr > mtd:nth-child(2n), mtable.flalign > mtr > mtd:nth-child(2n), mtable.alignat > mtr > mtd:nth-child(2n), mtable.aligned > mtr > mtd:nth-child(2n+1), mtable.alignedat > mtr > mtd:nth-child(2n+1), mtable.split > mtr > mtd:nth-child(2n+1) { padding-right:0;text-align:right;float:right:display:math; } } mtable.align > mtr > mtd:nth-child(2n) {border margin-left:1em; padding-left:1em; } mtable.alignat > mtr > mtd { margin-left:0em; margin-right:0em; padding-left:0em; padding-right:0em;} mtable.flalign {width:100%} mtd[intent=":no-equation-label"], mtd[intent=":equation-label"] { position:relative; left:-2em; } </style> </head> <body lang="en"><nav hidden id="PDF-PageNavigation" role="doc-pagelist"><a href="#page-0">1</a></nav><div data-pdf-se-type="Document" id="ID.002"><div data-pdf-se-type-original="text-unit" data-pdf-se-type="Part" id="ID.005"><div data-pdf-se-type="Title" id="ID.006"><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="center" style="text-align:center;" id="ID.007"><span id="page-0" role="doc-pagebreak" aria-label="1"></span>Figure repro</p></div><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="center" style="text-align:center;" id="ID.008"></p><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="center" style="text-align:center;" id="ID.009">November 28, 2025</p></div><div data-pdf-se-type-original="text-unit" data-pdf-se-type="Part" id="ID.010"><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="justify" style="text-align:justify;" id="ID.011">This document has multiple floats (<a href="#ID.014" data-pdf-se-type="Link" id="ID.012">1</a> and <a href="#ID.030" data-pdf-se-type="Link" id="ID.013">2</a>).</p></div><div data-pdf-se-type-original="text-unit" data-pdf-se-type="Part" id="ID.028"><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="justify" style="text-align:justify;" id="ID.029">Then it has a paragraph of text</p></div><div data-pdf-se-type-original="text-unit" data-pdf-se-type="Part" id="ID.044"><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="justify" style="text-align:justify;" id="ID.045">In conclusion: lorem ipsum. <a href="https://ctan.org" data-pdf-se-type="Link" id="ID.046">https://ctan.org</a></p></div><section data-pdf-se-type-original="tables" data-pdf-se-type="Sect" id="ID.004"><aside data-pdf-se-type-original="float" data-pdf-se-type="Aside" id="ID.014"><div data-pdf-se-type="Caption" id="ID.025"><span data-pdf-se-type="Lbl" id="ID.026">Table 1: </span><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="center" style="text-align:center;" id="ID.027">Letters</p></div><div data-pdf-se-type-original="text-unit" data-pdf-se-type="Part" id="ID.015"><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="center" style="text-align:center;" id="ID.016"></p><table data-pdf-se-type="Table" id="ID.017"><tr data-pdf-se-type="TR" id="ID.018"><td data-pdf-se-type="TD" id="ID.019">A</td><td data-pdf-se-type="TD" id="ID.020">B</td></tr><tr data-pdf-se-type="TR" id="ID.021"><td data-pdf-se-type="TD" id="ID.022">C</td><td data-pdf-se-type="TD" id="ID.023">D</td></tr></table><p data-pdf-se-type-original="text" data-pdf-se-type="P" id="ID.024"></p></div></aside><aside data-pdf-se-type-original="float" data-pdf-se-type="Aside" id="ID.030"><div data-pdf-se-type="Caption" id="ID.041"><span data-pdf-se-type="Lbl" id="ID.042">Table 2: </span><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="center" style="text-align:center;" id="ID.043">Numbers</p></div><div data-pdf-se-type-original="text-unit" data-pdf-se-type="Part" id="ID.031"><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="center" style="text-align:center;" id="ID.032"></p><table data-pdf-se-type="Table" id="ID.033"><tr data-pdf-se-type="TR" id="ID.034"><td data-pdf-se-type="TD" id="ID.035">1</td><td data-pdf-se-type="TD" id="ID.036">2</td></tr><tr data-pdf-se-type="TR" id="ID.037"><td data-pdf-se-type="TD" id="ID.038">3</td><td data-pdf-se-type="TD" id="ID.039">4</td></tr></table><p data-pdf-se-type-original="text" data-pdf-se-type="P" id="ID.040"></p></div></aside></section></div></body></html>
- circuitkiz: customize the style of the rotary switch position displayby cis on November 27, 2025 at 8:54 pm
I've been experimenting with a rotary switch. I want 7 switch positions with a gap at the bottom. My question is: can the thick black line be replaced with a nice arrow? By the way: it seems exceptionally difficult to set the switch to a specific position (1, 2, ..., 7). My method of calculating the angle \s works, but if there's an easier way, please let me know. \documentclass[margin=5pt, multi=circuitikz]{standalone} \usepackage[]{circuitikz} \def\S{5}% switch position 1,2,...,7; 7=\N \pgfmathsetmacro\s{-2*(\S+4)*180/8}% switch angle <-- I do not know a easier methode \def\No{7}% number of switch positons \pgfmathsetmacro\RSangle{6*180/8}% complete angle of the rotary switch <-- seems to be good \begin{document} \begin{circuitikz} \draw (0,0) node[rotary switch=\No in \RSangle wiper \s, rotate=90, ](S){}; \foreach \i in {1,...,\No}{%% requires "calc" \path[] ($(S.aout \i)!1ex!(S.sqout \i)$) node[font=\tiny, text=red]{\i}; }%% \end{circuitikz} \end{document}
- How to Color the Hollyberries Red in a Psvectorian Ornament?by DDS on November 27, 2025 at 5:08 pm
Consider the code: \documentclass[12pt]{book} \usepackage{pstricks,psvectorian} \usepackage{color} \begin{document} \thispagestyle{empty} \begin{pspicture}(-5,-5)(4,4)% \psframe[fillcolor=blue!30!black,fillstyle=solid](-5,-5)(4,4) \psframe[linecolor=blue!30!black](-5,-5)(4,4) \rput[tr]{-0}(0,3){\psvectorian[color=green!35!black,width=3.5cm]{78}} \end{pspicture}% \end{document} which produces QUESTION: How may I make the hollyberries in this ornament red? (I compile with xelatex) Thank you.
- Table with HIRAGANA alignments issuesby Fr3d on November 27, 2025 at 4:19 pm
Good evening, so lately I started a Japanese course and for now I wanted to replicate a table I've seen, grouping the Hiragana with similar strokes; as to have a "quick to find" abstract/summary. But my first attempt had a vertical misalignment, so I tried a second version, which looks way better unless someone looks at the TSU-U tile, or the TA-NA tile, which show an horizontal misalignment. Is there an easy fix for that? BTW I'm still searching for a comprehensive xeCJK guide in English, which I think would be more helpful in the future (only found one in Chinese and one in Japanese, which I can not read for the time being. \documentclass{article} \usepackage{xeCJK} \usepackage{fontspec} \usepackage{tikz} \usepackage{geometry}% \geometry{ %% a4paper, left=6mm, right=6mm, top=4mm, bottom=4mm, } \usepackage{adjustbox} % \usepackage{lscape} \usepackage{hyperref} \usepackage{booktabs, tabularx} \usepackage{multirow} \usepackage{multicol} \setlength{\columnsep}{9.5mm} \usepackage{makecell} \usepackage{pbox} \usepackage{tcolorbox} \usepackage{footnote} \usepackage{tablefootnote} \usepackage{longtable} \usepackage{enumerate} % in quest'ordine altrimenti non trova i vari parsep \usepackage{enumitem} \setCJKmainfont{MS Mincho} % for \rmfamily \setCJKsansfont{MS Gothic} % for \sffamily %\setCJKmainfont{IPAMincho} %\setCJKsansfont{IPAGothic} %\setCJKmonofont{IPAGothic} \begin{document} \section{ひらがな} \begin{center} % \fontsize{8pt}{9pt}\selectfont \setlength{\tabcolsep}{2.5pt} \sffamily \begin{tabular}{*9{c}} \toprule \multicolumn{2}{c}{あ お} & \multicolumn{4}{|c}{さ き ち ら} & \multicolumn{2}{|c|}{し も} & い\\ \multicolumn{2}{c}{A O} & \multicolumn{4}{|c}{SA KI CHI RA} & \multicolumn{2}{|c|}{SHI MO} & I\\ \midrule \multicolumn{6}{c}{に け は ほ ま よ} & \multicolumn{2}{|c|}{つ う} & え \\ \multicolumn{6}{c}{NI KE HA HO MA YO} & \multicolumn{2}{|c|}{TSU U} & E \\ \midrule \multicolumn{3}{c}{の め ぬ} & \multicolumn{3}{|c}{わ ね れ} & \multicolumn{3}{|c}{た に こ} \\ \multicolumn{3}{c}{NO ME NU} & \multicolumn{3}{|c}{WA NE RE} & \multicolumn{3}{|c}{TA NI KO} \\ \midrule \multicolumn{5}{c}{ろ る み そ を} & \multicolumn{2}{|c}{た な} & \multicolumn{2}{|c}{て そ} \\ \multicolumn{5}{c}{RO RU MI SO WO } & \multicolumn{2}{|c}{TA NA} & \multicolumn{2}{|c}{TE SO} \\ \bottomrule \end{tabular} \end{center} \begin{center} % \fontsize{8pt}{9pt}\selectfont \setlength{\tabcolsep}{2.5pt} \sffamily \begin{tabular}{*9{c}} \toprule \multicolumn{2}{c}{ \multirow{2}{*}{\makecell{あ\\A}}\hspace{0.6ex} \multirow{2}{*}{\makecell{お\\O}} } & \multicolumn{4}{|c}{ \multirow{2}{*}{\makecell{さ\\SA}}\hspace{0.6ex} \multirow{2}{*}{\makecell{き\\KI}}\hspace{0.6ex} \multirow{2}{*}{\makecell{ち\\CHI}}\hspace{0.6ex} \multirow{2}{*}{\makecell{ら\\RA}} } & \multicolumn{2}{|c|}{ \multirow{2}{*}{\makecell{し\\SHI}}\hspace{0.6ex} \multirow{2}{*}{\makecell{も\\MO}} } & \multirow{2}{*}{\makecell{い\\I}} \\ \multicolumn{2}{c}{} & \multicolumn{4}{|c}{} & \multicolumn{2}{|c|}{ } & \\ \midrule \multicolumn{6}{c}{ \multirow{2}{*}{\makecell{に\\SA}}\hspace{0.6ex} \multirow{2}{*}{\makecell{け\\KE}}\hspace{0.6ex} \multirow{2}{*}{\makecell{は\\HA}}\hspace{0.6ex} \multirow{2}{*}{\makecell{ら\\HO}}\hspace{0.6ex} \multirow{2}{*}{\makecell{ま\\MA}}\hspace{0.6ex} \multirow{2}{*}{\makecell{よ\\YO}} } & \multicolumn{2}{|c|}{ \multirow{2}{*}{\makecell{つ\\TSU}}\hspace{0.6ex} \multirow{2}{*}{\makecell{う\\U}}} & \multirow{2}{*}{\makecell{え\\E}} \\ \multicolumn{6}{c}{} & \multicolumn{2}{|c|}{ } & \\ \midrule \multicolumn{3}{c}{ \multirow{2}{*}{\makecell{の\\NO}}\hspace{0.6ex} \multirow{2}{*}{\makecell{め\\ME}}\hspace{0.6ex} \multirow{2}{*}{\makecell{ぬ\\NU}} } & \multicolumn{3}{|c}{ \multirow{2}{*}{\makecell{わ\\WA}}\hspace{0.6ex} \multirow{2}{*}{\makecell{ね\\NE}}\hspace{0.6ex} \multirow{2}{*}{\makecell{れ\\RE}} } & \multicolumn{3}{|c}{ \multirow{2}{*}{\makecell{た\\TA}}\hspace{0.6ex} \multirow{2}{*}{\makecell{に\\NI}}\hspace{0.6ex} \multirow{2}{*}{\makecell{こ\\KO}} } \\ \multicolumn{3}{c}{} & \multicolumn{3}{|c}{} & \multicolumn{3}{|c}{ } \\ \midrule \multicolumn{5}{c}{ \multirow{2}{*}{\makecell{ろ\\RO}}\hspace{0.6ex} \multirow{2}{*}{\makecell{る\\RU}}\hspace{0.6ex} \multirow{2}{*}{\makecell{み\\MI}}\hspace{0.6ex} \multirow{2}{*}{\makecell{そ\\SO}}\hspace{0.6ex} \multirow{2}{*}{\makecell{を\\WO}} } & \multicolumn{2}{|c}{ \multirow{2}{*}{\makecell{た\\TA}}\hspace{0.6ex} \multirow{2}{*}{\makecell{な\\NA}} } & \multicolumn{2}{|c}{ \multirow{2}{*}{\makecell{て\\TE}}\hspace{0.6ex} \multirow{2}{*}{\makecell{そ\\SO}} } \\ \multicolumn{5}{c}{} & \multicolumn{2}{|c}{} & \multicolumn{2}{|c}{} \\ \bottomrule \end{tabular} \end{center} \end{document} I had to keep a blank copy of the multicolumn setting for the vertical separation line, otherwise it wouldn't show; it would stop in the middle.
- How to make a long cases equation more compact and clearer?by mingabua on November 27, 2025 at 10:12 am
I am currently writing my master's thesis. In it, I have to specify a case equation. I can present the formula clearly and comprehensibly, but somehow I find the formatting not quite right. I can't tell you exactly how I would like it to look, but I would like it to be a little clearer and perhaps take up less space vertically. This is my code: \documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lipsum} \usepackage[margin=1in]{geometry} \usepackage{amsmath,amssymb} \usepackage{mathtools} \usepackage{lmodern} \begin{document} \lipsum[2] \begin{align}\label{eq:qt_recursion} Q_{t+1}\bigl(\Omega_{t+1},\alpha_{t+1},\mathbf{l}_{t+1}\bigr) = \min\!\begin{cases} Q_t(\delta_t) - \pi_{jt}, & \text{if R2: } \Omega_{t+1}=\Omega_t+1,\ \alpha_{t+1}=\alpha_t, \\[-1mm] & \qquad\qquad\ \ \mathbf{l}_{t+1}=(1,l_{t,1},\dots,l_{t,MS-2}), \\[0.5mm] Q_t(\delta_t), & \text{if R1: } \Omega_{t+1}=\Omega_t+\theta(\alpha_t),\ \alpha_{t+1}=\alpha_t+1, \\[-1mm] & \qquad\qquad\ \ \mathbf{l}_{t+1}=(0,l_{t,1},\dots,l_{t,MS-2}). \end{cases} \end{align} \lipsum[3] \end{document}
- TikZ word search diagramby yannis on November 26, 2025 at 11:50 pm
How can I draw such a "word-search" diagram in TikZ? I need to place the letters on a grid and then to add red horizontal, vertical, diagonal or antidiagonal highlighting boxes as in the picture.
- How to customize CircuiTikz ac - dc symbolsby Anisio Braga on November 26, 2025 at 8:12 pm
The ac & dc symbols in Circuitikz are a much welcomed addition. However, I could not find a proper way to customize it to a typical application in a multimeter dial with the ac or dc symbol positioned above the letter, besides changing the thickness of the lines. How can this be done with the new ac and dc symbols? I've used ac and dc symbols in a pictographic multimeter as illustrated. \documentclass[10pt]{article} \usepackage[usenames]{color} %used for font color \usepackage[siunitx,american, RPvoltages]{circuitikz} % DC and AC symbols \newcommand{\mathdirectcurrent}{\mathrel{\mathpalette\mathdirectcurrentinner\relax}} \newcommand{\mathdirectcurrentinner}[1]{% \settowidth{\dimen0}{$#1=$}% \vbox to .75ex {\offinterlineskip \hbox to \dimen0{\leaders\hrule height 0.65pt \hfill} \vskip.25ex \hbox to \dimen0{% \leaders\hrule height 0.35pt \hskip.25\dimen0\hfill \leaders\hrule height 0.35pt \hskip.25\dimen0\hfill \leaders\hrule height 0.35pt \hskip.25\dimen0 } \vfill }% } \newcommand{\textdirectcurrent}{\mathdirectcurrentinner{\textstyle}{}} %----------------------------------------- \newcommand{\DCACsup}[1]{$\widetilde{\stackrel{\mathdirectcurrentinner{}}{\rm #1}}$} \newcommand{\DCsup}[1]{$\stackrel{\mathdirectcurrentinner{}}{\rm #1}$} \begin{document} \begin{circuitikz} \node at (0,0)[ dc symbol, dc symbol segments=3]{V}; \node at (0, -1){\DCsup{V}}; \end{circuitikz} \end{document}
- macTeX suddenly installs a lot of updates and takes huge disk spaceby F'x on November 26, 2025 at 7:10 pm
I've been using macTeX for many years, installing the new version each year, and updating (with tlmgr update --all) about every two weeks. Every time, it updates a few dozen packages. But about two weeks ago, the update command decided to update several hundred packages. I was in a hurry, so I said yes, and though maybe I had forgotten to update for a long time. But today I run another update, and it updated 459 packages. I wondered what happened, and I looked at my /usr/local/texlive/2025/texmf-dist, and now it's whooping 8.6 GB. I don't have a number for before, but all info I find online says it should be a few GB, not that much. So, in that context: how can I check the logs of past updates, see how many packages were updated each time? has something changed in the last few months about texlive updates?
- Vertical separators in pchstack in cryptocodeby Michael Hammer on November 26, 2025 at 3:02 pm
I work with Cryptocode package in LaTeX and want to generate discription of games with oracles. My goal is to generate something like: (Source: https://eprint.iacr.org/2023/275) If my understanding is correct, this is generate via a pcvstack/pchstack-combination (p. 32 in documentation: https://ftp.rrzn.uni-hannover.de/pub/mirror/tex-archive/macros/latex/contrib/cryptocode/cryptocode.pdf). There is to my knowledge no intended parameter to separate horizontal stacks with a vertical line as on the picture. Is there any elegant solution to this problem? My current best attempt is to introduce dummy procedure inbetween filled with vertical rule: \documentclass{report} \usepackage{cryptocode} \begin{document} \begin{pchstack}[space=1em,center, boxed] \procedure{$\mathsf{Left}$}{ \text{Hello,} } \procedure{}{ \rule{0.4pt}{1.5cm} } \procedure{$\mathsf{Right}$}{ \text{Tex StackExchange} } \end{pchstack} \end{document} But that is not ideal because of the awkward spacing: Any well-known workaround?
- My caption doesn't appear in a wide table [closed]by hager moharram on November 25, 2025 at 7:18 pm
I was preparing a table in LaTeX (Springer Nature template) and the table ended up too wide for the page. I used many tricks to put it still on the page with some codes like \setlength{\tabcolsep}{3.5pt} and \resizebox{1\textwidth}{!}{}. While this worked, the problem is that my caption doesn't appear anymore, and it is just allowing it to be inserted as a \textbf{}. I need to arrange my labels, and the template allows either the caption or the modified table. Are there any other ways to put the caption? This is the code of the table: \newpage \begin{table} \centering \addtocounter{table}{1} \begin{flushleft}\textbf{Table 2} Comparison between anthropometric and clinical data within each group at baseline and post-treatment, and between the two groups \end{flushleft} \vspace{2mm} \setlength{\tabcolsep}{3.5pt} \resizebox{1\textwidth}{!}{ \begin{tabular}{cccccccc} \cmidrule(r){1-8} \multirow{2}{*}{Variable} & \multicolumn{2}{c}{\textbf{Group I (n=35)}} & \multirow{2}{*}{$P$1} & \multicolumn{2}{c}{\textbf{Group 2}} & \multirow{2}{*}{$P$2} & \multirow{2}{*}{$P$3} \\\addlinespace[0.5ex] \cmidrule(r){2-3}\cmidrule(r){5-6} \addlinespace[0.5ex] & bbbbbbbb & tttttttttttttt & & bbbbbbbb & tttttttttttttt & & \\\cmidrule(r){1-8} kkkkkk (kk)& 00.00 ± 00.00 & 00.00 ± 00.00& 0.000* & 00.00 ± 00.00 & 00.00 ± 00.00 & 0.000 & 0.000 \\ mmm (mm/mm)& 00.00 ± 0.00 & 00.00 ± 0.00 & 0.000* & 00.00 0.00 & 00.00 ± 0.00 & 0.000 & 0.000 \\ mmmmmmmm & 0.00 (0.00 – 0.00) & 0.00 (0.00 – 0.00) &$<$0.000* & 0.00 (0.00 – 0.00) &0.00 (0.00 – 0.00) &$<$0.000* & 0.000 \\ jjj (mg/dL)& 000.0 (000.0 – 000.0) &149.0 (000.0 – 000.0) & $<$0.000* & 000.0 (000 – 000.0) & 000.0 (0.000 – 000.5) & $<$0.000* & 0.000 \\ kkk (kkk/kk)& 0.00(0.00 – 00.00) & 0.0 0(0.00 – 00.00) & 0.000 & 0.00 (0.00 – 0.00) & 0.00 (0.00 – 00.0)0 & 0.000 & 0.099 \\ jjjj-jj& 0.00 (0.00 – 0.0)0 &0.0 0(0.00 – 0.00) &0.000* & 0.00 (0.00– 0.00) & 0.0 0(0.00 – 0.0)0& $<$0.000*& 0.000 \\ jjjjjjjj (jj/jj) &0.00 (0.00 – 0.00) &0.00 (0.00 – 0.00) &0.000 & 0.00 (0.00 –0.00) & 0.00 (0.00 – 0.00) &0.000* & 0.000 \\ ggggggggg (jj/j)& 000.0 (000.0 – 000.0) & 000.0 (000.0 – 000.0) &0.000* & 000.0 (000.0 – 0.0) & 0.0 (0.0 – 000.0) & 0.000 & 0.000* \\ \bottomrule \end{tabular}} \begin{flushleft}\footnotetext{\footnotesize \raggedright }\end{flushleft} \end{table}
- How to get a structure of this nodes tower with proper coordinates?by Explorer on November 25, 2025 at 5:54 pm
What I want to achieve is something as below(sorry for drawing in a hurry): The only requirements is vertical alignment(shown as the red dashed lines), the spacing of each nodes could be design, given that would not ruin the figure is okay. What I have tried is as below: \documentclass[tikz,border=5pt]{standalone} \newcommand\mynode[2][1]{% \node[draw,thick,minimum width=8cm,minimum height=2cm,font=\Huge\bfseries,scale=#1] at (#2) {AAAA}; } \begin{document} \begin{tikzpicture} % \mynode[1]{0,0} % \mynode[.45]{-2.25,-2} % \mynode[.45]{2.25,-2} % \mynode[.225]{-3.25,-3} % \mynode[.225]{1.25,-3} % \mynode[.225]{-1.25,-3} % \mynode[.225]{3.25,-3} %... \foreach \x[ evaluate=\x as \y using {int(2^(\x-1))} ] in {1,...,6}{ \foreach \t in {1,...,\y}{ \def\xx{\fpeval{-4 + (8/(\y+1))*\t*1.25}} \def\yy{\fpeval{(8/(\x+1))*1.25}} \mynode[\fpeval{1/\y}]{\xx,\yy} } } \end{tikzpicture} \end{document} It gives: I found that dilemma to determine the proper spacing, and exact coordinates calculation to guarentee vertical alignment at the same time. Is that any powerful tikz tools or something other (box, coffin?) to achieve this? Or I maybe just to make more effort to solve the better numerical relationship or working with the recursive structure?
- Graph of a relationby Dimitrios ANAGNOSTOU on November 25, 2025 at 4:24 pm
First attempt to create a graph with TikZ. More precisely, I want to be able to create figures like the following one. After much trial and error, I was able to get something close with the code below: \documentclass[tikz,border=5mm]{standalone} \usetikzlibrary{arrows.meta,positioning} \begin{document} \begin{tikzpicture}[ >=Stealth, node/.style={circle, fill=black, inner sep=2pt}, every loop/.style={min distance=15mm, looseness=8} ] % Define nodes \node[node, label=left:4] (4) at (0, 3) {}; \node[node, label=left:1] (1) at (0, 1) {}; \node[node, label=below left:2] (2) at (-2, 0) {}; \node[node, label=below right:3] (3) at (2, 0) {}; % Draw edges \draw[->] (1) -- (4); \draw[->] (1) -- (2); \draw[->] (1) -- (3); \draw[->] (2) to[bend left=30] (4); \draw[->] (3) to[bend right=30] (4); \draw[->] (2) to[bend right=30] (3); % % Self-loops \draw[->] (4) edge[loop above] (4); \draw[->] (1) edge[loop right] (1); \draw[->] (2) edge[loop left] (2); \draw[->] (3) edge[loop right] (3); \end{tikzpicture} \end{document} How can I get something closer to the book picture? Also, is there any TikZ library/extension that automates such staff? Thank you very much for your time.
- Wild Turkeys in TikZby karlh on November 25, 2025 at 4:20 pm
I have an annual scavenger hunt at Thanksgiving in which the TikZlings and TikZ ducks (and related fauna) guide my nieces and nephew through the course. Given that it is Thanksgiving, I wanted to include a turkey munching on pie and sipping wine, but the closest I can come is \documentclass{article} \usepackage{tikzlings} \begin{document} \begin{tikzpicture} \chicken[cake=orange!50!brown,wine] \end{tikzpicture} \end{document} and that just doesn't have the same ring to it. I found a good wild turkey drawn in MetaPost (Draw a turkey, a pumpkin pie, or any other object traditionally associated with Thanksgiving), but since the holiday is only two days away, I thought I'd see whether anyone was interested in making a picture of Meleagris gallopavo.
- Using TikZ with a command only defined on second passby Jason on November 25, 2025 at 3:39 pm
I have a number of commands that work a lot like the \ref command in that its true typeset value is only defined after an initial pass is performed. In the first pass they typeset ? - like the \ref command, and in the second pass that ? is instead a number or some string. It would be nice if I could use these commands inside a tikzpicture environment as a parameter. Obviously, tikz errors out when it gets the LaTeX command, and even if I can get the command to expand, it still errors due to tikz trying to understand the ? on the first pass - thus breaking the compile before it can build the correct value for a second pass. Is there a way to generically redefine a command (or tikz elements I guess?) so such commands still executes as normal on the first pass (a \ref command waits for a corresponding label to get defined so it has a value, but a generic command may execute some TeX like writing to an external file or change some settings/variables in the compile which it would still need to do on the first pass before it was defined in a way to be used in the tikzpicture env on the second pass), but it doesn't generate an error in tikz in the first pass (or the error is ignored/doesn't stop compile) so that the command gets a chance to be defined for the second pass - then have tikz actually use the command output on the second pass once it is correctly defined? Below is a MWE for what I am looking for, using a \label and \ref combo as a simple version of what I am after, but it would be ideal if it could work on generic commands that expand into arbitrary tikz code. \documentclass{article} \usepackage{tikz} \begin{document} \setcounter{section}{6} \section{Introduction}\label{temp} \ref{temp}% Should display 7 \begin{tikz}% Should display a 7 radius circle \draw circle(\ref{temp}pt); \end{tikz} \setcounter{section}{13} \section{Intro2}\label{temp2} \ref{temp2}% Should display 14 \begin{tikz}% Should display a 14 radius circle \draw circle(\ref{temp}pt); \end{tikz} \end{document} EDIT FOR MORE INFO The primary use case I want to apply this to is the \sage{arg} command, which on the first pass outputs a ? and writes out to an external file. That file is then processed before a second LaTeX pass. On the second pass, the \sage{arg} command grabs the definition of arg from the external file, and then the \sage{arg} command expands as the definition given by the external file. The actual particulars of sage itself aren't really important (I think), it's more that I want to have a normal LaTeX command get run inside a tikz environment, but without stopping the compile because its initial output is just a ?. But the first pass generates something so that on the second pass the command expands into tikZ parseable code, so that in the second pass it will then actually be used in tikzpicture correctly. In particular, I would actually expect any solution for this, to also work for \label and \ref, assuming that \ref is a number or somehow a string that tikz should be able to parse normally.