• Spacing with xlop
    by Martin on January 22, 2026 at 7:41 pm

    When using onehalfspacing from the setspace package, the spacing also applies to the display of calculations from the xlop package. Is it possible to change that so that these calculations are displayed with singlespacing? MWE: \documentclass[a4paper,12pt,ngerman]{article} \usepackage[top=1.5cm]{geometry} \usepackage{setspace} \onehalfspacing \usepackage{xlop} \begin{document} \begin{center} \opdiv[voperator=bottom,voperation=top,displayintermediary=all,decimalsepsymbol={,},shiftdecimalsep=divisor,maxdivstep=2,columnwidth=0.6em,decimalsepwidth=0.3em]{6543}{123} \end{center} \end{document}

  • hyperref + algorithm2e + zref-clever = 🐛: referencing an algorithm and a line in it produces the same type name for both 😢
    by Mark McGregor on January 22, 2026 at 7:11 pm

    We try to reference a line in a shy algorithm and the algorithm itself with zref-clever. Running pdflatex twice on \documentclass{article} \pagestyle{empty} \usepackage{hyperref} \usepackage{algorithm2e} \usepackage{zref-clever} \zcRefTypeSetup{algocf}{ name-sg=Alg.\@, Name-sg=Alg.\@ } \zcRefTypeSetup{AlgoLine}{ Name-sg=line, name-sg=line } \zcRefTypeSetup{algocfline}{ Name-sg=line, name-sg=line } \zcRefTypeSetup{line}{ Name-sg=line, name-sg=line } \begin{document} \begin{algorithm}\LinesNumbered \caption{My great algorithm}\label{algLabel} \KwOut{The oh so great output of my great algorithm} command1\; command2\nllabel{lineLabel}\; command3 \end{algorithm} \zcref[S]{algLabel} contains \zcref{lineLabel}. \end{document} yields As we see, the second type name is “Alg.”, whereas we'd expect “line”. If we comment out hyperref, we get “Alg. 1 contains line 2.” as expected. So far we failed to get different type names for the two references in the presence of hyperref, so you can blame it. At the same time, given that algorithm2e has been unmaintained for about 8½ years and zref-clever for slightly over 1 year, you can blame them, too. Anyway, what is the technical root cause of the failure? Any bugfix, patch, or workaround?

  • Unexpected tabular vertical alignment
    by itobito on January 22, 2026 at 4:52 pm

    I'm having a difficult time understanding the vertical alignment of columns of tables created via tabular. My Code \documentclass{article} \usepackage{array} \begin{document} \begin{tabular}{ | p{2.5cm} | m{2.5cm}| b{2.5cm} | } \hline cell1 dummy text dummy text dummy text& cell2 & cell3 \\ \hline cell4 & cell5 dummy text dummy text dummy text & cell6 \\ \hline cell7 & cell8 & cell9 dummy text dummy text dummy text\\ \hline \end{tabular} \end{document} This example is pretty much taken directly from the Overleaf Tables documentation, with the difference being the varying column alignments. I'd expect the code above to produce Expected table with the text in the first column top-aligned, the text in the second column middle-aligned, and the text in the third column bottom-aligned. However, the code above actually produces Actual table I know it's possible (and easier) with the tabularray package, but I'd like to understand why. Why do my actual table's columns have seemingly incorrect vertical alignments?

  • Weird \text{} interactions while using Mathjax
    by Dhairya Kumar on January 22, 2026 at 4:43 pm

    I came across the error where the 'and' refused to bdge through and make a gap in between the code. Code: $$\overline{AM}=\overline{BN}=a,\overline{BP}=\overline{CQ}=b, \text{and} \overline{CR}=\overline{AS}=c$$ Help me overcome it.

  • Subfigures from a comma list: add left-side A, B, C… labels aligned to the top, outside the images
    by taiwan12 on January 22, 2026 at 3:42 pm

    I previously asked about creating a centered grid of subfigures from a comma-separated list with no gaps, and I received a working expl3 solution (thanks to jps) (The previously asked question can be found below, and the link.). Now I would like to extend this setup with letter labels placed next to each image, not overlaid on the image itself. Input \multipleIMG{<images per row>}{<comma-separated list of image files>}{<main label>}{<main caption>} Desired layout (conceptually): [A] [small gap] image1 [bigger gap] [B] [small gap] image2 [bigger gap] [C] [small gap] image3 More precisely: Each image should have a label A, B, C, … The label should be to the left of the image, not on top of it The label and the image should be top-left-aligned There should be a small horizontal space between the label and its image There should be a larger horizontal space between consecutive (label + image) groups The letters should be generated automatically from the image index The solution should integrate cleanly with the existing expl3 loop and preserve the centered grid layout Example about what I want: Input: \multimg{3} { example-image-duck, example-image-duck, example-image-duck, example-image-duck, example-image-duck } {fig:ducksI} {A happy duck family I} Output: jps answers (without top-left labels) \documentclass{article} \usepackage{graphicx} \usepackage{subcaption} \usepackage[colorlinks=true]{hyperref} \usepackage{float} \ExplSyntaxOn \dim_new:N \l__taiwan_img_width_dim \int_new:N \l__taiwan_img_index_int \cs_new:Npn \__taiwan_img_sublabel:n #1 {} \cs_generate_variant:Nn \__taiwan_img_sublabel:n { V } \NewDocumentCommand \multimg { m m m m } { \begin{figure}[H] \centering \int_zero:N \l__taiwan_img_index_int \dim_set:Nn \l__taiwan_img_width_dim { \linewidth / #1 } \cs_set:Npn \__taiwan_img_sublabel:n ##1 { \phantomcaption \label { #3_##1 } } \clist_map_inline:nn {#2} { \int_incr:N \l__taiwan_img_index_int \begin{subfigure}{\l__taiwan_img_width_dim} \includegraphics [width=\linewidth] {##1} \__taiwan_img_sublabel:V \l__taiwan_img_index_int \end{subfigure} \allowbreak } \caption { #4 \label {#3} } \end{figure} } \ExplSyntaxOff \usepackage{duckuments} % <- or otherwise we'd get the same duck every time \begin{document} \multimg{3} { example-image-duck, example-image-duck, example-image-duck, example-image-duck, example-image-duck } {fig:ducksI} {A happy duck family I} \multimg{5} { example-image-duck, example-image-duck, example-image-duck, example-image-duck, example-image-duck } {fig:ducksII} {A happy duck family II} Just take a look at the happy ducks in figure~\ref{fig:ducksI}. Aren't they majestic? Especially the duckling in figure~\ref{fig:ducksI_3}. \end{document} The previously asked question: I’m trying to define a LaTeX command that creates a figure containing multiple subfigures from a comma-separated list of image names. I’d like a macro with this interface: \multipleIMG{<images per row>}{<comma-separated list of image files>}{<main label>}{<main caption>} Requirements: Use the full available width (\linewidth). No horizontal and vertical gaps between images. Each row should be centered as a whole (even the last row if it’s not full). All images must have the same width (based on <images per row>). Create sublabels automatically as <main label>_1, <main label>_2, … (1, 2, 3, …). I’m using subcaption. I don’t want visible subcaptions, only labels for referencing (\phantomcaption is fine). Example input: \multipleIMG{3}{location-1,location-2,location-3,location-4,location-5}{fig:first}{Five Figure} This should produce 3 images in the first row, then 2 centered images in the second row, all with equal widths, and labels: fig:first_1, fig:first_2, fig:first_3, fig:first_4, fig:first_5 So that I can reference both the main figure and a subfigure like: \ref{fig:first}, \ref{fig:first_1}

  • which configurable text editor for macos
    by praly on January 22, 2026 at 2:49 pm

    For many many years I was using Alpha as configurable text editor for typing Latex in use with MacOS. Unfortunately this software is no more maintained and no more compatible with recent version of MacOS. Any suggestion for another such editor with easy and well documented extension language (Alpha is based on TCL) to be used with TeXShop for typesetting?

  • I need help with the bold command [closed]
    by FOMUM NDE ROLAND on January 22, 2026 at 2:29 pm

    I used the code: \textbf{greatest} in my work, but the word "greatest" is not in bold. What must I do?

  • How to achieve Lua "class" with C++ style constructor and (function) pointers in LuaLaTeX?
    by dsacre on January 22, 2026 at 2:19 pm

    Background Consider the following: One has several LuaLaTeX packages, which provide similar, but case specific functionality. Consequently, they have slightly different internal logic and require access to different external Lua modules. Instead of copying the code each time, making the necessary, minute adjustments and creating hard to maintain code duplication in the process, one wants to write a class-like wrapper. Since Lua has no class functionality built in, but supports meta programming via prototypes, the process is not straight forward. The following code is based upon the Lua documentation. MWE Since for this use case the only required change between "object instances" are function and data references, a C++ like "pointer" approach was used. Furthermore, to keep the code nice and compact, a C++ like "constructor" is implemented. Please note that in this very simplified example, there is only one external Lua logic module and one "database" included. In the actual use case, there are many more, which would justify the implementation efforts for a prototype. % !TeX program = lualatex \documentclass{article} \begin{filecontents*}{module.lua} -- DESCRIPTION: Provide database functionality function m_addData(a_database, a_key, a_data) a_database[a_key] = a_data end return { addDataModule = m_addData } \end{filecontents*} \begin{filecontents*}{class.lua} -- DESCRIPTION: Provide wrapper to re-use logic Class = {} -- DESCRIPTION: Function to add a new "object" instance function Class:new(o) o = o or {} setmetatable(o, self) self.__index = self -- DESCRIPTION: Loading of data specified -- by "constructor" into "object" self.database = o.database self.logic = o.logic return o end -- DESCRIPTION: Wrapper for database interaction function Class:addDataWrapper(a_key, a_data) self.logic.addDataModule( self.database, a_key, a_data ) end \end{filecontents*} \begin{document} Program execution \directlua{ % DESCRIPTION: Loading of Lua files require("./class") myModule = require("./module") % DESCRIPTION: Create the data structures myDatabase = {} myWrapper = Class:new{ database = myDatabase, logic = myModule } % DESCRIPTION: Call addData function directly from module % STATUS: WORKING myModule.addDataModule(myDatabase, "directly from module", "works") texio.write_nl("Database Entry: key = 'directly from module', value = '" .. myDatabase["directly from module"] .. "'") % DESCRIPTION: Call addData function from wrapper data path % STATUS: WORKING myWrapper.logic.addDataModule(myDatabase, "from wrapper data path", "works") texio.write_nl("Database Entry: key = 'from wrapper data path', value = '" .. myDatabase["from wrapper data path"] .. "'") % DESCRIPTION: Call addData function from wrapper data path % STATUS: FAILS myWrapper.addDataWrapper("directly from wrapper", "fails") } \end{document} Output Somehow the "pointers" are initialized, but not accessible directly via the wrapper. Database Entry: key = 'directly from module', value = 'works' Database Entry: key = 'from wrapper data path', value = 'works'./class.lua:20: attempt to index a nil value (field 'logic') stack traceback: ./class.lua:20: in field 'addDataWrapper' [\directlua]:1: in main chunk. l.69 } What was tried so far and did not work Separate initialization function Packing the external data passed in via the constructor as a meta table via setmetatable Different style of object initialization (see this article on the Lua users forum) Class = {} Class.__index = Class function Class:new(a_object) local tmp_class = {} setmetatable(tmp_class, Class) tmp_class.database = a_object.database tmp_class.logic = a_object.logic return tmp_class end Using inheritance like suggested in the Lua Manual to create a new prototype with all the required data, hoping that the references might be valid at the time the "member" functions of the new prototype would be created -- Example from the Lua Manual -- SOURCE: https://www.lua.org/pil/16.2.html Account = {balance = 0} function Account:new (o) o = o or {} setmetatable(o, self) self.__index = self return o end SpecialAccount = Account:new() function SpecialAccount:withdraw (v) if v - self.balance >= self:getLimit() then error"insufficient funds" end self.balance = self.balance - v end function SpecialAccount:getLimit () return self.limit or 0 end s = SpecialAccount:new{limit=1000.00} Question Is there a way to achieve this goal of C++ style data/function pointers in Lua in general and in the LuaLaTeX specific case with the following restrictions: Lua Version 5.3 No external libraries or libraries that have to be included in the LuaLaTeX package

  • Speeding up compilation for the most complete Karnaugh maps package
    by Signor Pizza on January 22, 2026 at 12:59 pm

    I found this to be the most complete package, which is why I insist on using it. I compiled all available LaTeX packages from source last month so I'm also confident I have everything up to date and working. In the docs it recommends this program to produce .tex files: I definitely got a file to succeed, but it really did take very long (probably at least 10 minutes), and I noticed only 1 of my 8 CPU cores was being used. Does that mean I have to divide the file up, so at least every CPU core works on one piece? I heard LaTeX doesn't support multi-core operation. For reference, here is a .tex file I have just generated. This is where it typically gets stuck on in the CLI: yalihupokn@zoqu-endiman:~/Downloads$ latex fine.tex This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025) (preloaded format=latex) restricted \write18 enabled. entering extended mode (./fine.tex LaTeX2e <2025-11-01> L3 programming layer <2025-12-29> (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/base/article.cl s Document Class: article 2025/01/22 v1.4n Standard LaTeX document class (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/base/size10.clo )) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/lm/lmodern.sty) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/base/fontenc.st y (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/lm/t1lmr.fd)) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/base/inputenc.s ty) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/amsmath/amsmath .sty For additional information on amsmath, use the `?' option. (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/amsmath/amstext .sty (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/amsmath/amsgen. sty)) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/amsmath/amsbsy. sty) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/amsmath/amsopn. sty)) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/xcolor/xcolor.s ty (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/graphics-cfg/co lor.cfg) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/graphics-def/dv ips.def) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/graphics/mathco lor.ltx)) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/colortbl/colort bl.sty (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/tools/array.sty )) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/pgf/frontendlay er/tikz.sty (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/pgf/basiclayer/ pgf.sty (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/pgf/utilities/p gfrcs.sty (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/utilities /pgfutil-common.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/utilities /pgfutil-latex.def) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/utilities /pgfrcs.code.tex (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/pgf.revis ion.tex))) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/pgf/basiclayer/ pgfcore.sty (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/graphics/graphi cx.sty (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/graphics/keyval .sty) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/graphics/graphi cs.sty (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/graphics/trig.s ty) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/graphics-cfg/gr aphics.cfg))) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/pgf/systemlayer /pgfsys.sty (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/systemlay er/pgfsys.code.tex (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/utilities /pgfkeys.code.tex (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/utilities /pgfkeyslibraryfiltered.code.tex)) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/systemlay er/pgf.cfg) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/systemlay er/pgfsys-dvips.def (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/systemlay er/pgfsys-common-postscript.def))) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/systemlay er/pgfsyssoftpath.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/systemlay er/pgfsysprotocol.code.tex)) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/basiclaye r/pgfcore.code.tex (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/math/pgfm ath.code.tex (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/math/pgfm athutil.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/math/pgfm athparser.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/math/pgfm athfunctions.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/math/pgfm athfunctions.basic.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/math/pgfm athfunctions.trigonometric.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/math/pgfm athfunctions.random.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/math/pgfm athfunctions.comparison.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/math/pgfm athfunctions.base.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/math/pgfm athfunctions.round.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/math/pgfm athfunctions.misc.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/math/pgfm athfunctions.integerarithmetics.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/math/pgfm athcalc.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/math/pgfm athfloat.code.tex)) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/math/pgfi nt.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/basiclaye r/pgfcorepoints.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/basiclaye r/pgfcorepathconstruct.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/basiclaye r/pgfcorepathusage.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/basiclaye r/pgfcorescopes.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/basiclaye r/pgfcoregraphicstate.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/basiclaye r/pgfcoretransformations.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/basiclaye r/pgfcorequick.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/basiclaye r/pgfcoreobjects.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/basiclaye r/pgfcorepathprocessing.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/basiclaye r/pgfcorearrows.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/basiclaye r/pgfcoreshade.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/basiclaye r/pgfcoreimage.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/basiclaye r/pgfcoreexternal.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/basiclaye r/pgfcorelayers.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/basiclaye r/pgfcoretransparency.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/basiclaye r/pgfcorepatterns.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/basiclaye r/pgfcorerdf.code.tex))) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/modules/p gfmoduleshapes.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/modules/p gfmoduleplot.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/pgf/compatibili ty/pgfcomp-version-0-65.sty) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/pgf/compatibili ty/pgfcomp-version-1-18.sty)) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/pgf/utilities/p gffor.sty (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/pgf/utilities/p gfkeys.sty (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/utilities /pgfkeys.code.tex)) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/pgf/math/pgfmat h.sty (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/math/pgfm ath.code.tex)) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/utilities /pgffor.code.tex)) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/frontendl ayer/tikz/tikz.code.tex (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/libraries /pgflibraryplothandlers.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/modules/p gfmodulematrix.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/frontendl ayer/tikz/libraries/tikzlibrarytopaths.code.tex))) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/tikz-karnaugh/t ikzlibrarykarnaugh.code.tex Macros for typesetting Karnaugh maps Version 1.5 of 15 February 2022 by Luis Paulo Laus, laus@utfpr.edu.br ) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/tikz-ladder/tik zlibrarycircuits.plc.ladder.code.tex (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/frontendl ayer/tikz/libraries/circuits/tikzlibrarycircuits.code.tex (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/frontendl ayer/tikz/libraries/tikzlibrarycalc.code.tex) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/frontendl ayer/tikz/libraries/tikzlibrarydecorations.markings.code.tex (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/frontendl ayer/tikz/libraries/tikzlibrarydecorations.code.tex (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/modules/p gfmoduledecorations.code.tex)) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/libraries /decorations/pgflibrarydecorations.markings.code.tex)))) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/l3backend/l3bac kend-dvips.def) LaTeX Warning: Unused global option(s): [british]. (./fine.aux) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/lm/ot1lmr.fd) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/lm/omllmm.fd) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/lm/omslmsy.fd) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/latex/lm/omxlmex.fd) [1] There's also some extra info in the log file: yalihupokn@zoqu-endiman:/tmp/tmp.nsHFUeQUSU$ tail -f fine.log File: pgfcoreshade.code.tex 2025-08-29 v3.1.11a (3.1.11a) \pgf@max=\dimen198 \pgf@sys@shading@range@num=\count307 \pgf@shadingcount=\count308 ) (/home/yalihupokn/install-tl-20260102/2025/texmf-dist/tex/generic/pgf/basiclaye r/pgfcoreimage.code.tex File: pgfcoreimage.code.tex 2025-08-29 v3.1.11a (3.1.11a) ) (/home/yalihupokn/install-tl-2 This is what I see when I try to stop it: [1]^C ! Interruption. <argument> ...node [right] at (4.1,2) {\ifnum \mm =1 $A = {\color {blue}X\,\... l.92 } ? ^C^C^C^C^C^C^C^C^C^H^H^C^C^C^C^C^C

  • latex-lab-footnotes.ltx's hook seems to break my class
    by Matthias on January 22, 2026 at 10:09 am

    Since my last update of the Latex packages (Mac TeX), a class I developed, which had been working fine until then, is broken. At the line \begin{document} I get the error ! Undefined control sequence. <argument> \ERROR \cs_set_eq:NN \__fnote_tmp:w \exp_stop_f: l.9 \begin{document} Because of the error's place, the culprit should be a hook. Searching for the code, I found the sequence in latex-lab-footnotes.ltx. At this point, I'm lost. I've no idea how to debug a kernel hook and I'm would be thankful for any hint. ==EDIT== I was asked for a MWE. Regarding the actual document, this is easy but kind of not very helpful: \DocumentMetadata{pdfversion=1.7,lang=de-DE} \documentclass{osgbeamer} \begin{document} \chapter{Foo} \end{document} On the other hand, osgbeamer is a not so small class with quite a number of packages, but none of them deals explicitly with footnotes. To make a MWE example here is (without a hint what I should look for) very hard.

  • Keep columns layout in the article version of a beamer presentation
    by Tobard on January 22, 2026 at 9:43 am

    I use the beamerarticle package to generate both presentation frames and article notes. Everything goes well except I lose a lot of space in the article layout because the column formatting is not preserved. Here is my Article.tex file: % Article.tex \documentclass[a4paper]{article} \usepackage{beamerarticle} \input{content} Here is my Presentation.tex file: % Presentation.tex \documentclass[ignorenonframetext]{beamer} \input{content} And here is my content.tex file: % INITIAL content.tex \usepackage{tikz} \begin{document} \begin{frame}%<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< \frametitle{Test frame with columns}\small \begin{columns} \column<+->[t]{.3\textwidth} This is the content of the first column. \tikz{\draw (0,0) rectangle (3,2)node[midway]{1};} \column<+->[t]{.3\textwidth} This is the content of the second column. \tikz{\draw (0,0) rectangle (3,2)node[midway]{2};} \end{columns} \end{frame}%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> \end{document} And here are the results of both documents : Then I tried to modify the columns environment in the preamble of content.tex, but it works only if I redefine the columns with \begin{columns}{.3\textwidth} and \end{columns} rather than the simple and convenient \column{.3\textwidth} macro: % NEW content.tex \usepackage{tikz} \mode<article>{ \renewenvironment<>{columns}[1][]{}{} \renewenvironment<>{column}[2][]% {\begin{minipage}[t]{#2}}% {\end{minipage}\hfill} } \begin{document} \begin{frame}%<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< \frametitle{Test frame with columns}\small \begin{columns} % \column<+->[t]{.3\textwidth} \begin{column}<+->[t]{.3\textwidth} This is the content of the first column. \tikz{\draw (0,0) rectangle (3,2)node[midway]{1};} \end{column} % \column<+->[t]{.3\textwidth} \begin{column}<+->[t]{.3\textwidth} This is the content of the second column. \tikz{\draw (0,0) rectangle (3,2)node[midway]{2};} \end{column} \end{columns} \end{frame}%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> \end{document} What are the proper set of commands to use to preserve column behavior in article mode while using the \column{} macro ? Thank you for your help!

  • When lemmas share the same counter as theorems, how to print “Lemma” in references produced by zcref-clever?
    by Mark McGregor on January 22, 2026 at 9:35 am

    When cleveref died, we switched to zref-clever, but its \zcref refers to lemmas as theorems when we use the same counter. Namely, running pdflatex on \documentclass{article} \pagestyle{empty} \usepackage{zref-clever} \newtheorem{thm}{Theorem}[section] \newtheorem{lem}[thm]{Lemma} \zcRefTypeSetup{lem}{ name-sg=Lem. } \zcRefTypeSetup{thm}{ name-sg=Thm. } \begin{document} \section{My great section} \begin{lem}\label{lem}My great lemma.\end{lem} \begin{thm}\label{thm}My great theorem.\end{thm} According to \zcref{lem} \ldots \end{document} produces “According to Thm. 1.1 ...”: Above, we expected According to Lem. 1.1 ... though. Who is the culprit and what to do?

  • Latex docclass apa7 using package changes fails with lettered list
    by BenJ on January 22, 2026 at 9:23 am

    When is use the the track change command added like below \documentclass[man, donotrepeattitle, floatsintext, 12pt, a4paper]{apa7} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[american]{babel} \usepackage{csquotes} \usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex} \usepackage{graphicx} \usepackage{color,soul} \usepackage{array, longtable} \usepackage{enumitem} \usepackage{makecell} \usepackage[american]{varioref} \usepackage{lipsum} \usepackage[todonotes={textsize=tiny}, draft, defaultcolor=blue]{changes} % track changed draft vs final \definechangesauthor[name=bmmj]{bj} \begin{document} \maketitle \added{\begin{seriate} \item some text \end{seriate}} \end{document} no output is generated. Is there a work around? Error message see below. I have more error with change commando e.g. in headers but i avoid using change command there. ! Incomplete \iffalse; all text was ignoreer after line 86.

  • Why does adjusting interline spacing within the TOC lose the page number from \setuphead in my example?
    by Gary on January 22, 2026 at 6:27 am

    In this example, I'd like to adjust the spacing between list items in the TOC. I tried to follow the suggestion at https://wiki.contextgarden.net/Document_structure_and_headlines/Table_of_contents under the heading of Adjusting spacing between lines in ToC. Thus, I tried \start \setupinterlinespace[2.0ex] \completecontent[criterium=all] \stop but this removes the page number from the bottom of the page. What am I doing wrong? I was expecting \start and \stop to limit the change in interline spacing to within their boundaries but not alter/lose that which was already defined outside their boundaries. The example has the lines commented out. Thank you. Commented: Uncommented: \setuppapersize[A7, portrait] \setuppagenumbering[alternative=doublesided,location=] \starttext \startfrontmatter \definepagebreak [ChapterPageBreak] [yes] \setuphead [chapter][ page=ChapterPageBreak, header=empty, footer=chapter, before={\blank[2cm,force]}, after={\blank[1ex]} ] \definetext[chapter][footer][pagenumber] % \start % \setupinterlinespace[2.0ex] \completecontent[criterium=all] % \stop \startchapter [ title=\midaligned{Preface.}, list={Preface}, reference={}, marking={Preface.}, ] Some preface text page 1. \stopchapter \startchapter [ title=\midaligned{Important Dates.}, list={Important Dates}, reference={}, marking={Important Dates.}, ] A table of important dates. \stopchapter \stopfrontmatter \startbodymatter[page=right] \writebetweenlist[chapter]{\blank[4ex]\leftaligned{\smallcaps{Chapter}}} \definepagebreak [ChapterPageBreak] [yes] \setuphead [chapter][ page=ChapterPageBreak, header=empty, footer=chapter, before={\blank[2cm,force]}, after={\blank[1ex]} ] \definetext[chapter][footer][pagenumber] \startchapter [ title={First Chapter of Body.}, list={First of Body}, reference={}, marking={First Chapter of Body}, ] Opening paragraph. \stopchapter \startchapter [ title={Second Chapter of Body.}, list={Second of Body}, reference={}, marking={Second Chapter of Body}, ] Opening paragraph. \stopchapter \stopbodymatter \stoptext

  • Page breaks between consecutive instances of \startstandardmakeup
    by Gary on January 21, 2026 at 10:18 pm

    I'm having trouble understanding pagebreaks using \startstandardmakeup, which I'm attempting for front matter pages that preceed the TOC. If I use two of them immediately consecutive, the first with option doublesided=empty and the second with doublesided=no, then the first is a right-hand page with an empty back, and the second is a single page leaving the rest of the content (here the TOC) to start on the page that immediately follows (a left-hand page). But, if I use three of them consecutively, by uncommenting the block that has the copyright example, the left-hand page following the second \startstandardmakeup is empty again, eventhough it is still a doublesided=no. I was expecting the third \startstandardmakeup block to be on the back page of the second block that preceeded it, just like the TOC was. Would you please tell me what I'm doing wrong, here? Thank you. Also, on https://wiki.contextgarden.net/Command/_startmakeup there are four instances of \startmakeupmakeup listed \startstandardmakeup ... \stopstandardmakeup \startpagemakeup ... \stoppagemakeup \starttextmakeup ... \stoptextmakeup \startmiddlemakeup ... \stopmiddlemakeup Does anyone know where they are defined to understand the differences? Thank you. \setuppapersize[A7, portrait] \setuppagenumbering[alternative=doublesided,location=] \starttext \startfrontmatter \setupuserpagenumber[numberconversion=romannumerals] \startstandardmakeup[doublesided=empty,pagestate=start] \startalignment[middle] Title\\ Author \stopalignment \stopstandardmakeup \startstandardmakeup[doublesided=no,pagestate=start] \startalignment[middle] Title Page\\ Added Title Pages Lines \stopalignment \stopstandardmakeup % \startstandardmakeup[doublesided=no,pagestate=start] % \startalignment[middle] % Copyright\\ % Publisher\\ % Etc. etc. % \stopalignment % \stopstandardmakeup \definepagebreak [ChapterPageBreak] [yes] \setuphead [chapter][ page=ChapterPageBreak, header=empty, footer=chapter, before={\blank[2cm,force]}, after={\blank[1ex]} ] \definetext[chapter][footer][pagenumber] \completecontent[criterium=all] \startchapter [ title=\midaligned{Preface.}, list={Preface}, reference={}, marking={Preface.}, ] Some preface text page 1. \page Some preface text page 2. \stopchapter \startchapter [ title=\midaligned{Important Dates.}, list={Important Dates}, reference={}, marking={Important Dates.}, ] A table of important dates. \stopchapter \stopfrontmatter \startbodymatter[page=right] \definepagebreak [ChapterPageBreak] [yes] \setuphead [chapter][ page=ChapterPageBreak, header=empty, footer=chapter, before={\blank[2cm,force]}, after={\blank[1ex]} ] \definetext[chapter][footer][pagenumber] \startchapter [ title={First Chapter of Body.}, list={First of Body}, reference={}, marking={First Chapter of Body}, ] Opening paragraph. \stopchapter \stopbodymatter \stoptext With third block commented the TOC immediately follows the second block: With third block uncommented, there is a blank page. Why isn't the copyright where the TOC used to be? ADDED Not sure if this is the correct approach, but it appears that there is an option for this called page=no. To get the third block to start immediately after the single page of the second, added this to the third option not the second (as first expected). Thanks. \startstandardmakeup[doublesided=no,pagestate=start,page=no] \startalignment[middle] Copyright\\ Publisher\\ Etc. etc. \stopalignment \stopstandardmakeup

  • How to top-align a TikZ image node with a text node in Beamer
    by Marco Moldenhauer on January 21, 2026 at 9:41 pm

    I am using TikZ in a Beamer slide to create a two-column layout: the left column contains a justified text block the right column contains an image inside a framed node Both nodes should be top-aligned, so that the top of the image frame aligns exactly with the top of the text block. However, my current code aligns the image relative to the center or east anchor of the text node, which causes a vertical misalignment when the text height changes. I would like the image frame to be aligned with the top edge of the text block, regardless of the text height. Question How can I position the image node so that its top edge is aligned with the top edge of the text node, independent of the text height? Which anchors or positioning keys should be used in TikZ to achieve reliable top alignment in this situation? My Code % !TeX TS-program = lualatex \documentclass{beamer} \usetheme[progressbar=frametitle]{moloch} \usepackage{tikz} \usetikzlibrary{positioning} \usepackage{lipsum} \begin{document} \begin{frame}{Your Title} \begin{tikzpicture}[ TEXTBLOCK/.style={ rectangle, draw=blue!50, fill=blue!20, thick, text width=0.45\textwidth, align=justify, inner sep=0mm }, IMAGEFRAME/.style={ rectangle, draw=blue!50, thick, inner sep=3mm, text width=0.45\textwidth, align=center } ] % --- Text block --- \node[TEXTBLOCK, anchor=north west] (TB1) at (0,0){\lipsum[1][1-6]}; % --- Image frame --- \node[IMAGEFRAME, anchor=north west, inner sep=0mm, right=6mm of TB1.east] (IMG1) {\includegraphics[width=\linewidth]{example-image}}; \end{tikzpicture} \end{frame} \end{document} My Output Desired Output

  • Plotting a rational function in tikz
    by mf67 on January 21, 2026 at 9:17 pm

    I'm trying to plot a rational function, but I constantly get dimensions too large, even if the plot frame is within the page and the function is within limits. \documentclass{book} \usepackage{pgf,tikz,pgfplots} \pgfplotsset{compat=1.15} \begin{document} \begin{tikzpicture}[declare function={r(\x)=(-\x*\x*\x*\x+600*\x*\x*\x-135000*\x*\x+10125000*\x)/(2109375*(30000-200*\x));}] \begin{axis}[ x=0.05cm,y=1cm, xmin=0, xmax=160, ymin=0, ymax=1, xlabel={\(x\)}, ylabel={\(y\)} ] \draw[domain=0:160,smooth,samples=100] plot ({\x},{r(\x)}); \end{axis} \end{tikzpicture} \end{document} What could be wrong? TIA. This is how the graph looks in Mathematica

  • Include a pdf image 4"x4" on book front cover using \bookcovercomponent
    by josh on January 21, 2026 at 7:15 pm

    I am designing a book cover using bookcover documentclass and would like to add a 4"x4" pdf graphics file in the center of the cover. The cover format is: Title at top, Edition, the graphics image, author name. I've tried using tikzpicture to insert the pdf (lines commented below) but receive lots of error messages was wondering if someone could help me? Here is my code so far: \documentclass[12pt, coverwidth=9.444in, coverheight=12.5in, bleedwidth=17mm, foldingmargin=false, markthick=0.0pt, marklength=7mm,% Markierungen: for printing: set to 0mm spinewidth=20mm, %pagecolor=Beige, trimmed=false% trimmed=false for printing ]{bookcover} \usepackage[cmintegrals,cmbraces]{newtxmath} \usepackage{ebgaramond-maths} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{bbding} \usepackage[x11names,dvipsnames,svgnames]{xcolor} \usepackage[ngerman]{babel} % \usepackage{tikz} % It is loaded by bookcover % \usepackage{calc} % It is loaded by bookcover \usepackage{microtype} \setlength{\marklength}{0pt} \geometry{% paperwidth=\coverwidth, paperheight=\coverheight, left=-\bleedwidth-\coverwidth-\spinewidth, top=-\bleedwidth, } \begin{document} \begin{bookcover} \bookcovercomponent{color}{bg whole}{ % Use "bg whole" instead of "whole page" top color=LightBlue, bottom color=LightBlue} % % Title % \bookcovercomponent{normal}{front}[55mm,10mm,10mm,30mm]{ {\fontsize{48}{48}\selectfont \bfseries This is the title of } } \bookcovercomponent{normal}{front}[55mm,10mm,10mm,50mm]{ {\fontsize{48}{48}\selectfont \bfseries the book on multiple } } \bookcovercomponent{normal}{front}[55mm,10mm,10mm,70mm]{ {\fontsize{48}{48}\selectfont \bfseries lines } } % % Edition % \bookcovercomponent{normal}{front}[100mm,10mm,10mm,90mm]{ {\fontsize{30}{30}\selectfont \bfseries First Edition } } % % place 4"x4" graphics image here % %\bookcovercomponent{normal}{front}{ % \begin{tikzpicture} % % Center of the panel is (\width/2, \height/2) % \node[anchor=center] at ({\width/2},{\height/2}) { % \includegraphics[width=0.8\width]{aBookFrontCoverGraphics.pdf} % }; % \end{tikzpicture} %} % % Author's name % \bookcovercomponent{normal}{front}[100mm,10mm,10mm,280mm]{ {\fontsize{24}{24}\selectfont \bfseries Author's Name } } % % spine % \bookcovercomponent{normal}{spine}[2mm,2mm,2mm,2mm]{% \vspace*{30mm}\centering\rotatebox{90}{\huge\textcolor{NavyBlue}{Authors Name} \qquad Title}} % % back cover % \bookcovercomponent{normal}{back}[15mm,10mm,15mm,10mm]{Some back cover text...} \end{bookcover} \end{document}

  • How can I programmatically generate complex TikZ graphs using symbolic algebraic shorthand?
    by gete on January 21, 2026 at 6:18 pm

    I often need to create large-scale, publication-quality graphs (e.g., K-ary trees, neural network layers, or dense star graphs) for my documents. Writing hundreds of lines of \node and \draw commands manually is error-prone and time-consuming. While tikz-network and forest are excellent, they still require significant manual entry for non-standard generative structures. I am looking for a way to generate these structures using symbolic expressions such as X1+X2+...+ Xn and export them directly to TikZ code for LaTeX of Overleaf documents.

  • Long division with xlop and spacing
    by Martin on January 21, 2026 at 5:19 pm

    Here is a code to produce a display for long division using the xlop package. This looks nice, but when using this code together with \onehalfspacing (from the setspace package) or while specifying a top margin with the geometry package (such as \usepackage[top=1.5cm]{geometry}), the division gets shown offset (even more, if both \usepackage[top=1.5cm]{geometry} and \onehalfspacing are used. How can the code be changed to get rid of this offset? I was thinking of locally changing the spacing and top margin only within the code, but do not know how to do that. MWE: \documentclass[a4paper,12pt,ngerman]{article} \usepackage[top=1.5cm]{geometry} \usepackage{setspace} \onehalfspacing \usepackage{tikz} \usepackage{xlop} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand\tikzmark[1]{% \tikz[remember picture,overlay] \node[inner xsep=0pt,outer sep=0pt,anchor=base,yshift=0.5ex] (#1) {};} \makeatletter \def\op@divdisplayone{% \begingroup \op@count@z=\z@\relax \op@count@i=\OP@a@w \loop \ifnum\@nameuse{OP@a@\the\op@count@i}=0 \advance\op@count@i by-1 \advance\op@count@z by1 \repeat \op@count@i=\op@firstlength \advance\op@count@i by\op@count@z \xdef\op@firstlength{\the\op@count@i}% \setbox2=\vbox{% \op@count@i=\op@firstlength \advance\op@count@i by1 \hbox{% \ifx\op@displayintermediary\op@string@none\else % add 0.25 \ifx\op@displayintermediary\op@string@None\else % end add 0.25 \kern\opcolumnwidth \advance\op@count@i by1 % add 0.25 \fi % end add 0.25 \fi \ifop@dividendbridge \vrule width0pt depth0pt height\oplineheight \opvline(0,1){0.4}% \ophline(0,1){\op@firstlength}% \opvline(\op@firstlength,1){0.4}% \fi \op@display{operandstyle.1}{a}\tikzmark{a}% \ifnum\op@shift=0\relax\else \op@count@v=\op@shift \advance\op@count@v by\OP@a@d \oplput(-\the\op@count@v,0){\op@strikedecimalsepsymbol}% \fi }% \op@count@z=\OP@q@w \op@count@ii=1\relax \ifx\op@displayintermediary\op@string@none \advance\op@count@i by-1\relax % add 0.25 \else\ifx\op@displayintermediary\op@string@None \advance\op@count@i by-1\relax % end add 0.25 \else \op@count@iv=\@nameuse{OP@q@\the\op@count@z}\relax \op@count@iii=\op@count@i \advance\op@count@iii by-\@nameuse{OP@T\the\op@count@iv @w}% \hbox{% \ifx\op@voperator\op@string@center \oplput(0,0.5){\op@subsymbol}% \else\ifx\op@voperator\op@string@top \oplput(0,1){\op@subsymbol}% \else \oplput(0,0){\op@subsymbol}% \fi\fi \ophline(1,-0.25){\op@firstlength}% \advance\op@count@ii by1 \kern\op@count@iii\opcolumnwidth \op@display{intermediarystyle.1}% {T\the\op@count@iv}% }% % modif 0.25 \fi\fi % end modif 0.25 {\global\setbox4=\hbox{}\setbox4=\box4}% \loop \advance\op@count@z by-1 \advance\op@count@i by1\relax \ifnum\op@count@z>0\relax \op@count@iv=\@nameuse{OP@q@\the\op@count@z}\relax \ifnum\op@count@iv=0 \ifx\op@displayintermediary\op@string@all \op@count@v=\op@count@i \advance\op@count@v by-\@nameuse{OP@R\the\op@count@ii @w}% \hbox{% \kern\op@count@v\opcolumnwidth \op@display{remainderstyle.\the\op@count@ii}% {R\the\op@count@ii}% }% \op@count@iii=\op@count@i \advance\op@count@iii by-\@nameuse{OP@T\the\op@count@iv @w}% \hbox{% \kern\op@count@v\opcolumnwidth \ifx\op@voperator\op@string@center \oplput(-1,0.5){\op@subsymbol}% \else\ifx\op@voperator\op@string@top \oplput(-1,1){\op@subsymbol}% \else \oplput(-1,0){\op@subsymbol}% \fi\fi \ophline(0,-0.25){\@nameuse{OP@R\the\op@count@ii @w}}% \kern-\op@count@v\opcolumnwidth \kern\op@count@iii\opcolumnwidth \op@display{intermediarystyle.\the\op@count@ii}% {T\the\op@count@iv}% }% \else \ifnum\@nameuse{OP@R\the\op@count@ii @w}=2 \ifnum\@nameuse{OP@R\the\op@count@ii @2}=0 \op@makebox{1}{0}{remainderstyle.\the\op@count@ii.1}{zero}% \setbox4=\hbox to\opcolumnwidth{\hss\box0\hss}% \fi \fi \fi \advance\op@count@ii by1\relax \else \op@count@v=\op@count@i \advance\op@count@v by-\@nameuse{OP@R\the\op@count@ii @w}% \ifvoid4\relax\else \advance\op@count@v by-1 \fi \hbox{% \kern\op@count@v\opcolumnwidth\copy4 \op@display{remainderstyle.\the\op@count@ii}% {R\the\op@count@ii}% }% \advance\op@count@ii by1\relax \ifx\op@displayintermediary\op@string@none % add 0.25 \else\ifx\op@displayintermediary\op@string@None % end add 0.25 \else \op@count@iii=\op@count@i \advance\op@count@iii by-\@nameuse{OP@T\the\op@count@iv @w}% \hbox{% \kern\op@count@v\opcolumnwidth \ifx\op@voperator\op@string@center \oplput(-1,0.5){\op@subsymbol}% \else\ifx\op@voperator\op@string@top \oplput(-1,1){\op@subsymbol}% \else \oplput(-1,0){\op@subsymbol}% \fi\fi \advance\op@count@ii by-1 \ifvoid4\relax \ophline(0,-0.25){\@nameuse{OP@R\the\op@count@ii @w}}% \else \ophline(0,-0.25){\@nameuse{OP@T\the\op@count@iv @w}}% \ophline(\@nameuse{OP@T\the\op@count@iv @w},-0.25){1}% {\setbox4=\box4}% \fi \advance\op@count@ii by1 \kern-\op@count@v\opcolumnwidth \kern\op@count@iii\opcolumnwidth \op@display{intermediarystyle.\the\op@count@ii}% {T\the\op@count@iv}% }% % modif 0.25 \fi\fi % end modif 0.25 \fi \repeat \advance\op@count@i by-1 \op@count@iii=\op@count@i \advance\op@count@iii by-\@nameuse{OP@R\the\op@count@ii @w}% \hbox{% \kern\op@count@iii\opcolumnwidth \op@display{remainderstyle.\the\op@count@ii}% {R\the\op@count@ii}% }% }% \setbox3=\vbox{% \op@count@v=\op@max{\OP@qq@w}{\OP@b@w} \hbox{%\ophline(-0.5,-0.25){\the\op@count@v.5}% :\op@display{operandstyle.2}{b}=\op@display{resultstyle}{qq} %%This seems to be the divisor \ifnum\op@shift=0\relax\else \op@count@v=\op@shift \advance\op@count@v by\OP@b@d \oplput(-\the\op@count@v,0){\op@strikedecimalsepsymbol}% \fi} %\hbox{\op@display{resultstyle}{qq}} %%This seems to be the result }% \dimen0=\ht2 \ifdim\dimen0>\ht3 \ht3=\ht2 \else \ht2=\ht3 \fi \ifx\op@voperation\op@string@top \dimen0=\ht2 \advance\dimen0 by-0.5\oplineheight \ht2=0.75\oplineheight \ht3=0.75\oplineheight \dp2=\dimen0 \dp2=\dimen0 \fi \setbox1=\hbox{% \box2 % \kern0.5\opcolumnwidth % \kern-0.5\op@hrulewidth % \ifx\voperation\op@string@top % \vrule width\op@hrulewidth % \else % \vrule width\op@hrulewidth % \fi % \kern0.5\opcolumnwidth % \kern-0.5\op@hrulewidth \begin{tikzpicture}[remember picture,overlay] \node[anchor=west,inner xsep=0pt] at (a) {\box3}; \end{tikzpicture} }% \ifx\op@voperation\op@string@center \setbox1=\hbox{$\vcenter{\box1}$}% \fi \leavevmode\box1 \endgroup } \makeatother %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{center} \opdiv[voperator=bottom,voperation=top,displayintermediary=all,decimalsepsymbol={,},shiftdecimalsep=divisor,maxdivstep=2,columnwidth=0.6em,decimalsepwidth=0.3em]{6543}{123} \end{center} \end{document} EDIT: The first image shows the output without \usepackage[top=1.5cm]{geometry} and \onehalfspacing, the second image with \usepackage[top=1.5cm]{geometry} and \onehalfspacing. Here the dividend is slightly higher than the divisor.

  • How do I apply some quality control for l3keys and multichoices?
    by lukascbossert on January 21, 2026 at 3:24 pm

    In my keys I have two "special" keys, gender and period. While gender must only have one value of m,f,d, the key period can have any of 1,2,3 (also 1,3 or 2,3 is possible). The order of number doesn’t matter. But it is important that it is one of those numbers, nothing else (besides the ,). For gender I was able to set up such a quality control measure: gender .choices:nn = { m , f , d } {\DTLnewdbentry{person}{gender}{#1}}, gender / unknown .code:n = {\msg_warning:nnnn { person } { invalid-value }{ #1 }{ m,f,d }}, but my attempt to use multichoices:nn fails: period .multichoices:nn = {1,2,3} { \clist_put_right:Nn \l_dfg_person_period_clist { #1 }}, \documentclass{article} \usepackage{datatool} \ExplSyntaxOn \msg_new:nnn { person } { unknown-key } { Key~ '\l_keys_path_str'~ is~ unknown~ and~ being~ ignored.^^J^^J You~passed~the~value~'#1'~ to~ that~ key.^^J Doublecheck~for~spelling~errors.~^^J The~ item~ is~ \msg_line_context: } \msg_new:nnn { person } { invalid-value } { Invalid~value~'#1'~for~key~'\l_keys_path_str'.^^J^^J Allowed~values~are:~'#2'.~^^J The~ item~ is~ \msg_line_context: } \clist_new:N \l_dfg_person_period_clist \keys_define:nn { person } { unknown .code:n = { \msg_warning:nnn { person } { unknown-key } {#1}}, unknown .default:V = \c_novalue_tl, % ---------- id ---------- id .code:n = \DTLnewdbentry{person}{id}{#1}, id .value_required:n = true, % ---------- firstname ---------- firstname .code:n = \DTLnewdbentry{person}{firstname}{#1}, % ---------- lastname ---------- lastname .code:n = \DTLnewdbentry{person}{lastname}{#1}, % ---------- gender ---------- gender .choices:nn = { m , f , d } {\DTLnewdbentry{person}{gender}{#1}}, gender / unknown .code:n = {\msg_warning:nnnn { person } { invalid-value }{ #1 }{ m,f,d }}, gender .value_required:n = true, % ---- period with multiple choices ---- period .initial:n = \clist_clear:N \l_dfg_person_period_clist, period .multichoices:nn = {1,2,3} { \clist_put_right:Nn \l_dfg_person_period_clist { #1 }}, % period / 1 .code:n = { \clist_put_right:Nn \l_dfg_person_period_clist { 1 }}, % period / 2 .code:n = { \clist_put_right:Nn \l_dfg_person_period_clist { 2 }}, % period / 3 .code:n = { \clist_put_right:Nn \l_dfg_person_period_clist { 3 }}, period .code:n = \DTLnewdbentry{person}{period}{ \clist_use:N \l_dfg_person_period_clist}, period / unknown .code:n = {\msg_warning:nnnn { person } { invalid-value }{ #1 }{ 1,2,3 }}, } % ---------------------------------------------------------------- % Interface % ---------------------------------------------------------------- \NewDocumentCommand{\addEntry}{ O{#2} m m } { \DTLifdbexists{#2}{}{ \DTLnewdb{#2} } \DTLnewrow{#2} \keys_set:nn { #1 } { #3 } } \NewDocumentCommand{\getEntry}{o m m O{id}} { \DTLgetvalueforkey{\thevalue}{#3}{#1}{#4}{#2} \DTLifnullorempty{\thevalue}{}{ \thevalue } } \ExplSyntaxOff % ---------------------------------------------------------------- % Test data % ---------------------------------------------------------------- \addEntry{person}{ id = {p1}, firstname = {Alice}, lastname = {Smith}, gender = {m}, period = {1}, } \addEntry{person}{ id = {p2}, firstname = {Bob}, lastname = {Brown}, gender = {m}, period = {2,3}, } % ---------------------------------------------------------------- \begin{document} \section*{Demo of the tiny interface} PI name: \textbf{\getEntry[person]{p1}{lastname}}\\ PI gender: \textbf{\getEntry[person]{p1}{gender}}\\ Periods (p1): \textbf{\getEntry[person]{p1}{period}}\\ Periods (p2): \textbf{\getEntry[person]{p2}{period}} \end{document}

  • Defining tabular column with resuming enumerate
    by user1 on January 21, 2026 at 12:14 pm

    I have a follow up question, to this one. I want to define a column type, which creates a resumed enumerated list over several rows. I do not use [series=table,nosep,leftmargin=*,before=\vspace{-0.5\baselineskip}] in the following code. I got the solution using minipage previously from an other problem. But please feel free to change this. \documentclass{article} \usepackage{enumitem} \usepackage{array} \makeatletter \newcolumntype{e}[1]{% >{\minipage[t]{\linewidth}\let\\\tabularnewline \enumerate %TODO does not work: [resume*] \addtolength{\rightskip}{0pt plus 50pt}% for raggedright \setlength{\itemsep}{-\parsep}}% p{#1}% <{\@finalstrut\@arstrutbox\endenumerate\endminipage}} \makeatother \begin{document} text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text \begin{tabular}{|e{5cm}|p{5cm}|} \hline \multicolumn{1}{|p{5cm}|}{Column 1 Heading } & Column 2 Heading \\ \hline \item Item 1 & no items\\ \hline \item Perhaps this text could go on for a while too & no items 2\\ \hline \end{tabular} text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text \end{document}

  • Typesetting old Arabic manuscripts (without dots)
    by imdk4242 on January 21, 2026 at 11:31 am

    In the study of old Arabic manuscripts, the letter are commonly written without dots below/above different Arabic letter (b/n/t/tha/dhal/etc.). Is it possible to replicate this old writing using arabluatex package or similar? Sample text to be found here (link, Corpus Coranicum) Update #1: A suitable use it to set in arabluatex (ekdosis) to get TEI xml-compliant editions. Sample code: \documentclass{scrartcl} \usepackage{fontspec} \usepackage[english]{babel} \babelfont{rm}{Old Standard} \usepackage[fullvoc]{arabluatex} \SetArbEasy \begin{document} \txarb{ ٮسم ال‍له الرحمں الرحٮم } \arb[novoc]{bismi llAhi l-ra.hmAni l-ra.hImi} \end{document} Output: (The yaa with/without dots is documented as part of the package) A work around(?) could be (mis)using the \newarbmark{} and define seperat old Arabic letters, e.g. as illustrated for the tanwin here: \newarbmark{Y}{^^^^0649}{} \arb{hud\arbcolor[red]{aN\arbnull{_A}}\arbmark{Y}} \arb[trans]{hud\arbcolor[red]{aN\arbnull{_A}}\arbmark{Y}}

  • How to place an extended description of the illustration on the page adjacent to it?
    by forrest on January 21, 2026 at 10:16 am

    I am trying to place a figure (plot) on the right (odd) site and the extended description of this figure on top of left (even) site - the previous one. In other words, I would like to have an option of float placement coexisting with htbp, but rlated to placement on even or odd page, let say l/r. MWE: \documentclass{article} \usepackage{mwe} \begin{document} \blindtext\blindtext \begin{figure}[t] \includegraphics[width=\textwidth,height=.3\textheight]{example-image-a}% \caption{First image description}\label{fig:first} \end{figure} \begin{figure}[p] \includegraphics[width=\textwidth,height=.9\textheight]{example-image-a}% \caption{First image}\label{fig:second} \end{figure} \blindtext\blindtext\blindtext \begin{figure}[t] \includegraphics[width=\textwidth,height=.3\textheight]{example-image-b}% \caption{Second image description}\label{fig:fourth} \end{figure} \begin{figure}[p] \includegraphics[width=\textwidth,height=.9\textheight]{example-image-b}% \caption{Second image}\label{fig:fifth} \end{figure} \blindtext\blindtext\blindtext \end{document} I have found similar questions, but left without answer that can solve my problem: The package afterpage gives no control ability of floats' placement - Placing figure on an even/odd page. Also by execution of @David Carlisle code I have obtained incorrect location of figures - Position two floats on opposing pages. The solution utilizing dpfloat package does not enalbe to place float at the top of the page (together with the document main text on the same page) - How to float until on left (or right) page? I see that the use of afterpage package not only gives not a required result but also changes the order of floats - Placing figure on an even/odd page. The fltpage [EDIT after @cfr comment] hvfloats package would be useful to me if it had options to place a description at the top of the page, and surrounded by a frame (I am using tcolorbox for this purpose). Demonstration how the afterpage package can not solve the problem: \documentclass{article} \usepackage{afterpage} \usepackage{mwe}% for the example only \begin{document} \blindtext\blindtext\blindtext \blindtext\blindtext\blindtext \afterpage{% \clearpage% flush all other floats \ifodd\value{page} %\else% uncomment this else to get odd/even instead of even/odd \expandafter\afterpage% put it on the next page if this one is odd \fi {% \begin{figure}[t] \includegraphics[width=\textwidth,height=.3\textheight]{example-image-a}% \caption{First image}\label{fig:first} \end{figure} \clearpage \begin{figure}[p] \includegraphics[width=\textwidth,height=.9\textheight]{example-image-b}% \caption{Second image}\label{fig:second} \end{figure} \clearpage }% } \blindtext\blindtext\blindtext \begin{figure}[t] \includegraphics[width=\textwidth,height=.3\textheight]{example-image-c}% \caption{Third image}\label{fig:third} \end{figure} \blindtext\blindtext\blindtext \blindtext\blindtext\blindtext \afterpage{% \clearpage% flush all other floats \ifodd\value{page} %\else% uncomment this else to get odd/even instead of even/odd \expandafter\afterpage% put it on the next page if this one is odd \fi {% \begin{figure}[t] \includegraphics[width=\textwidth,height=.3\textheight]{example-image-a}% \caption{Fourth image}\label{fig:fourth} \end{figure} \clearpage \begin{figure}[p] \includegraphics[width=\textwidth,height=.9\textheight]{example-image-b}% \caption{Fifth image}\label{fig:fifth} \end{figure} \clearpage }% } \blindtext\blindtext\blindtext \end{document}

  • Positioning of ellipsis between nodes
    by Mohan Radhakrishnan on January 21, 2026 at 9:46 am

    I am trying to add ellipsis between b4 and bn and also between the 4th and last boxes at the end(child pointers). Hope I have included all libraries so that the MWE doesn't break. This is part of a larger document. The bn doesn't have a background properly. The dots are not there as there is no space between b4 and bn and similarly between the last and previous child pointer boxes. I am using this code design based on some examples as it seems to suit the requirement. \usetikzlibrary{fit,positioning,calc,arrows} \usepackage{pgfplots} \usetikzlibrary{backgrounds} \usetikzlibrary{calc, shapes.geometric} \tikzset{ my/.style={ draw=gray,thick,fill=gray!40,minimum height=1.5cm,minimum width=1.5cm,font={\Huge\bfseries} }, >=latex } \begin{tikzpicture}[font=\sffamily, node distance=0.2cm and 0.2cm] \node[my] (b111) {$b_1$}; \node[my,right=of b111] (b112) {$b_2$}; \node[my,right=of b112] (b113) {$b_3$}; \node[my,right=of b113] (b114) {$b_4$}; \node[draw=none,right=of b114] (ellipsis1) {$\cdots$}; \node[my,right=1cm of b114] (bn) {$b_n$}; \node[my,right= 1cm of bn] (b115) {}; \node[my,right=of b115] (b116) {}; \node[my,right=of b116] (b117) {}; \node[my,right=of b117] (b118) {}; \node[draw=none,right=of b118] (ellipsis1) {$\cdots$}; \node[my,right=1cm of b118] (bn) {}; \begin{pgfonlayer}{background} \node[draw=black,thick,fill=gray!30,fit=(b111)] {}; \node[draw=black,thick,fill=gray!30,fit=(b112)] {}; \node[my,anchor=west] at (0,3) (pk1){Partial Keys\strut}; \node[draw=black,thick,fill=gray!30,fit=(b113)] {}; \node[draw=black,thick,fill=gray!30,fit=(b114)] {}; \node[draw=black,thick,fill=gray!30,fit=(bn)] {}; \node[draw=black,thick,fit=(b115)] {}; \node[draw=black,thick,fit=(b116)] {}; \node[draw=black,thick,fit=(b117)] {}; \node[draw=black,thick,fit=(b118)] {}; \node[draw=black,thick,fit=(bn)] {}; \draw[->, black,thick] (b115) -- ++(0,-3); \draw[->, black,thick] (b116) -- ++(0,-3); \draw[->, black,thick] (b117) -- ++(0,-3); \node[my,anchor=west] at (6,3) {Child Pointers\strut}; \draw[->, black,thick] (b118) -- ++(0,-3); \draw[->, black,thick] (bn) -- ++(0,-3); \end{pgfonlayer} \begin{scope}[xshift=6cm] \begin{pgfonlayer}{background} \end{pgfonlayer} \end{scope} \node [font = {\Huge\bfseries\sffamily}, above right=of pk1] (t1) {Node\_16}; \end{tikzpicture} Update : I managed it like this but it is invisible.

  • tikz, in some cases use of "node contents" doesn't work
    by Zarko on January 21, 2026 at 9:36 am

    I'm curious, why second example in the following MWE doesn't works. Well, I can leave with first example, but anyway ... I'd rather prefer to use the second one. \documentclass[border=3mm, 11pt]{standalone} \usepackage{tikz} %---------------------------------------------------------------% \begin{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{tikzpicture}[ Jvmes/.style args = {#1/#2}{double,double distance=#1, thick,draw=#2}, Npin/.style args = {#1/#2}{minimum size=#1, inner sep=0pt, pin=#2, node contents={} }, ] % first example: works fine \draw[Jvmes=4mm/teal] (0,0) -- node (aux) [Npin=4mm/left:some long one line text] {} (0,2); % second example: gives error "Cannot parse this coordinate." \draw[Jvmes=4mm/teal] (0,0) -- node (aux) [Npin=4mm/left:some text] (0,2); \draw[Jvmes=4mm/teal] (0,0) -- node (aux) [Npin=4mm/left:some text] {} (0,2); \end{tikzpicture} \end{document} Result of the first example is: Addendum: However, if I move inserting of node after drawing a path: \documentclass[border=3mm, 11pt]{standalone} \usepackage{tikz} %---------------------------------------------------------------% \begin{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{tikzpicture}[ Jvmes/.style args = {#1/#2}{double,double distance=#1, thick,draw=#2}, Npin/.style args = {#1/#2}{minimum size=#1, inner sep=0pt, pin=#2, color=blue, node contents={} }, every pin/.add style = {}{blue}, ] \draw[Jvmes=4mm/red] (0,0) -- (0,2) node [Npin=4mm/left:some text, pos=0.5]; \end{tikzpicture} \end{document} than it works as expected: I hope that Henri Menke will extend his comment (which help me understand what is going on at my examples) to an answer.

  • How to change color of equals sign without disturbing alignment?
    by Arya1050 on January 21, 2026 at 8:42 am

    \documentclass{beamer} \begin{document} \begin{frame} \begin{align*} A &= B \\ &\textcolor{blue}{=} C \end{align*} \end{frame} \end{document} I want the last equals sign to be colored blue, but this code disrupts the alignment. It also brings the 'C' closer to the equals sign. How can I fix this? ChatGPT turned out to be of no help. Note: I don't have any particular purpose for doing this. I was just experimenting out of curiosity on my actual slides. Just wanted to see if this problem could be solved in any case.

  • I get the error message: "Unknown message 'caption-code-by-class-deactivated' for module 'tocbasic'"
    by S. Venkataraman on January 21, 2026 at 5:35 am

    I am using Lualatex. I updated my texlive windows version yesterday and I am getting the above error message: ! LaTeX Error: Unknown message 'caption-code-by-class-deactivated' for module (LaTeX) 'tocbasic'. For immediate help type H <return>. ... l.1377 } This is a coding error. LaTeX was asked to display a message called 'caption-code-by-class-deactivated' by the module 'tocbasic': this message does not exist. Try typing <return> to proceed. If that doesn't work, type X <return> to quit. I have so many packages that it will be difficult to check which package is causing the problem. When I click on the error message, it flags this line in tocbasic.sty: \hook_gput_code:nnn { package / caption3 / before } { tocbasic } { \cs_set:Npn \caption@documentclass { standard } \msg_info:nn { tocbasic } { caption-code-by-class-deactivated } } The file compiles completely and I am able to see the output. What could be the problem?

  • Change proportional to tabular numbers of equation counter
    by Luluio on January 20, 2026 at 10:27 pm

    I am using lowercase proportional figures in the main body of documents, causing equation counters to be lowercase proportional figures as well. However, especially with multiple equations on a single page, I believe equation counters could benefit from being tabular. How can I adjust the appearance of numbers in counters without affecting it in the main body? A MWE would be: \documentclass{article} \usepackage{fontspec} \usepackage{mathtools} \setmainfont{STIXTwoText}[ Numbers = {Proportional, OldStyle}, ] \counterwithin{equation}{section} \begin{document} \section{Test} \addtocounter{equation}{9} \begin{align} E &= \gamma m c^2 \\ &= \sqrt{p^2 c^2 + m^2 c^4} \\ \gamma &= \frac{1}{\sqrt{1 - \frac{v^2}{c^2}}} \end{align} \end{document}

  • Drawing a thick arrow with different fill and outline colors
    by aaragon on January 20, 2026 at 11:46 am

    Drawing this type of arrow turned out to be quite complex. I looked at the macro in this post and modified accordingly so that I get the shape I want. However, that macro only prints a single color arrow and it looks painfully difficult to modify to get what I want. Therefore, I thought that I would "emulate" the result by printing two superposed arrows, an original one and one scaled slightly so as to mimic that I have a different border color. This is what I have so far: \documentclass{standalone} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{calc, arrows.meta, bending} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \makeatletter \tikzset{ ararrow/.default={open}{open}, ararrow/.code 2 args={% \tikz@addoption{% \pgfset{tips=true}% draw tips even if the path isn't. \pgfgetpath\currentpath \pgfprocessround{\currentpath}{\currentpath}% \pgf@decorate@parsesoftpath{\currentpath}{\currentpath}% \pgfsetarrowsstart{% Triangle[bend, length=1.*(\pgf@decorate@totalpathlength), width =0.08*(\pgf@decorate@totalpathlength), % <-- added line join=round,#1] } \pgfsetarrowsend{% Stealth[ angle'=60, length=0.22*(\pgf@decorate@totalpathlength), width =0.26*(\pgf@decorate@totalpathlength), line join=round,#2]}% \tikz@mode@drawfalse % disable drawing of path } }, ararrow **/.style={ararrow={}{}}, ararrow oo/.style={ararrow={open}{open}}, ararrow *o/.style={ararrow={}{open}}, ararrow o*/.style={ararrow={open}{}}, } \makeatother \begin{document} \begin{tikzpicture} \coordinate (P) at (0,0); \coordinate (Q) at (1,1); \coordinate (C) at ($(P)!0.5!(Q)$); % outer arrow \draw[blue, ararrow **] (P) to[bend left=45] (Q); % inner arrow: same curve, scaled about C \begin{scope}[ shift={(C)}, scale=0.9, shift={($-1*(C)$)} ] \draw[yellow, ararrow **] (P) to[bend left=45] (Q); \end{scope} \end{tikzpicture} \end{document} which produces the image you see. Ideally, it would be great if the macro can be modified to get what I need so the user can simply type: \draw[draw=blue, fill=yellow, ararrow **] (P) to[bend left=45] (Q);