• tabularray, how to adjust space between table lastfoot
    by Zarko on March 5, 2026 at 3:53 pm

    In the following (not so minimal) MWE \documentclass[border={1mm 3mm}, 11pt]{standalone} %---------------------------------------------------------------% \usepackage[aboveskip=0.5ex, belowskip=0.5ex, format=plain, font = {stretch=0.84, scriptsize}, labelfont = bf, labelsep = colon, singlelinecheck = off]{caption} \usepackage{tabularray} \SetTblrStyle{note}{\tiny} \SetTblrStyle{remark}{\tiny} \usepackage{tblr-extras} \UseTblrLibrary{booktabs, caption, siunitx} \sisetup{range-units = single, range-phrase = {/} } %---------------------------------------------------------------% \begin{document} \begin{talltblr}[ caption = {Specifikacije razredov lastnosti večrodovnih optičnih vlaken.}, label = {tab:kabli-4}, note{*} = {EMB (Effective Modal Bandwidth) je mera kapacitete večrodovnih vlaken. Pove, koliko podatkov lahko prenesemo na dani razdalji. Maksimalni EMB je pri $\lambda=\qty{850}{\micro\metre}$.}, remark{Opomba} = {Razredi kakovosti določajo tudi barvo plaščev optičnih vlaken. Ujemajo se z barvami vrstic v tabeli.} ]{colsep = 3pt, colspec = {@{} *{5}{Q[c]} Q[c, si={table-format=5.0}] Q[c, si={table-format=3.0}] Q[c] @{}}, cells = {font=\scriptsize\linespread{0.84}\selectfont}, cell{1}{1-3,8} = {r=2}{}, cell{1}{4,6} = {c=2}{}, rowsep = 0pt, row{1,2} = {guard} } \toprule {oznaka\\ razreda} & {TIA\\standard} & {premer\\ jedro/plašč} & slabljenje (db/km), & & EMB\TblrNote{*} (MHz$\cdot$km), & & vir \\ \cmidrule[lr]{4-5} \cmidrule[lr]{6-8} & & & \qty{850}{nm} & \qty{1300}{nm} & \qty{850}{nm} & \qty{1300}{nm} & \\ \bottomrule %---------------- \end{talltblr} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \end{document} I like to reduce vertical space between table and (bottom rule) and table note remark. How to do this?

  • Prevent `babel` from interfering with Lua code?
    by Denis Bitouzé on March 5, 2026 at 3:15 pm

    The following MCE works as expected. \documentclass{article} % \usepackage{babel} % \shorthandoff*{~} \begin{document} \directlua{ local n=0 if n~=42 then tex.print("Foo") else tex.print("Bar") end } \end{document} However, if babel is loaded, the ~= operator in the Lua code causes the compilation to fail: [\directlua]:1: 'then' expected near '\'. l.7 } ? If ~= is replaced by == so I suspected the babel shorthands and, indeed, \shorthandoff*{~} did the trick. But I'm not sure this is completely safe so is there a way to prevent babel from interfering with Lua code?

  • aerospace test questions
    by destine-lee destine-lee on March 5, 2026 at 3:13 pm

    \begin{array}{|c|} \hline \begin{minipage}{0.45\textwidth} \begin{center} \begin{tikzpicture}[scale=0.7] \draw (0,0) circle (1.5cm); \draw[thick, blue] (-1.5,0) -- (1.5,0); \fill[brown] (0,-1.5) arc (-90:-270:1.5cm and 0.6cm) -- cycle; \fill[blue] (0,1.5) arc (90:270:1.5cm and 0.6cm) -- cycle; \draw[yellow, very thick] (-0.3,0) -- (0.3,0); \draw[yellow, very thick] (0,-0.1) -- (0,0.1); \node at (0,0.6) {$10^\circ$}; \draw[yellow, very thick] (-0.1,0.6) -- (0.1,0.6); \node at (0,1.2) {$20^\circ$}; \draw[yellow, very thick] (-0.1,1.2) -- (0.1,1.2); \draw[<->, very thick] (2, -0.2) -- (2, 0.2); \node at (2.5, 0) {Bank}; \end{tikzpicture} \end{center} \end{minipage} \\ \hline \text{Attitude Indicator} \\ \hline \end{array}

  • tabularx: parbox in multicolumn with height, which is an integer multiple of a table row
    by cis on March 5, 2026 at 2:46 pm

    I want to insert a multicolumn into a tabularx, with a breakable textbox that has a height of exactly n table rows (i.e., n \baselineskips), where n is an integer multiple. So I used a parbox; and placed an fcolorbox (without spaces) around it to illustrate the dimensions. Why does here a gap occur, and how do I eliminate the gap? PS: To clarify, it's important (for the background work) that the box has a height of exactly n (e.g. n=6) \baselineskip, without gap that makes an extra height (in opposite to an optical correction). MWE: \documentclass[paper=a5]{scrarticle} \usepackage[ margin=12mm, showframe=false, ]{geometry} \usepackage{tabularx} \usepackage{tikz} \begin{document} \section{Table with Titlebox} \pgfmathtruncatemacro\TitleRows{6} \pgfmathsetlengthmacro\Titleheight{\TitleRows*\baselineskip} \newcommand\MyTitle{% \begingroup \setlength{\fboxsep}{0pt}% \setlength{\fboxrule}{\arrayrulewidth}% \fcolorbox{red}{yellow!22}{% fcolorbox for better view \parbox[t][\Titleheight][t]{\dimexpr\hsize-2\fboxrule\relax}{% Breakable titlebox, which should have an heigth from exactly \TitleRows \verb+\baselineskip+s. }% }% \endgroup} %\noindent\MyTitle %\mytablefont \noindent % Verhindert Einzug der gesamten Tabelle \begin{tabularx}{\textwidth}{|X|c|c|} \hline Column 1 & Column 2 & Column 3 \\ \hline \multicolumn{3}{|@{} p{\dimexpr\textwidth-2\arrayrulewidth} @{}|}{% \MyTitle } \\ \hline A & B & C \\ \hline \end{tabularx} \end{document}

  • Using marginnote with landscape
    by richard on March 5, 2026 at 1:58 pm

    A manuscript I am typesetting to be published includes a long, wide table that I think would be best formatted as a multi-page longtable environment inside a landscape environment. The printed book will use \marginnote to give the manuscript page number. This works fine, except on the landscape page where the \marginnote overlaps the text. Here is a MWE showing the problem (which manifests without the longtable): \documentclass[a4paper,oneside]{book} \usepackage{marginnote} \usepackage{pdflscape} \usepackage{lipsum} \newcommand\pg{\marginnote{\textbf{Page}}} \begin{document} \pg \lipsum[1] \lipsum[2][1-4] \pg \lipsum[2][5-] \begin{landscape} \pg \lipsum[3] \end{landscape} \end{document} Is there any way to make a \marginnote work inside a landscape environment? The marginnote manual says: The marginnote package needs to know the real width of the text area to find the right margin. While some environments (e.g., of the framed package) change \textwidth, marginnote defines its own text width macro. If you change the text area after \begin{document} you should add \edef\marginnotetextwidth{\the\textwidth} after changing the text area. You may want to do this globally using \xdef instead of \edef. Most users will never need to change \marginnotetextwidth. I've tried adding this line (both with \edef and with \xdef) inside the landscape environment, but it makes no difference. Setting it to \the\linewidth shifts the \marginnote somewhat to the right, but it still overlaps the text. Hardcoding a \marginnotetextwidth of about 332mm inside the landscape environment broadly works in this test example, but I don't understand why, as this is substantially larger than the dimensions of the A4 paper (210mm × 297mm). In cases it matters, I'm using xelatex, but it also happens with pdflatex.

  • Hyperref error in conjunction with subcaption
    by Folco on March 5, 2026 at 12:25 pm

    I need to produce a figure containing three sub-figures, each one with its own sub-caption. I use a freshly installed MiKTeX (latest version) with all packages freshly updated. I load the packages subcaption and graphicx and the figure is produced correctly, with the main caption and the three sub-captions. Next, I want to add hyperlinks, so I load the hyperref package as the last one (I understand this is required). I get an error: MWE.tex: error: 34: Package caption Error: Something's wrong--perhaps a missing \caption(caption) in the last figure or table. \end{document} Here is the minimal working example (MWE) producing the error: \documentclass{article} \usepackage{subcaption} \usepackage{graphicx} % Commenting out the next line removes the error, but hyperlinks are not generated. \usepackage{hyperref} % To have automatic internal hyperlinks \begin{document} \noindent Fig.~\ref{figure:fig1} contains sub-figures~\ref{sub1}, \ref{sub2} and ~\ref{sub3}. \begin{figure}[!ht] \centering \caption{This is the main figure caption.} \label{figure:fig1} \begin{subfigure}{0.32\textwidth} \includegraphics[width=\textwidth]{example-image} \caption{Sub-caption 1} \label{sub1} \end{subfigure} \begin{subfigure}{0.32\textwidth} \includegraphics[width=\textwidth]{example-image} \caption{Sub-caption 2} \label{sub2} \end{subfigure} \begin{subfigure}{0.32\textwidth} \includegraphics[width=\textwidth]{example-image} \caption{Sub-caption 3} \label{sub3} \end{subfigure} \end{figure} \end{document} Besides the above error, I also get the following (strange) warnings: subcaption.sty: warning: : You have requested, on input line 43, version `2010/01/09' of package caption, but only version `2008/04/01 v3.1h Customizing captions (AR)' is available. MWE.tex: warning: : \caption will not be redefined since it's already redefined by a document class or package which is unknown to the caption package. Thak you for any help. Folco

  • zref-clever as drop-in replacement for cleveref
    by Gargantuar on March 5, 2026 at 11:51 am

    I'm trying to define a drop-in replacement for cleveref by using zref-clever. There are, however, issues with amsmath's multiple parsing of equation environments and its redefinitions of \label. The MWE \documentclass{article} \usepackage{amsmath} \usepackage{zref-clever} \newcommand{\cref}{\zcref} \newcommand{\Cref}{\zcref[S]} \newcommand{\crefname}[3]{\zcRefTypeSetup{#1}{name-sg=#2, name-pl=#3}} \makeatletter \NewCommandCopy{\my@label}{\label} \RenewDocumentCommand{\label}{om}{\IfValueT{#1}{\zcsetup{reftype=#1}}\my@label{#2}} \makeatother \crefname{eqn}{my eqn}{my eqns} \begin{document} \begin{equation} \label[eqn]{myeqn} \end{equation} \zcref{myeqn} \end{document} gives the following error: ./test.tex:20: Use of \df@label doesn't match its definition. \endmathdisplay@a ... \ltx@label \@xp {\df@label } \fi \fi \ifnum \dspbrk@lvl... l.20 \end{equation} If you say, e.g., `\def\a1{...}', then you must always put `1' after `\a', since control sequence names are made up of letters only. The macro here has not been followed by the required stuff, so I'm ignoring it. I also tried to append the optional argument, i.e., \label{myeqn}[eqn], but the [eqn] isn't picked up by \label. Any help is greatly appreciated.

  • Will MikTex support Apple Aarch64?
    by Georgie Orman on March 5, 2026 at 10:17 am

    I'm currently using MikTeX on my M2 Mac and this past month, a notification has popped-up stating that Apple deprecating support for x86-64 apps on MacOS. Now, from what I understand, MikTeX still does not provide a precompliled binary of MikTeX for Apple aarch64, but is there a timeline for this to be rectified?

  • Markers for running headers in reledmac/reledpar cause wrong vertical size in text
    by Cor on March 5, 2026 at 9:43 am

    I am finishing a greek-german edition -- left and right pages -- with reledmac/reledpar. All works fine except for the running headers for which I need markers in the main texts (greek and german). I used many definitions but so far they all cause problems in the vertical size of the lines in the main texts. I hope someone sees the mistakes in my definitions. \documentclass{book} \usepackage{fontspec} \setmainfont{Arial} \usepackage{reledmac} \usepackage{reledpar} \usepackage{xcolor} % ------------------------------------------------ % Header (KOMA) % ------------------------------------------------ \usepackage[markcase=noupper,automark]{scrlayer-scrpage} \clearpairofpagestyles \automark[chapter]{part} \lehead{% \pagemark\enspace\ParRangeL\hfill% \makebox[0pt][c]{\leftmark}% \hfill\mbox{}% } \rohead{% \mbox{}\hfill% \makebox[0pt][c]{\rightmark}% \hfill\ParRangeR\enspace\pagemark% } \pagestyle{scrheadings} % nothing in footers \ofoot{} \setlength\emergencystretch{2.5em} % ------------------------------------------------ % reledmac basics % ------------------------------------------------ \lineation{page} \linenummargin{outer} % ------------------------------------------------ % Paragraph marker % ------------------------------------------------ % THIS PART CAUSES THE PROBLEMS % Mark-Klassen \newmarks\ParMarkL \newmarks\ParMarkR % Zähler \newcounter{parcntL} \newcounter{parcntR} \newcommand{\parcntsep}{.4em} \newcommand{\parcntL}{% \stepcounter{parcntL}% \marks\ParMarkL{\theparcntL}% \leavevmode \raisebox{0.2ex}[0pt][0pt]{\smash{\color{blue}{\theparcntL}}}% \kern\parcntsep \ignorespaces } \newcommand{\parcntR}{% \stepcounter{parcntR}% \marks\ParMarkL{\theparcntL}% \leavevmode \raisebox{0.2ex}[0pt][0pt]{\smash{\color{blue}{\theparcntR}}}% \kern\parcntsep \ignorespaces } % --- "§first--§last" aus Marks bauen (mit Einzeltreffer-Abkürzung) \makeatletter \newcommand{\ParRangeFromMarks}[2]{% \begingroup \edef\@first{#1}\edef\@last{#2}% \ifx\@first\@empty % kein Paragraph auf der Seite -> nichts \else \ifx\@first\@last §\,\@first% \else §§\,\@first--\@last% \fi \fi \endgroup } \makeatother \newcommand{\ParRangeL}{% \ParRangeFromMarks{\firstmarks\ParMarkL}{\botmarks\ParMarkL}% } \newcommand{\ParRangeR}{% \ParRangeFromMarks{\firstmarks\ParMarkR}{\botmarks\ParMarkR}% } % ------------------------------------------------ % Document % ------------------------------------------------ \begin{document} \begin{pages} % ================= LEFT ================= \begin{Leftside} \beginnumbering \pstart \parcntL ἡγησάμην εἶναι μηδὲ τοῦτον ἀνεξέταστον καταλιπεῖν, κατηγορίαν ἡμῶν ἄντικρυς ὡς ἐν δίκῃ γεγραφότα. \parcntL Καὶ γὰρ αὖ κἀκεῖνο τοῖς πολλοῖς ἀνθρώποις ὁρῶ παρακολουθοῦν. τοῦτον Ὅταν τις ἀρξάμενος βλασφημεῖν, Ἕτερον αὐτὸς ἐλέγχηται περὶ τῶν αὐτῷ προσόντων κακῶν. \pend \endnumbering \end{Leftside} % ================= RIGHT ================= \begin{Rightside} \beginnumbering \pstart \parcntR Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. \parcntR Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. \pend \endnumbering \end{Rightside} \end{pages} \Pages \end{document}

  • Tikz error on a not-so-old file (once working)
    by user126154 on March 5, 2026 at 9:00 am

    I have an old latex file that in 2019 was perfectly ok. Today (in 2026) I try to compile the source and I get an error ERROR: Package tikz Error: Cannot parse this coordinate. The point in the file where it seems to be an error (according to emacs) is the following scope environment: \foreach\a in{(-30.5,4),(-13,9),(-16.5,-7.5),(34,0),(53,0),(72,0)} { \begin{scope}[shift={\a}] \draw (0,0) to[out=30, in=150] (4,0); \draw (-1,.5) to[out=-30, in=-150] (5,.5); \end{scope} } The weird thing is that file was completely fine and compiling some years ago! I isolated the problem creating a test file \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \foreach\a in{(10,2), (5,-3)} { \begin{scope}[shift={\a}] \draw (0,0) to (2,2); \end{scope} } \end{tikzpicture} \end{document} and I get the same error. So, my question is What's wrong now, and how I can fix it in the current version of tikz?

  • Padded page number with hyperref
    by Myvh on March 5, 2026 at 8:09 am

    My goal is to have zero-padded page numbers in the footer and in the table of contents. I use the code from this answer. However, it breaks with the hyperref package, only when the total page number has one digit, with the following error: test.tex: error: 86: Use of \??? doesn't match its definition. \newpage. I know that the padding is not needed in this case, but I would like the code to be more robust and also to understand why it breaks in that case. Here is a minimal working example. You can comment out/in \manypages to toggle between the code that breaks or not. \documentclass{article} \usepackage{lastpage} \usepackage{fancyhdr} \usepackage{hyperref} \hypersetup{ colorlinks = true, allcolors = blue } % From https://tex.stackexchange.com/a/730655/228589 \ExplSyntaxOn \NewDocumentCommand{\paddedcounter}{m} { \AtBeginDocument { \cs_if_exist:cF {maxdigits#1} { \cs_gset:cpn {maxdigits#1} {8} } } \AtEndDocument { \iow_now:ce {@mainaux} { \token_to_str:N \maxdigits{#1}{\fp_eval:n{logb(\value{#1}+0.1)+1}} } } \cs_gset:cpn {the#1} { \padded{#1} } } \NewDocumentCommand{\maxdigits}{mm} { \cs_gset:cpn {maxdigits#1}{#2} } \NewExpandableDocumentCommand{\padded}{m} { \prg_replicate:nn { \use:c { maxdigits#1 } - \tl_count:e { \arabic{#1} } } { 0 } \arabic{#1} } \ExplSyntaxOff \paddedcounter{page} \pagestyle{fancy} \fancyhead{} \renewcommand{\headrulewidth}{0pt} \fancyfoot[C]{\thepage\ / \pageref*{LastPage}} \newcommand{\manypages} { \section{Some section} \newpage \section{Some section} \newpage \section{Some section} \newpage \section{Some section} \newpage \section{Some section} \newpage \section{Some section} \newpage \section{Some section} \newpage \section{Some section} \newpage \section{Some section} \newpage \section{Some section} \newpage \section{Some section} \newpage \section{Some section} \newpage \section{Some section} \newpage } \begin{document} \thispagestyle{fancy} \begin{center} {\Huge Some title} \end{center} \tableofcontents \newpage \manypages \end{document}

  • "Something's wrong--perhaps a missing \item." - Theorem environment in \include{chapter}
    by Amber on March 5, 2026 at 7:30 am

    I am setting up an eventually large document for math. So far, it looks like: \documentclass[12pt]{report} \input{preamble} \title{ {TITLE} \\ {\large UNIV NAME} %\\ % {\includegraphics{university.jpg}} } \author{NAME} \date{2026} \begin{document} \maketitle \tableofcontents \include{chapters/prelims} \nocite{*} \bibliographystyle{plain} \bibliography{refs.bib} \end{document} The preamble contains packages that I use, and the definition for the lemma environment: \RequirePackage[utf8]{inputenc} \RequirePackage{amsthm,amsmath,amssymb,amsfonts, enumitem, fancyhdr, comment, graphicx, environ, lastpage} \RequirePackage{jeffe} \graphicspath{ {images/} } \newtheorem{lemma}{Lemma}[chapter] Here is my problem, the prelims file looks like: \chapter{Preliminaries} ... \begin{lemma} LEMMA HERE \end{lemma} ... Whenever I tried to compile, I get the error "Something's wrong--perhaps a missing \item." right after \begin{lemma}. I have reduced the problem to the lemma environment, as having only it in the prelims.tex file is enough to reproduce the error. I have tried some things, including changing how I define the environment but none could work. The best I could get is an infinite compile. Thanks in advance. Edit 2: After some discussion and more troubleshooting, this is a solid MWE candidate (if not just the MWE). \documentclass[12pt]{report} % \RequirePackage[utf8]{inputenc} % \RequirePackage{amsthm,amsmath,amssymb,amsfonts, enumitem, fancyhdr, comment, graphicx, environ, lastpage} \RequirePackage{jeffe} \newtheorem{lemma}{Lemma}[chapter] \begin{document} \begin{lemma} LEMMA HERE \end{lemma} \end{document}

  • An error with `tlmgr update --all` with TL2026?
    by Explorer on March 5, 2026 at 6:45 am

    I was not sure whether the case related to this post (fixed seemly in the comment) and the discussion. I run the tlmgr update --self and tlmgr update --all, here below is the terminal output (full version pastebin):  tlmgr update --all tlmgr.pl: package repository https://mirrors.bfsu.edu.cn/CTAN/systems/texlive/tlnet (not verified: gpg unavailable) =============================================================================== tlmgr itself needs to be updated. Please do this via either tlmgr update --self or by getting the latest updater for Unix-ish systems: https://mirror.ctan.org/systems/texlive/tlnet/update-tlmgr-latest.sh and/or Windows systems: https://mirror.ctan.org/systems/texlive/tlnet/update-tlmgr-latest.exe Then continue with other updates as usual. =============================================================================== tlmgr.pl: An error has occurred. See above messages. Exiting.  tlmgr update --self tlmgr.pl: package repository https://mirrors.sjtug.sjtu.edu.cn/ctan/systems/texlive/tlnet (not verified: gpg unavailable) tlmgr.pl: saving backups to C:/texlive/2026/tlpkg/backups tlmgr.pl: Preparing TeX Live infrastructure update... tlmgr.pl: warning: backup option not implemented for infrastructure update on Windows; continuing anyway. DO NOT CLOSE THIS WINDOW! TeX Live infrastructure update in progress ... Detailed command logging to "C:\texlive\2026\temp\update-self.log" self update: texlive.infra (77655 -> 78218) texlive.infra.windows (77627 -> 77973) tlperl.windows (74256 -> 77975) Infrastructure update finished successfully. You may now close this window.  tlmgr update --all tlmgr.pl: package repository https://mirrors.nju.edu.cn/CTAN/systems/texlive/tlnet (not verified: gpg unavailable) tlmgr.pl: saving backups to C:/texlive/2026/tlpkg/backups [ 1/355] auto-remove: sourceserifpro ... done [ 2/355] auto-remove: sourcesanspro ... done [ 3/355, ??:??/??:??] update: acronym [334k] (73491 -> 78101) ... done [ 4/355, 00:02/55:34] update: adforn [573k] (77682 -> 78142) ... done ... ignore some lines [291/355, 10:08/11:53] update: texlive-scripts [563k] (77932 -> 78266) ... TeXLive::TLUtils::check_file_and_remove: checksums differ for C:\Users\Kasmir\AppData\Local\Temp\cOKvu61Iai\JpoWEm3BT3/texlive-scripts.tar.xz: TeXLive::TLUtils::check_file_and_remove: tlchecksum=a26fa38b9c0d14d23480370eff6d315fb619c59a1132efd3c8e6ce745665327fcf5cfa47ecf9ed0477122a5066f62329d2396b471d6d3fee195b5876c0c63b80, arg=72fe99d15ea55e6a91936fea0ee4f7449fdbb98982292393728d03359ffa6f03a42c6a7db45511e0fb5aed1fe6aa854889bf86c5289d7e061e5f52cc282ae612 TeXLive::TLUtils::check_file_and_remove: backtrace: -> C:/texlive/2026/tlpkg/TeXLive/TLUtils.pm:2773: TeXLive::TLUtils::check_file_and_remove -> C:/texlive/2026/tlpkg/TeXLive/TLPDB.pm:1989: TeXLive::TLUtils::unpack -> C:/texlive/2026/tlpkg/TeXLive/TLPDB.pm:1806: TeXLive::TLPDB::_install_data -> C:/texlive/2026/tlpkg/TeXLive/TLPDB.pm:1722: TeXLive::TLPDB::not_virtual_install_package -> C:\texlive\2026\texmf-dist\scripts\texlive\tlmgr.pl:3499: TeXLive::TLPDB::install_package -> C:\texlive\2026\texmf-dist\scripts\texlive\tlmgr.pl:812: main::action_update -> C:\texlive\2026\texmf-dist\scripts\texlive\tlmgr.pl:718: main::execute_action -> C:\texlive\2026\texmf-dist\scripts\texlive\tlmgr.pl:376: main::main TeXLive::TLUtils::check_file_and_remove: removing C:\Users\Kasmir\AppData\Local\Temp\cOKvu61Iai\JpoWEm3BT3/texlive-scripts.tar.xz, but saving copy in C:\Users\Kasmir\AppData\Local\Temp\iZ5Ey6CKT1 TLPDB::_install_data: downloading did not succeed (check_file_and_remove failed) for https://mirrors.nju.edu.cn/CTAN/systems/texlive/tlnet/archive/texlive-scripts.tar.xz tlmgr.pl: Installation of new version of texlive-scripts failed, trying to unwind. tlmgr.pl: Restoring old package state succeeded. done [292/355, 10:09/11:54] update: texlive-scripts-extra.windows [5k] (77627 -> 77973) ... done ... ingore some lines [355/355, 11:50/11:50] update: collection-latexextra [8k] (77812 -> 78263) ... done tlmgr.pl: action update returned an error; continuing. running mktexlsr ... done running mktexlsr. running updmap-sys ... done running updmap-sys. regenerating language.dat regenerating language.def regenerating language.dat.lua regenerating fmtutil.cnf in C:/texlive/2026/texmf-dist running fmtutil-sys --byengine hitex --no-error-if-no-format --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=C:\Users\Kasmir\AppData\Local\Temp\cOKvu61Iai\J2FWOF8Vby ... OK: hitex.fmt/hitex running fmtutil-sys --byengine euptex --no-error-if-no-format --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=C:\Users\Kasmir\AppData\Local\Temp\cOKvu61Iai\J2FWOF8Vby ... OK: hitex.fmt/hitex euptex.fmt/euptex platex-dev.fmt/euptex uptex.fmt/euptex uplatex.fmt/euptex ptex.fmt/euptex platex.fmt/euptex uplatex-dev.fmt/euptex eptex.fmt/euptex running fmtutil-sys --byengine luahbtex --no-error-if-no-format --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=C:\Users\Kasmir\AppData\Local\Temp\cOKvu61Iai\J2FWOF8Vby ... OK: hitex.fmt/hitex euptex.fmt/euptex platex-dev.fmt/euptex uptex.fmt/euptex uplatex.fmt/euptex ptex.fmt/euptex platex.fmt/euptex uplatex-dev.fmt/euptex eptex.fmt/euptex luahbtex.fmt/luahbtex lualatex-dev.fmt/luahbtex lualatex.fmt/luahbtex optex.fmt/luahbtex running fmtutil-sys --byengine tex --no-error-if-no-format --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=C:\Users\Kasmir\AppData\Local\Temp\cOKvu61Iai\J2FWOF8Vby ... OK: hitex.fmt/hitex euptex.fmt/euptex platex-dev.fmt/euptex uptex.fmt/euptex uplatex.fmt/euptex ptex.fmt/euptex platex.fmt/euptex uplatex-dev.fmt/euptex eptex.fmt/euptex luahbtex.fmt/luahbtex lualatex-dev.fmt/luahbtex lualatex.fmt/luahbtex optex.fmt/luahbtex tex.fmt/tex lollipop.fmt/tex running fmtutil-sys --byengine xetex --no-error-if-no-format --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=C:\Users\Kasmir\AppData\Local\Temp\cOKvu61Iai\J2FWOF8Vby ... OK: hitex.fmt/hitex euptex.fmt/euptex platex-dev.fmt/euptex uptex.fmt/euptex uplatex.fmt/euptex ptex.fmt/euptex platex.fmt/euptex uplatex-dev.fmt/euptex eptex.fmt/euptex luahbtex.fmt/luahbtex lualatex-dev.fmt/luahbtex lualatex.fmt/luahbtex optex.fmt/luahbtex tex.fmt/tex lollipop.fmt/tex xetex.fmt/xetex xelatex-dev.fmt/xetex pdfcsplain.fmt/xetex cont-en.fmt/xetex xelatex.fmt/xetex running fmtutil-sys --byengine aleph --no-error-if-no-format --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=C:\Users\Kasmir\AppData\Local\Temp\cOKvu61Iai\J2FWOF8Vby ... OK: hitex.fmt/hitex euptex.fmt/euptex platex-dev.fmt/euptex uptex.fmt/euptex uplatex.fmt/euptex ptex.fmt/euptex platex.fmt/euptex uplatex-dev.fmt/euptex eptex.fmt/euptex luahbtex.fmt/luahbtex lualatex-dev.fmt/luahbtex lualatex.fmt/luahbtex optex.fmt/luahbtex tex.fmt/tex lollipop.fmt/tex xetex.fmt/xetex xelatex-dev.fmt/xetex pdfcsplain.fmt/xetex cont-en.fmt/xetex xelatex.fmt/xetex aleph.fmt/aleph running fmtutil-sys --byengine pdftex --no-error-if-no-format --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=C:\Users\Kasmir\AppData\Local\Temp\cOKvu61Iai\J2FWOF8Vby ... OK: hitex.fmt/hitex euptex.fmt/euptex platex-dev.fmt/euptex uptex.fmt/euptex uplatex.fmt/euptex ptex.fmt/euptex platex.fmt/euptex uplatex-dev.fmt/euptex eptex.fmt/euptex luahbtex.fmt/luahbtex lualatex-dev.fmt/luahbtex lualatex.fmt/luahbtex optex.fmt/luahbtex tex.fmt/tex lollipop.fmt/tex xetex.fmt/xetex xelatex-dev.fmt/xetex pdfcsplain.fmt/xetex cont-en.fmt/xetex xelatex.fmt/xetex aleph.fmt/aleph pdftex.fmt/pdftex mex.fmt/pdftex pdfcsplain.fmt/pdftex utf8mex.fmt/pdftex xmltex.fmt/pdftex pdfmex.fmt/pdftex pdflatex-dev.fmt/pdftex pdfxmltex.fmt/pdftex jadetex.fmt/pdftex pdfjadetex.fmt/pdftex cont-en.fmt/pdftex texsis.fmt/pdftex mllatex.fmt/pdftex etex.fmt/pdftex pdfetex.fmt/pdftex latex-dev.fmt/pdftex amstex.fmt/pdftex latex.fmt/pdftex pdflatex.fmt/pdftex eplain.fmt/pdftex csplain.fmt/pdftex mptopdf.fmt/pdftex mltex.fmt/pdftex running fmtutil-sys --byengine luatex --no-error-if-no-format --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=C:\Users\Kasmir\AppData\Local\Temp\cOKvu61Iai\J2FWOF8Vby ... OK: hitex.fmt/hitex euptex.fmt/euptex platex-dev.fmt/euptex uptex.fmt/euptex uplatex.fmt/euptex ptex.fmt/euptex platex.fmt/euptex uplatex-dev.fmt/euptex eptex.fmt/euptex luahbtex.fmt/luahbtex lualatex-dev.fmt/luahbtex lualatex.fmt/luahbtex optex.fmt/luahbtex tex.fmt/tex lollipop.fmt/tex xetex.fmt/xetex xelatex-dev.fmt/xetex pdfcsplain.fmt/xetex cont-en.fmt/xetex xelatex.fmt/xetex aleph.fmt/aleph pdftex.fmt/pdftex mex.fmt/pdftex pdfcsplain.fmt/pdftex utf8mex.fmt/pdftex xmltex.fmt/pdftex pdfmex.fmt/pdftex pdflatex-dev.fmt/pdftex pdfxmltex.fmt/pdftex jadetex.fmt/pdftex pdfjadetex.fmt/pdftex cont-en.fmt/pdftex texsis.fmt/pdftex mllatex.fmt/pdftex etex.fmt/pdftex pdfetex.fmt/pdftex latex-dev.fmt/pdftex amstex.fmt/pdftex latex.fmt/pdftex pdflatex.fmt/pdftex eplain.fmt/pdftex csplain.fmt/pdftex mptopdf.fmt/pdftex mltex.fmt/pdftex luatex.fmt/luatex dvilualatex.fmt/luatex dvilualatex-dev.fmt/luatex dviluatex.fmt/luatex luacsplain.fmt/luatex pdfcsplain.fmt/luatex running fmtutil-sys --byengine luajithbtex --no-error-if-no-format --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=C:\Users\Kasmir\AppData\Local\Temp\cOKvu61Iai\J2FWOF8Vby ... OK: hitex.fmt/hitex euptex.fmt/euptex platex-dev.fmt/euptex uptex.fmt/euptex uplatex.fmt/euptex ptex.fmt/euptex platex.fmt/euptex uplatex-dev.fmt/euptex eptex.fmt/euptex luahbtex.fmt/luahbtex lualatex-dev.fmt/luahbtex lualatex.fmt/luahbtex optex.fmt/luahbtex tex.fmt/tex lollipop.fmt/tex xetex.fmt/xetex xelatex-dev.fmt/xetex pdfcsplain.fmt/xetex cont-en.fmt/xetex xelatex.fmt/xetex aleph.fmt/aleph pdftex.fmt/pdftex mex.fmt/pdftex pdfcsplain.fmt/pdftex utf8mex.fmt/pdftex xmltex.fmt/pdftex pdfmex.fmt/pdftex pdflatex-dev.fmt/pdftex pdfxmltex.fmt/pdftex jadetex.fmt/pdftex pdfjadetex.fmt/pdftex cont-en.fmt/pdftex texsis.fmt/pdftex mllatex.fmt/pdftex etex.fmt/pdftex pdfetex.fmt/pdftex latex-dev.fmt/pdftex amstex.fmt/pdftex latex.fmt/pdftex pdflatex.fmt/pdftex eplain.fmt/pdftex csplain.fmt/pdftex mptopdf.fmt/pdftex mltex.fmt/pdftex luatex.fmt/luatex dvilualatex.fmt/luatex dvilualatex-dev.fmt/luatex dviluatex.fmt/luatex luacsplain.fmt/luatex pdfcsplain.fmt/luatex luajithbtex.fmt/luajithbtex running fmtutil-sys --byengine luajittex --no-error-if-no-format --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=C:\Users\Kasmir\AppData\Local\Temp\cOKvu61Iai\J2FWOF8Vby ... OK: hitex.fmt/hitex euptex.fmt/euptex platex-dev.fmt/euptex uptex.fmt/euptex uplatex.fmt/euptex ptex.fmt/euptex platex.fmt/euptex uplatex-dev.fmt/euptex eptex.fmt/euptex luahbtex.fmt/luahbtex lualatex-dev.fmt/luahbtex lualatex.fmt/luahbtex optex.fmt/luahbtex tex.fmt/tex lollipop.fmt/tex xetex.fmt/xetex xelatex-dev.fmt/xetex pdfcsplain.fmt/xetex cont-en.fmt/xetex xelatex.fmt/xetex aleph.fmt/aleph pdftex.fmt/pdftex mex.fmt/pdftex pdfcsplain.fmt/pdftex utf8mex.fmt/pdftex xmltex.fmt/pdftex pdfmex.fmt/pdftex pdflatex-dev.fmt/pdftex pdfxmltex.fmt/pdftex jadetex.fmt/pdftex pdfjadetex.fmt/pdftex cont-en.fmt/pdftex texsis.fmt/pdftex mllatex.fmt/pdftex etex.fmt/pdftex pdfetex.fmt/pdftex latex-dev.fmt/pdftex amstex.fmt/pdftex latex.fmt/pdftex pdflatex.fmt/pdftex eplain.fmt/pdftex csplain.fmt/pdftex mptopdf.fmt/pdftex mltex.fmt/pdftex luatex.fmt/luatex dvilualatex.fmt/luatex dvilualatex-dev.fmt/luatex dviluatex.fmt/luatex luacsplain.fmt/luatex pdfcsplain.fmt/luatex luajithbtex.fmt/luajithbtex luajittex.fmt/luajittex running fmtutil-sys --byfmt mf --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=C:\Users\Kasmir\AppData\Local\Temp\cOKvu61Iai\J2FWOF8Vby ... OK: hitex.fmt/hitex euptex.fmt/euptex platex-dev.fmt/euptex uptex.fmt/euptex uplatex.fmt/euptex ptex.fmt/euptex platex.fmt/euptex uplatex-dev.fmt/euptex eptex.fmt/euptex luahbtex.fmt/luahbtex lualatex-dev.fmt/luahbtex lualatex.fmt/luahbtex optex.fmt/luahbtex tex.fmt/tex lollipop.fmt/tex xetex.fmt/xetex xelatex-dev.fmt/xetex pdfcsplain.fmt/xetex cont-en.fmt/xetex xelatex.fmt/xetex aleph.fmt/aleph pdftex.fmt/pdftex mex.fmt/pdftex pdfcsplain.fmt/pdftex utf8mex.fmt/pdftex xmltex.fmt/pdftex pdfmex.fmt/pdftex pdflatex-dev.fmt/pdftex pdfxmltex.fmt/pdftex jadetex.fmt/pdftex pdfjadetex.fmt/pdftex cont-en.fmt/pdftex texsis.fmt/pdftex mllatex.fmt/pdftex etex.fmt/pdftex pdfetex.fmt/pdftex latex-dev.fmt/pdftex amstex.fmt/pdftex latex.fmt/pdftex pdflatex.fmt/pdftex eplain.fmt/pdftex csplain.fmt/pdftex mptopdf.fmt/pdftex mltex.fmt/pdftex luatex.fmt/luatex dvilualatex.fmt/luatex dvilualatex-dev.fmt/luatex dviluatex.fmt/luatex luacsplain.fmt/luatex pdfcsplain.fmt/luatex luajithbtex.fmt/luajithbtex luajittex.fmt/luajittex mf.fmt/mf-nowin running fmtutil-sys --byhyphen "language.dat" --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=C:\Users\Kasmir\AppData\Local\Temp\cOKvu61Iai\J2FWOF8Vby ... OK: hitex.fmt/hitex euptex.fmt/euptex platex-dev.fmt/euptex uptex.fmt/euptex uplatex.fmt/euptex ptex.fmt/euptex platex.fmt/euptex uplatex-dev.fmt/euptex eptex.fmt/euptex luahbtex.fmt/luahbtex lualatex-dev.fmt/luahbtex lualatex.fmt/luahbtex optex.fmt/luahbtex tex.fmt/tex lollipop.fmt/tex xetex.fmt/xetex xelatex-dev.fmt/xetex pdfcsplain.fmt/xetex cont-en.fmt/xetex xelatex.fmt/xetex aleph.fmt/aleph pdftex.fmt/pdftex mex.fmt/pdftex pdfcsplain.fmt/pdftex utf8mex.fmt/pdftex xmltex.fmt/pdftex pdfmex.fmt/pdftex pdflatex-dev.fmt/pdftex pdfxmltex.fmt/pdftex jadetex.fmt/pdftex pdfjadetex.fmt/pdftex cont-en.fmt/pdftex texsis.fmt/pdftex mllatex.fmt/pdftex etex.fmt/pdftex pdfetex.fmt/pdftex latex-dev.fmt/pdftex amstex.fmt/pdftex latex.fmt/pdftex pdflatex.fmt/pdftex eplain.fmt/pdftex csplain.fmt/pdftex mptopdf.fmt/pdftex mltex.fmt/pdftex luatex.fmt/luatex dvilualatex.fmt/luatex dvilualatex-dev.fmt/luatex dviluatex.fmt/luatex luacsplain.fmt/luatex pdfcsplain.fmt/luatex luajithbtex.fmt/luajithbtex luajittex.fmt/luajittex mf.fmt/mf-nowin pdflatex-dev.fmt/pdftex latex-dev.fmt/pdftex uplatex.fmt/euptex lualatex.fmt/luahbtex platex.fmt/euptex latex.fmt/pdftex pdfxmltex.fmt/pdftex platex-dev.fmt/euptex dvilualatex-dev.fmt/luatex uplatex-dev.fmt/euptex xelatex.fmt/xetex pdfjadetex.fmt/pdftex lualatex-dev.fmt/luahbtex eplain.fmt/pdftex xelatex-dev.fmt/xetex pdflatex.fmt/pdftex jadetex.fmt/pdftex mllatex.fmt/pdftex dvilualatex.fmt/luatex xmltex.fmt/pdftex running fmtutil-sys --byhyphen "language.def" --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=C:\Users\Kasmir\AppData\Local\Temp\cOKvu61Iai\J2FWOF8Vby ... OK: hitex.fmt/hitex euptex.fmt/euptex platex-dev.fmt/euptex uptex.fmt/euptex uplatex.fmt/euptex ptex.fmt/euptex platex.fmt/euptex uplatex-dev.fmt/euptex eptex.fmt/euptex luahbtex.fmt/luahbtex lualatex-dev.fmt/luahbtex lualatex.fmt/luahbtex optex.fmt/luahbtex tex.fmt/tex lollipop.fmt/tex xetex.fmt/xetex xelatex-dev.fmt/xetex pdfcsplain.fmt/xetex cont-en.fmt/xetex xelatex.fmt/xetex aleph.fmt/aleph pdftex.fmt/pdftex mex.fmt/pdftex pdfcsplain.fmt/pdftex utf8mex.fmt/pdftex xmltex.fmt/pdftex pdfmex.fmt/pdftex pdflatex-dev.fmt/pdftex pdfxmltex.fmt/pdftex jadetex.fmt/pdftex pdfjadetex.fmt/pdftex cont-en.fmt/pdftex texsis.fmt/pdftex mllatex.fmt/pdftex etex.fmt/pdftex pdfetex.fmt/pdftex latex-dev.fmt/pdftex amstex.fmt/pdftex latex.fmt/pdftex pdflatex.fmt/pdftex eplain.fmt/pdftex csplain.fmt/pdftex mptopdf.fmt/pdftex mltex.fmt/pdftex luatex.fmt/luatex dvilualatex.fmt/luatex dvilualatex-dev.fmt/luatex dviluatex.fmt/luatex luacsplain.fmt/luatex pdfcsplain.fmt/luatex luajithbtex.fmt/luajithbtex luajittex.fmt/luajittex mf.fmt/mf-nowin pdflatex-dev.fmt/pdftex latex-dev.fmt/pdftex uplatex.fmt/euptex lualatex.fmt/luahbtex platex.fmt/euptex latex.fmt/pdftex pdfxmltex.fmt/pdftex platex-dev.fmt/euptex dvilualatex-dev.fmt/luatex uplatex-dev.fmt/euptex xelatex.fmt/xetex pdfjadetex.fmt/pdftex lualatex-dev.fmt/luahbtex eplain.fmt/pdftex xelatex-dev.fmt/xetex pdflatex.fmt/pdftex jadetex.fmt/pdftex mllatex.fmt/pdftex dvilualatex.fmt/luatex xmltex.fmt/pdftex euptex.fmt/euptex hitex.fmt/hitex xetex.fmt/xetex luajittex.fmt/luajittex luatex.fmt/luatex pdftex.fmt/pdftex luajithbtex.fmt/luajithbtex luahbtex.fmt/luahbtex dviluatex.fmt/luatex etex.fmt/pdftex eptex.fmt/euptex pdfetex.fmt/pdftex running fmtutil-sys --byhyphen "language.dat.lua" --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=C:\Users\Kasmir\AppData\Local\Temp\cOKvu61Iai\J2FWOF8Vby ... OK: hitex.fmt/hitex euptex.fmt/euptex platex-dev.fmt/euptex uptex.fmt/euptex uplatex.fmt/euptex ptex.fmt/euptex platex.fmt/euptex uplatex-dev.fmt/euptex eptex.fmt/euptex luahbtex.fmt/luahbtex lualatex-dev.fmt/luahbtex lualatex.fmt/luahbtex optex.fmt/luahbtex tex.fmt/tex lollipop.fmt/tex xetex.fmt/xetex xelatex-dev.fmt/xetex pdfcsplain.fmt/xetex cont-en.fmt/xetex xelatex.fmt/xetex aleph.fmt/aleph pdftex.fmt/pdftex mex.fmt/pdftex pdfcsplain.fmt/pdftex utf8mex.fmt/pdftex xmltex.fmt/pdftex pdfmex.fmt/pdftex pdflatex-dev.fmt/pdftex pdfxmltex.fmt/pdftex jadetex.fmt/pdftex pdfjadetex.fmt/pdftex cont-en.fmt/pdftex texsis.fmt/pdftex mllatex.fmt/pdftex etex.fmt/pdftex pdfetex.fmt/pdftex latex-dev.fmt/pdftex amstex.fmt/pdftex latex.fmt/pdftex pdflatex.fmt/pdftex eplain.fmt/pdftex csplain.fmt/pdftex mptopdf.fmt/pdftex mltex.fmt/pdftex luatex.fmt/luatex dvilualatex.fmt/luatex dvilualatex-dev.fmt/luatex dviluatex.fmt/luatex luacsplain.fmt/luatex pdfcsplain.fmt/luatex luajithbtex.fmt/luajithbtex luajittex.fmt/luajittex mf.fmt/mf-nowin pdflatex-dev.fmt/pdftex latex-dev.fmt/pdftex uplatex.fmt/euptex lualatex.fmt/luahbtex platex.fmt/euptex latex.fmt/pdftex pdfxmltex.fmt/pdftex platex-dev.fmt/euptex dvilualatex-dev.fmt/luatex uplatex-dev.fmt/euptex xelatex.fmt/xetex pdfjadetex.fmt/pdftex lualatex-dev.fmt/luahbtex eplain.fmt/pdftex xelatex-dev.fmt/xetex pdflatex.fmt/pdftex jadetex.fmt/pdftex mllatex.fmt/pdftex dvilualatex.fmt/luatex xmltex.fmt/pdftex euptex.fmt/euptex hitex.fmt/hitex xetex.fmt/xetex luajittex.fmt/luajittex luatex.fmt/luatex pdftex.fmt/pdftex luajithbtex.fmt/luajithbtex luahbtex.fmt/luahbtex dviluatex.fmt/luatex etex.fmt/pdftex eptex.fmt/euptex pdfetex.fmt/pdftex setting up ConTeXt caches: running mtxrun --generate ...done done running mtxrun --generate. running mtxrun --luatex --generate ...done done running mtxrun --luatex --generate. tlmgr.pl: package log updated: C:/texlive/2026/texmf-var/web2c/tlmgr.log tlmgr.pl: command log updated: C:/texlive/2026/texmf-var/web2c/tlmgr-commands.log tlmgr.pl: An error has occurred. See above messages. Exiting. At the end, it complained that : tlmgr.pl: An error has occurred. See above messages. Exiting. And I found that: tlmgr.pl: action update returned an error; continuing. I wonder what happened with my machine, and how to fix this?

  • Fadings and shadings with shifted origins for strokes in TikZ
    by karlh on March 4, 2026 at 11:59 pm

    I have been working with fadings a lot recently, and I encountered a fading in Inkscape that I'm having trouble translating to an equivalent TikZ implementation. The situation is a faded stroke for which the fading boundaries do not coincide with the outline of the shape, and the "center" of the fading is not the center of the object. I have worked out a method that works for filled paths, such as: \begin{tikzpicture} \path [fill=orange,path fading=fade right] (0,0) rectangle (2,2); \draw [very thin,->] (0,1) -- (2,1); \begin{scope} \clip (0,-3) rectangle (2,-1); \fill [orange] (-1,-4) rectangle (1.02,0); \path [fill=orange,path fading=fade right] (1,-3) rectangle (2.5,0); \end{scope} \draw [overlay,very thin,->] (1,-2) -- (3,-2); \end{tikzpicture} where the arrow indicates the start and end points of the shading (equivalent to what you would see with Inkscape's node tool). Similarly, the shading can be rotated with a similar shift in origin like so: \begin{tikzpicture} \path [fill=orange,path fading=fade right,fading angle=30] (0,0) rectangle (2,2); \draw [very thin,->] (0.133974,0.5) -- ++(30:2); \begin{scope} \clip (0,-3) rectangle (2,-1); \begin{scope}[transform canvas={rotate around={30:(1,-2)}}] \fill [orange] (-3,-4) rectangle (1.02,0); \path [fill=orange,path fading=fade right] (1,-4) rectangle (2,0); \end{scope} \end{scope} \draw [overlay,very thin,->] (1,-2) -- ++(30:2); \end{tikzpicture} This works fine for filled regions that are to be shaded or faded. However, the same trick—filling a larger object and then clipping—will not work with strokes that are to be shaded or faded. Is there a way to tell TikZ that the origin of the shading should be different than the bounding box of the object? It would also be desirable for the resulting line to be solid even if it goes off the "edge" of the square that defines the fading. I have also had trouble with faded strokes (without origin translation) not appearing in the PDF, but from a post I found while researching this, the issue is a PDF viewer issue (i.e., Evince and Papers display faded strokes incorrectly, but they show up correctly in MuPDF, say); if there is a way to avoid that problem, great, but otherwise I will chalk that up to "not a TikZ problem." The result should look something like this: Here's the whole thing, with headers: \documentclass{article} \usepackage{tikz} \usetikzlibrary{fadings} \tikzfading[name=fade right,left color=transparent!0,right color=transparent] \begin{document} I have been working with fadings a lot recently, and I encountered a fading in Inkscape that I'm having trouble translating to an equivalent Ti*k*Z implementation. The situation is a faded *stroke* for which the fading boundaries do not coincide with the outline of the shape. I have worked out a method that works for *filled* paths, such as: \begin{center} \begin{tikzpicture} \path [fill=orange,path fading=fade right] (0,0) rectangle (2,2); \draw [very thin,->] (0,1) -- (2,1); \begin{scope} \clip (0,-3) rectangle (2,-1); \fill [orange] (-1,-4) rectangle (1.02,0); \path [fill=orange,path fading=fade right] (1,-3) rectangle (2.5,0); \end{scope} \draw [overlay,very thin,->] (1,-2) -- (3,-2); \end{tikzpicture} \end{center} where the arrow indicates the start and end points of the shading (equivalent to what you would see with Inkscape's node tool). Similarly, the shading can be *rotated* with a similar shift in origin like so: \begin{center} \begin{tikzpicture} \path [fill=orange,path fading=fade right,fading angle=30] (0,0) rectangle (2,2); \draw [very thin,->] (0.133974,0.5) -- ++(30:2); \begin{scope} \clip (0,-3) rectangle (2,-1); \begin{scope}[transform canvas={rotate around={30:(1,-2)}}] \fill [orange] (-3,-4) rectangle (1.02,0); \path [fill=orange,path fading=fade right] (1,-4) rectangle (2,0); \end{scope} \end{scope} \draw [overlay,very thin,->] (1,-2) -- ++(30:2); \end{tikzpicture} \end{center} \end{document}

  • Two books in a single document, how to get a TOC for the second book only?
    by Gary on March 4, 2026 at 9:50 pm

    I'm trying to combine two books into a single document, having in the first front matter a full TOC and in the second front matter a TOC of only the second book. (I thought I read this somewhere but cannot locate where, or I'm mistaken and it applied only to a TOC under some document level rather than two sets of front matter. I found the context garden section of project structures under the TOC but don't understand how that works for document levels rather than components.) Is this possible or must the document structure be changed somehow to denote a grouping of a front matter and its body matter? In the second example below, I tried defining a section block for a book level and placed each pair of front matter and body matter within one, but still haven't figured out how to get the second table of contents for that book only; and it generates an unwanted empty page at the book level before the front matter. Perhaps the first question is, What is the proper way to combined two books like this into a single document?, and the second, How to get the second TOC of the second book only? Thank you. \starttext \startfrontmatter[page=yes] \completecontent[criterium=all] \startchapter[title={Preface Book 1},list={Preface Book 1}] Preface Front matter 1. \stopchapter \stopfrontmatter \startbodymatter[page=yes] \startchapter[title={Book 1 Chapter 1},list={Book 1 Chapter 1}] Body matter 2 Chapter 1. \stopchapter \startchapter[title={Book 1 Chapter 2},list={Book 1 Chapter 2}] Body matter 2 Chapter 2. \stopchapter \stopbodymatter \startfrontmatter[page=right] \completecontent[criterium=chapter] \startchapter[title={Preface Book 2},list={Preface Book 2}] Preface Front matter 2. \stopchapter \stopfrontmatter \startbodymatter[page=yes] \startchapter[title={Book 2 Chapter 1},list={Book 2 Chapter 1}] Body matter 2 Chapter 1. \stopchapter \startchapter[title={Book 2 Chapter 2},list={Book 2 Chapter 2}] Body matter 2 Chapter 2. \stopchapter \stopbodymatter \stoptext Second attempt \definesectionblock[Bookmatter][Bookmatter][page=no] \definehead[Book][part][ header=empty, footer=empty, number=no, ] \setupcombinedlist[content][list={Book,chapter},alternative=c,] \starttext \startBookmatter \startBook[list={Book 1}] \startfrontmatter[page=yes] \completecontent[criterium=all] \startchapter[title={Preface Book 1},list={Preface Book 1}] Preface Front matter 1. \stopchapter \stopfrontmatter \startbodymatter[page=yes] \startchapter[title={Book 1 Chapter 1},list={Book 1 Chapter 1}] Body matter 2 Chapter 1. \stopchapter \startchapter[title={Book 1 Chapter 2},list={Book 1 Chapter 2}] Body matter 2 Chapter 2. \stopchapter \stopbodymatter \stopBook \stopBookmatter \startBookmatter \startBook[title={Book 2},list={Book 2}] \startfrontmatter[page=right] \completecontent[criterium=chapter] \startchapter[title={Preface Book 2},list={Preface Book 2}] Preface Front matter 2. \stopchapter \stopfrontmatter \startbodymatter[page=yes] \startchapter[title={Book 2 Chapter 1},list={Book 2 Chapter 1}] Body matter 2 Chapter 1. \stopchapter \startchapter[title={Book 2 Chapter 2},list={Book 2 Chapter 2}] Body matter 2 Chapter 2. \stopchapter \stopbodymatter \stopBook \stopBookmatter \stoptext

  • cleveref+amsthm clashes with \DocumentMetadata
    by Gargantuar on March 4, 2026 at 8:44 pm

    The MWE \DocumentMetadata{} \documentclass{article} \usepackage{amsthm} \usepackage{cleveref} \newtheorem{theorem}{Theorem}[subsection] \newtheorem{definition}[theorem]{Definition} \begin{document} \begin{definition} a \end{definition} \end{document} gives the error ./test.tex:12: LaTeX Error: Something's wrong--perhaps a missing \item. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.12 a Try typing <return> to proceed. If that doesn't work, type X <return> to quit. This however works if one of the following is done: removing \DocumentMetadata, removing cleveref, removing amsthm, using the theorem instead of the definition environment. Why does this happen, and how can I fix this? I'm aware that cleveref has accumulated quite a few bugs over the years since it isn't maintained anymore (since 2018).

  • mathic not working with \DocumentMetadata
    by Gargantuar on March 4, 2026 at 7:18 pm

    The MWE \DocumentMetadata{} \documentclass{article} \usepackage{mathtools} \mathtoolsset{mathic} \begin{document} \(a\) \end{document} gives the following error Runaway argument? \fi a\) \par \end {document} ! File ended while scanning use of \__math_grab_dollar_delim:w. <inserted text> \par <*> test.tex I suspect you have forgotten a `}', causing me to read past where you wanted me to stop. I'll try to recover; but if the error is serious, you'd better type `E' or `X' now and fix your file. Removing either \DocumentMetadata or mathic compiles. Why is that? It seems like a (recent) bug. EDIT: for reproducibility, the pdfLaTeX version used was pdfTeX 3.141592653-2.6-1.40.29 (TeX Live 2026/Arch Linux) with the command pdflatex -interaction=nonstopmode -shell-escape -halt-on-error.

  • `\textwidth` not long enough
    by user145836 on March 4, 2026 at 6:45 pm

    Simple \maketitle and section modifications \usepackage{titling} \setlength{\fboxsep}{0em} \setlength{\fboxrule}{2pt} \renewcommand{\maketitle}{ \fbox{ \begin{minipage}{\textwidth} \centering \par\vskip1em\noindent {\LARGE\bf\sc \thetitle} \par\vskip0.5em\noindent {\large\sc \theauthor} \par\vskip1em\noindent \end{minipage} }} \usepackage{titlesec} \titleformat{\section}[block]{\scshape\large}{}{0em}{}[\hrule width \textwidth] do not align (on the right). It seems that \textwith is not wide enough. The same goes when using \titlerule. Why?

  • A revisitation of 3D surface outlines, using more specific language
    by Jasper on March 4, 2026 at 5:37 pm

    This question has technically been asked before: Creating outlines of 3D surfaces in Tikz. Frankly, here too: Surface outline – pgfplots 3D. I have thought about the problem in some detail, and believe that the problem is worth revisiting using more specific language (I didn't want to rewrite someone else's post). In particular, I wanted to explore a particular technique that I'm trying to achieve in Lua. I want to sample the surface for points whose dot product with a given vector is near-zero. Then, I want to connect the points into curvilinear line segments based on their locality relative to one another. There should be no branches on these curves, they are meant to approximate the outline. I should be able to draw curves on (or in) the surface which become dashed when occluded by surface triangles. This feels like it would be computationally expensive to produce even individual diagrams, so I am also interested in minimizing computational complexity. I want to achieve this feat using Lua. \documentclass[tikz]{standalone} \tikzset{ declare function = { xi(\azi,\pol) = sin(\pol)*cos(\azi); eta(\azi,\pol) = sin(\pol)*sin(\azi); zeta(\azi,\pol) = cos(\pol); perturbation(\azi,\pol) = 1+sin(2*\azi)*sin(2*\pol)/5; alpha(\azi,\pol) = perturbation(\azi,\pol) * xi(\azi,\pol); beta(\azi,\pol) = perturbation(\azi,\pol) * eta(\azi,\pol); gamma(\azi,\pol) = perturbation(\azi,\pol) * zeta(\azi,\pol); }, line join = round, line cap = round } \usepackage{pgfplots} \pgfplotsset{ compat=1.18, samples=10, samples y=10 } \usepackage{tikz-3dplot} \begin{document} % tessellated sphere using pgfplots \begin{tikzpicture} \begin{axis}[ view={-30}{30}, unit vector ratio=1 1 1, hide axis ] \addplot3[ surf, domain = 0:360, y domain = 0:180, z buffer = sort ]( {xi(x,y)}, {eta(x,y)}, {zeta(x,y)} ); \end{axis} \end{tikzpicture} % An outline diagram of the sphere using tikz-3dplot \pgfmathsetmacro{\azimuth}{110} \pgfmathsetmacro{\elevation}{30} \tdplotsetmaincoords{90-\elevation}{\azimuth} \begin{tikzpicture}[tdplot_main_coords] \draw[tdplot_screen_coords] (0,0) circle [radius = {1}]; \draw[densely dashed] (\azimuth:1) arc [ start angle = {\azimuth} ,end angle = {\azimuth+180} ,radius = {1} ]; \draw (\azimuth:1) arc [ start angle = {\azimuth} ,end angle = {\azimuth-180} ,radius = {1} ]; \end{tikzpicture} % pgfplots tessellated bumpy sphere \begin{tikzpicture} \begin{axis}[ view={-30}{30}, unit vector ratio=1 1 1, hide axis ] \addplot3[ surf, domain = 0:360, y domain = 0:180, z buffer = sort ]( {alpha(x,y)}, {beta(x,y)}, {gamma(x,y)} ); \end{axis} \end{tikzpicture} % I want to sample the surface for points whose dot product with a given vector is near-zero. % Then, I want to connect the points into curvilinear line segments based on their locality relative to one another. % There should be no branches on these curves, they are meant to approximate the outline. % I should be able to draw curves on (or in) the surface which become dashed when occluded by surface triangles. % This feels like it would be computationally expensive to produce even individual diagrams, so I am also interested in minimizing computational complexity. \end{document}

  • LaTeX forest: Reorder leaves
    by edgelord on March 4, 2026 at 2:52 pm

    I'm using the LaTeX package forest to render "surface grammar trees" of sentences. Using the particular grammar I'm using (Eisenberg), you can get trees where the leaves are not in natural order. E. g. the sentence "Ich suche verzweifelt einen Stift" ("I search desperately a pen") would have the adverb "verzweifelt" ("desperately") attached to the rest of the sentence at the very last layer and the syntactical analysis tree would look something like this: How is this possible in forest without having to put the adverb to the end of the sentence (which wouldn't make sense). This would produce the correct tree structure but with the wrong word order. How can I specifically move the "verzweifelt" node to the third word position without changing the tree structure? \documentclass{article} \usepackage{forest} \usetikzlibrary{calc} \usepackage[T1]{fontenc} \begin{document} \begin{forest} for tree={ grow=south, parent anchor=south, child anchor=north, align=center, l sep=15pt, s sep=10pt, edge path={ \noexpand\path [draw] (!u.south) -- +(0,-5pt) -| (.north)\forestoption{edge label}; }, } [$S_2$ [S [Ich, tier=word] [suche, tier=word] [PrGr [einen, tier=word] [Stift, tier=word] ] ] [verzweifelt, tier=word] ] \end{forest} \end{document}

  • Index in Portuguese [duplicate]
    by Rodrigo Tavares on March 4, 2026 at 2:44 pm

    I used the package makeidx to make the index of my books. But my books are in Portuguese, and in Portuguese rules of alphabetical order the diacritical accent doesn't change the alphabetical order of the word, and this package keep putting all accented words in the end after all regular non accented letters. There is a way to change it, maybe configuring the package to understand Portuguese? Or I need to use another package?

  • Drawing a tank consisting of a cylinder topped with a hemisphere of the same radius
    by Dimitrios ANAGNOSTOU on March 4, 2026 at 2:25 pm

    I’m working on a visualization to accompany a math problem: "A water tank consists of a cylindrical part with radius r and height h, topped with a hemispherical dome. The tank must be built to hold 600 m³ when full. (...)" After a lot of searching and experimenting, here is my current TikZ attempt: \documentclass[tikz,border=5pt]{standalone} \usetikzlibrary{shapes.geometric} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \node (a) [cylinder, shape border rotate=90, draw, minimum height=15mm, minimum width=7.5mm] {}; \draw [<->] ([xshift=5pt]a.before bottom) -- ([xshift=5pt]a.after top) node [midway, right] {$h$}; \draw [<->] ([yshift=-5pt]a.bottom) -- ([yshift=-5pt]a.bottom -| a.before bottom) node [midway, below] {$r$}; % Define origin \coordinate (O) at (a.center); % Define h and r \def\h{15mm} \def\r{3.75mm} % Move to center (0,h/2,0) \coordinate (C) at ($(O)+(0,\h/2)$); % Hemicircle (upper half) \draw (C) ++(-\r,0) arc (180:0:\r); %% Coordinate system (centered at node center) %\draw[-latex, dashed] (a.center) -- ++(1.8,0) node[right] {$x$}; %\draw[-latex, dashed] (a.center) -- ++(0,1.8) node[above] {$y$}; %\draw[-latex, dashed] (a.center) -- ++(-1.2,-1.2) node[below left] {$z$}; % %\node[left] at (O) {$O$}; \end{tikzpicture} \end{document} My questions: How can I make the back part of the hemisphere (as indicated by the red arrow above) a dashed curve, like a true 3D effect? Is it possible to add some shading or filling to better suggest depth, without complicating my code?

  • Can I safely ignore these warnings that appear in the current TeX Live 2025 snapshot on Overleaf?
    by SENTiNEL on March 4, 2026 at 11:01 am

    I maintain, expand, and refine a personal template that has become quite complex by now. Due to an issue in the 2024 snapshot, I skipped that version and would now like to move to the current 2025 release. When doing so, I encounter two warnings: Command \showhyphens has changed. Package tracklang Warning: No datatool support for dialect ngerman on input line 9908. I managed to reduce the behaviour to this short MWE, so I assume the warnings are not caused by the many new definitions and adjustments in my full template. I rely on both packages: % Overleaf, pdfLaTeX, TeX Live Version 2025 \documentclass[ngerman]{standalone} \usepackage{microtype}% "\showhyphens has changed." \usepackage{babel} \usepackage{datatool}% "No datatool support for dialect ngerman." \begin{document} MWE \end{document} From what I have found so far, the microtype message seems to be an informational notice rather than an actual warning. I also assume that the missing datatool-dialect support can be ignored, because I only sort my own labels, which do not include country‑specific symbols or similar characters. As mentioned above, I intend to update from the 2023 snapshot to the 2025 version. Are my assumptions stated above correct, and can I safely ignore these warnings, or is there something I have overlooked that would make it advisable to remain with the 2023 version? I would prefer not to add a patch or something similar to my template just to address these warnings. If such a change becomes necessary, that would be a follow up question.

  • Expl3 key value option design for nested functions
    by David Purton on March 4, 2026 at 9:57 am

    Goal I have a series of functions that take options. Frequently the options for multiple functions are named the same (so the interface isn't too verbose). Additionally, sometimes function a calls function b and I'd like to be able to set options for function b locally within a. Finally, I'd like to be able to set default options for everything, including independent options for the case when function b is called from within function a. These might be different from the default options for function b when it's called directly. convenient interface for end user is important Currently I set the keys for function a and b is being in different submodules. E.g., \keys_define:nn { dcp / a } { x .tl_set:N = \l__dcp_a_x_tl , y .tl_set:N = \l__dcp_a_y_tl , z .tl_set:N = \l__dcp_a_z_tl } \keys_define:nn { dcp / b } { x .tl_set:N = \l__dcp_b_x_tl , y .tl_set:N = \l__dcp_b_y_tl , z .tl_set:N = \l__dcp_b_z_tl } This allows me to define function a as follows. The options for a can be set without a prefix and options for function b can be specified explicitly. \cs_new_protected:Nn \__dcp_do_a:n { \group_begin: \keys_set_known:nn { dcp / a } {#1} \keys_set_known:nn { dcp } {#1} a / x = \l__dcp_a_x_tl \par a / y = \l__dcp_a_y_tl \par a / z = \l__dcp_a_z_tl \par \__dcp_do_b:n { } \group_end: } \__dcp_do_a:n { x = 1, b / x = i } I can also set default options for a and b: \keys_set:nn { dcp } { a / x = 1 , b / x = i } This will be reflected when I call a and b. Problem I can't set the default options for the case of b being called from a with my current design. I want a function that sets the options and allows this kind of syntax: \__dcp_set_opt:n { a / x = 1, b / x = i, a / b / x = j } where the value of x for function b is set to j only when it is called from function a. Otherwise it should default to i. But of course, this doesn't work. as there is no dcp / a / b / x key defined, only dcp / b / x. I'm looking for ways to implement this. What do you suggest? My best thought at present is to loop through the items in the argument to \__dcp_set_opt:n and create a clist variablefor each prefix,aandb(striping out theaandb) and then set this inside functions aandb` prior to then setting options from the argument of each function. How would you achieve my goals? (I definitely want l3keys solutions.) MWE to play with \documentclass{article} \ExplSyntaxOn \keys_define:nn { dcp / a } { x .tl_set:N = \l__dcp_a_x_tl , y .tl_set:N = \l__dcp_a_y_tl , z .tl_set:N = \l__dcp_a_z_tl } \keys_define:nn { dcp / b } { x .tl_set:N = \l__dcp_b_x_tl , y .tl_set:N = \l__dcp_b_y_tl , z .tl_set:N = \l__dcp_b_z_tl } \cs_new_protected:Nn \__dcp_do_a:n { \group_begin: \keys_set_known:nn { dcp / a } {#1} \keys_set_known:nn { dcp } {#1} a / x = \l__dcp_a_x_tl \par a / y = \l__dcp_a_y_tl \par a / z = \l__dcp_a_z_tl \par \__dcp_do_b:n { } \group_end: } \cs_new_protected:Nn \__dcp_do_b:n { \group_begin: \keys_set_known:nn { dcp / b } {#1} \keys_set_known:nn { dcp } {#1} b / x = \l__dcp_b_x_tl \par b / y = \l__dcp_b_y_tl \par b / z = \l__dcp_b_z_tl \par \group_end: } \cs_new_protected:Nn \__dcp_set_opt:n { \keys_set:nn { dcp } {#1} } \ExplSyntaxOff \begin{document} \ExplSyntaxOn \__dcp_do_a:n { x = 1, y = 2, z = 3 , b / x = i, b / y = j, b / z = k } \bigskip \__dcp_set_opt:n { a / x = 1 , b / x = i } \__dcp_do_a:n { } \bigskip \__dcp_do_b:n { } \bigskip \__dcp_set_opt:n { a / y = 2, a / b / y = j } \__dcp_do_a:n { } % ← should show b/y=j \bigskip \__dcp_do_b:n { } % ← should not show b/y=j \ExplSyntaxOff \end{document}

  • Luatex - Coloring Haraka
    by Mario Fischer on March 4, 2026 at 6:08 am

    I want to colour the harakat (diacritics) of a text in Pashto. I use Luatex, and I want to switch this function on and off. It should look like I tried this code: \documentclass{article} \usepackage{fontspec} \usepackage{xcolor} \usepackage{luacolor} \usepackage[bidi=basic]{babel} % Setup Arabic language \babelprovide[import, main]{arabic} % THE FIX: Use Renderer=Node instead of Harfbuzz \babelfont{rm}[Renderer=Node]{Amiri} % 1. The Lua Script \directlua{ harakat_attr_val = nil local luacolor_attr = luatexbase.attributes['luacolor'] local function color_harakat(head) if not harakat_attr_val then return head end for item in node.traverse_id(node.id("glyph"), head) do local char = item.char -- Unicode range for Arabic harakat (0x064B to 0x065F) -- and the superscript Alef (0x0670) if (char >= 0x064B and char <= 0x065F) or char == 0x0670 then node.set_attribute(item, luacolor_attr, harakat_attr_val) end end return head end % Add the filter so it runs before the font shaper luatexbase.add_to_callback("pre_linebreak_filter", color_harakat, "color_harakat") } % 2. Custom command to safely set the Harakat color \makeatletter \newcommand{\setHarakatColor}[1]{% \begingroup \color{#1}% \directlua{ harakat_attr_val = tex.attribute[luatexbase.attributes['luacolor']] }% \endgroup } \makeatother \begin{document} \begin{center} \Huge % Tell LuaTeX to color all following harakat Red \setHarakatColor{red} بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ \vspace{1cm} % Switch to blue! \setHarakatColor{blue} بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ \end{center} \end{document} But it is not coloring. What might be the problem, or is there an easy option in Luatex?

  • How to have bodymatter start on the next page after frontmatter regardless of left or right in a double-sided document?
    by Gary on March 4, 2026 at 3:56 am

    I apologize for asking what appears to be such a simple question, but would you please tell me what I'm missing to get the body matter to start on the next page immediately after the front matter ends? This example makes it a right-hand page, inserting a blank page on the left; and no option I have tried, thus far, changes that. Thank you. \setuppagenumbering[alternative=doublesided,location=] \starttext \startfrontmatter[page=right] Front matter. \stopfrontmatter \startbodymatter[] Body matter. \stopbodymatter \stoptext Added after receiving answer \setuppagenumbering[alternative=doublesided] %% Setup code, just for the demonstration. \setuppapersize[A9, portrait][A6, landscape] \setuppaper[nx=4, ny=2, offset=-1.5pt] \definepalet[layout][page=black] \showframe[page] \setuparranging[XY] %% Demonstration \starttext %% Before \setupfootertexts[Before] \startfrontmatter[page=yes] Front matter 1. \stopfrontmatter \startbodymatter[page=yes] Body matter 1.1. \pagebreak Book matter 1.2. \stopbodymatter \startfrontmatter[page=yes] Front matter 2. \stopfrontmatter \startbodymatter[page=yes] Body matter 2.1. \pagebreak Book matter 2.2. \stopbodymatter %% After \setupfootertexts[After] \startfrontmatter[page=yes] Front matter 1. \stopfrontmatter \startbodymatter[page=yes] Body matter 1.1. \pagebreak Book matter 1.2. \stopbodymatter \startfrontmatter[page=right] Front matter 2. \stopfrontmatter \startbodymatter[page=yes] Body matter 2.1. \pagebreak Book matter 2.2. \stopbodymatter \stoptext Yet another additon Not a true solution but good enough for me. Using all page=yes and adding, in the before option of \startfrontmatter, a test for ending on an odd page which inserts a pagebreak in the body matter, gives the desired result. This appears to ensure that front matter will still always start on a right-hand page even though it is not set using page=right and the body matter starts on the very next page whether left or right. \setuppagenumbering[alternative=doublesided,] %% Setup code, just for the demonstration. \setuppapersize[A9, portrait][A6, landscape] \setuppaper[nx=4, ny=2, offset=-1.5pt] \definepalet[layout][page=black] \showframe[page] \setuparranging[XY] %% Demonstration \starttext \setupfootertexts[Before] \startfrontmatter[ page=yes, before={\doifoddpageelse{}{\page[left,empty]}} ] Front matter 1. \stopfrontmatter \startbodymatter[page=yes,] %after={\doifoddpageelse{\page[left,empty]}{}}] Body matter 1.1. \pagebreak Book matter 1.2. \stopbodymatter \startfrontmatter[ page=yes, before={\doifoddpageelse{}{\page[left,empty]}} ] Front matter 2. \stopfrontmatter \startbodymatter[page=yes] %,after={\doifoddpageelse{\page[left,empty]}{}}] Body matter 2.1. \pagebreak Book matter 2.2. \stopbodymatter \stoptext

  • How can I put content into cells outside of the days of the month using tikz calendar?
    by Robert on March 3, 2026 at 9:25 pm

    How can I create a calendar with content in the "empty" boxes, like in the photo below? In particular, how can I: combine days like May 24/31 so that one month's calendar always fits on 5 rows, and put items (e.g. mini calendar for previous and successive months, photo, or lunar phases) into the boxes that aren't days

  • TikZ: How to add a node where a path gets clipped
    by Edoardo Serra on March 3, 2026 at 3:07 pm

    I am designing a square (or “squarish” actually) map protractor in TikZ. So far, I have managed to draw the degree ticks along the four sides by clipping radial lines between two closed paths using the even odd rule like I saw in this answer. The ticks are generated in a \foreach loop. To avoid drawing long ticks on top of short ones, I separated them into two loops using a conditional test. I am not sure whether this separation is actually necessary for correct SVG export/printing, but that is how I implemented it. Below is a MWE: \documentclass[tikz]{standalone} %,convert={outfile=\main.svg} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usetikzlibrary{intersections, pgfplots.fillbetween} \pgfdeclarelayer{pre main} \pgfdeclarelayer{main} \pgfsetlayers{pre main, main} \usetikzlibrary{shapes} \begin{document} %all of this is needed to easily clip between two closed paths using even odd rule \makeatletter \def\@appendnamedsoftpath#1{% \pgfsyssoftpath@getcurrentpath\@temppatha \expandafter\let\expandafter\@temppathb\csname tikz@intersect@path@name@#1\endcsname \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\@temppatha\expandafter\expandafter\expandafter{\expandafter\@temppatha\@temppathb}% \pgfsyssoftpath@setcurrentpath\@temppatha } \def\@appendnamedpathforactions#1{% \pgfsyssoftpath@getcurrentpath\@temppatha \expandafter\let\expandafter\@temppathb\csname tikz@intersect@path@name@#1\endcsname \expandafter\def\expandafter\@temppatha\expandafter{\csname @temppatha\expandafter\endcsname\@temppathb}% \let\tikz@actions@path\@temppatha } \tikzset{ use path for main/.code={% \tikz@addmode{% \expandafter\pgfsyssoftpath@setcurrentpath\csname tikz@intersect@path@name@#1\endcsname }% }, append path for main/.code={% \tikz@addmode{% \@appendnamedsoftpath{#1}% }% }, use path for actions/.code={% \expandafter\def\expandafter\tikz@preactions\expandafter{\tikz@preactions\expandafter\let\expandafter\tikz@actions@path\csname tikz@intersect@path@name@#1\endcsname}% }, append path for actions/.code={% \expandafter\def\expandafter\tikz@preactions\expandafter{\tikz@preactions \@appendnamedpathforactions{#1}}% }, use path/.style={% use path for main=#1, use path for actions=#1, }, append path/.style={% append path for main=#1, append path for actions=#1 } } \makeatother \begin{tikzpicture} \pgfmathsetmacro\bigside{7} \pgfmathsetmacro\smallsidedelta{0.5} %cuts \draw[rounded corners=12pt, name path=outside] (0,0) rectangle (\bigside,\bigside); \draw[dotted, rounded corners=12pt, name path=inside] (\smallsidedelta,\smallsidedelta) rectangle (\bigside-\smallsidedelta,\bigside-\smallsidedelta); %remove before cutting or printign. Just as reference grid %backside print \tikzfillbetween[of=inside and outside] {white}; %print on transparent plastic so this is needed for better readability %frontside print \pgfmathsetmacro\degreesmallticksize{0.2} \pgfmathsetmacro\degreemidticksize{0.35} \pgfmathsetmacro\outerradius{sqrt(2*\bigside/2*\bigside/2)} \path[rounded corners=12pt, name path=degrees short] (\degreesmallticksize,\degreesmallticksize) rectangle (\bigside-\degreesmallticksize,\bigside-\degreesmallticksize); \path[rounded corners=12pt, name path=degrees mid] (\degreemidticksize,\degreemidticksize) rectangle (\bigside-\degreemidticksize,\bigside-\degreemidticksize); \begin{scope} [even odd rule] %small ticks \clip[use path=outside, append path=degrees short]; \foreach \deg in {0, ..., 359} { \pgfmathsetmacro\degmod{mod(\deg,5)} \pgfmathtruncatemacro{\itest}{ifthenelse(\degmod==0,1,0)} \ifnum\itest=0 \draw[thin] (\bigside/2,\bigside/2) -- ({\bigside/2+\outerradius*cos(\deg)},{\bigside/2+\outerradius*sin(\deg)}); \fi } \end{scope} %had to add a second scope and for loop since the clipped area is different \begin{scope} [even odd rule] %mid ticks \clip[use path=outside, append path=degrees mid]; \foreach \deg in {0, ..., 359} { \pgfmathsetmacro\degmod{mod(\deg,5)} \pgfmathtruncatemacro{\itest}{ifthenelse(\degmod==0,1,0)} \ifnum\itest=1 \draw[thick] (\bigside/2,\bigside/2) -- ({\bigside/2+\outerradius*cos(\deg)},{\bigside/2+\outerradius*sin(\deg)}); \fi } \end{scope} \end{tikzpicture} \end{document} And the output is the following: I would now like to add a label at the inner end of each thick (5°) tick, displaying the corresponding degree value (0–355), like this: Now a few nuances: The numbers must always face towards the inside, with the exception, if possible, of the bottom row of numbers from 135° to 225°. When numbers get big, they don't have enough space to fit unless the labels become too small to read (actual printing size of the protractor will be something like 7x7 or 8x8cm). So they need to be shifted in such a way that they fit. 355 in the provided image is a clear example of what I mean. I can consider shifting them radially as well, but they need to stay to the outside of the dotted line, which I can make a little smaller. I really don't know where to start and didn't manage to find anything online. Thank you for your time!

  • Table Alignment Trouble
    by Nick B on March 3, 2026 at 1:02 pm

    I used AI to create this table from Tony Records Guided notes. I was hoping to drag and drop code for my notes today, but there are several errors that I can't locate. Also, column on left is not aligned with right. Any help is appreciated. \documentclass{article} \usepackage[margin=1in]{geometry} \usepackage[most]{tcolorbox} \usepackage{tabularray} \usepackage{amsmath} \usepackage{xcolor} % Custom Colors from the image \definecolor{headerpurple}{RGB}{102, 45, 145} \definecolor{bodyblue}{RGB}{214, 230, 247} \definecolor{benefitgold}{RGB}{255, 242, 204} \definecolor{drawbackorange}{RGB}{248, 203, 173} \begin{document} \begin{tcolorbox}[ enhanced, sharp corners, boxrule=1.5pt, colframe=black, colback=white, left=0mm, right=0mm, top=0mm, bottom=0mm, boxsep=0pt, title=\textbf{\large Defining a Sequence}, colbacktitle=headerpurple, toptitle=2mm, bottomtitle=2mm, center title ] \begin{tblr}{ colspec = {X[l,m]X[l,m]}, stretch = 1.2, vlines = {0.5pt, black}, % Vertical line between columns hlines = {0.5pt, black}, % Horizontal lines between rows column{1,2} = {leftsep=8pt, rightsep=8pt, topsep=6pt, bottomsep=6pt}, row{1} = {bg=headerpurple, fg=white, font=\bfseries, halign=c}, row{2} = {bg=bodyblue}, row{3} = {bg=benefitgold}, row{4} = {bg=drawbackorange}, } % Row 1: Headers Recursive (Implicit) Definition) & Explicit Definition \\ % Row 2: Main Content { \textbf{Note:} Each term in the sequence is three more than the preceding term. Therefore,\\ \(a_1 = 1\) \\ \(a_2 = a_1 + 3\) \\ \(a_3 = a_2 + 3\) \\ \(\quad \vdots\) \\ \(a_{n+1} = a_n + 3\) \\ Putting this all together, formally we should say:\\ \(a_1 = 1\) and \(a_{n+1} = a_n + 3\) where \(n = 1, 2, 3, \dots\) } & { \textbf{Note:} Each term in the sequence can be represented by ordered pairs using the convention:\\ \centering (order of the term, actual value of the term) \\ \raggedright Therefore, we can rename those terms with $(1,1), (2,4), (3,7), (4,10), \dots$ and use a known relationship between the ordered pairs. Here, we have a linear relationship. \[ \text{slope} = \frac{4-1}{2-1} = \frac{7-4}{3-2} = \frac{10-7}{4-3} = \dots = 3 \] Using the \textit{point-slope} formula with the first coordinate point: \[ a_n - 1 = 3(n-1)\] \\ or \\ \[a_n = 3n - 2\] } \\ % Row 3: Benefits \textbf{Benefit:} The relationship is typically easy to see. & \textbf{Benefit:} The explicit definition is extremely helpful in finding terms deep into the sequence like \(a_{50}\). \\ % Row 4: Drawbacks \textbf{Drawback:} The recursive definition is not very helpful if we want to find a term deep into the sequence like \(a_{50}\). & \textbf{Drawback:} The relationship can be difficult to see if the sequence is not so ``well-behaved,'' i.e., linear, or geometric. \end{tblr} \end{tcolorbox} \end{document} The error message is: ! Missing $ inserted. <inserted text> $ l.72 \end {tblr} ?

  • tabularray - make talltblr caption mirror other captions
    by user20478285 on March 3, 2026 at 12:13 am

    \documentclass{article} \usepackage[font=small, labelfont=bf, format=hang]{caption} \usepackage{tabularray} \usepackage{tblr-extras} \UseTblrLibrary{amsmath, booktabs, caption} \begin{document} \begin{table}[h] \centering \begin{talltblr}[caption={A talltblr table.}]{colspec={cc}} \toprule a & b\\ \midrule x & y\\ \bottomrule \end{talltblr} \end{table} \end{document} Using the code above, I get the following result for my talltblr (i.e. the caption width is limited to the table width). I tried the approach from here: \documentclass{article} \usepackage[font=small, labelfont=bf, format=hang]{caption} \usepackage{tabularray} \usepackage{tblr-extras} \UseTblrLibrary{amsmath, booktabs, caption} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \DefTblrTemplate{firsthead}{caption}{% \makebox[\tablewidth]{\parbox{\columnwidth}{% \UseTblrTemplate{caption}{normal}% }}% } \SetTblrTemplate{firsthead}{caption} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} \begin{table}[h] \centering \caption{A regular table. A regular table. A regular table. A regular table. A regular table. A regular table. A regular table. A regular table. A regular table.} \begin{tabular}{cc} \toprule a & b\\ \midrule x & y\\ \bottomrule \end{tabular} \end{table} \begin{table}[h] \centering \caption{A tblr table. A tblr table. A tblr table. A tblr table. A tblr table. A tblr table. A tblr table. A tblr table. A tblr table. A tblr table. A tblr table.} \begin{tblr} { colspec={cc} } \toprule a & b\\ \midrule x & y\\ \bottomrule \end{tblr} \end{table} \begin{table}[h] \centering \begin{talltblr} [ caption={A talltblr table. A talltblr table. A talltblr table. A talltblr table. A talltblr table. A talltblr table. A talltblr table. A talltblr table.} ] { colspec={cc} } \toprule a & b\\ \midrule x & y\\ \bottomrule \end{talltblr} \end{table} \end{document} Now the caption has the right width, but it is too close to the table itself. Also, the caption font is too big and the label is not bold, which I can fix / hack if I add \SetTblrStyle{caption-tag}{font=\small\bfseries} \SetTblrStyle{caption-text}{font=\small} but I'm not sure if this is the way to go (and it does not fix the issue of the caption touching the table). I also tried to have a look at the default caption definitions myself in the source code but I just don't understand even remotely enough of LaTeX3). Edit for clarity: I don't need to be able to control table, talltblr, and tblr with \captionsetup, I am rather looking for a way to get the same consistent captions for figure, table, tblr and talltblr environments in my document. I realise this is not easy, especially since the different caption style for talltblr is apparently a feature: I don't think it is a bug. In many aspects, tabularray is different from traditional tables https://github.com/TeXackers/tabularray/issues/255#issuecomment-1142833319)