• Tight spacing when typesetting limit of a function in TeX Gyre fonts
    by ethan the unreal on October 22, 2026 at 3:54 pm

    I'm trying to typeset a project using TeX Gyre Pagella (Math). When I try to produce the limit of a function (see MWE), the space between the "lim" and "f" is far too small. Is there a way to increase this space (for all instances of the limit) outside of manually using \, or other spacing commands? For transparency, I'm using XeLaTeX on Overleaf. I don't know whether a local instance of XeLaTeX will produce the same result. \documentclass{minimal} % \usepackage{amsmath} \usepackage{unicode-math} \setmainfont{TeX Gyre Pagella} \setmathfont{TeX Gyre Pagella Math} \begin{document} We say that \begin{equation*} \lim_{x \to a} f(x) = L \end{equation*} if, insert $\varepsilon$ and $\delta$ definition here. \end{document} Similar results are produced using TeX Gyre Termes (see images). Interestingly, newpx (which apparently loads Pagella) does not have this problem. (But I have other opinions about it which are not within the scope of the question anymore.)

  • Using arara and pdflatex with Source/Output File Structure
    by Pascal Zillmann on October 22, 2026 at 2:18 pm

    I would like to compile the following simple example of a LaTeX document with the tool arara, taken from its quickstart guide: % arara: pdflatex \documentclass{article} \begin{document} Hello world! \end{document} Let us refer to this file as main.tex and locate it in the directory project/src. When I now call arara from directory project/src, everything works as expected: >> arara main.tex __ _ _ __ __ _ _ __ __ _ / _` | '__/ _` | '__/ _` | | (_| | | | (_| | | | (_| | \__,_|_| \__,_|_| \__,_| Processing "main.tex" (size: 94 B, last modified: 2026-10-22 14:02:02), please wait. (PDFLaTeX) PDFLaTeX engine .............................. SUCCESS Total: 0.254 seconds All output (and auxiliary) files are created properly and saved to the directory project/src. Now, suppose there is another directory project/out. I want pdflatex to put all the output (and auxiliary) files into this directory. Thus, I need to use the -output-directory flag. Moreover, I want to call arara from directory project. I simply changed line 1 of main.tex into % arara: pdflatex: { options: [ '-output-directory=./out/' ] } Running arara from project (with corrected path to main.tex), pdflatex cannot find the main.tex file: >> arara src/main.tex --verbose __ _ _ __ __ _ _ __ __ _ / _` | '__/ _` | '__/ _` | | (_| | | | (_| | | | (_| | \__,_|_| \__,_|_| \__,_| Processing "main.tex" (size: 139 B, last modified: 2026-10-22 14:02:16), please wait. ----------------------------------------------------------------- (PDFLaTeX) PDFLaTeX engine ----------------------------------------------------------------- This is pdfTeX, Version 3.141592653-2.6-1.40.29 (TeX Live 2026) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode ! I can't find file `main.tex'. <*> main.tex (Press Enter to retry, or Control-D to exit) Please type another input file name: Options to resolve this would be to call arara from project/src and to set the output directory to -output-directory=../out/ or to have the out directory as a subdirectory of src (as suggested in this answer). Both solutions are not appropriate for my setting. How can I call arara from project, having main.tex in project/src? I use arara in version 7.2.0 and pdflatex in version 3.141592653-2.6-1.40.29.

  • Changing the Color of an Italicized Part of the Title When a Lot is Going on
    by DDS on October 22, 2026 at 2:03 pm

    Consider the code: \documentclass[12pt,onecolumn,openany,final]{book} \usepackage[hmargin=0in,vmargin=0in,top=0in,paperwidth=4.25in,paperheight=6.625in]{geometry} \usepackage{pstricks,psvectorian} \usepackage{scalerel,scalefnt} \usepackage{color,cabin} \definecolor{RomeRed}{RGB}{142,0,28} \definecolor{RomeYellow}{RGB}{255,179,0} \setmainfont{Cabin} % Interletterspacing Letters \def\theLetterSpace{0.5pt} \def\theWordSpace{1.5\LocalLetterSpace} \newlength\LocalLetterSpace \newcommand\spaceout[2][\theLetterSpace]{% \setlength\LocalLetterSpace{#1}\expandafter\spaceouthelpA#2 \relax\relax} \def\spaceouthelpA#1 #2\relax{% \spaceouthelpB#1\relax\relax% \ifx\relax#2\else\ \kern\theWordSpace\spaceouthelpA#2\relax\fi } \def\spaceouthelpB#1#2\relax{% #1% \ifx\relax#2\else \kern\LocalLetterSpace\spaceouthelpB#2\relax% \fi } \begin{document} \thispagestyle{empty} \pagecolor{RomeRed} \noindent\begin{pspicture}(-5.3975,0)(5.3975,16.8275)% \renewcommand*{\psvectorianDefaultColor}{RomeRed}% \psframe[fillcolor=RomeRed,fillstyle=solid](-5.3975,0.3175)(5.08,16.51)% \psframe[linecolor=RomeRed](-5.3975,0.3175)(5.08,16.51)% draws frame. \rput[tc](0.07,14.00){\textcolor{white}{\Huge{\selectfont\scalefont{1.11} \vstretch{1.35}{\textbf{{\spaceout[3.25pt]{COLOR {\it(CHANGE)}}}}}}}} \end{pspicture}% \end{document} which gives the output: I would like to change the color of (CHANGE) from white to RomeYellow, but I have not been able to do it. I think it should be easy but I do have some other stuff going on which may be causing the difficulty. I have used \textcolor{RomeYellow}, \color{RomeYellow}, and \color{RomeYellow} alternately in different locations but to no avail. QUESTION: How may I color the italicized portion of the title to the color RomeYellow? I am compiling with xelatex.

  • How to format a value with uncertainty using `siunitx` without parentheses?
    by Rounak Niloy on October 22, 2026 at 12:29 pm

    I am using the siunitx package and want to format a measurement with its uncertainty, for example: 31.76 ± 0.34 g I have tried the following: \SI{31.76(34)}{\gram} However, this produces (31.76 ± 0.34) g, with the uncertainty enclosed in parentheses. I have also tried: \SI{31.76 +- 0.34}{\gram} but this produces (31.76 ± 0.34) g, with the entire expression enclosed in parentheses. How can I use siunitx to produce 31.76 ± 0.34 g without parentheses around either the uncertainty or the entire expression? I would prefer a solution that uses siunitx commands rather than manually formatting the units.

  • Column break even when \interlinepenalty is at its maximum
    by Elayson Abreu on October 21, 2026 at 11:01 pm

    My example below: \documentclass{article} \usepackage{multicol} \begin{document} \begingroup \parindent=0pt \interlinepenalty=10000 \begin{multicols}{2} A\\ B\\ C \par \rule{.7\linewidth}{.6pt}\\ D\\ E\vskip23pt F \end{multicols} \endgroup \end{document} results in the following: But if I change \vskip23pt to \vskip24pt, then the column break will shift position, and the result will be: I did all this just to show that \interlinepenalty=10000 is working correctly—that is, there is no page break between the \rule and the letter “D”. The problem arises when the code becomes a bit more complicated: \documentclass{article} \usepackage{multicol} \begin{document} \def\x#1{\par{\centering \rule{.7\linewidth}{.6pt}\\ #1\par}} \begingroup \parindent=0pt \interlinepenalty=10000 \begin{multicols}{2} \x{A\\ B\\ C} \x{D} \x{E} \x{F} \end{multicols} \endgroup \end{document} Which generates: My question is: why did a column break occur between \rule and the letter “D” in this case?

  • Tabularray: Broken spacing between long tblr and section around page break
    by Eldrad on October 21, 2026 at 8:10 pm

    I came across an inconsistent vertical spacing if a tblr with long option directly follows a section. If due to other generic content there is a pagebreak before the section, the vertical spacing between tblr and the section title can get screwed up. Weirdly, this is only true for a rather specific value for the vspace in the MWE. If it's at 15 cm, everything fits nicely on one page and the spacing is correct. If it's set to 18 cm or more, again the spacing on the next page is correct. Is this a bug I should report, or is this solvable? \documentclass[a4paper,11pt]{article} \usepackage{tabularray} \begin{document} \section*{Some Section} \begin{tblr}[long,label=none,presep=0mm,headsep=0pt,footsep=0pt]{width=\linewidth,colspec={l|X},stretch=0,rowhead=0,rowfoot=0} {Bla} & {Blub}\\ \end{tblr} \section*{Another Section} \begin{tblr}[long,label=none,presep=0mm,headsep=0pt,footsep=0pt]{width=\linewidth,colspec={l|X},stretch=0,rowhead=0,rowfoot=0} {Bla} & {Blub}\\ \end{tblr} \vspace{16cm} %try 15cm (fits on same page without issue) and 18cm (next page, no issue) \section*{Yet Another Section} \begin{tblr}[long,label=none,presep=0mm,headsep=0pt,footsep=0pt]{width=\linewidth,colspec={l|X},stretch=0,rowhead=0,rowfoot=0} {Bla} & {Blub}\\ \end{tblr} \end{document}

  • TikZ code, OK directly in a file, not OK in a standalone subfile
    by Denis Bitouzé on October 21, 2026 at 5:13 pm

    The following file (which comes from an article in the TeXnische Komödie about the schulma-physik package), say subfile.tex, compiles like a charm: \documentclass{article} \usepackage[compatibility]{circuitikz} \usetikzlibrary{circuits.ee.IEC} \makeatletter % Ergänzungen von Schaltzeichenformen auf der Grundlage von pgflibraryshapes.gates.ee.IEC.code.tex \pgfdeclareshape{leere diode} {% \inheritsavedanchors[from=rectangle ee]% \inheritanchor[from=rectangle ee]{center}% \inheritanchor[from=rectangle ee]{north}% \inheritanchor[from=rectangle ee]{south}% \inheritanchor[from=rectangle ee]{east}% \inheritanchor[from=rectangle ee]{west}% \inheritanchor[from=rectangle ee]{north east}% \inheritanchor[from=rectangle ee]{north west}% \inheritanchor[from=rectangle ee]{south east}% \inheritanchor[from=rectangle ee]{south west}% \inheritanchor[from=rectangle ee]{input}% \inheritanchor[from=rectangle ee]{output}% \inheritanchorborder[from=rectangle ee]% % \backgroundpath{ \pgf@process{\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}} \pgf@xa=\pgf@x \pgf@ya=\pgf@y \pgf@process{\pgfpointadd{\northeast}{\pgfpointscale{-1}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}} \pgf@xb=\pgf@x \pgf@yb=\pgf@y % Move tip back a little bit \advance\pgf@xb by-.5\pgflinewidth % Triangle triangle: \pgfpathmoveto{\pgfqpoint{\pgf@xa}{\pgf@ya}} \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@yb}} \pgf@yc=.5\pgf@ya \advance\pgf@yc by .5\pgf@yb \pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@yc}} \pgfpathclose }% \beforebackgroundpath{ { \pgf@process{\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}} \pgf@ya=\pgf@y \pgf@process{\pgfpointadd{\northeast}{\pgfpointscale{-1}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}} \pgf@xb=\pgf@x \pgf@yb=\pgf@y \pgf@yc=.5\pgf@ya \advance\pgf@yc by.5\pgf@yb \pgfusepathqstroke \pgftransformshift{\pgfqpoint{\pgf@xb}{\pgf@yc}} \pgf@yc=.5\pgf@yb \advance\pgf@yc by-.5\pgf@ya \pgftransformscale{\pgf@sys@tonumber{\pgf@yc}} \pgfkeysvalueof{/pgf/generic diode IEC/before background} } }% } \makeatother \tikzset{ leere diode graphic/.style={ circuit symbol open, circuit symbol size=width 1.25 height 1.25, transform shape, shape=leere diode, /pgf/generic diode IEC/before background={ \pgfpathmoveto{\pgfqpoint{0pt}{-1pt}} \pgfpathlineto{\pgfqpoint{0pt}{1pt}} \pgfusepathqstroke }, }, } \begin{document} \begin{tikzpicture}[circuit ee IEC,circuit symbol unit=5.5pt] \tikzset{set diode graphic=leere diode graphic}\draw (0,0) to[diode] (1,0); \end{tikzpicture} \end{document} But if it is compiled via another file—say, mainfile.tex—using the standalone package: \documentclass[french]{article} \usepackage[subpreambles]{standalone} \begin{document} \input{subfile.tex} \end{document} the second compilation fails with the following error: (./subfile.tex ! Undefined control sequence. \pgf@sh@bg@leere diode ->\pgf @process{\pgfpointadd {\southwest }{\pgfpoint ... l.77 ... diode graphic}\draw (0,0) to[diode] (1,0) ; ? Although the mainfile.sta file contains the entire preamble of the subfile.tex file—including the \makeatletter and \makeatother commands—it appears that the @ character is not treated as a letter. Do you understand why, and do you know how to solve this problem?

  • How can I stop a chapter toc from adding an entry for the previous part toc in memoir
    by Chris Walton on October 21, 2026 at 11:42 am

    This is a follow up to my question. The accepted answer has enabled me to resolve that question. When I implement that answer, a further issue arises. If I add a second part to the test document, the toc entry for the previous part is added to the toc for the last chapter of the previous part. The answer code (without dummy text) produces the header pages: These are all as required, and expected. If I add a second part to the document: \documentclass{memoir} \usepackage{lipsum} \makeatletter \newcounter{tocmarker} \newcounter{ptocmarker} \renewcommand\mempreaddchaptertotochook{\cftinserthook{toc}{stop-\thetocmarker}} \renewcommand\mempreaddparttotochook {\cftinserthook{toc}{pstop-\theptocmarker}} \renewcommand{\mempostaddchaptertotochook}{% \stepcounter{tocmarker}\cftinserthook{toc}{start-\thetocmarker}} \let\normalchangetocdepth\changetocdepth \newcommand\chaptertoc{% \begingroup \setcounter{@memmarkcntra}{\value{tocdepth}}% \let\changetocdepth\@gobble \normalchangetocdepth{-10}% \cftinsertcode{start-\thetocmarker}{\normalchangetocdepth{2}}% \cftinsertcode{stop-\thetocmarker}{\normalchangetocdepth{-10}}% \let\tocheadstart\relax \let\printtoctitle\@gobble \let\aftertoctitle\relax \tableofcontents* \endgroup \setcounter{tocdepth}{\value{@memmarkcntra}}% \par\bigskip \@afterheading } % %******************************* \renewcommand\mempostaddparttotochook{% \stepcounter{ptocmarker}\cftinserthook{toc}{pstart-\theptocmarker}} \let\normalchangetocdepth\changetocdepth % for later \newcommand\parttoc{% \begingroup \setcounter{@memmarkcntra}{\value{tocdepth}}% \let\changetocdepth\@gobble \normalchangetocdepth{-10}% \cftinsertcode{pstart-\theptocmarker}{\normalchangetocdepth{1}}% \cftinsertcode{pstop-\theptocmarker}{\normalchangetocdepth{-10}}% \let\tocheadstart\relax \let\printtoctitle\@gobble \let\aftertoctitle\relax \tableofcontents* \endgroup \setcounter{tocdepth}{\value{@memmarkcntra}}% \par\bigskip \@afterheading } % manual p81 \renewcommand*{\beforepartskip}{\null\vskip4cm} \renewcommand*{\afterpartskip}{\par\vskip1cm% \@afterindentfalse\@afterheading \parttoc } \makeatother %******************************* \begin{document} \tableofcontents* \part{Rewrite v2} \chapter{Chapter} \chaptertoc \section{Section} \part{Rewrite v2 Part II the exorcism} \chapter{Chapter2 of II} \chaptertoc \section{Section} \end{document} This header pages produced are shown below. Except for the Chapter 1 Toc all are as expected. The Chapter I ToC has gained unwanted entries: II Rewrite v2 Part II the exorcism 7 1.1 Section 5

  • \ps works weirdly
    by Jolia on October 21, 2026 at 11:22 am

    I want to add a post-scriptum to a letter so I wrote this : \documentclass[12pt]{lettre}% \usepackage[utf8]{inputenc} \usepackage{french} \usepackage[OT1]{fontenc} \usepackage{mltex} \institut{identite} \begin{document} \begin{letter}{address} \conc{FCT PhD Studentships} \opening{Dear professor,} Body \closing{Yours sincerely,} \ps P.S. As a strong opponnent to genAI, this was written solely by my hand \end{letter} \end{document} and this is the result I get. What can I do to solve this please?

  • Cite one bibliography entry from another using biblatex/biber
    by GraffL on October 20, 2026 at 4:21 pm

    I am trying to create a bibliography which contains references between certain entries. E.g., in entry [2] I would like to have a text saying "conference version of [1]" (where [1] refers to another entry of the same bibliography. One way of achieving that seems to be to add something like note = {conference version of \cite{JournalVersion}} I am, however, looking for a cleaner/more structured way of achieving this. It seems to me that the field related should be the solution here -- and it does work, if I want to reference the other entry by, e.g., title. However, I have not been able to get it to work using the reference itself. My current MWE is !BIB program = biber \documentclass{article} \usepackage{biblatex} \begin{filecontents}{literature.bib} @article{JournalVersion, author = {Graf, Lukas}, title = {Title A}, journal = {Journal}, year = {2020}, } @InProceedings{ConferenceVersion, author={Graf, Lukas}, title={Title B}, booktitle={Conference Proceedings}, year={2019}, related = {JournalVersion}, relatedtype = {conferenceof} } @InProceedings{ConferenceVersionVar, author={Graf, Lukas}, title={Title C}, booktitle={Conference Proceedings}, year={2019}, note = {conference version of \cite{JournalVersion}} } \end{filecontents} \addbibresource{literature.bib} \newbibmacro*{related:conferenceof}[1]{conference version of % \entrydata*{#1}{% \usebibmacro{title} \printtext[labelnumberwidth]{\printfield{labelnumber}}% }% } \begin{document} \nocite{*} \printbibliography \end{document} Using biber and pdflatex, this produces the following output: Here, entry [3] shows how the desired output looks like (but it is achieved using the note-field), entry [2] is the one where I tried (and failed) to implement an approach using the related-field. I additional reference [1] here by title, to test whether the related-field itself works.

  • toc appendix fix kicks in too late
    by Nate on October 20, 2026 at 11:16 am

    I am using the book class. My main file includes the following toc styling commands: \documentclass{book} \usepackage{nonumonpart} \usepackage{tocloft} \usepackage{calc} \usepackage[titletoc,title]{appendix} \renewcommand{\cftpartfont}{\LARGE\bfseries} \renewcommand{\cftchapfont}{\large\bfseries} \setlength{\cftchapnumwidth}{1.1875in}\renewcommand{\cftchappresnum}{Chapter }\renewcommand{\cftchapaftersnum}{:\phantom{mm}}\cftpagenumbersoff{part}\renewcommand\cftchapafterpnum{\par\addvspace{6pt}} \setlength{\cftbeforepartskip}{17pt} Borrowing from Werner's answer [here][1]. I included the following code to change the ToC's printing from "Chapter" to "Appendix": \let\oldappendix\appendix \renewcommand{\appendix}{% \oldappendix \addtocontents{toc} % Update \cftchappresnum within the .toc {\protect\renewcommand{\protect\cftchappresnum}{\appendixname\space}} } \renewcommand{\contentsname}{\underline{Table of Contents}}\setlength\cftbeforetoctitleskip{24pt}\setlength\cftaftertoctitleskip{24pt} \begin{document} ... \include{ch12} \appendix \pagenumbering{arabic} \renewcommand\thepage{A\arabic{page}} \include{appendixA} \pagenumbering{arabic} \renewcommand\thepage{B\arabic{page}} \include{appendixB} \end{document} It changes for Appendix B but not Appendix A: [![answer][2]][2] Does anyone know why it's not overriding the "Chapter" for Appendix A, and/or how to change that? EDIT: After using \begin{appendices} \addtocontents{toc}{\def\protect\cftchappresnum{\appendixname{} }} \pagenumbering{arabic} \renewcommand\thepage{A\arabic{page}} \include{appendixA} \pagenumbering{arabic} \renewcommand\thepage{B\arabic{page}} \include{appendixB} \end{appendices} it now prints: Appendix Chapter A: Appendix Appendix B: so now I just need to suppress the second word each time.

  • A Potential Approach to Incremental Compilation [closed]
    by Tom on October 20, 2026 at 9:57 am

    I’ve found that the secret behind BaKoMa’s incremental compilation seems to be hidden in itex.dll, which is located in the BaKoMa installation directory. There’s a reverse-engineering repository available at https://github.com/morluto/rea. Has anyone tried using Claude or ChatGPT to help implement incremental compilation?

  • Marking the end of a calculation
    by Coda5 55 on October 20, 2026 at 3:07 am

    I am looking for a way to highlight the end of a mathematical calculation. Not to say it's important, like \boxed does, but merely to clarify what one has ended with. See the red in the following image: So it can be translated to the following (considering \asresult{} draws the red line as above): \documentclass{article} \usepackage{amsmath, tikz} \newcommand{\diff}{\mathrm{d}} % differential pebble \newcommand{\asresult}[1]{ % result highlight %... } \begin{document} The derivation of the derivate of the exponential, under such new tools, needs a re-route first: \begin{align*} e^{\diff x} &= \sum_{k=0}^\infty \frac{\diff x^k}{k!} \\ &= \asresult{1 + \diff x} \\ (\diff e^x)(t) &= \lim_{h \to 0} e^{x(t+h)} - e^{x(t)} \\ &= e^{x(t)} \lim_{h \to 0} e^{x(t+h) - x(t)} - 1 \\ &= e^{x(t)} (e^{\diff x(t)} - 1) &= \asresult{e^{x(t)} \diff x(t)} \end{align*} And with that, one deduces $\cfrac{\diff e^x}{\diff x} = e^x$, QED. \end{document} How can I add this \asresult?

  • How do I hook part and chapter to toc in memoir
    by Chris Walton on October 19, 2026 at 11:12 pm

    How can I link a part toc into the part header page? I am trying to implement part specific and chapter specific toc on their relative title headers. The code for the chapter toc is based directly on pp 414-417 of memman.pdf and works well. I (naively) thought that repeating the code but replacing chapter with part would result in a corresponding part toc. My implementation of this does not seem to hook the part and the toc together. The attached code shows the wanted main toc, and chapter specific toc; but does not show the part toc. I expected a toc very similar to that for chapter on the title page. My example below shows the code for the chapter and the part toc. The part toc portion has been bounded by &**********. I have removed a lot of code concerning toc formatting, so the formats may be off. To aid me I have used: memoir: Chapter TOCs (Part 1) memoir: Chapter TOCs (Part 2) memoir: Chapter TOCs (Part 3) These have been very helpful, but when they venture into Tex code, rewriting parts of memoir, and @ symbols and the like, they are way above my competence. \documentclass{memoir} \usepackage{lipsum} \makeatletter \newcounter{tocmarker} \renewcommand\mempreaddchaptertotochook{\cftinserthook{toc}{stop-\thetocmarker}} \renewcommand\mempreaddparttotochook {\cftinserthook{toc}{stop-\thetocmarker}} \renewcommand{\mempostaddchaptertotochook}{% \stepcounter{tocmarker}\cftinserthook{toc}{start-\thetocmarker}} \let\normalchangetocdepth\changetocdepth \newcommand\chaptertoc{ \begingroup \setcounter{@memmarkcntra}{\value{tocdepth}} \let\changetocdepth\@gobble \normalchangetocdepth{-10} \cftinsertcode{start-\thetocmarker}{\normalchangetocdepth{2}} \cftinsertcode{stop-\thetocmarker}{\normalchangetocdepth{-10}} \let\tocheadstart\relax \let\printtoctitle\@gobble \let\aftertoctitle\relax \tableofcontents* \endgroup \setcounter{tocdepth}{\value{@memmarkcntra}} \par\bigskip \@afterheading } %******************************* \renewcommand\mempostaddparttotochook{% \stepcounter{tocmarker}\cftinserthook{toc}{start-\thetocmarker}} \let\normalchangetocdepth\changetocdepth % for later \newcommand\parttoc{ \begingroup \setcounter{@memmarkcntra}{\value{tocdepth}} \let\changetocdepth\@gobble \normalchangetocdepth{-10} \cftinsertcode{start-\thetocmarker}{\normalchangetocdepth{1}} \cftinsertcode{stop-\thetocmarker}{\normalchangetocdepth{-10}} \let\tocheadstart\relax \let\printtoctitle\@gobble \let\aftertoctitle\relax \tableofcontents* \endgroup \setcounter{tocdepth}{\value{@memmarkcntra}}% \par\bigskip \@afterheading } \makeatother %******************************* \begin{document} \tableofcontents* \part{Rewrite v2} \parttoc \chapter{Chapter} \chaptertoc \section{Section} \lipsum \end{document}

  • Is TeX Live 2016 compatible with Tahoe?
    by PJ49 on October 19, 2026 at 10:17 pm

    For certain reasons I have to use TeXShop version 3.62 in a project. It works fine with Sequoia 15.7.7, but will it work if I upgrade to Tahoe? Sorry, I guess I asked the wrong question. The TeXShop version does not seem to be important in this project. The relevant question should probably be "Will TeXLive 2016 work with MacOS Tahoe?" Obviously, I run into problems when I try TeXLive 2025 on Sequoia. So, why is this a problem? It works fine for me as it is, but I have a collaborator who does not have administrator rights on his computer. He has to use the OS that his employer has chosen, in this case Tahoe.

  • Lower the overline in Miller indices
    by Georgian Ilie on October 19, 2026 at 4:31 pm

    Good evening everyone, I am facing a problem when I designate crystallographic faces with the Miller notation (via the miller package). Typing the following code: \documentclass[varwidth=15cm, border=1pt, 11pt]{standalone} \usepackage{amsmath} %\usepackage{physics} \usepackage{fontspec} \usepackage{miller} \setmainfont{STIX Two Text} \usepackage[math-style=upright,mathbf=text,mathbf=sym,mathrm=text,mathrm=sym]{unicode-math} \setmathfont{STIX Two Math} \begin{document} \begin{equation*} \hkl(110)\equiv\hkl(11-20) \end{equation*} \end{document} Leads me to this: I am struggling in getting the bar over the "2" closer to the number. Can the distance between these two be set? Thank you in advance for your help.

  • Marking a tail one, two, or four bars by folarrow package for commutative diagrams
    by Sebastiano on October 19, 2026 at 10:51 am

    The folarrow package, available for amscd, xy-pic, and tikz-cd, provides the possibility of placing a marking or description at the center of the arrow's tail. I wonder whether it is possible to obtain markings of the same size, both for the tail and the arrow, with one, two, or four bars, similarly to the three-bar marking provided by folarrow. \documentclass{article} \usepackage{tikz-cd,amssymb} \usepackage{folarrow} \begin{document} \begin{tikzcd} A \arrow[r, foliated] \arrow[rd, "\smallsetminus" marking] & B \arrow[d, "///" marking] \\ & C \end{tikzcd} \end{document}

  • longtable caption being tagged as TR > TH
    by Paul J Hurtado on October 19, 2026 at 10:25 am

    Here is a MWE where the caption of a longtable is being tagged as a table row (TR) and as a header row (TH) using lualatex (and lualatex-dev) with tagging=on. This leads to Regularity errors in the Adobe Acrobat checker. [I'm running the latest MikTeX updates with latex-tools updated as well.] Am I doing something incorrectly, or is there a longtable conflict with the tagging tools? It's listed as compatible at latex3.github.io/tagging-project/tagging-status/. Thanks! \DocumentMetadata{ lang = en-US, tagging = on, tagging-setup = {math/setup={mathml-SE,mathml-AF}}, check-tagging-status } % END \DocumentMetadata{} \documentclass[letterpaper,12pt,oneside]{report} \usepackage{longtable} \newcommand{\tn}{\tabularnewline} % Shorthand used for cleaner table entries \begin{document} \noindent This table is being tagged incorrectly. The caption as well as the desired header row were both tagged as TR, with the contents of each appearing in TH tags (on TH tag for the caption text, and one TH tag for each of Base 10 and Binary). \begin{longtable} {|c|c|} \caption{The longtable package can be used to split a table across multiple pages when it won't fit onto a single page, as illustrated with this table.}\label{t:long} \\ \hline \textbf{Base 10} & \textbf{Binary} \tn \hline \endhead % Caption still tagged as <TR> if this line commented out (no TH tags in the caption or row above) 1 & 1 \tn \hline 2 & 10 \tn \hline 3 & 11 \tn \hline 4 & 100 \tn \hline 5 & 101 \tn \hline 6 & 110 \tn \hline 7 & 111 \tn \hline 8 & 1000 \tn \hline 9 & 1001 \tn \hline 10 & 1010 \tn \hline 11 & 1011 \tn \hline 12 & 1100 \tn \hline 13 & 1101 \tn \hline 14 & 1110 \tn \hline 15 & 1111 \tn \hline 16 & 10000 \tn \hline 17 & 10001 \tn \hline 18 & 10010 \tn \hline 19 & 10011 \tn \hline 20 & 10100 \tn \hline 21 & 10101 \tn \hline 22 & 10110 \tn \hline 23 & 10111 \tn \hline 24 & 11000 \tn \hline 25 & 11001 \tn \hline 26 & 11010 \tn \hline 27 & 11011 \tn \hline 28 & 11100 \tn \hline 29 & 11101 \tn \hline 30 & 11110 \tn \hline \end{longtable} \end{document}

  • A problem involves origdate and text cites
    by M. Logic on October 19, 2026 at 9:49 am

    A minimal working sample is as follows. \documentclass[fontset=fandol]{ctexart} \usepackage[utf8, backend=biber, style=caspervector-ay, sorting=cenyt, sortcites=false, ugly]{biblatex} \makeatletter %change English commas for Chinese enumeration commas \renewcommand*{\bbx@citecomma}{\bbx@cnbcomma} \renewcommand*{\bbx@citebcomma}{\bbx@cnbcomma} %change English semicolons for Chinese commas \renewcommand*{\bbx@citescolon}{\bbx@cncomma} %forbiden p. and pp., and change , for : \renewcommand*{\postnotedelim}{\addcolon\space}% \DeclareFieldFormat{postnote}{\mknormrange{#1}}% \DeclareFieldFormat{multipostnote}{\mknormrange{#1}}% \DeclareFieldFormat{roundcnparens}{(#1)}%Chinese parenthesis \newbool{cbx:cnparens} \renewbibmacro*{textcite}{% \iffieldequals{namehash}{\cbx@lasthash} {\iffieldundef{shorthand} {\iffieldundef{origyear} {} {\undef\cbx@lastyear}% \ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)} {\setunit{\addcomma}% \usebibmacro{cite:extradate}} {\setunit{\compcitedelim}% \printfield[roundcnparens]{origyear}%Chinese parenthesis \setunit*{\addspace}% \usebibmacro{cite:labeldate+extradate}% \savefield{labelyear}{\cbx@lastyear}}} {\setunit{\compcitedelim}% \usebibmacro{cite:shorthand}% \global\undef\cbx@lastyear}} {\ifnameundef{labelname} {\iffieldundef{shorthand} {\usebibmacro{cite:label}% \setunit{% \global\booltrue{cbx:cnparens}% \printdelim{nonameyeardelim}\bbx@cnlparen}%Chinese left parenthesis \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} {}% \printfield[roundcnparens]{origyear}%Chinese parenthesis \setunit*{\addspace}% \usebibmacro{cite:labeldate+extradate}} {\usebibmacro{cite:shorthand}}} {\printnames{labelname}% \setunit{% \global\booltrue{cbx:cnparens}% \printdelim{nameyeardelim}\bbx@cnlparen}%Chinese left parenthesis \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} {}% \iffieldundef{shorthand} {\iffieldundef{labelyear} {\usebibmacro{cite:label}} {\printfield[roundcnparens]{origyear}%Chinese parenthesis \setunit*{\addspace}% \usebibmacro{cite:labeldate+extradate}}% \savefield{labelyear}{\cbx@lastyear}} {\usebibmacro{cite:shorthand}% \global\undef\cbx@lastyear}}% \stepcounter{textcitecount}% \savefield{namehash}{\cbx@lasthash}}% \setunit{% \ifbool{cbx:cnparens}%Chinese right parenthesis {\bbx@cnrparen\global\boolfalse{cbx:cnparens}} {}% \textcitedelim}% } \makeatother \begin{filecontents*}{\jobname.bib} @book{bookot, location = {Place}, publisher = {ABC}, author = {Name, Given}, title = {One title}, year = {2001}, origyear = {1978}, } @book{bookat, location = {Place}, publisher = {ABC}, author = {Name, Given}, title = {Another title}, year = {2001}, origyear = {1976}, } \end{filecontents*} \addbibresource{\jobname.bib} \addbibresource{biblatex-examples.bib} \begin{document} 1. \textcite{bookot,bookat,worman,geer} NO 2. \textcites{bookot,bookat,worman,geer} NO 3. \textcites{bookot}{bookat}{geer} NO 4. \textcites[20]{bookot}[29--71]{bookat}{geer} NO %\printbibliography \end{document} As you see, to cite the references with original dates in texts, I define new \textcite and \textcites in my dcocument improved from the link. The commands could make some punctuations be Chinese in text citations (I have succeed defining \cite and \cites). As you see \textcite and \textcites do not work well. The following picture shows what I want. I add cbx:cnparens to replace cbx:parens. But maybe I don't replace all of cbx:parens, then which are not replaced? By the way, don't change other cite commands, such as \cite and \cites. Note that caspervector-ay bases on authoryear-comp.

  • A problem involves origdate and multiple cites
    by M. Logic on October 19, 2026 at 6:44 am

    First a minimal working sample is as follows. \documentclass{ctexart} \usepackage[utf8, backend=biber, style=caspervector-ay, sorting=cenyt,sortcites=false,ugly]{biblatex} \DeclareFieldFormat{roundparens}{(#1)}% \makeatletter \newbibmacro{fciting:origdate}{% \iffieldundef{origyear}% {}% {\printtext[roundparens]{%parens \printfield{origyear}}}}% \newbibmacro{fciting:date}{% \printtext[bibhyperref]{% \printfield{year}% \printfield{extradate}}} \newbibmacro*{fciting:temporary-origdate}{% \usebibmacro{fciting:origdate}% \iffieldundef{origyear}% {}% {\setunit*{\addspace}}% } \newbibmacro*{fciting:date+extradate}{% \usebibmacro{fciting:temporary-origdate}% \printtext{\usebibmacro{fciting:date}}} %\newcommand{\ftextcitedelim}{\addcomma\addspace} \newcommand{\fcompcitedelim}{\addcomma\addspace} \newcommand{\fmulticitedelim}{\addsemicolon\addspace} \renewbibmacro*{fcite}{% \iffieldundef{shorthand} {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}} {\usebibmacro{cite:label}% \setunit{\printdelim{nonameyeardelim}}% \usebibmacro{fciting:date+extradate}% \usebibmacro{cite:reinit}} {\iffieldequals{namehash}{\cbx@lasthash} {\iffieldundef{origyear} {} {\undef\cbx@lastyear}% \ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)} {\setunit{\fcompcitedelim}% \usebibmacro{cite:extradate}} {\setunit{\fcompcitedelim}% \usebibmacro{fciting:date+extradate}% \savefield{labelyear}{\cbx@lastyear}}} {\printnames{labelname}% \setunit{\printdelim{nameyeardelim}}% \setunit*{\addspace}% \usebibmacro{fciting:date+extradate}% \savefield{namehash}{\cbx@lasthash}% \savefield{labelyear}{\cbx@lastyear}}}}% {\usebibmacro{cite:shorthand}% \usebibmacro{cite:reinit}}% \setunit{\fmulticitedelim}% } \DeclareCiteCommand{\fcite} {\usebibmacro{cite:init}% \usebibmacro{prenote}}% {\usebibmacro{citeindex}% \usebibmacro{fcite}}% {}%\setunit{\fmulticitedelim} {\usebibmacro{postnote}}% \DeclareMultiCiteCommand{\fcites}[\usebibmacro{cite:init}]{\fcite}{\fmulticitedelim} \makeatother \begin{filecontents*}{\jobname.bib} @book{bookot, location = {Place}, publisher = {ABC}, author = {Name, Given}, title = {One title}, year = {2001}, origyear = {1978}, } @book{bookat, location = {Place}, publisher = {ABC}, author = {Name, Given}, title = {Another title}, year = {2001}, origyear = {1976}, } \end{filecontents*} \addbibresource{\jobname.bib} \addbibresource{biblatex-examples.bib} \begin{document} \fcite{bookot,bookat,worman,geer} YES \fcites{bookot,bookat,worman,geer} YES \fcites{bookot}{bookat}{geer} NO \fcites[20]{bookot}[29--71]{bookat}{geer} NO \printbibliography \end{document} As you see, to cite the references with original dates, I define new \fcite and \fcites (I also use \cite and \cites in my dcocument for some reseasons) improved from the link. As you see \fcite and \fcites work well in most cases, except: when I use \fcites{bookot}{bookat}{geer} and \fcites[20]{bookot}[29--71]{bookat}{geer} in this case, it produce semicolons between years with the same author, while they should be commas. Then how to solve the problem?

  • What is the reason for starting preamble comment with a space in TeX and MF?
    by Igor Liferenko on October 19, 2026 at 2:35 am

    Run commands: tex 'story \end' dvitype story Preamble comment is: ' TeX output 2026.10.18:0927' The leading space is added in §617 of tex.web. Why? Run commands: mf '\nodisplays; input cmr10' gftype cmr10.2602gf Preamble comment is: ' METAFONT output 2026.10.18:0928'

  • On the Numerical Justification of Table of Contents Entries [duplicate]
    by Jethro on October 18, 2026 at 6:46 pm

    MWE: \documentclass[openany]{book} \usepackage{tocloft} \renewcommand{\thechapter}{\Roman{chapter}} \setlength{\cftchapnumwidth}{3em}% Width of chapter numbers in ToC \renewcommand{\cftchapaftersnum}{.} % Add a period after each chapter number in ToC \renewcommand{\cftchapleader}{\dotfill} \begin{document} \tableofcontents \chapter{This is the First Chapter} \chapter{This is the Second Chapter} \chapter{This is the Third Chapter} \end{document} Hence, the Table of Contents: Notice that the three Contents entries are left justified according to the beginning of each Roman numeral. How may I produce these entries right justified according to the periods immediately after the Roman numerals?

  • Table lines and alignment
    by azetina on October 18, 2026 at 3:57 pm

    Consider the following MWE: \documentclass[11pt,border=6pt]{standalone} \usepackage{mathptmx} \usepackage{booktabs} \usepackage{array} \usepackage{multirow} \renewcommand{\arraystretch}{1.15} \begin{document} \setlength{\tabcolsep}{7pt} \begin{tabular}{c|cc|cc|cc|cc|cc} \toprule[1.2pt] \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{Line}\\\textbf{number}\end{tabular}} & \multicolumn{10}{c}{\textbf{Column number}} \\ \cmidrule(l){2-11} & \multicolumn{2}{c|}{\textit{00--09}} & \multicolumn{2}{c|}{\textit{10--19}} & \multicolumn{2}{c|}{\textit{20--29}} & \multicolumn{2}{c|}{\textit{30--39}} & \multicolumn{2}{c}{\textit{40--49}} \\ \midrule \textit{00} & 15544 & 80712 & 97742 & 21500 & 97081 & 42451 & 50623 & 56071 & 28882 & 28739 \\ \textit{01} & 01011 & 21285 & 04729 & 39986 & 73150 & 31548 & 30168 & 76189 & 56996 & 19210 \\ \textit{02} & 47435 & 53308 & 40718 & 29050 & 74858 & 64517 & 93573 & 51058 & 68501 & 42723 \\ \textit{03} & 91312 & 75137 & 86274 & 59834 & 69844 & 19853 & 06917 & 17413 & 44474 & 86530 \\ \textit{04} & 12775 & 08768 & 80791 & 16298 & 22934 & 09630 & 98862 & 39746 & 64623 & 32768 \\ \addlinespace[4pt] \textit{05} & 31466 & 43761 & 94872 & 92230 & 52367 & 13205 & 38634 & 55882 & 77518 & 36252 \\ \textit{06} & 09300 & 43847 & 40881 & 51243 & 97810 & 18903 & 53914 & 31688 & 06220 & 40422 \\ \textit{07} & 73582 & 13810 & 57784 & 72454 & 68997 & 72229 & 30340 & 08844 & 53924 & 89630 \\ \textit{08} & 11092 & 81392 & 58189 & 22697 & 41063 & 09451 & 09789 & 00637 & 06450 & 85990 \\ \textit{09} & 93322 & 98567 & 00116 & 35605 & 66790 & 52965 & 62877 & 21740 & 56476 & 49296 \\ \addlinespace[4pt] \textit{10} & 80134 & 12484 & 67089 & 08674 & 70753 & 90959 & 45842 & 59844 & 45214 & 36505 \\ \textit{11} & 97888 & 31797 & 95037 & 84400 & 76041 & 96668 & 75920 & 68482 & 56855 & 97417 \\ \textit{12} & 92612 & 27082 & 59459 & 69380 & 98654 & 20407 & 88151 & 56263 & 27126 & 63797 \\ \textit{13} & 72744 & 45586 & 43279 & 44218 & 83638 & 05422 & 00995 & 70217 & 78925 & 39097 \\ \textit{14} & 96256 & 70653 & 45285 & 26293 & 78305 & 80252 & 03625 & 40159 & 68760 & 84716 \\ \addlinespace[4pt] \textit{15} & 07851 & 47452 & 66742 & 83331 & 54701 & 06573 & 98169 & 37499 & 67756 & 68301 \\ \textit{16} & 25594 & 41552 & 96475 & 56151 & 02089 & 33748 & 65289 & 89956 & 89559 & 33687 \\ \textit{17} & 65358 & 15155 & 59374 & 80940 & 03411 & 94656 & 69440 & 47156 & 77115 & 99463 \\ \textit{18} & 09402 & 31008 & 53424 & 21928 & 02198 & 61201 & 02457 & 87214 & 59750 & 51330 \\ \textit{19} & 97424 & 90765 & 01634 & 37328 & 41243 & 33564 & 17884 & 94747 & 93650 & 77668 \\ \bottomrule[1.2pt] \end{tabular} \end{document} How can I: Ensure the vertical lines and horizontal line connect beside "Line number"; that is form like a T. See image. "Line number" should be bottom aligned with 00-09. As is, it is centered vertically using multirow. Everything else should remain the same.

  • Why are end-of-lines commented out, but lines can be indented?
    by ltcomdata on October 17, 2026 at 11:46 pm

    Looking over many examples of LaTeX code in macro definitions, I often find a % at the end of a line --- so that no extraneous spaces are somehow imported into the macro by the end of line character. However, at the same time, I notice that these same macros often have many lines starting wit indentations --- presumably to make the code readable. How come the code can be indented at all? Why should every line in the macro have any opening spaces at all? Isn't the point of % to avoid extraneous spaces? Why do we care about that at the end of the line, but do not care about it at the beginning of the line?

  • hyperref package: error after update "\??? doesn't match its definition" "key-value input"
    by Bernd on October 17, 2026 at 9:17 pm

    I have updated MikTex, and now I get this error when I compile my tex files with pdflatex: ! Use of \??? doesn't match its definition. <argument> \??? ! Latex Error: Misplaced '=' in key-value input on line 59. The pdf file produced looks good, it has the hyperlinks that I expect. When I comment out the hyperref package, no error is thrown, but then of course, the expected hyperlinks the hyperref package produces are not there. I have found a post referring to a similar issue, where a re-installation has solved the problem. However, this did not work for me. Here is a minimum working example: \documentclass[a5paper,fontsize=9pt, twoside, DIV=17, BCOR=1mm]{scrbook} \usepackage [bookmarks, colorlinks=true, linkcolor=blue, citecolor=magenta, urlcolor=cyan, pdfpagelayout=TwoPageRight, pdfpagelayout=SinglePage, pagebackref, pdfusetitle ] {hyperref} \usepackage[chorded, noshading]{songs} \baselineadj=-1.8ex plus 0.3ex minus 1.0ex \versesep=0.5ex plus 0.5ex minus 0.5ex \renewcommand{\colbotglue}{0pt plus .5\textheight minus 0pt} \songpos{3} \settowidth{\versenumwidth}{10.} \setlength{\songnumwidth}{7.5ex} \newcommand{\sieben}{\textsuperscript{7}} \begin{document} \chapter{Preface} \label{label} \chapter{Songs} \begin{songs}{} \beginsong{The drunken sailor} [ by = {Traditional} ] \beginverse \[d]What shall we do with the drunken sailor, \[C]what shall we do with the drunken sailor, \[d]what shall we do with the drunken sailor \[C]early in the \[d]morning? \endverse \beginchorus \[d]Hooray! And up she rises. \[C]Hooray! And up she rises. \[d]Hooray! And up she rises \[C]early in the \[d]morning. \endchorus \chordsoff \beginverse Take him and shake ihm and try to awake him! \endverse See Chapter \ref{label} \endsong \end{songs} \end{document} The log file contains this information, which I don't understand: chapter 2. ! Use of \??? doesn't match its definition. <argument> \??? ! LaTeX Error: Misplaced '=' in key-value input on line 59 l.59 \endsong 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. Any ideas for a fix or a workaround? Thanks in advance for your help!

  • How to make the `\ddots` centering of the bounding box?
    by Explorer on October 17, 2026 at 4:37 pm

    This post is similar to this one, but not exactly the same... With the following code: \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{matrix} \setlength{\fboxsep}{0pt} \begin{document} \[ \begin{tikzpicture} \matrix (magic) [ matrix of math nodes, nodes={circle,draw=magenta,minimum size=1cm}, left delimiter=(, right delimiter=) ] { 1 \\ & 1 \\ & & \ddots \\ & & & \fbox{$\ddots$} \\ & & & & 1 \\ }; \draw[teal,dashed] (magic-1-1.center) -- (magic-5-5.center); \end{tikzpicture} \] \end{document} What I want was the following: only typeset three dots, thus \Ddots with nicematrix was not so flexible; I want the "slope" of \ddots was parallel with the teal,dashed line; I want to ellnimate the extra height of the bounding box of \ddots(why?It looks not good...) It recalled the classical \rvdots here, and we know: $ latexdef \ddots \ddots: macro:->\protect \ddots \ddots : macro:->\mathinner {\mkern 1mu\raise 7\p@ \vbox {\kern 7\p@ \hbox {.}}\mkern 2mu \raise 4\p@ \hbox {.}\mkern 2mu\raise \p@ \hbox {.}\mkern 1mu} I guessed slightly modify the commands could help? Any suggestions? \makeatletter % \DeclareRobustCommand{\rvdots}{% % \vbox{ % \baselineskip4\p@\lineskiplimit\z@ % \kern-\p@ % \hbox{.}\hbox{.}\hbox{.} % }} \DeclareRobustCommand{\rddots}{% \mathinner {% \mkern 1mu\raise 7\p@% \vbox{\kern 1\p@ \hbox {.}}% \mkern 0.4mu \raise 4\p@ \hbox {.}% \mkern 0.4mu\raise \p@ \hbox {.}% \mkern 1mu% }% } \makeatother Edit1 If I zoomed in with with cfr's answer: \makeatletter \newcommand\exddots {% \mathinner {% \mkern 1mu\raise 3.5\p@ % 7 -> 3.5 \vbox {\kern 0\p@ \hbox {.}}% 7 -> 0 \mkern 2mu \raise -0.5\p@ \hbox{.}% 4 -> -0.5 \mkern 2mu \raise -4\p@ \hbox{.}% \p@ -> -4 \mkern 1mu }% } \makeatother Edit2 Just to show the example of cfr's comment: Is the content or, at least, the size of the content in the matrix fixed? because the angle of the diagonal obviously will vary if that varies. so unless you want this only as a one-off, you maybe need to think about how this should work. should \exddots really look different each time and different from any use in maths mode? or do you want to fix the matrix dimensions to keep the angle constant? or ...? I don't think it will look so good if the dots look different in different cases. at least, that is not how it usually would work in latex? \documentclass{article} \usepackage{amsmath} \usepackage{nicematrix} \usepackage{tikz} % \usepackage{kpfonts-otf} \begin{document} \[ \begin{pNiceMatrix} 3 & & & \\ & 555 & & \\ & & \ddots & \\ & & & 66666 \CodeAfter \tikz{ \draw[teal, ultra thin] (1-1.center) -- (4-4.center); \draw[magenta, ultra thin] (2-2.south east) -- (4-4.north west); } \end{pNiceMatrix}\qquad \begin{pNiceMatrix} 3 & & & \\ & 555 & & \\ & & \Ddots & \\ & & & 66666 \CodeAfter \tikz{ \draw[teal, ultra thin] (1-1.center) -- (4-4.center); \draw[magenta, ultra thin] (2-2.south east) -- (4-4.north west); } \end{pNiceMatrix} \] \[ \begin{pNiceMatrix} a & & & \\ & b & & \\ & & \ddots & \\ & & & d \CodeAfter \tikz{ \draw[teal, ultra thin] (1-1.center) -- (4-4.center); \draw[magenta, ultra thin] (2-2.south east) -- (4-4.north west); } \end{pNiceMatrix}\qquad \begin{pNiceMatrix} a & & & \\ & b & & \\ & & \Ddots & \\ & & & d \CodeAfter \tikz{ \draw[teal, ultra thin] (1-1.center) -- (4-4.center); \draw[magenta, ultra thin] (2-2.south east) -- (4-4.north west); } \end{pNiceMatrix} \] \[ \begin{pNiceMatrix} x & & & & \\ & x+y & & & \\ & & \ddots & & \\ & & & \sqrt{x-y} & \\ & & & & \dfrac{x}{y} \CodeAfter \tikz{ \draw[teal, ultra thin] (1-1.center) -- (4-4.center); \draw[magenta, ultra thin] (2-2.south east) -- (4-4.north west); } \end{pNiceMatrix}\qquad \begin{pNiceMatrix} x & & & & \\ & x+y & & & \\ & & \Ddots & & \\ & & & \sqrt{x-y} & \\ & & & & \dfrac{x}{y} \CodeAfter \tikz{ \draw[teal, ultra thin] (1-1.center) -- (4-4.center); \draw[magenta, ultra thin] (2-2.south east) -- (4-4.north west); } \end{pNiceMatrix} \] \end{document} With latin-modern-math: With kpfonts-otf:

  • How to perform vector operations and print the result directly in luacas?
    by minthao_2011 on October 17, 2026 at 5:29 am

    I am using the luacas package to handle symbolic math and compute coordinates. Currently, to display the vector $\vec{AB}$ from two points $A$ and $B$, I have to subtract and print each component individually like this: \documentclass[12pt]{article} \usepackage{amsthm} \theoremstyle{definition} \newtheorem{ex}{Example} \usepackage{luacas} \usepackage{esvect} \begin{document} \begin{ex} \begin{CAS} A = {sqrt(2), -2/7, 3/5} B = {sqrt(8), -14/29, 3*sqrt(3)} \end{CAS} \[\displaystyle A=\left(\print{A[1]};\print{A[2]};\print{A[3]} \right), \quad B=\left(\print{B[1]};\print{B[2]};\print{B[3]} \right).\] \[ \vv{AB}=\left(\print{simplify(B[1]-A[1])};\print{B[2]-A[2]};\print{B[3]-A[3]} \right) .\] \end{ex} \end{document} This approach makes the code repetitive and messy. I would like to simplify the workflow by computing the vector directly within the CAS environment and printing it in one go, like this: \begin{CAS} A = {sqrt(2), -2/7, 3/5} B = {sqrt(8), -14/29, 3*sqrt(3)} vAB = B - A \end{CAS} \[\vv{AB} = \print{vAB}\] However, doing this directly does not work as expected. I got the massage: [string "A = {sqrt(Integer('2')), -Integer('2')/Intege..."]:1: attempt to perform arithmet ic on a table value (global 'B') stack traceback: [string "A = {sqrt(Integer('2')), -Integer('2')/Intege..."]:1: in local 'exe' ...26/texmf-dist/tex/lualatex/luacas/test/luacas-parser.lua:329: in function ' CASparse' [\directlua]:1: in main chunk. \luacode@dbg@exec ...code@maybe@printdbg {#1} #1 } l.15 \end {CAS} ? Is there a way to define a custom function, a macro, or use a specific luacas command/method so that I can compute $vAB = B - A$ (or simplify it) and print it cleanly without accessing each index manually?

  • How do I typeset castling in xskak?
    by Reinhard Neuwirth on October 16, 2026 at 10:42 am

    The obvious way to typeset castling would be 0-0 (and 0-0-0 for long castling), but \chessboard shows no sign of it, and the move record shows ZZ0-0. I have tried all sorts of options, to no avail. Puzzled. \documentclass{article} % RN. 16/10/2026 % BRIEF DESCRIPTION: % Typesetting castling moves in xskak %======================= \usepackage{xskak} \begin{document} \usetextfig \newchessgame \mainline{1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6 5.0-0} \chessboard \end{document}

  • How to define a default maxwidth maxheight when including graphics?
    by muggi on October 16, 2026 at 9:40 am

    Sometimes I have floats filling more than the half page, which isn't that nice. I have defined a custom command for my images, which have different sizes and aspect ratios. \documentclass[a4paper,12pt]{scrreprt} % writing things \usepackage[T1]{fontenc} \usepackage{inputenc} \usepackage[ngerman]{babel} \usepackage{paralist} % document class things \usepackage[headsepline=1pt,autooneside=false]{scrlayer-scrpage} \usepackage{scrhack} % images \usepackage{graphicx} \usepackage[figurename=Abb.,tablename=Tab.]{caption} \usepackage{float} \usepackage{here} \usepackage[section]{placeins} % rest \usepackage{lipsum} \usepackage{hyperref} \usepackage[all]{hypcap} % commands \newcommand{\n}{\newline} \newcommand{\bild}[4][width=\textwidth]{ \begin{figure}[!hbt]\centering \makebox[\textwidth][c]{ \includegraphics[#1]{#2} } \caption{#3}\label{#4} \end{figure} } \clearmainofpairofpagestyles \cfoot[\pagemark]{\pagemark} \ohead{\scshape\rightmark} \automark{chapter} \renewcommand{\chaptermark}[1]{\markright{\ #1}} \begin{document} \thispagestyle{empty} \pagenumbering{Roman} \tableofcontents \listoffigures \pagestyle{scrheadings} \cleardoubleoddpage \pagenumbering{arabic} \chapter{first}\label{first} Lipsum.\n So so so... \chapter{one} \section{one} \lipsum\ref{b0} \bild{picture-15x21}{Picture. Height: 15 cm. Width: 21 cm.}{b0} \bild{picture-15x21}{The same picture. Height: 15 cm. Width: 21 cm.}{b1} \bild[height=0.45\textheight]{picture-15x21}{The same picture. Height: 15 cm. Width: 21 cm.}{b3} \bild[height=0.45\textheight]{picture-15x21}{The same picture. Height: 15 cm. Width: 21 cm.}{b4} \lipsum \section{two} \lipsum \end{document} I'd like to tell my MiKTeX: When I don't specify #1 explicitly and if you compile an image which is broader than \textwidth or higher than 0.45\textheight, resize it that \imagewidth <= \textwidth and \imageheight <= 0.45\textheight. Always keep the aspect ratio. EDIT: Actually, I'd like to have "0.5 * (\textheigt - height of the two captions)" instead of 0.45\textheight so that two graphics fill one page. But I think this is either too complex to write, too fault-prone to use or not realisable.

  • \TblrNote eats space
    by user20478285 on October 15, 2026 at 10:32 pm

    \documentclass{article} \usepackage{tabularray} \UseTblrLibrary{booktabs} \begin{document} \begin{table} \centering \small \begin{talltblr}[ note{a} = {Foo!}, caption = {Some Table.} ]{colspec={ll}} \toprule A & B \\ \midrule Foo\TblrNote{a} Bar & 1 \\ Foo\TblrNote{a}~Bar & 2 \\ Foo\TblrNote{a}{} Bar & 3 \\ Foo\TblrNote{a}\ Bar & 4 \\ \bottomrule \end{talltblr} \end{table} \end{document} How can I get normal space between the words Foo and Bar (like I would with \footnote) when using \TblrNote? None of the 3 approaches I tried seems to work.