• Strange side effect of command redefinition vertical spacing
    by Stefan Müller on February 16, 2026 at 11:41 am

    I asked for help with the formatting of attribute value matrices (AVMs) here LaTeX macro for typesetting AVMs and distance between AVM and text + typing and the question was answered. Now I use the following redefinition of \eal: \let\eal\ealnoraggedright \let\ea\eanoraggedright \eal and \ealnoraggedright are defined as follows: \def\eal{\begin{exe}\exnrfont\ex\begin{xlist}[iv.]\raggedright} \def\ealnoraggedright{\begin{exe}\exnrfont\ex\begin{xlist}[iv.]} After the redefinition my original problem is back: There is space missing between the heading of the second AVM and the AVM. That is, the AVM is too close to "Passive". \documentclass{scrartcl} \usepackage{langsci-gb4e} \let\eal\ealnoraggedright \let\ea\eanoraggedright \usepackage{array} \newcommand{\nliste}[1]{% \mbox{$\langle$\upshape\normalfont#1$\rangle$}% } \newcommand{\eliste}{% \mbox{% $\left\langle\right\rangle$}% } \newcommand{\ms}[2][]{% \ifdim\lastskip=-1pt % flag value \mbox{}\\*[-.8\baselineskip]% \fi \mbox{% \delimiterfactor=1000 \delimitershortfall=0pt\tabcolsep=0pt% $\hspace{-2pt}\left[% \begin{tabular}{>{\upshape\scshape}l@{}>{\hspace*{5pt}\normalfont\itshape}l} \if\relax\detokenize{#1}\relax\else \multicolumn{2}{>{\normalfont\itshape}l}{#1}% \\% \fi% #2% \end{tabular}% \right]$% }% \par\vspace{1mm}% } \newcommand{\onems}[2][]{% \mbox{% \delimiterfactor=1000 \delimitershortfall=0pt \tabcolsep=0pt $\left[% \begin{tabular}{>{\upshape\scshape}l} \if\relax\detokenize{#1}\relax\else {\normalfont\itshape #1}% \\ \fi #2% \end{tabular}% \right]$% }% \vspace{1mm}% } \newcommand{\menge}[1]{% \mbox{% $% \left\{% \begin{tabular}{@{}l@{}}\ignorespaces#1\end{tabular}% \right\}% $% }% } \newcommand{\str}{{\normalfont\textit{str}}}% xspace does not work with NP[\str] \begin{document} The second AVM is too close to the `P'. There seems to be too much space before the AVM. \eal \ex Perfekt:\\ \ms{ spr & \nliste{ NP[\str]$_i$ }\\ comps & \nliste{ NP[\str]$_j$ }\\ arg-st & \nliste{ NP[\str]$_i$, NP[\str]$_j$ } } \ex Passiv:\\ \ms{ spr & \nliste{ NP[\str]$_j$ }\\ comps & \eliste\\ arg-st & \nliste{ NP[\str]$_j$ } } \zl \eal \label{linking-konstruktionen} \ex\label{transitiv-Konstruktion} die \emph{Transitive Construction}:\\ \ms{ syn & \ms{ cat & v\\ voice & active\\ }\\ val & \menge{ \onems{ role \ms{ gf & obj \\ %$\theta$ & \textsc{da}$-$\\ \textsc{da} & $-$\\ }\\ }}\\ } \ex die \emph{Subject Construction}:\\ \ms{ syn & \ms{ cat & v\\ }\\ val & \menge{ \onems{ role \onems{ gf \textit{subj} } }}\\ } \ex die \emph{Passive Construction}:\\ \ms{ syn & \ms{ cat & v\\ form & PastPart\\ }\\ val & \menge{ \ms{ role & \ms{ gf & obl\\ da & $+$\\ }\\ syn & \textrm{P[von]/}zero\\ }}\\ } \zl \end{document}

  • Slope Field Uniform Plot
    by Nick B on February 16, 2026 at 11:36 am

    I am trying to create slope fields based on several examples I have seen on here. My issue is that when I change my equation (the slope field I want to draw) my image does not appear to be square. I would like it uniform. The uniformity changes based on what function I plot. Is there a way to fix this? The image attached is from AP Classroom. Note the uniformity all the way around and how it is square, or flush. that is what I am looking for. \documentclass{standalone} \usepackage{pgfplots} \usetikzlibrary{arrows.meta} \pgfplotsset{compat=1.18} \begin{document} \centering \begin{tikzpicture} \begin{axis}[ view={0}{90}, axis lines=middle, axis equal image, width=10cm, xmin=-5.5, xmax=5.5, ymin=-5.5, ymax=5.5, xtick={-4,-2,2,4}, ytick={-4,-2,2,4}, xlabel=$x$, ylabel=$y$, axis line style={thick, -{Triangle[scale=1.2]}}, clip=false ] \addplot3[ thick, color=red, declare function={ f(\x,\y) = \x; norm(\x,\y) = sqrt(1 + (f(\x,\y))^2); }, quiver={ u={1/norm(x,y)}, v={f(x,y)/norm(x,y)}, scale arrows=0.4, every arrow/.append style={-} }, % -------------------------------- samples=15, domain=-4.2:4.2, domain y=-4.2:4.2 ] {0}; \end{axis} \end{tikzpicture} \end{document}

  • Getting Page Numbers to Populate in ToC for Unnumbered Chapters and Sections [book]
    by John Samples on February 16, 2026 at 8:59 am

    Except that the sections in the preliminaries aren't populating page numbers, this is the formatting that I'd like for the ToC. Is there a way to tether a specific line in the body of the book to the page numbers for these in the ToC? The code is here: \documentclass[oneside]{book} \usepackage{graphicx} \usepackage{amsfonts} \usepackage{amsmath} \usepackage{amsthm} \usepackage{xfrac} \usepackage{amssymb} \usepackage{tocloft} \usepackage[top=3.6cm, bottom=2.7cm, left=3.1cm, right=3.1cm]{geometry} \newtheorem{definition}{Definition}[section] \newtheorem{problem}{Problem Set} \newtheorem{theorem}{Theorem}[section] \newtheorem{lemma}{Lemma}[section] \newtheorem{exercise}{Exercise} \newtheorem{corollary}{Corollary}[section] \title{Topology} \renewcommand{\contentsname}{Table of Contents} \renewcommand{\thechapter}{\Roman{chapter}} \renewcommand{\thesection}{\arabic{chapter}.\arabic{section}} \advance\cftchapnumwidth 1.3em\relax \advance\cftsecnumwidth .9em\relax \advance\cftsecindent .9em\relax \advance\cftsubsecnumwidth .5em\relax \begin{document} \date{} \maketitle \tableofcontents \addcontentsline{toc}{section}{\protect\textbf{Preliminaries:}} \addcontentsline{toc}{section}{A. Mathematical Writing and Proof Methods} \addcontentsline{toc}{section}{B. Basic Set Notation} \addcontentsline{toc}{section}{C. Equivalence Relations} \addcontentsline{toc}{section}{D. Cartesian Coordinates} \addcontentsline{toc}{section}{E. Functions} \addcontentsline{toc}{section}{F. Facts from Calculus} \addcontentsline{toc}{section}{G. Permutations} \addcontentsline{toc}{section}{H. Graphs} \addcontentsline{toc}{section}{I. Vector Spaces} \addcontentsline{toc}{section}{J. Matrices} \addcontentsline{toc}{section}{K. Groups} \addcontentsline{toc}{section}{L. Infinitary Operations with Sets} \addcontentsline{toc}{section}{M. Cardinalities} \addcontentsline{toc}{section}{N. Well-Ordering \vspace{4mm}} \chapter*{Preliminaries} blah blah \section*{A. Mathematical Writing and Proof Methods} blah blah \end{document}

  • Nested acronym in acronym package
    by Fellow InstituteOfMathophile on February 16, 2026 at 8:28 am

    I have two related acronyms: HMM (Hidden Markov Model) and iHMM (infinite Hidden Markov Model). I define them as \acro{HMM}[HMM]{Hidden Markov Model} \acro{iHMM}[iHMM]{infinite \ac{HMM}} Ideally, within a chapter, if HMM has already been introduced, \ac{iHMM} should expand to infinite HMM (iHMM); if HMM has not been introduced, it should expand to infinite Hidden Markov Model (iHMM). However, with the current definition, \ac{iHMM} expands to infinite Hidden Markov Model (HMM) (iHMM), which contains an unwanted extra (HMM). How do I get rid of this behavior?

  • Help with abrupt interuption of `tlmgr` with `First directive needs to be 'name'`?
    by Explorer on February 16, 2026 at 7:59 am

    I found no similar answer on the site. Here below is my story. As cfr post the newest package forest-ext on CTAN last month, I need to run tlmgr update --all, and I was waiting for that to update. However, the power supply of personal computer was unexpectedly cut off! Then the tlmgr was broken! When I turn on again, and run with tlmgr update --all again, it complained that: tlmgr update --all First directive needs to be 'name', not at C:/texlive/2025/tlpkg/TeXLive/TLPOBJ.pm line 106, <TMP> line 1. I have no idea with my unlucky case... Any suggestions to relieve my tlmgr? Possible related: tlgmr error: First directive needs to be 'name'… Edited: The explorer.exe's infomration with C:/texlive/2025/tlpkg/TeXLive/TLPOBJ.pm: Information with C:\texlive\2025\tlpkg: Edited Again: Since kind Max Chernoff mentioned at here and here: The error located at my broken texlive.tlpdb. When I replace my texlive.tlpdb with Max's version at here, the error message gone, but maybe some resource's difference, tlmgr doesn't think I have any package to update.... $tlmgr update --all tlmgr.pl: package repositories main = https://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlnet (not verified: gpg unavailable) tlcontrib = https://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlcontrib (not verified: gpg unavailable) tlcritical = https://tug.org/texlive/tlcritical/ (not verified: gpg unavailable) For more about verification, see https://texlive.info/verification.html. tlmgr.pl: saving backups to C:/texlive/2025/tlpkg/backups tlmgr.pl: no updates available As Ulrike Fischer and cabohah's advice, I would give 2026-preset a try😋, which looks more efficient. Edited Finally: With Max's version, and --reinstall, it works: tlmgr install --reinstall forest-ext tlmgr.pl: package repositories main = https://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlnet (not verified: gpg unavailable) tlcontrib = https://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlcontrib (not verified: gpg unavailable) tlcritical = https://tug.org/texlive/tlcritical/ (not verified: gpg unavailable) For more about verification, see https://texlive.info/verification.html. [1/1, ??:??/??:??] reinstall: forest-ext @main [1267k] running mktexlsr ... done running mktexlsr. tlmgr.pl: package log updated: C:/texlive/2025/texmf-var/web2c/tlmgr.log tlmgr.pl: command log updated: C:/texlive/2025/texmf-var/web2c/tlmgr-commands.log However, since ctug.org didn't provide a windows-specific texlive.tlpdb, maybe that is not purely compatible, and maybe not a quite extensive solution to this case.

  • \mathunderbar automatically gobbles the subscript following it
    by Jinwen on February 16, 2026 at 3:27 am

    Consider the following example: \documentclass{article} \usepackage{unicode-math} \begin{document} \( \mathunderbar{s}_f \) \( \mathunderbar{s}{}_f \) \end{document} It seems \mathunderbar automatically interprets the subscript following it as part of its argument. Is this behavior by design? Should I thus always write an empty group after it to get the correct output, as in the example above?

  • LuaTeX: modifying the position of underbar without touching the position of overbar
    by Jinwen on February 16, 2026 at 12:44 am

    With some Lua code, I am trying to adjust the horizontal position of "bar" under a symbol (such as the one produced by \underline or \mathunderbar). However, strangely, for \underline, neither top_accent and bot_accent are effective; for \mathunderbar, its horizontal position is determined by top_accent and not bot_accent, as a result, changing this will also touch the position of, say, overbar produced by \wideoverbar. Is it possible to link the behavior of underbar to bot_accent? And if not, is there at least some way to separately adjusting the horizontal position of underbar and overbar? Below is a MWE: \documentclass{article} \usepackage{unicode-math} \usepackage{luacode} \begin{luacode*} local adjustments = { ["Asana-Math.otf"] = { ["𝑀"] = { top_accent = 1, bot_accent = -0.5, }, } } do local data = io.loaddata(kpse.find_file("font-cff.lmt")) data = data:gsub("<const>", ""):gsub("pack_result_tagged =", "fonts.handlers.otf.pack_result_tagged =") load(data, "font-cff.lua", "t", luaotfload.fontloader)() end luatexbase.add_to_callback( "luaotfload.patch_font", function(tfmdata, specification, font_id) local path = tfmdata.specification.filename local filename = file.basename(path) local by_filename = adjustments[filename] if not by_filename then return end tfmdata.streamprovider = 1 local size = tfmdata.size local units_per_em = tfmdata.units_per_em for character, adjustment in pairs(by_filename) do local codepoint = utf8.codepoint(character) local index = tfmdata.characters[codepoint].index local character = tfmdata.characters[codepoint] local shapes = fonts.hashes.shapes[font_id].glyphs local streams = fonts.hashes.streams[font_id].streams local original_shape = shapes[index] local new_stream = fonts.handlers.otf.pack_result_tagged( original_shape.segments, original_shape.width, (adjustment.xoffset or 0) * units_per_em, -(adjustment.yoffset or 0) * units_per_em ) streams[index] = new_stream for _, dimen in pairs { "width", "height", "depth" } do if adjustment[dimen] then character[dimen] = adjustment[dimen] * size end end if adjustment.top_accent then character.top_accent = adjustment.top_accent * size end if adjustment.bot_accent then character.bot_accent = adjustment.bot_accent * size end end end, "rewrite-characters" ) \end{luacode*} \setmathfont{Asana-Math.otf} \begin{document} \[ \wideoverbar{M} \mathunderbar{M} \underline{M} \] \end{document}

  • Is there a way to have a GUI that fills in tex file?
    by salisboss on February 15, 2026 at 11:23 pm

    I have a class and a .tex file to write special-formatted memos. Unfortunately, I doubt the main end users who write the memos will want to change the field text in the .tex file for each memo. Is there a way to create a front end gui (access, python or whatever) that takes inputs and runs the .tex with that input and generates the resultant pdf file?

  • Centering a table that spans pages, and not adding a background to first row following the header?
    by Gary on February 15, 2026 at 10:21 pm

    I have a couple questions about Natural Tables to which I haven't been able to find solutions. [This example is in Lua code (.cld instead of .tex) because I was building these tables from SQLite data and do not know how to get the equivalent of utf8.char(...) in ConTeXt directly.] How can the table be centered within the text width, if don't want to stretch it to fit? I've tried framed and it centers the table but, since the table has to span pages, it's not a solution. I've tried using a textbackground which spans pages but could not set an option that resulted in centering the table. When adding a background color to odd/even rows only, is it possible to restart the counting (or something) at each new page, such that the first table row following the heading does not have a background color? Also, is it possible to add some left/right padding to the column cells? I've tried using distance, columndistance, leftmargindistance, rightmargindistance and the only one that appears to change the layout is distance and it adds horizontal whitespace between columns. I'd just like to give the content within each cell a little distance from the left/right column frames. Nevermind Found this one, forgot that the table set up also inherits from \setupframed and can use loffset and roffset for this. It's a bit confusing which table set up items apply to the table and which to rows and columns. Thank you context.setupbodyfont({"libertinus"}) context.definefont({"Koine"},{"name:gentium*default at 18.0pt"}) --[line=3.2ex] context.definecolor({"OddRowColor"},{r=".97",g=".97",b=".97"}) context.setuppapersize({width="8.5in",height="4in"}) context.setuplayout({height="3in"}) context.starttext() context.showframe() context.start() context.setupTABLE({"c"},{"2,4"},{rightframe="off"}) context.setupTABLE({"c"},{"3,5"},{leftframe="off"}) context.setupTABLE({"c"},{"2,3"},{width="8mm",style="\\Koine",align="{center}"}) context.setupTABLE({"c"},{"4,5"},{width="12mm",align="{flushright}"}) context.setupTABLE({"r"},{"odd"},{background="color",backgroundcolor="OddRowColor"}) -- context.bTABLE({split="repeat",option="stretch",align="{lohi}"}) context.bTABLE({split="repeat",align="{lohi}"}) context.bTABLEhead() context.bTR({background="color",backgroundcolor="gray"}) context.bTH() context("Description") context.eTH() context.bTH({nc="2",nr="1",align="{center}"}) context("Letters") context.eTH() context.bTH({nc="2",nr="1",align="{center}",rightframe="on"}) context("Codes") context.eTH() context.eTR() context.eTABLEhead() context.bTABLEbody() context.bTR() context.bTC() context("Alpha") context.eTC() context.bTC() context(utf8.char(945)) context.eTC() context.bTC() context(utf8.char(913)) context.eTC() context.bTC() context("945") context.eTC() context.bTC() context("913") context.eTC() context.eTR() context.bTR() context.bTC() context("Alpha With Dasia") context.eTC() context.bTC() context(utf8.char(7937)) context.eTC() context.bTC() context(utf8.char(7945)) context.eTC() context.bTC() context("7937") context.eTC() context.bTC() context("7945") context.eTC() context.eTR() context.bTR() context.bTC() context("Alpha With Dasia And Oxia") context.eTC() context.bTC() context(utf8.char(7941)) context.eTC() context.bTC() context(utf8.char(7949)) context.eTC() context.bTC() context("7941") context.eTC() context.bTC() context("7949") context.eTC() context.eTR() context.bTR() context.bTC() context("Alpha With Dasia And Oxia And Ypogegrammeni") context.eTC() context.bTC() context(utf8.char(7937)) context.eTC() context.bTC() context.eTC() context.bTC() context("8096") context.eTC() context.bTC() context.eTC() context.eTR() context.eTABLEbody() context.eTABLE() context.stop() context.stoptext()

  • Adding color to \writetolist line in the TOC
    by Gary on February 15, 2026 at 9:29 pm

    I don't know what I'm doing wrong, here, but I'd like to style the \writetolist item in the TOC to be a different color than black. I realize I can add the color to the text content itself but that does not change the color of the page number and dots/periods. The \writetolist reads that it inherits from \setuplist; and I think I've tried all the color options in \setuplist without success; and it appears the color option is supposed to apply to the entire entry. If the color=MyBlue line in the \setuplist of the entire TOC is uncommented, then everything in the TOC is color MyBlue. But that doesn't work in just the \writetolist declaration. What am I doing wrong or failing to do? Thank you. \setupcombinedlist[content][list={chapter},criterium=all,alternative=c,] \setuplist[chapter][ stopper={.}, distance=5mm, numberalign=flushright, numbercommand={\sc}, textcommand={\sc}, % color=MyBlue, style={\setupinterlinespace[2.5ex]\sc}] \definecolor[MyBlue][r=.2,g=.2,b=.7] \starttext \completecontent[criterium=all] \writetolist[chapter][ location=here, color=MyBlue, textcolor=MyBlue, numbercolor=MyBlue, pagecolor=MyBlue]{}{% {Write to List Line}% } \startchapter[title={Something significant}] Paragraph \stopchapter \stoptext

  • Tikz different labels on incoming edges between chain groups
    by Galen Long on February 15, 2026 at 8:38 pm

    The Tikz manual explains how to set different labels on incoming edges between a single node and a chain group: \tikz \graph { a -> b -> {c [> "x"]}; }; Is there a way to set different labels on each incoming edge between a chain group and another chain group? For example, I want to set different labels on (a, c) and (b, c) in the following graph, but this sets the same label on all incoming edges: \tikz \graph { {a, b} -> {c [> "x"]}; };

  • Help in generating a quantikz circuit
    by Rob on February 15, 2026 at 7:14 pm

    I have just started using the package quantikz and created my first "quantum circuit" diagram \begin{equation} \begin{quantikz} \lstick{$\ket{\psi}$} & \gate{A} & \gate{B} &\gate{C} & \qw \end{quantikz} \end{equation} However, I am now struggling to produce the following circuit: I tried the following code but it doesn't seem to work \begin{quantikz} \lstick{|0\rangle} & \gate{A} & \multigate{1}{B} & \qw & \gate{D} & \qw \\ \lstick{|1\rangle} & \qw & \ghost{B} & \multigate{1}{C} & \gate{E} & \qw \\ \lstick{|1\rangle} & \qw & \qw & \ghost{C} & \gate{F} & \qw \end{quantikz} Any help in generating that diagram would be greatly appreciated.

  • Latex Math bracket right that covers two rows of aligned's
    by Christopher Ettling on February 15, 2026 at 6:56 pm

    Is it possible to make such a nice bracket like in the picture? \documentclass{article} \usepackage{amsmath,amssymb} \newcommand{\Z}{\mathbb{Z}} \begin{document} \begin{align*} a\!\in\!\Z\mid b\!\in\!\Z &\left\{ \begin{aligned} &\Leftrightarrow\left\{ \begin{aligned} \pm a &\mid \mp b\\ ac &\mid bc:\forall c\in\Z \end{aligned}\right.\\ &\Rightarrow\left\{ \begin{aligned} a\mid bc:\forall c\in\Z\\ |a|\le |b|\lor b=0 \end{aligned}\right.\\ &\land\left\{ \begin{matrix} a=0 &\Rightarrow& b=0\\ b\mid a &\Rightarrow& a=\pm b\\ b\mid c &\Rightarrow& a\mid c \end{matrix}\right. \end{aligned}\right. \end{align*} \end{document}

  • Adapting width of tcolorbox to the content, except that the box contains math instead of text
    by Your neighbor Todorovich on February 15, 2026 at 6:26 pm

    My question is almost completely identical to the extremely popular question How to restrict width of tcolorbox according to the length of the text it contains Except that the top answer does not solve my problem in that my tcolorbox contains math, e.g., $\begin{align*} f & = ma \\ & = x^2 - x^3 \end{align*}$ As such, when using the hbox solution as provided in the answer, and using a box that looks like this: \usepackage[breakable, most, skins]{tcolorbox} \newtcolorbox{mybox}{ enhanced, colframe=black, boxrule=0.5pt, arc=2mm, left=6pt,right=6pt,top=4pt,bottom=4pt, boxsep=3pt, hbox (<---- hbox from linked question) } I receive the following error: Error Package amsmath Error: \begin{aligned} allowed only in math mode. \end{frame} What is the workaround to this problem?

  • Wrong printed value when using pythontex and text from amsmath
    by Mumblee on February 15, 2026 at 4:47 pm

    In a recent LaTeX document, I've had a weird behavior with pythontex : the value I get with \py{variable_name} wasn't correct. After some research, the problem seems to be related to the \text{} amsmath command. Below is a short example illustrating this. I can avoid the problem by not using \py{} inside \text{} but I wonder if this could be considered as a bug. Thanks for your answers. \documentclass[12pt,french,fleqn]{article}% \usepackage[utf8]{inputenc}% \usepackage[T1]{fontenc}% \usepackage{babel} \usepackage{amsmath} \usepackage{pythontex} \begin{pycode} a=2 b=5 \end{pycode} \begin{document} % \py{b} outside \text{} : OK $a=\py{a} \text{\quad{} et \quad{}} b=\py{b}$ $a : \py{a}$ $b : \py{b}$ % \py{b} inside \text{} : not OK $a=\py{a} \text{\quad{} et $b=\py{b}$}$ $a : \py{a}$ % here one gets the value of 'b' instead of 'a' $b : \py{b}$ \end{document}

  • How to adjust the width of each section/subsection of a document? [duplicate]
    by Deslouis on February 15, 2026 at 3:30 pm

    I am trying to add some space at the left of each subsection of my document as shown in the code below. Is there a way to obtain the same result without manually adjusting the width each time I create a subsection? I tried with \renewcommand{subsection} but I can only change the title doing so. Minimalist example: \documentclass{article} \usepackage{changepage} \parindent=0pt \begin{document} \section{This is a section} It should be at the left margin of the page. \begin{adjustwidth}{1cm}{2cm} \subsection{This is a subsection} There should be some space between the text and the margin. \end{adjustwidth} \section{This is another section} I want the spacing to be automatic for each subsection of the document without having to write \textit{begin/end adjustwidth} around each subsection. \end{document} Compiled minimalist example:

  • TeX expansion with \number has mysterious error when followed by space, why?
    by Dan Levin on February 15, 2026 at 3:07 pm

    This code produces the table I'm expecting with fully expandable copying: % same as \ltx@\ReturnAfterFi \long\def\ReturnAfterFi#1\fi{\fi#1} % expandable copies % #1=number, #2=text \def\xcopies#1#2{% \ifnum#1>0 #2% \ReturnAfterFi{\expandafter\xcopies\expandafter{\the\numexpr#1-1}{#2}}% \fi} \def\hundredtable{% \vtop{\offinterlineskip \global\count255=1 \everycr{\noalign{\hrule}}\tabskip0pt \halign{\strut \vrule ##&& \global\advance\count255 by 1 \hbox to 2.5em{\hss##\hss}\vrule\cr \xcopies{10}{\xcopies{10}{& \number\count255}\cr}\crcr}}} \hundredtable But an error occurs if I put a space after the \number command in the code block above, as shown here: ... \xcopies{10}{\xcopies{10}{& \number\count255 }\cr}\crcr}}} I thought the space would be optional. I've tried \relax and it, too, produces an error, with TeX saying the \ifnum doesn't complete. I suspect the \number command with the register is checking if it should multiply what follows and is therefore expanding the \ReturnAfterFi. But the space would seem to solve this, not cause it. Can someone explain the expansion error here?

  • How to change templates default font family to Latin Modern Serif?
    by cody.tex on February 15, 2026 at 1:46 pm

    I am using a template based on the document class scrbook to write my thesis. The default font family is sans-serif (?) and I wanted to change it to Latin Modern Serif: \usepackage[T1]{fontenc} \usepackage{lmodern} \renewcommand{\familydefault}{\rmdefault} This does not change anything. Inside \begin{document} I put \rmfamily. Does not change anything. Then I tried using a makro: \newcommand{\changefont}[3]{ \fontfamily{#1} \fontseries{#2} \fontshape{#3} \selectfont} and call it with \changefont{\rmdefault}{m}{n}. Does not change anything. So the last thing I did: \renewcommand{\sfdefault}{\rmdefault} And this did the trick. Is this supposed to work like this? I am using pdftex coming with Miktex 25.12 on Windows. Thanks in advance for reply and insights! EDIT: The template I am using is this one provided by a prof at my university: https://github.com/valentin-schwind/frauas-thesis-template/blob/master/latex/Thesis.tex

  • LaTeX zref-clever: automatically generate dash-separated figure ranges including non-consecutive labels
    by taiwan12 on February 15, 2026 at 1:21 pm

    I'm trying to use the zref-clever package in LaTeX to reference multiple figures in a compact, readable way. I want the output to: Merge consecutive figure numbers with a dash (-) Separate non-consecutive numbers with commas Never use "and" Work for any order of figure labels MWE \documentclass{article} \usepackage{graphicx} \usepackage{float} \usepackage[colorlinks]{hyperref} \usepackage{zref-clever} \begin{document} % Example of referencing figures \zcref{fig:figA, fig:figB, fig:figC, fig:figE, fig:figF} % figures 1-3, 5-6 \zcref{fig:figB, fig:figA} % figures 1-2 \zcref{fig:figD, fig:figA} % figures 1, 4 \zcref{fig:figA, fig:figB, fig:figC, fig:figE, fig:figG} % figures 1-3, 5, 7 \begin{figure}[H] \caption{Caption} \label{fig:figA} \end{figure} \begin{figure}[H] \caption{Caption} \label{fig:figB} \end{figure} \begin{figure}[H] \caption{Caption} \label{fig:figC} \end{figure} \begin{figure}[H] \caption{Caption} \label{fig:figD} \end{figure} \begin{figure}[H] \caption{Caption} \label{fig:figE} \end{figure} \begin{figure}[H] \caption{Caption} \label{fig:figF} \end{figure} \begin{figure}[H] \caption{Caption} \label{fig:figG} \end{figure} \end{document}

  • cleveref \cref fails when there is a space after comma in multiple labels [duplicate]
    by taiwan12 on February 15, 2026 at 12:23 pm

    I am using LaTeX with the cleveref package and I want to reference multiple figures like this: \cref{fig:figA, fig:figB}. However, it only works if there is no space after the comma: \cref{fig:figA,fig:figB}. Is there a clean way to make \cref handle spaces after commas in multiple labels automatically? I only came up with one idea: \crefspace which removes the every space. \documentclass{article} \usepackage{graphicx} \usepackage{float} \usepackage[colorlinks]{hyperref} \usepackage{cleveref} \begin{document} \begin{figure}[H] \caption{Caption} \label{fig:figA} \end{figure} \begin{figure}[H] \caption{Caption} \label{fig:figB} \end{figure} \begin{figure}[H] \caption{Caption} \label{fig:figC} \end{figure} \cref{fig:figA,fig:figB} % works \cref{fig:figA, fig:figB} % does NOT work \end{document}

  • LaTeX macro for typesetting AVMs and distance between AVM and text + typing
    by Stefan Müller on February 15, 2026 at 11:37 am

    Decades ago a colleague wrote a macro for type setting Attribute Value Matrices (AVMs) for me. It is simple and can be used for AVMs with a type (italics at the left top bracket) and AVMs without type. The problem is that sometimes the AVMs are very close to preceding text and I do not see why. The distance between "Perfekt" and AVM is perfect, but the distance between "Passive" and the AVM is not. Of course this could be fixed by inserting a newline with 2pts extra space, but I would like to understand the problem and have a solution for it. Apart from this the whole AVM should be some points further to the left, so that it aligns with the text. I guess this is due to the array package, which probably adds some space for nesting brackets. This is of course welcome but should not happen at teh outermost bracket. This is my code: \documentclass{scrartcl} \usepackage{langsci-gb4e} \usepackage{array} \newcommand{\nliste}[1]{% \mbox{$\langle$\upshape\normalfont#1$\rangle$}% } \newcommand{\eliste}{% \mbox{% $\left\langle\right\rangle$}% } \newcommand{\ms}[2][]{% \mbox{% \delimiterfactor=1000 \delimitershortfall=0pt\tabcolsep=0pt% $\left[% \begin{tabular}{>{\upshape\scshape}l@{}>{\hspace*{5pt}\normalfont\itshape}l} \if\relax\detokenize{#1}\relax\else \multicolumn{2}{>{\normalfont\itshape}l}{#1}% \\% \fi% #2% \end{tabular}% \right]$% }% \vspace{1mm}% } \newcommand{\onems}[2][]{% \mbox{% \delimiterfactor=1000 \delimitershortfall=0pt \tabcolsep=0pt $\left[% \begin{tabular}{>{\upshape\scshape}l} \if\relax\detokenize{#1}\relax\else {\normalfont\itshape #1}% \\ \fi #2% \end{tabular}% \right]$% }% \vspace{1mm}% } \newcommand{\menge}[1]{% \mbox{% $% \left\{% \begin{tabular}{@{}l@{}}\ignorespaces#1\end{tabular}% \right\}% $% }% } \newcommand{\str}{{\normalfont\textit{str}}}% xspace does not work with NP[\str] \begin{document} The second AVM is too close to the `P'. There seems to be too much space before the AVM. \eal \ex Perfekt:\\ \ms{ spr & \nliste{ NP[\str]$_i$ }\\ comps & \nliste{ NP[\str]$_j$ }\\ arg-st & \nliste{ NP[\str]$_i$, NP[\str]$_j$ } } \ex Passiv:\\ \ms{ spr & \nliste{ NP[\str]$_j$ }\\ comps & \eliste\\ arg-st & \nliste{ NP[\str]$_j$ } } \zl \eal \label{linking-konstruktionen} \ex\label{transitiv-Konstruktion} die \emph{Transitive Construction}:\\ \ms{ syn & \ms{ cat & v\\ voice & active\\ }\\ val & \menge{ \onems{ role \ms{ gf & obj \\ %$\theta$ & \textsc{da}$-$\\ \textsc{da} & $-$\\ }\\ }}\\ } \ex die \emph{Subject Construction}:\\ \ms{ syn & \ms{ cat & v\\ }\\ val & \menge{ \onems{ role \onems{ gf \textit{subj} } }}\\ } \ex die \emph{Passive Construction}:\\ \ms{ syn & \ms{ cat & v\\ form & PastPart\\ }\\ val & \menge{ \ms{ role & \ms{ gf & obl\\ da & $+$\\ }\\ syn & \textrm{P[von]/}zero\\ }}\\ } \zl \ms[test]{ feature1 & value\\ feature2 & value} \ms[word]{ feature1 & value\\ feature2 & value} \ms[passive]{ feature1 & value\\ feature2 & value} \end{document} Another problem is the type in the last three AVMs. It seems to take all the space that would be needed if there were letters like `t' that stick out towards the top. But this is not the case for words like "passive". Could such types be raised by some points (according to font properties)? Sorry, for asking two questions in one. I can split them up, but since it is the same code, I thought it might be better this way.

  • How to vertically center the forked edge in forest?
    by Explorer on February 15, 2026 at 8:23 am

    This question is similar to this link, but I don't know why y-process operation doesn't work with forked edge. \documentclass[border=5pt]{standalone} \usepackage[edges]{forest} \usetikzlibrary{arrows.meta,shapes,shadows,trees} \tikzset{ basic/.style = { draw, drop shadow, rectangle, text width=2cm, font=\sffamily }, root/.style = { basic, thin, rounded corners=2pt, align=center, fill=green!30, }, onode/.style = { basic, thin, rounded corners=2pt, align=center, fill=green!60,text width=3cm, }, tnode/.style = { basic, thin, align=left, fill=pink!60, text width=6.5em, }, xnode/.style = { basic, thin, rounded corners=2pt, align=center, fill=blue!20,text width=5cm, }, wnode/.style = { basic, thin, fill=pink!10!blue!80!red!10, align=left, text width=6.5em, }, } \begin{document} \begin{forest} for tree={ grow'=east, forked edge, }, % https://tex.stackexchange.com/a/759585/322482 before drawing tree={ for tree children-first={ if n children=0{}{ y/.process={ OOOOw4+P {!1.y} {!1.max y} {!l.y} {!l.min y} {(#1+#2+#3+#4)/2} }, } } } [Networked Game Work BreakDown, root [Software Engineering Report, xnode [Setting shape, tnode] [Choosing color, tnode] [Adding shading, tnode] ] [Game Demo Preparation, onode, xshift=-1.25cm [Using a Matrix, tnode] [Relatively, tnode] [Absolutely, tnode] [Using overlays, wnode] ] [Project Proposal and Game Logic, onode, xshift=-1.25cm [Default arrows, tnode] [Arrow library, tnode] [Resizing tips, tnode] [Shortening, tnode] [Bending, tnode] ] ] \end{forest} \end{document} What I want, is the "red"-vertical aligned,that is, shift these four intersections to be vertically aligned: Any suggestions are welcome!

  • Illustrating a general projective transformation in R1
    by Jasper on February 15, 2026 at 6:07 am

    The question is contained in the image/code: \documentclass{article} \usepackage{tikz,mathtools} \DeclareMathOperator{\projectivestep}{Projective~Step} \begin{document} \section{The facts} The transformation \[ \begin{bmatrix} b & t \\ 0 & 1 \end{bmatrix} \begin{bmatrix} a \\ 1 \end{bmatrix} = \begin{bmatrix} t+ab \\ 1 \end{bmatrix} \] can be visualized as a composition of a scaling \begin{center} \begin{tikzpicture}[scale=0.7] \draw[thick,->] (-1,0) -- (7,0) node[below right] {\(x\)}; \draw[thick,->] (0,-1) -- (0,3) node[above left] {\(y\)}; \fill (0,0) circle[radius = 3pt] node[below left=3pt] {\(0\)}; \fill (1,0) circle[radius = 3pt] node[below=3pt] {\(1\)}; \fill (0,1) circle[radius = 3pt] node[left=3pt] {\(1\)}; \fill (2,0) circle[radius = 3pt] node[below=3pt] {\(a\)}; \draw (2,0) arc[start angle=0,end angle=90,radius=2]; \fill (3,0) circle[radius = 3pt] node[below=3pt] {\(b\)}; \fill (6,0) circle[radius = 3pt] node[below=3pt] {\(ab\)}; \draw (0,1) -- (3,0); \draw (0,2) -- (6,0); \end{tikzpicture} \end{center} and a translation \begin{center} \begin{tikzpicture} \draw[thick,->] (-1,0) -- (5,0) node[below left] {\(x\)}; \draw[ preaction = { draw = black, line width = 4pt }, postaction = { draw = pink, line width = 2pt } ] (0,0) -- (1,0); \fill (0,0) circle[radius = 3pt] node[below left=3pt] {\(0\)}; \fill (1,0) circle[radius = 3pt] node[below right=3pt] {\(ab\)}; \fill (3,0) circle[radius = 3pt] node[below left=3pt] {\(t\)}; % solution: \draw (0,0) circle[radius=1]; \draw (0,0) arc[start angle=180,end angle=60,radius=3]; \draw (0,0) arc[start angle=180,end angle=300,radius=3]; \draw (3,0) arc[start angle=0,end angle=90,radius=3]; \draw (3,0) arc[start angle=0,end angle=-90,radius=3]; \fill (1.5,{3*sin(60)}) circle[radius = 3pt]; \fill (1.5,{-3*sin(60)}) circle[radius = 3pt]; \draw[domain=30:150] plot({1.5+3*cos(\x)},{-3*sin(60)+3*sin(\x)}); \fill (0.936,0.348) circle[radius = 3pt]; % solve the circle intersections \pgfmathsetmacro{\LENGTH}{sqrt((1.5-0.936)^2+(3*sin(60)-0.348)^2)} \draw[domain=-30:-150] plot({1.5+\LENGTH*cos(\x)},{3*sin(60)+\LENGTH*sin(\x)}); \fill (3-0.936,0.348) circle[radius = 3pt]; \draw[ preaction = { draw = black, line width = 4pt }, postaction = { draw = pink, line width = 2pt } ] (3,0) -- (4,0); \fill (3,0) circle[radius = 3pt]; % cleanup \draw (3,0) circle[radius=1]; \fill (4,0) circle[radius = 3pt] node[above right=3pt] {\(t+ab\)}; \end{tikzpicture} \end{center} \section{My question} Suppose that the 0 in the transformation matrix weren't zero. This would cause the 1 in the vector to become a non-1 value. To restore it to 1, \textbf{we divide every component, including itself, by it}. How could I illustrate the last step, if that number were some number $n$? \[ \begin{bmatrix} b & t \\ n & 1 \end{bmatrix} \begin{bmatrix} a \\ 1 \end{bmatrix} = \projectivestep \begin{bmatrix} t+ab \\ na+1 \end{bmatrix} = \begin{bmatrix} \frac{t+ab}{na+1} \\ 1 \end{bmatrix} \] The answer should be the exact same as above, but with one more illustration, showing how the projective step transforms the line. The reason I am having difficulty is because it maps every point differently. That is, points in one direction become closer together, and they become further apart in the other direction. \end{document}

  • How to change the name "Publications " to "references" and how to make them colored?
    by Intuition on February 15, 2026 at 3:50 am

    Here is a template of overleaf that I am using to write my research statement: \documentclass[11pt,a4paper,sans]{moderncv} \moderncvstyle{casual} \moderncvcolor{red} \usepackage{lipsum} \usepackage[scale=0.75]{geometry} \firstname{} % Your first name \familyname{} % Your last name %\addbibresource{mybibliography.bib} %\bibliography{references} \title{ Research Statement} \address{W. Ethan Eagle}{} \mobile{(302) 584 3464} \email{ethan.eagle@gmail.com} %\addbibresource{mybibliography.bib} %\bibliography{references} \begin{document} \makecvtitle % Print the CV title %---------------------------------------------------------------------------------------- % EDUCATION SECTION %---------------------------------------------------------------------------------------- %\newpage %\addbibresource{references.bib} %\bibliography{references} \section{Previous Research Experience} 'Turbulence/Chemistry Interaction' and 'Thermo-fluids research.' ~\cite{MR1122302} {\hskip 2em}Details of my previous research work are available in my CV, but I would like to highlight my interests in diagnostic development for infrared imaging detection. The measurement capabilities of this diagnostic are just beginning to be understood, and I will continue to eagerly pursue and develop this measurement technique. I am also interested in continuing to make advanced measurements in combustion that can assess the impact of scalar dissipation on the ignition and inflammation of a mixture.\\ %---------------------------------------------------------------------------------------- \section{Research Goals} {\hskip 2em}I aim to develop a reputation as world-class expert in turbulence/chemistry interaction as applied to the areas of energy, health, and the environment. {\hskip 2em}To be successful as a starting faculty, I plan to start from simple 'unit' problems where I can explore the influence of boundary conditions in simple flow problems while developing diagnostic capability (e.g. infrared measurements of hydrocarbon distribution in atmospheric jet flames). {\hskip 2em}I have contacts to funding sponsors at the DOE, with NSF program managers in the turbulence and combustion sub-areas, and at DOD including AFRL and NRL, and will seek the support of these agencies through responses to FOAs regularly put out by these venues. \section{Teaching} My teaching interests span experiments in fluids, theoretical fluid dynamics, thermodynamics, and combustion. $\bullet{}$ Undergraduate: Thermodynamics, In/compressible Flows, Instrumentation (Lab), Combustion\\ $\bullet{}$ Graduate: Turbulent-Compressible-Viscous Flows, Combustion, Optical and Laser Diagnostics {\hskip 2em}I believe that a comprehensive set of courses on fundamental viscous and turbulent flows would be a worthwhile addition to a core competency at the undergraduate level. {\hskip 2em}I cultivate the following attitudes in students who complete course work or research with me: $\bullet{}$ demonstrate understanding of rigorous mathematical tools for design/analysis, (Teach others) $\bullet{}$ exhibit audience driven communication strategies, (Justify and explain the importance of research) $\bullet{}$ establish sound environmental/ethical/social reasoning. (Think long term, not just short term) %\section{References} %~\cite{MR1122302} %\addbibresource{references.bib} %\printbibliography [title={REFERENCES }, heading=bibintoc] \bibliographystyle{alpha} \bibliography{references} % Gunakan judul LITERATURE \end{document} I was wondering how to change the name "Publications " to "references" and how to make them colored? Notice that I created a file named references.bib that contains my citations from mathscinet Any help will be appreciated.

  • TikZ forest: custom vdots keys overrides custom l sep and s sep keyvals
    by Grass on February 15, 2026 at 3:12 am

    The Problem From cfr's answer to my previous question, I managed to draw nice vdots in my forest tree. But now for tree={ s sep=1cm, % example of 1cm for illustrative purposes; you probably wouldn't want it to be so big l sep=1cm }, fails to be applied across the entire tree: Attempt(s) To Fix Said Problem I tried messing with before computing xy={% l'=0pt, s'=-15pt, % length of vdots }, but it didn't really work. What Help I need I've only had very modest experience with forest so I'm having trouble deducing how to modifiy cfr's code, such that the keyvals s sep and l sep work correctly. Thus, it would be nice if someone was able to help me out with this. MWE: % Source - https://tex.stackexchange.com/a/755401 % Posted by cfr, modified by community. See post 'Timeline' for change history % Retrieved 2026-02-14, License - CC BY-SA 4.0 \documentclass[border=10pt,multi,tikz]{standalone} % ateb: https://tex.stackexchange.com/a/754955/ % ateb: https://tex.stackexchange.com/a/755401/ \usepackage[edges]{forest} \usetikzlibrary{calc} \definecolor{folderbg}{RGB}{124,166,198} \definecolor{folderborder}{RGB}{110,144,169} \newlength\Size \setlength\Size{4pt} \tikzset{% folder/.pic={% \draw [draw=folderborder, sharp corners, top color=folderbg!50, bottom color=folderbg ] (-1.05*\Size,0.2\Size+5pt) rectangle ++(.75*\Size,-0.2\Size-5pt); \draw [draw=folderborder, sharp corners, top color=folderbg!50, bottom color=folderbg ] (-1.15*\Size,-\Size) rectangle (1.15*\Size,\Size); }, file/.pic={% \filldraw [draw=folderborder, sharp corners, top color=folderbg!5, bottom color=folderbg!10] (-\Size,.4*\Size+5pt) coordinate (a) |- (\Size,-1.2*\Size) coordinate (b) -- ++(0,1.6*\Size) coordinate (c) -- ++(-5pt,5pt) coordinate (d) -- cycle (d) |- (c) ; }, } \forestset{% declare autowrapped toks={pic me}{}, declare boolean register={pic root}, pic root=0, declare keylist={additional edge options}{}, pic dir tree/.style={% for tree={% folder, font=\ttfamily, grow'=0, }, before typesetting nodes={% for tree={% edge label+/.option={pic me}, }, if pic root={ tikz+={ \pic at ([xshift=\Size].west) {folder}; }, align={l} }{}, }, }, pic me set/.code n args=2{% \forestset{% #1/.style={% inner xsep=2\Size, pic me={pic {#2}}, } } }, pic me set={directory}{folder}, pic me set={file}{file}, } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %===========================================% \makeatletter \def\dirtree@dot@radius{0.5pt} \def\dirtree@vdots@length{5pt} \forestset{% declare toks={real siblings}{}, continue/.style={% delay={% if n children=0{% before computing xy={% for current and following siblings={% s'+=-10pt, }, }, if n=1{% edge path'={% (!u.parent anchor) ++(\foresteregister{folder indent},0pt) coordinate (a) -- ($(!u.parent anchor -| a)!1/3!(.child anchor -| a)$) edge [dotted] ($(!u.parent anchor -| a)!2/3!(.child anchor -| a)$) ($(!u.parent anchor -| a)!2/3!(.child anchor -| a)$) |- (.child anchor) }, }{% edge path'={% (!u.parent anchor |- !p.child anchor) ++(\foresteregister{folder indent},0pt) coordinate (a) -- ($(!p.child anchor -| a)!1/3!(.child anchor -| a)$) edge [dotted] ($(!p.child anchor -| a)!2/3!(.child anchor -| a)$) ($(!p.child anchor -| a)!2/3!(.child anchor -| a)$) |- (.child anchor) }, }, for following siblings={% edge path'={% (!u.parent anchor |- !p.child anchor) ++(\foresteregister{folder indent},0pt) |- (.child anchor) }, }, }{% prepend={[\strut, delay={% do dynamics, temptoksa=, for following siblings={% if temptoksa={}{}{% temptoksa+={,}, }, temptoksa+/.option=name, }, real siblings/.register=temptoksa, folder, grow'=0, before computing xy={% l'=0pt, s'=-\dirtree@vdots@length, % length of vdots }, delay n=2{% split option={real siblings}{,}{append}, }, before typesetting nodes={% temptoksa/.option=name, delay={ do dynamics, for children={ if n=1{ edge path'={% (!uu.parent anchor) ++(\foresteregister{folder indent},0pt) coordinate (a) -- ($($(a)!1/2!(.child anchor -| a)$)+0.5*(0,\dirtree@vdots@length)$) coordinate (A\foresteoption{id}) % ($($(a)!1/2!(.child anchor -| a)$)-0.5*(0,\dirtree@vdots@length)$) coordinate (B\foresteoption{id}) |- (.child anchor)% }, tikz+={ \coordinate (A') at ($(A\foresteoption{id})+(0,\dirtree@dot@radius)$); \coordinate (B') at ($(B\foresteoption{id})-(0,\dirtree@dot@radius)$); \coordinate (C) at ($0.25*($(B')-(A')$)$); \fill ($(A')+(C)$) circle (\dirtree@dot@radius); \fill ($(A')+2*(C)$) circle (\dirtree@dot@radius); \fill ($(A')+3*(C)$) circle (\dirtree@dot@radius); }, }{ edge path'={% (!uu.parent anchor) ++(\foresteregister{folder indent},0pt) coordinate (a) (a |- !p.child anchor) |- (.child anchor) }, }, }, }, }, }, no edge, ]}, }, }, }, to be continued/.style={% delay={% append={[\strut, folder, grow'=0, before computing xy={% l'=0pt, s'=0pt, }, if n children=0{% before drawing tree={% delay={% y/.min={>O{y}}{parent,descendants}, }, }, }{}, edge path'={% (!uu.parent anchor |- !u.child anchor) ++(\foresteregister{folder indent},0pt) coordinate (a) -- (.parent anchor -| a) coordinate (A\foresteoption{id}) % ([yshift=-\dirtree@vdots@length]% length of vdots A\foresteoption{id}) coordinate (B\foresteoption{id}) }, tikz+={ \coordinate (A') at ($(A\foresteoption{id})+(0,\dirtree@dot@radius)$); \coordinate (B') at ($(B\foresteoption{id})-(0,\dirtree@dot@radius)$); \coordinate (C) at ($0.25*($(B')-(A')$)$); \fill ($(A')+(C)$) circle (\dirtree@dot@radius); \fill ($(A')+2*(C)$) circle (\dirtree@dot@radius); \fill ($(A')+3*(C)$) circle (\dirtree@dot@radius); }, ]}, }, }, } \makeatother %===========================================% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} \begin{forest} pic dir tree, pic root, for tree={% folder icons by default; override using file for file icons directory, s sep=1cm, l sep=1cm }, [system [config ] [lib [file.txt, file ] ] ] \end{forest} \begin{forest} pic dir tree, pic root, for tree={% folder icons by default; override using file for file icons directory, s sep=1cm, l sep=1cm }, [system, continue [config ] [lib, to be continued [file.txt, file, to be continued ] ] ] \end{forest} \end{document}

  • How to get the position of a box relative to vsize and hsize?
    by MBE on February 14, 2026 at 8:21 pm

    Is there a way to get the position of box TestB without measuring? \parindent=0pt \newbox\testA \newbox\testB \newbox\testC \newdimen\tskip \tskip=0.5\hsize \newdimen\kskip \kskip=0.1\vsize \setbox\testA=\vbox{\hsize=3cm (TestboxA)} \setbox\testB=\vbox{\hsize=3cm (TestboxB)} \setbox\testC=\vbox{\hsize=3cm (hor:\the\tskip \vskip0.1\baselineskip ver:\the\kskip \vskip0.1\baselineskip TestboxC)} Hsize=\the\hsize Vsize= \the\vsize \hbox{\copy\testA}\vskip\kskip \hskip\tskip\hbox{\copy\testC} x x x x x x x x x \hbox{\copy\testB} \bye

  • breve and macron over several letters
    by rensemil on February 14, 2026 at 2:57 pm

    I am using the metre package for metrical notation of Latin text. Here is my MWE: \documentclass[12pt]{article} \usepackage{metre} \begin{document} \begin{metrica} \=a \={ae} \-a \-{ae} \end{metrica} \end{document} This produces: The ā and ă are fine, but as you can see, with both of the "ae"s, the diacritics don't stretch to fill the whole width of the letters. Is it possible to change this so that the symbol matches the width of however many letters are under it? I would like it to work for not just 2 letters, but ideally as many as possible, e.g. I want to be able to draw a macron or even a breve over "huius" when I mark it as being one single syllable and the diacritic should then stretch to be as wide as it has to be to cover the whole word. This is what it should look like (note the macron in the first line on "praebeo" and the brevia on "aut" and "improbae". Thanks in advance!

  • prime symbol sometimes in the wrong position with kpfonts-otf, how to replace it from another font?
    by Jinwen on February 14, 2026 at 10:30 am

    Consider the following example: \documentclass{article} % \usepackage{kpfonts-otf} \usepackage{unicode-math} \setmathfont{KpMath-Regular.otf} % \setmathfont{texgyrepagella-math.otf}[range={\prime}] \begin{document} \( E^{E'}_{E'} \) \( E' \) \end{document} The prime symbol in the subscript is clearly in the wrong position: I tried to replace this symbol by, say, \setmathfont{texgyrepagella-math.otf}[range={\prime}], but instead of replacing the symbol from another font, it makes the situation worse: Is there any way to fix this behavior, or at least be able to replace this symbol from another font for which the display is correct? (Perhaps other than contacting the author of kpfonts-otf, as he is quite busy recently...)

  • Strange geometric calculation error of ellipse with `arc` in tikz?
    by Explorer on February 14, 2026 at 7:33 am

    I want to plot something as below in an elegant appraoch, with a handy control of the angle and eccentricity: (the pattern is not important here) Here below, I make some calculations: \documentclass[tikz,border=5pt]{standalone} \begin{document} \begin{tikzpicture}[line join=round] \def\R{5} \def\ell{0.9} \def\startAngle{40} \def\endAngle{90-\startAngle} \def\rhoo{\fpeval{\R*sind(45-\startAngle)/cosd(\startAngle)}} \def\Rx{\fpeval{\rhoo*(sqrt(1-(\ell^2*cosd(\startAngle)^2)))/(sqrt(1-\ell^2))}} \def\Ry{\fpeval{\Rx*(sqrt(1-\ell^2))}} \def\ellstartAngle{\fpeval{atand(\Rx/\Ry*tand(\startAngle))}} \filldraw[ fill=cyan!30, draw=cyan, very thick ] (\R,0) arc[start angle=0, end angle=\startAngle, radius=\R] { [rotate=-\startAngle] arc[start angle=-\ellstartAngle,end angle=180+\ellstartAngle,x radius=\Rx,y radius=\Ry] } arc[start angle=\endAngle, end angle=90, radius=\R] -- (0,\R) -- (\R,\R) -- cycle; \end{tikzpicture} \end{document} But it gives some drawbacks of the ellipse's ending tip: With the following sketch: My calculation thoughts is as below: noted that \StartAngle is \theta, and \ell is the ellipse's eccentricity with \def\rhoo{\fpeval{\R*sind(45-\startAngle)/cosd(\startAngle)}}, I want to derive the radius from origin of the ellipse, that is the \rho's distance in the sketch with the formula of the radius length from origin of the ellipse, that is: I want to derive the x-radius of ellipse, that is a(\Rx) via \def\Rx{\fpeval{\rhoo*(sqrt(1-(\ell^2*cosd(\startAngle)^2)))/(sqrt(1-\ell^2))}} Then I calaulated the y-radius with \Rx and \ell via \def\Ry{\fpeval{\Rx*(sqrt(1-\ell^2))}} Finally, I calculate the geometric angle of sub-path rotation learning from this answer via \def\ellstartAngle{\fpeval{atand(\Rx/\Ry*tand(\startAngle))}} I really have no idea of any mathematical calculation issues or just my tikz's parameter misunderstandings. Could somebosy give me a hand? (Any approach with neat syntax are all welcome! My calculation above is just to draw this in one \path)

  • tabularx: more horizontal distance between {|X| |X|}
    by cis on February 14, 2026 at 7:05 am

    How do I get more horizontal distance ? \documentclass[paper=a5]{scrarticle} \usepackage[margin=14mm, showframe=true]{geometry} \usepackage{tabularx,hhline,booktabs} \begin{document} \setlength{\arrayrulewidth}{3pt}% to see the rules clearly %\setlength{\tabcolsep}{5mm}% ungood \noindent% \begin{tabularx}{\textwidth}{|X| |X|} \hhline{|-||-|} Content Column 1 & Content Column 2 \\ \hhline{|-||-|} \end{tabularx} \end{document}