• Diagonal Arrows Under an Equation
    by Lucy on December 4, 2025 at 10:13 am

    I need to put diagonal arrows under an equation (the red ones in the picture). I tried using \swarrow \qquad \searrow, but they are not positioned where I need them. I would prefer not to use tikzmark. Is there another way to achieve this? Thanks for your help. \documentclass[11pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[czech]{babel} \usepackage[T1]{fontenc} \usepackage{pgfplots} \usepackage{multicol,array,tabularx,xcolor,enumitem} \usepackage{amsmath,amsfonts,amssymb,mathrsfs}} \pagestyle{empty} % % % % \definecolor{modra}{cmyk}{1,0,0,0} %%%%DEFINCIE%%%%%BARVY \definecolor{cerna}{cmyk}{0,0,0,1} \definecolor{bila}{cmyk}{0,0,0,0} % %\color{modra} % \begin{align*} S & = \rho \cdot \dfrac{a + b +c}{2} & S & = \dfrac{a \cdot b}{2} \\ \rho \cdot \dfrac{a + b +c}{2} & = \dfrac{a \cdot b}{2} \qquad | \cdot 2 & & \\ 18 (a +b+ c ) & = a \cdot b & a & = b \\ 18 (a + a + c ) & = a \cdot a & c^2 & = a^2 + b^2 \\ 18 (2a + c ) & = a^2 & c^2 & = a^2 + a^2 = 2a^2 \\ 36 a + 18 c & = a^2 & c & = \sqrt{2a^2} = a \sqrt{2} \\ 36 a + 18 a \sqrt{2} & = a^2 & & \\ a^2 - 36 a - 18 a \sqrt{2} & = 0 & & \\ a \left( a - 36 - 18 \sqrt{2} \right) & = 0 & & \\ \Large \swarrow \qquad \searrow \end{align*} % % \end{document}

  • I would like to discretize the "tiles" into rectangular prismatic groups, sort each group, then sort the groups by each other or be shown a better way
    by Jasper on December 4, 2025 at 7:58 am

    I have built a comparator which can determine the occlusive relationship between two 0--2-dimensioal affine tiles (using their simplicial representations). In English, if I have two tiles (a tile is a point, line segment, or triangle), I can determining which one occludes the other, or if there is no occlusion (the inconclusive case). Currently, this requires an extremely expensive SCC topological sort (quadratic based on the number of tiles). I have the idea that I would like to speed this up, and I have a proposal for doing so (though, I am all ears to alternative ideas too). Basically, my idea is to partition the scene into rectangular prismatic regions (possibly with some overlap), sorting each one individually. Then, each rectangular prismatic region could use a waaay simpler sorting method on the set of rectangular prismatic region, once their constituent parts are sorted. This is my AI generated SCC topological sort routine, which has been working for ages. I am confident in it, based on it having not failed yet. How could I go about implementing this without visual artefacts from tiles which cross the boundary of two or more prisms? Alternatively, what better methods might I consider which I haven't yet? -- occlusion graph + SCC topo sort (bboxes computed on Cartesian coords) local n = #items local bboxes, graph = {}, {} for i = 1, n do bboxes[i] = { get_bbox2(items[i]) }; graph[i] = {} end for i = 1, n - 1 do for j = i + 1, n do if bboxes_overlap2(bboxes[i], bboxes[j]) then local r = cmp(items[i], items[j]) if r == true then table.insert(graph[i], j) elseif r == false then table.insert(graph[j], i) end end end end local index, stack, indices, lowlink, onstack, sccs = 0, {}, {}, {}, {}, {} for i = 1, n do indices[i], lowlink[i] = -1, -1 end local function dfs(v) indices[v], lowlink[v] = index, index; index = index + 1 stack[#stack+1] = v; onstack[v] = true for _, w in ipairs(graph[v]) do if indices[w] == -1 then dfs(w); lowlink[v] = math.min(lowlink[v], lowlink[w]) elseif onstack[w] then lowlink[v] = math.min(lowlink[v], indices[w]) end end if lowlink[v] == indices[v] then local scc = {} while true do local w = table.remove(stack); onstack[w] = false scc[#scc+1] = w if w == v then break end end sccs[#sccs+1] = scc end end for v = 1, n do if indices[v] == -1 then dfs(v) end end local scc_index, scc_graph, indeg = {}, {}, {} for i, comp in ipairs(sccs) do for _, v in ipairs(comp) do scc_index[v] = i end scc_graph[i], indeg[i] = {}, 0 end for v = 1, n do for _, w in ipairs(graph[v]) do local si, sj = scc_index[v], scc_index[w] if si ~= sj then table.insert(scc_graph[si], sj); indeg[sj] = indeg[sj] + 1 end end end local queue, sorted = {}, {} for i = 1, #sccs do if indeg[i] == 0 then queue[#queue+1] = i end end while #queue > 0 do local i = table.remove(queue, 1) for _, v in ipairs(sccs[i]) do sorted[#sorted+1] = items[v] end for _, j in ipairs(scc_graph[i]) do indeg[j] = indeg[j] - 1 if indeg[j] == 0 then queue[#queue+1] = j end end end In fact, I would also like to employ a similar strategy for partitioning, since it is also quadratic, but I think that if I saw it for occlusion, that it would be simple to re-implement for partitioning. This MWE, for example, takes ages to compile, and I believe it should be speed-up-able. This version is currently on TeXLive and MikTeX (and on CTAN), so there is no need to use the GitHub version. \documentclass[tikz,border=1cm]{standalone} \usepackage{lua-tikz3dtools} % https://github.com/Pseudonym321/TikZ-Animations/tree/master1/TikZ/lua-tikz3dtools \begin{document} \begin{luatikztdtoolspicture}[ C1 = { {{-3,-3,0,1}} } ,C2 = { {{3,3,-10,1}} } ,light = { {{0,0,-2,1}} } ] \pgfmathsetmacro{\param}{0} \setobject[ name = {T} ,object = { matrix_multiply( matrix_multiply( euler(pi/2,pi/4+pi/4*sin(\param),5.25*pi/6+\param) ,translate(0,0,-5) ) ,matrix_multiply( { {1,0,0,0} ,{0,1,0,0} ,{0,0,1,0} ,{0,0,0,1} } ,matrix_multiply(xscale(1/2),yscale(1/2)) ) ) } ] \setobject[ name = {I} ,object = { matrix_inverse(T) } ] \appendsurface[ ustart = {-2} ,ustop = {2} ,usamples = {20} ,vstart = {-2} ,vstop = {2} ,vsamples = {20} ,transformation = {T} ,x = {u} ,y = {v} ,z = {u^4 + v^4 - 4*u*v + 1} ,fill options = { preaction = { fill = green ,fill opacity = 0.2 } ,postaction = { draw = blue ,ultra thin ,line join = round } } ,filter = { abs(matrix_multiply(A,I)[1][3])<2.01 and abs(matrix_multiply(B,I)[1][3])<2.01 and abs(matrix_multiply(C,I)[1][3])<2.01 and abs(matrix_multiply(A,I)[1][2])<2.01 and abs(matrix_multiply(B,I)[1][2])<2.01 and abs(matrix_multiply(C,I)[1][2])<2.01 and abs(matrix_multiply(A,I)[1][1])<2.01 and abs(matrix_multiply(B,I)[1][1])<2.01 and abs(matrix_multiply(C,I)[1][1])<2.01 } ] \appendsolid[ ustart = {-2} ,ustop = {2} ,usamples = {2} ,vstart = {-2} ,vstop = {2} ,vsamples = {2} ,wstart = {-2} ,wstop = {2} ,wsamples = {2} ,transformation = {T} ,x = {u} ,y = {v} ,z = {w} ,fill options = { preaction = { fill = none ,fill opacity = 0.5 } ,postaction = { draw = none ,ultra thin ,line join = round ,line cap = round } } ] \appendcurve[ ustart = {0} ,ustop = {4} ,usamples = {2} ,x = {0} ,y = {0} ,z = {u} ,transformation = {T} ,arrow tip = {true} ,draw options = { draw ,ultra thin ,line cap = round } ] \appendlabel[ x = {0} ,y = {0} ,z = {4.3} ,transformation = {T} ,name = {\(z\)} ] \appendcurve[ ustart = {0} ,ustop = {4} ,usamples = {2} ,x = {0} ,y = {u} ,z = {0} ,transformation = {T} ,arrow tip = {true} ,draw options = { draw ,ultra thin ,line cap = round } ] \appendlabel[ x = {0} ,y = {4.3} ,z = {0} ,transformation = {T} ,name = {\(y\)} ] \appendcurve[ ustart = {0} ,ustop = {4} ,usamples = {2} ,x = {u} ,y = {0} ,z = {0} ,transformation = {T} ,arrow tip = {true} ,draw options = { draw ,ultra thin ,line cap = round } ] \appendlabel[ x = {4.3} ,y = {0} ,z = {0} ,transformation = {T} ,name = {\(x\)} ] \foreach \p in {-4,-3,...,4} { \appendcurve[ ustart = {-4} ,ustop = {4} ,usamples = {2} ,x = {u} ,y = {\p} ,z = {0} ,transformation = {T} ,draw options = { draw = black!70!white ,ultra thin ,line cap = round ,densely dashed } ] \appendcurve[ ustart = {-4} ,ustop = {4} ,usamples = {2} ,x = {\p} ,y = {u} ,z = {0} ,transformation = {T} ,draw options = { draw = black!90!white ,ultra thin ,line cap = round ,densely dashed } ] } \appendsurface[ ustart = {-4} ,ustop = {4} ,usamples = {2} ,vstart = {-4} ,vstop = {4} ,vsamples = {2} ,transformation = {T} ,x = {u} ,y = {v} ,z = {0} ,fill options = { preaction = { fill = gray!70!white ,fill opacity = 0.6 } ,postaction = { draw = none ,ultra thin ,line join = round } } ] \end{luatikztdtoolspicture} \end{document}

  • The defined date command doesn't work before \today when invoking babel
    by M. Logic on December 4, 2025 at 4:41 am

    A MWS is as follows. \documentclass{ctexart} \usepackage[main=chinese, provide=*]{babel}% \babelprovide{greek} \babelfont[greek]{rm}[Scale=MatchUppercase, ItalicFont={GFSArtemisiaIt.otf}, BoldFont={GFSArtemisiaBold.otf}, BoldItalicFont={GFSArtemisiaBoldIt.otf}]{GFSArtemisia.otf} \usepackage{datetime}%after babel package \newdateformat{eightdate}{\THEYEAR\twodigit{\THEMONTH}\twodigit{\THEDAY}} \title{测试} \author{佚名} \date{} \begin{document} \maketitle \verb|\today| works fine, i.e., it produces \today. While \verb|\eightdate| doesn't work before \verb|\today|, i.e., \verb|\eightdate\today| also produces \today, but I'd like \verb|\eightdate\today| to produce 20251204. \end{document} \today works fine, i.e., it produces 2025年12月4日. While \eightdate doesn't work before \today, i.e., \eightdate\today also produces 2025年12月4日, but I'd like \eightdate\today to produce 20251204. Then how to make both \today and \eightdate\today work as desired when invoking babel and datetime? Note that \usepackage[main=chinese, provide=*]{babel} is for special use.

  • Why `\raisemath` doesn't work if there exists some barriers to raise the math symbols?
    by Explorer on December 4, 2025 at 4:15 am

    I want to typeset the following formula: Now consider that TWO red boxes are in proper location towards TWO blue boxes \int. With the following code, learning \raisemath from here: \documentclass[a4paper]{article} \usepackage{amsmath} \usepackage{fourier} \usepackage{cmupint} \usepackage{fixdif} \parindent=0pt % \DeclareMathOperator{\myint}{\int\nolimits} \DeclareRobustCommand{\myint}{\int\nolimits} \newcommand{\basicint}{\myint_0^1x \d x} \newcommand{\basicintt}{\myint_{\basicint}^{\basicint} x\d x} % https://tex.stackexchange.com/a/5192/322482 \makeatletter \newcommand{\raisemath}[1]{\mathpalette{\raisem@th{#1}}} \newcommand{\raisem@th}[3]{\raisebox{#1}{$#2#3$}} \makeatother \begin{document} $\basicint$ $\basicintt$ \bigskip $ \displaystyle\myint_{ \textstyle\myint^{0}_{\basicintt} }^{ \textstyle\myint_{1}^{\basicintt} }x\d x $ \bigskip Shift to another direction, it works: $ \displaystyle\myint_{ \textstyle\myint^{0}_{\raisemath{-20pt}{\basicintt}} }^{ \textstyle\myint_{1}^{\raisemath{20pt}{\basicintt}} }x\d x $ However, look like \texttt{1} obstructs \texttt{basicintt}'s shift down, another direction's shift failed. $ \displaystyle\myint_{ \textstyle\myint^{0}_{\raisemath{20pt}{\basicintt}} }^{ \textstyle\myint_{1}^{\raisemath{-20pt}{\basicintt}} }x\d x $ \end{document} How to tune the location of \int here, to better mimic the hand-written image shown above?

  • TexStudio Disable automatic backslash in quick tabular
    by Asigan on December 3, 2025 at 11:46 pm

    In TexStudio, when I used quick tabular and typed maths like $a_n$ (see pictures), it is automatically converted to \begin{tabular}{|c|c|} \hline \$a\_n\$ & \\ \hline & \\ \hline \end{tabular} Could we disable the backslash and let the output be simply $a_n$?

  • Why is stretch glue ignored on pages with top or bottom floats?
    by Bastien on December 3, 2025 at 7:51 pm

    I am experimenting with custom page-building logic by redefining \@texttop and \@textbottom (which determine the behavior of \flushbottom and \raggedbottom), and I need to access the value of \pagestretch once LaTeX has finished assembling the page. In many cases, it work and LaTeX gives me the expected result. However, I discovered that it fails when a page contains a top float and/or a bottom float. In such pages, \pagestretch is always 0pt, even though the page contains at least one occurrence of \textfloatsep, which I set for this test to \textfloatsep = 10pt plus 100pt. Therefore I would expect a total finite stretch of at least 100 pt. The log confirms the issue. For the first page of the following MWE (which contains both a top and a bottom float), we get: ... % t=334.0 g=365.76004 b=10000 p=0 c=100000# % t=382.0 g=365.76004 b=* p=0 c=* Page 1 - page stretch: 0.0pt Page 1 - page shrink: 0.0pt Page 1 - content natural height: 526.66096pt Page 1 - page height: 556.47656pt ... The same MWE also contains h-floats and commands with positive stretch, and these do correctly contribute to \pagestretch. The issue seems specific to pages with top and/or bottom floats. My questions are: Why does \pagestretch remain zero on a page containing both a top and a bottom float? Is LaTeX using some glue other than \textfloatsep in this situation? If so, what glue is being inserted, and why does it contribute no finite stretch to \pagestretch? The MWE: \documentclass{book} \usepackage{lipsum, babel} \usepackage[showframe]{geometry} \def\myrule{\rule{\linewidth}{3cm}} \def\testA{\vspace{10pt plus 100pt} TEST A \vspace{10pt plus 100pt}} \def\testB{\vspace{10pt plus 5pt} TEST B \vspace{10pt plus 5pt}} \setlength{\floatsep}{10pt plus 100pt} \setlength{\textfloatsep}{\floatsep} \setlength{\intextsep}{\floatsep} \setlength{\parskip}{0pt} \widowpenalties 4 10000 10000 10000 0% Value for testing \clubpenalties 4 10000 10000 10000 0 \makeatletter \newbox\@currentColumnBox \def\mypagebottom{% \def\@texttop{% \setbox\@currentColumnBox = \vbox{\unvcopy\@outputbox}% \typeout{Page \the\c@page\space - page stretch: \the\pagestretch}% \typeout{Page \the\c@page\space - page shrink: \the\pageshrink}% \typeout{Page \the\c@page\space - content natural heigth: \the\ht\@currentColumnBox}% \typeout{Page \the\c@page\space - page heigth: \the\@colht}% %% TEST: % \ifdim\dimexpr \@colht - \ht\@currentColumnBox - \pagestretch > \z@\relax% % \typeout{Raggedbottom on page \the\c@page. \the\dimexpr\ht\@currentColumnBox + \pagestretch\relax\space < \the\@colht.}% % \def\@textbottom{\vskip \z@ \@plus 0.0001 fil}% % \else% % \typeout{Flushbottom on page \the\c@page. \the\dimexpr\ht\@currentColumnBox + \pagestretch\relax\space >= \the\@colht.}% % \def\@textbottom{}% % \fi% }% \def\@textbottom{}% } \makeatother \tracingpages=1 \mypagebottom \begin{document} \begin{figure}[t] \myrule \end{figure} \lipsum[1-4] \begin{figure}[b] \myrule \end{figure} \lipsum[1-3] \begin{figure}[ht] \myrule \end{figure} \lipsum[1-3] \testA \lipsum[1-6] \testB \lipsum[1-9] \end{document}

  • Dynamic calculation of part number width in the memoir table of contents
    by nowox on December 3, 2025 at 6:07 pm

    In this simple example, I have a memoir document with eight parts. By default, LaTeX doesn’t know how wide the part number in the table of contents will be. Since \cftpartnumwidth requires a fixed width, it has to be adjusted manually for every document, and updated every time I add a new part — which makes no sense. I understand the goal is to align titles, so a fixed width is reasonable, but alternatives like the tabbed environment can align entries without hard-coding lengths. Ideally, I’d like LaTeX to determine the correct width automatically, regardless of the document content. I love LaTeX, but sometimes it feels unnecessarily rigid… Here is the example: \documentclass{memoir} \begin{document} \tableofcontents* \part{First} \part{Second} \part{Third} \part{Fourth} \part{Fifth} \part{Sixth} \part{Seventh} \part{Eighth} \end{document} What currently works for me (since I generate the document programmatically) is something like: \newlength{\maxpartnumwidth} \newcounter{maxpart} \setcounter{maxpart}{8} \AtBeginDocument{% \settowidth{\maxpartnumwidth}{Part~\Roman{maxpart}} \addtolength{\maxpartnumwidth}{1em} \setlength{\cftpartnumwidth}{\maxpartnumwidth}% } But this approach is fragile: “Part” is hard-coded, and I don’t know the final font or font size, so the result may not be accurate. Is there a cleaner or more robust way to do this automatically?

  • Remove indent from escapeinside in listings
    by joanthan on December 3, 2025 at 5:07 pm

    The following minimal working example latex shows a multi line latex macro running inside a listings environment: \documentclass{article} \usepackage{listings} \lstset{ breaklines=true, numbers=left, escapeinside={\#(}{\#)}, } \newcommand{\example}{ \newline Something } \begin{document} \begin{lstlisting} def hello_world(): # This function prints "Hello, World!" print("Hello, World!") #(\example #) hello_world() \end{lstlisting} \end{document} Theis results in the following: I wish to remove the indent highlighted above by the red block. It does get removed if I were to set breaklines to false, this does remove the indent. Although I wish to have long lines wrapped so I would prefer not to do this for the whole codeblock. Thanks in advance

  • How to reset poles of coffins with two attachment?
    by Explorer on December 3, 2025 at 5:07 pm

    I have the following code: \documentclass{article} \usepackage{cmupint} \usepackage{fixdif} \DeclareRobustCommand{\myint}{$\displaystyle\int\nolimits$} \begin{document} \ExplSyntaxOn \coffin_new:N \l_int_left_coffin \coffin_new:N \l_int_right_coffin \coffin_new:N \l_base_int_coffin \hcoffin_set:Nn \l_base_int_coffin { \myint } \coffin_new:N \l_dx_int_coffin \hcoffin_set:Nn \l_dx_int_coffin { $\d x$ } \coffin_new:N \l_tmp_coffin \coffin_set_eq:NN \l_tmp_coffin \l_base_int_coffin \coffin_scale:Nnn \l_tmp_coffin { .5 } { .5 } % first \coffin_attach:NnnNnnnn \l_base_int_coffin { r } { t } \l_tmp_coffin { l } { vc } { 0pt } { 0pt } % second \coffin_join:NnnNnnnn \l_base_int_coffin { r } { b } \l_tmp_coffin { l } { vc } { 0pt } { 0pt } \coffin_reset_poles:N \l_base_int_coffin \coffin_display_handles:Nn \l_base_int_coffin {magenta} \ExplSyntaxOff \end{document} Now the poles is as below: What I want, is the GREEN coffin's border. The key code here is: % first \coffin_attach:NnnNnnnn \l_base_int_coffin { r } { t } \l_tmp_coffin { l } { vc } { 0pt } { 0pt } % second \coffin_join:NnnNnnnn \l_base_int_coffin { r } { b } \l_tmp_coffin { l } { vc } { 0pt } { 0pt } If I use two join, two small \int is not vertical align. I also try to make the final \l_base_int_coffin into a \fbox, together with two attach, but also failed, the border is still not what I want: \documentclass{article} \usepackage{cmupint} \usepackage{fixdif} \DeclareRobustCommand{\myint}{$\displaystyle\int\nolimits$} \begin{document} \ExplSyntaxOn \coffin_new:N \l_int_left_coffin \coffin_new:N \l_int_right_coffin \coffin_new:N \l_base_int_coffin \hcoffin_set:Nn \l_base_int_coffin { \myint } \coffin_new:N \l_dx_int_coffin \hcoffin_set:Nn \l_dx_int_coffin { $\d x$ } \coffin_new:N \l_tmp_coffin \coffin_set_eq:NN \l_tmp_coffin \l_base_int_coffin \coffin_scale:Nnn \l_tmp_coffin { .5 } { .5 } % first \coffin_attach:NnnNnnnn \l_base_int_coffin { r } { t } \l_tmp_coffin { l } { vc } { 0pt } { 0pt } % second \coffin_attach:NnnNnnnn \l_base_int_coffin { r } { b } \l_tmp_coffin { l } { vc } { 0pt } { 0pt } \coffin_reset_poles:N \l_base_int_coffin \hcoffin_set:Nn \l_tmpa_coffin { \fbox{\coffin_typeset:Nnnnn \l_base_int_coffin{l}{vc}{0pt}{0pt}} } \coffin_display_handles:Nn \l_tmpa_coffin {magenta} \ExplSyntaxOff \end{document} Is there elegant method to get my desired \l_base_int_coffin's border? Edit with more general case Since cfr has given a tricky r handles' solution to solve my original question, but my case has a more widely-extensive case(Let's consider that the TWO sub-coffins is not hold the some width): \documentclass{article} \usepackage{cmupint} \usepackage{fixdif} \DeclareRobustCommand{\myint}{$\displaystyle\int\nolimits$} \begin{document} \ExplSyntaxOn \coffin_new:N \l_explorer_int_left_coffin \coffin_new:N \l_explorer_int_right_coffin \coffin_new:N \l_explorer_base_int_coffin \coffin_new:N \l_explorer_dx_int_coffin \coffin_new:N \l_explorer_tmp_coffin \coffin_new:N \l_explorer_tmpA_coffin \coffin_new:N \l_explorer_tmpB_coffin \hcoffin_set:Nn \l_explorer_base_int_coffin { \myint } \hcoffin_set:Nn \l_explorer_dx_int_coffin { $\d x$ } \coffin_set_eq:NN \l_explorer_tmp_coffin \l_explorer_base_int_coffin \coffin_set_eq:NN \l_explorer_tmpA_coffin \l_explorer_base_int_coffin \coffin_set_eq:NN \l_explorer_tmpB_coffin \l_explorer_base_int_coffin \coffin_scale:Nnn \l_explorer_tmpA_coffin { .5 } { .5 } \coffin_scale:Nnn \l_explorer_tmpB_coffin { 1.5 } { .25 } % first \coffin_attach:NnnNnnnn \l_explorer_base_int_coffin { r } { t } \l_explorer_tmpA_coffin { l } { vc } { 0pt } { 0pt } % second \coffin_attach:NnnNnnnn \l_explorer_base_int_coffin { r } { b } \l_explorer_tmpB_coffin { l } { vc } { 0pt } { 0pt } % just use `r' would shift back too much, for not the same width of `\l_explorer_tmpA_coffin' and `\l_explorer_tmpB_coffin' % \coffin_join:NnnNnnnn \l_explorer_base_int_coffin { r } { b } \l_explorer_tmpB_coffin { r } { vc } { 0pt } { 0pt } \coffin_reset_poles:N \l_explorer_base_int_coffin \coffin_display_handles:Nn \l_explorer_base_int_coffin {magenta} \ExplSyntaxOff \end{document}

  • Vertical Alignment in a Longtblr Table
    by Ernest on December 3, 2025 at 4:52 pm

    I've encountered a problem with vertical alignment in cells. I hoped that everything would work automatically with X[c,m], but for some reason, this only works from row (4) onwards (highlighted in gray). The previous row consists of merged cells (2,3), and in this case, the cell contents are centered. The required result from the authors of the article: MWE: \documentclass{article} \usepackage{rotating,makecell,xcolor,biblatex} \usepackage{tabularray} \usepackage{changepage} \begin{document} \newcommand\rot[1]{\rotatebox{90}{\centering #1}} \newcommand\Tr[1]{\begin{tabular}[t]{@{}c@{}}#1\end{tabular}} \begin{adjustwidth}{-3cm}{0cm} \begin{longtblr}[ caption = {DAS ice cover experiments}, label = {tab:01}, ]{ width = 18.46cm, hlines, vlines, colspec = { X[0.3,c,m] X[0.3,c,m] X[0.7,c,m] X[0.8,c,m] X[0.4,c,m] X[0.3,c,m] X[0.5,c,m] X[0.5,c,m] X[0.8,c,m] X[3cm,c,m] X[3cm,c,m] X[1,c,m] }, % row{1} = {ht=3cm}, rowhead = 1, cell{2}{3} = {r=2}{}, cell{2}{4} = {r=2}{}, cell{2}{5} = {r=2}{}, cell{2}{6} = {r=2}{}, cell{2}{7} = {r=2}{}, cell{2}{8} = {r=2}{}, cell{2}{9} = {r=2}{}, cell{2}{10} = {r=2}{}, cell{2}{11} = {r=2}{}, cell{2}{12} = {r=2}{}, cell{5}{3} = {r=2}{}, cell{5}{5} = {r=2}{}, cell{5}{9} = {r=2}{}, cell{5}{10} = {r=2}{}, cell{5}{11} = {r=2}{}, cell{5}{12} = {r=2}{}, cell{7}{1} = {}, cell{7}{3} = {r=2}{}, cell{7}{9} = {r=2}{}, cell{7}{10} = {r=2}{}, cell{7}{11} = {r=2}{}, cell{7}{12} = {r=2}{}, cell{8}{1} = {}, cell{9}{1} = {r=2}{}, cell{9}{2} = {r=2}{}, cell{9}{3} = {r=2}{}, cell{9}{4} = {r=2}{}, cell{9}{5} = {r=2}{}, cell{9}{6} = {r=2}{}, cell{9}{7} = {r=2}{}, cell{9}{8} = {r=2}{}, cell{9}{9} = {r=2}{}, cell{9}{11} = {r=2}{}, row{4}= {gray9}, } % \rot{Time} & \rot{Duration} & \rot{Site} & \rot{\parbox{2cm}{\centering Working\\ part\\ of fiber}} & \rot{Interrogator} & \rot{Sampling} & \rot{\parbox{2cm}{Gauge\\ length}} & \rot{\parbox{2cm}{Spatial\\ sampling}} & \rot{\parbox{2cm}{\centering Additional\\ data}} & Measured parameters & Note & Reference \\ % \rot{06.2021}& \rot{7~days} & \rot{\parbox{2cm}{\centering Beaufort Sea}} & \rot{34.5~km} & \rot{Silixa iDAS} & \rot{1~kHz} & \rot{10~m} & \rot{200~m} & \rot{\parbox{2.5cm}{\centering NRT DMSP and MASIE\\ satellite data}} & Presence/absence of ice & The cable is buried in the bottom by 2--4~m. Dark fiber of the underwater cable & \parencite{35} \\ % \rot{11.2021}& \rot{7~days} & & & & & & & & & & \\ \rot{03.2012}& & \rot{\parbox{3cm}{\centering Mendota Lakes, Wisconsin, USA}} & \rot{443~m} & \rot{Silixa iDAS} & \rot{1~kHz} & \rot{10~m} & \rot{10~m} & \rot{\centering \parbox{2.5cm}{\centering Vertical and horizontal geophones}} & Estimate of capability of DAS for wave field measurement, cable comparison & {Different cables in parallel 4~times in a~triangle with a~side of 30~m. Source~-- sledgehammer} & \parencite{6} \\ % \rot{03.2020}& \rot{1~day} & \rot{\parbox{2cm}{\centering Lake Robert, France}} & \rot{200~m} & \rot{\parbox{2.5cm}{\centering A1-R (FEBUS-Optics)}} & \rot{0.5~kHz} & \rot{10~m} & \rot{0.8~m} & & Lake depth, ice thickness and Young's modulus measurements & Deployment using a drone. The cable is reinforced with kevlar & \parencite{33} \\ %% \rot{02.2021}& \rot{1~day} & \rot{} & \rot{320~m} & \rot{} & \rot{2~kHz} & \rot{2~m} & \rot{0.1~m} & & & & \\ % \rot{12.2023}& \rot{1~day} & \rot{\parbox{2cm}{\centering Hanover Ponds, New Hampshire, USA}} & \rot{\parbox{2cm}{\centering 3 lines \\ 50~m each}} & \rot{Sintela Onyx} & \rot{2.5~kHz} & \rot{3.2~m} & \rot{1.6~m} & \rot{\parbox{2cm}{\centering GPS \\ time synchronization}} & Ice thickness measurements & Source~-- Proctor hammer & \parencite{38} \\ % \rot{01.2025}& \rot{1~day} & \rot{} & \rot{100~m} & \rot{Silixa iDAS Carina IU} & \rot{5~kHz} & \rot{2~m} & \rot{0.25~m} & & & & \\ \rot{01.2023}& \rot{65~hours} & \rot{\parbox{2cm}{\centering Xiushui Reservoir, China}} & \rot{\parbox{2cm}{\centering 1.2~km in two circles}} & \rot{Ovlink DAS} & \rot{1~kHz} & \rot{2~m} & \rot{2~m} & \rot{CMG-40T seismometer} & Study of ice destruction and deformation & Sources~-- underwater air gun and sledgehammer & \parencite{52} \\ % & & & & & & & & & Evaluation of ice thickness, Young's modulus & & \parencite{53} \\ % \rot{05.2021}& \rot{3~weeks} & \rot{\parbox{2cm}{\centering Volcanic Lake, Iceland}} & \rot{12.5~km} & \rot{Silixa iDAS v2.} & \rot{0.2~kHz} & \rot{10~m} & \rot{8~m} & & Detection of volcanic tremors & Ice cover of lake- signal amplifier at a certain frequency & \parencite{10} \\ % \rot{02.2024}& \rot{1~day} & \rot{\parbox{2cm}{\centering Klyazma Reservoir, Moscow Region}} & \rot{360~m} & \rot{\parbox{2.5cm}{\centering Dunay, LLC~T8~Sensor}} & \rot{0.5~kHz} & \rot{10~m} & \rot{5~m} & \rot{See text} & Ice thickness and Young's modulus measurements. Evaluation of coiled fiber capabilities & Fiber optic rings and straight sections were used & See text \\ \end{longtblr} \end{adjustwidth} \end{document} Perhaps I took the wrong approach by rotating the rows using \rotation, but when I rotated the columns using X[c,m,cmd=\rotcell] (from the makecell package), I couldn't configure the heights automatically, so I switched to the current approach.

  • memoir: fontsize and baselineskip in the TOC
    by matteofg on December 3, 2025 at 10:13 am

    In memoir I customized the TOC, setting the sub(sub)sections to a "paragraph-style" entry. Below the mwe: % !TEX encoding = UTF-8 Unicode % !TEX program = lualatex \documentclass{memoir} \makeatletter \cftinsertcode{parasubsection}{% \renewcommand{\l@subsection}[2]{% \ifnum \c@tocdepth > 1 \leftskip=\cftsubsectionindent \rightskip=\@tocrmarg \parfillskip=\fill \begingroup \footnotesize\selectfont \def\numberline####1{####1\nobreakspace}% \ifhmode {\cftsubsectionfont\enspace} \else \noindent \fi \ignorespaces% {\cftsubsectionfont##1\string,}\nobreakspace{\cftsubsectionpagefont##2}% \ignorespaces% \endgroup \fi } \renewcommand{\l@subsubsection}[2]{% \ifnum \c@tocdepth > 2 \begingroup \footnotesize\selectfont \def\numberline####1{####1\nobreakspace}% \ifhmode {\cftsubsubsectionfont\enspace} \else \noindent \fi \ignorespaces% {\cftsubsubsectionfont##1\string,}\nobreakspace{\cftsubsubsectionpagefont##2}% \ignorespaces% \endgroup \fi } } \makeatother \AddToHook{enddocument}{\addtocontents{toc}{\par}} \cftinserthook{toc}{parasubsection} \setsecnumdepth{subsection} \settocdepth{subsubsection} \begin{document} \tableofcontents* \directlua{ for i = 1, 2 do tex.print("\\chapter{Chapter}") for i = 1, 2 do tex.print("\\section{Section}") for i = 1, 4 do tex.print("\\subsection{Subsection}") for i = 1, 2 do tex.print("\\subsubsection{Subsubsection}") end end end end } \end{document} The problem is that when I set the paragraphs in an another fontsize (e.g. \footnotesize), the corresponding \baselineskip value doesn’t change. I read that adding \selectfont should be enough, but apparently it isn’t... Also, I’m sure that \l@subsection and \l@subsubsection could be redefined in a cleaner way, code-wise :-p

  • Why does forest baseline alignment seem to stop, once drawing circles around each node?
    by MS-SPO on December 3, 2025 at 10:05 am

    Situation While working on this forest-based solution I was puzzled by the vertical alignment, once I draw circles around the nodes. So for test purposes I copied said basic tree three times: left: without any forest preamble right: preamble only names nodes (for later use) middle: also draws a circle around each node Observations Comparing left and right all characters seem to align by their baselines (light-blue). For the middle one this is more puzzling: light-pink: b, c, d seem to match baselines, but this can be accidental e and f as well, while g and i clearly don't light-blue: k, l, m, y, z seem to "do what they want" orange: there seems to be a tendency to roughly align the circles south (with content dependent size variation from Tikz) Question Actually I have two questions, which are connected like face and back of a coin: how to understand the forest-way of these vertical alignments (middle)? how to obtain baseline alignments for the nodes content (characters, light-blue) instead of the shapes south? I see that this solution seems to solve a similar problem, but honestly I'm lost at the moment in identifying the relevant alignment statements introduced. Code \documentclass[10pt,border=3mm]{standalone} \usepackage{forest} \begin{document} % ~~~ correct baselining ~~~~~~~~~~~ \begin{forest} [a, label=north:baselined [b [e [k][l]] [f [m]]] [c [g [y][z]]] [d [i]] ] \end{forest} % ~~~ incorrect/unexpected ~~~~~~~~~~~~ \begin{forest} delay={ for tree={ name/.option=content,% now node name is same as content circle,draw, % nodes as circles, }, } [a, label=north:{well \dots} [b [e [k][l]] [f [m]]] [c [g [y][z]]] [d [i]] ] \end{forest} % ~~~ correct ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \begin{forest} delay={ for tree={ name/.option=content,% now node name is same as content % circle,draw, % nodes as circles, }, } [a, label=north:baselined [b [e [k][l]] [f [m]]] [c [g [y][z]]] [d [i]] ] \end{forest} \end{document}

  • Hyphenation in slash constructions not working anymore
    by suricata78 on December 3, 2025 at 7:58 am

    With the recent updates of the babel and the listings packages (for me that meant babel 25.14 --> 25.16 and listings 1.10c --> 1.11b), I encountered a change in the hyphenation behavior in my documents: Before the updates, compounds like "linebreaking/hyphenation" would be hyphenated wherever needed, including in the second word. After the updates, this does not work anymore, "hyphenation" is not hyphenated but runs into the margin. In the log file I see these lines now: ==> First Aid for listings.sty no longer applied! Expected: 2024/09/23 1.10c (Carsten Heinz) but found: 2025/11/14 1.11b (Carsten Heinz) so I'm assuming it got fixed. where before the update it said ==> First Aid for listings.sty applied! Please see the following MWE for testing. \documentclass{article} \usepackage[english]{babel} \usepackage{listings} \begin{document} asfölkjhasdöflhaöeoikljhkjhlkjhsaldkjfaösdljkaöslkjhöklkjhlö linebreaking/hyphenation \end{document} If the listings package is loaded and the file is compiled with the old versions of babel and listings, "linebreaking/hyphenation" is hyphenated like this (which is what I want): I know I could use shorthands and other "manual" hyphenation solutions, but this would seem like a big step back from this working so nicely and automatically. So my question is: Is there a way to get the First Aid solution back? Note: I am actually using the listings package to print code snippets in my documents. I was surprised to see it affects hyphenation outside listings environments - it was an unknown but much appreciated side effect 🙂

  • How to tagging documents with figures mixed latex/pdf from fig
    by user2609605 on December 3, 2025 at 7:57 am

    I want tagged pdf from latex and for that specify tagging=on in \DocumentMetatdata. I know that if including PDF figures thePic with \includegraphics, an alt text must be given like so: \includegraphics[alt=whats on the pic]{thePic} Now my problem is that I have a lot of fig pictures consisting of a kind of graphs annotated with latex text. Thus I export with fig2dev in two parts: fig2dev -L pdftex thePic.fig thePic.pdf fig2dev -L pdftex_t -p xxx thePic.fig thePic.tex The result is some thePic.tex I can include with \input{thePic} which contains a picture environment which defines the latex text directly and includes the graphics via \includegraphics{thePic.pdf}. A short latex document could be the following: \DocumentMetadata{lang=en_US,tagging=on} \documentclass[a4paper]{article} \usepackage{graphicx} \usepackage{color} \usepackage{unicode-math} \title{On Tagging created pictures} \author{E. Reißner} \date{\today} \begin{document} \maketitle Some text. \input{thePic} \end{document} The FIG file I spare the reader, whereas thePic.tex created by fig2dev may be interesting: \begin{picture}[artifact](0,0) %\begin{picture}(0,0) \includegraphics{thePic}% \end{picture}% % % Conversion of xxx.fig into xxx.ptx, xxx.pdf and xxx.eps % \setlength{\unitlength}{2072sp}% \begin{picture}[alt=Transformation of pics from fig format to tex picture including a pdf.](8492,4797)(1114,-4621) %\put(1000,-4797){\includegraphics{thePic}} \put(1351,-2311){\makebox(0,0)[lb]{\smash{\fontsize{10}{12}\usefont{T1}{ptm}{m}{n}{\color[rgb]{0,0,0}\texttt{xxx.fig}}% }}} \put(6976,-286){\makebox(0,0)[lb]{\smash{\fontsize{10}{12}\usefont{T1}{ptm}{m}{n}{\color[rgb]{0,0,0}\texttt{xxx.pdf}}% }}} \put(6976,-2311){\makebox(0,0)[lb]{\smash{\fontsize{10}{12}\usefont{T1}{ptm}{m}{n}{\color[rgb]{0,0,0}\texttt{xxx.ptx}}% }}} ... \end{picture}% As i said, this is 'essentially' created by fig2dev which cannot know about the meaning of the pics. What I inserted by hand are [artifact] and alt=...]. I know, this is not really correct, because of course the pdf part is of course no pure artifact. I remember fig2dev once created a single picture environment, and I can imagine we could return to that. I showed with \put(1000,-4797){\includegraphics{thePic}} where the pdf could be included. That way, a single alt would remain. Still I have the problem, that creation of such a document is done automatically and I cannot just include alt or artifact in created sources. I found the accessibility package but unfortunately this seems to support pdflatex only and I have for good reasons lualatex. I also found package latex-lab-graphic but the status of this package is not clear. It is not very explicit about how to use it. Seemingly one can enclose pictures in a structure to tag them. This would be what I need. My feeling is, that I would prefer if the alt text would be included in the pic itself, but I think this is in general no option. I know there are many formats out there to be included in latex and even more techniques to do so. Why assigning alt to includegraphics and not to \caption of figures and tables? I imagine \caption[alt=desc, ...]{normal text}.

  • Why are there no current debian-equivs filex for texlive
    by Namal on December 3, 2025 at 7:06 am

    I am always installing texlive through the installer script. And the tutorial tells me to create the dummy package for it. But there is no equivs file for the current texlive version (2025). Can I just ignore this step or can I use the old equivs file?

  • Inconsistent spacing behavior between `equation`s with `fleqn` option?
    by Explorer on December 3, 2025 at 6:38 am

    Let's see the following two codes: \documentclass[12pt,a4paper]{article} \usepackage{showframe} \usepackage{amsmath} \usepackage{lipsum} \begin{document} \lipsum[1][1-3] \begin{equation}% x^2+y^2=z^2 \label{eq:1} \end{equation}% \lipsum[1][1-3] \begin{equation}% x^2+y^2=z^2 \label{eq:2} \end{equation}% \lipsum[1][1-3] \begin{equation}% x^2+y^2=z^2 \label{eq:3} \end{equation}% \lipsum[1][1-3] aa \eqref{eq:1} and \eqref{eq:2} and \eqref{eq:3} \end{document} It gives normally: While, when I add fleqn: \documentclass[12pt,a4paper,fleqn]{article} \usepackage{showframe} \usepackage{amsmath} \usepackage{lipsum} \begin{document} \lipsum[1][1-3] \begin{equation}% x^2+y^2=z^2 \label{eq:1} \end{equation}% \lipsum[1][1-3] \begin{equation}% x^2+y^2=z^2 \label{eq:2} \end{equation}% \lipsum[1][1-3] \begin{equation}% x^2+y^2=z^2 \label{eq:3} \end{equation}% \lipsum[1][1-3] aa \eqref{eq:1} and \eqref{eq:2} and \eqref{eq:3} \end{document} The spacing expand unexpectedly. IMHO, flqno.clo just move the formula left, without adding the spacing. I want to know how to keep the \above(below)display(short)skip the same as the reqno's case. I found two (maybe) relative links.... But not exactly the same, I think(they both relative with hyperref)... https://tex.stackexchange.com/a/235837/322482 https://tex.stackexchange.com/a/122358/322482

  • Shaded Tabular table not working as expected
    by Álvaro on December 3, 2025 at 4:27 am

    I have this code: \documentclass{article} \usepackage{array,multirow,xcolor,colortbl} \definecolor{tableheadercolor}{HTML}{FFCE63} % Orange from the Keams template \colorlet{tablerowcolor}{tableheadercolor!20} % 20% header color + 80% white \begin{document} \begin{table}[ht] \centering \caption{Opened and Closed JIRA Tickets for ED by Month} \begin{tabular}{| >{\centering\arraybackslash}m{0.1\textwidth}| >{\centering\arraybackslash}m{0.15\textwidth}| >{\centering\arraybackslash}m{0.15\textwidth}| >{\centering\arraybackslash}m{0.15\textwidth}|} \hline \rowcolor{tableheadercolor} \textbf{Year} & \textbf{Month} & \textbf{Opened JIRAs} & \textbf{Closed JIRAs} \\ \hline \multirow{1}{*}{\centering 2023} & December & 2 & 1 \\ \hline \multirow{12}{*}{\cellcolor{tablerowcolor}\centering 2024} & \cellcolor{tablerowcolor} January & \cellcolor{tablerowcolor} 1 & \cellcolor{tablerowcolor} 0 \\ \cline{2-4} & February & 0 & 1 \\ \cline{2-4} & \cellcolor{tablerowcolor} March & \cellcolor{tablerowcolor} 0 & \cellcolor{tablerowcolor} 0 \\ \cline{2-4} & April & 0 & 0 \\ \cline{2-4} & \cellcolor{tablerowcolor} May & \cellcolor{tablerowcolor} 3 & \cellcolor{tablerowcolor} 1 \\ \cline{2-4} & June & 0 & 0 \\ \cline{2-4} & \cellcolor{tablerowcolor} July & \cellcolor{tablerowcolor} 0 & \cellcolor{tablerowcolor} 0 \\ \cline{2-4} & August & 2 & 2 \\ \cline{2-4} & \cellcolor{tablerowcolor} September & \cellcolor{tablerowcolor} 0 & \cellcolor{tablerowcolor} 0 \\ \cline{2-4} & October & 1 & 0 \\ \cline{2-4} & \cellcolor{tablerowcolor} November & \cellcolor{tablerowcolor} 1 & \cellcolor{tablerowcolor} 0 \\ \cline{2-4} & December & 2 & 1 \\ \hline \multirow{11}{*}{\centering 2025} & \cellcolor{tablerowcolor} January & \cellcolor{tablerowcolor} 2 & \cellcolor{tablerowcolor} 8 \\ \cline{2-4} & February & 4 & 2 \\ \cline{2-4} & \cellcolor{tablerowcolor} March & \cellcolor{tablerowcolor} 0 & \cellcolor{tablerowcolor} 3 \\ \cline{2-4} & April & 8 & 4 \\ \cline{2-4} & \cellcolor{tablerowcolor} May & \cellcolor{tablerowcolor} 2 & \cellcolor{tablerowcolor} 0 \\ \cline{2-4} & June & 2 & 4 \\ \cline{2-4} & \cellcolor{tablerowcolor} July & \cellcolor{tablerowcolor} 1 & \cellcolor{tablerowcolor} 4 \\ \cline{2-4} & August & 2 & 1 \\ \cline{2-4} & \cellcolor{tablerowcolor} September & \cellcolor{tablerowcolor} 1 & \cellcolor{tablerowcolor} 3 \\ \cline{2-4} & October & 2 & 0 \\ \cline{2-4} & \cellcolor{tablerowcolor} November & \cellcolor{tablerowcolor} 0 & \cellcolor{tablerowcolor} 1 \\ \hline \end{tabular} \end{table} \end{document} However, the row for year 2024 is not correctly shaded: What I want to achieve is rows with alternate shading.

  • mtpro2 (MathTime Professional Fonts II) special braces [closed]
    by Martín Moreno on December 2, 2025 at 11:14 pm

    Many texts that use the mtpro2 style make braces like this: (Elementary Number Theory by David Burton, 7th edition). There is also James Munkres' Topology: I've read all the mtpro2 manuals, but only the following are presented: Although Michael Spivak passed away, he left us a beautiful typeface for LaTeX. Does anyone know anything? Or could someone suggest something? In particular, this can be useful in the 'cases' environment. It looks like the braces I want are in bold, but I could be wrong.

  • installer for texlive does not work for historic releases
    by user2609605 on December 2, 2025 at 10:57 pm

    EVALUATING please no posts in the meantime I wrote a script to install at least two releases of texlive: one historic but quite new and one still alive, at time of this writing 2025. It is not perfect for 2025 but still works. For 2024 it yields the following error: INFO: Try downloading archived release... --2025-12-02 23:44:41-- https://mirror.nju.edu.cn/tex-historic/systems/texlive/2024/install-tl-unx.tar.gz Resolving mirror.nju.edu.cn (mirror.nju.edu.cn)... 210.28.130.3, 2001:da8:1007:4011::3 Connecting to mirror.nju.edu.cn (mirror.nju.edu.cn)|210.28.130.3|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 5839378 (5.6M) [application/octet-stream] Saving to: ‘install-tl-unx.tar.gz’ install-tl-unx.tar.gz 100%[=====================================================================================================>] 5.57M 884KB/s in 6.5s 2025-12-02 23:44:49 (884 KB/s) - ‘install-tl-unx.tar.gz’ saved [5839378/5839378] ✔ DONE: Download succeeded. ℹ INFO: installing texlive 2024 scheme small into /usr/local/texlive/2024 Loading https://ftp.gwdg.de/pub/ctan/systems/texlive/tlnet/tlpkg/texlive.tlpdb ./install-tl: No small, switching to scheme-minimal. ============================================================================= ./install-tl: The TeX Live versions of the local installation and the repository being accessed are not compatible: local: 2024 repository: 2025 Perhaps you need to use a different CTAN mirror? (For more, see the output of install-tl --help, especially the -repository option. Online via https://tug.org/texlive/doc.) ============================================================================= ✖ ERROR: Installer failed with exit code 1. localhost:/home/ernst/OpenSource/SoftwareQMngMnt/src/main/resources/eu/simuline/qMngmnt/installation # The script at least the part until the error looks like that: #!/bin/bash - # color functions error() { echo -e "\e[91m✖ ERROR: $1\e[0m"; } warn() { echo -e "\e[93m⚠ WARN: $1\e[0m"; } info() { echo -e "\e[94mℹ INFO: $1\e[0m"; } succ() { echo -e "\e[92m✔ DONE: $1\e[0m"; } [ "$EUID" -ne 0 ] && { error "Please run as root or via sudo."; exit 1; } [ "$#" -eq 1 ] || { error "Usage: $0 <year in 4 digits>"; exit 1; } YEAR="$1" [[ "$YEAR" =~ ^[0-9]{4}$ ]] || { error "Year must be exactly 4 digits"; exit 1; } # folder for script and for packagesTexlive<year>.txt SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # folder where all texlive releases are to be installed ... ROOT="/usr/local/texlive" # each release in the folder of its year INSTALL_DIR="$ROOT/$YEAR" # The architecture for which to install (the current) ARCH=$(uname -m)-$(uname | tr '[:upper:]' '[:lower:]') # The subfolder of the installation with the binaries for the given architecture BIN_DIR="$INSTALL_DIR/bin/$ARCH" SCHEME=small # new or update if [ ! -d "$BIN_DIR" ]; then if [ -d "$INSTALL_DIR" ]; then info "Reinstalling existing release $YEAR for architecture $ARCH..." else info "Installing texlive $YEAR for architecture $ARCH..." fi FILE="install-tl-unx.tar.gz" rm -f "$FILE" # try URL for life release info "Try downloading final release..." URL="https://mirror.ctan.org/systems/texlive/$YEAR/tlnet-final/$FILE" wget "$URL" if [ $? -ne 0 ]; then info "Try downloading archived release..." # try URL for archived release # list of historic servers: https://www.tug.org/historic/ URL="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/$YEAR/$FILE" URL="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/$YEAR/$FILE" URL="https://mirror.nju.edu.cn/tex-historic/systems/texlive/$YEAR/$FILE" wget "$URL" || { error "Downloading $FILE failed, both as live release and as archived one."; exit 2; } fi succ "Download succeeded." INSTALLER="install-tl" INSTALLER_DIR=$(tar -tf "$FILE" | grep -E "^[^/]+/$INSTALLER" | cut -d/ -f1 | head -1) [ -n "$INSTALLER_DIR" ] || { error "Unexpected folder structure of $FILE."; exit 3; } rm -rf "$INSTALLER_DIR" tar -xzf "$FILE" pushd "$INSTALLER_DIR" > /dev/null || { error "Could not enter installation folder $INSTALLER_DIR."; exit 3; } info "installing texlive $YEAR scheme $SCHEME into $INSTALL_DIR" chmod +x "$INSTALLER" ./$INSTALLER --scheme "$SCHEME" --no-interaction -paper "a4" --texdir "$INSTALL_DIR" \ || { error "Installer failed with exit code $?."; exit 3; } # ./$INSTALLER --repository https://mirror.us-midwest.utah.edu/ctan/historic/systems/texlive/2024/tlnet-final \ # --scheme "$SCHEME" --no-interaction -paper "a4" --texdir "$INSTALL_DIR" || \ # { error "Installer failed with exit code $?."; exit 3; } popd > /dev/null # schema small is installed even with a reinstall with scheme minimal succ "Installed texlive $YEAR with schema $SCHEME for architecture $ARCH." fi ... THe problem seems to be invoking the installer. By the way seemingly small is not provided. I wonder why now //ftp.gwdg.de/pub/ctan/systems/texlive/tlnet/tlpkg/texlive.tlpdb is loaded and whether this is the point where 2025 an 2024 get mixed up. I tried the -repository option but i cannot figure out the correct URL.

  • Re-typesetting the result of \unvbox
    by Frisket on December 2, 2025 at 10:30 pm

    If I typeset some text into a \vbox narrower than the rest of the document, I can \vsplit some of it to use, but I then want the remainder re-typeset to the text width of the document. Here is an example of it not working (the \unvbox'd material is at the width it was set at and is not being reset to the main width): \documentclass{article} \usepackage{lipsum} \begin{document} \setbox0=\vbox{\divide\hsize by2\lipsum[2]} \vsplit0 to2cm \hrule % added to show where the split occurs \unvbox0 \end{document} In my innocence I understood from the TeXbook and elsewhere that the glue at the top level in the remainder of the box after \vsplitting would be unset, making the contents available for use (in my case, the contents will always be plain text with no macros). I see a number of specialist solutions (eg Centering contents after \unvbox) but they all involve taking special action on the \unvbox'd material, which contains all kinds of other stuff like alignments, whereas I need to have it treated as if it were fresh text.

  • Is there a way in TikZ or Lua to make a short function which converts letters to their corresponding alphabetical position (and vice versa)?
    by Jasper on December 2, 2025 at 5:38 pm

    Is there a way in TikZ or Lua to make a short function which converts letters to their corresponding alphabetical position (and vice versa)? The only way I can think of it so string check each letter, but that sounds too computationally expensive. M(non)WE: \documentclass[tikz,border=1cm]{standalone} \newcommand{\letterpos}[1]{ \pgfmathparse{#1 == a} \ifnum\pgfmathresult=1 1 \fi \pgfmathparse{#1 == ab} \ifnum\pgfmathresult=1 2 \fi \pgfmathparse{#1 == c} \ifnum\pgfmathresult=1 3 \fi \pgfmathparse{#1 == d} \ifnum\pgfmathresult=1 4 \fi \pgfmathparse{#1 == e} \ifnum\pgfmathresult=1 5 \fi } \begin{document} \begin{tikzpicture} \foreach \letter in {a,b,...,e} { \node at (\letterpos{\letter},0) {\letter}; } \end{tikzpicture} \end{document}

  • Redefine quotation environment to remove initial indent
    by agoldst on December 2, 2025 at 4:13 pm

    The default LaTeX quotation environment starts each paragraph with an indentation. I prefer for a multi-paragraph block quote not to indent the first paragraph (as recommended by the Chicago Manual of Style, for example). It is of course possible to write \begin{quotation}\noindent every time. But I would like to redefine the environment. I tried to modify the default article.cls definition of quotation minimally, but the result somehow puts a word space at the start of the quotation. How do I avoid this space without having to manually begin every block quote with a \noindent? Example: \documentclass{article} \newenvironment{lquote}{\list{}{\listparindent 1.5em% \itemindent\listparindent \rightmargin \leftmargin \parsep 0pt plus 1pt}\item\noindent\relax}% {\endlist} \begin{document} Quotation environment with explicit noindent: \begin{quotation} \noindent He finally lit on the ground and walked around the body to see if it were really dead. Peered into its nose and mouth. Examined it well from end to end and leaped upon it and bowed, and the others danced a response. That being over, he balanced and asked: ``What killed this man?'' \end{quotation} Custom environment attempting to put noindent at the beginning \begin{lquote} He finally lit on the ground and walked around the body to see if it were really dead. Peered into its nose and mouth. Examined it well from end to end and leaped upon it and bowed, and the others danced a response. That being over, he balanced and asked: ``What killed this man?'' \end{lquote} \end{document} On my system, pdflatex gives this:

  • Section title with \star
    by Roberto Rastapopoulos on December 2, 2025 at 1:47 pm

    I am trying to get the following: But when I insert it in this way: \documentclass[a4paper,12pt]{amsart} \usepackage{hyperref} \begin{document} \tableofcontents \section{Introduction} \subsection{$\star$ N-Soliton solutions} Some text about N-soliton solutions... \end{document} I get the error "Package hyperref Warning: Token not allowed in a PDF string (Unicode): removing `math shift' [...]". When I write \subsection{\star N-Soliton solutions} I get How can I get the first one without the error? I have tried several things, but all come with another problem.

  • Under `zref-clever`, command to retrieve name strings of a given reference type?
    by Peter LeFanu Lumsdaine on December 2, 2025 at 12:50 pm

    I’m using zref-clever, and looking for a way to explicitly retrieve the various name strings associated to a given reference type — so I can write e.g. \zcrefgetstring{theorem}{Name-pl} and get “Theorems”. Presumably the package must already include some command that does roughly this, but as far as I can find, it’s not documented in the user manual, so must be internal-only. I am searching through the code, which is excellently documented but quite long and complex — so I am also asking here, either in case someone who knows the package better can give the answer quicker than I can find it, and (even if I find it first myself) to make the answer more easily searchable in future. MWE, showing approximate desired usage; expected output is hopefully clear: \documentclass{article} \usepackage{zref-clever} \newcommand{\zcrefgetstring}[2]{UNDEFINED} \begin{document} The reference type \texttt{theorem} has name \zcrefgetstring{theorem}{name-sg}. Capitalised and in plural, it is \zcrefgetstring{theorem}{Name-pl}. \end{document}

  • Biblatex-publist replacing all co-authors with et al
    by user383619 on December 2, 2025 at 5:40 am

    When using biblatex-publist with a reference that has several authors, all co-authors are incorrectly replaced with a single "et al." See reference [1] in the screenshot for an example. What I expect is "with <name>" (as shown correctly in reference [2]) or "with <name> et al." (as shown correctly in reference [3]). Why does this happen? Is this a bug? If I use a different base style or specify maxnames=99, the problem goes away. But I don't think this is addressing the (potential) underlying bug. Here's an MWE. \documentclass{article} % \newcommand*\publistbasestyle{ieee} \usepackage[ style=publist, plauthorhandling=omit, nameorder=given-family, % maxnames=99 ]{biblatex} \plauthorname{Herrmann} \plauthorname{Kastenholz} \plauthorname{Murray} \addbibresource{biblatex-examples.bib} \begin{document} \nocite{herrmann,kastenholz,murray} \printbibliography[heading=none] \end{document}

  • xcolor not fully colouring commutative diagrams drawn by tikzcd
    by 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?

  • Splitting a sentence into characters (incl. spaces) and displaying each character in a tikz node
    by 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.

  • 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 cleveref
    by 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}

  • Practical guidelines for using sockets
    by 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?