• How to make a command "eat" a space?
    by user424920 on December 28, 2025 at 11:03 am

    I searched for something similar, but I didn't find anything. \documentclass{report} \usepackage{amsmath} \usepackage{mathtools} \DeclareMathOperator{\diff}{d} \begin{document} \[\int x\diff x\] \end{document} I want to get "dx" and not "d x". I was looking at ways to eat spaces after the command, but nothing, I would like to avoid adding the "x" as a parameter to the \diff operator. I would like you know if there is a way.

  • Increase word spacing for body font of document
    by Gary on December 28, 2025 at 6:42 am

    To increase the space between words (before trying ConTeXt), I was doing the equivalent of: \definecommand Wspc 1.4 \setupbodyfont[libertinus,12pt,serif,regular] {\switchtobodyfont[libertinus] \fontdimen2\font=\Wspc\fontdimen2\font} I see in this tex.se answer that it is referred to as an "ugly hack" and is not recommended. Is there a more acceptable way to increase the word spacing for the body font of the document? Thank you.

  • Aligning text to drop caps with different distance for each line
    by Gary on December 28, 2025 at 6:09 am

    It appears that \setupinitial and \placeinitial are the method used to generate drop caps. May I ask a couple general questions, please. In the first example with the "I", how can the second and third lines be shifted to the right? I suppose, instead, the distance could be increased and the first line shifted to the left. In the second and third examples, is it possible to slope the distance to follow the "A" and "W" slopes? In the "I", the three lines of text appear to be aligned vertically; but, with the "A" and "W", the first line ("E") appears to be a bit more to the left than the other two lines. Why is this? Can the LibInit font be defined as 12pt such that the value of n in \setupinitials will set its size? I tried to do so, but it was either turned to bold or appeared as 12pt at the bottom of the third line. Thank you. (I received a lot of help the past couple days and thank you for that. I don't expect an answer to these four points, I just wanted to explain what I would like to do and, perhaps, someone can point me to where I can learn to do so.) \mainlanguage[en] \setuplayout[textwidth=4.0in] \setupbodyfont[libertinus,12pt,serif,regular] \definefont [LibInit] [name:LibertinusSerifInitials-Regular*default at 54pt] \definefontfeature [default] [default] [protrusion=quality,expansion=quality] \setupalign[justified,hyphenated,hanging,hz] \starttext \setupinitial[n=3,m=1,font=normal,hoffset=7pt,distance=-0.2em] \placeinitial {\LibInit I}Ellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec odio elit, dictum in, hendrerit sit amet, egestas sed, leo. Praesent feugiat sapien aliquet odio. Integer vitae justo. \setupinitial[n=3,m=1,font=normal,hoffset=4pt,distance=-0.1em] \placeinitial {\LibInit A}Ellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec odio elit, dictum in, hendrerit sit amet, egestas sed, leo. Praesent feugiat sapien aliquet odio. Integer vitae justo. \setupinitial[n=3,m=1,font=normal,hoffset=3pt,distance=-0.1em] \placeinitial {\LibInit W}Ellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec odio elit, dictum in, hendrerit sit amet, egestas sed, leo. Praesent feugiat sapien aliquet odio. Integer vitae justo. \stoptext

  • Why does \textstyle not work in \smashoperator?
    by John Lee on December 28, 2025 at 3:23 am

    In the following code, the \sum in \smashoperator appears too big. But if I put \textstyle\sum in \smashoperator, then it gives the error "*.tex: error: 290: Limit controls must follow a math operator. ...extstyle\sum_{\alpha\in D_{1}\cup D_{2}}}". I don't know what to do and need help. The MWE LaTeX code is as below: \documentclass[11pt,twoside]{article}% \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{mathtools} \usepackage[title,titletoc,header]{appendix} \usepackage{geometry} \usepackage{graphicx} \usepackage{indentfirst} \usepackage{mathrsfs} \usepackage{nopageno} \usepackage{setspace} \usepackage{remreset} \newtheorem{theorem}{Theorem}[section] \newtheorem{definition}[theorem]{Definition} \begin{document} \begin{enumerate} \item $\smashoperator{\sum_{\alpha\in D_{1}\cup D_{2}}}\,x_{\alpha}\,=\underset{\alpha\in D_{1}}{\textstyle\sum}x_{\alpha} \,+\underset{\alpha\in D_{2}}{\textstyle\sum}x_{\alpha}$ \end{enumerate} \end{document}

  • Weird Overleaf error
    by DavidIsDumb on December 28, 2025 at 2:31 am

    I'm writing some math stuff using overleaf but it broke mysteriously. I wrote: \documentclass[11pt]{scrartcl} \usepackage[dvipsnames,svgnames]{xcolor} \usepackage[shortlabels]{enumitem} \usepackage[framemethod=TikZ]{mdframed} \usepackage{amsmath,amssymb,amsthm} \usepackage{epigraph} \usepackage[colorlinks]{hyperref} \usepackage{microtype} \usepackage{mathtools} \usepackage[headsepline]{scrlayer-scrpage} \usepackage{thmtools} \usepackage{listings} \usepackage{derivative} \renewcommand{\epigraphsize}{\scriptsize} \renewcommand{\epigraphwidth}{60ex} \ihead{\footnotesize\textbf{Some text here}} \ohead{\footnotesize Some text here} \providecommand{\re}{\text{Re}} \providecommand{\im}{\text{Im}} \providecommand{\ol}{\overline} \providecommand{\eps}{\varepsilon} \providecommand{\half}{\frac{1}{2}} \providecommand{\dang}{\measuredangle} \providecommand{\CC}{\mathbb C} \providecommand{\FF}{\mathbb F} \providecommand{\NN}{\mathbb N} \providecommand{\QQ}{\mathbb Q} \providecommand{\RR}{\mathbb R} \providecommand{\ZZ}{\mathbb Z} \providecommand{\dg}{^\circ} \providecommand{\ii}{\item} \providecommand{\alert}{\textbf} \providecommand{\opname}{\operatorname} \providecommand{\ts}{\textsuperscript} \DeclareMathOperator{\sign}{sign} \providecommand{\tarc}{\mbox{\large$\frown$}} \providecommand{\arc}[1]{\stackrel{\tarc}{#1}} \reversemarginpar \providecommand{\printpuid}[1]{\marginpar{\href{https://otis.evanchen.cc/arch/#1}{\ttfamily\footnotesize\color{green!40!black}#1}}} \mdfdefinestyle{mdgreenbox}{linecolor=ForestGreen,backgroundcolor=ForestGreen!5, linewidth=2pt,rightline=false,leftline=true,topline=false,bottomline=false,} \declaretheoremstyle[headfont=\bfseries\sffamily\color{ForestGreen!70!black}, mdframed={style=mdgreenbox},headpunct={.},]{thmgreenbox} \mdfdefinestyle{mdredbox}{frametitlefont=\bfseries,innerbottommargin=8pt, nobreak=true,backgroundcolor=Salmon!5,linecolor=RawSienna,} \declaretheoremstyle[headfont=\bfseries\color{RawSienna}, mdframed={style=mdredbox},headpunct={\\[3pt]},postheadspace=0pt,]{thmredbox} \mdfdefinestyle{mdblackbox}{linecolor=black,backgroundcolor=RedViolet!5!gray!5, linewidth=3pt,nobreak=true,rightline=false,leftline=true,topline=false,bottomline=false,} \declaretheoremstyle[mdframed={style=mdblackbox}]{thmblackbox} \declaretheorem[style=thmredbox,name=Problem]{problem} \declaretheorem[style=thmblackbox,name=Outline,numbered=no]{sol} \declaretheorem[style=thmgreenbox,name=Claim,numbered=no]{claim*} \usepackage{asymptote} \begin{asydef} size(8cm); // set a reasonable default usepackage("amsmath"); usepackage("amssymb"); settings.tex="pdflatex"; settings.outformat="pdf"; import geometry; void filldraw(picture pic = currentpicture, conic g, pen fillpen=defaultpen, pen drawpen=defaultpen) { filldraw(pic, (path) g, fillpen, drawpen); } void fill(picture pic = currentpicture, conic g, pen p=defaultpen) { filldraw(pic, (path) g, p); } pair foot(pair P, pair A, pair B) { return foot(triangle(A,B,P).VC); } pair centroid(pair A, pair B, pair C) { return (A+B+C)/3; } \end{asydef} \begin{document} \title{Some text here} \subtitle{Some text here} \author{Some text here} \date{\today} \maketitle \begin{problem}[some text here] Fix an integer $n \ge 1$. Tom has a scientific calculator. Unfortunately, all keys are broken except for one row: \verb$1$, \verb$2$, \verb$3$, \verb$+$ and \verb$-$. Tom presses a sequence of $n$ random keystrokes; at each stroke, each key is equally likely to be pressed. The calculator then evaluates the entire expression, yielding a result of $E$. Find the expected value of $E$, in terms of $n$. (Negative numbers are permitted, so \verb$13-22$ gives $E = -9$. Any excess operators are parsed as signs, so \verb$-2-+3$ gives $E=-5$ and \verb$-+-31$ gives $E = 31$. Trailing operators are discarded, so \verb$2++-+$ gives $E=2$. A string consisting only of operators, such as \verb$-++-+$, gives $E=0$.) \end{problem} \end{document} When I compile there is no error message, but the last line has a red circle saying "unexpected \end{problem} after $" and the line before that says "unclosed $ found at \end{problem}". All the other probs with this format didn't break, so there's probably no problem with the \end. However, I found that if I type \begin{problem}[some text here] Tom presses a sequence of $n$ random keystrokes; at each stroke, each key is equally likely to be pressed. The calculator then evaluates the entire expression, yielding a result of $E$. Find the expected value of $E$, in terms of $n$. (Negative numbers are permitted, so \verb$13-22$ gives $E = -9$. Any excess operators are parsed as signs, so \verb$-2-+3$ gives $E=-5$ and \verb$-+-31$ gives $E = 31$. Trailing operators are discarded, so \verb$2++-+$ gives $E=2$. A string consisting only of operators, such as \verb$-++-+$, gives $E=0$.) \end{problem} instead for the problem part nothing happens! No error if I delete like half a paragraph. Can somebody explain what is happening? Edit: Also in the first case autocompile doesn't work, saying that my code has errors that must be fixed first before that can run, but for the second case autocompile works. I also found out that autocompile works when I type: \begin{problem}[some text here] Fix an integer $n \ge 1$. Tom has a scientific calculator. Unfortunately, all keys are broken except for one row: \verb$1$, \verb$2$, \verb$3$, \verb$+$ and \verb$-$. Tom presses a sequence of $n$ random keystrokes; at each stroke, each key is equally likely to be pressed. The calculator then evaluates the entire expression, yielding a result of $E$. Find the expected value of $E$, in terms of $n$. (Negative numbers are permitted, so \verb$13-22$ gives $E = -9$. Any excess operators are parsed as signs, so \verb$-2-+3$ gives $E=-5$ and \verb$-+-31$ gives $E = 31$. Trailing operators are discarded, so \verb$2++-+$ gives $E=2$. A string consisting only of operators, such as \verb$-++-+$, gives $E=0.) \end{problem} for the problem, but the last line has the following error message: LaTeX Error: Command \end{mdframed} invalid in math mode. \ (button saying suggest fix using AI) \ Missing $ inserted. \ Missing } inserted. \ Extra }, or forgotten \endgroup.

  • How to use \showfontexpansion and \noexpansion?
    by Gary on December 27, 2025 at 10:28 pm

    When using LaTeX, to keep Libertinus font looking crisp, I used the microtype package with expansion and shrink "turned off". \usepackage[expansion=false,shrink=0]{microtype} Now, attempting to set the same document in ConTeXt to learn, I'm having the same issue with the font looking thicker and blurry than that in the former LaTeX document with the mentioned package and settings. Does \showfontexpansion still function? I'd like to see the default settings before attempting to alter them; but just including this command in the .tex file doesn't show anything in the PDF produced. Also, does \noexpansion still function? Using it appeared to change nothing in my document and I cannot find documentation for either of these commands on the contextgarden site, although they are mentioned at https://wiki.contextgarden.net/Command/setupfontexpansion. I ask because I'm trying to read the the ConTeXt book Typographic Programming and several of the commands shown are not in the manual that lists all the commands. For example, \setupfonthandling is one of them. Thank you.

  • DNA helix and chromosome symbols built in tikz-pgf
    by Sebastiano on December 27, 2025 at 10:22 pm

    I'm wondering if there are predefined symbols chromosomes-dna in pdfLaTeX or done in TikZ similar to those used in biology textbooks. Here two examples: (credit from wikipedia https://en.wikipedia.org/wiki/Chromosome#/media/File:Chromosome.svg)

  • Self-created usepackage for commenting in beamer [duplicate]
    by olpendics on December 27, 2025 at 10:04 pm

    I'm currently creating a presentation with the beamer package. Since the comment-environment doesn't work there, which is quite annoying, I want to ask if there is someone who has like a self-created usepackage or kind of hacks that provide the \begin{comment}...comment...\end{comment} - environment- function. There is already a similar question to this problem, but this solution creates a frame (of course without the comment but its a frame). I don't want the frame, so is there an option to 'hide' entire frames (so they aren't shown in the presentation)? \documentclass{beamer} \usepackage{comment} \begin{document} \begin{frame}[fragile] % fragile option random text \begin{comment} hidden text \end{comment} \end{frame} \end{document} This creates a frame without the hidden text, but I dont want the appearence of the frame in the presentation.

  • Using \ProcessList and \SplitArgument with \IfBoolean
    by sgmoye on December 27, 2025 at 7:30 pm

    I need to use \ProcessList and \SplitArgument with \IfBoolean. Using only \ProcessList does work, but I need to get at the arguments before and after the / -- thus the need for \SplitArgument. The asterisk seems inextricably attached to the second argument in \fooauxai and I cannot seem to pry it loose. As indicated, I've tried some \expandafter experiments. Suggestions? \documentclass{article} \usepackage[papersize={5.5in,8.5in},margin=0.6in]{geometry} \usepackage{xparse}%% for <u> %% |=====8><-----| %% %% This works \NewDocumentCommand{\test}{ >{\SplitList{;}}m }{\ProcessList{#1}{\fooaux}} \NewDocumentCommand{\fooaux}{ m }{\fooauxa#1|} \NewDocumentCommand{\fooauxa}{ s u{|} }{% \def not possible due to need for boolean \IfBooleanTF{#1}{\textcolor{red}{#2}}{#2} } %% |=====8><-----| %% %% This does not work \NewDocumentCommand{\testi}{>{ \SplitList{;}}m } {\ProcessList{#1}{\fooauxi}} %% Tried this but to no avail: %% \NewDocumentCommand{\fooauxi}{ >{\SplitArgument{1}{/}}m } {\expandafter\fooauxai#1|} \NewDocumentCommand{\fooauxi}{ >{\SplitArgument{1}{/}}m } {\fooauxai#1} \NewDocumentCommand{\fooauxai}{ s m m }{% \IfBooleanTF{#1}{\textcolor{red}{(#2)}}{(#2)}-(#3) } %% |=====8><-----| %% \begin{document} \thispagestyle{empty} \begin{tabular}{lll} 1& From \verb+\test+& \test{a/1;*b/2;c/3}\\ 2& From \verb+\testi+& \testi{a/1;*b/2;c/3}\\ 3& Desired& (a)-(1) \textcolor{red}{(b)}-(2) (c)-(3) \end{tabular} \end{document}

  • How to call an expl3 function within Lua code
    by wehro on December 27, 2025 at 6:55 pm

    In an expl3 package a Lua module shall be used because Lua simplifies programming some functions. The Lua module shall call some expl3 functions from the package. But this does not work in all cases. In the following example only \MyDocumentCommandA works, not \MyDocumendCommandB. \begin{filecontents*}{mypackage.sty} \ProvidesExplPackage{mypackage}{2025-12-27}{1.0}{My package} \directlua { myluamodule = require ('myluamodule') } \cs_new:Npn \mypackage_command:n #1 { \int_to_Roman:n {#1} } \NewDocumentCommand \MyDocumentCommandA {m} { \directlua { myluamodule.functionA ( #1 ) } } \NewDocumentCommand \MyDocumentCommandB {m} { \directlua { myluamodule.functionB ( #1 ) } } \end{filecontents*} \begin{filecontents*}{myluamodule.lua} local myluamodule = {} myluamodule.functionA = function (nr) tex.sprint("bla blub ") tex.sprint("\\ExplSyntaxOn") tex.sprint("\\mypackage_command:n{"..nr.."}") tex.sprint("\\ExplSyntaxOff") end myluamodule.functionB = function (nr) tex.sprint("\\section{") myluamodule.functionA(nr) tex.sprint("}") end return myluamodule \end{filecontents*} \documentclass{article} \usepackage{mypackage} \begin{document} \MyDocumentCommandA{75} \MyDocumentCommandB{85} \end{document} The error message is: ! Undefined control sequence. <argument> bla blub \ExplSyntaxOn \mypackage _command:n{85}\ExplSyntaxOff l.43 \MyDocumentCommandB{85}

  • Installing ConTeXt from Pragma ADE site -- install versus downloads zip
    by Gary on December 27, 2025 at 6:37 pm

    I apologize for asking what might be a very stupid question but ... is there a difference between installing ConTeXt from the install page and download page of the Pragma ADE site? I used the method on the install page, but there appear to be more files in the download zip; and the use of the phrase "minimalistic installation" in the pdf instructions made me wonder if that refers to the "amount" of ConTeXt installed or just the simplicity of the installation of it. If I followed the instructions in the archive from the install page, did I get the full installation or might I be missing something? It (LMTX version) looks to be about 366 MiB after running sh install.sh. Running Manjaro Linux on local desktop. Thank you. http://www.pragma-ade.com/install.htm http://www.pragma-ade.com/download-1.htm

  • Set a value of a field with biblatex if another value is defined
    by Stefan Müller on December 27, 2025 at 5:14 pm

    I managed to set the value of the bibtex field URL if the field stableurl is defined. I usually do not use the content of the field, since I believe organizations should provide DOIs. But some publisher insists. So I want to map the field stableurl to url and by doing so make it visible. The next step would be to add a value for last access and it should be \today. I could not manage to set the urldate value. My code sets it for all items. And I have to specify the value of today, since today outputs the date in a wrong format. \documentclass{scrbook} \usepackage[ natbib=true, backend=biber, indexing=cite ]{biblatex} \DeclareSourcemap{ \maps[datatype=bibtex]{ \map{ \step[fieldsource=stableurl] \step[fieldset=url, origfieldval] \step[fieldset=urldate,fieldvalue=2025-12-27] } } } \begin{filecontents}{bibliography.bib} @incollection{Steedman89, author = {Steedman, Mark J.}, pages = {463--504}, address = {Cambridge}, booktitle = {Lexical Representation and Process}, editor = {Marslen-Wilson, William}, publisher = {The MIT Press}, title = {Lexical Representation and Process}, year = {1989}, title = {Grammar, Interpretation, and Processing from the Lexicon}} @incollection{Steedman90, author = {Steedman, Mark J.}, pages = {463--504}, address = {Cambridge}, booktitle = {Lexical Representation and Process}, editor = {Marslen-Wilson, William}, stableurl = {https://some.url.org}, publisher = {The MIT Press}, title = {Lexical Representation and Process}, year = {1990}, title = {Grammar, Interpretation, and Processing from the Lexicon}} @incollection{Steedman91, author = {Steedman, Mark J.}, pages = {463--504}, address = {Cambridge}, booktitle = {Lexical Representation and Process}, editor = {Marslen-Wilson, William}, publisher = {The MIT Press}, title = {Lexical Representation and Process}, year = {1991}, title = {Grammar, Interpretation, and Processing from the Lexicon}} \end{filecontents} \addbibresource{bibliography.bib} \begin{document} \citep{Steedman89,Steedman90,Steedman91} \printbibliography \end{document}

  • How to format the node's position center with different width in forest package?
    by Explorer on December 27, 2025 at 4:56 pm

    With the following code: \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, parent anchor=east, child anchor=west, where n children=0{tier=word}{}, }, [Networked Game Work BreakDown, root, [Software Engineering Report, xnode [Setting shape, tnode] [Choosing color, tnode] [Adding shading, tnode] ] [Game Demo Preparation, onode [Using a Matrix, tnode] [Relatively, tnode] [Absolutely, tnode] [Using overlays, wnode] ] [Project Proposal and Game Logic, onode [Default arrows, tnode] [Arrow library, tnode] [Resizing tips, tnode] [Shortening, tnode] [Bending, tnode] ] ] \end{forest} \end{document} Which gives: However, it looks not so good, with two green nodes NOT aligned in the center of the edge, for the sake of different width in the same level. Is that possible to tweak the intersection shift right and aligned with the third sub-trees?

  • Is all meta-data written by tex engines to a PDF file visible for pdfinfo?
    by user2609605 on December 27, 2025 at 1:20 pm

    I found that latex engines create various pieces of meta-data, some in Info dictionary, a lot in XMP data and some custom data like the banner tagging data. All pieces of data i am aware of can be displayed with pdfinfo using no option, -custom or -meta or -struct(-text). I know that the latex engines themselves write meta data, that the package hyperref writes further and \DocumentMetadata is another source. So if this is all, I really know the complete set of metadata written. It turns out that pdfinfo can visualize all of it. Can anyone confirm, that there is no more than that? I ask because for privacy I would like to avoid that the PDF file contains invisible data i am not aware of.

  • How to vertically center content in the same row in longtable when using \arraystretch and makecell?
    by taiwan12 on December 27, 2025 at 11:14 am

    I am writing a document that uses double line spacing. For tables I switch back to single spacing, but I also increase the row height using \arraystretch. The problem is that cells with multiple lines (using makecell) are not vertically centered in the row compared to single-line cells. How can I make all cell contents vertically centered within their row (including makecell entries) in longtable? \documentclass[11pt]{report} \usepackage{geometry} % Allows setting page size and margins \usepackage{parskip} % Adds space between paragraphs, removes paragraph indentation \usepackage{setspace} % Allows changing line spacing (\singlespacing ...) \usepackage{float} % Provides [H] option to force figure/table placement \usepackage{longtable} % Supports tables that span multiple pages \usepackage{makecell} % Allows line breaks and formatting inside table cells \usepackage{booktabs} % Provides horizontal rules for tables \usepackage{caption} % Allows customization of captions \usepackage{lipsum} % Generates dummy text for testing \captionsetup[table]{position=bottom} % caption bottom \renewcommand{\arraystretch}{2.3} \doublespacing \begin{document} \lipsum[1-2] \begin{spacing}{1} \begin{longtable}{ccc} \toprule \makecell[c]{\textbf{AAA}} & \makecell[c]{\textbf{BBB}\\{\footnotesize(bbb)}} & \makecell[c]{\textbf{CCC}\\{\footnotesize(ccc)}} \\ \midrule \endfirsthead \multicolumn{3}{c}{Table Continues} \\ \toprule \textbf{AAA} & \textbf{BBB} & \textbf{CCC} \\ \midrule \endhead \bottomrule \endfoot \bottomrule \caption{B}\label{tab:B} \endlastfoot \makecell{content\\content} & content & content \\ \midrule content & \makecell{content\\content} & content \\ \makecell{content\\content} & content & content \\ content & content & content \\ \midrule content & content & content \\ content & content & content \\ content & content & content \\ content & content & content \\ \end{longtable} \end{spacing} \lipsum[1-2] \end{document}

  • Symbol of a circular sector [duplicate]
    by Sebastiano on December 27, 2025 at 11:09 am

    Is there only symbol to denote the circular sector? One is make with pixels: \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{fdsymbol} \begin{document} $\sector$ \end{document} and others in the list of symbols, ending in -slice, look like slices of pizza.

  • Glitch of \overrightarrow with `NewCMMath-Book.otf` font?
    by Explorer on December 27, 2025 at 10:17 am

    I have the following code: \documentclass{article} \usepackage{unicode-math} % \setmathfont{NewCMMath-Regular.otf} % normal \setmathfont{NewCMMath-Book.otf} % abnormal \begin{document} \[ \overrightarrow{e} \quad \overrightarrow{\pi} \quad \overrightarrow{\Pi} \] \end{document} Which gives: We noticed that if the arguments is too wide, the glitch appeared. While it's normal with NewCMMath-Regular.otf:

  • aligned inside tikz-cd
    by Jinwen on December 27, 2025 at 9:11 am

    I would like to reproduce the following diagram in Yves André's book: However, it is unclear to me how to produce the multi-line node inside the diagram. Currently, what I could achieve is this: However, the alignment inside aligned is not working the way I expected. May I ask what is the correct way to do this? Thanks! Below is a MWE. \documentclass{article} \usepackage{mathtools,amssymb} \usepackage{tikz-cd} \begin{document} \[ \begin{tikzcd} {\{\,{\text{\( k \)-schémas étales finis}}\,\}} & {\begin{aligned} &\{\, \text{ensembles finis munis}\\ &\quad\text{d'une action continue de \( \mathrm{Gal}(\overline{k}/k) \)}\,\} \end{aligned}} \\ {AM(k)_{\mathbb{Q}}} & {\begin{aligned} &\{\, \text{\( \mathbb{Q} \)‑espaces vectoriels de dimension finie munis}\\ &\quad\text{d'une action linéaire continue de \( \mathrm{Gal}(\overline{k}/k) \)}\,\} \end{aligned}} \arrow["\sim", from=1-1, to=1-2] \arrow["{\mathfrak{h}}"', from=1-1, to=2-1] \arrow["{\mathfrak{l}}", from=1-2, to=2-2] \arrow["\sim", from=2-1, to=2-2] \end{tikzcd} \] \end{document}

  • Modifying casing of zref-titleref references or alternatives
    by TRH on December 27, 2025 at 6:26 am

    I have multiple definitions I want to reference throughout the paper with a link back. However instead of "Definition X" I want to use the title I gave the definitions, i.e. "Super Special Definition", etc. This works fine with \zcref[ref=title, noname]{label}, but fails to take into account special casing conditions if I want it to read "super special definition" or even "super Special Definition" (only the first character) instead. \lowercase and \MakeLowercase do not appear to work. M(non)WE: \begin{definition}[Upper Case Definition] \zlabel{definition:upper-case-definition} \end{definition} I want \zcref[ref=title, noname]{definition:upper-case-definition} to be lowercase.

  • How to tune the forest with recombining node elegantly?
    by Explorer on December 27, 2025 at 3:20 am

    My question is similar to: https://tex.stackexchange.com/a/737502/322482 https://tex.stackexchange.com/a/593979/322482 https://tex.stackexchange.com/a/588156/322482 However, with different node width and hard position control, I don't think they are exactly the same as mine. \documentclass[border=5pt]{standalone} \usepackage{libertine} \usepackage{amsmath} \usepackage{forest} \usetikzlibrary{arrows.meta} \begin{document} \begin{forest} for tree={ draw,l sep=1cm, minimum width=2cm, minimum height=8ex, anchor=center, align=center, edge={-Stealth,thick}, if n=1{ edge label={node[midway,left=3pt,font=\scriptsize]{no}}, }{ edge label={node[midway,right=3pt,font=\scriptsize]{yes}}, } }, where level<=2{fill=green!30}{fill=magenta!50,minimum height=10ex,minimum width=1cm}, [Is $\mathbf{A}$ Hermitian? [Is $\mathbf{A^*v}$ available? [Is storage\\ expensive? [GMRES] [CGS\\Bi-CGSTAB\\GMRES($l$),] ] [Is $\mathbf{A}$ well-\\conditioned? [QMR\\BiCG] [CGN,phantom]%<-??? ] ] [Is $\mathbf{A}$ definite? [Is $\mathbf{A}$ well-\\conditioned? [CGN] [MINRES\\{\large or other}] ] [Are largest and smallest\\ eigenvalues known? [CG] [CG with\\ Chebyshev] ] ] ] \end{forest} \end{document} Noted that it produce: As the figure shows, I also want it to share the same node——"CGN", and move it a little bit left, however, I don't know how to change the horizinal distance to make them overlap(because the width of the leaf nodes are not the same), or any more elegant method is welcome! In a word, the "combining node" has two issues: How to tune the position horizonally? How to temporarily change if n=1{edge label={node[midway,left=3pt,font=\scriptsize]{no}},}{edge label={node[midway,right=3pt,font=\scriptsize]{yes}}} in my framework now? I want to make good uses of forest's feature to achieve the seperation of content and style. The original figure I want to replicate is(not to be exactly the same,just similar is okay):

  • Different middle header on odd/even pages?
    by Gary on December 27, 2025 at 2:46 am

    I've seen examples in a couple manuals and the contextgarden wiki site for \setupheaders how text for middle, left, and right can be set with two statements--first the middle, and then the combined left/right for odd/even pages. My question is, In this facing-pages layout, how can the middle text be different for odd and even pages? Can the line \setupheadertexts[Center_Text] be made to distinguish odd/even? Thank you. \definepapersize [book] [width=8.16in,height=10.66in] \setuppapersize [book] [letter] \setuppagenumbering[alternative=doublesided,location=] \setuplayout [backspace=1in, width=4in, leftmargin=.5in, leftmargindistance=.5in, rightmargin=1in, rightmargindistance=1in] \setupheadertexts[Center_Text] \setupheadertexts[left_on_odd][Page \pagenumber][Page \pagenumber][rght_on_even] % \showframe \starttext % \showlayout[pt,in] \dorecurse {5} {\samplefile {knuth}\par} \stoptext I also tried the following lines (after reading this answer) but the middle text isn't really in the middle of the header. % \setupheadertexts[Center_Text] \setupheadertexts[left_on_odd\hfill Middle_Odd\hfill][Page \pagenumber][Page \pagenumber][\hfill Middle_Even\hfill rght_on_even]

  • Font request: Does anyone have the Millennial font package? If yes, could you share it?
    by AnthonyM on December 26, 2025 at 9:45 pm

    I have seen some nice examples from the Millennial font package. However, I couldn't find it anywhere in the Internet. I've tried http://www.math.unl.edu/~shartke2/computer/latex/Millennial-20110819.tar.bz2 but Professor Stephen Hartke, the package's author leaved UNL in 2015 so, although some files are available from Internet Archive like the character's test, the page is gone and so the package there. Even on Reddit I couldn't get a valid link, so I'm humbling asking if anyone here hold a copy of it that you could share. I know it's old and there are modern alternatives to it but, for some of my purposes, this T1 package would come in handy.

  • Trying to get page dimensions to fit paper including printer's bleed margins
    by Gary on December 26, 2025 at 8:10 pm

    I'm trying to get my printout to match my page settings in ConTeXt. My printer sets margins of 0.17 inches and I cannot set them to 0. So, I reduced the leftedge, rightedge, backspace, topspace, top, and bottom by 0.17, which reduced the text width and height by 0.34. The \showlayout lists the expected values for each dimension; and I set \definepapersize[book][width=8.16in,height=10.66in][letter]. My question is, What is the correct way to set the positioning of the print on the paper? In the printer settings, I set PDF Options Scale to "None; print original size"; and that seems to result in the correct widths and heighths when measured with a ruler. (The default is "Fit to printable area" which I thought might result in no scaling since the page size should now be the same as the printable area; but that scales it down to slightly smaller dimensions.) However, the text does not appear to be positioned correctly horizontally. I'm trying to have facing pages using \setuppagenumbering[alternative=doublesided] but on one side the width of the inner margin (the distance from paper edge to text) differs a little from that on the opposite page. The left page is about 1/16 inch more than the target of 1.5 inches and the right page about 1/16 inch less. Is this just a printer issue or is there a setting, such as location that requires a value? I've been using location=doublesided. Thank you. \mainlanguage[en] \definepapersize[book][width=8.16in,height=10.66in][letter] \setuppapersize[book] \setuppagenumbering[alternative=doublesided] \definelayout[main][ location=doublesided, backspace=1.33in, topspace=0.83in, top=0.83in, topdistance=0in, width=fit, height=fit, headerdistance=0.125in, footerdistance=0in, header=15pt, footer=0in, bottom=0.83in, bottomdistance=0in, leftmargin=0in, leftmargindistance=0in, leftedge=1.33in, leftedgedistance=0in, rightmargin=1.375in, rightmargindistance=0.125in, rightedge=0.33in, rightedgedistance=0in] \setupbodyfont[libertinus,12pt] \setupindenting[yes,medium,next] \setupwhitespace[quarterline] \setupinterlinespace[2.8ex] \starttext \setuplayout[main] \showlayout[pt,in] \showframe {The text width is \the\textwidth, \the\rightedgewidth} \stoptext

  • Interleave blank pages at specific locations
    by MysteryGuy on December 26, 2025 at 2:55 pm

    All is in the title: I have a current document with (plain) numbered pages and I would like to interleave blank pages but only after current page 3, that is, put one blank page between every plain page, starting from page 3 (so keep my current pages 1, 2, 3 unchanged, then start interleaving blank pages). These blank pages should be either numbered or not numbered but keeping the numbering of the plain pages coherent (i.e., I don't want to go from plain page 4 to 6). I can not use newpage since of course, I don't exactly know where the page breaks might occur regarding the content. Thanks in advance for help !

  • Epicycle and deferent of the Ptolemaic model
    by Sebastiano on December 26, 2025 at 2:22 pm

    About 15 years ago, I had created a drawing using GeoGebra that looks similar to the attached image. The source .ggb file from GeoGebra is available here, and I'm happy to share it with anyone interested. I was wondering if it's possible to replicate this drawing exactly using TikZ-PGF. I have the .ggb file and I'm wondering if there's a way to convert it or if TikZ can reproduce the same graphic. Additionally, I found a more recent package, named pst-sphericaltrochoid, which might be useful for generating spherical trochoid curves, and the package is documented in the PDF manual from December 25, 2025. Moreover, I would like to have this drawing animated in LaTeX. When export in tikz-pgf using Geogebra the output is not the expected result like the image (with animations). I never done a drawing with animate package or similar. \documentclass[10pt]{article} \usepackage{pgfplots} \pgfplotsset{compat=1.15} \usepackage{mathrsfs} \usetikzlibrary{arrows} \pagestyle{empty} \begin{document} \definecolor{ffwwqq}{rgb}{1,0.4,0} \definecolor{zzttqq}{rgb}{0.6,0.2,0} \definecolor{xdxdff}{rgb}{0.49019607843137253,0.49019607843137253,1} \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1cm,y=1cm] \begin{axis}[ x=1cm,y=1cm, axis lines=middle, grid style=dashed, xmin=-24.649425971185988, xmax=51.05123247996474, ymin=-17.77843276444837, ymax=20.90166759086156, xtick={-20,-15,...,50}, ytick={-15,-10,...,20},] \clip(-24.649425971185988,-17.77843276444837) rectangle (51.05123247996474,20.90166759086156); \draw [line width=0.8pt] (0,0) circle (8cm); \draw [line width=0.8pt] (4.690951292494638,6.480353074597315) circle (2cm); \draw[line width=4pt] (-22.73456951795283,17.710240168806287) -- (-9.968859829731798,17.710240168806287); \draw[line width=4pt] (-22.73456951795283,15.157098231162069) -- (-9.968859829731798,15.157098231162069); \begin{scriptsize} \draw [fill=xdxdff] (4.690951292494638,6.480353074597315) circle (0.5pt); \draw[color=xdxdff] (4.137249375752443,7.338101047126645) node {$A$}; \draw [fill=black] (-17.202761986390385,17.710240168806287) circle (2.5pt); \draw[color=black] (-16.096400480077897,19.40169670249558) node {$k = 1.3$}; \draw [fill=zzttqq] (2.345168103332513,5.359058630909856) circle (1pt); \draw[color=zzttqq] (4.392563569516864,6.316844272068956) node {$Pianeta$}; \draw [fill=black] (-17.06092076763237,15.157098231162069) circle (2.5pt); \draw[color=black] (-16.479371770724526,16.848554764851364) node {$v = 5$}; \draw [color=ffwwqq] (0,0) circle (4.5pt); \draw[color=ffwwqq] (1.264964695902711,1.4658745905449386) node {$Sole$}; \end{scriptsize} \end{axis} \end{tikzpicture} \end{document} My idea is to animate the drawing using the animate package for my students of an high school, with the ability to modify parameters and see how the drawing changes in real time. Could I add interactive buttons to allow users to modify the parameters of the animation? If anyone has experience animating drawings in LaTeX, I'd be happy to receive suggestions on how to implement it. Also, how can I animate package this drawing and add interactive buttons to control the parameters?

  • natbib option "super" not working properly with make4ht
    by MadyYuvi on December 26, 2025 at 11:13 am

    I'm trying with: \documentclass[]{article} \usepackage[numbers,super,sort&compress,comma]{natbib} \begin{document} Test\cite{ref1,ref2,ref3,ref4,ref5,ref6,ref7,ref8,ref9,ref10} \begin{thebibliography}{99} \bibitem{ref1} Entry 1 \bibitem{ref2} Entry 2 \bibitem{ref3} Entry 3 \bibitem{ref4} Entry 4 \bibitem{ref5} Entry 5 \bibitem{ref6} Entry 6 \bibitem{ref7} Entry 7 \bibitem{ref8} Entry 8 \bibitem{ref9} Entry 9 \bibitem{ref10} Entry 10 \end{thebibliography} \end{document} For HTML conversion, I'm trying with make4ht filename and the output was: If I remove the option super, then it works correctly: But I'm in need to use options numbers,super,sort&compress,comma, how can I meet this? Please advise.

  • zref-clever: Use noname by default for equations?
    by user1362373 on December 26, 2025 at 10:44 am

    I'm thinking about migrating several large documents from cleveref to zref-clever. I have read Migration from cleveref to zref-clever as well as the manual, but several questions remain. One of them is: How I can control whether references to equations include "equation" or "equations" before the label(s), independently of whether references to figures and tables include "figure" and "table"? (The reasoning is that equations are numbered with parentheses whereas figures and tables are numbered without parentheses. Thus, it is clear that "see (1)" means equation (1) whereas "see 1" would be ambiguous because it could mean either Figure 1 or Table 1.) My understanding is that I need to use the option noname when referring to each equation. To avoid having to type the option in each reference, I could define a new command: \documentclass{article} \usepackage{zref-clever} \newcommand{\zcrefeq}[1]{\zcref[noname]{#1}} \begin{document} \begin{equation}\label{eq:1} a = b \end{equation} \begin{figure}[h] \caption{Some figure.} \label{fig:1} \end{figure} We have \zcrefeq{eq:1} and \zcref{fig:1}. \zcref[S]{eq:1} is the first equation. \end{document} Is there a more elegant way of doing this by setting an overall option or a reference format option?

  • Don't get decimal output with luacas
    by Fa-Mat on December 26, 2025 at 10:38 am

    First of all "Merry Christmas" to everyone. I'm trying to get decimal output with luacas and don't get it. \documentclass[paper=a4,fontsize=12pt]{scrartcl} \usepackage{luacas} \begin{document} \directlua{ a=3 b=8 c=a/b tex.print('$',c,'$') } \end{document} The code above gives the expectet 0.375. Changing to \documentclass[paper=a4,fontsize=12pt]{scrartcl} \usepackage{luacas} \begin{document} \begin{CAS} a=3 b=8 c=Rational(a,b) \end{CAS} $\print{a}$ $\print{b}$ $\print{c}$ $\print{c.numerator}$ $\print{c.denominator}$ \end{document} gives 3, 8, the fraction 3 over 8, 3 and 8. In the manual there is the funtion :asnumber() given but \documentclass[paper=a4,fontsize=12pt]{scrartcl} \usepackage{luacas} \begin{document} \begin{CAS} a=3 b=8 c=Rational(a,b) d=c:asnumber() \end{CAS} $\print{a}$ $\print{b}$ $\print{c}$ $\print{c.numerator}$ $\print{c.denominator}$ $\print{d}$ \end{document} gives Lua-Error and the $\print{d}$ is ignored. I also tried something like d=Rational:asnumber(c) or used the funktions ZZ(), QQ() and RR() but without any success. Also $\print{c:asnumber()}$ fails. Trying to print the decimal with $\directlua{tex.print(string.format("\csstring\%.3f",c))}$ gives also a Lua error ('c' is a table but a number is expected by 'string.format()'). I'm not having any ideas how to solve it any more. Thank you for your help.

  • Paragraphs beside wrapstuff environments have larger indents
    by youthdoo on December 26, 2025 at 10:31 am

    I noticed that paragraphs within the scope of a wrapstuff environment have larger horizontal distances between the title and the content. See for example \documentclass[b5paper]{article} \usepackage{graphicx} \usepackage[margin=2cm]{geometry} \usepackage{lipsum} \usepackage{wrapstuff} \begin{document} \begin{wrapstuff}[l,width=16em] \includegraphics[width=16em]{example-image} \end{wrapstuff} \paragraph{paragraph name}\lipsum[4] \paragraph{paragraph name}\lipsum[4] \end{document} The difference is very obvious and ugly in certain cases. What is the cause for this and how to solve the problem?

  • What are the advantages of environments over macros (and of \NewDocumentEnvironment over \NewDocumentCommand)?
    by Alexey on December 24, 2025 at 9:24 pm

    I noticed that when I start from a custom environment, and then decide to do something slightly non-trivial with its content (like hide it, or typeset in a different color), I end up switching to a custom macro with an argument. Consider, for example, these questions: Hide custom environment content based on boolean Environment hiding its content I have no idea how to make the content of an environment disappear without using packages like comment or version or scontents. On the other hand, this is trivial to do with a custom macro: just (re)define the macro as a no-op: \newcommand\comment[1]{}. It looks to me that any environment could be replaced with a macro, to have \theorem{...} instead of \begin{theorem}...\end{theorem}, etc. On the other hand, I do not know how to make an environment that, for example, duplicates or discards its content, or puts it in a box. What are the advantages of environments over macros that offset the inconveniences? P.S. IMO the environ package takes the correct approach.