Hot
- Page breaks between consecutive instances of \startstandardmakeupby 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 Beamerby 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 tikzby 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 \bookcovercomponentby 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 spacingby 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 to format \ea and \ex examples to have spacing like a table (corresponding columns)by user431898 on January 21, 2026 at 3:34 pm
I would like to have examples in a linguistic text that are able to be referenced to with \ref{ex:key:22a} for example, but have spacing like a table. Is there any way to indent the text or to create a table with similar referencing abilities? I would like the examples to be formatted as in the above image, with corresponding columns and the top row as not being part of the example. I am not sure if this is possible. Currently my LaTeX looks like this for the first two rows of the examples. \documentclass{article} \usepackage{tabularx,multicol} \usepackage{url} \urlstyle{same} \usepackage{langsci-optional} \usepackage{langsci-lgr} \usepackage{langsci-gb4e} \usepackage{subfigure} \usepackage[linguistics,edges]{forest} \usepackage{tabto} \begin{document} \ea\label{ex:key:22} Supyire (Senufo, GUR) \citep[35--36]{Carlson2022} Class Indefinte form Definite form Meaning \\ \ea\label{ex:key:22a} PE \textit{\`{m}pà-a } \textit{\`{m}pà-a-bɩ́ɩ́} ‘sheep (PL)’\\ \ex\label{ex:key:22b} KI \textit{bò-ŋɔ̀} \textit{bo-ŋ-ke} baboon’ \\ \z \end{document} which shows up like this: Any help would be greatly appreciated!
- 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 enumerateby 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 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 nodesby 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 workby 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 counterby 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}
- Texshop can't find pdflatexby Garrison Cottrell on January 20, 2026 at 10:26 pm
I keep getting this error: /usr/local/texlive/2017/bin/x86_64-darwin/pdflatex does not exist. Of course, it doesn't, as I have more recent versions. I have tried running texshop live, updating everything, I tried reinstalling texshop, I tried downloading and installing mactex, etc. Each time, I get the exact same error. How do I fix this? It's cost me hours...
- Using BibLaTeX with letter classby Pedro G. Mattos on January 20, 2026 at 10:24 pm
I want to use the Biblatex package with the letter class. I tried following Using BibTeX with letter class but it does not work with biblatex. Here is a Minimal Almost-Working Example. \begin{filecontents}{bibliography.bib} @article{First, author = "Other, A. N.", title = "Some things {I} did", journal = "J. Irreproducible Results", year = "2011" } @article{Second, author = "Aaa, S{\o}mebloke", title = "Tigers", journal = "Ann. Improbable Res.", year = "2011" } \end{filecontents} \documentclass{letter} \usepackage{biblatex} \addbibresource{bibliography.bib} \signature{Signature} \address{Address} \begin{document} \begin{letter}{Dear} \opening{Opening} Body of the letter. Some text \cite{First}, more text \cite{Second}. \closing{Sincerely,} \clearpage \printbibliography \end{letter} \end{document}
- alignment of diagrams in xy-picby Olga on January 20, 2026 at 7:10 pm
I'm learning to draw commutative diagrams using the xy-pic package. I don’t know how to insert pictures on this forum yet, so I’ll write what I got with xymatrix: \documentclass[12pt,reqno]{report} \usepackage[all,cmtip]{xy} \usepackage[T1]{fontenc} \usepackage[russian]{babel} \begin{document} $$\xymatrix{% Z \ar@{-->}[r]_h \ar `u/8pt[r] `[rr]^{g} [rr] & \displaystyle Y \ar[r]_f & X }$$ $$\xymatrix{% F(Z) \ar[r]_{\alpha} \ar `u/8pt[r] `[rr]^{F(g)} [rr] & \displaystyle F(Y) \ar[r]_{\beta} & F(X) }$$ \end{document} I would like to align both charts in width and and want to turn the ends of the arrows $g$ and $F(g),$ respectively, towards $X$ and $F(X).$ Edit. Here's what I got with your help:
- Weird subscript errorby Dhairya Kumar on January 20, 2026 at 4:41 pm
I had an issue beautifying the function: but faced the error that the subscripts J and D are obviosly too huge. Help me in making them look more better. Codes: $$f(x,y)=\begin{cases} x=x_{\mathrm{J}},y\in\left(-\frac{l}{2},\frac{l}{2}\right) \\ x\in(-x_{\mathrm{J}},x_{\mathrm{J}}), y=y_D\\ x=-x_{\mathrm{J}},y\in\left(-\frac{l}{2},\frac{l}{2}\right) \\ x\in(-x_{\mathrm{J}},x_{\mathrm{J}}), y=-y_D \end{cases}$$ Context: I was writing an answer on MSE and came across this error.
- Can I replace datatool with pure LaTeX3 commands?by lukascbossert on January 20, 2026 at 4:24 pm
In many of my templates (e.g. for proposals) I am relying heavily on datatool building a database structure with various "tables". Throughout the document (or in some cases in the preamble) I fill the tables by adding entries using custom commands. I recently getting more and more involved in LaTeX3 and building functionalities with it instead of using datatool. But the combination is problematic: How to calculate the percentage of a filtered list using LaTeX3? How to add/calculate integers that are coming from a macro using LaTeX3? How to create a list of referenced values based on entries in a datatool-database Therefor I am now contemplating to replace datatool and use LaTeX3 instead. But I am not sure whether I have the same features/functionalities I would have using datatool. Below you find my current approach and I would be happy to get guidance on how to replace the content of the macros using LaTeX3-syntax. It would be best when the content of the user-commands (\get..., \add..., \print...) can stay. A necessity would be to populate a table with e.g. n-many person-entries. Each entry has an id, through this id all key-values are accessible. It would be great when there is already a quality check when passing values to the keys: In my current approach this seems not to be possible, e.g. that gender has only three valid values: m, f, d. Or for period valid values are 1, 2 or 3 or any combination comma-separated (1,3). \keys_define:nn { dfg/person } { id .code:n = \DTLnewdbentry{person}{id}{#1}, id .value_required:n = true, firstname .code:n = \DTLnewdbentry{person}{firstname}{#1}, lastname .code:n = \DTLnewdbentry{person}{lastname}{#1}, gender .code:n = \DTLnewdbentry{person}{gender}{#1}, % valid `m`, `f`, `d` role .code:n = \DTLnewdbentry{person}{role}{#1}, period .code:n = \DTLnewdbentry{person}{period}{#1}, % valid `1`, % `2`, `3` or any combination ,-separated ref-institution-id .code:n = \DTLnewdbentry{person}{ref-institution-id}{#1}, } Why would I want to replace datatool? Since I was asked in the comments here is a summary of what I think why I should replace datatool. Handling of the result value: At the end it comes down to do a loop through the dataset and print the output. With LaTeX3 I could very granular define how one/multiple values are printed Matter of speed: My impression was that looping with datatool takes longer than using LaTeX3. Compiling time is precious when one uses online services (e.g. Overleaf). Not to worry about (no-)expansion: As mentioned above my impression was that the difficulty of handling/evaluating the data is due to the \DTLforeach-loop (see above) Here is the MWE \documentclass{article} \usepackage{datatool,xcolor} \ExplSyntaxOn % ---------------------------------------------------------------- % PERSON key set % ---------------------------------------------------------------- \keys_define:nn { dfg/person } { id .code:n = \DTLnewdbentry{person}{id}{#1}, id .value_required:n = true, firstname .code:n = \DTLnewdbentry{person}{firstname}{#1}, lastname .code:n = \DTLnewdbentry{person}{lastname}{#1}, gender .code:n = \DTLnewdbentry{person}{gender}{#1}, % valid `m`, `f`, `d` role .code:n = \DTLnewdbentry{person}{role}{#1}, period .code:n = \DTLnewdbentry{person}{period}{#1}, % valid `1`, % `2`, `3` or any combination ,-separated ref-institution-id .code:n = \DTLnewdbentry{person}{ref-institution-id}{#1}, } % ---------------------------------------------------------------- % PROJECT key set % ---------------------------------------------------------------- \keys_define:nn { dfg/project } { id .code:n = \DTLnewdbentry{project}{id}{#1}, id .value_required:n = true, number .code:n = \DTLnewdbentry{project}{number}{#1}, status .code:n = \DTLnewdbentry{project}{status}{#1}, % valid `<EMPTY>`, `N`, `E` name .code:n = \DTLnewdbentry{project}{name}{#1}, research-area .code:n = \DTLnewdbentry{project}{research-area}{#1}, ref-person-id .code:n = \DTLnewdbentry{project}{ref-person-id}{#1}, } % ---------------------------------------------------------------- % AFFILIATION key set % ---------------------------------------------------------------- \keys_define:nn { dfg/affiliation } { id .code:n = \DTLnewdbentry{affiliation}{id}{#1}, name .code:n = \DTLnewdbentry{affiliation}{name}{#1}, location .code:n = \DTLnewdbentry{affiliation}{location}{#1}, } % ---------------------------------------------------------------- % INSTITUTION key set % ---------------------------------------------------------------- \keys_define:nn { dfg/institution } { id .code:n = \DTLnewdbentry{institution}{id}{#1}, name .code:n = \DTLnewdbentry{institution}{name}{#1}, ref-affiliation-id .code:n = \DTLnewdbentry{institution}{ref-affiliation-id}{#1}, } % ---------------------------------------------------------------- % \addEntry[<key‑set>]{<database>}{key=val, key=val,…} \NewDocumentCommand{\addEntry}{ O{#2} m m } { % #1 = key set (default = database name) % #2 = name of the database % #3 = comma‑separated key‑value list \DTLifdbexists{#2}{}{\DTLnewdb{#2}}% create DB if missing \DTLnewrow{#2}% % feed the list to the appropriate key family \keys_set:nn { dfg/#1 } { #3 } } % ---------------------------------------------------------------- \NewDocumentCommand{\getEntry}{o m m O{id}}{% % #1 database name % #2 name of the ID-field % #3 name of the field you want to get the data from % #4 field for an alternative id \DTLifdbexists{#1}{% \DTLgetvalueforkey{\thevalue}{#3}{#1}{#4}{#2}% \DTLifnullorempty{\thevalue} {} {\thevalue}% }{% \textcolor{red}{database~missing:~#1}% }} % ---------------------------------------------------------------- % Convenience wrappers \NewDocumentCommand{\getPI}{s m o} { % #1: starred version -> firstname % #2: id of PI / person % #3: optional text, but reference linked to PI \seq_clear:N \l_tmpa_seq \seq_set_from_clist:Nn \l_tmpa_seq {#2}% \seq_set_map:NNn \l_tmpb_seq \l_tmpa_seq { \exp_not:n { \group_begin: \DTLgetvalueforkey{\thePersonName}{lastname}{person}{id}{##1} \datatool_if_null:NTF {\thePersonName} { \textcolor{red}{\texttt{<?##1?>}} } { \bfseries \IfNoValueTF{#3}% {\IfBooleanT{#1} {\getEntry[person]{##1}{firstname}\space} \getEntry[person]{##1}{lastname}} {#3}} \group_end: }} \seq_use:Nn \l_tmpb_seq {\space{/}\space}% } %================================================================ % 3. Tiny ready‑made tables (just to show the data) %================================================================ \newcommand{\printProjectLeadersTable}{% \begin{tabular}{ll} \textbf{ID} & \textbf{Name} \\ % Keep rows whose “role” field contains the token “PI” \DTLforeach*[ \DTLisinlist{PI}{\prole} ]{person}{\pid=id,\prole=role,\pfn=firstname,\pln=lastname} {% \pid & \getPI{\pid}\\ }% \end{tabular} } % ---------------------------------------------------------------- % \ProjectsTable{<group-letter>}{<heading>} \newcommand{\printProjectsTable}[2]{% \begin{tabular}{lcl} \textbf{#1-group} & \textbf{Title} & \textbf{PI}\\ \DTLforeach*[ \DTLisPrefix{\pnum}{#1}% 1st condition ]{project}{\pnum=number,\pname=name,\ppid=ref-person-id} {% \pnum & \pname & \getPI*{\ppid}\\ }% \end{tabular} } \ExplSyntaxOff %------------------------------------------------------------- %--- 4. Populate the tiny databases \addEntry{affiliation}{ id = {aff1}, name = {Test University}, location = {Test City} } \addEntry{institution}{ id = {inst1}, name = {Institute of Testing}, ref-affiliation-id = {aff1} } \addEntry{person}{ id = {p1}, firstname = {Alice}, lastname = {Smith}, gender = {f}, role = {PI}, period = {1,2,3}, ref-institution-id={inst1}, } \addEntry{person}{ id = {p2}, firstname = {Bob}, lastname = {Brown}, gender = {m}, role = {PI}, period = {2,3}, ref-institution-id={inst1}, } \addEntry{project}{ id = {A01}, number = {A01}, status = {N}, name = {Sample Project A}, research-area = {1.11-01}, ref-person-id = {p1} } \addEntry{project}{ id = {B01}, number = {B01}, status = {N}, name = {Sample Project B}, research-area = {1.12-01}, ref-person-id = {p2} } %============================================================= \begin{document} \section*{Demo of the tiny interface} %--- simple look-ups ------------------------------------------------ Full name of n-many PI: \textbf{\getPI*{p1,p2}}\\ Project-name: \textbf{\getEntry[project]{A01}{name}}\\ PI-name: \textbf{\getEntry[person]{p1}{lastname}}\\ Typo in ID: \getPI{p3} \bigskip \section*{Project-leaders table (all PIs)} \printProjectLeadersTable \bigskip \section*{Projects – group A} \printProjectsTable{A}{<Description>} \bigskip \section*{Projects – group B} \printProjectsTable{B}{<Description>} \end{document}
- How to reveal tag of equation in align environment later?by Arya1050 on January 20, 2026 at 1:32 pm
\documentclass{beamer} \begin{document} \begin{frame} \begin{align}\label{Myeqn} A &= B \nonumber \\ \onslide<2->{&= C} \nonumber \\ \onslide<3->{&= D} \nonumber \\ \onslide<4->{&= E} \end{align} \end{frame} \end{document} I want to make the tag of this equation to be revealed along with the last line of the multiline equation, but the tag is revealed right from the beginning. How can I fix this? I'll shamelessly admit, I tried ChatGPT and Gemini, but they failed.
- Drawing a thick arrow with different fill and outline colorsby 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);
- Automatically reserve space at bottom of second column on first page in twocolumn articleby Srikanth Mohankumar on January 20, 2026 at 9:33 am
I need to automatically reserve empty space at the bottom of the second column on the first page only in a two-column article. This space will be used later for stamping a thumbnail image during PDF post-processing. Requirements: Only affect the first page, second column Reserve approximately 100pt of blank space at the bottom of the column The text in the second column should be shorter to leave this space empty First column should remain at normal height Should be automatic (no manual commands in document body) Must work with LuaLaTeX (TeX Live 2025) I've tried various approaches with @opcol and @outputdblcol but they either create space at the top instead of bottom, or affect all pages instead of just the first page. \documentclass[twocolumn]{article} \usepackage{lipsum} \makeatletter % Need solution here to reserve 100pt at bottom of second column on page 1 \makeatother \begin{document} \title{Sample Document} \author{Author Name} \maketitle \lipsum[1-20] \end{document} Expected result: The second column on page 1 should have normal text at the top, but stop 100pt before the bottom, leaving that space blank for later thumbnail insertion. What I've tried:I attempted using \afterpage with \footnotetext to create the reserved space: \afterpage{\footnotetext{\fbox{\vbox to 100pt{second column reserved space}}}} This works well for short paragraphs, but fails when long paragraphs continue onto the second page - the reserved space appears on the wrong page. I've also tried various approaches with @opcol and @outputdblcol hooks, but they either create space at the top instead of bottom, or affect all pages instead of just the first page. MWE: \documentclass[fleqn,twocolumn]{article} \usepackage{lipsum} \usepackage{afterpage} \makeatletter % Need solution here to reserve 100pt at bottom of second column on page 1 \makeatother \title{Sample} \author{John Doe} \begin{document} \maketitle % This approach fails with long paragraphs \afterpage{\footnotetext{\fbox{\vbox to 100pt{second column reserved space}}}} \begin{abstract} \lipsum[2] \end{abstract} \section{Introduction} Based on prior theoretical literature on gender differences in ambiguity aversion, we put to the test the hypothesis that female workers are more prone to compete when the structural ambiguity of bidding situations is reduced in an online-work setting. Based on prior theoretical literature on gender differences in ambiguity aversion, we put to the test the hypothesis that female workers are more prone to compete when the structural ambiguity of bidding situations is reduced in an online-work setting. Based on prior theoretical literature on gender differences in ambiguity aversion, we put to the test the hypothesis that female workers are more prone to compete when the structural ambiguity of bidding situations is reduced in an online-work setting. Based on prior theoretical literature on gender differences in ambiguity aversion, we put to the test the hypothesis that female workers are more prone to compete when the structural ambiguity of bidding situations is reduced in an online-work setting. Based on prior theoretical literature on gender differences in ambiguity aversion, we put to the test the hypothesis that female workers are more prone to compete when the structural ambiguity of bidding situations is reduced in an online-work setting. Based on prior theoretical literature on gender differences in ambiguity aversion, we put to the test the hypothesis that female workers are more prone to compete when the structural ambiguity of bidding situations is reduced in an online-work setting. Based on prior theoretical literature on gender differences in ambiguity aversion, we put to the test the hypothesis that female workers are more prone to compete when the structural ambiguity of bidding situations is reduced in an online-work setting. Based on prior theoretical literature on gender differences in ambiguity aversion, we put to the test the hypothesis that female workers are more prone to compete when the structural ambiguity of bidding situations is reduced in an online-work setting. Based on prior theoretical literature on gender differences in ambiguity aversion, we put to the test the hypothesis that female workers are more prone to compete when the structural ambiguity of bidding situations is reduced in an online-work setting. Based on prior theoretical literature on gender differences in ambiguity aversion, we put to the test the hypothesis that female workers are more prone to compete when the structural ambiguity of bidding situations is reduced in an online-work setting. \footnote{Number test.} \end{document}
- Does \stretched cause \setupalignment[middle] to be ignored and flushleft instead?by Gary on January 20, 2026 at 7:55 am
In this example, how can the inter-character spacing be increased for a title on a title page and remain centered? Is \stretched not the correct method? If the \globalsize is removed the results are the same. Thank you. \setupbodyfont[libertinus,12pt] \define[1]\globalfsize{\fullrestoreglobalbodyfont\switchtobodyfont[#1]} \startstandardmakeup[doublesided=no] \startalignment[middle] {\globalfsize{30pt} UNSTRETCHED} \blank[7pt] {\globalfsize{30pt}\stretched[factor=0.15]{STRETCHED}} \blank[7pt] {\stretched[factor=0.15]{\globalfsize{30pt}STRETCHED}} \blank[7pt] {\globalfsize{30pt}\stretched[width=55mm]{STRETCHED}} \stopalignment \stopstandardmakeup ADDED Just stumbled across \letterspacing which appears to work. Not sure it is the preferred method but it stays centered. \setupbodyfont[libertinus,12pt] \define[1]\globalfsize{\fullrestoreglobalbodyfont\switchtobodyfont[#1]} \startstandardmakeup[doublesided=no] \startalignment[middle] {\globalfsize{30pt} UNSTRETCHED} \blank[7pt] {\globalfsize{30pt}\letterspacing[0.15]{STRETCHED}} \blank[7pt] {\letterspacing[0.15]{\globalfsize{30pt}STRETCHED}} \blank[7pt] {\globalfsize{30pt}\letterspacing[0.35]{STRETCHED}} \blank[7pt] \stopalignment \stopstandardmakeup
- Can I force expansion in JSONParseArrayMapFunction?by Teepeemm on January 19, 2026 at 6:51 pm
I have a JSON file that I would like to parse, for which I am using the package jsonparse. I would like to split some of the strings in an array and extract that information into separate variables. Unfortunately, it appears that the splitting needs to happen in an expandable context (this is similar to the way that \typeout needs to get an expandable value to . In my case, I was able to specify rescan=false so that the strings are now expandable. But I'm left wondering: would I have been able to split a string that needed rescanning? I had hoped that \exp_args or \use:e would work, but I think it stops at \tl_rescan:nn, which isn't expandable. (Related GitHub issue.) The following code: \documentclass{article} \usepackage{jsonparse} \JSONParse{\myJSONdata}{{"array":["a-b"]}} \typeout{Line 4: \JSONParseValue{\myJSONdata}{array[0]}} % not useful, needs to be expandable \typeout{Line 5: \JSONParseExpandableValue{\myJSONdata}{array[0]}} % useful \ExplSyntaxOn \newcommand{\splitValues}{\splitArg{\JSONParseArrayValue}} \newcommand{\splitArg}[1]{ \item original: ~ #1 \seq_set_split:Nne \l_tmpa_seq { - } { #1 } \item using~seq~items: ~ \seq_item:Nn \l_tmpa_seq {1} ~ and ~ \seq_item:Nn \l_tmpa_seq {2} \exp_args:NNe \str_set:Nn \l_tmpa_str { \seq_item:Nn \l_tmpa_seq {1} } \exp_args:NNe \str_set:Nn \l_tmpb_str { \seq_item:Nn \l_tmpa_seq {2} } \item using~tmp~variables: ~ \l_tmpa_str{} ~ and ~ \l_tmpb_str } \ExplSyntaxOff \begin{document} \begin{itemize} % \splitArg{\JSONParseValue{\myJSONdata}{array[0]}} % causes errors \splitArg{\JSONParseExpandableValue{\myJSONdata}{array[0]}} % good output for one array element \JSONParseArrayMapFunction{\myJSONdata}{array}{\splitValues} % bad output for all array elements \JSONParseArrayMapFunction[rescan=false]{\myJSONdata}{array}{\splitValues} % good output for all array elements \end{itemize} \end{document} has the output Is it possible to have the middle three entries created from \JSONParseArrayMapFunction[rescan=true] but match the first and last three entries?
- Can't get the page dimensions rightby Kristian Nordestgaard on January 19, 2026 at 6:29 pm
I need to typeset a book and for some reason I can not get the dimensions right. I have to use lualatex because of a package that's loaded earlier, and I'm using memoir. It should be simple but it keeps acting up. The dimensions: Page size without bleed: 5.5" x 8.5" (13.97 x 21.59 cm) Page size with bleed: 5.626" x 8.75" (14.29 x 22.23 cm) Here's the MWE: \documentclass[12pt,openany,showtrims]{memoir} \usepackage{lipsum} %% The stock paper size \setstocksize{222.3mm}{142.9mm} %% The 'real' page size \settrimmedsize{139.7mm}{215.9mm}{*} %% The trims \settrims{3.2mm}{3.2mm} %% Spine and trim page margins from main typeblock \setlrmarginsandblock{15mm}{15mm}{*} %% Top and bottom page margins from main typeblock \setulmarginsandblock{15mm}{17mm}{*} \begin{document} \trimLmarks \lipsum[1-6] \lipsum[7-20] \end{document} It just looks wrong, as you can see: I have a feeling that it's something really simple that I'm doing wrong, but think I have started myself blind on this ...
- Missing definition of \smallsetminus with lua-unicode-mathby murray on January 19, 2026 at 4:42 pm
With the unicode-math package, this source gives the expected output, as shown: % !TEX program = lualatex \NeedsTeXFormat{LaTeX2e}[2025-11-01] \documentclass{article} \usepackage{mathtools} \usepackage{fontspec, unicode-math} % OK with this %\usepackage{fontspec, lua-unicode-math} % this gives undefined control sequence \setmainfont[Scale=1.0]{TeXGyreTermesX} \setmathfont{STIX Two Math}[Scale=MatchUppercase,math-style=ISO] \begin{document} $A \smallsetminus B$ \end{document} However, if lua-unicode-math is loaded instead of unicode-math, then an "undefined control sequence" error results. How fix this? Added: in unicode-math-luatex.sty, which is called by unicode-math when lualatex is used, the definition is given by: \cs_set_protected:Npn \smallsetminus { \mathbin{ \mathpalette \__um_smallsetminus: \relax} } \cs_set:Npn \__um_smallsetminus: #1 { \rotatebox{135}{ \smash{ \raisebox{-\height}{$#1\minus$} } }}
- How to make footnote rule appear later in the slide?by Arya1050 on January 19, 2026 at 2:16 pm
I want to make the footnote rule to appear just as the marking text for the first footnote appears on the slide, along with the footnote. I saw this post, where the answer provided only works on a particular slide. But the poster also asked for an automatic solution, which isn't provided there. Essentially, I want a solution that can be written before the main document begins, that is, in the preamble. I could do it manually as in that post, but doesn't hurt to have a shorter, cleaner solution. Can someone provide the automatic solution, or there isn't any? The MWE is the same as the one in the post linked above. Sorry, if there are any mistakes while making this post. This is my first time.
- Is there a "hook" to expand a macro after the end of a path in TikZ?by Rmano on January 18, 2026 at 7:33 pm
I am adding a new feature to circuitikz to simplify the usage of "user-defined" voltages (and currents and "flow"s). The question is not specific to circuitikz, although the MWE is — sorry for the complication. If I manage a smaller MWE I'll post here. The basic question is: when a TikZ \path command is processed (and a \draw, etc., which are basically the same), is it possible to add a hook to be expanded at the end of it? I mean, after the final ; is found. In the following MWE, I would like to add some code to the addcall key so that I do not need to add the final \DoAdvVoltages. Ideally, the macro should be called after each path is finished, but calling it before the end of the environment would be acceptable. In order of preference, the solution should: call \DoAdvVoltages at every end of the path, when in the path the to[..., addcall=...] is used; if that's not possible, call \DoAdvVoltages at the end of the tikzpicture, in every tikzpicture where at least one path used the addcall key; if that's not possible, call the \DoAdvVolteges at the end of every tikzpicture. The solution should be engine-independent (well, it should work in the engines supported by TikZ, basically LaTeX and ConTeXt). Option 3 is easy in LaTeX, I do not know if it's as easy in ConTeXt. Option 2 could be achievable in LaTeX: add a one-shot hook at env/tikzpicture/end the first time it's called, protected by an if, from the .code itself — I'm not sure if this is a use-case possible in the current hook code, I'll dig into it when I have time, but it would be an acceptable answer (Is \AddToHookNext what I'm looking for here?). \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage[RPvoltages]{circuitikz} % just an example \ctikzset{voltage=raised, !v sym/.style={no v symbols}} \newcommand{\placesigns}[2]{% place the +- signs at a fixed distance \path (#1voltage.center) ++(-\ctikzgetdirection{#1}:0.5cm) node[]{$+$}; \path (#1voltage.center) ++(180-\ctikzgetdirection{#1}:0.5cm) node[]{$-$}; } % add a command queue to circuitikz \makeatletter \gdef\local@voltages{} \def\addcommand#1#2{%add to \commands the macro \#1{nodename}{#2} \begingroup \edef\@@name{\ctikzvalof{bipole/name}} \edef\@@temp{% \noexpand\pgfutil@g@addto@macro\noexpand\local@voltages{% \expandafter\noexpand\csname #1\endcsname {\@@name}{#2}% }% }% \@@temp \endgroup } \def\DoAdvVoltages{\local@voltages\relax\gdef\local@voltages{}\ctikz@hook@setfalse} \makeatother % This works, but just for LaTeX (or not?) % Moreover, I'd like to add this from the addcall keys, so that % I don't call it for *every* tikzpicture! % \AddToHook{env/tikzpicture/end}{\DoAdvVoltages} \ctikzset{addmyv/.style = {v={#1}, !v sym, addcall={#1}}} \ctikzset{addcall/.code ={\addcommand{placesigns}{#1}}} \begin{document} \begin{tikzpicture} \draw (3,0) -- ++(1,0) coordinate(Rbot) to[R=R, name=vR, addmyv={$u_R$}] ++(0,+3) -- ++(-1,0); \draw (Rbot) -- ++(2,0) coordinate(Cbot) to[C=C, name=vC, addmyv={$u_C$}] ++(0,+3) -- ++(-2,0); \draw(Cbot) to [L=L, name=vL, addmyv={$u_L$}] ++(2,0); \DoAdvVoltages \end{tikzpicture} \end{document} A partial solution (the option 2 above) could be something like this, that seems to work: \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage[RPvoltages]{circuitikz} % just an example \ctikzset{voltage=raised, !v sym/.style={no v symbols}} \newcommand{\placesigns}[2]{% place the +- signs at a fixed distance \path (#1voltage.center) ++(-\ctikzgetdirection{#1}:0.5cm) node[]{$+$}; \path (#1voltage.center) ++(180-\ctikzgetdirection{#1}:0.5cm) node[]{$-$}; } % add a command queue to circuitikz \makeatletter \newif\ifctikz@hook@set\ctikz@hook@setfalse \gdef\local@voltages{} \def\addcommand#1#2{%add to \commands the macro \#1{nodename}{#2} \begingroup \edef\@@name{\ctikzvalof{bipole/name}} \edef\@@temp{% \noexpand\pgfutil@g@addto@macro\noexpand\local@voltages{% \expandafter\noexpand\csname #1\endcsname {\@@name}{#2}% }% }% \@@temp \endgroup } \def\DoAdvVoltages{\local@voltages\relax\gdef\local@voltages{}% \typeout{EXECUTE DoAdv} \global\ctikz@hook@setfalse } \def\ctikz@set@hook{% \ifctikz@hook@set \else \global\ctikz@hook@settrue % I have no idea if I can do this in context/plain... \ifpgfutil@format@is@latex \typeout{EXECUTE AddToHookNext} \AddToHookNext{env/tikzpicture/end}{\DoAdvVoltages}% \fi \fi } \ctikzset{addcall/.code ={\addcommand{placesigns}{#1}\ctikz@set@hook}} \makeatother % This works, but just for LaTeX (or not?) % \AddToHook{env/tikzpicture/end}{\DoAdvVoltages} \ctikzset{addmyv/.style = {v={#1}, !v sym, addcall={#1}}} \begin{document} \begin{tikzpicture} \draw (3,0) -- ++(1,0) coordinate(Rbot) to[R=R, name=vR, addmyv={$u_R$}] ++(0,+3) -- ++(-1,0); \draw (Rbot) -- ++(2,0) coordinate(Cbot) to[C=C, name=vC, addmyv={$u_C$}] ++(0,+3) -- ++(-2,0); \draw(Cbot) to [L=L, name=vL, addmyv={$u_L$}] ++(2,0); \end{tikzpicture} \begin{tikzpicture} \draw (3,0) -- ++(1,0) coordinate(Rbot) to[R=R, name=vR, addmyv={$u_R$}] ++(0,+3) -- ++(-1,0); \draw (Rbot) -- ++(2,0) coordinate(Cbot) to[C=C, name=vC, addmyv={$u_C$}] ++(0,+3) -- ++(-2,0); \draw(Cbot) to [L=L, name=vL, addmyv={$u_L$}] ++(2,0); \end{tikzpicture} \end{document} But clearly, this is not valid (I think) for ConTeXt at all.