Hot
- How to increase the size between acronym and desription?by stefaniecg on December 22, 2025 at 5:45 pm
Using the glossaries package, how can I increase the separation between the ACRONYM and the description? Here is an example code. \documentclass{IEEEtran} \usepackage[acronym]{glossaries} \makeglossaries % generates the acronym list \newacronym{acm}{ACM}{Association for Computing Machinery} \newacronym{lacr}{LACROO}{Longer acronym which overlaps with description} \begin{document} This is an \ac{acm} article. \ac{acm} is very popular in computer science. But the problem is, the following acronym is too long \ac{lacr} and it overlaps with its description. \printglossaries % prints the acronym list \end{document} Code ref. Setting up Acronym on IEEEtran Class Documemt
- Align captions of figures to the left [duplicate]by viba on December 22, 2025 at 3:41 pm
There are so many similar questions and the solutions actually work but somehow they depend on the length of the captions. I want the captions to align to the picture to the left and the caption has hang formating even though they are short. MWE: \documentclass{assignment} \usepackage{xcolor} \usepackage{caption} \usepackage{float} \begin{document} \begin{figure}[t] \centering \includegraphics[width=\linewidth]{example-image-duck} \captionsetup{format=hang} \caption{adipiscing\_elit.adipiscingadipiscingadipiscing\\ adipiscingadipiscingadipiscingadipiscingadipiscing\_elit.} \label{fig:mesh1} \end{figure} \begin{figure}[t] \centering \includegraphics[width=\linewidth]{example-image-duck} \captionsetup{format=hang} \caption{Lorem : ipsum dolor sit am.et, \_elit.\\ Lorem : ipsum dolor sit amet, \_elit.} \label{fig:mesh1} \end{figure} \end{document}
- CircuiTikZ inconsistent behaviour of voltage/distance from nodeby DraUX on December 22, 2025 at 2:40 pm
I found that the behaviour of the voltage/distance from node-key varies depending on the component, as can be seen in the mwe below. Is there a fix that I am missing? Also, when I set voltage/distance from node=0 there is still some distance to the actual center of the node (marked in red). I have no idea where this is coming from (maybe a TikZ-thing?). I thought, maybe the inner sep of the nodes was not being accounted for, but after some testing, I found that the distance differs from the standard inner sep of nodes. Does someone have an idea? \documentclass{standalone} \usepackage{tikz} \usepackage[straightvoltages]{circuitikz} \begin{document} \begin{tikzpicture} \draw (0,0) to[R,name=R,v=U,voltage/distance from node=0] (2,0); \draw (0,-1) to[open,name=v,v=U,voltage/distance from node=0] (2,-1); \draw (0,-1.25) to[open,v=U,voltage/distance from node=0,open voltage position = legacy] (2,-1.25); \draw[red] (0,0 |- R-Vfrom) -- (R-Vfrom) node[midway,below] {?}; \draw[red] (0,-1) -- (v-Vfrom) node[midway,below] {?}; \end{tikzpicture} \end{document}
- Rescaled diagonal dots in small matrix environmentby Josh on December 22, 2025 at 2:09 pm
Is there a way to rewrite the declared command below (from Correctly format \vdots in small matrix) to give rescaled diagonal dots? \documentclass{article} \usepackage{amsmath} \DeclareRobustCommand{\svdots}{% s for `scaling' \vbox{% \baselineskip=0.33333\normalbaselineskip \lineskiplimit=0pt \hbox{.}\hbox{.}\hbox{.}% \kern-0.2\baselineskip }% } \begin{document} $S= \begin{pmatrix} \sigma_1 & 0 & 0\\ 0 & \sigma_2 & \svdots\\ 0 & \dots & \end{pmatrix} \begin{pmatrix} \sigma_1 & 0 & 0\\ 0 & \sigma_2 & 0\\ 0 & \dots & \end{pmatrix}$ \scriptsize $S=\begin{pmatrix} \sigma_1 & 0 & 0\\ 0 & \sigma_2 & \svdots\\ 0 & \dots & \end{pmatrix}$ \end{document}
- How to create an overhead right-pointing arrow that ends with a small filled/empty circle, in math-mode?by Evan Aad on December 22, 2025 at 2:08 pm
How can I create a command that will ornament a letter in math-mode with an overhead right-pointing arrow that has a filled circle at its end? Likewise with an empty circle? The ornaments should look and behave similar to \overrightarrow in the following document, except that there should be a small filled circle at the right-hand tip of the arrow, resp. a small empty circle. \documentclass{article} \usepackage{amsmath} \begin{document} \[ \overrightarrow{A}\quad\overrightarrow{a}\quad\overrightarrow{\beta} \] \end{document}
- Inconflict with `\mathcolor` and a classic code snippets to fix `\pause` inside align with `beamer`?by Explorer on December 22, 2025 at 1:33 pm
The hacks as below is borrowed from Hendrik Vogt's solution to support \pause-etc in align in beamer: \documentclass{beamer} % https://tex.stackexchange.com/a/75550/322482 \makeatletter \let\save@measuring@true\measuring@true \def\measuring@true{% \save@measuring@true \def\beamer@sortzero##1{\beamer@ifnextcharospec{\beamer@sortzeroread{##1}}{}}% \def\beamer@sortzeroread##1<##2>{}% \def\beamer@finalnospec{}% } \makeatother \begin{document} \begin{frame} \begin{align} A &= \frac{1}{2}\\ \pause &\mathrel{\textcolor{red}{\equiv}} \frac{2}{5} \\ \pause &= \textcolor{red}{\frac{1}{3}}+123 \\ \pause % &= \mathcolor{red}{\frac{1}{3}} \pause \\ &= \frac{\pi}{4} \end{align} \end{frame} \end{document} However, noted that &\mathrel{\textcolor{red}{\equiv}} is just a workaround of &= \mathcolor{red}{\equiv} But the patch snippets looks inconflict with \mathcolor, if uncomment the \mathcolor, it complained that: ! Extra }, or forgotten $. <template> }$} \ifmeasuring@ \savefieldlength@ \fi \set@field \hfil \endtempl... l.22 \end{frame} ? My question is: In TL2025, and beamer-v3.76, is the snippets the must to support \pause in align? Any better or built-in solution? If not, is that possible for this classic code snippets to support \mathcolor at the same time?
- tikz with overlay and remember picture parameter doesn't work in TL2025by Chow Hui on December 22, 2025 at 1:27 pm
\documentclass{article} \usepackage[a4paper,margin=2cm]{geometry} \usepackage[fontset=fandol]{ctex} % 和原环境一致 \usepackage{tikz} \newdimen\X \newdimen\Y \X=89.62253pt \Y=85.35826pt \begin{document} 这里是普通正文。 \begin{tikzpicture}[remember picture,overlay] \node[inner sep=0pt, anchor=north west] at (current page.north west) ++ (\X, -\Y) (posblock-math-test) {SIMPLE}; \end{tikzpicture} \end{document} errlog: ! Package tikz Error: A node must have a (possibly empty) label text. See the tikz package documentation for explanation. Type H <return> for immediate help. ... l.18 + + (\X, -\Y)
- CircuiTikZ behavior of voltage shift at open componentby DraUX on December 22, 2025 at 1:04 pm
In CiruciTikZ, I tried to shift the voltage arrow and label away from an open-component. But apparently the usual options (voltage shift and voltage/distance from line) don't seem to work, as you can see in the mwe below. So, I was wondering what's causing this behavior. I stumbled upon this Issue and this Question addressing problems related to voltage shift and the open-component as well, but couldn't figure out how to solve my problem using them. \documentclass{standalone} \usepackage{tikz} \usepackage[straightvoltages]{circuitikz} \begin{document} \begin{tikzpicture} \draw (0,0) to[open,v=$U$] (2,0) (3,0) to[open,v=$U$,voltage shift=2] (5,0) (6,0) to[open,v=$U$,voltage/distance from line = .2] (8,0); \draw (0,-1.5) to[R,v=$U$] (2,-1.5) (3,-1.5) to[R,v=$U$,voltage shift=2] (5,-1.5) (6,-1.5) to[R,v=$U$,voltage/distance from line = .2] (8,-1.5); \end{tikzpicture} \end{document}
- Hebrew letters appear as rectangles in the title of a beamer-rl presentation when the `hebrew` option is specified for the `\babelfont` tagby Evan Aad on December 22, 2025 at 11:45 am
The following beamer document \documentclass[babel={provide=*,layout=graphics.tabular},english,hebrew]{beamer-rl} \babelfont{sf}{FreeSans} \title{אבג} \begin{document} \frame{\titlepage} \end{document} produces the following slide: However, if the \babelfont line is replaced by \babelfont[hebrew]{sf}{FreeSans} the following slide results, in which the Hebrew letters are replaced by rectangles. I haven't touched LaTeX in a few years, but back then the latter version, with the hebrew option, produced the same result as shown in the first image, in which the letters are rendered correctly. Why doesn't the version with the hebrew option work? How is it possible to specify one sf font for Hebrew and another one for English? P.S. This question is closely related to this previous question of mine.
- Hebrew letters appear as rectangles in the title of a beamer-rl presentationby Evan Aad on December 22, 2025 at 9:49 am
I'm trying to compile a beamer document in Hebrew that I wrote several years ago, and that used to compile successfully with lualatex. The document and its preamble are very long, but I managed to cut them down to the bare minimum that shows the problem I face while compiling the original document. \documentclass[babel={provide=*,layout=graphics.tabular},english,hebrew]{beamer-rl} \title{אבג} \begin{document} \frame{\titlepage} \end{document} When I compile the above document, which is named Main.tex, using lualatex Main.tex, the resulting pdf file consists of the following slide. As can be seen, the title's letters are replaced by rectangles. (The title should be אבג). What causes this issue? How can it be fixed?
- circuitikz: voltage arrow exactly from position to positionby cis on December 22, 2025 at 8:45 am
What is the correct syntax for placing a voltage arrow precisely between the two input terminals? By the way: To make the whole look nicer, I wanted to increase the pin lengths, but I couldn't manage it. I probably didn't place the current arrow quite correctly either, syntax-wise. \documentclass[margin=5pt, multi=circuitikz]{standalone} \usepackage{circuitikz} \begin{document} \begin{circuitikz} \node [en amp, %Increase pin length: %circuitikz/amplifiers/pin length=<*>, does not work ] (amp1) {}; \node [ocirc] at (amp1.-) {}; \node [ocirc] at (amp1.+) {}; \node [ocirc] at (amp1.out) {}; % v-arrow \draw[blue] ([xshift=-2mm]amp1.-) -- ([xshift=-2mm]amp1.+) node[midway, left] {$U$} node[sloped, currarrow, pos=1, blue] {}; % i-arrow \path[] (amp1.out) to[short, f=$\color{red}I$, color=red] ([xshift=5mm]amp1.out); \end{circuitikz} \end{document}
- How best to align a grid of expressions divided by vertical linesby Steven Thomas Hatton on December 22, 2025 at 8:12 am
That which is to be Rendered Pfaff, Johann Friedrich -- Methodus generalis, aequationes differentiarum partialium, nec non aequationes differentiales vulgares, utrasque primi ordinis inter quotcunque variabiles, complete integrandi The Current Effort % -*- mode: latex; TeX-engine: luatex; coding: utf-8 -*- \documentclass[a4paper,10pt]{article} \usepackage{amsmath} \usepackage{mathtools} \usepackage{unicode-math} \setmainfont{STIX Two Text} \setmathfont{STIX Two Math} \begin{document} \begin{equation*} \begin{array}{c|c|c|c|c} 0 =\,Z &dy+\phantom{p}\zeta & da+\zeta' &db+\zeta'' & dc.\\ \phantom{0}-pX &\phantom{dy}-p\chi & \phantom{da}-p\chi'&\phantom{db}-p\chi''& {}\\ \phantom{0}-\,q & {} & {} & {} & {} \end{array} \end{equation*} \end{document} The Result Discussion The current rendering isn't horrible, but it isn't as disciplined as I would like. Is there deterministic way to arrange content of this kind so that, for example, the '+' aligns vertically with the '-'? Discussion of Suggested Approach My original \begin{equation*} \begin{array}{c|c|c|c|c} 0 =\,Z &dy+\phantom{p}\zeta & da+\zeta' &db+\zeta''& dc.\\ \phantom{0}-pX &\phantom{dy}-p\chi & \phantom{da}-p\chi'&\phantom{db}-p\chi''&{}\\ \phantom{0}-\,q & {} & {} & {} &{} \end{array} \end{equation*} Suggested \begin{equation*} \begin{array}{c|c|c|c|l} \begin{aligned} 0 &= \; Z \\ &- pX \\ &- \;\; q \end{aligned} & \begin{aligned}[b] dy &+ \;\zeta \\ &- p\chi \end{aligned} & \begin{aligned}[b] da &+ \; \zeta' \\ &- p\chi' \end{aligned} & \begin{aligned}[b] db &+ \;\zeta'' \\ &- p\chi'' \end{aligned} & \begin{aligned}[b] dc. \\ & \end{aligned} \end{array} \end{equation*} This is not as robust as I would like. For example: Variations \begin{equation*} \begin{array}{c|c|c|c|c} 0 =\,\frac{Z}{t} &dy+\phantom{p}\zeta & da+\zeta' &db+\zeta''& dc.\\[1.6ex] \phantom{0}-\frac{pX}{2} &\phantom{dy}-p\chi & \phantom{da}-p\chi'&\phantom{db}-p\chi''&{}\\[1.6ex] \phantom{0}-\,\frac{q}{3} & {} & {} & {} &{} \end{array} \end{equation*} \begin{equation*} \begin{array}{c|c|c|c|l} \begin{aligned} 0 &=\,\frac{Z}{t} \\ &-\frac{pX}{2} \\ &- \;\; \,\frac{q}{3} \end{aligned} & \begin{aligned}[b] dy &+ \;\zeta \\ &- p\chi \end{aligned} & \begin{aligned}[b] da &+ \; \zeta' \\ &- p\chi' \end{aligned} & \begin{aligned}[b] db &+ \;\zeta'' \\ &- p\chi'' \end{aligned} & \begin{aligned}[b] dc. \\ & \end{aligned} \end{array} \end{equation*} I agree that the suggested version is an improvement in appearance to my original version in the specific case. If the content is varied so that different ``cells'' have different heights the horizontal alignment of the array of aligned environments no longer aligns grid rows. Perhaps there is no simple, ideal solution. I am hoping for something that will "naturally" align partitioned grid cells. I've done something similar in the past. The code that produced the following is listed below. I didn't really know what I was doing, I just tried things that I cribbed from this forum until it looked acceptable. % -*- mode: latex; TeX-engine: luatex; coding: utf-8 -*- \documentclass[a4paper,10pt]{article} \usepackage{amsmath} \usepackage{mathtools} \usepackage{unicode-math} \setmainfont{STIX Two Text} \setmathfont{STIX Two Math} \newcommand{\SBRAK}[1]{\left[#1\right]} \newcommand{\ARGS}[1]{\SBRAK{#1}} \newcommand{\CBRACE}[1]{\left\lbrace #1 \right\rbrace} \newcommand{\SPOT}{\smblkcircle} \newcommand{\CONST}[1]{\mathrm{#1}} \newcommand{\FTN}[1]{\mathscr{#1}} % scalar function \newcommand{\FTNA}[2]{\FTN{#1}\ARGS{#2}} \newcommand{\LNF}[1][L]{\mathfrak{#1}} % linear form representative \newcommand{\LNFC}[1][L]{\pmb{\LNF[#1]}} % linear form class \begin{document} \paragraph{My original} \begin{equation*} \begin{array}{c|c|c|c|c} 0 =\,Z &dy+\phantom{p}\zeta & da+\zeta' &db+\zeta''& dc.\\ \phantom{0}-pX &\phantom{dy}-p\chi & \phantom{da}-p\chi'&\phantom{db}-p\chi''&{}\\ \phantom{0}-\,q & {} & {} & {} &{} \end{array} \end{equation*} \paragraph{Suggested} \begin{equation*} \begin{array}{c|c|c|c|l} \begin{aligned} 0 &= \; Z \\ &- pX \\ &- \;\; q \end{aligned} & \begin{aligned}[b] dy &+ \;\zeta \\ &- p\chi \end{aligned} & \begin{aligned}[b] da &+ \; \zeta' \\ &- p\chi' \end{aligned} & \begin{aligned}[b] db &+ \;\zeta'' \\ &- p\chi'' \end{aligned} & \begin{aligned}[b] dc. \\ & \end{aligned} \end{array} \end{equation*} \paragraph{Variations} \begin{equation*} \begin{array}{c|c|c|c|c} 0 =\,\frac{Z}{t} &dy+\phantom{p}\zeta & da+\zeta' &db+\zeta''& dc.\\[1.6ex] \phantom{0}-\frac{pX}{2} &\phantom{dy}-p\chi & \phantom{da}-p\chi'&\phantom{db}-p\chi''&{}\\[1.6ex] \phantom{0}-\,\frac{q}{3} & {} & {} & {} &{} \end{array} \end{equation*} \begin{equation*} \begin{array}{c|c|c|c|l} \begin{aligned} 0 &=\,\frac{Z}{t} \\ &-\frac{pX}{2} \\ &- \;\; \,\frac{q}{3} \end{aligned} & \begin{aligned}[b] dy &+ \;\zeta \\ &- p\chi \end{aligned} & \begin{aligned}[b] da &+ \; \zeta' \\ &- p\chi' \end{aligned} & \begin{aligned}[b] db &+ \;\zeta'' \\ &- p\chi'' \end{aligned} & \begin{aligned}[b] dc. \\ & \end{aligned} \end{array} \end{equation*} \begin{equation*} \begin{array}{|c|c|} \hline \begin{aligned}[t]\\[\dimexpr-\normalbaselineskip] y&=+\CONST{m}x+\CONST{b} =\FTNA{y}{x} \vphantom{\frac{1}{\CONST{m}}}\\ &=-\frac{\CONST{y}_0}{\CONST{x}_0}x+\CONST{y}_0 % \\[\dimexpr-\normalbaselineskip] \\\hline \\[\dimexpr-\normalbaselineskip] % \CONST{m}&=-\frac{\CONST{y}_0}{\CONST{x}_0} =-\frac{\CONST{A}}{\CONST{B}}\\ \CONST{b}&=+\CONST{y}_0 =-\frac{\CONST{C}}{\CONST{B}}\\ 0&=+\CONST{b}+\CONST{m}x-y\vphantom{\frac{\CONST{Y}}{\CONST{m}}} % \\[\dimexpr-\normalbaselineskip] \\\hline \\[\dimexpr-\normalbaselineskip] % \LNFC&\doteq\phantom{-} \CBRACE{\CONST{b}:\CONST{m}:-1} \vphantom{\CBRACE{\frac{1}{\CONST{m}}}}\\ &=-\CBRACE{ \CONST{-\CONST{y}_0}:\CONST{\frac{\CONST{y}_0}{\CONST{x}_0}}:1 }\\ &=-\frac{\CBRACE{\CONST{C}:\CONST{A}:\CONST{B}}} {\CONST{B}} \\[\dimexpr-\normalbaselineskip]\\ \end{aligned} & \begin{aligned}[t]\\[\dimexpr-\normalbaselineskip] x&=+\frac{1}{\CONST{m}}y+\CONST{a}=\FTN{x}\ARGS{y}\\ &=-\frac{\CONST{x}_0}{\CONST{y}_0}y+\CONST{x}_0 % \\[\dimexpr-\normalbaselineskip] \\\hline \\[\dimexpr-\normalbaselineskip] % \frac{1}{\CONST{m}}&=-\frac{\CONST{x}_0}{\CONST{y}_0} =-\frac{\CONST{B}}{\CONST{A}}\\ \CONST{a}&=+\CONST{x}_0 =-\frac{\CONST{C}}{\CONST{A}}\\ 0&=+\CONST{a}-x+\frac{y}{\CONST{m}} % \\[\dimexpr-\normalbaselineskip] \\\hline \\[\dimexpr-\normalbaselineskip] % \LNFC&\doteq\phantom{-} \CBRACE{\CONST{a}:-1:\frac{1}{\CONST{m}}}\\ &=-\CBRACE {-\CONST{\CONST{x}_0}:1:\CONST{\frac{\CONST{x}_0}{\CONST{y}_0}}}\\ &=-\frac{\CBRACE{\CONST{C}:\CONST{A}:\CONST{B}}} {\CONST{A}} \end{aligned}\\ \hline \end{array} \end{equation*} \end{document}
- Using flowfram: Paragraphs keep previous page width when spanning across pages with different frame layoutsby John Stone on December 22, 2025 at 3:21 am
Related: This question follows from my previous one about dynamic page margins, where flowfram was suggested as a solution approach from MS-SPO @ms-spo. I'm trying to use the flowfram package to create a LaTeX document with different page layouts matching different background PDFs, as suggested in this comment on my previous question. My setup works well except for one issue: when a paragraph spans across pages with different frame widths, the text on the new page continues using the previous page's frame width, causing misalignment; please see the png attachment! MWE: \documentclass{article} \usepackage{lipsum} % ===== Load packages ===== \usepackage[margin=0pt]{geometry} % Disable geometry's margin control \usepackage{eso-pic, graphicx} \usepackage{flowfram} % ===== Define three page layouts ===== % 1. First page layout \newflowframe[1]{% \dimexpr\paperwidth-66mm\relax}{% width \dimexpr\paperheight-104mm\relax}{% height 52mm}{% left (x-coordinate) 38mm% top (y-coordinate from bottom) }[firstpage] % 2. Odd pages layout (except first) \newflowframe[3,5,7,9,11,13,15,17,19,21,23,25,27,29,31]{% \dimexpr\paperwidth-66mm\relax}{% width \dimexpr\paperheight-70mm\relax}{% height 62mm}{% left (x-coordinate) 38mm% top (y-coordinate from bottom) }[oddpage] % 3. Even pages layout \newflowframe[2,4,6,8,10,12,14,16,18,20,22,24,26,28,30]{% \dimexpr\paperwidth-44mm\relax}{% width \dimexpr\paperheight-64mm\relax}{% height 30mm}{% left (x-coordinate) 34mm% top (y-coordinate from bottom) }[evenpage] % ===== Background images ===== \AddToShipoutPictureBG{ \ifnum\value{page}=1 \put(0,0){\includegraphics[width=\paperwidth,height=\paperheight]{c1b.pdf}} \else \ifodd\value{page} \put(0,0){\includegraphics[width=\paperwidth,height=\paperheight]{c3.pdf}} \else \put(0,0){\includegraphics[width=\paperwidth,height=\paperheight]{c2.pdf}} \fi \fi } % ===== Header/Footer handling (optional) ===== \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} % Clear defaults \fancyheadoffset[LE,RO]{0pt} % Ensure headers don't shift \begin{document} \section{earth} \lipsum[1-5] \lipsum*[6-7] \section{universe} \lipsum[1-6] \lipsum*[7-8] \lipsum[1-4] \lipsum*[5-6] \lipsum[1-7] \end{document} The Problem: In the generated PDF, paragraphs that continue from page 1 (width: paperwidth-66mm) to page 2 (width: paperwidth-44mm) still use the wider width on page 2, causing text to overflow or misalign with the background. What I've tried: The flowfram manual mentions using \framebreak to handle this: "If the flow frames are not all of the same width, the change in \hsize will not come into effect until the end of the paragraph. Provide a command to simulate a paragraph break..." However, I'm not sure: Where to insert \framebreak (at potential break points? automatically?) How to use it properly (the manual mentions grouping for \parfillskip and \parskip) If there are better alternatives for handling this Questions: How should \framebreak be used in practice to fix cross-page paragraph width issues? Is there a way to automate this, or must I manually insert break points? Are there alternative approaches within flowfram to handle different frame widths across pages? automatically?
- How to Enclose Long Text with a Single-Sized Set of Parentheses?by Jethro on December 21, 2025 at 10:01 pm
MWE: \documentclass[12pt]{article} \textwidth=3.5in \begin{document} \thispagestyle{empty} \begin{equation} \left( \frac{A}{B} \right) \end{equation} \vspace{35pt} \noindent How to enclose text extending over multiple lines with parentheses (\emph{as if} it were a fraction)? \end{document} The output: I would like to enclose text which extends over two or more lines by an appropriately sized set of parentheses. I have tried using \left( and \right) as if I were in a mathematical environment, such as shown in in the fractional expression. However, this does not work when in a text environment. Using $...$ does not help either. How may I enclose the given text, which extends over two lines, entirely with one set of appropriately sized parentheses?
- The font "FreeSans" cannot be foundby Evan Aad on December 21, 2025 at 8:42 pm
I'm trying to compile a LaTex document that I wrote several years ago, and that used to compile successfully with lualatex. The file and its preamble are very long, but I managed to cut them down to the bare minimum that shows the problem I face while compiling the original document. \documentclass{article} \usepackage[ english , hebrew , bidi=basic , provide=* ]{babel} \babelfont[hebrew]{sf}[Renderer=Harfbuzz]{FreeSans} \begin{document} Hello, world! \end{document} When I try to compile the above document, which is stored in the file Main.tex, using the command lualatex Main.tex, the compilation fails, and the following error message appears near the end of Main.log: The font "FreeSans" cannot be found What is the problem, and how can I fix it? Following is the complete log. This is LuaHBTeX, Version 1.22.0 (MiKTeX 25.4) (format=lualatex 2025.12.21) 21 DEC 2025 22:37 restricted system commands enabled. **Main.tex (./Main.tex LaTeX2e <2025-11-01> L3 programming layer <2025-11-06> Lua module: luaotfload 2024-12-03 v3.29 Lua based OpenType font support Lua module: lualibs 2023-07-13 v2.76 ConTeXt Lua standard libraries. Lua module: lualibs-extended 2023-07-13 v2.76 ConTeXt Lua libraries -- extended collection. luaotfload | conf : Root cache directory is "C:/Users/Evan/AppData/Local/MiKTeX/ luatex-cache/generic/names". luaotfload | init : Loading fontloader "fontloader-2023-12-28.lua" from kpse-res olved path "C:/Users/Evan/AppData/Local/Programs/MiKTeX/tex/luatex/luaotfload/fo ntloader-2023-12-28.lua". Lua-only attribute luaotfload@noligature = 1 luaotfload | init : Context OpenType loader version 3.134 Inserting `luaotfload.node_processor' in `pre_linebreak_filter'. Inserting `luaotfload.node_processor' in `hpack_filter'. Inserting `luaotfload.glyph_stream' in `glyph_stream_provider'. Inserting `luaotfload.define_font' in `define_font'. Lua-only attribute luaotfload_color_attribute = 2 luaotfload | conf : Root cache directory is "C:/Users/Evan/AppData/Local/MiKTeX/ luatex-cache/generic/names". Inserting `luaotfload.harf.strip_prefix' in `find_opentype_file'. Inserting `luaotfload.harf.strip_prefix' in `find_truetype_file'. Removing `luaotfload.glyph_stream' from `glyph_stream_provider'. Inserting `luaotfload.harf.glyphstream' in `glyph_stream_provider'. Inserting `luaotfload.harf.finalize_vlist' in `post_linebreak_filter'. Inserting `luaotfload.harf.finalize_hlist' in `hpack_filter'. Inserting `luaotfload.cleanup_files' in `wrapup_run'. Inserting `luaotfload.harf.finalize_unicode' in `finish_pdffile'. Inserting `luaotfload.glyphinfo' in `glyph_info'. Lua-only attribute luaotfload.letterspace_done = 3 Inserting `luaotfload.aux.set_sscale_dimens' in `luaotfload.patch_font'. Inserting `luaotfload.aux.set_font_index' in `luaotfload.patch_font'. Inserting `luaotfload.aux.patch_cambria_domh' in `luaotfload.patch_font'. Inserting `luaotfload.aux.fixup_fontdata' in `luaotfload.patch_font_unsafe'. Inserting `luaotfload.aux.set_capheight' in `luaotfload.patch_font'. Inserting `luaotfload.aux.set_xheight' in `luaotfload.patch_font'. Inserting `luaotfload.rewrite_fontname' in `luaotfload.patch_font'. Inserting `tracingstacklevels' in `input_level_string'. (C:/Users/Evan/AppData/ Local/Programs/MiKTeX/tex/latex/base/article.cls Document Class: article 2025/01/22 v1.4n Standard LaTeX document class (C:/Users/Evan/AppData/Local/Programs/MiKTeX/tex/latex/base/size10.clo File: size10.clo 2025/01/22 v1.4n Standard LaTeX file (size option) luaotfload | db : Font names database loaded from C:/Users/Evan/AppData/Local/Mi KTeX/luatex-cache/generic/names/luaotfload-names.luc.gz) \c@part=\count273 \c@section=\count274 \c@subsection=\count275 \c@subsubsection=\count276 \c@paragraph=\count277 \c@subparagraph=\count278 \c@figure=\count279 \c@table=\count280 \abovecaptionskip=\skip49 \belowcaptionskip=\skip50 \bibindent=\dimen147 ) (C:/Users/Evan/AppData/Local/Programs/MiKTeX/tex/generic/babel/babel.sty Package: babel 2025/11/09 v25.15 The multilingual framework for LuaLaTeX, pdfLa TeX and XeLaTeX (C:/Users/Evan/AppData/Local/Programs/MiKTeX/tex/generic/babel/luababel.def \bbl@readstream=\read2 \l@afrikaans=\language2 Package babel Info: Non-standard hyphenation setup on input line 118. \l@ancientgreek=\language3 \l@armenian=\language4 \l@assamese=\language5 \l@basque=\language6 \l@belarusian=\language7 \l@bengali=\language8 \l@bokmal=\language9 \l@bulgarian=\language10 \l@catalan=\language11 \l@churchslavonic=\language12 \l@classiclatin=\language13 \l@coptic=\language14 \l@croatian=\language15 \l@czech=\language16 \l@danish=\language17 \l@dutch=\language18 \l@esperanto=\language19 \l@estonian=\language20 \l@ethiopic=\language21 \l@finnish=\language22 \l@french=\language23 \l@friulan=\language24 \l@galician=\language25 \l@georgian=\language26 \l@german=\language27 \l@greek=\language28 \l@gujarati=\language29 \l@hindi=\language30 \l@hungarian=\language31 \l@icelandic=\language32 \l@indonesian=\language33 \l@interlingua=\language34 \l@irish=\language35 \l@italian=\language36 \l@kannada=\language37 \l@kurmanji=\language38 \l@latin=\language39 \l@latvian=\language40 \l@lithuanian=\language41 \l@liturgicallatin=\language42 \l@macedonian=\language43 \l@malayalam=\language44 \l@marathi=\language45 \l@mongolian=\language46 \l@mongolianlmc=\language47 \l@monogreek=\language48 \l@ngerman=\language49 \l@nynorsk=\language50 \l@occitan=\language51 \l@oriya=\language52 \l@pali=\language53 \l@panjabi=\language54 \l@piedmontese=\language55 \l@polish=\language56 \l@portuguese=\language57 \l@romanian=\language58 \l@romansh=\language59 \l@russian=\language60 \l@sanskrit=\language61 \l@serbian=\language62 \l@serbianc=\language63 \l@slovak=\language64 \l@slovenian=\language65 \l@spanish=\language66 \l@swedish=\language67 \l@swissgerman=\language68 \l@tamil=\language69 \l@telugu=\language70 \l@thai=\language71 \l@turkish=\language72 \l@turkmen=\language73 \l@ukenglish=\language74 \l@ukrainian=\language75 \l@uppersorbian=\language76 \l@usenglishmax=\language77 \l@welsh=\language78 \babelcatcodetablenum=\catcodetable14 \bbl@pattcodes=\catcodetable15 ) \babel@savecnt=\count281 LaTeX Encoding Info: Redeclaring text command \ij (encoding OT1) on input li ne 2050. LaTeX Encoding Info: Redeclaring text command \IJ (encoding OT1) on input li ne 2052. LaTeX Encoding Info: Redeclaring text command \ij (encoding T1) on input lin e 2054. LaTeX Encoding Info: Redeclaring text command \IJ (encoding T1) on input lin e 2055. LaTeX Encoding Info: Ignoring declaration for text command \ij (encoding ?) on input line 2056. LaTeX Encoding Info: Ignoring declaration for text command \IJ (encoding ?) on input line 2058. LaTeX Encoding Info: Ignoring declaration for text command \SS (encoding ?) on input line 2083. \U@D=\dimen148 \l@unhyphenated=\language79 (C:/Users/Evan/AppData/Local/Programs/MiKTeX/tex/generic/babel/luababel.def \bbl@attr@locale=\attribute4 (C:/Users/Evan/AppData/Local/Programs/MiKTeX/tex/luatex/luatexbase/luatexbase.s ty Package: luatexbase 2015/10/04 v1.3 luatexbase interface to LuaTeX (C:/Users/Evan/AppData/Local/Programs/MiKTeX/tex/luatex/ctablestack/ctablestack .sty Package: ctablestack 2015/10/01 v1.0 Catcode table stable support \@catcodetablestackcnt=\count282 ) \CatcodeTableOther=\catcodetable16 \CatcodeTableExpl=\catcodetable17 ) Removing `luaotfload.node_processor' from `pre_linebreak_filter'. Inserting `Babel.pre_otfload_v' in `pre_linebreak_filter'. Inserting `luaotfload.node_processor' in `pre_linebreak_filter'. Removing `luaotfload.node_processor' from `hpack_filter'. Removing `luaotfload.harf.finalize_hlist' from `hpack_filter'. Inserting `Babel.pre_otfload_h' in `hpack_filter'. Inserting `luaotfload.node_processor' in `hpack_filter'. Inserting `luaotfload.harf.finalize_hlist' in `hpack_filter'. \bbl@attr@dir=\attribute5 ) Package babel Info: Configuration files are deprecated, as (babel) they can break document portability. (babel) Reported on input line 4175. ************************************* * Local config file bblopts.cfg used * (C:/Users/Evan/AppData/Local/Programs/MiKTeX/tex/latex/arabi/bblopts.cfg File: bblopts.cfg 2005/09/08 v0.1 add Arabic and Farsi to "declared" options of babel ) (C:/Users/Evan/AppData/Local/Programs/MiKTeX/tex/generic/babel/locale/en/babel- english.tex) (C:/Users/Evan/AppData/Local/Programs/MiKTeX/tex/generic/babel/locale/he/babel- hebrew.tex) Package babel Info: Importing font and identification data for english (babel) from babel-en.ini. Reported on input line 4298. (C:/Users/Evan/AppData/Local/Programs/MiKTeX/tex/latex/babel-english/english.ld f Language: english 2017/06/06 v3.3r English support from the babel system Package babel Info: Hyphen rules for 'canadian' set to \l@english (babel) (\language0). Reported on input line 102. Package babel Info: Hyphen rules for 'australian' set to \l@ukenglish (babel) (\language74). Reported on input line 105. Package babel Info: Hyphen rules for 'newzealand' set to \l@ukenglish (babel) (\language74). Reported on input line 108. ) Package babel Info: Importing data for hebrew (babel) from babel-he.ini. Reported on input line 4298. \bbl@readsubstream=\read3 Package babel Info: Hyphen rules for 'hebrew' set to \l@english (babel) (\language0). Reported on input line 4298. (C:/Users/Evan/AppData/Local/Programs/MiKTeX/tex/generic/babel/locale/he/babel- hebrew.tex) (C:/Users/Evan/AppData/Local/Programs/MiKTeX/tex/generic/babel/babel-ca-hebrew. tex \bbl@cntcommon=\count283 \bbl@hebrday=\count284 \bbl@hebrmonth=\count285 \bbl@hebryear=\count286 \bbl@gregday=\count287 \bbl@gregmonth=\count288 \bbl@gregyear=\count289 )) (C:/Users/Evan/AppData/Local/Programs/MiKTeX/tex/latex/fontspec/fontspec.sty (C:/Users/Evan/AppData/Local/Programs/MiKTeX/tex/latex/l3packages/xparse/xparse .sty (C:/Users/Evan/AppData/Local/Programs/MiKTeX/tex/latex/l3kernel/expl3.sty Package: expl3 2025-11-06 L3 programming layer (loader) (C:/Users/Evan/AppData/Local/Programs/MiKTeX/tex/latex/l3backend/l3backend-luat ex.def File: l3backend-luatex.def 2025-10-09 L3 backend support: PDF output (LuaTeX) \l__color_backend_stack_int=\count290 Inserting `l3color' in `luaotfload.parse_color'.)) Package: xparse 2025-10-09 L3 Experimental document command parser ) Package: fontspec 2025/09/29 v2.9g Font selection for XeLaTeX and LuaLaTeX Lua module: fontspec 2025/09/29 v2.9g Font selection for XeLaTeX and LuaLaTeX (C:/Users/Evan/AppData/Local/Programs/MiKTeX/tex/latex/fontspec/fontspec-luatex .sty Package: fontspec-luatex 2025/09/29 v2.9g Font selection for XeLaTeX and LuaLaT eX \l__fontspec_script_int=\count291 \l__fontspec_language_int=\count292 \l__fontspec_strnum_int=\count293 \l__fontspec_tmp_int=\count294 \l__fontspec_tmpa_int=\count295 \l__fontspec_tmpb_int=\count296 \l__fontspec_tmpc_int=\count297 \l__fontspec_em_int=\count298 \l__fontspec_emdef_int=\count299 \l__fontspec_strong_int=\count300 \l__fontspec_strongdef_int=\count301 \l__fontspec_tmpa_dim=\dimen149 \l__fontspec_tmpb_dim=\dimen150 \l__fontspec_tmpc_dim=\dimen151 (C:/Users/Evan/AppData/Local/Programs/MiKTeX/tex/latex/base/fontenc.sty Package: fontenc 2025/07/18 v2.1d Standard LaTeX package ) (C:/Users/Evan/AppData/Local/Programs/MiKTeX/tex/latex/fontspec/fontspec.cfg))) No file Main.aux. \openout1 = Main.aux LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 14. LaTeX Font Info: ... okay on input line 14. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 14. LaTeX Font Info: ... okay on input line 14. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 14. LaTeX Font Info: ... okay on input line 14. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 14. LaTeX Font Info: ... okay on input line 14. LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 14. LaTeX Font Info: ... okay on input line 14. LaTeX Font Info: Checking defaults for TU/lmr/m/n on input line 14. LaTeX Font Info: ... okay on input line 14. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 14. LaTeX Font Info: ... okay on input line 14. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 14. LaTeX Font Info: ... okay on input line 14. Package babel Info: The following font families will use the default (babel) settings for all or some languages: (babel) * \rmfamily = lmr (babel) [lmroman10-regular]:+tlig; at 10.0pt (babel) * \sffamily = lmss (babel) [lmsans10-regular]:+tlig; at 10.0pt (babel) * \ttfamily = lmtt (babel) [lmmono10-regular]: at 10.0pt (babel) There is nothing intrinsically wrong with it, but (babel) 'babel' will no set Script and Language, which could (babel) be relevant in some languages. If your document uses (babel) these families, consider redefining them with \babelfont. (babel) Reported on input line 14. luaotfload | cache : Lookup cache loaded from C:/Users/Evan/AppData/Local/MiKTeX /luatex-cache/generic/names/luaotfload-lookup-cache.luc. luaotfload | db : Reload initiated (formats: otf,ttf,ttc); reason: Font "FreeSan s" not found. ! Package fontspec Error: (fontspec) The font "FreeSans" cannot be found; this may be (fontspec) but usually is not a fontspec bug. Either there is (fontspec) a typo in the font name/file, the font is not (fontspec) installed (correctly), or there is a bug in the (fontspec) underlying font loading engine (XeTeX/luaotfload). For immediate help type H <return>. ... l.14 \begin{document} ? ! Emergency stop. ... l.14 \begin{document} A font might not be found for many reasons. Check the spelling, where the font is installed etc. etc. When in doubt, ask someone for help! Here is how much of LuaTeX's memory you used: 4382 strings out of 476081 100000,662416 words of node,token memory allocated 385 words of node memory still in use: 2 hlist, 1 rule, 1 dir, 3 kern, 1 glyph, 5 attribute, 48 glue_spec, 4 attribu te_list, 2 if_stack, 1 write nodes avail lists: 2:10,3:2,4:1,5:3,7:2,9:3,10:1 26826 multiletter control sequences out of 65536+600000 18 fonts using 1113215 bytes 77i,0n,80p,205b,228s stack positions out of 10000i,1000n,20000p,200000b,200000s ! ==> Fatal error occurred, no output PDF file produced!
- Underlining an Author Name in a Beamer Theme That Forces Uppercaseby user94293 on December 21, 2025 at 5:22 pm
I have a Beamer theme that turns the title and authors into uppercase. I'd like to underline the name of the author presenting the slides (in this case, Joe Dane). This however results in the error Improper alphabetic constant., while it works perfectly fine with the default theme. Any suggestions on how to fix this? \documentclass{beamer} \defbeamertemplate*{title page}{My theme}[1][]{% \begin{beamercolorbox}[ignorebg,#1]{title}% {\usebeamerfont{title}\usebeamercolor[fg]{title}% \MakeUppercase\inserttitle\par} \end{beamercolorbox}\par\medskip \begin{beamercolorbox}[ignorebg,#1]{author} {\usebeamerfont{author}\usebeamercolor[fg]{author}% \MakeUppercase\insertauthor\par}% \end{beamercolorbox}} \title{My Title} \author{Jane Doe \and \underline{Joe Dane}} \begin{document} \maketitle \end{document}
- Font "not loadable: metric data not found or bad"by Evan Aad on December 21, 2025 at 5:01 pm
I have encountered a similar problem to the one described in this TeX StackExchange post, but the solution given there does not work for me. I'm trying to compile a LaTex document that I wrote several years ago, and that used to compile successfully with lualatex. The file and its preamble are very long, but I managed to cut them down to the bare minimum that shows the problem I face while compiling the original document. \documentclass{article} \DeclareFontFamily{U}{mathb}{\hyphenchar\font45} \DeclareFontShape{U}{mathb}{m}{n}{% <-6> mathb5 <6-7> mathb6 <7-8> mathb7 <8-9> mathb8 <9-10> mathb9 <10-12> mathb10 <12-> mathb12 }{} \DeclareSymbolFont{mathb}{U}{mathb}{m}{n} \DeclareMathSymbol{\smsquare}{\mathbin}{mathb}{"05} \usepackage{unicode-math} \setmathfont{STIXTwoMath-Regular.otf} \begin{document} Hello, world! \end{document} When I try to compile the above document, which is stored in the file Main.tex, using the command lualatex Main.tex, the compilation fails, and the following error message appears near the end of Main.log: ! Font \U/mathb/m/n/10=mathb10 at 10pt not loadable: metric data not found or bad. I tried following the suggestion given in this answer to said post, namely to compile Main.tex using pdflatex rather than lualatex, but then I get the following error message in the end of Main.log: ! Package unicode-math Error: Cannot be run with pdftex! (unicode-math) Use XeLaTeX or LuaLaTeX instead. What is the problem, and how can I fix it? Here is a link to the complete log. I tried to add it to this post, but then the post was flagged as too long, and I couldn't save the post.
- circuitikz: anchoring a circular path symbolby cis on December 21, 2025 at 1:02 pm
How do I choose the anchor so that the line starts exactly at the edge at a path-source to[american current source]? \documentclass[margin=5pt, multi=circuitikz]{standalone} \usepackage{circuitikz} \begin{document} \begin{circuitikz}[] %\ctikzset{bipoles/border margin=0.0}% no effect \draw[] (0,0) to[american current source, o-o, name=GS] (2,0); \draw[->] (GS.north east) -- +(45:1); \end{circuitikz} \end{document}
- Sharelatex & Overleaf: update all files linked from external projects [closed]by master_juggler on December 21, 2025 at 12:22 pm
I am writing a thesis where i link PDFs of my diagrams into my main project. The diagrams are defined and compiled in different projects (limited file number per project, better structuring etc.).Is there a way in sharelatex / overleaf to programmatically update all the linked files in my main document ? Can be locally or API call, doesn't matter....
- Split long indices with sub-indices in \printindexby albert on December 21, 2025 at 10:21 am
In the question Split long items in \printindex problem posed was how to Split long items in \printindex and the focus was on commands like: \index{src/com/thecompany/theproject/theclass.java@{src/com/thecompany/theproject/theclass.java}} \index{src/com/thecompany/theproject/theclass.java (3cb19654487a12ab9cac6d9d3fc5262bf27ae84f)@{src/com/thecompany/theproject/theclass.java (3cb19654487a12ab9cac6d9d3fc5262bf27ae84f)}} For this there was the answer by @egreg : https://tex.stackexchange.com/a/757354/44119 The problem that was not addressed there was the problem of sub-indices as no real world example existed., but the was a mentioning that maybe something with a ist file could be accomplished. The problem is illustrated in (last index item missing IsLeftAssociative): MWE: \documentclass[twoside]{book} \usepackage{imakeidx} \usepackage{xurl} \makeindex \newcommand{\pathindex}[1]{% \index{#1@\detokenize{\path{#1}}}% } \makeatletter \renewcommand{\@idxitem}{\par\hangindent10pt } \makeatother \begin{document} We need some text \index{AhuntingYard@{AhuntingYard}!theOperatorAtTheTopOfTheOperatorAtackHasEqualPrecedenceAndIsLeftAssociative@{theOperatorAtTheTopOfTheOperatorAtackHasEqualPrecedenceAndIsLeftAssociative}} \index{theOperatorAtTheTopOfTheOperatorStackHasEqualPrecedenceAndIsLeftAssociative@{theOperatorAtTheTopOfTheOperatorStackHasEqualPrecedenceAndIsLeftAssociative}!AhuntingYard@{AhuntingYard}} \index{ShuntingYard@{ShuntingYard}!theOperatorAtTheTopOfTheOperatorStackHasEqualPrecedenceAndIsLeftAssociative@{theOperatorAtTheTopOfTheOperatorStackHasEqualPrecedenceAndIsLeftAssociative}} \index{theOperatorAtTheTopOfTheOperatorStackHasEqualPrecedenceAndIsLeftAssociative@{theOperatorAtTheTopOfTheOperatorStackHasEqualPrecedenceAndIsLeftAssociative}!ShuntingYard@{ShuntingYard}} %%\index{net.sourceforge.plantuml.tim.expression.ShuntingYard@{net.sourceforge.plantuml.tim.expression.ShuntingYard}!theOperatorAtTheTopOfTheOperatorStackHasEqualPrecedenceAndIsLeftAssociative@{theOperatorAtTheTopOfTheOperatorStackHasEqualPrecedenceAndIsLeftAssociative}} %%\index{theOperatorAtTheTopOfTheOperatorStackHasEqualPrecedenceAndIsLeftAssociative@{theOperatorAtTheTopOfTheOperatorStackHasEqualPrecedenceAndIsLeftAssociative}!net.sourceforge.plantuml.tim.expression.ShuntingYard@{net.sourceforge.plantuml.tim.expression.ShuntingYard}} \printindex \end{document} Some small notes on the MWE: The original lines I commented out by means of %% (to shorten things a bit) The lines with AhuntingYard I manually added for a better idea / view on the problem (in my opinion) it looks like the problem only appears in the main part of the indices, not in the sub-indices. the theOperatorAtTheTopOfTheOperatorStackHasEqualPrecedenceAndIsLeftAssociative is really the name of a function used in the underlying java code Question: how to properly split indices in case of sub-indices (ist file?) Edit I did some further investigations and used in the description part of the indices the command \url and this gave actually the results that are required but only in case the hyperlinks are not enabled (i.e. when \usepackage{hyperref} is not used). When hyperlinks are enabled we get links for the descriptive text, which are unwanted and links for the page numbers (which are wanted)> Question: how to get ride of the hyperlinks in the descriptive text.
- \prime \dprime \tprime (not so much) \qprime (looks good) STIX TWOby 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}
- ConTeXt: Correctly classifying arguments with CLDby gxono on December 21, 2025 at 12:06 am
I have the following MWE: \startluacode local function startenv(keyword, keyval) if keyword[1]:find("=", 1, true) then local cadena = utilities.parsers.array_to_string(keyword, ",") keyval = utilities.parsers.settings_to_hash(cadena) keyword = nil end --TODO end local function stopenv() end interfaces.definecommand("env", { environment = true, arguments = { {"option", "list"}, {"option", "hash"}, }, starter = startenv, stopper = stopenv, }) \stopluacode \starttext \startenv[title={a title}, author={an author}] \input ward \stopenv \startenv[hide][title={another title}] \input lorem \stopenv \stoptext I’d like to be able to correctly assign keyword and keyval depending on which kind of arguments are being used. I know one way would be to check whether the character = is present in keyword (since it gets read as a list), but that feels too verbose to me. Is there a simpler way to handle optional parameters? C:\Users\jonat>context --version mtx-context | ConTeXt Process Management 1.06 mtx-context | mtx-context | main context file: C:/context/tex/texmf-context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2025.12.05 17:46 mtx-context | main context file: C:/context/tex/texmf-context/tex/context/base/mkxl/context.mkxl mtx-context | current version: 2025.12.05 17:46
- Curves filled in in 3D plotby greg on December 20, 2025 at 5:28 pm
I am trying to plot the surface $z=x^2-y^2$ with the two curves $(t,0,t^2)$ and $(0,t,-t^2)$, but the curves keep getting filled in, and I can't seem to make it so they appear just as curves in the surface. \documentclass[10pt,t]{beamer} \usepackage{tikz} \usetikzlibrary{calc,arrows.meta,decorations.pathreplacing,positioning,patterns} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \pgfplotsset{ samples=41, samples y=41, filter discard warning=false, unbounded coords=jump, } \begin{document} \begin{frame}%[This is driving me crazy] \begin{tikzpicture}[scale=0.75] \begin{axis}[ title={Graph of $z=x^2-y^2$}, view={45}{30}, width=\linewidth, height=8cm, xlabel={$x$}, ylabel={$y$}, zlabel={$z$}, domain=-2.5:2.5, y domain=-2.5:2.5, samples=31, samples y=31, z buffer=sort, shader=interp, legend style={at={(0.02,0.98)},anchor=north west,draw=none,fill=none,font=\footnotesize}, legend cell align=left ] % surface \addplot3[surf, opacity=0.9] {x^2 - y^2}; \addlegendentry{surface} % x=0 slice \addplot3[ very thick, color=green, variable=t, domain=-2.5:2.5, samples=200 ] (0, t, -t^2); \addlegendentry{$x=0$ slice} % y=0 slice \addplot3[ very thick, color=black, variable=t, domain=-2.5:2.5, samples=200, % samples t=1, t domain=-1:1 ] (t, 0, t^2); \addlegendentry{$y=0$ slice} % tangent plane at (0,0,0): z=0 \addplot3[ surf, shader=flat, draw=none, fill opacity=0.35, domain=-1.5:1.5, y domain=-1.5:1.5, samples=2, samples y=2 ] {0}; \addlegendentry{tangent plane $z=0$} % critical point \addplot3+[only marks, mark=*, mark size=1.5pt] coordinates {(0,0,0)}; \end{axis} \end{tikzpicture} \end{frame} \end{document}
- Striking out an entire exercise using amsart environmentsby Sebastiano on December 20, 2025 at 1:57 pm
Suppose I am writing an exercise with a amsart enviroment like the one shown in the MWE below, \documentclass[12pt,a4paper]{article} \usepackage{geometry} \usepackage{amsmath} \usepackage{amssymb} \begin{document} Studiare in $(0, 0)$ la continuità, l'esistenza delle derivate parziali e la differenziabilità della funzione \[ f(x, y) = \begin{cases} \dfrac{x^3 + 3x^2y + y^4}{x^2 + y^2} & \text{se } (x, y) \neq (0, 0) \\ 0 & \text{se } (x, y) = (0, 0). \end{cases} \] Studiamo la continuità in $(0,0)$. Si ha \[ |f(x,y)| = \left| \frac{x^3 + 3x^2y + y^4}{x^2+y^2} \right| \leq |x|+3|y|+|y|^2 \] e quando $(x,y)\to(0,0)$ l'ultima diseguaglianza tende a $0$ e anche la funzione di partenza lo sarà. Quindi \[ \lim_{(x,y)\to(0,0)} f(x,y) = 0 = f(0,0), \] cioè $f$ è continua in $(0,0)$. \end{document} and I want to strike out the entire exercise, while preserving any environments created with amsart, as in the image below. I'm searching something without use tcolorbox (mdframed or similar) using simple commands (without package) to create an "oblique rule" .
- Split long items in \printindexby albert on December 20, 2025 at 1:37 pm
When having long items in the index these items can run into the next column (or off the page) like shown here: This results from the following MWE: \documentclass[twoside]{book} \usepackage{makeidx} \makeindex \begin{document} We need some text \index{src/com/thecompany/theproject/theclass.java@{src/com/thecompany/theproject/theclass.java}} \index{src/com/thecompany/theproject/theclass.java (3cb19654487a12ab9cac6d9d3fc5262bf27ae84f)@{src/com/thecompany/theproject/theclass.java (3cb19654487a12ab9cac6d9d3fc5262bf27ae84f)}} \index{za0@{za0}} \index{za1@{za1}} \index{za2@{za2}} \index{za3@{za3}} \index{za4@{za4}} \index{za5@{za5}} \index{za6@{za6}} \index{za7@{za7}} \index{za8@{za8}} \index{za9@{za9}} \index{zb0@{zb0}} \index{zb1@{zb1}} \index{zb2@{zb2}} \index{zb3@{zb3}} \index{zb4@{zb4}} \index{zb5@{zb5}} \index{zb6@{zb6}} \index{zb7@{zb7}} \index{zb8@{zb8}} \index{zb9@{zb9}} \index{zc0@{zc0}} \index{zc1@{zc1}} \index{zc2@{zc2}} \index{zc3@{zc3}} \index{zc4@{zc4}} \index{zc5@{zc5}} \index{zc6@{zc6}} \index{zc7@{zc7}} \index{zc8@{zc8}} \index{zc9@{zc9}} \index{zd0@{zd0}} \index{zd1@{zd1}} \index{zd2@{zd2}} \index{zd3@{zd3}} \index{zd4@{zd4}} \index{zd5@{zd5}} \index{zd6@{zd6}} \index{zd7@{zd7}} \index{zd8@{zd8}} \index{zd9@{zd9}} \index{ze0@{ze0}} \index{ze1@{ze1}} \index{ze2@{ze2}} \index{ze3@{ze3}} \index{ze4@{ze4}} \index{ze5@{ze5}} \index{ze6@{ze6}} \index{ze7@{ze7}} \index{ze8@{ze8}} \index{ze9@{ze9}} \printindex \end{document} The question is how can these long items be split like it already does at the space, but e.g. also on the slash or ...? Edit based on the comments with the answer some extra items: \index{a2!q20@{q20}} \index{a2!q21@{q21}} \index{SRCxCOMxTHECOMPANYxTHEPROJECTxTHECLASSlONG!q20@{q20}} \index{a2!srcXcomXthecompanyXtheprojectXtheclassLong@{srcXcomXthecompanyXtheprojectXtheclassLong}} We get in the output: and so we see that: \index{a2!srcXcomXthecompanyXtheprojectXtheclassLong@{srcXcomXthecompanyXtheprojectXtheclassLong}} is OK but \index{SRCxCOMxTHECOMPANYxTHEPROJECTxTHECLASSlONG!q20@{q20}} is not OK.
- How to restore xindy, supposedly corrupted by recent MikTeX updates?by Igor Kotelnikov on December 20, 2025 at 1:41 am
I am using \usepackage[xindy]{imakeidx} \makeindex[options=-L russian -C utf8] \makeindex[name=persons2, title=Именной указатель, columns=3 , options=-L russian -C utf8] to generate both subject and name indexes. Commands like \index{частота!круговая} \index[persons2]{Альфвен} write the terms into the PlasmaBook5.idx and persons2.idx files respectively. Next, the commands \printindex \printindex[persons2] located near the end of the book сall the makeindex.exe program directly from the xelatex or lualatex compiler. makeindex.exe generates .ind files on the fly, and the \printindex commands insert them into the text of the PlasmaBook5. Very convenient! Just two months ago, in mid-October, this scheme worked perfectly, but now suddenly the makeindex.exe program stopped generating .ind files with the following error: (D:/Users/KIA/YandexDisk/PlasmaBook5/Common/index2.tex*** - Win32 error 267 (ERROR_DIRECTORY): The directory name is invalid. It's clear that makeindex.exe doesn't find the directory where the .idx file is located, but I don't understand what needs to be changed to fix this problem. I use MikTeX in conjunction with WinEdt. WinEdt is configured to write .idx files to the TeXAux subdirectory. I don't recall changing WinEdt's settings recently. Perhaps a Windows 11 update broke this setup. Update 2025-12-29 It turns out that the trouble comes from xindy. It runs fine when called without arguments: D:\Users\KilledInAction\YandexDisk\PlasmaBook5\TeXAux>texindy.exe usage: texindy.pl [-V?h] [-qv] [-iglr] [-d magic] [-o outfile.ind] [-t log] \ [-L lang] [-C codepage] [-M module] [-I input] [idx0 idx1 ...] GNU-STYLE LONG OPTIONS FOR SHORT OPTIONS: -V / --version -? / -h / --help -q / --quiet -v / --verbose -i / --stdin -g / --german -l / --letter-ordering -r / --no-ranges -d / --debug (multiple times) (supported: script, keep_tmpfiles, markup, level=n) -o / --out-file -t / --log-file -L / --language -C / --codepage -M / --module (multiple times) -I / --input-markup (supported: latex, omega) However, it fails if called with arguments: D:\Users\KilledInAction\YandexDisk\PlasmaBook5\TeXAux>texindy.exe -L russian -C utf8 persons1.idx *** - Win32 error 267 (ERROR_DIRECTORY): The directory name is invalid. D:\Users\KilledInAction\YandexDisk\PlasmaBook5\TeXAux>texindy.exe persons1.idx *** - Win32 error 267 (ERROR_DIRECTORY): The directory name is invalid. Update 2025-12-22 It is now clear that the xindy.exe file from the MikTeX package is corrupted, since the xindy.exe file from the TeXLive package works correctly.
- How to create Tikz figure as the pictrure shown in imageby 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 luadrawby 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}
- Check if a macro internally contains inner macrosby tobiasBora on December 18, 2025 at 10:52 am
To make my library (robust-externalize) more robust, I need to check if a list of macro contains internal macros like \foo@bar (I may also need to do that for latex3 macros, but let's start simple). I could parse the string directly, but first I may have false positive (if an @ symbol is present, but not in a macro) and it might not be super efficient and I need super-fast code since this will be called a lot. Is it possible instead to directly check this property on the list of macro itself? MWE: \documentclass[]{article} \begin{document} \def\mylistofmacrosA{Hey \iam a normal list of \foomacro.} \def\mylistofmacrosB{Hey \iam a normal list of \foomacro with the @ symbol as a letter.} \makeatletter \def\mylistofmacrosC{Hey \iam a list of \foo@macro that contain the at symbol inside macros.} \makeatother \NewDocumentCommand{\isUsingInternalMacros}{m}{ TODO: Write "Yes" or "No" } \isUsingInternalMacros{\mylistofmacrosA} % => No \isUsingInternalMacros{\mylistofmacrosB} % => No \isUsingInternalMacros{\mylistofmacrosC} % => Yes \end{document}