• How to restore imakeidx, supposedly corrupted by recent Windows 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.

  • How to switch to lining numbers and/or tabular lining numbers in text mode inside a maths environment with Libertinus Math and pdflatex?
    by Eros Jones on December 19, 2025 at 11:32 pm

    I am writing a thesis with upright sans maths and use a lot of fonts and symbols. For this I've declared letters and numbers as symbols, and it works reasonably well. Except that Libertinus has gotten rid of the commands to switch to lining numbers and tabular lining numbers locally: \liningnumsf{...\, \tabularnumsf{\liningfigures{...}} etc. Consider the three points in the following image where I switch to text mode inside maths: numbers are oldstyle, and I wish to make them line up. I think I need a local fix, as it was possible with Libertine, see above. The code: \documentclass{book} % This file shows a configuration for upright sans maths fonts with Libertinus and Libertinus Math \usepackage[LGR,T1]{fontenc} \usepackage[oldstyle,proportional]{libertinus} \usepackage{libertinust1math}% [sansmath] option destroys \upvarphi \usepackage[libertinus,biolinum,greek=up,scale=1]{libgreek} \renewcommand*\ttdefault{lmtt} % The following provides upright sans font for maths, see egreg's answer at https://tex.stackexchange.com/questions/185172/changing-number-font-into-sans-serif \DeclareSymbolFont{sans}{T1}{LibertinusSans-TLF}{m}{n}% For standard lining figures use -LF \SetSymbolFont{sans}{bold}{T1}{LibertinusSans-TLF}{b}{n}% Does not seem to have an effect \DeclareMathSymbol{0}{\mathalpha}{sans}{"30} \DeclareMathSymbol{1}{\mathalpha}{sans}{"31} \DeclareMathSymbol{2}{\mathalpha}{sans}{"32} \DeclareMathSymbol{3}{\mathalpha}{sans}{"33} \DeclareMathSymbol{4}{\mathalpha}{sans}{"34} \DeclareMathSymbol{5}{\mathalpha}{sans}{"35} \DeclareMathSymbol{6}{\mathalpha}{sans}{"36} \DeclareMathSymbol{7}{\mathalpha}{sans}{"37} \DeclareMathSymbol{8}{\mathalpha}{sans}{"38} \DeclareMathSymbol{9}{\mathalpha}{sans}{"39} \DeclareMathSymbol{A}{\mathalpha}{sans}{`A} \DeclareMathSymbol{B}{\mathalpha}{sans}{`B} \DeclareMathSymbol{C}{\mathalpha}{sans}{`C} \DeclareMathSymbol{D}{\mathalpha}{sans}{`D} \DeclareMathSymbol{E}{\mathalpha}{sans}{`E} \DeclareMathSymbol{F}{\mathalpha}{sans}{`F} \DeclareMathSymbol{G}{\mathalpha}{sans}{`G} \DeclareMathSymbol{H}{\mathalpha}{sans}{`H} \DeclareMathSymbol{I}{\mathalpha}{sans}{`I} \DeclareMathSymbol{J}{\mathalpha}{sans}{`J} \DeclareMathSymbol{K}{\mathalpha}{sans}{`K} \DeclareMathSymbol{L}{\mathalpha}{sans}{`L} \DeclareMathSymbol{M}{\mathalpha}{sans}{`M} \DeclareMathSymbol{N}{\mathalpha}{sans}{`N} \DeclareMathSymbol{O}{\mathalpha}{sans}{`O} \DeclareMathSymbol{P}{\mathalpha}{sans}{`P} \DeclareMathSymbol{Q}{\mathalpha}{sans}{`Q} \DeclareMathSymbol{R}{\mathalpha}{sans}{`R} \DeclareMathSymbol{S}{\mathalpha}{sans}{`S} \DeclareMathSymbol{T}{\mathalpha}{sans}{`T} \DeclareMathSymbol{U}{\mathalpha}{sans}{`U} \DeclareMathSymbol{V}{\mathalpha}{sans}{`V} \DeclareMathSymbol{W}{\mathalpha}{sans}{`W} \DeclareMathSymbol{X}{\mathalpha}{sans}{`X} \DeclareMathSymbol{Y}{\mathalpha}{sans}{`Y} \DeclareMathSymbol{Z}{\mathalpha}{sans}{`Z} \DeclareMathSymbol{a}{\mathalpha}{sans}{`a} \DeclareMathSymbol{b}{\mathalpha}{sans}{`b} \DeclareMathSymbol{c}{\mathalpha}{sans}{`c} \DeclareMathSymbol{d}{\mathalpha}{sans}{`d} \DeclareMathSymbol{e}{\mathalpha}{sans}{`e} \DeclareMathSymbol{f}{\mathalpha}{sans}{`f} \DeclareMathSymbol{g}{\mathalpha}{sans}{`g} \DeclareMathSymbol{h}{\mathalpha}{sans}{`h} \DeclareMathSymbol{i}{\mathalpha}{sans}{`i} \DeclareMathSymbol{j}{\mathalpha}{sans}{`j} \DeclareMathSymbol{k}{\mathalpha}{sans}{`k} \DeclareMathSymbol{l}{\mathalpha}{sans}{`l} \DeclareMathSymbol{m}{\mathalpha}{sans}{`m} \DeclareMathSymbol{n}{\mathalpha}{sans}{`n} \DeclareMathSymbol{o}{\mathalpha}{sans}{`o} \DeclareMathSymbol{p}{\mathalpha}{sans}{`p} \DeclareMathSymbol{q}{\mathalpha}{sans}{`q} \DeclareMathSymbol{r}{\mathalpha}{sans}{`r} \DeclareMathSymbol{s}{\mathalpha}{sans}{`s} \DeclareMathSymbol{t}{\mathalpha}{sans}{`t} \DeclareMathSymbol{u}{\mathalpha}{sans}{`u} \DeclareMathSymbol{v}{\mathalpha}{sans}{`v} \DeclareMathSymbol{w}{\mathalpha}{sans}{`w} \DeclareMathSymbol{x}{\mathalpha}{sans}{`x} \DeclareMathSymbol{y}{\mathalpha}{sans}{`y} \DeclareMathSymbol{z}{\mathalpha}{sans}{`z} \usepackage{xurl} \usepackage{nccmath} \usepackage{mathtools} \usepackage{eufrak} \usepackage[mathcal]{euscript} \usepackage[nice]{nicefrac} \usepackage[normalweight=autolight,boldweight=autosemibold,onlysansmath]{mdsymbol} \setlength\parskip{0em plus 0em minus 0em} \thinmuskip=1\thinmuskip \medmuskip=1\medmuskip \thickmuskip=1\thickmuskip \widowpenalty=10000 \clubpenalty=10000 \raggedbottom \begin{document} \mathversion{sans}% For mdsymbol The standard maths font commands of Libertinus T1 Math: \begin{itemize} \item Just with \verb|$...$| (same as with \verb|\textsf{...}|, except the numbers) $1234567890$ $abcdefghijklmnopqrstuvwxyz$ $ABCDEFGHIJKLMNOPQRSTUVWXYZ$ \item With \verb|$\textth{...}$| (replaces \verb|$\mathit{...}$|) $\textth{1234567890}$ $\textth{abcdefghijklmnopqrstuvwxyz}$ $\textth{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ \item With \verb|$\mathrm{...}$| $\mathrm{1234567890}$ $\mathrm{abcdefghijklmnopqrstuvwxyz}$ $\mathrm{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ \item With \verb|$\mathbf{...}$| $\mathbf{1234567890}$ $\mathbf{abcdefghijklmnopqrstuvwxyz}$ $\mathbf{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ \item With \verb|$\mathsf{...}$| we get the AMS sans font $\mathsf{1234567890}$ $\mathsf{abcdefghijklmnopqrstuvwxyz}$ $\mathsf{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ \end{itemize} Text mode to get further styles: \begin{itemize} \item With \verb|$\textit{\sffamily...}$| $\textit{\sffamily 1234567890}$ $\textit{\sffamily abcdefghijklmnopqrstuvwxyz}$ $\textit{\sffamily ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ \item With \verb|$\textbf{\sffamily...}$| $\textbf{\sffamily 1234567890}$ $\textbf{\sffamily abcdefghijklmnopqrstuvwxyz}$ $\textbf{\sffamily ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ \item With \verb|\textbf{...}| we get a font that is a bit bolder than \verb|$\mathbf{...}$| $\textbf{1234567890}$ $\textbf{abcdefghijklmnopqrstuvwxyz}$ $\textbf{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ \end{itemize} Further maths: \begin{itemize} \item Sub- and superscripts $17^5, x^2_n$ \item Symbols (from \verb|mdsymbol|) $, ; . ... : < > \otimes\oplus\odot\otimes\subseteq\subset\top\bot\models\frac{2}{3}$ $\exists\forall (x\in X) p\cdot q [ab]+cd\rightarrow\Leftrightarrow\cup\cap\wedge\subsetneq\boxplus \{0,1,2,...\} \geq\times\equiv\dots=\Cup\Cap$ \item Greek (from \verb|libgreek|) $\alpha\beta\gamma\delta\epsilon\zeta\eta\theta\iota\kappa\lambda\mu\nu\xi\omicron\pi\rho\sigma\varsigma\varvarsigma\tau\upsilon\phi\upvarphi\chi\psi\omega$ $\Alpha\Beta\Gamma\Delta\Epsilon\Zeta\Eta\Theta\Iota\Kappa\Lambda\Mu\Nu\Xi\Omicron\Pi\Rho\Sigma\Tau\Upsilon\Phi\Chi\Psi\Omega$ $\boldsymbol{\alpha\beta\gamma\delta\epsilon\zeta\eta\theta\iota\kappa\lambda\mu\nu\xi\omicron\pi\rho\sigma\varsigma\varvarsigma\tau\upsilon\phi\upvarphi\chi\psi\omega}$ $\boldsymbol{\Alpha\Beta\Gamma\Delta\Epsilon\Zeta\Eta\Theta\Iota\Kappa\Lambda\Mu\Nu\Xi\Omicron\Pi\Rho\Sigma\Tau\Upsilon\Phi\Chi\Psi\Omega}$ \item Fraktur (from \verb|eufrak|) $\mathfrak{1234567890}$ $\mathfrak{abcdefghijklmnopqrstuvwxyz}$ $\mathfrak{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ $\boldsymbol{\mathfrak{1234567890}}$ $\boldsymbol{\mathfrak{abcdefghijklmnopqrstuvwxyz}}$ $\boldsymbol{\mathfrak{ABCDEFGHIJKLMNOPQRSTUVWXYZ}}$ \item Calligraphic (from \verb|euscript|) $\mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ $\boldsymbol{\mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ}}$ \end{itemize} \end{document} How can I switch to lining numbers/figures in text locally when I have Libertinus with oldstyle numbers for the body text? There should be a command (or a way, at least), but I can't find it.

  • How to create Tikz figure as the pictrure shown in image
    by Latexfan on December 19, 2025 at 7:17 pm

    I wish to make this figure with Tikz. I have tried but I can't make as in figure. Can you please assist me? \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} ```

  • How to install elstob_font to texmf-local?
    by Explorer on December 19, 2025 at 6:32 pm

    I want to install the elstob_font to my texmf-local directory. In the TeX folder and elstob-package.pdf in the project, we know that: This package supports Elstob, the variable font for medievalists (and others). The package requires LuaLATEX, since LuaTEX is the only flavor of TEX that supports variable fonts. Elstob is not in CTAN, so you must install the font in your system in order to use it (be sure to get “Elstob,” the variable version, not “ElstobD,” the static font). Place the files elstob.styand elstob.luain the same directory with the document you’re working on. But I want to install this package to my machine. What I have done is as below: Install the Elstob fonts in the .zip file system-wide in Elstob_3.003\Elstob_font\variable\, which could be parsed by fc-list: $ fc-list | grep "Elstob" C:/WINDOWS/fonts/Elstob-Italic.ttf: Elstob:style=Bold Italic C:/WINDOWS/fonts/Elstob.ttf: Elstob:style=10pt Bold C:/WINDOWS/fonts/Elstob-Italic.ttf: Elstob:style=6pt Italic C:/WINDOWS/fonts/Elstob.ttf: Elstob:style=10pt C:/WINDOWS/fonts/Elstob-Italic.ttf: Elstob:style=6pt Bold Italic C:/WINDOWS/fonts/Elstob.ttf: Elstob:style=8pt C:/WINDOWS/fonts/Elstob.ttf: Elstob:style=Regular C:/WINDOWS/fonts/Elstob.ttf: Elstob:style=8pt Bold C:/WINDOWS/fonts/Elstob.ttf: Elstob:style=14pt C:/WINDOWS/fonts/Elstob.ttf: Elstob:style=Light C:/WINDOWS/fonts/Elstob.ttf: Elstob:style=Medium C:/WINDOWS/fonts/Elstob.ttf: Elstob:style=SemiBold C:/WINDOWS/fonts/Elstob-Italic.ttf: Elstob:style=ExtraLight Italic C:/WINDOWS/fonts/Elstob-Italic.ttf: Elstob:style=Medium Italic C:/WINDOWS/fonts/Elstob.ttf: Elstob:style=6pt Bold C:/WINDOWS/fonts/Elstob-Italic.ttf: Elstob:style=14pt Bold Italic C:/WINDOWS/fonts/Elstob-Italic.ttf: Elstob:style=10pt Bold Italic C:/WINDOWS/fonts/Elstob.ttf: Elstob:style=14pt Bold C:/WINDOWS/fonts/Elstob-Italic.ttf: Elstob:style=Italic C:/WINDOWS/fonts/Elstob.ttf: Elstob:style=ExtraBold C:/WINDOWS/fonts/Elstob-Italic.ttf: Elstob:style=SemiBold Italic C:/WINDOWS/fonts/Elstob-Italic.ttf: Elstob:style=Light Italic C:/WINDOWS/fonts/Elstob-Italic.ttf: Elstob:style=10pt Italic C:/WINDOWS/fonts/Elstob-Italic.ttf: Elstob:style=8pt Bold Italic C:/WINDOWS/fonts/Elstob-Italic.ttf: Elstob:style=14pt Italic C:/WINDOWS/fonts/Elstob.ttf: Elstob:style=ExtraLight C:/WINDOWS/fonts/Elstob-Italic.ttf: Elstob:style=18pt Italic C:/WINDOWS/fonts/Elstob.ttf: Elstob C:/WINDOWS/fonts/Elstob-Italic.ttf: Elstob C:/WINDOWS/fonts/Elstob-Italic.ttf: Elstob:style=18pt Bold Italic C:/WINDOWS/fonts/Elstob.ttf: Elstob:style=6pt C:/WINDOWS/fonts/Elstob.ttf: Elstob:style=18pt C:/WINDOWS/fonts/Elstob-Italic.ttf: Elstob:style=8pt Italic C:/WINDOWS/fonts/Elstob.ttf: Elstob:style=Bold C:/WINDOWS/fonts/Elstob-Italic.ttf: Elstob:style=ExtraBold Italic C:/WINDOWS/fonts/Elstob.ttf: Elstob:style=18pt Bold put the elstob.sty and elstob.lua to texlive\texmf-local\tex\latex\elstob put the elstob-package.pdf and elstob-package.tex to texlive\texmf-local\doc\fonts\elstob run mktexlsr Then I run with texdoc elstob, the pdf-viewer show elstob-package.pdf as expected. Run the following MWE with lualatex: \documentclass{article} \usepackage[english]{babel} \usepackage{lipsum} \usepackage[ EightPtSemiboldFeatures={Language=English,StylisticSet=2}, EightPtSemiboldSizeFeatures={{size=5,wght=650,opsz=8.5}} ]{elstob} \begin{document} abcdefghijklmnopqrstuvwxyz0123456789 \lipsum[2] \end{document} It complained that: (c:/texlive/2025/texmf-dist/tex/latex/fontspec/fontspec.cfg)))cannot open Elsto b.lua: No such file or directory stack traceback: [C]: in function 'dofile' [\directlua]:1: in main chunk. l.77 mkaltcommands()} In elstob.sty, line 76, that is: \directlua{dofile("Elstob.lua") However, the file name in texlive\texmf-local\tex\latex\elstob is elstob.lua, NOT Elstob.lua. I didn't investigate into it(Because I was not familiar with luatex). Is my installation wrong with any step? Or just the lua script didn't get correct script name? Edit Claim that I was using the Windows11professionals 24H2 now. The case insensitive looks not the same case. If I followed the manuals's instruction: Place the files elstob.styand elstob.luain the same directory with the document you’re working on. It's really suprising that It works as a charm, no matter whether Elstob.lua or elstob.lua.... The terminal output is that: This is LuaHBTeX, Version 1.22.0 (TeX Live 2025) restricted system commands enabled. (./mwe.tex LaTeX2e <2025-11-01> L3 programming layer <2025-11-14> (c:/texlive/2025/texmf-dist/tex/latex/base/article.cls Document Class: article 2025/01/22 v1.4n Standard LaTeX document class (c:/texlive/2025/texmf-dist/tex/latex/base/size10.clo)) (c:/texlive/2025/texmf-dist/tex/generic/babel/babel.sty (c:/texlive/2025/texmf-dist/tex/generic/babel/luababel.def) (c:/texlive/2025/texmf-dist/tex/generic/babel/luababel.def) (c:/texlive/2025/texmf-dist/tex/generic/babel/locale/en/babel-english.tex) (c:/texlive/2025/texmf-dist/tex/generic/babel-english/english.ldf)) (c:/texlive/2025/texmf-dist/tex/latex/lipsum/lipsum.sty (c:/texlive/2025/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty (c:/texlive/2025/texmf-dist/tex/latex/l3kernel/expl3.sty (c:/texlive/2025/texmf-dist/tex/latex/l3backend/l3backend-luatex.def))) (c:/texlive/2025/texmf-dist/tex/latex/lipsum/lipsum.ltd.tex)) (./elstob.sty (c:/texlive/2025/texmf-dist/tex/generic/iftex/ifluatex.sty (c:/texlive/2025/texmf-dist/tex/generic/iftex/iftex.sty)) (c:/texlive/2025/texmf-dist/tex/latex/xkeyval/xkeyval.sty (c:/texlive/2025/texmf-dist/tex/generic/xkeyval/xkeyval.tex (c:/texlive/2025/texmf-dist/tex/generic/xkeyval/xkvutils.tex (c:/texlive/2025/texmf-dist/tex/generic/xkeyval/keyval.tex)))) (c:/texlive/2025/texmf-dist/tex/latex/fontspec/fontspec.sty (c:/texlive/2025/texmf-dist/tex/latex/l3packages/xparse/xparse.sty) (c:/texlive/2025/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty (c:/texlive/2025/texmf-dist/tex/latex/base/fontenc.sty) (c:/texlive/2025/texmf-dist/tex/latex/fontspec/fontspec.cfg))) Constructing MainRegSizeDef ) (./mwe.aux) (c:/texlive/2025/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-la.tex UTF-8 Latin hyphenation patterns (c:/texlive/2025/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-la.tex)) [1{c:/Users/Kasmir/.texlive2025/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./mwe.aux)) 439 words of node memory still in use: 4 hlist, 1 vlist, 1 rule, 4 glue, 3 kern, 1 glyph, 8 attribute, 48 glue_spec , 5 attribute_list, 1 write nodes avail lists: 2:49,3:16,4:10,5:896,6:4,7:1822,9:34,10:9,11:140 <c:/Windows/Fonts/Elstob.ttf> Output written on mwe.pdf (1 page, 13467 bytes). Transcript written on mwe.log.

  • Biblatex custom related format only works once (not for further entries)
    by modallyFragile on December 19, 2025 at 4:45 pm

    I use biblatex to lay out my academic CV. I want to have a custom type for grants/funding I have secured and a custom type for research visits I have been on. I have achieved this -- these are Funding and Visit below. Since the visits are often funding by the grants, I then want to use the biblatex 'related' mechanism to associate one with the other, and print this information in the bibliography. In particular, I want to set the related field in funding entries to the key of a related Visit entry, set the relatedtype field to fundingfor, and then have the information printed in the bibliography. I have achieved all this, except that the related information is only printed for the first Funding entry to be printed. Here's an MWE: \documentclass{article} % Declare new types \begin{filecontents}[overwrite]{\jobname.dbx} % Visit \DeclareDatamodelEntrytypes{visit} \DeclareDatamodelEntryfields[visit]{ date,day,endday,endmonth,endyear,month,year, institution, } % Funding \DeclareDatamodelEntrytypes{funding} \DeclareDatamodelEntryfields[funding]{ date,day,endday,endmonth,endyear,month,year, title } \end{filecontents} % Declare bib formatting \begin{filecontents}[overwrite]{\jobname.bbx} \RequireBibliographyStyle{standard} \NewBibliographyString{fundingfor} \DefineBibliographyStrings{english}{% fundingfor = {funding for} } \newbibmacro{visitto}{% \printtext{visit to\addspace}% \printlist{institution}% } \newbibmacro{related:fundingfor}[1]{% \entrydata{#1}{% \usebibmacro{visitto}% }% } \DeclareBibliographyDriver{visit}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{visitto}% \usebibmacro{finentry}% } \DeclareBibliographyDriver{funding}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \printfield{title}% \newblock{\addspace}% \usebibmacro{related}% \usebibmacro{finentry}% } \end{filecontents} % Examples of new types \begin{filecontents}[overwrite]{\jobname.bib} @Funding{fund_foo, title = {ZBig grant}, relatedtype = {fundingfor}, related = {visit_baz} } @Funding{fund_bar, title = {Large award}, relatedtype = {fundingfor}, related = {visit_qux} } @Funding{fund_boo, title = {Sizeable sum}, relatedtype = {fundingfor}, related = {visit_far} } @Visit{visit_baz, institution = {Impressive place} } @Visit{visit_qux, institution = {Prestigious location} } @Visit{visit_far, institution = {Somewhere else} } \end{filecontents} \usepackage[ bibstyle=\jobname, datamodel=\jobname ]{biblatex} \addbibresource{\jobname.bib} \begin{document} \nocite{*} \printbibliography \end{document} Which produces: The entries are structurally identical and obviously the driver is the same for each, so I would expect that if one prints the related data they all should. If I edit the data so that a different Funding entry sorts first (e.g change 'Big Grant' to 'ZBig Grant') it's still whichever is first to print that gets the related information, and none of the others. Why is the happening, and how can I fix it? TIA!

  • Large bottom margin persists onto next page after changing the geometry
    by Fictional Name on December 19, 2025 at 2:42 pm

    The following is a minimal example to demonstrate a problem I'm having with changing my margins in a book so that one two-page spread has a certain amount of whitespace in the margins, and the next two-page spread has different margins. \documentclass[12pt]{book} \RequirePackage[paperheight=9.0in,paperwidth=6.0in,bindingoffset=0.3in,inner=0.5in,outer=0.5in,bottom=0.5in]{geometry} \usepackage{lipsum} \newenvironment{widermargins}% {\expandafter\newgeometry{outer=1.2in,bottom=1.2in}}% {\restoregeometry} \begin{document} \thispagestyle{empty}\null\newpage % \begin{widermargins} \lipsum[1-4] \end{widermargins} \vfill\pagebreak % \lipsum[5-11] \end{document} Compiled with pdflatex, this generates a five-page document with a two-page spread on pp. 2-3 and another spread on pp. 4-5. The first spread is supposed to have bigger margins than the second spread. What I observe is that on pp. 4-5, the lengths of the pages are unbalanced. The left-hand page still seems to have the bigger bottom margin left over from the first two-page spread. The smaller bottom margin does finally kick in on the right-hand page, so the text column on the right is longer than the one on the left. If anyone can help me to fix this, I would appreciate it very much.

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

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

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

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

  • How to set Biolinum (sans serifs font) as default maths font in upright shape with pdflatex?
    by Eros Jones on December 18, 2025 at 9:36 pm

    I'm writing a thesis with loads of maths. The body text is set in Libertine (that is, with serifs), and all maths is set in Biolinum (meaning sans serifs) and upright. To make writing and reading the source code easier, and to have proper maths kerning in particular, I would like to set Biolinum in upright shape as the default maths font. I use libertinust1math already. The MWE explains it: \documentclass{article} \usepackage[LGR,T1]{fontenc} \usepackage[oldstyle,proportional,ttscale=0.875]{libertine} \renewcommand*\ttdefault{lmtt} \usepackage{libertinust1math} \usepackage[libertinus,biolinum,greek=up,scale=1]{libgreek} \usepackage[normalweight=autolight,boldweight=autosemibold,onlysansmath]{mdsymbol} \usepackage{mathtools} \begin{document} \mathversion{sans} \begin{enumerate} \item \verb|$ChS_{(M)}^2$| should look like $\textsf{ChS}_{(\textsf{M})}^\liningnumsf{2}$. \item \verb|$\mathit{ChS}_{(\mathit{M})}^2$| should look like $\textit{\sffamily ChS}_{(\textit{\sffamily M})}^\liningnumsf{2}$, just with the proper maths kerning, of course. \item \verb|$\mathnormal{ChS}_{(\mathnormal{M})}^2$| as well as \verb|$\mathsf{ChS}_{(\mathsf{M})}^2$| should look like $\textsf{ChS}_{(\textsf{M})}^\liningnumsf{2}$ again (same as first line). \item \verb|$\mathbf{ChS}_{(\mathbf{M})}^2$| should look like $\textbf{\sffamily ChS}_{(\textbf{\sffamily M})}^\liningnumsf{2}$. \item \verb|$\mathbf{\rmfamily ChS}_{(\mathbf{\rmfamily M})}^\mathrm{2}$| should look like $\textbf{\rmfamily ChS}_{(\textbf{\rmfamily M})}^\liningnums{2}$. \item \verb|$\mathrm{ChS}_{(\mathrm{M})}^\mathrm{2}$| should look like $\textrm{ChS}_{(\textrm{M})}^\liningnums{2}$. \end{enumerate} Numbers 1--4 are Biolinum (meaning \textit{sans serifs}). Numbers 5--6 are Libertine (meaning \textit{with serifs}). \end{document} I suspect this can perhaps be done using the \SetMathAlphabet command, like in \SetMathAlphabet{\mathrm}{normal}{\encodingdefault}{cmss}{\sfdefault}{n} \SetMathAlphabet{\mathbf}{bold}{\encodingdefault}{cmss}{\bfdefault}{n} but I don't know how to do it exactly. Important: I use pdflatex and cannot switch. PS >> The solution is modifying \usepackage{libertinust1math} to \usepackage[sansmath]{libertinust1math} in egreg's answer below. Then also the numbers are sans. Throughout. But one can switch the numbers back to serifs for the \mathrm style with the Tex command \rm. Alright for me as I (almost) don't use serifs in maths mode. UPDATE >> The sansmath option isn't actually a solution because it destroys the \upvarphi that I need. Furthermore: I have two pieces of news, one good, one bad. They both concern egreg's answer (now updated) in its previous state. First the good one. The code \DeclareSymbolFont{letters}{T1}{LibertinusSans-TLF}{m}{n} \DeclareMathAlphabet{\mathit}{T1}{LibertinusSans-TLF}{m}{it} \DeclareMathAlphabet{\mathsf}{T1}{LibertinusSans-TLF}{m}{n} \DeclareMathAlphabet{\mathbf}{T1}{LibertinusSans-TLF}{b}{n} \DeclareMathAlphabet{\mathrm}{T1}{LibertinusSerif-TLF}{m}{n} does work nicely and produces the required outcome, so that one has upright sans maths and can switch between variants as well. However, the sans numbers come from a different font. They look rather good, austere, much better in any case than AMS sans numbers. But they're still not Libertinus Sans. I've found the solution at Changing Number Font Into Sans Serif (by egreg), and applied it. Numbers in maths mode are then from Libertinus Sans. However, and this is the bad news, many symbols don't work anymore with the above code added. MWE, updating the MWE from above: \documentclass{article} \usepackage[LGR,T1]{fontenc} \usepackage[oldstyle,proportional]{libertinus} \usepackage{libertinust1math}% [sansmath] option destroys \upvarphi \usepackage[libertinus,biolinum,greek=up,scale=1]{libgreek} \usepackage{mathtools} \usepackage{amssymb} \renewcommand*\ttdefault{lmtt} \DeclareSymbolFont{letters}{T1}{LibertinusSans-TLF}{m}{n} \DeclareMathAlphabet{\mathit}{T1}{LibertinusSans-TLF}{m}{it} \DeclareMathAlphabet{\mathsf}{T1}{LibertinusSans-TLF}{m}{n} \DeclareMathAlphabet{\mathbf}{T1}{LibertinusSans-TLF}{b}{n} \DeclareMathAlphabet{\mathrm}{T1}{LibertinusSerif-TLF}{m}{n} % the following provides the correct sans numbers, see egreg's answer at https://tex.stackexchange.com/questions/185172/changing-number-font-into-sans-serif \DeclareSymbolFont{sfnumbers}{T1}{LibertinusSans-TLF}{m}{n} \SetSymbolFont{sfnumbers}{bold}{T1}{LibertinusSans-TLF}{b}{n} \DeclareMathSymbol{0}\mathalpha{sfnumbers}{"30} \DeclareMathSymbol{1}\mathalpha{sfnumbers}{"31} \DeclareMathSymbol{2}\mathalpha{sfnumbers}{"32} \DeclareMathSymbol{3}\mathalpha{sfnumbers}{"33} \DeclareMathSymbol{4}\mathalpha{sfnumbers}{"34} \DeclareMathSymbol{5}\mathalpha{sfnumbers}{"35} \DeclareMathSymbol{6}\mathalpha{sfnumbers}{"36} \DeclareMathSymbol{7}\mathalpha{sfnumbers}{"37} \DeclareMathSymbol{8}\mathalpha{sfnumbers}{"38} \DeclareMathSymbol{9}\mathalpha{sfnumbers}{"39} \begin{document} $\alpha\beta\pi\Pi\Delta\phi\upvarphi$ --- works $12345\text{text}67890abcDEF$ --- works $\mathnormal{12345\text{text}67890abcDEF}$ --- works $\mathsf{12345\text{text}67890abcDEF}$ --- works $\mathrm{12345\text{text}67890abcDEF}$ --- works $\mathbf{12345\text{text}67890abcDEF}$ --- works $\mathit{12345\text{text}67890abcDEF}$ --- works $\exists\forall (X\in x) [ab]+cd\rightarrow\Leftrightarrow\cup\cap\wedge\subsetneq\boxplus \{\,\} \geq\times\equiv\dots=\Cup\Cap$ --- works (although the \verb|\exists| and \verb|\forall| operators are rather ugly) \medskip $, ; . ... : < > \otimes\oplus\odot\otimes\subseteq\subset\top\bot\models$ --- \textbf{ERROR} \medskip The examples below all work: \begin{enumerate} \item \verb|$ChS_{(M)}^2$| $ChS_{(M)}^2$ should look like $\textsf{ChS}_{(\textsf{M})}^{2}$. \item \verb|$\mathit{ChS_{(M)}^\mathnormal{2}}$| $\mathit{ChS_{(M)}^\mathnormal{2}}$ should look like $\textit{\sffamily ChS}_{(\textit{\sffamily M})}^{2}$ (with proper maths kerning) \item \verb|$\mathnormal{ChS_{(M)}^2}$| $\mathnormal{ChS_{(M)}^2}$ should look like $\textsf{ChS}_{(\textsf{M})}^{2}$ \item \verb|$\mathbf{ChS_{(M)}^2}$| $\mathbf{ChS_{(M)}^2}$ should look like $\textbf{\sffamily ChS}_{(\textbf{\sffamily M})}^{2}$. \item \verb|$\mathrm{ChS_{(M)}^2}$| $\mathrm{ChS_{(M)}^2}$ should look like $\textrm{ChS}_{(\textrm{M})}^{\rm 2}$. \end{enumerate} \end{document} (I cannot add an image of the compilation result; the button is greyed out.) Comma becomes semicolon, full stop becomes colon, the less and greater symbols are wrong, and a lot of other symbol commands produce various accented letters. Curiously, if you look very closely at the semicolons and colons you will see that they are ever so slightly different between comma/semicolon and full stop/colon. I have tried to remedy this on my own, but no success so far.

  • chemnum \refcmpd does not correctly handle compound ranges in LaTeX
    by taiwan12 on December 18, 2025 at 6:45 pm

    \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{graphicx} \usepackage{chemstyle} \usepackage{chemnum} \begin{document} \begin{scheme} \replacecmpd{first:compound} \replacecmpd{second:compound} \includegraphics[width=\linewidth]{hexa} \end{scheme} \refcmpd{first:compound}, \refcmpd{second:compound} \end{document} This works fine for referencing individual compounds. However, I would like to reference a range of compounds, e.g., "2–10". But this does not automatically translate to "2–10"; it just prints the internal labels like TMP2–10. Is there a way to make chemnum automatically output a numeric range when referencing multiple compounds? Or is there a recommended workaround to display compound ranges correctly without manually typing each number? Any guidance would be greatly appreciated.

  • Can't get DocumentMetadata tagging to work on Mac (TexShop)
    by Aaron Johnson on December 18, 2025 at 6:42 pm

    I'm trying to produce a tagged PDF using the DocumentMetadata tagging function, but I can't get it to typeset with that key defined. I'm using TexShop version 5.57 and LuaLatex 2025.3.8. The MWE below typesets with no errors, but if I uncomment the tagging line, I get the error "LaTeX Error: The key 'document/metadata/tagging' is unknown and is being (LaTeX) ignored." How can I get the tagging key turned on? \DocumentMetadata{ lang = en, pdfstandard = ua-2, %tagging = on } \documentclass{article} \title{An Example with Document Metadata} \author{Author Name} \date{\today} \usepackage{hyperref} \hypersetup{pdftitle={A Tagged PDF Test}} \begin{document} \maketitle \section{Introduction} This document uses the new DocumentMetadata command to set accessibility and PDF standard information. \end{document}

  • How to automatically generate inline a), b), c) labels in LaTeX figure captions?
    by taiwan12 on December 18, 2025 at 6:25 pm

    I'm trying to create a LaTeX figure with a caption that lists multiple subitems inline, separated by semicolons, like this: \documentclass[11pt]{report} \usepackage{geometry} \usepackage{graphicx} \begin{document} \begin{figure}[h!] \centering \includegraphics[width=0.5\textwidth]{example-image-a} \caption{ \textbf{a)} aaa; \textbf{b)} bbb; \textbf{c)} ccc. } \label{fig:example} \end{figure} \begin{figure}[h!] \centering \includegraphics[width=0.5\textwidth]{example-image-b} \caption{ \textbf{a)} ddd; \textbf{b)} eee; \textbf{c)} fff. } \label{fig:example} \end{figure} \end{document} This works, but the labels (a), b), c)) are written manually. I would like to automatically generate these labels in the caption, so that if I add more items, the lettering continues (d), e), etc.), all in one line, separated by semicolons, and the last item ends with a period instead of a semicolon. My goal: Automatic a), b), c) …. Inline, separated by ; with a final . at the end. Compatible with \caption.

  • Compile & View fails although pdflatex runs successfully
    by Saïd Maanan on December 18, 2025 at 6:10 pm

    I am using TeXstudio 4.9.0 on Fedora Linux. Say I have the following file: \documentclass[12pt,a4paper]{article} \usepackage[margin=2cm]{geometry} \title{Title} \author{Author} \begin{document} \maketitle Hello World! \end{document} When I press F6 (Compile), compilation succeeds: Process started: pdflatex -synctex=1 -interaction=nonstopmode "test".tex Process exited normally But when I press F5 (Build & View), TeXstudio reports the following: Error: Could not start the command: Compile & View So pdflatex clearly runs and produces the PDF, but TeXstudio fails at the view stage. My Build configuration is as follows: And my Commands configuration is as follows: Any help addressing this issue would be appreciated. Note 1: I started having this problem when I activated version control: Note 2: TeXstudio now works normally again after clicking Options > Restore Default Settings.

  • Tikz/Circuitikz : naming \pic structures breaks the code
    by Michele Ancis on December 18, 2025 at 3:24 pm

    I am trying to build my circuit diagrams containing repeating structures, leveraging the \tikzset macro and a pic inside it. For instance, for an amplifier in feedback configuration, I'd write: \tikzset{ PDCIR/.pic = { \node[myop,scale=0.8] (-O) at (0,0) {}; \node[anchor=east] at (-O.+) {$V_{cm}$}; \path ($(-O.-)+(-2,0)$) coordinate (-PDsrc); % FORCE node creation before current source \draw (-PDsrc) -- ++(0,0) to[I, l=$PD_n$, sources/scale=0.5] (-O.-); \draw (-O.out) -- ++(0,2) coordinate (-x) to[R, l_=$R_f$, resistors/scale=0.6, resistors/thickness=4] (-O.- |- -x) -- (-O.-); } } (This is a pretty convoluted version that came out during interaction with ChatGPT, my original version did not have those pre-fixed names, nor too many explicit coordinate declarations...) This and other simpler versions work fine when instantiated through: \pic[scale=0.8] at (0,-6) {PDCIR}; But break the code when I try: \pic[scale=0.8] (PDC) at (0,-6) {PDCIR}; The error is: ! Package pgf Error: No shape named `pgfcirc@resistor1467start' is known. See the pgf package documentation for explanation. Type H <return> for immediate help. ... l.119 \pic[scale=0.8] (PDC) at (0,-6) {PDCIR2} I want to label my instances so that I can refer to their anchor points, for instance the output node of the opamp inside PDCIR - I am thinking this should be some very basic and easy operation, but I am really having difficulty understanding what could possibly go wrong. Is that some sort of bug, as this answer would seem to point to?

  • Cannot access \varphi of Biolinum
    by Eros Jones on December 18, 2025 at 3:02 pm

    I am using upright sans greek (Biolinum) for maths via libgreek. Everything is working fine, except that I am unable to use \varphi which gives phi in italics and, I think, in Libertinus font, so not even Biolinum. MWE: \documentclass{article} \usepackage[LGR,T1]{fontenc} \usepackage[libertinus,biolinum,greek=up]{libgreek} \begin{document} $\alpha\beta\gamma\iota\phi\varphi$ \end{document} This is the logfile: This is pdfTeX, Version 3.141592653-2.6-1.40.27 (TeX Live 2025) (preloaded format=pdflatex 2025.12.15) 18 DEC 2025 16:15 entering extended mode restricted \write18 enabled. %&-line parsing enabled. **varphi-test.tex (./varphi-test.tex LaTeX2e <2024-11-01> patch level 2 L3 programming layer <2025-01-18> (c:/texlive/2025/texmf-dist/tex/latex/base/article.cls Document Class: article 2024/06/29 v1.4n Standard LaTeX document class (c:/texlive/2025/texmf-dist/tex/latex/base/size10.clo File: size10.clo 2024/06/29 v1.4n Standard LaTeX file (size option) ) \c@part=\count196 \c@section=\count197 \c@subsection=\count198 \c@subsubsection=\count199 \c@paragraph=\count266 \c@subparagraph=\count267 \c@figure=\count268 \c@table=\count269 \abovecaptionskip=\skip49 \belowcaptionskip=\skip50 \bibindent=\dimen141 ) (c:/texlive/2025/texmf-dist/tex/latex/base/fontenc.sty Package: fontenc 2021/04/29 v2.0v Standard LaTeX package (c:/texlive/2025/texmf-dist/tex/latex/greek-fontenc/lgrenc.def File: lgrenc.def 2023-09-12 2.5 LGR Greek font encoding definitions Now handling font encoding LGR ... ... processing UTF-8 mapping file for font encoding LGR (c:/texlive/2025/texmf-dist/tex/latex/greek-inputenc/lgrenc.dfu File: lgrenc.dfu 2023-03-21 1.9 UTF-8 support for Greek defining Unicode char U+00A8 (decimal 168) defining Unicode char U+00AB (decimal 171) defining Unicode char U+00AF (decimal 175) defining Unicode char U+00B4 (decimal 180) defining Unicode char U+00B7 (decimal 183) defining Unicode char U+00BB (decimal 187) defining Unicode char U+0259 (decimal 601) defining Unicode char U+02D8 (decimal 728) defining Unicode char U+0374 (decimal 884) defining Unicode char U+0375 (decimal 885) defining Unicode char U+037A (decimal 890) defining Unicode char U+037E (decimal 894) defining Unicode char U+0384 (decimal 900) defining Unicode char U+0385 (decimal 901) defining Unicode char U+0386 (decimal 902) defining Unicode char U+0387 (decimal 903) defining Unicode char U+0388 (decimal 904) defining Unicode char U+0389 (decimal 905) defining Unicode char U+038A (decimal 906) defining Unicode char U+038C (decimal 908) defining Unicode char U+038E (decimal 910) defining Unicode char U+038F (decimal 911) defining Unicode char U+0390 (decimal 912) defining Unicode char U+0391 (decimal 913) defining Unicode char U+0392 (decimal 914) defining Unicode char U+0393 (decimal 915) defining Unicode char U+0394 (decimal 916) defining Unicode char U+0395 (decimal 917) defining Unicode char U+0396 (decimal 918) defining Unicode char U+0397 (decimal 919) defining Unicode char U+0398 (decimal 920) defining Unicode char U+0399 (decimal 921) defining Unicode char U+039A (decimal 922) defining Unicode char U+039B (decimal 923) defining Unicode char U+039C (decimal 924) defining Unicode char U+039D (decimal 925) defining Unicode char U+039E (decimal 926) defining Unicode char U+039F (decimal 927) defining Unicode char U+03A0 (decimal 928) defining Unicode char U+03A1 (decimal 929) defining Unicode char U+03A3 (decimal 931) defining Unicode char U+03A4 (decimal 932) defining Unicode char U+03A5 (decimal 933) defining Unicode char U+03A6 (decimal 934) defining Unicode char U+03A7 (decimal 935) defining Unicode char U+03A8 (decimal 936) defining Unicode char U+03A9 (decimal 937) defining Unicode char U+03AA (decimal 938) defining Unicode char U+03AB (decimal 939) defining Unicode char U+03AC (decimal 940) defining Unicode char U+03AD (decimal 941) defining Unicode char U+03AE (decimal 942) defining Unicode char U+03AF (decimal 943) defining Unicode char U+03B0 (decimal 944) defining Unicode char U+03B1 (decimal 945) defining Unicode char U+03B2 (decimal 946) defining Unicode char U+03B3 (decimal 947) defining Unicode char U+03B4 (decimal 948) defining Unicode char U+03B5 (decimal 949) defining Unicode char U+03B6 (decimal 950) defining Unicode char U+03B7 (decimal 951) defining Unicode char U+03B8 (decimal 952) defining Unicode char U+03B9 (decimal 953) defining Unicode char U+03BA (decimal 954) defining Unicode char U+03BB (decimal 955) defining Unicode char U+03BC (decimal 956) defining Unicode char U+03BD (decimal 957) defining Unicode char U+03BE (decimal 958) defining Unicode char U+03BF (decimal 959) defining Unicode char U+03C0 (decimal 960) defining Unicode char U+03C1 (decimal 961) defining Unicode char U+03C2 (decimal 962) defining Unicode char U+03C3 (decimal 963) defining Unicode char U+03C4 (decimal 964) defining Unicode char U+03C5 (decimal 965) defining Unicode char U+03C6 (decimal 966) defining Unicode char U+03C7 (decimal 967) defining Unicode char U+03C8 (decimal 968) defining Unicode char U+03C9 (decimal 969) defining Unicode char U+03CA (decimal 970) defining Unicode char U+03CB (decimal 971) defining Unicode char U+03CC (decimal 972) defining Unicode char U+03CD (decimal 973) defining Unicode char U+03CE (decimal 974) defining Unicode char U+03D0 (decimal 976) defining Unicode char U+03D1 (decimal 977) defining Unicode char U+03D5 (decimal 981) defining Unicode char U+03D6 (decimal 982) defining Unicode char U+03D8 (decimal 984) defining Unicode char U+03D9 (decimal 985) defining Unicode char U+03DA (decimal 986) defining Unicode char U+03DB (decimal 987) defining Unicode char U+03DC (decimal 988) defining Unicode char U+03DD (decimal 989) defining Unicode char U+03DE (decimal 990) defining Unicode char U+03DF (decimal 991) defining Unicode char U+03E0 (decimal 992) defining Unicode char U+03E1 (decimal 993) defining Unicode char U+03F0 (decimal 1008) defining Unicode char U+03F1 (decimal 1009) defining Unicode char U+03F4 (decimal 1012) defining Unicode char U+03F5 (decimal 1013) defining Unicode char U+1F00 (decimal 7936) defining Unicode char U+1F01 (decimal 7937) defining Unicode char U+1F02 (decimal 7938) defining Unicode char U+1F03 (decimal 7939) defining Unicode char U+1F04 (decimal 7940) defining Unicode char U+1F05 (decimal 7941) defining Unicode char U+1F06 (decimal 7942) defining Unicode char U+1F07 (decimal 7943) defining Unicode char U+1F08 (decimal 7944) defining Unicode char U+1F09 (decimal 7945) defining Unicode char U+1F0A (decimal 7946) defining Unicode char U+1F0B (decimal 7947) defining Unicode char U+1F0C (decimal 7948) defining Unicode char U+1F0D (decimal 7949) defining Unicode char U+1F0E (decimal 7950) defining Unicode char U+1F0F (decimal 7951) defining Unicode char U+1F10 (decimal 7952) defining Unicode char U+1F11 (decimal 7953) defining Unicode char U+1F12 (decimal 7954) defining Unicode char U+1F13 (decimal 7955) defining Unicode char U+1F14 (decimal 7956) defining Unicode char U+1F15 (decimal 7957) defining Unicode char U+1F18 (decimal 7960) defining Unicode char U+1F19 (decimal 7961) defining Unicode char U+1F1A (decimal 7962) defining Unicode char U+1F1B (decimal 7963) defining Unicode char U+1F1C (decimal 7964) defining Unicode char U+1F1D (decimal 7965) defining Unicode char U+1F20 (decimal 7968) defining Unicode char U+1F21 (decimal 7969) defining Unicode char U+1F22 (decimal 7970) defining Unicode char U+1F23 (decimal 7971) defining Unicode char U+1F24 (decimal 7972) defining Unicode char U+1F25 (decimal 7973) defining Unicode char U+1F26 (decimal 7974) defining Unicode char U+1F27 (decimal 7975) defining Unicode char U+1F28 (decimal 7976) defining Unicode char U+1F29 (decimal 7977) defining Unicode char U+1F2A (decimal 7978) defining Unicode char U+1F2B (decimal 7979) defining Unicode char U+1F2C (decimal 7980) defining Unicode char U+1F2D (decimal 7981) defining Unicode char U+1F2E (decimal 7982) defining Unicode char U+1F2F (decimal 7983) defining Unicode char U+1F30 (decimal 7984) defining Unicode char U+1F31 (decimal 7985) defining Unicode char U+1F32 (decimal 7986) defining Unicode char U+1F33 (decimal 7987) defining Unicode char U+1F34 (decimal 7988) defining Unicode char U+1F35 (decimal 7989) defining Unicode char U+1F36 (decimal 7990) defining Unicode char U+1F37 (decimal 7991) defining Unicode char U+1F38 (decimal 7992) defining Unicode char U+1F39 (decimal 7993) defining Unicode char U+1F3A (decimal 7994) defining Unicode char U+1F3B (decimal 7995) defining Unicode char U+1F3C (decimal 7996) defining Unicode char U+1F3D (decimal 7997) defining Unicode char U+1F3E (decimal 7998) defining Unicode char U+1F3F (decimal 7999) defining Unicode char U+1F40 (decimal 8000) defining Unicode char U+1F41 (decimal 8001) defining Unicode char U+1F42 (decimal 8002) defining Unicode char U+1F43 (decimal 8003) defining Unicode char U+1F44 (decimal 8004) defining Unicode char U+1F45 (decimal 8005) defining Unicode char U+1F48 (decimal 8008) defining Unicode char U+1F49 (decimal 8009) defining Unicode char U+1F4A (decimal 8010) defining Unicode char U+1F4B (decimal 8011) defining Unicode char U+1F4C (decimal 8012) defining Unicode char U+1F4D (decimal 8013) defining Unicode char U+1F50 (decimal 8016) defining Unicode char U+1F51 (decimal 8017) defining Unicode char U+1F52 (decimal 8018) defining Unicode char U+1F53 (decimal 8019) defining Unicode char U+1F54 (decimal 8020) defining Unicode char U+1F55 (decimal 8021) defining Unicode char U+1F56 (decimal 8022) defining Unicode char U+1F57 (decimal 8023) defining Unicode char U+1F59 (decimal 8025) defining Unicode char U+1F5B (decimal 8027) defining Unicode char U+1F5D (decimal 8029) defining Unicode char U+1F5F (decimal 8031) defining Unicode char U+1F60 (decimal 8032) defining Unicode char U+1F61 (decimal 8033) defining Unicode char U+1F62 (decimal 8034) defining Unicode char U+1F63 (decimal 8035) defining Unicode char U+1F64 (decimal 8036) defining Unicode char U+1F65 (decimal 8037) defining Unicode char U+1F66 (decimal 8038) defining Unicode char U+1F67 (decimal 8039) defining Unicode char U+1F68 (decimal 8040) defining Unicode char U+1F69 (decimal 8041) defining Unicode char U+1F6A (decimal 8042) defining Unicode char U+1F6B (decimal 8043) defining Unicode char U+1F6C (decimal 8044) defining Unicode char U+1F6D (decimal 8045) defining Unicode char U+1F6E (decimal 8046) defining Unicode char U+1F6F (decimal 8047) defining Unicode char U+1F70 (decimal 8048) defining Unicode char U+1F71 (decimal 8049) defining Unicode char U+1F72 (decimal 8050) defining Unicode char U+1F73 (decimal 8051) defining Unicode char U+1F74 (decimal 8052) defining Unicode char U+1F75 (decimal 8053) defining Unicode char U+1F76 (decimal 8054) defining Unicode char U+1F77 (decimal 8055) defining Unicode char U+1F78 (decimal 8056) defining Unicode char U+1F79 (decimal 8057) defining Unicode char U+1F7A (decimal 8058) defining Unicode char U+1F7B (decimal 8059) defining Unicode char U+1F7C (decimal 8060) defining Unicode char U+1F7D (decimal 8061) defining Unicode char U+1F80 (decimal 8064) defining Unicode char U+1F81 (decimal 8065) defining Unicode char U+1F82 (decimal 8066) defining Unicode char U+1F83 (decimal 8067) defining Unicode char U+1F84 (decimal 8068) defining Unicode char U+1F85 (decimal 8069) defining Unicode char U+1F86 (decimal 8070) defining Unicode char U+1F87 (decimal 8071) defining Unicode char U+1F88 (decimal 8072) defining Unicode char U+1F89 (decimal 8073) defining Unicode char U+1F8A (decimal 8074) defining Unicode char U+1F8B (decimal 8075) defining Unicode char U+1F8C (decimal 8076) defining Unicode char U+1F8D (decimal 8077) defining Unicode char U+1F8E (decimal 8078) defining Unicode char U+1F8F (decimal 8079) defining Unicode char U+1F90 (decimal 8080) defining Unicode char U+1F91 (decimal 8081) defining Unicode char U+1F92 (decimal 8082) defining Unicode char U+1F93 (decimal 8083) defining Unicode char U+1F94 (decimal 8084) defining Unicode char U+1F95 (decimal 8085) defining Unicode char U+1F96 (decimal 8086) defining Unicode char U+1F97 (decimal 8087) defining Unicode char U+1F98 (decimal 8088) defining Unicode char U+1F99 (decimal 8089) defining Unicode char U+1F9A (decimal 8090) defining Unicode char U+1F9B (decimal 8091) defining Unicode char U+1F9C (decimal 8092) defining Unicode char U+1F9D (decimal 8093) defining Unicode char U+1F9E (decimal 8094) defining Unicode char U+1F9F (decimal 8095) defining Unicode char U+1FA0 (decimal 8096) defining Unicode char U+1FA1 (decimal 8097) defining Unicode char U+1FA2 (decimal 8098) defining Unicode char U+1FA3 (decimal 8099) defining Unicode char U+1FA4 (decimal 8100) defining Unicode char U+1FA5 (decimal 8101) defining Unicode char U+1FA6 (decimal 8102) defining Unicode char U+1FA7 (decimal 8103) defining Unicode char U+1FA8 (decimal 8104) defining Unicode char U+1FA9 (decimal 8105) defining Unicode char U+1FAA (decimal 8106) defining Unicode char U+1FAB (decimal 8107) defining Unicode char U+1FAC (decimal 8108) defining Unicode char U+1FAD (decimal 8109) defining Unicode char U+1FAE (decimal 8110) defining Unicode char U+1FAF (decimal 8111) defining Unicode char U+1FB0 (decimal 8112) defining Unicode char U+1FB1 (decimal 8113) defining Unicode char U+1FB2 (decimal 8114) defining Unicode char U+1FB3 (decimal 8115) defining Unicode char U+1FB4 (decimal 8116) defining Unicode char U+1FB6 (decimal 8118) defining Unicode char U+1FB7 (decimal 8119) defining Unicode char U+1FB8 (decimal 8120) defining Unicode char U+1FB9 (decimal 8121) defining Unicode char U+1FBA (decimal 8122) defining Unicode char U+1FBB (decimal 8123) defining Unicode char U+1FBC (decimal 8124) defining Unicode char U+1FBD (decimal 8125) defining Unicode char U+1FBE (decimal 8126) defining Unicode char U+1FBF (decimal 8127) defining Unicode char U+1FC0 (decimal 8128) defining Unicode char U+1FC1 (decimal 8129) defining Unicode char U+1FC2 (decimal 8130) defining Unicode char U+1FC3 (decimal 8131) defining Unicode char U+1FC4 (decimal 8132) defining Unicode char U+1FC6 (decimal 8134) defining Unicode char U+1FC7 (decimal 8135) defining Unicode char U+1FC8 (decimal 8136) defining Unicode char U+1FC9 (decimal 8137) defining Unicode char U+1FCA (decimal 8138) defining Unicode char U+1FCB (decimal 8139) defining Unicode char U+1FCC (decimal 8140) defining Unicode char U+1FCD (decimal 8141) defining Unicode char U+1FCE (decimal 8142) defining Unicode char U+1FCF (decimal 8143) defining Unicode char U+1FD0 (decimal 8144) defining Unicode char U+1FD1 (decimal 8145) defining Unicode char U+1FD2 (decimal 8146) defining Unicode char U+1FD3 (decimal 8147) defining Unicode char U+1FD6 (decimal 8150) defining Unicode char U+1FD7 (decimal 8151) defining Unicode char U+1FD8 (decimal 8152) defining Unicode char U+1FD9 (decimal 8153) defining Unicode char U+1FDA (decimal 8154) defining Unicode char U+1FDB (decimal 8155) defining Unicode char U+1FDD (decimal 8157) defining Unicode char U+1FDE (decimal 8158) defining Unicode char U+1FDF (decimal 8159) defining Unicode char U+1FE0 (decimal 8160) defining Unicode char U+1FE1 (decimal 8161) defining Unicode char U+1FE2 (decimal 8162) defining Unicode char U+1FE3 (decimal 8163) defining Unicode char U+1FE4 (decimal 8164) defining Unicode char U+1FE5 (decimal 8165) defining Unicode char U+1FE6 (decimal 8166) defining Unicode char U+1FE7 (decimal 8167) defining Unicode char U+1FE8 (decimal 8168) defining Unicode char U+1FE9 (decimal 8169) defining Unicode char U+1FEA (decimal 8170) defining Unicode char U+1FEB (decimal 8171) defining Unicode char U+1FEC (decimal 8172) defining Unicode char U+1FED (decimal 8173) defining Unicode char U+1FEE (decimal 8174) defining Unicode char U+1FEF (decimal 8175) defining Unicode char U+1FF2 (decimal 8178) defining Unicode char U+1FF3 (decimal 8179) defining Unicode char U+1FF4 (decimal 8180) defining Unicode char U+1FF6 (decimal 8182) defining Unicode char U+1FF7 (decimal 8183) defining Unicode char U+1FF8 (decimal 8184) defining Unicode char U+1FF9 (decimal 8185) defining Unicode char U+1FFA (decimal 8186) defining Unicode char U+1FFB (decimal 8187) defining Unicode char U+1FFC (decimal 8188) defining Unicode char U+1FFD (decimal 8189) defining Unicode char U+1FFE (decimal 8190) defining Unicode char U+2013 (decimal 8211) defining Unicode char U+2014 (decimal 8212) defining Unicode char U+2018 (decimal 8216) defining Unicode char U+2019 (decimal 8217) defining Unicode char U+201A (decimal 8218) defining Unicode char U+2030 (decimal 8240) defining Unicode char U+2039 (decimal 8249) defining Unicode char U+203A (decimal 8250) defining Unicode char U+20AC (decimal 8364) defining Unicode char U+2126 (decimal 8486) defining Unicode char U+10144 (decimal 65860) defining Unicode char U+10145 (decimal 65861) defining Unicode char U+10146 (decimal 65862) defining Unicode char U+10147 (decimal 65863) ) (c:/texlive/2025/texmf-dist/tex/latex/greek-fontenc/greek-fontenc.def File: greek-fontenc.def 2023-09-12 2.5 Common Greek font encoding definitions ))) (c:/texlive/2025/texmf-dist/tex/latex/libgreek/libgreek.sty Package: libgreek 2022/11/11 1.1 Greek in math mode via libertinus-type1 (JFB) (c:/texlive/2025/texmf-dist/tex/latex/kvoptions/kvoptions.sty Package: kvoptions 2022-06-15 v3.15 Key value format for package options (HO) (c:/texlive/2025/texmf-dist/tex/latex/graphics/keyval.sty Package: keyval 2022/05/29 v1.15 key=value parser (DPC) \KV@toks@=\toks17 ) (c:/texlive/2025/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty Package: ltxcmds 2023-12-04 v1.26 LaTeX kernel commands for general use (HO) ) (c:/texlive/2025/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty Package: kvsetkeys 2022-10-05 v1.19 Key value parser (HO) )) LaTeX Font Info: Redeclaring font encoding LGR on input line 191. \symlibgreekup=\mathgroup4 LaTeX Font Info: Overwriting symbol font `libgreekup' in version `bold' (Font) LGR/LibertinusSans-TLF/m/n --> LGR/LibertinusSans-TLF/b /n on input line 197. \symlibgreekit=\mathgroup5 LaTeX Font Info: Overwriting symbol font `libgreekit' in version `bold' (Font) LGR/LibertinusSans-TLF/m/it --> LGR/LibertinusSans-TLF/ b/it on input line 203. ) (c:/texlive/2025/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def File: l3backend-pdftex.def 2024-05-08 L3 backend support: PDF output (pdfTeX) \l__color_backend_stack_int=\count270 \l__pdf_internal_box=\box52 ) (./varphi-test.aux) \openout1 = `varphi-test.aux'. LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 6. LaTeX Font Info: ... okay on input line 6. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 6. LaTeX Font Info: ... okay on input line 6. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 6. LaTeX Font Info: ... okay on input line 6. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 6. LaTeX Font Info: ... okay on input line 6. LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 6. LaTeX Font Info: ... okay on input line 6. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 6. LaTeX Font Info: ... okay on input line 6. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 6. LaTeX Font Info: ... okay on input line 6. LaTeX Font Info: Checking defaults for LGR/cmr/m/n on input line 6. LaTeX Font Info: Trying to load font information for LGR+cmr on input line 6 . (c:/texlive/2025/texmf-dist/tex/latex/cbfonts-fd/lgrcmr.fd File: lgrcmr.fd 2017/07/29 v1.2 Greek European Computer Regular ) LaTeX Font Info: ... okay on input line 6. LaTeX Font Info: External font `cmex10' loaded for size (Font) <7> on input line 7. LaTeX Font Info: External font `cmex10' loaded for size (Font) <5> on input line 7. LaTeX Font Info: Trying to load font information for LGR+LibertinusSans-TLF on input line 7. (c:/texlive/2025/texmf-dist/tex/latex/libertinus-type1/LGRLibertinusSans-TLF.fd File: LGRLibertinusSans-TLF.fd 2024/09/22 (autoinst) Font definitions for LGR/L ibertinusSans-TLF. ) LaTeX Font Info: Font shape `LGR/LibertinusSans-TLF/m/n' will be (Font) scaled to size 10.0pt on input line 7. LaTeX Font Info: Font shape `LGR/LibertinusSans-TLF/m/n' will be (Font) scaled to size 7.0pt on input line 7. LaTeX Font Info: Font shape `LGR/LibertinusSans-TLF/m/n' will be (Font) scaled to size 5.0pt on input line 7. LaTeX Font Info: Font shape `LGR/LibertinusSans-TLF/m/it' will be (Font) scaled to size 10.0pt on input line 7. LaTeX Font Info: Font shape `LGR/LibertinusSans-TLF/m/it' will be (Font) scaled to size 7.0pt on input line 7. LaTeX Font Info: Font shape `LGR/LibertinusSans-TLF/m/it' will be (Font) scaled to size 5.0pt on input line 7. [1 {c:/texlive/2025/texmf-var/fonts/map/pdftex/updmap/pdftex.map}{c:/texlive/2025/ texmf-dist/fonts/enc/dvips/libertinus-type1/lbn1_37i5h5.enc}{c:/texlive/2025/te xmf-dist/fonts/enc/dvips/cm-super/cm-super-t1.enc}] (./varphi-test.aux) *********** LaTeX2e <2024-11-01> patch level 2 L3 programming layer <2025-01-18> *********** ) Here is how much of TeX's memory you used: 2708 strings out of 473189 44000 string characters out of 5719957 410256 words of memory out of 5000000 25996 multiletter control sequences out of 15000+600000 563308 words of font info for 43 fonts, out of 8000000 for 9000 1141 hyphenation exceptions out of 8191 57i,5n,65p,466b,120s stack positions out of 10000i,1000n,20000p,200000b,200000s <c:/texlive/2025/texmf-dist/fonts/type1/public/libertinus-type1/LibertinusSan s-Regular.pfb><c:/texlive/2025/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10 .pfb><c:/texlive/2025/texmf-dist/fonts/type1/public/cm-super/sfrm1000.pfb> Output written on varphi-test.pdf (1 page, 96602 bytes). PDF statistics: 25 PDF objects out of 1000 (max. 8388607) 15 compressed objects within 1 object stream 0 named destinations out of 1000 (max. 500000) 1 words of extra memory for PDF output out of 10000 (max. 10000000) I have installed Biolinum for Windows as well. In Word or Visio I can access the glyphs with Insert/Symbol and selecting the correct one from the character table. This is what the phi should look like: Any ideas how to do it in Tex? PS >> libgreek does not seem to have \varphi defined, so this may already be a fault of Biolinum, I guess. I need the phi in two or three places only, so a per-case solution (using the unicode id of the glyph, for example) would be fine.

  • Shaded quotation environment: the shading goes on top of figures
    by wmnorth on December 18, 2025 at 2:40 pm

    I use this solution to get a shaded quotation environment---and it works marvelously, except when the quotation is to the side of a wrapfigure'd image. In such a scenario, the shading sits on top of the picture, as the following MWE shows. \documentclass[a5paper,12pt,dvipsnames*,twoside]{article} \usepackage{lipsum} % for dummy placeholders... \usepackage{graphicx} \usepackage{framed} \usepackage{quoting} \usepackage{wrapfig} \usepackage{xcolor} % --- Make quotation environment have a background colour. --- % Requires packages framed, quoting. \colorlet{shadecolor}{lightgray!20} \renewenvironment{quotation} {\begin{shaded*}\quoting[leftmargin=0pt, vskip=0pt]} {\endquoting\end{shaded*}} \begin{document} % \maketitle \date{\vspace{-10em}} \section{Introduction} \label{sec:intro} \begin{wrapfigure}{L}{0.48\textwidth} \includegraphics[scale=0.25]{dependency.png} \caption{The internet's foundations.} \label{fig:xkcd_dependency} \end{wrapfigure} \lipsum[4][1] \begin{quotation} \noindent\lipsum[4][3] \end{quotation} \end{document} My question, then, is the obvious one: how can I prevent this from happening? I.e., how can I limit the scope of shading to the length of the text? Thank you in advance for your help. EDIT: Neither the answer by @samcarter_is_at_topanswers.xyz nor that @kabenyuk work when the quoted text goes beyond the end of the image: To contrast, here is the result with the original quotation environment:

  • Create macro with named arguments
    by user1724887 on December 18, 2025 at 1:30 pm

    I am new to latex. I need to create a text that has a bunch of entries that have the same structure, so I thought I would create a macro for it. However there are 7 moving parts, so it needs 7 arguments. It's becoming hard to read, hard to know which argument number I'm on. So I want to name the arguments (not so much in the definition of the macro, but at least when it's used). I tried searching on the net, but found no easy solution, and it gets very quickly highly unreadable (using xparse and things like that) for non-latex experts. I found out, using luatex, I can include lua code, which seems way more readable. So I switched to luatex. The usage that I am proposing is as follows. I'm open to other usages, but it should be at least easily readable, prone to extra spaces (and newlines), and close to the latex syntax. values can themselves have newlines, and latex code (such as \textbf). curly braces (the character ending the value) should be able to be escaped in the values. \myfunction { arg1 = {value1}, arg2 = {value2}, arg3 = {value3}, arg4 = {value4}, arg5 = {value5}, arg6 = {value6}, arg7 = {value7} } The way I tried to parse it is as follows. \documentclass{article} \usepackage{luacode} \begin{luacode} function parse_args(input) local result = {} local pattern = '(%w+)%s*=%s*{%s*([^}]+)%s*}' for key, value in input:gmatch(pattern) do result[key] = value end return result end function my_function(input) local args = parse_args(input) for key, value in args do tex.print(key .. " : " .. value .. "\\") end \end{luacode} \newcommand{\myfunction}[1]{% \directlua{ my_function([===[#1]===]) }% } \begin{document} \myfunction { arg1 = {value1}, arg2 = {value2}, arg3 = {value3}, arg4 = {value4}, arg5 = {value5}, arg6 = {value6}, arg7 = {value7} } \end{document} This doesn't work, I'm getting weird issues, it seems to closing bracket in the pattern string is interpreted as latex code and I get a closing bracket error within the string. I'm open to either making my code work with minimal changes, or to provide a whole other solution, if it's elegant and easy to read.

  • How to adjust a table with fractions?
    by karry on December 18, 2025 at 11:51 am

    \begin{table}[ht] \centering \setlength{\extrarowheight}{10pt} \setlength{\arraycolsep}{10pt} % \begin{tabular}{ |c|c|c|c|c|c| } \hline & $\bm{II}$ & $\bm{IX}$ & $\bm{ZI}$ & $\bm{ZX}$ & \textbf{others} \\ \hline $\bm{II}$ & $\frac{1}{4}$ & $\frac{1}{4}$ & $\frac{1}{4}$ & $-\frac{1}{4}$ & $0$ \\ \hline $\bm{IX}$ & $\frac{1}{4}$ & $\frac{1}{4}$ & $\frac{1}{4}$ & $-\frac{1}{4}$ & $0$ \\ \hline $\bm{ZI}$ & $\frac{1}{4}$ & $\frac{1}{4}$ & $\frac{1}{4}$ & $-\frac{1}{4}$ & $0$ \\ \hline $\bm{ZX}$ & $-\frac{1}{4}$ & $-\frac{1}{4}$ & $-\frac{1}{4}$ & $\frac{1}{4}$ & $0$ \\ \hline \textbf{others} & $0$ & $0$ & $0$ & $0$ & $0$ \\ \hline \end{tabular} \end{table} This is my code, but it shows that: This is not the table I want. All the fractions are not centered. I've tried many methods but none of them worked. How can I adjust it to make the table more attractive?

  • Check if a macro internally contains inner macros
    by 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}

  • Removing gap between bar and x-axis line in bar plot
    by user242399 on December 18, 2025 at 8:40 am

    How can I make the bars start at the horizontal line, instead of having a small gap between the bar and the line? (I do not need to keep the 0 mark at the y-axis.) \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{width=12cm,compat=1.9} \begin{document} \begin{tikzpicture} \begin{axis}[ ymin=0, x tick label style={ /pgf/number format/1000 sep=}, enlargelimits=0.05, legend style={at={(0.5,-0.1)}, anchor=north,legend columns=-1}, ybar interval=0.7, ] \addplot[color=darkgray,fill=lightgray] coordinates { (1990,638) (1980,899) (1970,894) (1960,808) (1950,769) (1940,714) (1930,644) (1920,598) (1910,536) (1900,420)}; \end{axis} \end{tikzpicture} \end{document}

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

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

  • Is it possible to use the STY file to set table formats?
    by jeffbiss on December 17, 2025 at 7:38 pm

    First, I find the LaTeX documentation lacking, in this case Tabularray Typeset Tabulars and Arrays with LATEX3. The issue as to whether I could preset certain table formats in a STY file is not covered. I am trying to setup my LaTeX template such that users who are not familiar with LaTeX, such as Word users, will find it easier to use. One thing that I thought that I could do is to preset certain formats in my STY file but I am having no such luck. I used the code, with some extras, shown on page 39 of 222 of Tabularray Typeset Tabulars and Arrays with LATEX3 in my STY file: %test \NewTblrTheme{fancy}{ \SetTblrStyle{firsthead}{bg=acornBlue, fg=white, font=\bfseries} \SetTblrStyle{firstfoot}{fg=blue2} \SetTblrStyle{middlefoot}{\itshape} \SetTblrStyle{caption-tag}{acornBlue} } I used a small code segment from their example in my TEX file (it references the STY file: \usepackage{controls}): \begin{longtblr}[ theme = fancy, caption = {A Table}, entry = {Short Caption}, label = {tblr:test}, note{a} = {It is the first footnote.}, note{$\dag$} = {It is the second footnote.}, remark{Note} = {Some general note}, remark{Source} = {Made up by myself}, ]{ colspec = {XXX}, width = 0.85\linewidth, rowhead = 1, rowfoot = 1, row{odd} = {gray9}, row{even} = {brown9}, row{1} = {acornBlue}, row{Z} = {blue7}, } \hline Head & Head & Head \\ \hline Alpha & Beta & Gamma \\ \hline Phi & Chi & Psi \\ \hline Foot & Foot & Foot \\ \hline \end{longtblr} This produces the following result: I realized that the formatting, cell colors, are overriding that specified in the STY file, so I delete them: \begin{longtblr}[ theme = fancy, caption = {A Table}, entry = {Short Caption}, label = {tblr:test}, note{a} = {It is the first footnote.}, note{$\dag$} = {It is the second footnote.}, remark{Note} = {Some general note}, remark{Source} = {Made up by myself}, ]{ colspec = {XXX}, width = 0.85\linewidth, rowhead = 1, rowfoot = 1, } \hline Head & Head & Head \\ \hline Alpha & Beta & Gamma \\ \hline Phi & Chi & Psi \\ \hline Foot & Foot & Foot \\ \hline \end{longtblr} and recompile from scratch and get the following reult: It appears that the STY file cannot be used to preset certain formats that would then free my users from having to do that for every table that they create. I tried changing \SetTblrStyle{firsthead} to: \SetTblrStyle{rowhead} and SetTblrStyle{row{1}} but got the same result. So, is the STY file supposed to allow me to preset certain table cell formats, such as bg and fg colors, etc.?

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

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

  • Perfectly center a box in a (beamer) page in one compilation
    by tobiasBora on December 17, 2025 at 2:48 pm

    I'd like to perfectly center a box in a page, but tikz with (current page.center) needs 2 compilations. Since this code is going to be called a lot in a library that aims precisely to improve efficiency, I'd rather optimize this. Any solution that involves only one compilation? \documentclass[beamer]{standalone} \usepackage{tikz} \begin{document} \begin{standaloneframe}% \begin{tikzpicture}[overlay, remember picture] \node[anchor=center, at=(current page.center)]{\fbox{\onslide<2>{My} content}}; \end{tikzpicture} \end{standaloneframe}% \end{document} EDIT So far no solution works for me (either not pixel-perfect, or needs too many compilations), hence I don't think this is a duplicate of the linked question. Here is what I get with @samcarter's solution (fixed since the fbox was added only to the tikz and not to his solution). \documentclass[beamer]{standalone} \usepackage{tikz} \begin{document} \begin{standaloneframe}[s] \vfill \centering\strut \fbox{My content}% \begin{tikzpicture}[overlay, remember picture,red,inner sep=0pt,outer sep=0pt] \draw (current page.south west) -- (current page.north east); \draw (current page.north west) -- (current page.south east); \node[at=(current page.center)]{\fbox{My content}\strut}; \end{tikzpicture}% \vfill \end{standaloneframe} \end{document} This kind of shift is too large for my needs as I need pixel-perfect centering (of the whole box not its baseline). And things get even worse with, e.g., a rule like \fbox{My content \rule{3cm}{3cm}}: \documentclass[beamer]{standalone} \usepackage{tikz} \begin{document} \begin{standaloneframe}[s] \vfill \centering\strut \fbox{My content \rule{3cm}{3cm}}% \begin{tikzpicture}[overlay, remember picture,red,inner sep=0pt,outer sep=0pt] \draw (current page.south west) -- (current page.north east); \draw (current page.north west) -- (current page.south east); \node[at=(current page.center)]{\fbox{My content \rule{3cm}{3cm}}\strut}; \end{tikzpicture}% \vfill \end{standaloneframe} \end{document}

  • Footnote numbering and `breakable` option in tcolorboxes
    by clueless on December 17, 2025 at 1:28 pm

    Footnotes within tcolorbox followof different numbering scheme that those in regular text. How can I make them uniformly numbered? \documentclass[notitlepage,a4paper]{book} \usepackage{keytheorems} \usepackage{tcolorbox} \tcbuselibrary{breakable} \usepackage{footnote} \BeforeBeginEnvironment{tcolorbox}{\savenotes} \AfterEndEnvironment{tcolorbox}{\spewnotes} \newkeytheoremstyle{my} { noteseparator={: }, notebraces={}{}, notefont=\bfseries, headpunct={}, bodyfont=\normalfont, } \newkeytheorem{theorem}[style=my,tcolorbox={breakable},name=Thm] \begin{document} \begin{theorem} text\footnote{fotnote within tcolorbox} with footnote. \end{theorem} text out of the box\footnote{fotnote out of tcolorbox} \end{document}

  • pgfplots: 3D Line Plot with Multiple x Axes
    by Dr. Manuel Kuehner on December 17, 2025 at 9:25 am

    Happy Xmas all together. This question is about pgfplots, specifically about plotting line plots ins 3D. Ideally, I woudl have three x axes labelled x_1, x_2 and x_3, one y axis and one z axis (called F for force). I managned to ge the belwo MWE but from there, I am stuck (did not try ChatGPT yet!). I attached two hand drawings to show the desired outcome. It is ok to fake the three x axes as long there is a easy to understand logic / syntax. Remark: In my real world example, the y axis is reversed but I did not want to overcomplicate the question. (typo: y = -15 should say y = +15 and vice versa) \documentclass{article} \usepackage{pgfplots} \pgfplotsset{ width = \textwidth, compat = 1.18, } \begin{document} \begin{tikzpicture} \begin{axis}[ view = {60}{30}, title = {MWE}, xlabel = {$x$}, ylabel = {$y$}, zlabel = {$F$}, xmin = -30, xmax = 30, ymin = -30, ymax = 30, zmin = -100, % F zmax = 100, grid = major, axis lines = center, ] % Plots \addplot3 [ red, domain = -30:30, % for x I assume samples = 100, samples y = 1, % not sure what this does ](5,x,x^2); \end{axis} \end{tikzpicture} \end{document}

  • Is it possible to test if a float is at the top of a page?
    by Denis Bitouzé on December 17, 2025 at 7:30 am

    Is it possible to test if a float is at (say) the top of a page? The use case is the following: for a class I'm working on, the floating figures (are customized thanks to a floatrow style in order to) have (their captions in the left margin and) horizontal lines just above and below them and I'd like to remove e.g. the top lines of the figures that happen to be at the top of the pages (especially because there is already an horizontal line at the top of each page that separates the header and the text). Here is a MCE: \documentclass{article} \usepackage{floatrow} \usepackage{mwe} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhead[L]{I'm a header} \DeclareMarginSet{hangleft}{% \setfloatmargins{\hskip-3cm}{\hfil}% } \DeclareFloatVCode{ruleabove}{% \par\rule{\hsize}{.8pt}\vskip4pt\par% } \DeclareFloatVCode{rulebelow}{% \par\vskip2pt\rule{\hsize}{.8pt}\par% } \DeclareFloatStyle{ruled}{ rowprecode=ruleabove, rowpostcode=rulebelow, } \floatsetup{objectset=justified} \floatsetup[figure]{ style=ruled, margins=hangleft, capposition=beside, capbesideposition={top,left}, floatwidth=0.85\textwidth } \begin{document} \lipsum[1-5] \begin{figure}[ht] \includegraphics[width=\linewidth]{example-image} \caption{A very very very very very very very very very very very very very very very very very very very very very long caption} \end{figure} \lipsum[1-5] \end{document}

  • Why \verb| test } | fail in section header with the use of cprotect?
    by Nasser on December 17, 2025 at 3:54 am

    I am processing 1000's of input where section title can contain random text. Hence I am using this set up \cprotect\section{\verb| the title read from file|} And the above works for any title (which do not ofcourse already have | in it). But why does it fail for this title below which do not have | in it? \documentclass[12pt]{article}% \usepackage{cprotect} \begin{document} %%%%%%%%%%%%%%%%%%%%% \cprotect\section{\verb|Adding footnote to the table leads to the error: ! Extra } |} text \end{document} Compiling with lualatex gives >lualatex A.tex This is LuaHBTeX, Version 1.24.0 (TeX Live 2026/dev) restricted system commands enabled. (./A.tex LaTeX2e <2025-11-01> L3 programming layer <2025-11-06> (/usr/local/texlive/2025/texmf-dist/tex/latex/base/article.cls Document Class: article 2025/01/22 v1.4n Standard LaTeX document class (/usr/local/texlive/2025/texmf-dist/tex/latex/base/size12.clo)) (/usr/local/texlive/2025/texmf-dist/tex/latex/cprotect/cprotect.sty (/usr/local/texlive/2025/texmf-dist/tex/latex/base/ifthen.sty) (/usr/local/texlive/2025/texmf-dist/tex/latex/bigfoot/suffix.sty)) (/usr/local/texlive/2025/texmf-dist/tex/latex/l3backend/l3backend-luatex.def) (./A.aux) (./A-1.cpt ! LaTeX Error: \verb ended by end of line. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.1 ...he table leads to the error: ! Extra ^^E^^L ? It is because } inside the title. But I thought \verb| ....| means I can put anything inside it? Note that in body of text \verb|Adding footnote to the table leads to the error: ! Extra } | works and there is no error. It is only in the section title. It is easy for me to workaround this, I just add extra check in the program that the title read do not have { or } in it and remove these for now, like it does for |. I was just wondering why } can not be inside \verb when in section. It seems the parser of the section title looked at the first } inside the the closing for the section itself and not part of the inner title. TL 2025

  • Unexpected behavior in luatexbase.add_to_callback
    by rallg on December 16, 2025 at 8:02 pm

    Using TeXlive 2025/Linux, up-to-date: I expect that when I use luatexbase.add_to_callback then whatever is already in the callback should remain in effect, with my own code added. But apparently that is not the case. I have tried tweaking the callback by adding a priority number (values tried: -1000, 0, 1, 2, 1000) but no obvious difference. In this MWE, the undefined \dingle command throws an error, and the Terminal correctly informs me that the name of the undefined command is \dingle. But if I uncomment the callback, the error fails to show me the command name. Why is that? I expect that it should show the command name as usual, then perform my added function. In actual usage, I have an external *.lua file, but that makes no difference. \documentclass{article} % Compile only with lualatex. \directlua{% to see difference, uncomment the following line: % luatexbase.add_to_callback('show_error_hook', function() texio.write_nl('BOO HOO') end, 'boo_hoo') } \begin{document} Hello, World.\par % Next command is undefined, throws error: \dingle \end{document} RE-EDIT: This is in light of the accepted answer, below. In my workflow (popular fiction, no math), the writers know very little *TeX, but type (mostly) plain text into a template (custom document class). The rare need for *TeX is for things such as \textit for italics. The PDF goes to a human editor who knows no *TeX at all, but will apply highlights and sticky notes, as editors do. Then, back to the writer. Re-cycle as needed. There is no point in submitting an erroneous PDF to the editor. It wastes valuable time, if the content of the PDF was not what the writer intended. So, my custom class traps most errors and warnings, and modifies the PDF metadata if something went wrong. Then, the editor can glance at the metadata in any PDF reader, and send it back when the metadata identifies the PDF as bad. Also, I work with PDF/X-1a:2001, and the metadata conformance identifier will be omitted when an error was trapped (this is not shown here). For example, if an unknown command is typed, the error will offer the default possibility of simply ignoring the unknown command, and continuing. Sometimes ignoring the error will still produce a valid PDF, although the content of the PDF is not what the writer intended. In this example, the mis-typed \txtit can be ignored, and the PDF is valid. But its metadata producer string identifies it as BAD CODE. \documentclass{article} % Compile only with lualatex. \directlua{% badstuff = false luatexbase.add_to_callback('show_error_hook', function() badstuff = true texio.write_nl(status.lasterrorcontext) end, 'boo_hoo') } \AtEndDocument{% \def\goodresult{1}% \directlua{% if badstuff == true then tex.sprint('\\def\\goodresult{0}') end }% \ifnum\goodresult=0\relax% \pdfextension info{/Producer (BAD RESULT)}% \fi }% \begin{document} % Mis-spelled \txtit should be \textit. Throws error: It was a \txtit{dark and stormy} night.\par \end{document}

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

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