• Where to post / read news about TeX/ LaTeX and similar?
    by topskip on January 5, 2026 at 9:52 am

    This is not a technical question about LaTeX or TeX. Imagine I have created a cool LaTeX package or a new TeX engine or something similar. Is there a good place to post this? I see special mailing lists (for example tex-live), these don't seem to fit. Where can / should I place announcements like this?

  • circuitikz: set 'rounded corners' of a 'oscopeshape' to a smaler value
    by cis on January 4, 2026 at 11:23 pm

    Due to a chat-talk with @Rmano, I asked myself wether there is a methode to set the rounded corners of a oscopeshape to 0pt or to a very small value. The rounded corners can become weird, if I set a small scale: \documentclass[margin=10pt]{standalone} \usepackage{circuitikz} \begin{document} \begin{circuitikz}[font=\footnotesize] \node[oscopeshape] (A){scale=1}; \node[oscopeshape, right of=A, scale=0.5](B) {scale=0.5}; \node[oscopeshape, right of=B, scale=0.35] {scale=0.35}; \end{circuitikz} \end{document}

  • Is there an incompatibility between the lettrine and beamer packages?
    by AndréC on January 4, 2026 at 8:24 pm

    The sentence below wraps to a new line too soon: the word "rapporteur" should not be on a new line. This problem occurs whenever the sentence is too long to fit on a single line. \documentclass[aspectratio=1610,12pt,french]{beamer} \usepackage[T1]{fontenc} \usepackage[french]{babel} \usepackage[locale=FR]{siunitx} \usepackage{lettrine} \usepackage{tikz} \usetikzlibrary{angles} \begin{document} \begin{frame}{} \lettrine[lraise=.25]{S}{ans} utiliser de rapporteur donner la mesure de chacun des angles sachant que $\widehat{xOz}=\ang{60}$. \bigskip \lettrine[lraise=.25]{S}{ans} utiliser de rapporteur donner la mesure de chacun des angles sachant que l'angle xOz mesure 60 degrés. \end{frame} \end{document} Here's what's displayed:

  • old-style numerals everywhere, including math mode
    by Phillip Helbig on January 3, 2026 at 6:30 pm

    pdflatex Problem: need old-style numerals in main text Solution: \RequirePackage[osf]{newtxtext} Works fine in main text, but not in math mode. Problem: need old-style numerals also in math mode Solution: \DeclareMathSymbol{0}{\mathord}{letters}{0}` Works fine. Problem: need raised decimal point Solution: RequirePackage{decimal} Works fine as long as all numerals with a decimal point are in math mode, which is clear must be the case. That is not really relevant for the next problem, but it means that more numerals must be in math mode (unless I want 123$.$456 and so on). Problem: In text smaller or larger than normalsize, numerals are somewhat larger and bolder. Solution: Put all numerals in math mode if text is not normalsize. Remark: I noticed the problem since my tables are footnotesize. There, it's easy to get all numbers in math mode automatically, and it's only a minor problem that the numerals look a bit larger and bolder than they should. Problem: The user should not have to worry about whether the text is normalsize. Numbers in tables can be handled automatically. However, in an actual footnote numerals will differ in appearance whether or not they are in math mode. Ditto for text in any other size larger or smaller than normalsize. Note that the problem is NOT that the numerals are not scaling in math mode with the text. They are, whether the text is larger or smaller than normalsize. But they are always slightly larger and bolder than they should be (but not as large as the next larger size, nor as bold as boldfaceseries). Remark: I would be willing to switch to LuaLaTeX if I have to change little or nothing else. (I'll presumably have to use another font-selection mechanism and another font, but presumably there is a font similar to newtxtext and newtxmath.) In particular, the raised decimal point via the decimal package should still work (or there must be an easy alternative), and of course I still want old-style numerals not just in the main text but also in math mode. %class file \ProvidesClass{test}[2026/01/03] \LoadClass[8pt,twoside]{extarticle} \RequirePackage[T1]{fontenc} \RequirePackage[osf]{newtxtext} \RequirePackage{newtxmath} \RequirePackage{extsizes} \RequirePackage{fontsize} \changefontsize[10.2pt]{8.6pt} \DeclareMathSymbol{0}{\mathord}{letters}{`0} \DeclareMathSymbol{1}{\mathord}{letters}{`1} \DeclareMathSymbol{2}{\mathord}{letters}{`2} \DeclareMathSymbol{3}{\mathord}{letters}{`3} \DeclareMathSymbol{4}{\mathord}{letters}{`4} \DeclareMathSymbol{5}{\mathord}{letters}{`5} \DeclareMathSymbol{6}{\mathord}{letters}{`6} \DeclareMathSymbol{7}{\mathord}{letters}{`7} \DeclareMathSymbol{8}{\mathord}{letters}{`8} \DeclareMathSymbol{9}{\mathord}{letters}{`9} %user file \documentclass{test} \begin{document} \noindent Now is the time. 0123.456\\ Now is the time. $0123.456$ \noindent \tiny Now is the time. 0123.456\\ Now is the time. $0123.456$ \scriptsize \noindent Now is the time. 0123.456\\ Now is the time. $0123.456$ \footnotesize \noindent Now is the time. 0123.456\\ Now is the time. $0123.456$ \small \noindent Now is the time. 0123.456\\ Now is the time. $0123.456$ \normalsize \noindent Now is the time. 0123.456\\ Now is the time. $0123.456$ \large \noindent Now is the time. 0123.456\\ Now is the time. $0123.456$ \Large \noindent Now is the time. 0123.456\\ Now is the time. $0123.456$ \LARGE \noindent Now is the time. 0123.456\\ Now is the time. $0123.456$ \huge \noindent Now is the time. 0123.456\\ Now is the time. $0123.456$ \Huge \noindent Now is the time. 0123.456\\ Now is the time. $0123.456$ \end{document} \ProvidesFile{decimal.sty}[2011/06/03 v1.1 Package`decimal.sty'] \let\peri@d\. \def\.{\ifmmode\mbox{.}\else\expandafter\peri@d\fi} \DeclareMathSymbol{\cd@t}{\mathord}{symbols}{"01} \mathcode`\.="8000 {\catcode`\.=\active% \gdef.{\cd@t} } \endinput %% %% End of file `decimal.sty'.

  • How can I make the marginnote appear on the margin side of the column they were called from in a two-column book? [closed]
    by stefaniecg on January 2, 2026 at 11:39 am

    My problem is that in a two-column book, when the marginnote is placed as the last word (or near the last word) of the left column line end, the note jumps to the right margin instead of being placed on the left margin. How can I make the marginnote appear on the margin side of the column they were called from in a two-column book? \documentclass{book} \usepackage{lipsum} \usepackage{geometry} \usepackage{marginnote} \begin{document} \newgeometry{left=20mm,right=20mm,top=20mm,bottom=20mm,twocolumn=true,marginparwidth=15mm} \edef\marginnotetextwidth{\the\textwidth} \chapter{A short story} Lorem ipsum ipsum \marginnote{ok1} OK1 dolor sit amet, consectetuer adipiscingelit. Ut purus elit, vestibulum ut, \marginnote{wrong1} WRONG1 placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. \marginnote{wrong2} WRONG2 Mauris utleo. Cras viverra metus rhoncus sem. Nulla et lectusvestibulum urna fringilla ultrices. Phasellus eu tellussit amet tortor gravida placerat. Integer sapien est,iaculis in, pretium quis, viverra ac, nunc. Praesenteget sem vel leo ultrices bibendum. \marginnote{ok2} OK2 Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollisac, nulla. Curabitur auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue eu, accumsaneleifend, sagittis quis, diam. Duis eget orci sit ametorci dignissim rutrum. \lipsum[1-3] Lorem ipsum dolor sit amet, consectetuer adipiscingelit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam \marginnote{ok3} OK3 arcu libero, nonummy eget, consectetuer id, vulputate a, magna. \marginnote{ok4} OK4 Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris utleo. Cras \marginnote{ok5} OK5 viverra metus rhoncus sem. Nulla et lectusvestibulum urna fringilla ultrices. Phasellus eu tellussit amet tortor gravida placerat. Integer sapien est,iaculis in, pretium quis, viverra ac, nunc. Praesenteget sem vel leo ultrices bibendum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollisac, nulla. Curabitur auctor semper nulla. Donec varius orci eget risus \marginnote{ok6} OK6. Duis nibh mi, congue eu, accumsaneleifend, sagittis quis, diam. Duis eget orci sit ametorci dignissim rutrum. \end{document}

  • How to get spaced dots in unicode-math
    by dedded on December 31, 2025 at 3:10 pm

    The unicode-math package re-defines ellipsis to be the ellipsis character in whatever font you're using, instead of spaced dots. This looks bad in my opinion, and violates the guidance on ellipses in every style guide I own. A solution for \ldots is provided here: variations-in-ldots. But that solution does not fix \cdots, \vdots, or \ddots. I managed to find a solution for \cdots that works in this MWE, but seems to fail in other instances that I haven't figured out a reliable way to reproduce. And I can't figure out a solution for \vdots or \ddots at all. \documentclass{article} \usepackage{unicode-math} \AtBeginDocument{ % From https://tex.stackexchange.com/questions/120627/variations-in-ldots \renewcommand\mathellipsis{\mathinner{\ldotp\ldotp\ldotp}} \renewcommand\cdots{\mathinner{\cdotp\cdotp\cdotp}} % sometimes works %\renewcommand\vdots{\mathinner{\vdotp\vdotp\vdotp}} % doesn't work %\renewcommand\ddots{\mathinner{\ddotp\ddotp\ddotp}} % doesn't work } \begin{document} $\dots, \ldots, \cdots, \vdots, \ddots$ \end{document} Found an example of where my solution for \cdots didn't work. It's when \dots is used instead of \cdots explicitly to centrally place dots: \documentclass{article} \usepackage{unicode-math} \AtBeginDocument{ \renewcommand\mathellipsis{\mathinner{\ldotp\ldotp\ldotp}} \renewcommand\cdots{\mathinner{\cdotp\cdotp\cdotp}} % sometimes works } \begin{document} $x+\dots+ y$ % Do not get spaced dots $x+\cdots+ y$ % Do get spaced dots \end{document}

  • Bizarre interaction between `microtype` package and \eqref macro
    by John Pardon on December 30, 2025 at 11:14 pm

    I would have thought that if I declare \let\stdeqref\eqref, then the \stdeqref macro and the \eqref macro would be interchangeable. But here is an example where it fails! Moreover, this failure is (somehow) caused by the microtype package?! What is going on, and how to fix it? \documentclass{article} \usepackage{microtype} \usepackage{amsmath} \let\stdeqref\eqref \begin{document} \begin{equation}\label{a} A \end{equation} This is good spacing: \eqref{a}\allowbreak\eqref{a} This is bad spacing: \stdeqref{a}\allowbreak\stdeqref{a} But the bad spacing becomes good if we remove microtype! \end{document} The reason I'm asking is that I would like to redefine the \eqref macro in a way which uses the usual \eqref macro as a subcomponent, via the usual strategy I've seen time and time again on this site: \let\stdeqref\eqref \renewcommand\eqref[1]{Something fancy containing \stdeqref{#1} etc.} but that doesn't work anymore if \let isn't behaving as expected . . .

  • Use some characters from the text font instead of the corresponding ones from mtpro2
    by ncant on December 29, 2025 at 2:10 pm

    I'm typesetting my math document in Times New Roman using XeLaTeX and the fontspec package. I'm using mtpro2 as the math font, but I've noticed that certain letters, such as u, v and w, look quite different from their TNR italic counterparts (maybe because it's advertised as a Times-compatible font). Considering I'm already using the fontspec package, I tried ditching mtpro2 entirely and using other math fonts. I consulted the LaTeX Stack Exchange master list of maths fonts and tried XITS Math, TeX Gyre Termes Math and STIX Two Math. However, these fonts lack some features that I really like about mtpro2, such as round brackets (especially for matrices) and the letter z identical to the letter z in TNR. mtpro2 is here to stay. Next, I found the 'mathastext' package, which enables alphanumeric glyphs from the text font to be used in maths environments. For example, \usepackage[basic, italic]{mathastext} replaces all the alphanumeric characters in the maths font with the corresponding characters in the text font. However, this approach led me to another issue: the spacing between letters is awful, especially the subscripted ones. Since my only issue is with the letters u, v, and w, is there a way to just replace those three and use the rest of the mtpro2 glyphs? The code I'm using for my document is really bog standard: \documentclass{memoir} % Throw an error if this is not XeLaTeX. \usepackage{ifxetex} \RequireXeTeX \usepackage[lite]{mtpro2} \usepackage[no-math]{fontspec} \setmainfont{Times New Roman} \begin{document} \end{document} Any help would be appreciated.

  • 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}

  • 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.

  • Graph of a projection function
    by Octavius on December 22, 2025 at 9:49 pm

    I have the following code, but I can’t manage to replicate the figure shown in the attached image. Could you help me with the code and provide the figure? Thank you very much. \documentclass[12pt]{article} % --- Márgenes (opcional) --- \usepackage[margin=2.2cm]{geometry} % --- Idioma y acentos --- \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[spanish]{babel} % --- Matemática y TikZ --- \usepackage{amsmath,amssymb} \usepackage{xcolor} \usepackage{tikz} \usetikzlibrary{arrows.meta,calc,3d} \pagestyle{empty} \begin{document} \begin{center} % --- TU FIGURA --- \begin{tikzpicture}[ scale=1.15, line cap=round, line join=round, x={(-0.95cm,-0.55cm)}, % Eje X: oblicuo hacia abajo-izquierda y={(1.15cm,0cm)}, % Eje Y: horizontal z={(0cm,1.15cm)} % Eje Z: vertical ] % Colores/estilos \definecolor{axisblue}{RGB}{20,90,130} \tikzset{ axis/.style={very thick, draw=axisblue, -Latex}, proj/.style={dashed, black, line width=0.8pt}, edge/.style={black, line width=0.9pt}, face/.style={draw=black, fill=gray!35, opacity=0.55}, topface/.style={draw=black, fill=gray!25, opacity=0.55}, frontface/.style={draw=black, fill=gray!45, opacity=0.55} } % Ejes \draw[axis] (0,0,0) -- (4.8,0,0) node[below left] {Eje X}; \draw[axis] (0,0,0) -- (0,5.4,0) node[right] {Eje Y}; \draw[axis] (0,0,0) -- (0,0,4.8) node[above] {Eje Z}; % Título \node[anchor=west] at (0.9,2.4,4.0) {\Large Gráfico de $g(x,y)=x$}; % -------- PRISMA 1: x in [0,1], y in [-1,1], altura 1 -------- \def\xa{0}\def\xb{1} \def\ya{-1}\def\yb{1} \def\hA{1} % Vértices base \coordinate (A1) at (\xa,\ya,0); \coordinate (B1) at (\xb,\ya,0); \coordinate (C1) at (\xb,\yb,0); \coordinate (D1) at (\xa,\yb,0); % Vértices top \coordinate (A1t) at (\xa,\ya,\hA); \coordinate (B1t) at (\xb,\ya,\hA); \coordinate (C1t) at (\xb,\yb,\hA); \coordinate (D1t) at (\xa,\yb,\hA); % Proyecciones (sombras) al plano z=0 \draw[proj] (A1) -- (A1t); \draw[proj] (B1) -- (B1t); \draw[proj] (C1) -- (C1t); \draw[proj] (D1) -- (D1t); % Caras visibles \filldraw[frontface] (A1) -- (B1) -- (B1t) -- (A1t) -- cycle; % cara "frontal" \filldraw[face] (B1) -- (C1) -- (C1t) -- (B1t) -- cycle; % cara derecha \filldraw[topface] (A1t) -- (B1t) -- (C1t) -- (D1t) -- cycle; % tapa % Aristas principales \draw[edge] (A1) -- (B1) -- (C1) -- (D1) -- cycle; \draw[edge] (A1t) -- (B1t) -- (C1t) -- (D1t) -- cycle; \draw[edge] (A1) -- (A1t); \draw[edge] (B1) -- (B1t); \draw[edge] (C1) -- (C1t); \draw[edge] (D1) -- (D1t); % Etiquetas \node at (\xa,\ya,\hA) [above left] {$1$}; \node at (0.55,0, -0.02) [below, yshift=-2pt] {$[0,1]\times(-1,1)$}; % -------- PRISMA 2: x in [2,3], y in [-1,1], altura 2 -------- \def\xc{2}\def\xd{3} \def\hB{2} \coordinate (A2) at (\xc,\ya,0); \coordinate (B2) at (\xd,\ya,0); \coordinate (C2) at (\xd,\yb,0); \coordinate (D2) at (\xc,\yb,0); \coordinate (A2t) at (\xc,\ya,\hB); \coordinate (B2t) at (\xd,\ya,\hB); \coordinate (C2t) at (\xd,\yb,\hB); \coordinate (D2t) at (\xc,\yb,\hB); % Proyecciones \draw[proj] (A2) -- (A2t); \draw[proj] (B2) -- (B2t); \draw[proj] (C2) -- (C2t); \draw[proj] (D2) -- (D2t); % Caras \filldraw[frontface] (A2) -- (B2) -- (B2t) -- (A2t) -- cycle; \filldraw[face] (B2) -- (C2) -- (C2t) -- (B2t) -- cycle; \filldraw[topface] (A2t) -- (B2t) -- (C2t) -- (D2t) -- cycle; % Aristas \draw[edge] (A2) -- (B2) -- (C2) -- (D2) -- cycle; \draw[edge] (A2t) -- (B2t) -- (C2t) -- (D2t) -- cycle; \draw[edge] (A2) -- (A2t); \draw[edge] (B2) -- (B2t); \draw[edge] (C2) -- (C2t); \draw[edge] (D2) -- (D2t); % Etiquetas \node at (\xc,\ya,\hB) [above left] {$2$}; \node at (2.55,0,-0.02) [below, yshift=-2pt] {$[2,3]\times(-1,1)$}; % Marcas -1 y 1 sobre eje Y (opcional) \node at (0,-1,0) [below] {$-1$}; \node at (0, 1,0) [below] {$1$}; \end{tikzpicture} \end{center} \end{document}

  • Booktabs cmidrule creates unwanted vertical space
    by profj on December 22, 2025 at 7:30 pm

    I am making the following table using LaTeX. One way to do it is to make a separate row for the "Top Header" header. However, this results in space below that header and the "sub headers": \documentclass{article} \usepackage{booktabs} \begin{document} \begin{table} \centering \begin{tabular}{ll rr} \toprule (1) & (2) & (3) & (4) \\ \midrule & & \multicolumn{2}{c}{Top Header} \\ \cmidrule(lr){3-4} Main & Main & \\ Header 1 & Header 2 & Sub 1 & Sub 2 \\ \midrule 0.01 & 0.25 & 0.05 & 0.00 \\ 0.02 & 0.25 & 0.11 & 0.03 \\ 0.05 & 0.25 & 0.16 & 0.09 \\ \bottomrule \end{tabular} \end{table} \end{document} An alternative way is to include "Top Header" on the same line as the top line of the "Main Headers", but the use of \cmidrule creates awkward space for the two "Main Headers": \documentclass{article} \usepackage{booktabs} \begin{document} \begin{table} \centering \begin{tabular}{ll rr} \toprule (1) & (2) & (3) & (4) \\ \midrule Main & Main & \multicolumn{2}{c}{Top Header} \\ \cmidrule(lr){3-4} Header 1 & Header 2 & Sub 1 & Sub 2 \\ \midrule 0.01 & 0.25 & 0.05 & 0.00 \\ 0.02 & 0.25 & 0.11 & 0.03 \\ 0.05 & 0.25 & 0.16 & 0.09 \\ \bottomrule \end{tabular} \end{table} \end{document} A third way, with no \cmidrule gets the vertical spacing right, but I do want a to use \cmidrule to get a line under "Top Header": \documentclass{article} \usepackage{booktabs} \begin{document} \begin{table} \centering \begin{tabular}{ll rr} \toprule (1) & (2) & (3) & (4) \\ \midrule Main & Main & \multicolumn{2}{c}{Top Header} \\ Header 1 & Header 2 & Sub 1 & Sub 2 \\ \midrule 0.01 & 0.25 & 0.05 & 0.00 \\ 0.02 & 0.25 & 0.11 & 0.03 \\ 0.05 & 0.25 & 0.16 & 0.09 \\ \bottomrule \end{tabular} \end{table} \end{document} How can I get columns 1 and 2 to behave as in the first table, but columns 3 and 4 to behave as in the second table? In other words, I'd like the headers to take up two lines, as in the second table, and I'd like to use the \cmidrule command for columns 3 and 4, but I don't want the the extra space in between "Main" and "Header 1" and "Main" and "Header 2" that we see in the second table.

  • \prime \dprime \tprime (not so much) \qprime (looks good) STIX TWO
    by Steven Thomas Hatton on December 21, 2025 at 6:20 am

    The motivation Pfaff, Johann Friedrich: Methodus generalis, aequationes differentiarum partialium, nec non aequationes differentiales vulgares, utrasque primi ordinis inter quotcunque variabiles, complete integrandi The Problem \documentclass[a4paper,10pt]{article} \usepackage{amsmath} \usepackage{mathtools} \usepackage{unicode-math} \setmainfont{STIX Two Text} \setmathfont{STIX Two Math} \newcommand{\tprime}{\char"2034} % ‴ \newcommand{\qprime}{\char"2057} % ⁗ \begin{document} Prime notation: $x^{\prime},x^{\dprime},x^{\tprime},x^{\qprime}$ \end{document} Obviously, the desired result would be for the triple prime to look like the double prime with one more prime, and to look like the quadruple prime with one less prime. This appears to be a feature of unicode since it appears in browsers, in Kate, in Emacs, (differently un-uniform) in xterm. Is there a way to produce a uniform set of prime, double prime, triple prime, quadruple prime using LuaLaTeX? Preferably with STIX Two. Post Script. I was unaware that $x'''$ would work. I learned to author LaTeX using LyX which is WYSIWYM not WYSIWYG. I rarely compiled what I was writing. My reality was what I saw in LyX.

  • Why cannot \par be printed here?
    by User23456234 on December 21, 2025 at 3:15 am

    I ask this question only out of curiousity's sake. I am not actually planning on defining a new command called \cmd because the usual \cs macro has superior syntax. (\cmd<command name, including backslash> and \cs{<command name, omitting backslash>} would print the name of a command.) When defining and testing \cmd, I found a strange error where \cmd\par would issue an error even if \cmd is \long (+m in \NewDocumentCommand). So I think that the argument should accept \par tokens. After some trial and error, I randomly changed \texttt to \ttfamily and the error went away. My question is: Why did this fix the error? I don't understand why \texttt wouldn't work correctly in this case. I provide a MWE below to demonstrate the issue: \documentclass{article} \ExplSyntaxOn \NewDocumentCommand \cmdtesti { +m } { \__module_cmd_test_i:N #1 } \cs_new_protected:Npn \__module_cmd_test_i:N #1 { \group_begin: \ttfamily \token_to_str:N #1 \@ % works correctly when #1 is \par \group_end: } \NewDocumentCommand \cmdtestii { +m } { \__module_cmd_test_ii:N #1 } \cs_new_protected:Npn \__module_cmd_test_ii:N #1 { \texttt { \token_to_str:N #1 \@ } % This gives an error if #1 is \par. } \ExplSyntaxOff \begin{document} \cmdtesti\command % no error \cmdtestii\command % no error \cmdtesti\par % no error % \cmdtestii\par % gives an error % \cmdtestii{\par} % gives an error \end{document}

  • How to create Tikz figure with surface and its shadow, as shown in image
    by Latexfan on December 19, 2025 at 7:17 pm

    I wish to make this figure with Tikz. I have tried but I can't make as in figure. Can you please assist me? \documentclass[tikz,border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{arrows.meta,3d,calc} \begin{document} \begin{tikzpicture}[ x={(1cm,0cm)}, y={(0.6cm,0.4cm)}, z={(0cm,1cm)}, >=Stealth ] % Axes \draw[->] (0,0,0) -- (4,0,0) node[below left] {$x$}; \draw[->] (0,0,0) -- (0,4,0) node[below right] {$y$}; \draw[->] (0,0,0) -- (0,0,4) node[left] {$z$}; % Origin \node at (0,0,0) [below left] {$O$}; % Bottom region D \fill[blue!15,opacity=0.6] plot[smooth cycle,variable=\t,domain=0:360] ({2+1.6*cos(\t)}, {2+1.1*sin(\t)}, 0); \node at (2,2,0) [below] {$D$}; % Boundary C' \draw[blue!70,thick,->] plot[smooth cycle,variable=\t,domain=0:360] ({2+1.6*cos(\t)}, {2+1.1*sin(\t)}, 0); \node at (3.8,2,0) {$C'$}; % Vertical dashed lines \foreach \t in {30,110,200,290} { \draw[dashed] ({2+1.6*cos(\t)}, {2+1.1*sin(\t)}, 0) -- ({2+1.6*cos(\t)}, {2+1.1*sin(\t)}, 2.3); } % Surface S : z = f(x,y) \fill[blue!40,opacity=0.7] plot[smooth cycle,variable=\t,domain=0:360] ({2+1.6*cos(\t)}, {2+1.1*sin(\t)}, {2+0.3*sin(\t)}); \node at (1.3,3.2,2.4) {$S$}; \node at (3.2,3.4,2.6) {$z=f(x,y)$}; % Boundary C \draw[blue!80,thick,->] plot[smooth cycle,variable=\t,domain=0:360] ({2+1.6*cos(\t)}, {2+1.1*sin(\t)}, {2+0.3*sin(\t)}); \node at (3.7,2.3,2.2) {$C$}; % Normal vector N \draw[red,very thick,->] (2,2,2.2) -- (2,2,3.6) node[above] {$\mathbf{N}$}; \end{tikzpicture} \end{document} ```

  • Custom 3D line plot in plain tikz and/or luadraw
    by Dr. Manuel Kuehner on December 19, 2025 at 12:30 pm

    Disclaimer This question is a bit of "do it for me" but there is a histrory behind it, see this question. User Jasper offered me a solution without using pgfplots. I plan to add a bounty as soon as it is possible. Question I want to create diagram with a 3D line plots. The main feature is to have several x axes that share the same y axis. Each x axis has its own F (or z) axis. There are only data points on specific y values (in the example below at +30, +15, 0, -15). In addition, the y axis is reversed (+ and - direction reversed). I need a grid in each F-x plane. Important ist also, that all F axes share the same min and max. Each axis should have a label and the diagram should have a title. The data is given in separate csv files, see example below. The MWE contains the data and plots the data (for testing) using pgfplots. Goal: The goal is to have a plain tikz solution and maybe in addition, a solution based on luadraw or lua-tikz3dtools respectively. I am looking for a easy-to-use custom interface for my plot task. If the result looks as it is created with pgfplots, then I am happy. S!#i, I forgot a key feature (not shown in the hand drawing) In addition to the x-F plots described above, there is ONE plot in the y-F plane (= from left to right). This works, because all F axes share the same min and max. \begin{filecontents*}{y_F_data.csv} y,F -15,20 -14,8 30,-4 \end{filecontents*} \documentclass{article} \usepackage{pgfplots} % ------------------------------- \begin{filecontents*}{x_zero.csv} x,F -30,12 -29,8 30,-4 \end{filecontents*} \begin{filecontents*}{x_neg_one.csv} x,F -30,12 -29,8 30,-4 \end{filecontents*} \begin{filecontents*}{x_pos_one.csv} x,F -30,12 -29,8 30,-4 \end{filecontents*} \begin{filecontents*}{x_pos_two.csv} x,F -30,12 -29,8 30,-4 \end{filecontents*} % ------------------------------- \begin{document} \begin{tikzpicture} \begin{axis}[ axis lines = center, title = {$x_0$}, xlabel = {$x_0$}, ylabel = {$F_0$}, xmin = -30, xmax = 30, ymin = -100, ymax = 100, ] \addplot table [x=x, y=F, col sep = comma] {x_zero.csv}; \end{axis} \end{tikzpicture} \begin{tikzpicture} \begin{axis}[ axis lines = center, title = {$x_{-1}$}, xlabel = {$x_{-1}$}, ylabel = {$F_{-1}$}, xmin = -30, xmax = 30, ymin = -100, ymax = 100, ] \addplot table [x=x, y=F, col sep = comma] {x_neg_one.csv}; \end{axis} \end{tikzpicture} \begin{tikzpicture} \begin{axis}[ axis lines = center, title = {$x_{1}$}, xlabel = {$x_{1}$}, ylabel = {$F_{1}$}, xmin = -30, xmax = 30, ymin = -100, ymax = 100, ] \addplot table [x=x, y=F, col sep = comma] {x_pos_one.csv}; \end{axis} \end{tikzpicture} \begin{tikzpicture} \begin{axis}[ axis lines = center, title = {$x_{2}$}, xlabel = {$x_{2}$}, ylabel = {$F_{2}$}, xmin = -30, xmax = 30, ymin = -100, ymax = 100, ] \addplot table [x=x, y=F, col sep = comma] {x_pos_two.csv}; \end{axis} \end{tikzpicture} \end{document}

  • Combine numbers from custom commands into a range
    by taiwan12 on December 18, 2025 at 11:40 pm

    I’m defining datas in LaTeX with a custom command that stores both a label and a number: \documentclass{article} \usepackage{parskip} \newcommand{\data}[3]{% \expandafter\newcommand\csname #1\endcsname[1][]{#2##1}% \expandafter\newcommand\csname #1Number\endcsname{#3}% } \newcommand{\getnumber}[1]{% \mbox{\textbf{(\csname #1Number\endcsname)}}% } \begin{document} \data{tempA}{aaa}{1} \data{tempB}{bbb}{2} \data{tempC}{ccc}{3} \data{tempD}{ddd}{4} \data{tempE}{eee}{5} \data{tempF}{fff}{6} Data: \tempA \newline Number: \getnumber{tempA} \end{document} For a single compound, \getnumber{tempA} outputs (1). Now I want to create a command that takes a list of compound names and outputs a range summary of their numbers. For example: \getnumberrange{tempA,tempB,tempC,tempF} % should produce (1-3,6) I’m not sure how to iterate over a list of command names, retrieve their numbers, and compress consecutive numbers into ranges. How can I implement this in LaTeX?

  • How to use \setcapwidth with \maxof from calc in TeXLive 2025?
    by mforbes on December 18, 2025 at 7:51 am

    As of TexLive 2025, I started running into an error with the following MnWE: \documentclass{scrartcl} \usepackage{calc} \setcapwidth{\maxof{\textwidth}{0.8\textwidth}} \begin{document} This fails with texlive 2025. \end{document} /Volumes/Data/apps/texlive/2025/texmf-dist/tex/latex/koma-script/typearea.sty) ) (/Volumes/Data/apps/texlive/2025/texmf-dist/tex/latex/tools/calc.sty) ! Missing number, treated as zero. <to be read again> \maxof l.5 ...capwidth{\maxof{\textwidth}{0.8\textwidth}} This seems to be related to a switch to LaTeX3-style command definitions. A workaround is to precompute the value before passing it to \setcapwidth. Is there a better solutions? \documentclass{scrartcl} \usepackage{calc} \setlength{\dimen255}{\maxof{\textwidth}{0.8\textwidth}} \setcapwidth{\dimen255} \begin{document} This works. \end{document}

  • Circuitikz full list of `\ctikzset` options
    by aulven on December 17, 2025 at 3:56 pm

    Where can I find the full list of options for \ctikzset? I couldn't find something like this in the documentation from CTAN, or in the Github repository, and for the life of me I cannot figure a consistent pattern between examples that are in the documentation. For instance if I pick up a line from examples and change it from bipoles to tripoles it sometimes works, sometimes throws and error and sometimes does nothing whatsoever. Or, otherwise, how do people figure out what the syntax for what they want to do is? As an example, the last problem I encountered that lead me to write this is adjusting the font size of transistors. Conveniently the document has the section titled Labels and Annotations under Labels, Voltages and Currents. Here it gives the example for bipoles, \ctikzset{bipole label style/.style={font=\tiny}} Which works as it should, however, it concerns bipoles only. My attempt of modifying it to: \ctikzset{tripole label style/.style={font=\tiny}} does nothing. neither does my other extrapolation attemps like quadpole, multipole, tripole/transistors, multipole/transistors, tripoles/.style, tripoles/transistors/nigfete/.style and so on. None of these do nothing and doesn't give an error either, unlike some other attemps which did give errors at least. At this point, I don't know if I'm missing the correct syntax or whether this feature exists in the first place. This happens to be my last frustration (that I'm yet to solve). However countless times in the past I have searched for similar modifications, it always boils down to finding the magic words for ctikzset and I don't know where to look. MRE \documentclass[8pt, a4paper]{article} \usepackage[american]{circuitikz} \begin{document} \begin{figure*} \begin{circuitikz} \ctikzset{bipole label style/.style={font=\tiny}} %<- From the doc. \ctikzset{tripole label style/.style={font=\tiny}} %<- My guess \draw (0,0) to[R, l=$R$] (2,0); \draw (0,2) node[nigfete]{$Q$}; \end{circuitikz} \end{figure*} \end{document}

  • unicode-math or lua-unicode-math?
    by Svend Tveskæg on December 16, 2025 at 5:02 pm

    I just noticed the lua-unicode-math package. Question I compile all my .tex documents using lualatex and therefore my question is as follows: What are the main differences between lua-unicode-math and unicode-math and when should I use which package?

  • Defining an option key for TColorbox
    by Jesco on December 16, 2025 at 10:41 am

    I would like to add an option key "points" to my custom tcolorbox aufgabe (so you use points=n, where n is a number, that acts as if I had added the option after title app={\hfill n Punkt(e}, where Punkt(e) depends on n (so without an e for 1). Concretely: My current aufgabe definition \renewcommand{\theaufgabe}{\arabic{aufgabe}} \refstepcounter{aufgabe} \newtcolorbox{aufgabe}[1][]{% before title={Aufgabe \theaufgabe \ (}, after title={)}, coltitle=black, colback=\typecolor!10, colframe=\typecolor, fonttitle=\bfseries, before upper={\refstepcounter{aufgabe}}, segmentation style={draw=\typecolor, line width=2pt}, #1 } Intended usage \begin{aufgabe}[title=some title, points=6] some task \end{aufgabe} should act like \begin{aufgabe}[title=some title, after title app={\hfill 6 Punkte}] some task \end{aufgabe} Edit: Fair point by @samcarter. This is a minimum example of what I would like: \documentclass[a4paper, 12pt]{article} \usepackage[many]{tcolorbox} \newcounter{aufgabe}[section] \renewcommand{\theaufgabe}{\arabic{aufgabe}} \refstepcounter{aufgabe} \newtcolorbox{aufgabe}[1][]{% before title={Aufgabe \theaufgabe \ (}, after title={)}, coltitle=black, fonttitle=\bfseries, before upper={\refstepcounter{aufgabe}}, #1 } \begin{document} \begin{aufgabe}[title=title, after title app={\hfill 6 Punkte}] some task \end{aufgabe} \end{document}

  • Evolution of “Computer Modern” or who lowered the dot on the “i”?
    by Alain Stalder on December 14, 2025 at 12:27 pm

    In the process of hopefully migrating some documents from pdflatex that use Computer Modern fonts (mostly Sans) to LuaLaTeX, I am looking at the different variants that have evolved since the original METAFONT Computer Modern family. The good news for me is that the differences seem to be smaller than it first appeared, both regarding glyphs and metrics. The most prominent difference in Latin Modern with “plain English characters” is that the dot on the lowercase letter “i” is a bit lower, at least in the Sans variants (except in ligatures like “fi” where the height of the dot matches the too of the “f”). Was that a conscious choice in Latin Modern? Or maybe already in an earlier variant which I could not find, yet? (Computer Modern Unicode and CM-Super seem to have the original height of the dot on the “i”.) CTAN does list various Computer Modern variants and there is also some info in its external references, but I was wondering if there is maybe additional historical info about the evolution of “Computer Modern” variants, maybe a TUGboat article about that or maybe that someone who was already somewhat involved at the time would still remember? Below some examples with sources and — to make sure — the font that was actually used from the console log, and some differences noticed in the example text. pdflatex / Computer Modern (the reference; same result with \usepackage{amsfonts}, as expected): % !TEX TS-program = pdflatex \documentclass{article} \renewcommand\familydefault{\sfdefault} \begin{document} Liegenstraße 95 in “larger” Wil… % </usr/local/texlive/2025/texmf-dist/fonts/type1/public/amsfonts/cm/cmss10.pfb> \end{document} pdflatex / CM-Super: % !TEX TS-program = pdflatex \documentclass{article} \usepackage[T1]{fontenc} \renewcommand\familydefault{\sfdefault} \begin{document} Liegenstraße 95 in “larger” Wil… % </usr/local/texlive/2025/texmf-dist/fonts/type1/public/cm-super/sfss1000.pfb> \end{document} (Different “ß” and different spacing before “, rest same incl. “i”.) LuaLaTeX / Computer Modern Unicode: % !TEX TS-program = lualatex \documentclass{article} \usepackage{fontspec} \setmainfont{CMU Sans Serif} \begin{document} Liegenstraße 95 in “larger” Wil… % </usr/local/texlive/2025/texmf-dist/fonts/opentype/public/cm-unicode/cmunss.otf> \end{document} (Same alternative “ß” as CM-Super, different space after ”, denser ellipsis, rest same incl. “i”) LuaLaTeX / AMS Type 1 converted to OpenType (using FontLab 8 on Mac): % !TEX TS-program = lualatex \documentclass{article} \usepackage{fontspec} \setmainfont{ams-cmss10.ttf} \begin{document} % emulated ellipsis… Liegenstraße 95 in “larger” Wil.\,.\,. % <./ams-cmss10.ttf> \end{document} (Almost identical to Computer Modern (as expected), except line overall a bit denser and had to emulate the ellipsis, same “i”.) LuaLaTeX / Latin Modern: % !TEX TS-program = lualatex \documentclass{article} \renewcommand\familydefault{\sfdefault} \begin{document} Liegenstraße 95 in “larger” Wil… % </usr/local/texlive/2025/texmf-dist/fonts/opentype/public/lm/lmsans10-regular.otf> \end{document} Here the dot on the “i” is a bit lower. Also, the “a” has the same metric but is shifted a bit to the right. Also, more space inside “...”, and also denser ellipsis. Diff between LM and AMS OpenType (would be practically the same to pdflatex / Computer Modern, but wanted to stick to OpenType, into the future): The dot on the “i” is lowered and the “a” is shifted, otherwise letters just shifted a tiny little bit, but maybe that would be just a rendering artefact/limitation, at some point becomes the princess and the pea… But overall, seems like an “AMS to OpenType x Latin Modern” (as new font or maybe a virtual font on-the-fly) could already come close to the original pdflatex / Computer Modern look and feel for texts that could already be typset with the limitations regarding language support of pdflatex / Computer Modern. Added same day: Here’s a diff between LuaLaTeX / Latin Modern and pdflatex / Computer Modern, almost only the dot on the ”i” and the shift of the “a” are different, the other letters shifted in the diff above was just that was more condensed with LuaLaTeX / ”AMS OpenType” as I had mentioned but forgot about again. Added 2025-12-16: Examples with “New Computer Modern” also in the heavier book style. Note that, at least so far, I can only see 8pt and 10pt versions of that font in TeXLive 2025, i.e. at different sizes results would differ more from Computer Modern (and also from Latin Modern, for example), which would so far be a no-go for me because I have lots of 9pt stuff in my documents. Also, slanted text seems to be very heavily slanted. LuaLaTex / New Computer Modern: % !TEX TS-program = lualatex \documentclass{article} \usepackage[sansdefault]{fontsetup} \begin{document} Liegenstraße 95 in “larger” Wil… % </usr/local/texlive/2025/texmf-dist/fonts/opentype/public/newcomputermodern/NewCMSans10-Regular.otf> \end{document} (Output identical to Latin Modern, except that the upper horizontal line of the uppercase letter “L” is completely horizontal; I guess the choice in Computer Modern and Latin Modern for 10pt might have been to make it look horizontal at 10pt and maybe with New Conmputer Modern, since that is also the largest size font, it was made horizontal to look horizontal at larger point sizes?) LuaLaTex / New Computer Modern Book: % !TEX TS-program = lualatex \documentclass{article} \usepackage[default]{fontsetup} \renewcommand\familydefault{\sfdefault} \begin{document} Liegenstraße 95 in “larger” Wil… % </usr/local/texlive/2025/texmf-dist/fonts/opentype/public/newcomputermodern/NewCMSans10-Book.otf> \end{document} (As expected a bit heavier (with a nice amount to me), but otherwise the same.) Added 2025-12-17: pdflatex / Computer Modern with simulated bleeding via \pdfpkmode (modes.mf): % !TEX TS-program = pdflatex \documentclass{article} \pdfpkresolution=1200 \pdfpkmode={lexmarkr} \pdfmapfile{} \renewcommand\familydefault{\sfdefault} \begin{document} Liegenstraße 95 in “larger” Wil… % </Users/alain/Library/texlive/2025/texmf-var/fonts/pk/lexmarkr/public/cm/cmss10.1200pk> \end{document} (A bit thicker but otherwise the same as pdflatex/CM and if you zoom in a bit you can see that the glyphs are rasterized. Uses a Metafont-generated *.pk font, packaged *.tfm font, TeX font metric; not sure in which form exactly that goes into the pdf.) Added 2025-12-18: Just one more addition related to my comments regarding FakeBold. I now understand why with OpenType/FakeBold I had to also reduce the Scale of the font to get a similar effect, namely because FakeBold grows the font in all directions, while with METAFONT/modes.mf that is more subtle and apparently could be tweaked in more than one way… Diff CM with \pdfpkmode={lexmarkr} to CM: Diff OpenType AMS CM with FakeBold=1 to OpenType AMS CM:

  • TikZ, \x^2 != \x * \x?
    by ana on December 13, 2025 at 8:04 pm

    Why do the two \draw commands produce two different plots? Shouldn't they both produce a parabola? How do you use the ^2 notation to plot a parabola? \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[domain=-1:1] plot (\x, \x^2); \draw[domain=-1:1] plot (\x, \x * \x); \end{tikzpicture} \end{document}

  • Graphing the function y=x^2sin(1/x)
    by azetina on December 13, 2025 at 6:50 pm

    Consider the following MWE: \documentclass{article} \usepackage{amsmath} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} \begin{axis}[ axis equal, axis lines = middle, xlabel = $x$, ylabel = $y$, xmin = -0.4, xmax = 0.4, ymin = -0.4, ymax = 0.4, grid = both, grid style = {line width=.1pt, draw=gray!10}, major grid style = {line width=.2pt, draw=gray!50}, samples = 200, legend pos = north west, width = 10cm, height = 8cm ] % Plot the curve \addplot[domain=-0.4:0.4, thick, blue] {x^2*sin(1/x)}; \addlegendentry{$y = x^2\sin(1/x)$} % Tangent line at (1, -2) \addplot[domain=-0.5:0.5, thick, red] {x^2}; \addplot[domain=-0.5:0.5, thick, red] {-x^2}; \addlegendentry{$y=\pm x^2$} \end{axis} \end{tikzpicture} \end{document} Currently, I am getting: But I would like the curve to show like in the following image: What am I missing?

  • Strange spacing on a matrix
    by Knudsen on December 13, 2025 at 6:46 pm

    Why would the vertical spacing between the 2nd and 3rd lines in this matrix be larger than the others? \documentclass{report} \usepackage{amsmath} \begin{document} \[ \begin{pmatrix} 1 & 0 & \cdots & 0 \\ 0 & 1 & \cdots & 0 \\ \vdots&\vdots&\ddots&\vdots\\ 0 & 0 & \cdots & 1 \end{pmatrix} \] \end{document}

  • How to draw a pattern within a path that features a visible decorated path and also invisible paths? OR How to visualize the ground?
    by Simon on December 12, 2025 at 6:13 pm

    How does the following MWE need to be modified to only visualize the decorated path but not the remaining path and draw the top right-hand corner not rounded? \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \usetikzlibrary{patterns} \begin{document} \begin{tikzpicture} \path[draw,pattern=north west lines] decorate[decoration={random steps,segment length=1,amplitude=.2},rounded corners=.2] {(-1,0) -- (0,0) -- (1,0)} -- (1,-.25) -- (-1,-.25) -- cycle; \end{tikzpicture} \end{document} Thanks in advance!

  • What is the minimum set of commands to compile a plain tex file with UTF-8 Chinese characters to PDF?
    by merlin2011 on December 12, 2025 at 4:42 am

    Consider the following minimum Tex example with Chinese characters: 你好 \bye I tried to compile it the traditional way, and it produces an blank document: tex Hello.tex dvipdf Hello.dvi I tried to compile it with xetex and get an error: sudo apt install texlive-xetex xetex Hello.tex This is XeTeX, Version 3.141592653-2.6-0.999995 (TeX Live 2023/Debian) (preloaded format=xetex) restricted \write18 enabled. kpathsea: Running mktexfmt xetex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: /usr/share/texmf/web2c/fmtutil.cnf mktexfmt: /usr/share/texlive/texmf-dist/web2c/fmtutil.cnf mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /home/hq6/.texlive2023/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /home/hq6/.texlive2023/texmf-var/web2c mktexfmt [INFO]: Did not find entry for byfmt=xetex skipped mktexfmt [INFO]: not selected formats: 8 mktexfmt [INFO]: total formats: 8 mktexfmt [INFO]: exiting with status 0 I can't find the format file `xetex.fmt'! I tried running the command suggested in a different question and it completed successfully, but I still get the same error: sudo fmtutil-sys --all ... ... 50 preloaded fonts No pages of output. Transcript written on dviluatex.log. fmtutil [INFO]: log file copied to: /var/lib/texmf/web2c/luatex/dviluatex.log fmtutil [INFO]: /var/lib/texmf/web2c/luatex/dviluatex.fmt installed. fmtutil [INFO]: successfully rebuilt formats: 8 fmtutil [INFO]: total formats: 8 fmtutil [INFO]: exiting with status 0 How might I fix this error and compile the UTF-8 to PDF?

  • Maximum, minimum, saddle and inflection points
    by Dimitrios ANAGNOSTOU on December 11, 2025 at 5:27 pm

    I want to illustrate the different cases that can arise in a typical calculus course of functions of one variable. After searching a lot, I found a relevant question here. So, I am using the following code to plot a function for illustrating the various cases (local extremums, inflection and saddle points) along with the respective tangents. \documentclass[tikz,border=5pt]{standalone} \usepackage{pgfplots} \usetikzlibrary {intersections} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} \begin{axis}[ width=12cm, height=7cm, axis x line=middle, axis y line=middle, xlabel={$x$}, ylabel={$f(x)$}, xmin=-0.08, xmax=1.3, ymin=-0.008, ymax=0.01, samples=300, domain=-0.08:1.3, clip=false, xtick=\empty, ytick=\empty, xlabel style={at={(ticklabel cs:1)}, anchor=west}, ylabel style={at={(ticklabel cs:1)}, anchor=south} ] % === Polynomial (The function) === \addplot[very thick, blue, name path=poly] {(1/16)*x - (3/8)*x^2 + (37/48)*x^3 - (21/32)*x^4 + (1/5)*x^5}; % ======================================================= % === Critical points (f'(x)=0) and Horizontal Tangents === % Points: (0.125, 0.0033045), (0.5, -0.0009115), (1, 0.0020833) \addplot[only marks, mark=*, blue] coordinates { (0.125,0.0033045) (0.5,-0.0009115) (1,0.0020833) }; % Tangent segment 1 (Horizontal) \addplot[red, very thick, domain=-0.075:0.325, samples=2] {0.0033045}; % Tangent segment 2 (Horizontal) \addplot[red, very thick, domain=0.3:0.7, samples=2] { -0.0009115}; % Tangent segment 3 (Horizontal) \addplot[red, very thick, domain=0.8:1.2, samples=2] {0.0020833}; % ======================================================= % === Inflection points (f''(x)=0) and General Tangents === % Points: (0.2673, 0.0015571), (0.7014, 0.0004592) % Slopes: m1 ~ -0.019, m2 ~ 0.0104 \addplot[only marks, mark=*, orange] coordinates { (0.2673056,0.0015571) (0.7014444,0.0004592) }; % Tangent segment 4 (Inflection 1) \addplot[green, very thick, domain=0.0673:0.4673, samples=2] {-0.019*(x-0.2673056)+0.0015571}; % Tangent segment 5 (Inflection 2) \addplot[green, very thick, domain=0.5014:0.9014, samples=2] {0.0104*(x-0.7014444)+0.0004592}; % Origin label \node[anchor=north west] at (axis cs:0,0) {\small $O$}; \end{axis} \end{tikzpicture} \end{document} But this require a lot of manual calculations on my own. Is there a way or package to accelerate such calculus visualisations? A big thank you!

  • pin to some point on an arrow
    by Zarko on December 10, 2025 at 1:52 pm

    Please consider the following MWE: \documentclass[tikz,border=3mm]{standalone} %---------------------------------------------------------------% \begin{document} %---------------------------------------------------------------% \begin{tikzpicture}[every pin edge/.style={<-, red}] \draw[->] (0, 1) -- (3,1); \draw[->] (0,0) -- (3,0) coordinate [pos=0.25, pin=210:X] (aux); \end{tikzpicture} %---------------------------------------------------------------% \end{document} Why the arrow head at the second line is moved to the point of pin position?

  • How to avoid `\phantom{}` and empty groups in this array, while maintaining the same alignment?
    by tmc on December 8, 2025 at 2:44 pm

    I'm working on creating a specific two-column table in \LaTeX. The second column, $f(n)$, contains expressions that are linear combinations of $\alpha$, $\beta$, and $\gamma$, but not all terms are present in every row. My goal is to achieve a consistent column alignment for the coefficients of $\alpha$, $\beta$, and $\gamma$ across all rows, with consistent spacing around the $+$ signs. The terms $\alpha$, $\beta$, $\gamma$ themselves should also align. To achieve this alignment, I currently rely heavily on \phantom{} and empty {} groups, which feels overly complicated. I suspect there is a much cleaner, more idiomatic approach that I am missing. Since I'm not very proficient, could you please critique my current approach and suggest a more robust method to achieve this specific alignment? Here is my current code snippet: \documentclass{article} \begin{document} \[ \begin{array}{@{}c|c@{}} n & f(n) \\ \hline 1 & \phantom{0}\alpha\phantom{{}+0\beta+0\gamma} \\ \hline 2 & 2\alpha+\phantom{0}\beta\phantom{{}+0\gamma} \\ 3 & 2\alpha\phantom{{}+0\beta}+\phantom{0}\gamma \\ \hline 4 & 4\alpha+3\beta\phantom{{}+0\gamma} \\ 5 & 4\alpha+2\beta+\phantom{0}\gamma \\ 6 & 4\alpha+\phantom{0}\beta+2\gamma \\ 7 & 4\alpha\phantom{{}+0\beta}+3\gamma \\ \hline 8 & 8\alpha+7\beta\phantom{{}+0\gamma} \\ 9 & 8\alpha+6\beta+\phantom{0}\gamma \end{array} \] \end{document}