• Fraction bar crashes into superscript exponent in manually-drawn TikZ fraction
    by Oregon Math Tutor on June 22, 2026 at 9:38 pm

    I'm reproducing this educational graphic for my Algebra 1 students: I'm drawing fractions manually (separate nodes for numerator, bar, denominator) rather than \frac{}{} so I can control individual font sizes and colors. Two spacing problems I can't fix: 1. The fraction bar crashes into the 2 superscript on the denominator 5² 2. (where a ≠ 0) has no breathing room below the denominator aⁿ Both stem from the bar and note being placed at hardcoded absolute y-coordinates with no structural relationship to the surrounding nodes. MWE (problem area marked): % ── PROBLEM 1: bar hardcoded at y=1.88, unrelated to midfive.north ── \node[font=\bfseries\fontsize{38}{38}\selectfont] (midfive) at (11.70,1.03) {5}; \node[font=\bfseries\fontsize{22}{22}\selectfont] at ($(midfive.north east)+(0.08,0.10)$) {2}; \draw[line width=1.8mm] (11.18,1.88) -- (12.22,1.88); % bar too close to "2" % ── PROBLEM 2: note hardcoded at y=0.78, unrelated to aden.south ── \node[font=\bfseries\fontsize{41}{41}\selectfont] (aden) at (5.76,1.52) {a}; \node[font=\bfseries\fontsize{24}{24}\selectfont] at ($(aden.north east)+(0.10,0.12)$) {n}; \node[font=\bfseries\fontsize{15}{15}\selectfont] at (4.22,0.78) {(where a $\neq$ 0)}; Full MWE: \documentclass[tikz,border=0pt]{standalone} \usepackage{fix-cm} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage[scaled=0.98]{helvet} \renewcommand{\familydefault}{\sfdefault} \usepackage{xcolor} \usetikzlibrary{calc} \definecolor{bggray}{HTML}{ECECEC} \definecolor{purpleA}{HTML}{6B2FEA} \definecolor{purpleB}{HTML}{8B43F5} \definecolor{purpleText}{HTML}{7A34F0} \definecolor{greenText}{HTML}{43D400} \definecolor{redExample}{HTML}{FF2946} \definecolor{textMain}{HTML}{202020} \newcommand{\Avar}{\textcolor{purpleText}{\textbf{a}}} \newcommand{\Nvar}{\textcolor{greenText}{\textbf{n}}} \newcommand{\NegNvar}{\textcolor{greenText}{\textbf{-n}}} \begin{document} \begin{tikzpicture}[x=1cm,y=1cm] \path[use as bounding box] (0,0) rectangle (16,9); \fill[bggray] (0,0) rectangle (16,9); \shade[left color=purpleA,right color=purpleB] (0,6.82) rectangle (16,9); \node[text=white, font=\bfseries\fontsize{28}{30}\selectfont] at (8,8.18) {Negative Exponent Rule}; \node[anchor=north west, text=textMain, align=left, text width=15.0cm] at (0.56,6.47) {% {\bfseries\fontsize{12.6}{18}\selectfont Any nonzero number, \Avar, raised to a negative exponent, \NegNvar,\\[5pt] equals one over that number raised to the positive exponent, \Nvar.} }; \draw[black, line width=1.1mm, rounded corners=1.2mm] (1.02,0.35) rectangle (7.42,4.34); \node[text=purpleText, font=\bfseries\fontsize{53}{53}\selectfont] (abase) at (2.08,2.56) {a}; \node[text=greenText, font=\bfseries\fontsize{26}{26}\selectfont] at ($(abase.north east)+(0.18,0.16)$) {-n}; \node[text=textMain, font=\bfseries\fontsize{34}{34}\selectfont] at (4.18,2.62) {=}; \node[text=textMain, font=\bfseries\fontsize{36}{36}\selectfont] at (5.78,3.42) {1}; \draw[line width=2.0mm] (5.12,2.63) -- (6.44,2.63); \node[text=purpleText, font=\bfseries\fontsize{41}{41}\selectfont] (aden) at (5.76,1.52) {a}; \node[text=greenText, font=\bfseries\fontsize{24}{24}\selectfont] at ($(aden.north east)+(0.10,0.12)$) {n}; \node[text=textMain, font=\bfseries\fontsize{15}{15}\selectfont] at (4.22,0.78) {(where \Avar\ $\neq$ 0)}; % PROBLEM 2 \fill[redExample] (8.86,3.10) rectangle (14.78,4.20); \node[text=white, font=\bfseries\fontsize{21}{21}\selectfont] at (11.82,3.65) {Example}; \node[text=textMain, font=\bfseries\fontsize{44}{44}\selectfont] (fivebase) at (9.62,1.70) {5}; \node[text=textMain, font=\bfseries\fontsize{24}{24}\selectfont] at ($(fivebase.north east)+(0.08,0.12)$) {-2}; \node[text=textMain, font=\bfseries\fontsize{34}{34}\selectfont] at (10.58,1.85) {=}; \node[text=textMain, font=\bfseries\fontsize{34}{34}\selectfont] at (11.70,2.53) {1}; \draw[line width=1.8mm] (11.18,1.88) -- (12.22,1.88); % PROBLEM 1 \node[text=textMain, font=\bfseries\fontsize{38}{38}\selectfont] (midfive) at (11.70,1.03) {5}; \node[text=textMain, font=\bfseries\fontsize{22}{22}\selectfont] at ($(midfive.north east)+(0.08,0.10)$) {2}; \node[text=textMain, font=\bfseries\fontsize{34}{34}\selectfont] at (13.18,1.85) {=}; \node[text=textMain, font=\bfseries\fontsize{34}{34}\selectfont] at (14.35,2.53) {1}; \draw[line width=1.8mm] (13.86,1.88) -- (14.84,1.88); \node[text=textMain, font=\bfseries\fontsize{36}{36}\selectfont] at (14.35,1.00) {25}; \end{tikzpicture} \end{document} What is the canonical way to: Position a manually-drawn fraction bar so it reliably clears a denominator's superscript, using node anchors rather than hardcoded y-coordinates? Add vertical space above a text node relative to the node above it?

  • Does LaTeX Offer Any Fonts Similar to These Two Pinocchio Fonts? [duplicate]
    by Jethro on June 22, 2026 at 8:35 pm

    Does anyone know if either of these two Pinocchio fonts (or a reasonable facsimile thereof) is available in LaTeX (font cataglogue)? Does anyone know the name of these two fonts by which the word "Pinocchio" is typeset in white?

  • Structuring text in multiple lines / How does LaTeX interpret newline?
    by user1 on June 22, 2026 at 7:49 pm

    I want to be able to easily comment out selected parts of my document, e.g., „Sentence two“ in the following example. It seems that, LaTeX interprets a newline as a space (except if the previous line ended with a comment) ignores double spaces (ex. 6) and thus also newlines preceded by a space (ex. 2) Does this hold for every scenario? Is there anything I should be aware of? Or can I replace all of my spaces by newlines? So example 3 is the best way to go? \documentclass{article} \begin{document} % 1. Normal written Sentence one. Sentence two. Sentence three. % 2. Space at end of every row Sentence one. Sentence two. Sentence three. % 3. No spaces at end of row Sentence one. Sentence two. Sentence three. % 4. Comment at end of every row Sentence one.% Sentence two.% Sentence three. % 5. Space and comment at end of every row Sentence one. % Sentence two. % Sentence three. % 6. Double spaces (bonus) Sentence one. Sentence two. Sentence three. \end{document}

  • tables wrapped by "\tagstructbegin{tag=Part}" and "\tagstructend" can't pass veraPDF test error content"caption should be first or last child"
    by amelia jia on June 22, 2026 at 7:42 pm

    Me and my friends are currently following a LuaLaTeX/PDF-UA accessibility workflow that recommends wrapping floating elements such as figures and tables using \tagstructbegin and \tagstructend. However, we have encountered an issue with tables. When we wrap a table with “\tagstructbegin{tag=Part}” and “\tagstructend”, veraPDF reports structure-tree errors and the document fails PDF/UA validation. However, if we remove the tag structure entirely, the table passes veraPDF validation and is read correctly by screen readers (VoiceOver in our testing). Because of this, we are unsure which approach is correct. Should we remove the manual tag structure for tables, or is there a recommended way to use tagpdf with tables that avoids these validation errors? Below is a simplified example of the table structure we are using: \tagstructbegin{tag=Part} \begin{table}[H] \caption{Sample data for Cu powder pattern} \makebox[\textwidth][c]{ \begin{tabular}{|c|c|c|c|c|} \hline $sin^2\theta$ & $sin^2\theta/0.1369$ & $(sin^2\theta/0.1369)*3$, rounded & hkl \\ \hline 0.1369 & 1 & 3 & (111)\\ 0.1809 & 1.32 & 4 & (200)\\ 0.3642 & 2.66 & 8 & (220)\\ 0.5012 & 3.66 & 11 & (311)\\ 0.5455 & 3.98 & 12 & (222)\\ \hline \end{tabular} } \label{XRD:table2} \end{table} \tagstructend The VeraPDF error report is: "When present, the Caption element shall be the first or the last child of the structure element". Thanks for your help!

  • inline enumerate broken with \DocumentMetadata
    by user20478285 on June 22, 2026 at 12:48 pm

    Without the \DocumentMetadata, everything works fine. I also tried tagging=off but that makes no difference. Similarly, using the paralist package with inparaenum instead of enumitem with enumerate* yields pretty much the same errors. MWE: \DocumentMetadata{ lang=en-GB, pdfversion=2.0 } \documentclass{article} \usepackage[inline]{enumitem} \begin{document} \begin{enumerate*} \item foo \item bar \end{enumerate*} \end{document} Compiling with a recent enough lualatex: This is LuaHBTeX, Version 1.24.0 (TeX Live 2026) (format=lualatex 2026.6.1) 22 JUN 2026 12:42 system commands enabled. Yields the following errors: ! LaTeX Error: Lonely \item--perhaps a missing list environment. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.12 \item f oo Try typing <return> to proceed. If that doesn't work, type X <return> to quit. ! LaTeX Error: Lonely \item--perhaps a missing list environment. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.13 \item b ar Try typing <return> to proceed. If that doesn't work, type X <return> to quit. ! Too many }'s. \enit@endinlist ...x \fi }\color@endgroup \egroup \ifdim \wd \enit@inbox =\z... l.14 \end{enumerate*} You've closed more groups than you opened. Such booboos are generally harmless, so keep going. ! Package enumitem Error: Misplaced \item. See the enumitem package documentation for explanation. Type H <return> for immediate help. ... l.14 \end{enumerate*} Either there is some text before the first item or the last item has no text ! Undefined control sequence. \enit@endinlist ...@itemerror \fi \fi \enit@after \global \advance \@listdep... l.14 \end{enumerate*} The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined. ! LaTeX Error: Something's wrong--perhaps a missing \item. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.14 \end{enumerate*} Try typing <return> to proceed. If that doesn't work, type X <return> to quit. ! Undefined control sequence. \enit@endinlist ...ax \else \ifnum \enit@resuming =\@ne \enit@setresumekeys ... l.14 \end{enumerate*} The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined. ! Missing number, treated as zero. <to be read again> = l.14 \end{enumerate*} A number should have been here; I inserted `0'. (If you can't figure out why I needed to see a number, look up `weird error' in the index to The TeXbook.) ! Undefined control sequence. \enit@setresumekeys ...xpandafter {\enit@savekeys }\xdef \enit@afterlist {#2... l.14 \end{enumerate*} The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined. ! Undefined control sequence. \enit@setresumekeys ...it@toks }\ifnum \enit@type =\z@ #3\def \enit@noexcs {... l.14 \end{enumerate*} The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined. ! Missing number, treated as zero. <to be read again> = l.14 \end{enumerate*} A number should have been here; I inserted `0'. (If you can't figure out why I needed to see a number, look up `weird error' in the index to The TeXbook.) ! Undefined control sequence. <argument> enit@resume@series@\enit@series l.14 \end{enumerate*} The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined. ! You can't use `\relax' after \the. <recently read> \c@ l.14 \end{enumerate*} I'm forgetting what you said and using zero instead. ! Undefined control sequence. \enit@endinlist ...list \fi \ifnum \enit@resuming =\thr@@ \enit@setresumekey... l.14 \end{enumerate*} The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined. ! Missing number, treated as zero. <to be read again> = l.14 \end{enumerate*} A number should have been here; I inserted `0'. (If you can't figure out why I needed to see a number, look up `weird error' in the index to The TeXbook.) ! Undefined control sequence. \enit@setresumekeys ...xpandafter {\enit@savekeys }\xdef \enit@afterlist {#2... l.14 \end{enumerate*} The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined. ! Undefined control sequence. \enit@setresumekeys ...it@toks }\ifnum \enit@type =\z@ #3\def \enit@noexcs {... l.14 \end{enumerate*} The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined. ! Missing number, treated as zero. <to be read again> = l.14 \end{enumerate*} A number should have been here; I inserted `0'. (If you can't figure out why I needed to see a number, look up `weird error' in the index to The TeXbook.) ! You can't use `\relax' after \the. <recently read> \c@ l.14 \end{enumerate*} I'm forgetting what you said and using zero instead. ! LaTeX Error: \begin{document} ended by \end{enumerate*}. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.14 \end{enumerate*} Your command was ignored. Type I <command> <return> to replace it with another command, or <return> to continue without it. ! Extra \endgroup. \end ...end#1\endcsname \@checkend {#1}\endgroup \UseHook {env/#1/after}\if... l.14 \end{enumerate*} Things are pretty mixed up, but I think the worst is over. [1 {/usr/local/texlive/2026/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./output.aux) *********** LaTeX2e <2025-11-01> L3 programming layer <2026-05-26> *********** ) Edit An attempt without \DocumentMetadata but rather pdfmanagement directly makes the inline list work fine, but breaks the language seemingly. \RequirePackage{pdfmanagement} \SetKeys[document/metadata]{lang=en-GB, pdfversion=2.0} \documentclass{article} \usepackage{babel} \usepackage[strict]{csquotes} \usepackage{paralist} \begin{document} \begin{inparaenum} \item \enquote{foo} \item bar \end{inparaenum} \end{document} Yields (/usr/local/texlive/2026/texmf-dist/tex/generic/babel/luababel.def \bbl@attr@locale=\attribute4 ) Package babel Info: You haven't specified a language as a class or package (babel) option. I'll load 'nil'. Reported on input line 4311. Package babel Info: Importing font and identification data for 'nil' (babel) from babel-und-x-nil.ini. Reported on input line 4380. (/usr/local/texlive/2026/texmf-dist/tex/generic/babel/nil.ldf Language: nil 2026/06/14 v26.9 Nil language \l@nil=\language93 )) (/usr/local/texlive/2026/texmf-dist/tex/latex/csquotes/csquotes.sty Package: csquotes 2026-05-19 v5.2p context-sensitive quotations (JAW) (/usr/local/texlive/2026/texmf-dist/tex/latex/etoolbox/etoolbox.sty Package: etoolbox 2025/10/02 v2.5m e-TeX tools for LaTeX (JAW) \etb@tempcnta=\count296 ) (/usr/local/texlive/2026/texmf-dist/tex/latex/graphics/keyval.sty Package: keyval 2026-05-17 v1.15 key=value parser (DPC) \KV@toks@=\toks17 ) \csq@reset=\count297 \csq@gtype=\count298 \csq@glevel=\count299 \csq@qlevel=\count300 \csq@maxlvl=\count301 \csq@tshold=\count302 \csq@ltx@everypar=\toks18 (/usr/local/texlive/2026/texmf-dist/tex/latex/csquotes/csquotes.def File: csquotes.def 2026-05-19 v5.2p csquotes generic definitions (JAW) ) Package csquotes Info: Trying to load configuration file 'csquotes.cfg'... Package csquotes Info: ... configuration file loaded successfully. (/usr/local/texlive/2026/texmf-dist/tex/latex/csquotes/csquotes.cfg File: csquotes.cfg ) Package csquotes Info: Enabling strict warnings. ) (/usr/local/texlive/2026/texmf-dist/tex/latex/paralist/paralist.sty Package: paralist 2017/01/22 v2.7 Extended list environments \pltopsep=\skip51 \plpartopsep=\skip52 \plitemsep=\skip53 \plparsep=\skip54 \pl@lab=\toks19 ) Package csquotes Info: Checking for multilingual support... Package csquotes Info: ... found 'babel' package. Package csquotes Info: Adjusting default style. ! Package csquotes Error: No style for language 'nil'. See the csquotes package documentation for explanation. Type H <return> for immediate help. ... l.9 \begin{document} Define a style or alias for this language first. Package csquotes Info: Redefining alias 'default' -> 'fallback'. (./output.aux) \openout1 = output.aux It seems I cannot set the value of language or I get another error (again with LuaHBTeX, Version 1.24.0 (TeX Live 2026) (format=lualatex 2026.6.18)): ! LaTeX Error: The key 'document/metadata/language' is unknown and is being (LaTeX) ignored.

  • \xypolynode/\xypolygon without holes
    by Sebastiano on June 22, 2026 at 10:46 am

    In relation to this answer of mine, I would like to understand, considering the cryptic code of xy, how the bullets can be joined together without leaving any gaps, with the tip and tail of the vectors. How to automatically label through the dodecagon with TikZ elegantly? \documentclass{article} \usepackage{amsmath} \usepackage[all]{xy} \xyoption{poly} \begin{document} \def\alphanum{\ifcase\xypolynode\or A\or B\or \overset{a_{10}}{\bullet}\or \overset{a_{11}}{\bullet}\or E\or F\or G\or H\or I\or J\or K\or L\fi} \def\alphalati{\ifcase\xypolynode\or \alpha\or \beta\or \alpha_{10}\or \alpha_{1,11}\or \epsilon\or \zeta\or \eta\or \theta\or \iota\or \kappa\or \lambda\or \mu\fi} \[ \xy/r6pc/: {\xypolygon12{ ~><{} ~*{\alphanum} ~>>{_{\alphalati}} }} \endxy \] \end{document} With the option \xymatrix with \xymatrix{ *=0 I can have the vertices/arrows without holes.

  • moderncv — The To field is empty when the email link is clicked
    by SCTU on June 22, 2026 at 10:37 am

    I have been working with the moderncv document class. Here is a code : \documentclass[11pt,a4paper,sans]{moderncv} \usepackage[colorlinks]{hyperref} \moderncvcolor{purple} \moderncvstyle{classic} \name{Abc}{Xyz} \email{\link[xyz@gmail.com]{xyz@gmail.com}} \begin{document} \makecvtitle \section{M.Sc Project} \cvitem{Subject}{Episode 111} \cvitem{Supervisor}{\link[Prof. CID]{https://youtu.be/lq-uW8NrlUU?si=ZK5JictkCnpC6Owt}} \end{document} The problem is when someone clicks on the email, it takes him/her to the Compose email interface but the To field is empty. I want the To field to be filled with my email name, as they click on the link available on the cv document. How can I resolve this ?

  • csquotes: displayquote in LaTeX. How to set right margin? [duplicate]
    by Thierry Dumont on June 22, 2026 at 9:08 am

    I need to use \begin{displayquote}...\end{displayquote}. Default produces left and right margins. I would like to remove the right margin (fix it's size to zero). How to do this ? -Thierry-

  • How to offset two bezier paths with specific ratio elegantly?
    by Explorer on June 22, 2026 at 8:44 am

    Description: I want to plot the following result: Now I have the following code with visual TikZ editor: \documentclass[tikz,border=2pt]{standalone} \begin{document} \begin{tikzpicture}[ line cap=round,line join=round, scale=3,line width=2pt, ] \clip circle[radius=1cm]; \draw[green] (-0.988,-0.155) .. controls (-0.689,0.093) and (-0.531,0.081) .. (-0.454,0.114) .. controls (-0.099,0.175) and (0.111,0.132) .. (0.402,0.132) .. controls (0.617,0.127) and (0.819,0.132) .. (0.98,0.252) ; \draw[teal] (-0.15,-0.349) .. controls (0.072,-0.109) and (0.231,-0.119) .. (0.274,-0.119) .. controls (0.607,-0.167) and (0.729,-0.431) .. (0.832,-0.53) ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \draw[blue] (0.41,0.129) -- (0.343,-0.126); \draw[magenta] (-0.988,-0.174) .. controls (-0.732,0.048) and (-0.542,0.071) .. (-0.428,0.096) .. controls (-0.189,0.148) and (0.123,0.124) .. (0.385,0.11) .. controls (0.361,0.027) and (0.338,-0.056) .. (0.314,-0.139) .. controls (0.483,-0.182) and (0.563,-0.256) .. (0.61,-0.303) .. controls (0.666,-0.359) and (0.742,-0.454) .. (0.811,-0.54); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \draw[line width=4pt] circle [radius=1cm]; \end{tikzpicture} \end{document} However, the magenta line was not so perfect, in other word: \draw[magenta] (-0.988,-0.174) .. controls (-0.732,0.048) and (-0.542,0.071) .. (-0.428,0.096) .. controls (-0.189,0.148) and (0.123,0.124) .. (0.385,0.11) .. controls (0.361,0.027) and (0.338,-0.056) .. (0.314,-0.139) .. controls (0.483,-0.182) and (0.563,-0.256) .. (0.61,-0.303) .. controls (0.666,-0.359) and (0.742,-0.454) .. (0.811,-0.54); is no the best practice in my opinion(for example, green one and magenta one was partly overlepped). My question is, if I want the pos=0.7 of green one, and the pos=0.35 of teal one, how to offset(or yshift) the subpath in this case? See the below for pos details: References: https://tex.stackexchange.com/search?q=user%3A16595%20offset%20nfold How to thicken the subpath's segment with specific position? What is a better approach to plot the double path style as a subpath?

  • Context: Why this math fail in context but work OK in lualatex?
    by Nasser on June 21, 2026 at 10:32 pm

    I use latex generated by computer algebra systems. So I can't change it as each time the program run, it will be overwritten. Also Scientific word generates such latex. All math tex work OK with lulatex. My understanding so far, is that same tex code works as is in context as with lualatex because context uses same tex engine also as lualatex. And I only need to change the surrounding latex commands to context commands. i.e. change \begin{align*} to \startformula and so on. But the tex generated will still work. Here is example where it does not work. First lualatex \documentclass[12pt,oneside]{book} \usepackage{amsmath} \begin{document} \[ x^{\prime \prime } =50 \sin \left (5 t \right )%autogenerated \] \end{document} compiled gives Here is context file \starttext \startformula x^{\prime \prime } =50 \sin \left (5 t \right ) \stopformula \stoptext Compiled using context gives If some tex code do not work same way as in Lualatex, then using context will not work for me, as 90% of the tex code I use is generated by other programs. Would someone clarify this aspect of context?

  • context: How to use stix2 font and set integral sign upright?
    by Nasser on June 21, 2026 at 9:37 pm

    in lualatex this MWE (thanks to answer Why making integral sign upright works for some fonts but not others?) \documentclass[12pt,oneside]{book} %\usepackage{amsmath} %loaded by unicode below \usepackage{unicode-math} \setmainfont{STIX Two Text} \setmathfont{STIX Two Math}[StylisticSet=8] %sets integral sign up \begin{document} Regular text automatically uses STIX Two Text. \[ \int_a^b f(x) \, dx = F(b) - F(a) \] \end{document} Gives How to get same result in context? This is one trial that google AI gave me % file A.tex \setupbodyfont[stixtwo, 12pt] % 2. Remap the math operator classes for integrals to use the upright stylistic set (ss08) \setupmathrendering[default][alternates={integral=ss08}] \starttext Regular text automatically uses STIX Two Text. Your integral sign is now completely upright: \startformula \int_a^b f(x) \, dx = F(b) - F(a) \stopformula \stoptext Compiled using context A.tex gives I've been talking with google AI on this for last 30 minutes and it gave me about 20 different codes to try, none of them worked. So I told it I will go and ask on tex stackexchange instead. TL 2026

  • How can I use the result of a lua call in defining a macro?
    by modallyFragile on June 21, 2026 at 9:32 pm

    I want to use some lua code, which gives me a string, and then be able to define macros (the latex way) using the result. I would have thought something like this would work: \documentclass{article} \newcommand\foo\directlua{ tex.print("foobar") } \begin{document} % Expected 'foobar', got an error. \foo \end{document} But instead I get an error saying 'missing begin document'. What's going on? Context For context: I have a general macro, defined with Lua, which fetches and prints external information. I want to use this macro to parametise some documents, with the option to override the parameter using a user macro. Something like this: \documentclass{article} % This would go in the .cls file \makeatletter % Default value \let\@email\externaldata{email} % Command for overring \newcommand{\email}[1]{\xdef\@email{#1}}% \makeatother \begin{document} % \@email can still be printed here without the user having to use % \email, because of the externally-sourced fallback. \end{document} Where \externaldata is my (custom, local) macro for getting the externally-defined data. This is why I don't just define the macros inside the Lua code. TIA!

  • How to pass `\tikzgraphnodename` with `edge node` or `edge label` in `graph` with TikZ?
    by Explorer on June 21, 2026 at 8:31 pm

    I want replicated the following with the graphs trick in this post: Here below is my code: \documentclass[tikz,border=5pt]{standalone} \usetikzlibrary{graphs.standard,arrows.meta} \tikzset{ polygon/.cd, dot/.style={shape=circle, color=black, fill, draw, inner sep=+0pt, minimum size=+5pt}, path/.style={draw,-latex,thick}, label/.style={shape=circle,inner sep=+.05em, minimum size=+2.5em,draw}} \newcommand*\tikzpolygon[4][]{ % #2 = phase, #3 = radius, #4 = number of vertices \tikz[polygon/.cd,#1] \graph[ edges = {polygon/path}, edge node = {node[ midway,auto,inner sep=+1pt,circle, % draw,anchor=...? ] {X}}, % edge node = {node[midway,auto] {\tikzgraphnodename}}, phase = {#2}, radius = {#3}, counterclockwise = {#4}, n = {#4}, nodes={ /tikz/polygon/dot, as=, /utils/exec=\pgfmathsetmacro\myangle{#2+360/(#4)*(\tikzgraphnodename-1)}, /utils/exec=\pgfmathtruncatemacro\mylabel{\tikzgraphnodename-1}, label/.expanded={[polygon/label, anchor=\myangle+180]\myangle:$a_{1,\mylabel}$} }, ]{subgraph C_n};% } \begin{document} \tikzpolygon{105}{80pt}{12} \end{document} However, I found it hard to pass \tikzgraphnodename with key edge label or edge node, I could only get: Any suggestion to tweak the label and the anchor of my code? Thx!

  • Expanding string conditional with expl3
    by wehro on June 21, 2026 at 8:07 pm

    I need a \str_if_eq_p:xn command, a variant of \str_if_eq_p:nn defined by expl3. But I get the following error message: ! Missing number, treated as zero. <to be read again> \cs_set_nopar:Npx l.23 \MyCommand{abcdefg} What is wrong with the following code? \documentclass{article} \ExplSyntaxOn \cs_generate_variant:Nn \str_if_eq_p:nn {xn} \NewDocumentCommand \MyCommand {m} { \bool_lazy_or:nnTF { \str_if_eq_p:xn { \str_range:nnn {#1} {1} {4} } {abcd} } { \str_if_eq_p:xn { \str_range:nnn {#1} {1} {4} } {pqrs} } { The~result~is~true. } { The~result~is~false. } } \ExplSyntaxOff \begin{document} \MyCommand{abcdefg} \MyCommand{pqrstu} \MyCommand{acefg} \end{document}

  • Consistent vertical alignment for open access icons with biblatex-ext
    by user20478285 on June 21, 2026 at 7:55 pm

    How can I have the same alignment for the open access icon from the biblatex-ext package even when used in a quote or itemize environment? The open access icon is aligned properly when using a plain fullcite or in the bibliography and sits on the baseline of the first line. When used in a quote or itemize environment however, the alignment is off. MWE below: \documentclass{article} \usepackage[style=ext-alphabetic]{biblatex} \usepackage[enable=true, symbolpackage=tikz]{biblatex-ext-oa} \addbibresource{biblatex-examples.bib} \begin{document} \fullcite{baez/article} \begin{quote} \fullcite{baez/article} \end{quote} \begin{itemize} \item \fullcite{baez/article} \end{itemize} \printbibliography \end{document}

  • Spaces between steps in xcookybooky and wrapfig
    by Martin on June 21, 2026 at 10:45 am

    Following up this question: I am using Sam Carter's answer to get the spacing right. I modified the "ingredients part" of the xcookybooky package to fit my needs - now there are two tables (using tabular resp. tblr) and an image in this part. If I do this, the wrapfig of the ingredients does not work as intended. Either all steps are "short" or all are "long" but the first ones should be short, the ones after the ingredients long. How can that be changed? Since I modified the package, I tried to add the lines for this part manually in the following MWE - this does not give the same problem but a (maybe) related: No matter which number ist insert after \wraptable, the line of step 4 are too long. MWE: \documentclass{report} \usepackage{xcookybooky} \usepackage[most]{tcolorbox} \usepackage{tabularray} \renewcommand{\step}[1]{% \stepcounter{step}% \begin{tcolorbox}[ height=0.7cm, height plus=10\textheight, size=minimal, blankest ] \lettrine [% lines=2, lhang=0, % space into margin, value between 0 and 1 loversize=0.15, % enlarges the height of the capital slope=0em, findent=1em, % gap between capital and intended text nindent=0em % shifts all intended lines, begining with the second line ]{\thestep}{}% #1 \end{tcolorbox}% \vspace{\baselineskip} } \begin{document} \begin{recipe}{test} \begin{wraptable}[5]{r}{0.34\textwidth} \vspace{\fboxsep-1.75em} \hspace{-0.81em}\colorbox{yellow!20}{\parbox{\dimexpr \linewidth-2\fboxsep+0.81em}{% \begin{tabular}{rl} C & D \\ C & D \\ C & D \\ \end{tabular} \vspace{-1.2em} }} \includegraphics[width=\dimexpr \linewidth+0.8em]{example-image-a} \vspace{0.45em} % same height of ingredients and preparation \hspace{-1.07em} \colorbox{yellow!20}{\hspace{-1\fboxsep}{% \parbox{\dimexpr 0.34\textwidth-3\fboxsep+1.07em}{% \centering \vspace{0.5em} \begin{tblr}{colspec={X[r]X[2,l]}, hlines} A & B \\ A & B \\ A & B \\ A & B \\ A & B \\ A & B \\ A & B \\ A & B \\ A & B \\ A & B \\ A & B \\ A & B \\ A & B \end{tblr} }}} \end{wraptable} \preparation{ \step{First step.} \step{Second step. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin quis lectus sodales velit tempor interdum adipiscing eu tellus. Maecenas ornare enim eget euismod suscipit. Nam luctus aliquam consequat. Donec placerat molestie ullamcorper. Quisque aliquet vehicula feugiat. Phasellus mollis bibendum justo a pulvinar. Fusce at vehicula nulla.} \step{Third step.} \step{Second step. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin quis lectus sodales velit tempor interdum adipiscing eu tellus.} \step{Second step.} \step{Second step.} \step{Second step. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin quis lectus sodales velit tempor interdum adipiscing eu tellus. Second step. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin quis lectus sodales velit tempor interdum adipiscing eu tellus.} \step{Second step. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin quis lectus sodales velit tempor interdum adipiscing eu tellus. Second step. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin quis lectus sodales velit tempor interdum adipiscing eu tellus.} \step{Second step. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin quis lectus sodales velit tempor interdum adipiscing eu tellus. Second step. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin quis lectus sodales velit tempor interdum adipiscing eu tellus.} \step{Sa} \step{Second step. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin quis lectus sodales velit tempor interdum adipiscing eu tellus.} } \end{recipe} \end{document} EDIT: First picture shows the output, second picture indicates the "bounds" the wraptable should have:

  • Converting Display Equtions into image (EPS) format with the existing font using make4ht
    by MadyYuvi on June 21, 2026 at 7:11 am

    My code are: \documentclass{article} \usepackage{mathtools} \RequirePackage[no-math]{fontspec}% \setmainfont[Mapping=tex-text,Ligatures=TeX,Path = ./Fonts/TimesNewRoman/ , UprightFont= TimesNewerRoman-Regular.otf, BoldFont= TimesNewerRoman-Bold.otf, ItalicFont=TimesNewerRoman-Italic.otf, BoldItalicFont=TimesNewerRoman-BoldItalic.otf, ]{TimesNewRoman}% \usepackage[italic,nolessnomore,noplusnominus,noequal,noparenthesis]{mathastext} \input macros.tex \begin{document} \[ CAPE{X_{ict}} \equals {\alpha _0} \plus {\alpha _1}CC{E_{ict}} \plus {\alpha _2}Control{s_{ict}} \plus {\alpha _3}Control{s_{it}} \plus {\psi _i} \plus {\tau _t} \plus {\varepsilon _{ict}} \] \[ E\left\lpar {\left. {CAPE{X_{it}}} \right|Control{s_{it}}} \right\rpar \equals {\alpha _1}E\left\lpar {\left. {CC{E_{it}}} \right|Control{s_{it}}} \right\rpar \plus {\alpha _2}Control{s_{it}} \] \[ CAPE{X_{it}} \minus E\left\lpar {\left. {CAPE{X_{it}}} \right|Control{s_{it}}} \right\rpar \equals {\alpha _1}\left[ {CC{E_{it}} \minus E\left\lpar {\left. {CC{E_{it}}} \right|Control{s_{it}}} \right\rpar} \right] \plus {\varepsilon _{it}} \] \[\widetilde {CAPE{X_{it}}} \equals CAPE{X_{it}} \minus \widehat {CAPE{X_{Controls {\comma} it}}} \] \[\widetilde {CC{E_{it}}} \equals CC{E_{it}} \minus \widehat {CC{E_{Controls {\comma} it}}} \] \[\widetilde {CAPE{X_{it}}} \equals {\alpha _1}\widetilde {CC{E_{it}}} \plus {\varepsilon _{it}} \] \end{document} I'm using XeLaTeX to get the output, and I'm using make4ht to convert the display Math in to EPS format by using the below format: Content for macros.tex \def\equals{=} \def\plus{+} \def\lpar{(} \def\rpar{)} \def\minus{-} \def\comma{,} Definition for config file: \Preamble{xhtml} \Configure{Picture}{.eps} \begin{document} \EndPreamble Definition for .lua file: Make:image("eps$", "dvips -E -o ${output} -pp ${page} ${source}") Conversion done by using: make4ht -x -c config.cfg -e build.lua filename.tex "pic-m,pic-align It produced the error as: [STATUS] make4ht: Conversion started [STATUS] make4ht: Input file: toteqn.tex This is XeTeX, Version 3.141592653-2.6-0.999996 (TeX Live 2024) (preloaded format=xelatex) restricted \write18 enabled. entering extended mode This is XeTeX, Version 3.141592653-2.6-0.999996 (TeX Live 2024) (preloaded format=xelatex) restricted \write18 enabled. entering extended mode This is XeTeX, Version 3.141592653-2.6-0.999996 (TeX Live 2024) (preloaded format=xelatex) restricted \write18 enabled. entering extended mode --- error --- Improper op while scanning font defs in postamble [FATAL] make4ht-lib: Fatal error. Command tex4ht returned exit code 1 C:\texlive\2024\bin\windows\runscript.tlu:922: command failed with exit code 1: texlua c:\texlive\2024\texmf-dist\scripts\make4ht\make4ht -x -c config.cfg -e build.lua toteqn.tex "pic-m,pic-align" But the same was working fine without font definitions in PDFLaTeX and also without the option -x in conversion. How can I convert the equations into EPS format with the same font what I'm using, please advise.

  • Redefining \ref while using hyperlinks
    by Tomasz23 on June 20, 2026 at 11:23 pm

    Edit: essentially duplicate of redefining \label and \ref when using hyperref, noting that one more redefinition is needed with amsmath (Using custom \locallabels command with custom \eqref command). I'm trying to redefine \label and \ref to automatically append label by \themycounter: (where mycounter is a counter I use to avoid overlapping labels in a larger project made from multiple pieces). The approach in MWE below works well when hyperlinks is not loaded. As soon as I uncomment \usepackage{hyperlinks} the setup breaks, as if Latex was ignoring my attempt at redefining \ref (in the example below, with hyperlinks loaded \ref{0:e1} works). How should I fix it (and why is it broken in the first place)? MWE: \documentclass{article} %\usepackage{hyperref} \newcounter{mycounter} \let\oldlabel\label \renewcommand{\label}[1]{\oldlabel{\themycounter:#1}} \let\oldref\ref \def\ref#1{\oldref{\themycounter:#1}} \begin{document} \begin{equation}\label{foo} 1=1 \end{equation} \ref{foo} %\ref{0:foo} <-this creates a correct reference with hyperlinks loaded \end{document}

  • How to get dagger and double-dagger only as footnote symbols?
    by Cham on June 20, 2026 at 9:26 pm

    I'm writing a novel which has a few footnotes. In some special cases, I only have two or maybe three (max !) footnotes on the same page. I would like to get the same dagger symbol for all footnotes on each page, if there's only a single footnote, and the dagger and double-dagger on the pages that get two footnotes at bottom. How can I achieve this? Usually, for technical documents, I use the default numbers. But I need to change that to daggers and double-daggers only, with a recount on each page. In the very rare case where I would need a third footnote on the same page, I would prefer the old style paragraph symbol, or another better one. If possible, I would prefer to not load any new package, since my full document preamble is already pretty heavy... Here's a MWE to play with, which currently isn't doing what I'm looking for: \RequirePackage[l2tabu,orthodox]{nag} \documentclass[11pt,twoside]{book} \usepackage[T1]{fontenc} \usepackage[tt=false]{libertinus} \usepackage[french]{babel} \usepackage[stretch=50]{microtype} % Option : stretch=50 \usepackage[letterpaper,left=1.25in,right=1in,top=0.5in,bottom=0.5in,includeheadfoot,headheight=15pt]{geometry} % Option showframe pour montrer les bordures. \raggedbottom \setlength{\parindent}{1.5em} \linespread{1.1} \usepackage[bottom]{footmisc} \usepackage{titlesec} \usepackage{graphicx} \usepackage[dvipsnames]{xcolor} \usepackage{float} \usepackage{fancyhdr} \usepackage[titles]{tocloft} \usepackage[unicode,colorlinks,linkcolor=Blue,urlcolor=Red,citecolor=blue,pdftitle={title},pdfauthor={Author},pdfsubject={Subject},pdfkeywords={Words},pdfproducer={pdfLaTeX},plainpages=false,hyperindex=true,pdfpagelabels,linktocpage=true]{hyperref} % Footnote symbol: \renewcommand{\thefootnote}{\fnsymbol{footnote}} \begin{document} Blablabla\footnote{Bla bla.}. Bla bla\footnote{Blablabla.} \newpage Blabla\footnote{Blabla bla.}. Blabla bla bla\footnote{Footnote.} Bla blabla bla\footnote{Blablabla.} \end{document}

  • How to swap OpenType mathematics font glyphs of symbols defined by unicode-math?
    by Nyx on June 20, 2026 at 4:06 pm

    Here is my MWE: % !TEX program = lualatex \documentclass{article} \usepackage[no-math,otfmath]{newpx} % Loads unicode-math \setmathfont{Asana Math} \setmathfont{STIX Two Math}[version=stix-two-math] % \setmathfont{STIX Two Math}[ % range={ % \assert, % \Dashv, % \dashv, % \models, % \vDash, % \vdash, % } % ] \begin{document} \section{Asana Math} {\Huge\[\assert\vdash\dashv\]} {\Huge\[\models\vDash\Dashv\]} \section{STIX Two Math} \mathversion{stix-two-math} {\Huge\[\assert\vdash\dashv\]} {\Huge\[\models\vDash\Dashv\]} \end{document} In my personal documents, I often use Asana Math as the primary OpenType math font and STIX Two Math as the secondary OpenType math font (for glyphs which the former lacks or which I simply prefer). Judging from the glyphs in other fonts seen in List of symbols defined by the package [unicode-math], it seems that Asana Math's glyphs for \models (U+022A7 ⊧) and \vDash (U+022A8 ⊨) may have been, perhaps unintentionally, swapped. I am aware I can simply uncomment lines 6–15 in my MWE in order to use STIX Two Math's glyphs. I wanted to ask if there was a way to unswap the corresponding Asana Math glyphs, or swap the corresponding symbol definitions if the math font currently used for those symbols is Asana Math so as not to affect their original definitions when other math fonts are used instead in the document.

  • Why might this Math.SE reference be presented this way? How do I correct it? [closed]
    by Shaun on June 20, 2026 at 2:23 pm

    Following the "cite" feature of this Math.SE question using bibtex, I get: @MISC {5023954, TITLE = {A reference request for quasisimple groups being one-headed.}, AUTHOR = {Nicky Hekster (https://math.stackexchange.com/users/9605/nicky-hekster)}, HOWPUBLISHED = {Mathematics Stack Exchange}, NOTE = {URL:https://math.stackexchange.com/q/5023954 (version: 2025-01-17)}, EPRINT = {https://math.stackexchange.com/q/5023954}, URL = {https://math.stackexchange.com/q/5023954} } This seems incorrect, and I don't know how to correct it. Please would you recommend how I can get it to be like MSE sample citation?

  • Beamer & displaying inline and display math consistently with biblatex [closed]
    by Arunabh on June 19, 2026 at 9:39 pm

    I am preparing a presentation in Beamer and using biblatex for my references. My slides contain a mixture of inline and displayed mathematics, and I have noticed that some equations appear with different spacing or font sizes depending on the surrounding environment. For example, I would like the following: Inline math should have a consistent appearance throughout the presentation. Displayed equations should have the same spacing whether they appear inside a block or directly on the frame. Using biblatex should not interfere with the formatting of mathematical expressions. The solution should work with standard Beamer themes. MWE: \documentclass[10pt]{beamer} \usetheme{Frankfurt} \usepackage{amsmath} \usepackage{mathtools} \usepackage{filecontents} \begin{filecontents}{\jobname.bib} @book{lamport, author = {Leslie Lamport}, title = {LaTeX: A Document Preparation System}, year = {1994}, publisher = {Addison-Wesley} } \end{filecontents} \usepackage[backend=biber,style=numeric]{biblatex} \addbibresource{\jobname.bib} \begin{document} \begin{frame}{Math example} Some inline math such as \(a^2+b^2=c^2\) is followed by a citation \cite{lamport}. \begin{block}{Displayed equation} \[ \int_{0}^{1} x^2\,dx=\frac13. \] \end{block} Outside the block: \[ \sum_{k=1}^{n} k=\frac{n(n+1)}{2}. \] \end{frame} \end{document} Is there a recommended way to ensure that inline and display math are formatted consistently throughout a Beamer presentation while continuing to use biblatex for citations?

  • fontspec stanza when font is available in multiple sizes
    by Karl Berry on June 19, 2026 at 5:40 pm

    New Computer Modern has 8pt and 10pt fonts, e.g., NewCM08-Regular.otf and NewCM10-Regular.otf. How best to express, in the .fontspec file, the desire to use the 8pt font for 8pt or smaller, and the 10pt font everything else? Since "-8" means <8 and "8-" means >=8 (fontspec manual p.25), it seems it's necessary to specify 8 itself explicitly, as in: UprightFont={NewCM10-Regular.otf},% UprightFeatures={% SizeFeatures={% {% Size={-8},% Font={NewCM08-Regular.otf}% },% {% Size={8},% Font={NewCM08-Regular.otf}% },% {% Size={8-},% Font={NewCM10-Regular.otf}% },% }% },% It works but it's irritating. (I also couldn't find any actual statement in the fontspec doc that "first match wins". I hope that doesn't change.) So, my question: is there any shorthand for <=? Every font with multiple sizes (admittedly few) would want this, since it's better to scale down than to scale up. I know fontspec has an OpticalSize concept, but Antonis chose to implement the 8pt as a separate otf file, which seems reasonable. Neither lm nor drm nor the other "sized" otf files I could find have fontspec files for comparison (I guess since they have many more sizes, not so important). Not unlikely I missed something. Finally, here's a trivial LaTeX file to use the 8pt font. Without that middle "exactly 8" stanza above (or if it's after the 8-), the result is a scaled 10pt instead of the 8pt font. \documentclass{article} \usepackage{fontspec} \usepackage[olddefault]{fontsetup} \thispagestyle{empty} \begin{document} {\footnotesize A\par} \end{document}

  • Efficiency and Size trade-off when customize symbols?
    by Explorer on June 19, 2026 at 12:28 pm

    This post originated wipet's comment here and here: The solution has one disadvantage and should not be used commonly with massive usage of these symbols. Each occurrence of this symbol saves to the PDF file a new code with all coordinates of all curves. This is not the same as if the font is used. Then the font is loaded only once to the PDF file (with curves of used characters) and then each occurence of the symbol in the document is realized as a reference to the font and its slot-code. The PDF is smaller. You can use \pdfxform or you can save the symbols to an external pdf and use \pdfximage primitives. I point out that saving a tikz picture into a box and usage of this box saves computation time needed by tikz which converts svg format to pdf format of curves specification, but it doesn't solve the problems mentioned in my comments above. Ad saving Tikz computation: we need not to use TikZ at all: Load svg image to inkscape and export it to eps format. Then cut the curves specification in the eps output and copy it to the \pdfliteral parameter. TikZ is not needed, the curves have native pdf format. In summary, I see four possible approaches to add custom symbol support: modify the LatinModernMath-Regular-Private.otf, add glyph slots to private area apply svg.path solution to define the symbol put svg.path symbol in a box to use for multiple times use primitive for example \pdfliteral to declare the symbols ... My question was: what is the trade-off here? Is there exists the best-practice? Feature Method1: patch font .otf file Method2: svg.path directly Method3: svg.path with box Method4: \pdfliteral primitive Depends on External Files Yes No No No Supports All Engines only unicode engines all engines all engines all engines(?) Runtime Efficiency High Low High Generated PDF File Size Small Big Big Supports Native Character Operations, e.g. \bm Yes (if coorresponding glyph was added) No (see for example) The same as left Edit Thr rows and columns of the table above could be extended freely, for example: "using a vector image (e.g. pdf)" or "use the xsavebox package or the pdfxform-commands in l3pdfxform to store the box, then it is an xobject and only stored once in the pdf" References: How to tweak the svg-symbol baseline and size to act exactly the same as `\ell`? Is that possible to get symbol-family like \ell for "k" and "h" with computer/latin modern math style? https://tex.stackexchange.com/a/763942/322482 https://tex.stackexchange.com/a/763984/322482 https://github.com/user-attachments/files/29108768/LatinModernMath-Regular-Private.zip

  • Alternative to Computer Modern that is equally well-crafted and visually appealing? [closed]
    by Ferrous1 on June 19, 2026 at 12:07 pm

    I am currently formatting my thesis. The first draft is written in Computer Modern, and after another project that used non-LaTeX fonts through XeLaTeX, I was impressed by just how well-rounded the CM font system and especially the serif font is: Expressions written in math mode don't stand out at all, even when containing a mixture of roman and greek letters, numbers, and mathematical operators. To me, it is remarkable how every CM character perfectly harmonizes with its neighbors; its single lines are thin, which doesn't make a body of text seem fragile, but elegant and precise. However, no matter how much I re-discovered my appreciation for Computer Modern, it has one major disadvantage: I don't want to say that it's overused, but its choice in modern documents may seem rather bland or uninspired, since it is THE LaTeX default font (I have the same problem with Calibri, Aptos, and Times New Roman in Microsoft Word, but a huge difference to Word's default fonts is that CM is actually a very pretty font; it would be blasphemous to associate it with Calibri). I tried many different fonts in the LaTeX font catalogue (many seem too "bold" or not "uniform" enough to me), as well as possible approaches regarding XeLaTeX/LuaLaTeX. In many cases, math mode uses alternative fonts, which leads to very little harmony between math mode and text mode; in the rare case that the very same font is actually used for text mode and math mode and concludes a broad set of characters, pure text is quickly appealing to me, but mathematical expressions aren't. I just fail to find a font that approaches math mode and its harmony with text mode with the same perfection as CM does. Do you have any suggestions for fonts that have the same elegant, perfectionist feel as Computer Modern, but don't scream "I am a [very, very beautiful] default font!"?

  • How to plot mark together with label with TikZ instead of pgfplots?
    by Explorer on June 18, 2026 at 1:45 pm

    Claim: I don't want to use pgfplots in this post. For the sake of I have already have a bunch of non-pgfplots code as below, I don't want to switch to pgfplots solution. The code is as below: \documentclass[tikz]{standalone} \usepackage{fourier-otf} \begin{document} \begin{tikzpicture} \draw[-latex] (0,0) -- (12,0) node[right] {Team}; \draw[-latex] (0,0) -- (0,26/4) node[above] {Number}; \foreach \y in {0,5,10,15,20,25} \draw (0,{\y/4}) -- (-0.1,{\y/4}) node[left] {\y}; \foreach \y in {5,10,15,20,25} \draw[gray!30] (0,{\y/4}) -- (11.5,{\y/4}); \foreach \name[count=\n] in {A,...,K} { \draw (\n,0) -- (\n,-0.1) node[below] {\name}; } %%%%%%%%%%%%%%%%%%% % \draw[thick] plot[mark=*, mark size=2pt, mark options={fill=black}] coordinates { % (1,16/4) (2,4/4) (3,12/4) (4,6/4) (5,5/4) (6,16/4) (7,17/4) (8,8/4) (9,8/4) (10,15/4) (11,11/4) % }; % \foreach \i[count=\n] in {16,4,12,6,5,16,17,8,8,15,11} { % \node[above=3pt] at (\n,\i/4) {$\i$}; % } %%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%% \foreach \i[count=\n] in {16,4,12,6,5,16,17,8,8,15,11} { \node[fill=black,circle,inner sep=2pt,label={above:$\i$}] (tmp-\n) at (\n,{\i/4}) {}; } \draw foreach \i[count=\last] in{2,...,11} {(tmp-\last) -- (tmp-\i)}; % %%%%%%%%%%%%%%%%%%%% \end{tikzpicture} \end{document} I would prefer the syntax of plot only in tikz: \draw[thick] plot[mark=*, mark size=2pt, mark options={fill=black}] coordinates { (1,16/4) (2,4/4) (3,12/4) (4,6/4) (5,5/4) (6,16/4) (7,17/4) (8,8/4) (9,8/4) (10,15/4) (11,11/4)}; \foreach \i[count=\n] in {16,4,12,6,5,16,17,8,8,15,11} { \node[above=3pt] at (\n,\i/4) {$\i$}; } However, I didn't find some way to label when plot. Thus I have to repeat the data \foreach \i[count=\n] in {16,4,12,6,5,16,17,8,8,15,11}{...} for the second time, which is not considered as a good practice. Any suggestions on how to do this similar without pgfplots? I don't want two forloop/plots as possible.

  • Templates in ltx-talk
    by Matthias on June 18, 2026 at 1:07 pm

    I'm trying to make a ltx-talk theme in the CI of our university. E.g., the CI request a line over the footer and a logo in the head, beside a two line header text. However, I'm afraid I haven't fully grasp the concept of templates. What exactly I have to declare or to overwrite? Do I need a new template type (but this would contradict the concept of templates, since the "idea" of a footer is still there), or a new interface, or template, or instance, and if so, how I can ensure that it is used? EDIT I'm not sure whether it will help, because my question is rather conceptional, but I was asked to provide my current code. This is my theme so far: \ProvidesExplPackage{talkthemetuc}{2026-06-16}{0.3.2}{TUC ltx-talk theme} \definecolor{tuccolor_tuc}{HTML}{005F50} \definecolor{tuccolor_inf}{HTML}{4A8246} % ... lots of other color definitions ... \definecolor{tuccolor_info}{HTML}{555555} \definecolor{tuccolor_warning}{HTML}{FF9900} \definecolor{tuccolor_danger}{HTML}{FF0000} \keys_define:nn {talkthemetuc}{ fakcolor .code = { \colorlet{tuccolor}{tuccolor_#1} \colorlet{structure}{tuccolor_#1} } } \ProcessKeyOptions[talkthemetuc]\relax \geometry{ tmargin = 1.8cm, headsep = 0.8cm, } \NewDocumentCommand \tucurl { = { short-tucurl } O { {#2} } m } { \keys_set:nn { talk / metadata } {#1} \tl_gset:Nn \@tucurl {#2} } \keys_define:nn { talk / metadata } { tucurl .tl_gset:c = @tucurl , short-tucurl .tl_gset:c = @shorttucurl } % header settings \EditInstance{header}{std}{ background-color = tuccolor, color = white, height = 1.8cm } % footer \DeclareInstance{footer-element}{tucurl}{talk}{} \EditInstance{footer-element}{framenumber}{ font = \small, left-hspace = 5pt \hfill, % this is a hack } \EditInstance{footer-element}{tucurl}{ font = \small, left-hspace = 5pt \hfill, % again } \EditInstance{footer-element}{author}{ font = \small, left-hspace = 1pt ·, % ... and again } \EditInstance{footer-element}{date}{ font = \small, } \EditInstance{footer}{std}{ color = black, separator = {\hspace{1pt}}, element-order = {date,author,framenumber,tucurl}, right-hspace = 3mm, left-hspace = 3mm, } And here is a one page presentation: \DocumentMetadata{tagging=on} \documentclass{ltx-talk} \usepackage[fakcolor=inf]{talkthemetuc} \title[Example]{Example Presentation} \subtitle{Shift from beamer to ltx-talk} \author[Joe Doe]{Prof. Joe Doe} \institute[TUC]{My University} \date{\today} \tucurl{www.a-nice.url} \begin{document} %\tuctitleframe % not yet implemented \begin{frame*} \frametitle{Motivation} \begin{itemize} \item The faculty color is a theme option. \item For multiple language version, we use the langselect package \item To set URL, use \verb!\tucurl{}! \end{itemize} \end{frame*} \end{document} The image shows the elements I've asked for:

  • LaTeX old math symbols
    by Dmelv on June 17, 2026 at 4:50 pm

    Does anyone know if there are LaTeX codes for the old 17th- and 18th-century symbols for involution (powers) (kind of like an @ sign) and evolution (roots) (a sort of extended w)? Thanks. Thanks for all your assistance. According to Cajori's A History of Mathematical Notations (1928), p. 353 and pp. 213-214, the notation for involution and evolution go back to Johann Heinrich Rahn in his Teutsche Algebra (1659). However, Rahn used an Archimedean spiral to signify involution (he called it "involviren") (see https://old.maa.org/press/periodicals/convergence/math-origins-the-logical-ideas). Rahn's work was translated into English in 1668 by Thomas Brancker as *Added * and the Archimedean spiral was indeed replaced by the omicron-sigma ligature (with no explanation given; perhaps the typesetter had the ligature on hand). Ward, along with other English writers followed Brancker's notation. According to Cajori (p. 211), the sign for evolution is apparently a ligature of two epsilons.

  • How to design station signs for Taiwan Railway in TeX?
    by mathrm alpha on June 16, 2026 at 4:08 am

    Although I wrote a LaTeX-like design for Taiwanese train station signs, the resemblance is still somewhat lacking. https://upload.wikimedia.org/wikipedia/commons/thumb/f/f1/ROC_Taiwan_Railways_Administration_Logo.svg/960px-ROC_Taiwan_Railways_Administration_Logo.svg.png \documentclass{article} \usepackage{xeCJK,amssymb} \usepackage[ paperwidth=5in, paperheight=3in, margin=0.2in ]{geometry} \usepackage{graphicx} \usepackage{tikz} \pagestyle{empty} \begin{document} \begin{tikzpicture}[remember picture,overlay] \node[anchor=north west, xshift=0in, yshift=0in] at (current page.north west) { \includegraphics[width=0.5in,height=0.5in]{960px-ROC_Taiwan_Railways_Administration_Logo.svg.png} }; \end{tikzpicture} \begin{tikzpicture}[remember picture,overlay] \node[align=center, text=black, yshift=0.25in] at (current page.center) { {\fontsize{28pt}{34pt}\selectfont Miaoli} \\[0.2em] {\fontsize{32pt}{38pt}\selectfont 苗栗} }; \end{tikzpicture} \begin{tikzpicture}[remember picture,overlay] \node[ draw, line width=0.8pt, minimum size=0.9in, inner sep=0pt, align=center, font=\fontsize{12pt}{12pt}\selectfont ] at ([xshift=1.25in, yshift=0.25in]current page.center) { 苗栗縣\\ 苗栗市 }; \end{tikzpicture} \begin{tikzpicture}[remember picture,overlay] \node[anchor=south west, xshift=0.2in, yshift=0.2in] at (current page.south west) { {\Large 豐富 Fengfu} }; \node[anchor=south east, xshift=-0.2in, yshift=0.2in] at (current page.south east) { {\Large 南勢 Nanshi} }; \end{tikzpicture} \begin{tikzpicture}[remember picture,overlay] \draw[green!60!black, line width=1.2pt] ([yshift=0.65in]current page.south west) -- ([yshift=0.65in]current page.south east); \node[anchor=west, text=green!60!black] at ([yshift=0.78in]current page.south west) {\large $\blacktriangleleft$ 3.9 公里 (km)}; \node[anchor=east, text=green!60!black] at ([yshift=0.78in]current page.south east) {\large 6.6 公里 (km) $\blacktriangleright$}; \end{tikzpicture} \end{document} A better version should be: Source: http://trstour.com/miao-li.htm

  • With babel-french, fnpct and lualatex, footnotes not typeset according to the French typographic rules anymore
    by Denis Bitouzé on June 15, 2026 at 3:02 pm

    The following MCE: \documentclass[french]{article} % \usepackage{fnpct} \usepackage{babel} \pagestyle{empty} \begin{document} Foo\footnote{Bar.}\footnote{Baz.}. \end{document} compiled with current lualatex, typesets the footnotes according to the French typographic rules: Bar. Baz. But, if fnpct is loaded, that's not the case since the footnotes are typeset as follows: ¹Bar. ²Baz. At least with TeX Live 2025, we got the expected result even when fnpct was loaded. Here's what has changed since then: LuaHBTeX 1.22.0 (TL 2025) → 1.24.0 (TL 2026) keyval.sty 2022/05/29 v1.15 → 2026-05-17 v1.15 expl3.sty 2025-10-24 → 2026-05-26 l3backend-luatex.def 2025-10-09 → 2026-02-18 babel.sty 2025/10/22 v25.14 → 2026/06/14 v26.9 french.ldf 2025-08-15 v4.0e → 2026-06-06 v4.1a Do you know how to nowadays retrieve the previous, expected, behavior? Edit With current TL 2026, the result is the same with pdftex and with lualatex but, with TL 2025, the result is the expected one: not with pdflatex with lualatex.