• How to ensure a text starts exactly at the left margin of the text area?
    by Denis Bitouzé on November 25, 2025 at 11:28 am

    In the following MCE, there is a small space between the left margin of the text area and the “F” of “Foo”. Hence, the “F” and the red horizontal rule below this text aren't vertically aligned. How to make them vertically aligned? \documentclass{article} \usepackage{xcolor} \usepackage[showframe,paperwidth=5cm,paperheight=3cm,noheadfoot,nomarginpar]{geometry} \setlength{\parindent}{0cm} \pagestyle{empty} \begin{document} \sffamily% Foo\par \color{red}\hrulefill \end{document}

  • How can I draw grid of cylinders?
    by minthao_2011 on November 25, 2025 at 9:02 am

    I used Mathematica and tried grid of cylinder I don’t know how to draw with other tools. How can I draw it?

  • Implementing certain unicode-math symbols
    by userא0 on November 25, 2025 at 8:31 am

    I came across the following extensive list of symbols defined by unicode-math and am struggling to implement them in my document. Attempting to to use certain commands mentioned in the linked list I rad to the following problem; I am interested in implementing the \mup commands. Trying to use any of the \mup... commands (mentioned in section 13.1.1 in the linked document) does not change anything. I mean that \alpha and \mupalpha looks the same after compiling the file (and the same is true for all other greek letters). Another thing might be worth mentioning is that, writing any individual \mup command literally compiles as text mupalpha and not \alpha. here is a minimal working example; % Preview source code %% LyX 2.4.1 created this file. For more info, see https://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[english,hebrew,no-math]{extarticle} \usepackage{amsmath} \usepackage{amsthm} \usepackage{fontspec} \setmainfont[Mapping=tex-text]{Hadasim CLM} \setsansfont[Mapping=tex-text]{Palatino} \setmonofont{Palatino} \usepackage[a4paper]{geometry} \geometry{verbose,tmargin=3cm,bmargin=3cm,lmargin=2cm,rmargin=2cm,headheight=2cm,headsep=2cm} \usepackage{setspace} \doublespacing \usepackage[pdfusetitle, bookmarks=true,bookmarksnumbered=false,bookmarksopen=false, breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=false] {hyperref} \makeatletter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands. \numberwithin{equation}{section} \newlength{\lyxlabelwidth} % auxiliary length \@ifundefined{date}{}{\date{}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands. \usepackage{faktor} \usepackage{graphicx, nicefrac} \usepackage[all]{xy} \usepackage{fancyhdr} \usepackage{xcolor} \pagestyle{fancy} \usepackage{bbm} \usepackage{xfrac} \usepackage[dvipsnames]{xcolor} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{unicode-math} \setmathfont{texgyrepagella-math.otf}[math-style=french, Scale=1] \setmathfont{STIXTwoMath-Regular.otf}[range={cal, bfcal}, StylisticSet=0] \usepackage[scr=rsfs]{mathalfa} \makeatother \usepackage{polyglossia} \setdefaultlanguage{hebrew} \setotherlanguage{english} \begin{document} $\mupalpha$ \end{document} Thanks a lot!

  • Does LaTeX support abstract class like Java and C sharp?
    by YCH817 on November 25, 2025 at 6:16 am

    I find out that Till Tantau's pgf supports OOP programming . But does it support abstract classes ? Here is a small example : \pgfooclass{mathobj}{ \attribute form LaTeX ; \attribute form Verb ; \method mathobj(#1) {% \pgfooset{form LaTeX}{\ensuremath{#1}}% } \method print LaTeX() {% \pgfoovalueof{form LaTeX}% } } \pgfoonew\mymathobj=new mathobj(x^2) \mymathobj.print LaTeX() I wish the mathobj class can be the abstract class or interface in Java , and other classes can inherit / implement it .

  • How to create two bottom-aligned side-by-side figures in llncs?
    by user20478285 on November 25, 2025 at 2:13 am

    I want to create two side-by-side subfigures that are bottom aligned. With subcaption, I would do it this way: \documentclass{llncs} \usepackage{graphicx} \usepackage{subcaption} \begin{document} \begin{figure} \centering \begin{subfigure}[b]{0.4\textwidth} \centering \includegraphics[width=4cm, angle=90, origin=c]{example-image-a}% \caption{Foo.} \label{fig:foo} \end{subfigure}% \hfil \begin{subfigure}[b]{0.4\textwidth} \centering \includegraphics[width=4cm]{example-image-b}% \caption{Bar.} \label{fig:bar} \end{subfigure} \caption{Foo (\ref{fig:foo}) and Bar (\ref{fig:bar}) using \texttt{subcaption}.} \label{fig:foobar} \end{figure} \end{document} And obtain this result: The figures are properly aligned, but by loading subcaption it reset llncs's default caption setup. It seems the subcaption package cannot be used with llncs (Package caption Warning: Unknown document class (or package), standard defaults will be used. See the caption package documentation for explanation.) and changes the default caption format. As an alternative I tried subfig, and what I have now is \documentclass{llncs} \usepackage{graphicx} \usepackage[caption=false]{subfig} \begin{document} \begin{figure} \centering \subfloat[% Foo.% \label{fig:foo}% ]{% \centering \includegraphics[width=4cm, angle=90, origin=c]{example-image-a}% } \hfil \subfloat[% Bar.% \label{fig:bar}% ]{% \centering \includegraphics[width=4cm]{example-image-b}% } \caption{Foo (\ref{fig:foo}) and Bar (\ref{fig:bar}) using \texttt{subfig}.} \label{fig:foobar} \end{figure} \end{document} where the captions look fine (style-wise) but the result looks unpleasing as the two figures are not bottom-aligned: I am not limited to the subfig package; if there are other packages that allow me to create side-by-side figures with individual labels and captions I'd happily give them a try, as long as they can be used with llncs (i.e. do not modify its default caption setup). Any help is much appreciated!

  • Why does putting the alignment tab after relation operators in the align environment cause the spacing after the operator to be too thin?
    by palapapa on November 25, 2025 at 12:53 am

    For example: \begin{align} a =& b \end{align} causes there to be too little space after the equal sign, but if I put the alignment tab before the equal sign, this doesn't happen. Why? Does the align environment magically put an empty atom after alignment tabs so that the equal sign gets spaced correctly?

  • Length adjusted mapsfrom with text above it
    by Rabeeb Ibrat on November 25, 2025 at 12:25 am

    How do I get a length adjusted \mapsfrom arrow with text over it similar to \xmapsto? I have tried the following: \overset{fghij}{\mapsfrom}, and \overset{fghij}{\longmapsfrom} but these don't adjust the length of the arrow flexibly. Instead I get the following: Is there a way to do this from the existing packages?

  • pdfLaTeX puts invalid characters into generated PDF files
    by blackcat on November 24, 2025 at 11:15 pm

    I have found that pdfLaTeX replaces two input Cyrillic letters with their Latin counterparts breaking full text search. I'm talking about і and І (U+0456 and U+0406), they are replaced with i and I (U+0069 and U+0049). I tested two projects: one old with cp1251 as an input encoding and a font encoding (T2A) set by babel, and another one with utf-8 as input and OT2,TA2 as fontenc. It doesn't matter whether cmap package is used. My question is what package is to blame and report a bug against: babel, fontenc or something else? Just in case: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[belarusian]{babel} \begin{document} Latin: iI Cyrillic: іІ \end{document} LuaLaTeX generates correct PDF, it only needs \usepackage{fontspec}\setmainfont{Noto Serif} added to use a font with Cyrillic glyphs.

  • How can I make an align equation look neater
    by George Dewhirst on November 24, 2025 at 10:40 pm

    I know a bit of LaTeX but struggle with making large multi-line equations look professional. Apologies if this is the wrong way/place to ask. Literally any help would be grand. Specifically I would like the formatting to be on the left. (Here is some LaTeX for reference...) \begin{proof} First we prove \eqref{E-alpha-1}. \begin{align} \left|\mathbf{E}_{\alpha,1}^{(\beta)}( t) v\right|_{\mu} = \sum_{j=1}^{\infty}\lambda_j^{\mu}\langle(E_{\alpha,1}^{(\beta)}(t)v,e_j\rangle^2 \end{align} Note that $\langle(\mathbf{E}_{\alpha,1}^{(\beta)}t)v,e_j\rangle = \sum_{k=0}^{\infty}\frac{\langle (-A)^{\beta k}t^{\alpha k}v,e_j\rangle}{\Gamma(\alpha k+1)} = \sum_{k=0}^{\infty}\frac{\langle (-\lambda_j)^{\beta k}t^{\alpha k}v,e_j\rangle}{\Gamma(\alpha k+1)} = E_{\alpha,1}(-\lambda_j^{\beta} t^{\alpha})\langle v, e_j \rangle$. Using that $A^{\beta k}e_j = \lambda_j^{\beta k} e_j$ whenever $e_j$ are the eigenvectors of $A$. Next we use the result that $|E_{\alpha,1}(z)|^2\leq \frac{C}{(1+|z|)^2}$ Thus \begin{align} |\mathbf{E}_{\alpha,1}^{(\beta)}( t) v|_{\mu}^2 = \sum_{j=1}^{\infty}\lambda_j^{\mu}\langle(E_{\alpha,1}^{(\beta)}(t)v,e_j\rangle^2 = \sum_{j=1}^{\infty}\lambda_j^{\mu}\langle v, e_j \rangle^2 |E_{\alpha,1}(-\lambda_j^{\beta} t^{\alpha})|^2 \\ \leq \sum_{j=1}^{\infty}\lambda_j^{\mu}\langle v, e_j \rangle^2 \frac{1}{(1+\lambda_j^{\beta}t^{\alpha})^2}\\ \leq C t^{-\frac{\alpha}{\beta}(\mu - \nu)} \sum_{j=1}^{\infty}\frac{(\lambda_j^\beta t^{\alpha})^{\frac{\mu-\nu}{\beta}}}{(1+\lambda_j^{\beta}t^{\alpha})^2}\lambda^{\nu}_j\langle v, e_j \rangle^2 \\ \leq Ct^{-\frac{\alpha(\mu-\nu)}{\beta}}\sum_{j=1}^{\infty}\lambda_j^{\nu}\langle v, e_j\rangle^2 \leq Ct^{-\frac{\alpha(\mu-\nu)}{\beta}}|v|_{\nu}^2 \end{align} \end{proof} )

  • Make Ipe use local LaTeX document formatting
    by yms on November 24, 2025 at 9:36 pm

    I'm trying to export an Ipe figure so that whatever math in the figure will use the font in my document. Here is my preamble: \documentclass{amsart} \usepackage{comment} \usepackage{tgtermes} \usepackage{newtxmath} \usepackage[usenames,dvipsnames]{color} \usepackage[normalem]{ulem} \usepackage{url} \usepackage{graphicx} \usepackage{float, caption} \usepackage{enumerate} \usepackage{hyperref} and here is how I'm attaching a figure: \begin{figure} \centering \includegraphics[width=0.7\linewidth]{graphics/figure1.eps} \end{figure} On the IPE figure I'm using the math mode to attach text, should I be putting raw LaTeX code instead? Thanks in advance for the help.

  • Problem finding texlive in TeXworks
    by Greg Bennett on November 24, 2025 at 8:51 pm

    I have a new install of texlive 2025 and a new install of TeXworks 0.6.8("Debian") No complaints in the log of either. They cannot find one another (yet). I made a small file in my home directory, opened it in TeXworks, hit the green arrow and received only Console output: This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/Debian) (preloaded format=pdflatex) {This suggests that the TeXlive installation has been found} kpathsea: Running mktexfmt pdflatex.fmt mktexfmt: No such file or directory I can't find the format file `pdflatex.fmt'! Why, I wonder, is mktexfmt being called .. texlive made the formats during installation as fat as I can see: Looking in TeXworks.conf the binary paths are: binaryPaths=/usr/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /sbin, /bin, /usr/games, /usr/local/games, /usr/local/texlive/2025/bin/x86_64-linux, /usr/local/texlive/2025/texmf-var/web2c/pdftex In the last element is the file pdflatex.fmt ! How do I make sure that TeXworks does find things in what seems to be its own search paths ? Thanks for advice/assistance Greg Bennett

  • cleveref cannot deal with figures under tufte classes and amsmath
    by Máté Wierdl on November 24, 2025 at 6:56 pm

    In a document where I reference a figure using cleveref, incorrect name and counter are used, namely the name used is section and the counter is the surrounding section's counter. This happens when I use either of the tufte classes and load amsmath. If I load the article class instead, the problem disappears. If I use a tufte class but not amsmath, again the problem disappears. I am using texlive 2025. I add that the same error is present when I reference a table. In the example below, I inserted a \newpage so that clicking on the figure reference, we can see that we jump to the section starting on the previous page. % \documentclass{article} \documentclass{tufte-handout} \usepackage{amsmath} \usepackage[nameinlink]{cleveref} \setcounter{secnumdepth}{2} \begin{document} \section{Cleveref test} \label{sec:cleveref-test} \subsection{The line} \label{sec:line} \newpage \Cref{fig:try} shows a line. \begin{figure} \caption{The line} \hbox to 5cm{\hrulefill} \label{fig:try} \end{figure} \end{document}

  • Inaccurate TikZ/PGF plot
    by Dominique on November 24, 2025 at 6:31 pm

    I'm using the following code to produce a plot: \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ width = 15cm, xtick = {0, 1, 2, 3, 4, 5}, ] \addplot[black, thick, smooth, domain=0:5] {exp(-100 * \x) + sin(\x)}; \addplot[blue, thick, smooth] table {stiff.dat}; \end{axis} \end{tikzpicture} \end{document} It produces the following plot: Here, the blue curve plots data points generated with Matlab for the same function. The blue curve is correct, but the black one is not. It seems TikZ is not able to plot the function accurately. I've read on this forum about this issue and I tried a few things: \ustikzlibrary{fpu}: did not help; that may be because the PFU is limited to 4-5 digits \usepackage{xfp}: I could not get this to work and kept getting an error with \fpeval \usepackage{expl3}: same. I must be doing something wrong. What is the correct incantation here? I would rather not resort to compiling with Lua because my document is part of series that all compile fine with PDFLaTeX. Thank you in advance!

  • circuitikz: Rename self-drawn 'bipole symbol'
    by cis on November 24, 2025 at 4:46 pm

    I drew a new bipol-symbol (which is similar to a capacitor from pgfcircbipoles.tex) and I want to be able to say \draw[] (0,0) to[newname] (2,0) to[vC] (4,0); instead of \draw[] (0,0) to[capacitor] (2,0) to[vC] (4,0); I thought I could do the same trick as here. Simply "search and replace" doesn't work. What do I have to do? %\documentclass[a4paper]{article} \documentclass[margin=5pt]{standalone} \usepackage{circuitikz} \makeatletter %% Normaly-Open-Contact Dipol Symbol ============ \ctikzset{bipoles/capacitor/height/.initial=0.35}% default 0.6 \ctikzset{bipoles/capacitor/width/.initial=0.3}% default 0.2 \pgfcircdeclarebipolescaled{capacitors} {} {\ctikzvalof{bipoles/capacitor/height}} {capacitor} {\ctikzvalof{bipoles/capacitor/height}} {\ctikzvalof{bipoles/capacitor/width}} { \pgfcirc@maybe@fill@straight@capacitor \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth} \pgfpathmoveto{\pgfpoint{2\pgf@circ@res@left}{\pgf@circ@res@up}} \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} \pgfpathlineto{\pgfpoint{2\pgf@circ@res@left}{\pgf@circ@res@down}} \pgfpathmoveto{\pgfpoint{2\pgf@circ@res@right}{\pgf@circ@res@up}} \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} \pgfpathlineto{\pgfpoint{2\pgf@circ@res@right}{\pgf@circ@res@down}} \pgfusepath{draw} } \pgfcirc@activate@bipole@simple{l}{capacitor} %% ============================= \makeatother \begin{document} \begin{circuitikz}[] \draw[] (0,0) to[capacitor] (2,0) to[vC] (4,0); \end{circuitikz} \end{document}

  • Why doesn’t LyX export in any format, or implement commands to remove a linespace between the footnote number and the actual footnote?
    by Mulder on November 24, 2025 at 4:28 pm

    I’ve got a document that is just about done, complete with footnotes. But despite inserting the code to supposedly remove the linespace between the footnote number and the actual footnote, it has no effect. To make matters worse, I can’t export the file in any format — the only error message I get is “Don’t know how to export to format: latex,” which tells me nothing. I can compile and preview my document just fine, but the code to solve the footnotes problem has no effect on the preview, so it isn’t working. BasicTeX 2025 is installed, just as the LyX web site stated. This is running on macOS 15.7.1. How can I solve both problems?

  • What is "% !TEX TS-program = lualatex" and "who" cares? [duplicate]
    by Steven Thomas Hatton on November 24, 2025 at 2:14 pm

    In this community I was recently presented with a preamble beginning with% !TEX TS-program = lualatex which I vaguely recall having the generic designation of "magic". A bash file typically begins with #!/bin/bash which, among other things, tells the execution environment where to find the bash executable. In the file grok-fail.txt with the content: \documentclass[a4paper,12pt,leqno]{book} \usepackage[margin=1in]{geometry} \usepackage[italian]{babel} \usepackage{fontspec} \usepackage{amsmath} file grok-fail.txt returns grok-fail.txt: LaTeX 2e document, ASCII text same filename with #!/bin/bash \documentclass[a4paper,12pt,leqno]{book} \usepackage[margin=1in]{geometry} \usepackage[italian]{babel} \usepackage{fontspec} \usepackage{amsmath} file grok-fail.txt returns grok-fail.txt: Bourne-Again shell script, ASCII text executable With the content: % !TEX TS-program = lualatex #!/bin/bash \documentclass[a4paper,12pt,leqno]{book} \usepackage[margin=1in]{geometry} \usepackage[italian]{babel} \usepackage{fontspec} \usepackage{amsmath} file grok-fail.txt returns grok-fail.txt: LaTeX 2e document, ASCII text as it did in the first example. It's helpful to us mere humans to be able to read TS-program = lualatex. But is there an expectation that a computer program will read this string and use it to determine which program to compile the content with? I ask, in particular, because I would like Kile to read that string with understanding. Alas I am forced to intervene upon first "live preview" compilation. So what's % !TEX TS-program = lualatex all about?

  • Add a DPDT switch
    by Nicolas on November 24, 2025 at 1:55 pm

    I've diagrammed the charging and discharging of a capacitor. \documentclass[border = 1mm]{standalone} \usepackage[utf8]{inputenc} \usepackage{siunitx} \usepackage[european, straightvoltages, RPvoltages]{circuitikz} \usetikzlibrary{babel} \begin{document} \begin{circuitikz} \draw (0,0) node[spdt,rotate=90,anchor=in] (Sw) {} (Sw.in)--++(0,-1) coordinate(RC) --++(1,0) to[R] ++(0,-1.5) to [leDo]++(0,-1.5) --++(-1,0) (RC)--++(-1,0) to[capacitor]++(0,-3)--++(1,0) (RC)--++(1,0) to[R] ++(0,-1.5) to [leDo]++(0,-1.5) coordinate (basRC) ($(basRC)+(-1,0)$) --++(0,-1) node[ground](GND){} (Sw.out 1) to[R] ++(-2,0) to[leDo, invert, mirror] ++(-2,0) coordinate(posSource) to [vsource] (posSource|-GND) --(GND) (Sw.out 2) --++(3,0) coordinate (posMoteur) to [Telmech=M,n=motor] (posMoteur|-GND)--(GND); \end{circuitikz} \end{document} For the discharge, I'd like to add a DPDT switch (and an LED + protection resistor in the corresponding loop) to be able to change the motor's direction of rotation: I haven't found anything about this in the documentation.

  • Fallback font - LuaLaTeX
    by GowriSaro on November 24, 2025 at 1:43 pm

    MWE is: \documentclass{article} \usepackage{amsfonts,amsmath,amssymb} \usepackage{fontspec} \directlua {luaotfload.add_fallback ("myfallback", { "MinionPro-Regular.otf:mode=harf", } ) } \directlua {luaotfload.add_fallback ("mysansfallback", { "Open Sans:mode=harf", } ) } \setmainfont[RawFeature={fallback=myfallback},Ligatures=TeX,% UprightFont= GentiumPlus-R.ttf, ItalicFont = GentiumPlus-I.ttf,%AutoFakeBold=2.5% BoldFont = GentiumPlus-Bold.ttf,% BoldItalicFont = GentiumPlus-BoldItalic.ttf, ]{GentiumPlus}%% \setsansfont[RawFeature={fallback=mysansfallback},Ligatures=TeX, UprightFont= GillSansStd.otf, ItalicFont = GillSansStd-Italic.otf, BoldFont = GillSansStd-Bold.otf, BoldItalicFont = GillSansStd-BoldItalic.otf]{GillSansStd}% %%%Primary alternative font \newfontfamily\primaryalternat[UprightFont= MinionPro-Regular.otf,ItalicFont = MinionPro-It.otf,BoldFont = MinionPro-Bold.otf,BoldItalicFont = MinionPro-BoldIt.otf]{MinionPro}%% %%%Secondary alternative font \newfontfamily\secondaryalternat[Ligatures=TeX, UprightFont= SourceSansPro-Regular.otf,ItalicFont = SourceSansPro-It.otf, BoldFont = SourceSansPro-Bold.otf, BoldItalicFont = SourceSansPro-BoldIt.otf,]{SourceSansPro}% \begin{document} \def\mytest#1#2{\hbox to 50pt{#1\hfill\symbol{"#1}}\par\addvspace{6pt}} \parindent0pt {\protect\mytest{0104}{}}%%the letter Ą {\protect\mytest{092E}{}}%%the Devanagari letter 'म {\sffamily {\protect\mytest{0104}{}} {\protect\mytest{092E}{}} } \end{document} Above code works without error, but in .log file, showed that luaotfload | cache : Lookup cache loaded from C:/Users/cm30132/.texlive2024/texm f-var/luatex-cache/generic/names/luaotfload-lookup-cache.luc. luaotfload | db : Reload initiated (formats: otf,ttf,ttc); reason: Font "MinionPro-Regular.otf" not found. Kindly advise how to fix this or shall I ignore this, as I'm new to Lua code.

  • LaTeX "minted" is not working with MikTeX, Win10
    by J AK on November 24, 2025 at 11:29 am

    I want to submit a paper in e-informatica, so I am using their file, which is available here. But without any change, their file is not working. It generates the error Error message: minted v3+ executable is not installed or is not added to PATH with two other errors. I have uninstalled and reinstalled the package, and I have also already tried pdflatex --shell-escape your_document.tex pip install minted Please guide how I can fix this.

  • \setmainfont (missing characters) vs \babelfont (not all settings available)
    by Denis Bitouzé on November 24, 2025 at 11:15 am

    (Disclaimer: if I am not mistaken, this question incidentally concerns transliteration of Sanskrit, but I know nothing about that language.) The following MCE: \documentclass{article} \usepackage{fontspec} \usepackage{babel} \setmainfont{texgyrepagella}[ Extension =.otf, UprightFont = *-regular, BoldFont = *-bold, ItalicFont = *-italic, BoldItalicFont = *-boldItalic, Numbers = OldStyle, ] % \babelfont{rm}[Language=Default]{texgyrepagella} \begin{document} \foreignlanguage{sanskrit}{haṁsamukhī} \end{document} (run with lualatex) doesn't work well: Missing character: There is no ṁ (U+1E41) in font [texgyrepagella-regular.otf ]:mode=node;script=latn;language=dflt;+tlig;+onum;! If the line: % \babelfont{rm}[Language=Default]{texgyrepagella} is uncommented, it works nicely and still works nicely if in addition the \setmainfont command is commented. Hence I would be inclined to just rely on: \babelfont{rm}[Language=Default]{texgyrepagella} but, AFAICS, I would then be unable to adjust the settings precisely (e.g. Numbers = OldStyle). So what would be the right way to both: not have missing characters, be able to adjust the settings of the font precisely? Is it safe to keep both \setmainfont and \babelfont?

  • Why do expl3 setting commands use \edef?
    by jlab on November 24, 2025 at 9:21 am

    Looking at the definition of \tl_set:Nn (for example, with latexdef \tl_set:Nn), we find \tl_set:Nn: \protected\long macro:#1#2->\__kernel_tl_set:Nx #1{\__kernel_exp_not:w {#2}} where \__kernel_tl_set:Nx is simply \edef; and \__kernel_exp_not:w is \unexpanded. So, \tl_set:Nn \l_my_tl {...} means \edef \l_my_tl {\unexpanded {...}} that is to say: \edef requests for the expansion of the macro definition, but this expansion is prevented by \unexpanded. I'm curious, why not using instead \def \l_my_tl {...} ?

  • LaTeX and tabluarray theme
    by Aaron on November 24, 2025 at 7:26 am

    The table with the local settings works perfectly. But if I want to have a theme = compact, it no longer works. I want to write lines 25 and 26 into a global theme and only customize the specific changes locally, see line 25. \documentclass{scrbook} \usepackage{fontspec} \usepackage[sfdefault]{noto} \setmonofont{Noto Sans Mono}[UprightFont = * SemiBold] \usepackage{tabularray} \UseTblrLibrary{booktabs} \begin{document} \NewTblrTheme{compact}{% \DefTblrTemplate{contfoot-text}{default}{}% \DefTblrTemplate{conthead-text}{default}{}% % Style for the first line (header) \SetTblrStyle{row}{1}{font={\sffamily\bfseries\small},abovesep=3pt,belowsep=3pt}% % Style for all data rows \SetTblrStyle{row}{2-Z}{font={\sffamily\small},abovesep=1pt,belowsep=1pt}% } \begin{longtblr}[ theme = compact, caption = {Test}, label = {tab:test} ]{ colspec = {cX[l]}, rowhead = 1, % row{1} = {font={\small\sffamily\bfseries}, abovesep=3pt, belowsep=3pt}, % row{2-Z} = {font={\small\sffamily}, abovesep=1pt, belowsep=1pt}, cell{2-Z}{1} = {font=\ttfamily\small} } \toprule Spalte 1 & Spalte \\ \midrule 123 - 456 & Zeile 1 \\ 123 - 456 & Zeile 2 \\ 123 - 456 & Zeile 3 \\ 123 - 456 & Zeile 4 \\ \bottomrule \end{longtblr} \end{document}

  • floating point arithmetic and boolean operations with \ifthenelse
    by underflow on November 24, 2025 at 6:50 am

    This is a follow up to my previous post about arithmetic operations and tikz I would like to performance floating point arithmetic & boolean operations in conjunction with \ifthenelse. Here is a minimal example: \usepackage{tikz, ifthen} \begin{document} \begin{tikzpicture} \foreach \a in {-6,...,6} { \foreach \b in {-6,...,6} { \ifthenelse{ (\a+1.4*b < 4) \and (\a - 1.4*b)> 1 } { \node at ( (\a, \b ) {(\a, \b)}; } {} } } \end{tikzpicture} \end{document} Many thanks for your help!

  • Incompatibility between array and bidi in LaTeX2e 2025-11-01
    by Psychonaut on November 24, 2025 at 3:29 am

    Following a recent update to TeX Live 2025, bidi has stopped working with array and packages that depend on it, such as nicematrix. Consider the following minimal example: \documentclass{article} \usepackage{array} \usepackage{bidi} \begin{document} \begin{tabular}{c} \end{tabular} \end{document} This results in the error ! Undefined control sequence. \@@array ...idth \z@ }\tbl_save_outer_table_cols: \begingroup \@mkpream {#2}... l.5 \begin{tabular}{c} It seems that the bidi file array-xetex-bidi.def references \tbl_save_outer_table_cols, but according to the LaTeX2e changelog, that identifier was removed in the 2025-11-01 release. I reported the issue in the vafa/bidi issue tracker on GitHub, though it's not clear to me whether that repository is still the official one or whether the package is still actively maintained. Is there a relatively easy way of working around this problem?

  • How to align the visual bottom of a large quotation mark with the cap height of the text?
    by Mihai on November 23, 2025 at 10:03 pm

    I am trying to figure how to correctly place a symbol (e.g., a quotation mark) as illustrated below. So, far I have the following: % Document class. \documentclass[12pt]{article} % Dependencies. \usepackage{lipsum} % Start. \ExplSyntaxOn % Define a box for the quote symbol. \box_new:N \l_quote_box % Define the `\pquote` command. \NewDocumentCommand{\pquote}{ m }{% % Start the quote environment. \begin{quote} % Enter horizontal mode. \leavevmode % Set the quote box to its content. \hbox_set:Nn \l_quote_box {% % Define the quote symbol. \rule{1em}{1em}% } % Place the quote symbol to the left. \llap{% % Smash to avoid affecting line spacing. \smash{% % Raise to align with the top of the first line. \raisebox{ \dim_eval:n { \fontcharht\font`H } }{% % Render the box containing the quote symbol. \box_use:N \l_quote_box }% }% }% % Render the quote content. #1 \end{quote} } % Stop. \ExplSyntaxOff \begin{document} \lipsum[1][1-3] \pquote{\lipsum[1][1-3]} \end{document} Which produces as output: However, the moment I redefine \l_quote_box as % Set the quote box to its content. \hbox_set:Nn \l_quote_box {% % Define the quote symbol. \fontsize{46}{0}\selectfont``% } the positioning of the symbol along the y-axis offset seems off, and the output obtained is: I can correctly reposition the symbol by tweaking the \raisebox, e.g. by setting \dim_eval:n { \fontcharht\font`H - 0.8em } but this feels arbitrary and perhaps dependent on the size used in \fontsize, which is not what I want. I would ideally like to: Determine (i.e., or scale) the size of quotation mark without compromising its "touch" point with the cap height, and thus not have to adjust the y-shift manually. Be mindful that large quotation marks do not overlap the text above, but rather push the entire quote environment down. Is there a robust way of achieving this, preferably without tikZ? I'd appreciate any ideas!

  • How to Make TikZ Overlay Arrows Smoother and Better Arranged in Table?
    by mingabua on November 23, 2025 at 6:33 pm

    I'm creating a table with TikZ overlay arrows to illustrate the data flow between cells. The arrows currently work, but they look somewhat crude and could be improved. I'm looking for suggestions on: How to make the curved arrows look more fluid and natural Better positioning strategies for the labeled nodes (A, B, C, D) so they don't overlap with arrows How to avoid awkward arrow angles and improve the overall visual flow Here's my MWE: \documentclass{article} \usepackage[margin=1in]{geometry} \usepackage{amsmath} \usepackage{booktabs} \usepackage{xcolor} \usepackage{lipsum} \usepackage{caption} \usepackage{tikz} \usetikzlibrary{tikzmark} \usepackage[most]{tcolorbox} % Color \definecolor{boxBack}{RGB}{245, 247, 250} \definecolor{darkgrey}{HTML}{464e51} \definecolor{customGray}{HTML}{DDDDDD} \definecolor{customRed}{HTML}{FDE7A9} \definecolor{customOrange}{HTML}{FC8E64} \definecolor{customBlue}{HTML}{B83779} % tcolorbox settings \tcbset{ enhanced, colback=boxBack, colframe=gray!40, boxrule=0.5pt, fonttitle=\bfseries\sffamily, coltitle=black, attach boxed title to top left={xshift=0.5cm, yshift=-3mm}, boxed title style={colback=white, colframe=gray!40, arc=3pt}, top=1em, bottom=1em, left=1em, right=1em } \begin{document} \lipsum[1-3] \begin{tcolorbox}[title=Test] \footnotesize $\quad$ \lipsum[1] \renewcommand{\arraystretch}{1.2} \begin{center} \captionsetup{font=footnotesize,labelfont={color=darkgrey,bf}} \captionof{table}{\textcolor{darkgray}{Example}} \label{tab:shifte} \vspace{-0.5cm} \[ \begin{array}{@{\hspace{1em}}c@{\hspace{2em}}c@{\hspace{3.5em}}c@{\hspace{3.5em}}c@{\hspace{3.5em}}c@{\hspace{2em}}c@{\hspace{1.0em}}} \toprule \text{Day} & \text{$1$} & \text{$2$} & \text{$3$} & \text{$4$} & \text{$\ldots$} \\ \midrule \text{{\fontsize{9}{10}\selectfont ...}} & \text{{E}} & \text{{L}} & \text{{O}} & \text{{E}} & \text{$\ldots$} \\[6pt] \text{$a_{ds}$} & \tikzmarknode{A2}{\text{$(1,0)$}} & \tikzmarknode{A3}{\text{$(0,1)$}} & \tikzmarknode{A4}{\text{$(0,0)$}} & \tikzmarknode{A5}{\text{$(1,0)$}} & \tikzmarknode{A6}{$\ldots$} \\[6pt] \text{$b_{ds}$} & \tikzmarknode{B2}{\text{$(1,0)$}} & \tikzmarknode{B3}{\text{$(1,0)$}} & \tikzmarknode{B4}{\text{$(0,1)$}} & \tikzmarknode{B5}{\text{$(0,1)$}} & \tikzmarknode{B6}{$\ldots$} \\[6pt] \text{$c_{ds}$} & \text{$(0,0)$} & \text{$(0,0)$} & \tikzmarknode{Z1}{\text{$(0,1)$}} & \text{$(0,0)$} & \text{$\ldots$} \\[6pt] \text{$v_{ds}$} & \tikzmarknode{E3}{\text{$(0,0)$}} & \tikzmarknode{E4}{\text{$(0,1)$}} & \text{$(0,0)$} & \tikzmarknode{E5}{\text{$(1,0)$}} & \tikzmarknode{E6}{$\ldots$ } \\ [6pt] \text{$d_{d}$} & \text{$0$} & \text{$1$} & \tikzmarknode{Z12}{\text{$0$}} & \text{$1$} & \text{$\ldots$} \\ \bottomrule \end{array} \] \begin{tikzpicture}[remember picture,overlay] % Fixed the typo here \draw[thick, ->] (-1.94,0.98) -- (-1.32,0.98); \draw[thick, -<] (-1.94,2.02) -- (-1.32,2.02); \draw[thick, -<] (-1.94,2.58) -- (-1.32,2.58); \draw[thick, ->] (-2.44,2.8) -- (-1.32,2.26); \draw[thick, customGray, -] (1.48,1.6) -- (2.56,2.22); \draw[thick, ->] (-0.44,2.8) -- (0.6,1.60); \draw[thick, ->] (1.48,1.6) -- (2.56,2.22); \draw[thick, -] (-1.94,2.58) -- (-1.94,0.98); \fill[customGray] (-2.21,2.65) circle (0.19); \fill[customGray] (2.02,1.91) circle (0.19); \fill[customGray] (0.08,2.16) circle (0.19); \fill[customGray] (-1.94,1.5) circle (0.19); \node[circle,draw,inner sep=1pt,font=\tiny] at (-2.21,2.65) {A}; \node[circle,draw,inner sep=1pt,font=\tiny] at (-1.94,1.5) {B}; \node[circle,draw,inner sep=1pt,font=\tiny] at (0.08,2.16) {C}; \node[circle,draw,inner sep=1pt,font=\tiny] at (2.02,1.91) {D}; \end{tikzpicture} \end{center} \noindent \lipsum[1] \end{tcolorbox} \normalsize \lipsum[2] \end{document} I want the arrows to look something like this:

  • arithmetic operations with \ifthenelse
    by underflow on November 23, 2025 at 5:47 pm

    Is there a way to add arithmetic operations to \ifthenelse statements? Here is a minimal (non)example: \documentclass{amsart} \usepackage{tikz, ifthen} \begin{document} \begin{tikzpicture} \foreach \a in {-6,...,6} { \foreach \b in {-6,...,6} { \ifthenelse{ (\a + \b) < 4 } { \node at ( (\a, \b ) {(\a, \b)}; } {} } } \end{tikzpicture} \end{document} It is not working because \ifthenelse does not allow \a+\b. Bonus question: Is there a way to e.g. define \c = \a + \b in advance so I can use \c elsewhere, in \ifthenelse and subsequence \draw commands? EDIT: Actually what I needed is \a + 1.414*\b < 4 AND \a - 1.414*\b > 0. I thought I could handle the rest once I know how to insert arithmetic operations into \ifthenelse, but apparently it's more complicated than that. Apologies for the mixup and thanks for your help.

  • Producing the sums outside of the 3x3 Magic Square
    by Vee on November 23, 2025 at 2:49 pm

    How can I align the column of sums outside of this 3x3 magic square? I've coursed through different variations of code, but I can't seem to get it correct. Kindly see the photo below. The 15s representing the diagonal sums don't seem to align with the row sums. \[ \begin{blockarray}{ccc@{\hspace{5mm}}c} \matindex{15} & \matindex{15} & \matindex{15} & \matindex{15} \\ % top column sums \begin{block}{[ccc]c} 4 & 9 & 2 & 15 \\ % row sums 3 & 5 & 7 & 15 \\ 8 & 1 & 6 & 15 \\ \end{block} & & & \matindex{15} % extra bottom-right 15 \end{blockarray} \]

  • how to shade an region bounded by curves
    by underflow on November 22, 2025 at 6:43 pm

    I have a region on the plane bounded by two hyperbolas xy = +/- C. What is the best/simplest way to shade (not filled) the "star shaped" region enclosed by these two hyperbolas? Advanced version of this question: I have two rays in the first quadrant, starting from the origin. These two rays cut out a curved wedge in the star shaped region. How I can shade this wedge in a different color from the rest of the region? Here is a MWE for the star shaped region, plus the two rays: \documentclass{amsart} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw [thick, domain=0.5:3] plot (\x, { 1.2/\x)}); \draw [thick, domain=-3:-0.5] plot (\x, { 1.2/\x)}); \draw [thick, domain=0.5:3] plot (\x, {-1.2/\x)}); \draw [thick, domain=-3:-0.5] plot (\x, {-1.2/\x)}); \draw (-3.4,0) -- (3.4,0); \draw (0,-2.6) -- (0,2.6); \draw [thick] (0,0) -- (2.2,2.2); \draw [thick] (0,0) -- (3.1,1.5); \end{tikzpicture} \end{document} Thanks for your help! EDIT: I know how to fill a polygon using \draw [filled] (coord) -- (coord) -- etc but I don't know how to handle the parabolas.

  • How to recreate a DuPont scheme
    by Dorian on November 22, 2025 at 1:30 pm

    I'd like to recreate a DuPont scheme as the image below. I’m not necessarily asking for the exact code used to recreate the graphic, but rather for the packages and commands that would allow me to do it myself. Is there anything more “accessible” than TikZ? Thank you in advance 😉