• Changing logo in Fibeamer theme's
    by Carl Anderson on May 15, 2026 at 5:11 pm

    I took this Beamer theme from Overleaf at https://www.overleaf.com/latex/templates/zut-fibeamer/ksnwzmnhktvn I edited it trying to remove the university logo, but without success. So: How can I remove the university logo replacing it by another one (e.g., given by an image)? Presentation title is in yellow and not in blue as the original. How can I recover the blue color? Please, find below my code: \documentclass{beamer} \usetheme[microtype]{fibeamer} \usepackage[main=portuguese,portuguese]{babel} \title{Presentation Title} \subtitle{Presentation Subtitle} \author{Author's name} \usepackage{ragged2e} \usepackage{booktabs} \usepackage{tabularx} \usepackage{tikz} \usetikzlibrary{calc, shapes, backgrounds} \usepackage{amsmath, amssymb} \usepackage{url} \usepackage{listings} \frenchspacing \begin{document} \frame[c]{\maketitle} \AtBeginSection[]{% Print an outline at the beginning of sections \begin{frame}<beamer> \frametitle{Outline for Section \thesection} \tableofcontents[currentsection] \end{frame}} \begin{darkframes} \section{Dark Frames} \subsection{Blind Text} \begin{frame}{Jabberwocky} \framesubtitle{Lewis Carroll}% 'Twas brillig, and the slithy toves\\ Did gyre and gimble in the wabe;\\ All mimsy were the borogoves,\\ And the mome raths outgrabe.\\\bigskip “Beware the Jabberwock, my son!\\ The jaws that bite, the claws that catch!\\ Beware the Jubjub bird, and shun\\ The frumious Bandersnatch!”\\ \end{frame} \end{darkframes} \end{document}

  • LatexIT on Tahoe does not render in preview or export
    by madkinG13 on May 15, 2026 at 3:36 pm

    I have used LatexIt on older Intel macs (upto Ventura), and recently got a mac studio with Tahoe. Unfortunately even with latest version of Tex and LatexIt installed, I am unable to get equations to show up in preview pane or in export image. After checking typesetting paths, resetting them, checking that the ghostscript exists on that path (/usr/local/bin/gs), changing the colors of the preview pane and the text in many different combination, I have been unable to get this working. here are some screenshots, and here is the log generated: \documentclass[10pt]{article} \usepackage[usenames]{color} \usepackage{amssymb} \usepackage{amsmath} \usepackage[utf8]{inputenc} \pagestyle{empty} \begin{document}\begin{align*}x = 6 \end{align*} \end{document} --------------- processing pdflatex --------------- #!/bin/sh export PATH="[REDACTED_SYSTEM_PATHS]:/Library/TeX/texbin:/usr/local/bin:/bin:/usr/bin" export COMMAND_MODE="unix2003" export LOGNAME="[USERNAME]" export __CFBundleIdentifier="fr.chachatelier.pierre.LaTeXiT" export TMPDIR="/var/folders/[REDACTED]/T/" export HOME="/Users/[USERNAME]" export USER="[USERNAME]" ... cd "/var/folders/[REDACTED]/T/LaTeXiT-2.16.6" /Library/TeX/texbin/pdflatex -file-line-error -interaction nonstopmode latexit-1.tex Output written on latexit-1.pdf (1 page, 17889 bytes). Transcript written on latexit-1.log. --------------- bounding box computation --------------- /usr/local/bin/gs -sstdout=%stderr -dNOPAUSE -dSAFER -dNOPLATFONTS -sDEVICE=bbox -dBATCH -q latexit-1.pdf Is anyone else having this issue, and if so how were you able to resolve it? Thanks for any help you can give !

  • How to count number of words per page, and total number of words in a compiled document?
    by Cham on May 15, 2026 at 1:39 pm

    I writing a big novel with LaTeX (the standard TexLive distribution). I would like to count the total number of words in the compiled pdf document, and the average number of words per page. How can we do that with LaTeX? Is that even possible?

  • PDF/UA-2 structure destination failures (LaTeX source)
    by Julian on May 15, 2026 at 10:48 am

    Here is a MWE of LuaLaTeX source code: \nonstopmode \RequirePackage{pdfmanagement} \RequirePackage{tagpdf} \tagpdfsetup{activate/mc=true,activate/spaces=true} \documentclass[11pt,usegeometry]{article} \usepackage{hyperref} \hypersetup{ pdftitle={MyTitle}, pdfauthor={MyName}, pdfdisplaydoctitle=true} } \begin{document} \tableofcontents \section{First Section} A document with a single sentence linking to \hyperlink{My Ref}{My Ref}. \hypertarget{My Ref}{My Ref}. Details about my reference. \end{document} After I compile twice and then auto-tag the resulting PDF in Adobe Acrobat Pro, veraPDF includes the following PDF/UA-2 validation failures: I am looking for a way to resolve these failures, both for automated Table of Contents entries and also individual hyperlink/hypertarget internal links. Some background: I needed to meet a work deadline and I did not have enough time to recode my tabularray-based tables with tabular-based tables in my full document to enable full tagging using tagpdf, but I wanted to replace the interword glue with space glyphs to give screen readers some fluency as a stopgap while I create a fully accessible version of my PDF, which must be visually identical to the untagged version. Apart from this structure destination issue, I have found Adobe's auto-tag feature to be very useful. I simply set up a root Document tag, with Part tags inside them for my chapters, copy the relevant chunks into them, fix a few things here and there, and veraPDF is almost fully happy. Fixing "Each TOCI in the table of contents shall identify the target of the reference using the Ref entry" is fiddly but I know how to do it. The key stumbling block is this issue here: structure destinations. I feel tantalisingly close to being able to produce a nice PDF/UA-2 document, simply using Adobe Acrobat Pro to remediate. Any help would be greatly appreciated. Is it possible to fix this by editing tags in Adobe Acrobat Pro manually, with or without help from different LaTeX coding of the internal links? (Which presumably could be coded/automated?) Or is there an existing tool that would allow these to be fixed throughout my document? I have tried reading the ISO and PDF/UA-2 documentation but this is over my head. I have seen similar questions and answers here, and here, but I lack the technical knowledge to apply a solution. With a detailed description and/or screenshot of what to change (presumably inside the properties of Link - OBJR tags?), I would be good to go, and hugely grateful.

  • The linebreak syntax bug with luacode?
    by Explorer on May 15, 2026 at 7:18 am

    The highly related question is here and here and even early here: \documentclass{standalone}% compile with lualatex \usepackage{luacode} \begin{document} \begin{luacode} local f = function(x, y, opt) opt = opt or {} opt.sg = opt.sg or '+' if opt.sg == '+' then return x+y else return x-y end end local x = f(2, 2, {sg='+'} ) -- < this causes an error with luacode, but not luacode* tex.print("Result ="..x) \end{luacode} \end{document} The code above raise: (./mwe.aux)[\directlua]:13: ')' expected (to close '(' at line 11) near '='. \luacode@dbg@exec ...code@maybe@printdbg {#1} #1 } l.21 \end{luacode} ? I wonder is this really a bug which exists for past 14 years, and any suggestions or patch to correct this abnormal behaviour? Edited: Since nidarfp pointed out here: Two solutions: The ideal solution: that the author of luacode fixes the problem. Use the luadraw* environment (which uses luacode*), and your problem should disappear, but you won't be able to use TeX macros in the luadraw source code (which is the advantage of luacode) I wonder any further advice on luadraw' side?

  • Is there a way to draw this parabola in plain tikz without getting a dimension error?
    by Jasper on May 15, 2026 at 5:52 am

    Is there a way to draw this parabola in plain tikz without getting a dimension error? I don't want to drag out the big guns for what seems like it should be a simple diagram. \documentclass[tikz,border=1cm]{standalone} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \pgfmathsetmacro\FOCUSX{2} \pgfmathsetmacro\FOCUSY{1} \pgfmathsetmacro\LINEPX{-1} \pgfmathsetmacro\LINEPY{0} \pgfmathsetmacro\LINEDX{-3} \pgfmathsetmacro\LINEDY{2} \pgfmathsetmacro\LINEDL{sqrt((\LINEDX)^2 + (\LINEDY)^2)} \pgfmathsetmacro\LINEDX{\LINEDX/\LINEDL} \pgfmathsetmacro\LINEDY{\LINEDY/\LINEDL} \pgfmathsetmacro\LINEPERPX{\LINEDY} \pgfmathsetmacro\LINEPERPY{-\LINEDX} % Focus \fill (\FOCUSX,\FOCUSY) node[right]{$F$} circle[radius=0.1]; % Directrix \draw[dashed] (\LINEPX,\LINEPY) -- +(7*\LINEDX,7*\LINEDY) -- +(-7*\LINEDX,-7*\LINEDY); \fill (\LINEPX,\LINEPY) node[below left]{$P$} circle[radius=0.1]; \draw[->] (\LINEPX,\LINEPY) -- ++(\LINEDX,\LINEDY) node[below left]{$D$}; % Directrix normal \draw[->] (\LINEPX,\LINEPY) -- ++(\LINEPERPX,\LINEPERPY) node[above left]{$N$}; \foreach \ALPHA in {-4,-3.5,...,4} { \pgfmathsetmacro\QUADA{1-(\LINEPERPX)^2-(\LINEPERPY)^2} \pgfmathsetmacro\QUADB{ \LINEPERPX*(\LINEPX+\ALPHA*\LINEDX-\FOCUSX) +\LINEPERPY*(\LINEPY+\ALPHA*\LINEDY-\FOCUSY) } \pgfmathsetmacro\QUADB{-2*\QUADB} \pgfmathsetmacro\QUADC{ (\LINEPX+\ALPHA*\LINEDX-\FOCUSX)^2 +(\LINEPY+\ALPHA*\LINEDY-\FOCUSY)^2 } \pgfmathsetmacro\QUADC{-\QUADC} \pgfmathsetmacro\BETA{ (-\QUADB+sqrt((\QUADB)^2-4*\QUADA*\QUADC)) /(2*\QUADA) } \fill[green] ($(\LINEPX,\LINEPY) + \ALPHA*(\LINEDX,\LINEDY) + \BETA*(\LINEPERPX,\LINEPERPY)$) circle[radius=0.1]; } \end{tikzpicture} \end{document}

  • Is there a way to customize the definition of a tikzduck part? I am trying to draw a unicorn, but the horn is the same color as the body
    by Jasper on May 14, 2026 at 8:40 pm

    Is there a way to customize the definition of a tikzduck part? I am trying to draw a unicorn, but the horn is the same color as the body. I want the horn to be a different color, and to also add some draw commands to it, so I can make a sort of swirl around it. Like this: \documentclass{article} \usepackage{tikz,tikzducks} \begin{document} \begin{tikzpicture} \duck[ body=brown!80!white, longhair=brown!50!black, horsetail, unicorn=brown!50!black ] \end{tikzpicture} \end{document}

  • Adding your own symbol by editing the .pfb file
    by mathem on May 14, 2026 at 7:54 pm

    I'd like to learn how to add new symbols this way; I think it will open up unlimited possibilities. In my folder, I have a .tex file with the following contents: \documentclass[a4paper,10pt]{article} \usepackage[T2A]{fontenc} \usepackage[utf8]{inputenc} \usepackage[russian,english]{babel} \begin{document} $A+a=$ \newfont{\myfont}{cmmi10} \newcommand{\mysymbol}{\myfont\symbol{65}} \mysymbol \end{document} And in the same folder with this .tex file there is a font file cmmi10.pfb with the Fontforge modified in the program (or rather, this font was created anew, but now it doesn’t matter). So, when compiling my .tex file with MiKTeX, the font is not taken from where MiKTeX usually gets fonts, but from the folder in which my .tex file is located, so the letter "A" in the compiled .pdf turns out to look different than usual, which suggests that my idea might work. However, this only works when changing a letter already in the font. When I try to create a new character in an empty cell using a .png image, all other empty cells are filled with the same image. I understand that this happens because all empty cells in Fontforge have the same name, but I can't do anything about it: when I try to rename one empty cell, the others are renamed too. Can anyone help me?

  • ConTeXt: customize bibliography
    by Georgian Ilie on May 14, 2026 at 4:17 pm

    Good evening, I am trying to understand how to prepare my bibliography style. As already discussed in one of my previous questions, ConTeXt has its own language to customize bibliographic entries. I consulted the official documentation, but I was not able to understand sufficiently the content. From where should I start? Is there some other resource that I can read?

  • theorem-like-aware lists for cleveref
    by random name on May 14, 2026 at 2:53 pm

    I use LaTeX for mathematics and am often in a situation where I want to write something like the following: I have a theorem with two conditions or sub-statements etc. which I later want to refer to in two different ways: Theorem 1.1. If X is ..., then X has the following properties (a) property a (b) property b proof. To prove (a) we ... ... "We see that Y satisfies Theorem 1.1.a so ...". For this, I would want the LaTeX code to look something like: \begin{theorem} If $X$ is ..., then $X$ has the following properties \begin{thmlist} \item\label{it:a} property a \item property b \end{thmlist} \end{theorem} \begin{proof} To prove \ref{it:a} we ... \end{proof} We see that $Y$ satisfies \cref{it:a} so ... The closest I have gotten to getting this to work is the following unsatisfactory way using thmtools and cleveref: \documentclass{amsart} \usepackage{enumitem} \usepackage{thmtools} \usepackage{cleveref} \newcounter{mythmlike} \numberwithin{mythmlike}{section} % setup lists \newlist{thmlist}{enumerate}{1} \setlist[thmlist]{label=\textnormal{\textbf{(\textit{\alph*})}},ref=\themythmlike.\alph*} % setup theorem-like environments with thmtools \declaretheoremstyle[sibling=mythmlike]{minsetning} \declaretheorem[style=minsetning,name=Theorem,postheadhook={\crefalias{thmlisti}{theorem}}]{theorem} \declaretheorem[style=minsetning,name=Corollary,postheadhook={\crefalias{thmlisti}{corollary}}]{corollary} \declaretheorem[style=minsetning,name=Lemma,postheadhook={\crefalias{thmlisti}{lemma}}]{lemma} \declaretheorem[style=minsetning,name=Proposition,postheadhook={\crefalias{thmlisti}{proposition}}]{proposition} \begin{document} \section{math} \begin{theorem} If $X$ is ..., then $X$ has the following properties \begin{thmlist} \item\label{it:a} property a \item property b \end{thmlist} \end{theorem} \begin{proof} To prove \ref{it:a} we ... \end{proof} We see that $Y$ satisfies \cref{it:a} so ... \end{document} Which produces The problems with this are two-fold: In the proof it writes "to prove 1.1.a we ..." instead of "to prove (a) we ...". It would be really great to have a command like \shortref{it:a} which would produce the latter. I have a lot of different theorem-like environments (even more than I gave in the example) and I would much prefer not having to add the postheadhook={\crefalias{thmlisti}{name}} to every single one. I tried adding postheadhook={\protect\crefalias{thmlisti}{\thmt@thmname}} when declaring the theorem-like minsetning style, but this does not work. I will add that it is important for me to have as much of the programming completely hidden away in my .sty/.cls file so that I can focus on just writing mathematics when I write -- This is also why I want to be able to use thmlist for all the theorem-like environments and not also something like a lemlist for lemmas etc. (also because I want the flexibility to easily change a lemma to a proposition etc. - which is the main benefit of using cleveref for me). Any help would be very much appreciated!

  • Problem with roman page numbers in Cyrillic when using XeLaTex
    by user110822 on May 14, 2026 at 1:20 pm

    I have similar problem as in this question. I am not using OT2, so I couldn’t use the solution proposed in those questions - or at least I didn’t know how to adapt it. My MWE: \documentclass[11pt,b5paper,twoside]{memoir} \usepackage{lipsum} \usepackage{fontspec} \setmainfont[Ligatures=TeX]{Linux Libertine O} \newfontfamily{\serbianfont}[Mapping=ascii-to-serbian]{Linux Libertine O} \usepackage{polyglossia} \setmainlanguage{english} \setotherlanguage[script=cyrillic]{serbian} \newcommand{\cir}[1]{\begin{serbian}{#1}\end{serbian}} \nouppercaseheads \makepagestyle{hurried} \makeevenfoot{hurried}{}{\thepage}{} \makeevenhead{hurried}{}{{\leftmark}}{} \makeoddfoot{hurried}{}{\thepage}{} \makeoddhead{hurried}{}{\cir{Knjiga}}{} \makeheadrule{hurried}{\textwidth}{.4pt} \pagestyle{hurried} \begin{document} \begin{center} \vspace*{1in} {\Large\cir{Naslov}} \vspace*{1in} \end{center} \thispagestyle{empty} \newpage \frontmatter \renewcommand{\contentsname}{\cir{Sadrzhaj}} \setcounter{page}{3} \tableofcontents* \addcontentsline{toc}{chapter}{\cir{Predgovor}} \chapter*[\cir{Predgovor}]{\cir{Predgovor}} \begin{serbian} \lipsum[1-9] \end{serbian} \end{document}

  • How to shrink with a certain amount of offset?
    by D G on May 14, 2026 at 1:09 pm

    I want a one cm offset between the blue path and the black one. \documentclass[tikz,margin=1cm]{standalone} \begin{document} \begin{tikzpicture} \draw[gray!50] (-8,0) grid (8,-8); \fill (0,0) node[above=12pt]{origin} circle (5pt); \draw[ultra thick] (-6,0) arc[x radius=12,y radius=8,start angle=90,end angle=0] -- (-6,-8) -- cycle; \draw[blue,ultra thick] (-5,-1) arc[x radius=10,y radius=6,start angle=90,end angle=0] -- (-5,-7) -- cycle; \end{tikzpicture} \end{document} Note: Both must be similar. Right now both are not similar.

  • How do I make the gate branch in the JFET transistor symbol centralised rather than to the bottom or top of the gate?
    by Vector on May 14, 2026 at 10:58 am

    I am trying to reproduce a specific transistor circuit image for an assignment. Using the stock circuitikz JFET symbol, I was able to reproduce the circuit fairly well. I am also quite satisfied with it. I am curious, however, if it is possible to make the gate closer to the center as it is in the image. I have looked through the documentation and the only plausible solution I can find is to create a new symbol however I am a bit stuck on how to go about that. The damper example in the documentation was not very clear. Here is the code, if it is needed. (I removed the voltmeter to keep the code copied compact.) \documentclass[border = 10pt]{standalone} \usepackage{amsmath} \usepackage{circuitikz} \begin{document} \begin{circuitikz}[american, scale = 0.65] \ctikzset{ transistors/scale=1, capacitors/scale=0.7, resistors/scale=0.8 } % Transistor \draw (0,0) node[njfet, tr circle, anchor=S](Q){}; \draw(Q.G) to[short] ++(-2,0) to[short] ++(0, -2) node[ground] (G1) {}; \draw(Q.S) to[short] (Q.S |- G1) node[ground] {}; \coordinate (V_s) at ($(Q.D) + (1.5,0)$); \draw[-{Triangle[scale = 1.5]}](V_s) to[short] ++(-1.5,0) coordinate (Q.D); \draw (V_s)to [short](Q.S -| V_s); \draw[-{Triangle[scale = 1.5]}] (Q.S -| V_s) to[short] (Q.S); \draw(Q.D) to [short] ++ (0, 1.5) to[ammeter, v^<={\phantom{m}}] ++ (3.5,0) to[R, l_={$4.7\ \mathrm{k}\Omega$}, a^= {$R_D$}] ++(3.7,0) coordinate(C) to [battery, name = BDD, v_={\phantom{m}}, l^= {$V_\mathrm{DD}$}] (C |- G1) node[ground] {}; \ctikztunablearrow{1}{1}{135}{BDD} \end{circuitikz} \end{document} Here are the images;

  • Tikz: perpendicular line to intersect the x-axis
    by Tldi You on May 14, 2026 at 10:11 am

    I would like to draw a line starting from the point (200, 105.6), perpendicular to the failure envelope, and extending down to intersect the x-axis. I have implemented the following LaTeX/TikZ \documentclass[border=2pt]{standalone} \usepackage{pgfplots,siunitx} \pgfplotsset{compat=1.18} \usetikzlibrary{calc} \begin{document} \centering \begin{tikzpicture} \begin{axis}[ width=15cm, height=9.375cm, xmin=0, xmax=640, ymin=0, ymax=400, xtick={0,80,...,640}, ytick={0,80,...,400}, minor tick num=1, grid=both, grid style={black, thin}, minor grid style={black, thin}, xlabel={Contrainte normale ($\sigma_{nr}$), $kN/m^2$}, ylabel={Contrainte de cisaillement ($\tau_r$), $kN/m^2$}, axis line style={thick}, tick label style={font=\small}, label style={font=\small}, clip=false ] % Regression line: tau = 34 + sigma * tan(20) \addplot [domain=0:590, samples=2, thin, black] {34 + x*tan(20)}; % Data points on the line (open circles) \addplot [only marks, mark=o, mark size=3.5pt, fill=white, thin, black] coordinates { (100, 72.2) (200, 105.6) (300, 144.4) (400,177.7) }; % Solid dot and its label \node [circle, fill, inner sep=1.5pt] (dot) at (axis cs:320, 138) {}; \node [anchor=west, xshift=2pt] at (axis cs:320, 138) {\small (320, 138)}; % Perpendicular line from the 3rd circle (x=300) \coordinate (P) at (axis cs:200, {36 + 200*tan(20)}); \draw [very thick, black] (P) -- (axis cs:252.1, 0); % Right angle symbol \draw [very thick, black] ($(P) + ({-18*cos(20)}, {-18*sin(20)})$) -- ($(P) + ({-18*cos(20) + 18*sin(20)}, {-18*sin(20) - 18*cos(20)})$) -- ($(P) + ({18*sin(20)}, {-18*cos(20)})$); % Angle phi indicator \coordinate (phi_pt) at (axis cs:520, {34 + 520*tan(20)}); \draw [thin, black] (phi_pt) -- +(0.8cm, 0); \draw [thin, black] (phi_pt) +(0.5cm, 0) arc (0:20:0.5cm); % Box in top right \node [draw, thick, fill=white, align=center, inner sep=10pt] at (axis cs:520, 340) { $c = 34 \, kN/m^2$ \\ $\varphi = \ang{20}$ }; % Phi angle \coordinate (V) at (axis cs:520,223); \draw[thin] (V) -- ++(25pt,0); \draw[thin] ($(V)+(15pt,0)$) arc[start angle=0,end angle=20,radius=15pt]; \node[right] at ($(V)+(22pt,2pt)$) {$\varphi$}; \end{axis} \end{tikzpicture} \end{document} Do you have any suggestions or improvements? CURRENT RESULT:

  • Break point inadequate in nested boxes
    by Erwann on May 14, 2026 at 4:18 am

    In the code below, there are two \TitleBox environments inside a single \DocumentBox. I expected that when I add sufficient \lipsum text in the second \TitleBox, the page break would occur within that box at the overflow point. Instead, the entire second \TitleBox is moved to the next page, leaving extra whitespace on the first page. Is there a remedy for this behavior? \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage[english]{babel} %\usepackage{csquotes} % disabled; use ``'' \usepackage[most]{tcolorbox} \usepackage[letterpaper]{geometry} \usepackage{lipsum} % ---------------------------------------------------------------- % Amendment commands % ---------------------------------------------------------------- \newcommand{\Delete}[1]{% {\sout{#1}}% } \newcommand{\Amend}[1]{% {\uline{#1}}% } % ---------------------------------------------------------------- % Global container % ---------------------------------------------------------------- \newtcolorbox{DocumentBox}{ enhanced, breakable, colback=white, boxrule=0.8pt, arc=1mm, left=4mm, right=4mm, top=4mm, bottom=4mm, } % ---------------------------------------------------------------- % Title box (FIXED: NOT breakable) % ---------------------------------------------------------------- \newtcolorbox{TitleBox}[1]{ enhanced, boxrule=0.6pt, arc=1mm, title={#1}, fonttitle=\sffamily, before skip=4mm, after skip=4mm, left=3mm, right=3mm, top=2mm, bottom=2mm, before upper=\parindent0pt, } % ---------------------------------------------------------------- \begin{document} \begin{DocumentBox} \begin{TitleBox}{\lipsum[1][1]} \lipsum[1][2] \end{TitleBox} \begin{TitleBox}{\lipsum[1][3]} \lipsum[2] \lipsum[3] \lipsum[4] \lipsum[5] \lipsum[6] \lipsum[7] \end{TitleBox} \end{DocumentBox} \end{document}

  • renewcommand Gamma into itGamma in unicode-math
    by Ryan Kong on May 14, 2026 at 2:26 am

    I want to have a command \Gamma that does what \itGamma does, under unicode math. My Preambles: %! TEX program = xelatex \documentclass[]{article} \usepackage{amsmath} \usepackage[]{unicode-math} \setmathfont[]{TeX Gyre Termes Math} I only want \Gamma to be italic, so I will not consider using \usepackage[math-style=ISO]{unicode-math}. Here's what I tried and their respective error messages (or problem): \renewcommand{\Gamma}{\itGamma} \renewcommand{\Gamma}{\mitGamma} \AtBeginDocument{\renewcommand{\Gamma}{\mitGamma}} % They all compiles, but the result shows a upright \Gamma \AtBeginDocument{\renewcommand{\Gamma}{\itGamma}} % TeX capacity exceeded, sorry [input stack size=10000]. \tl_if_exist:NTF #1->\if_meaning:w #1 \unimathsetup{Gamma=italic} % The key 'unicode-math/Gamma' is unknown and is being ignored. I have no idea what I can do now, help would be much appreciated.

  • expl3 syntax in pgfdeclaredataformat command
    by tkl on May 13, 2026 at 5:06 pm

    Is it possible to use expl3 syntax, specifically floating point operations, within a pgfdeclaredataformat command? Below is a minimal example, indeed with a workaround solution. Comment out the doesnotwork lines to get an error. Actual computations are different and involve a small Newton solver. \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{datavisualization} \begin{document} \ExplSyntaxOn \def\tologarithmic#1#2{ % 0.43429 = 1/ln(10) \pgfkeys{/data~point/x=\fp_to_decimal:n{0.43429*ln(#1)}} \fp_log:n {0.43429*ln(#1)}% to see in the log file, that the calculation actually works! \pgfkeyssetvalue{/data~point/y}{\fp_to_decimal:n{0.43429*ln(#2)}} \pgfdatapoint } \ExplSyntaxOff \pgfdeclaredataformat{compute}{}{} {#1 #2}% line format {\tologarithmic{#1}{#2}}% code {}{} %\def\doesnotwork{% \begin{tikzpicture} \datavisualization[scientific axes, visualize as scatter, x axis=logarithmic, y axis=logarithmic ] data[format=compute,set=scatter] { 2.868E+03 2.804E-02 5.636E+04 2.061E-02 1.791E+06 1.079E-02 3.554E+07 7.080E-03 }; \end{tikzpicture} %}% end doesnotwork % the workaround solution \begin{tikzpicture} \datavisualization[scientific axes, visualize as scatter ] data[format=TeX code,set=scatter] { \tologarithmic{2.868E+03}{2.804E-02} \tologarithmic{5.636E+04}{2.061E-02} \tologarithmic{1.791E+06}{1.079E-02} \tologarithmic{3.554E+07}{7.080E-03} }; \end{tikzpicture} % that is how the graph should look like \begin{tikzpicture} \datavisualization[scientific axes, visualize as scatter, x axis=logarithmic, y axis=logarithmic ] data[set=scatter,separator=\space] { x y 2.868E+03 2.804E-02 5.636E+04 2.061E-02 1.791E+06 1.079E-02 3.554E+07 7.080E-03 }; \end{tikzpicture} \end{document}

  • Remember coordinate in nested tikzpicture with listings
    by Jason Cho on May 13, 2026 at 2:10 pm

    \documentclass{standalone} \usepackage{xcolor} \usepackage{tikz} \usepackage{listings} \begin{document} \begin{tikzpicture}[remember picture] \node[draw] {\begin{lstlisting}[language=c++, linewidth=140pt, basicstyle=\ttfamily\scriptsize] class Counter : public QObject { public: Counter() { value = 0; }!\tikz[remember picture]\node (l1){};! int getValue() { return value; }!\tikz[remember picture]\node (l2){};! }; \end{lstlisting}}; \draw[red, ->] (l1) -- (l2); \end{tikzpicture} \end{document} In this code snippet, I use listings to syntax highlight a piece of C++ code, where I mark two lines with name l1 and l2. Then I want to use the coordinates of l1 and l2. However, the output is off. How do I fix the location of the named coordinates? Requirements: I name these two points because there are a dozen of commands relying on these coordinates. Therefore I do not want to cram these commands between the escapechars of lstlisting. I want to measure the full size of the picture, including the main listing and adornments. For example, when I center the picture, the whole pic is centered, not only the main listing. I have checked: Remember coordinate in nested tikzpicture points to a weird place was solved by using a special command \subnode in tikz-qtree. access a coordinate in a nested \tikzpicture was solved by removing nesting.

  • Apply command on each line of an environment automatically (luatex)
    by Salim Bou on May 13, 2026 at 1:12 pm

    This code splits each line of an environment into two parts, places each part in a box of a specified width, and separates them with a small space. What I want is for this to happen automatically without writing the instruction at the beginning of each line, only specifying the split position and the end of the line. % lualatex \documentclass[12pt]{article} \usepackage[margin=1.8cm]{geometry} \def\<#1&#2>{\makebox[7.8cm][s]{#1}\hspace{1cm}\makebox[7.8cm][s]{#2}} \newenvironment{mypoem}{\begin{center}\baselineskip=36pt\bfseries} {\end{center}} \begin{document} \begin{mypoem} \<first part of poem & second part of poem>\\ \end{mypoem} \end{document}

  • Problem with \rowcolor command [closed]
    by الحساب الأساسي on May 13, 2026 at 12:00 pm

    \documentclass[12pt, a4paper]{article} % --- UNIVERSAL PREAMBLE BLOCK --- \usepackage[a4paper, top=2cm, bottom=2cm, left=1.5cm, right=1.5cm]{geometry} \usepackage{fontspec} \usepackage{xcolor} \usepackage{titlesec} \usepackage{array} \usepackage{booktabs} \usepackage{tabularx} \usepackage[arabic, bidi=basic, provide=*]{babel} \babelprovide[import, onchar=ids fonts]{arabic} \babelprovide[import, onchar=ids fonts]{english} % Set fonts - Noto Sans for Latin, Noto Sans Arabic for Arabic \babelfont{rm}{Noto Sans} \babelfont[arabic]{rm}{Noto Sans Arabic} \usepackage{enumitem} \setlist[itemize]{label=-} % --- Custom Styling --- \definecolor{azhar-green}{HTML}{006400} \definecolor{gold}{HTML}{D4AF37} \titleformat{\section}{\color{azhar-green}\normalfont\Large\bfseries}{}{0em}{}[\titlerule] \begin{document} \begin{center} {\Huge \textbf{\color{azhar-green}خطة الطوارئ الذهبية}} \\ \vspace{5pt} {\Large \textbf{للصف الثالث الثانوي الأزهري}} \\ \vspace{10pt} \textit{"وَمَا تَوْفِيقِي إِلَّا بِاللَّهِ ۚ عَلَيْهِ تَوَكَّلْتُ وَإِلَيْهِ أُنِيبُ"} \end{center} \section{منهجية الدراسة (نظام الفترات)} بسبب ضيق الوقت، سنعتمد نظام \textbf{المسارات المتوازية} (مادة شرعية + مادة عربية + مادة ثقافية) يومياً لكسر الملل وضمان التقدم في جميع الفروع. \section{الجدول الزمني المقترح (6 أيام دراسة + يوم مراجعة)} \begin{table}[htbp] \centering \begin{tabularx}{\textwidth}{|l|X|X|X|} \hline \rowcolor{azhar-green!10} \textbf{اليوم} & \textbf{الفترة الصباحية (الفجر)} & \textbf{الفترة المسائية (1)} & \textbf{الفترة المسائية (2)} \\ \hline السبت & قرآن كريم + فقه & لغة عربية (نحو/صرف) & مادة التخصص (فيزياء/تاريخ) \\ \hline الأحد & قرآن كريم + حديث & مادة ثقافية (كيمياء/جغرافيا) & لغة أجنبية \\ \hline الاثنين & قرآن كريم + توحيد & لغة عربية (بلاغة/أدب) & مادة التخصص (أحياء/فلسفة) \\ \hline الثلاثاء & قرآن كريم + تفسير & مادة ثقافية (رياضيات/منطق) & مادة شرعية (مراجعة) \\ \hline الأربعاء & قرآن كريم + فقه & لغة عربية (مراجعة شاملة) & مادة التخصص \\ \hline الخميس & قرآن كريم + حديث & مادة ثقافية & مراجعة نقاط الضعف \\ \hline \rowcolor{gold!10} \textbf{الجمعة} & \multicolumn{3}{c|}{\textbf{يوم الاختبارات الذاتية الشاملة وحل امتحانات السنوات السابقة}} \\ \hline \end{tabularx} \end{table} \section{نصائح ذهبية للثبات والتركيز} \begin{itemize} \item \textbf{بركة البكور:} ابدأ مذاكرة المواد التي تحتاج حفظاً (الشرعي) فور صلاة الفجر. \item \textbf{قاعدة 50/10:} ذاكر لمدة 50 دقيقة ثم استرح لمدة 10 دقائق (بعيداً عن الهاتف). \item \textbf{القرآن أولاً:} ورد القرآن اليومي هو مفتاح البركة في وقتك، لا تهمله أبداً. \item \textbf{الخرائط الذهنية:} استخدم الرسوم التوضيحية لربط أبواب الفقه والمواد العربية المتشعبة. \end{itemize} \vspace{20pt} \begin{center} \textbf{\color{azhar-green}أنت قدها يا بطل.. الوقت لا يزال كافياً إذا خلصت النية!} \end{center} \end{document}

  • latex2html cannot find tabularray.sty
    by Namal on May 13, 2026 at 7:32 am

    I have Tex Live 2025 full, manual installation through the *.sh script on Debian 13, I also added it to the packet manager throgh the equivs file, so that I have texlive-local/now 2025.99999999-1 all [installed,local] Now I am using the tabularray package and longtblr for tables, which works just fine with pdflatex, but latex2html throws the following error in the images.log ! LaTeX Error: File `tabularray.sty' not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: sty) Enter file name: ! Emergency stop. <read *> l.10 \usepackage {xcolor}^^M *** (cannot \read from terminal in nonstop modes) But I have the file in: /usr/local/texlive/2025/texmf-dist/tex/latex/tabularray/tabularray.sty Other than that, latex2html does not have any problems with the normal longtable package. Edit, as requested, the first lines of the images.log file: This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2025/dev/Debian) (preloaded format=pdflatex 2025.11.28) 13 MAY 2026 10:03 entering extended mode restricted \write18 enabled. %&-line parsing enabled. **./images.tex (./images.tex LaTeX2e <2024-11-01> patch level 2 L3 programming layer <2025-01-18> (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls Document Class: article 2024/06/29 v1.4n Standard LaTeX document class (/usr/share/texlive/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 ) (/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty Package: ifthen 2024/03/16 v1.1e Standard LaTeX ifthen package (DPC) ) (/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty Package: fontenc 2021/04/29 v2.0v Standard LaTeX package ) (/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty Package: geometry 2020/01/02 v5.9 Page Geometry (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty Package: keyval 2022/05/29 v1.15 key=value parser (DPC) \KV@toks@=\toks17 ) (/usr/share/texlive/texmf-dist/tex/generic/iftex/ifvtex.sty Package: ifvtex 2019/10/25 v1.7 ifvtex legacy package. Use iftex instead. (/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty Package: iftex 2024/12/12 v1.0g TeX engine tests ))

  • I want to make a beamer presentation where I start with an animation, then animate that animation turning into the title page
    by Jasper on May 13, 2026 at 6:13 am

    I want to make a beamer presentation where I start with an animation, then animate that animation turning into the title page. I cannot figure out how to do this in beamer, and was barely able to get a prototype working in article. This is by no means an MWE, and it is by no means correct (I believe it is incorrect). But it is what I can muster right now. I want to minick this effect in beamer, where I start on a fullscreen animated slide, then animate the transition from that slide to the titlepage. I want the titlepage to be aligned as it normally would, with no vertical or horizontal separation. This is what I have so far, it needs to be viewed through adobe acrobat. \documentclass{article} \usepackage[paperwidth=160mm,paperheight=90mm,margin=0pt]{geometry} \usepackage{pgfplots,graphicx,tikz-3dplot,animate,tikzducks} \pgfplotsset{compat=1.18} \usetikzlibrary{calc} \newenvironment{jasperslide}{}{\newpage} \newsavebox{\titlebox} \sbox{\titlebox}{% \parbox{160mm}{% \centering {\Large\bfseries Overfull \textbackslash{}dbox}\par\vskip 1.5em {\normalsize Jasper Nice}\par\vskip 0.8em {\small Today}% }% } \begin{document} \begin{jasperslide} \begin{animateinline}[autoplay,loop]{10}% \pgfplotsforeachungrouped \FRAME in {1,...,60} {% \tdplotsetmaincoords{90}{-90}% \begin{tikzpicture}[x=\pagewidth,y=\pageheight] \coordinate (C) at (current page.center); \useasboundingbox (current page.south west) rectangle (current page.north east); \begin{scope}[tdplot_main_coords] \begin{scope}[canvas is yz plane at x=0,shift={($(current page.center)$)}] \duck \end{scope} \end{scope} \end{tikzpicture}% \pgfmathsetmacro{\III}{\FRAME != 60}% \ifnum\III=1\newframe\fi% }% \end{animateinline}% \end{jasperslide} \begin{jasperslide} \begin{animateinline}[autoplay]{10}% \pgfplotsforeachungrouped \FRAME in {1,...,60} {% \tdplotsetmaincoords{90-90*\FRAME/68}{-90+90*\FRAME/68}% \begin{tikzpicture}[x=\pagewidth,y=\pageheight] \coordinate (C) at (current page.center); \useasboundingbox (current page.south west) rectangle (current page.north east); \begin{scope}[tdplot_main_coords] \node[canvas is xy plane at z=0,transform shape] at (C) {\usebox{\titlebox}}; \begin{scope}[canvas is yz plane at x=0,shift={($(current page.center)$)}] \duck \end{scope} \end{scope} \end{tikzpicture}% \pgfmathsetmacro{\III}{\FRAME != 60}% \ifnum\III=1\newframe\else\newframe% \tdplotsetmaincoords{0}{0}% \begin{tikzpicture}[x=\pagewidth,y=\pageheight] \coordinate (C) at (current page.center); \useasboundingbox (current page.south west) rectangle (current page.north east); \begin{scope}[tdplot_main_coords] \node[canvas is xy plane at z=0,transform shape] at (C) {\usebox{\titlebox}}; \end{scope} \end{tikzpicture}% \fi% }% \end{animateinline}% \end{jasperslide} \end{document}

  • Troubles with negative numbers on bar graph [duplicate]
    by Ismael Joaquim on May 12, 2026 at 9:00 am

    everyone. I'm having troubles with the negative labels in the first graph.Can someone help me with this? \documentclass{standalone} \usepackage{pgfplots} \usepackage{pgfplotstable} \usepackage{tikz} \usetikzlibrary{pgfplots.groupplots, calc} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} \begin{groupplot}[ group style={ group size=2 by 1, horizontal sep=1.2cm }, ybar, width=7.2cm, height=6.2cm, ymode=log, log origin=infty, title style={font=\normal\bfseries}, symbolic x coords={NaCl (B1),TiC (B1),FeSi (B20)}, xtick=data, tick label style={font=\small}, x tick label style={font=\small}, visualization depends on={y \as \originalvalue}, nodes near coords={% \pgfmathprintnumber[fixed,precision=3]{\originalvalue}% }, nodes near coords style={ font=\small, rotate=90, anchor=west }, enlarge x limits=0.20, grid=major, major grid style={dashed, gray!35}, ] % ====================================================== % (a) Regime \pm 10% V0 — DADOS REAIS DOS FICHEIROS % ====================================================== \nextgroupplot[ bar width=6pt, title={(a) Regime $\pm 10\%\,V_0$}, ylabel={RMSE (meV/célula)}, ymin=1e-2, ymax=1e1, legend to name=gruppolegend, legend style={ legend columns=6, draw=black, fill=white, font=\small, column sep=6pt, }, ] % Murnaghan — NaCl: 0.061718, TiC: 0.216179, FeSi: 0.256858 \addplot+[fill=blue!75, draw=blue!75!black] coordinates { (NaCl (B1),0.061718) (TiC (B1),0.216179) (FeSi (B20),0.256858) }; \addlegendentry{Murnaghan} % BM3 — NaCl: 0.027460, TiC: 0.057278, FeSi: 0.072263 \addplot+[fill=red!80, draw=red!80!black] coordinates { (NaCl (B1),0.027460) (TiC (B1),0.057278) (FeSi (B20),0.072263) }; \addlegendentry{BM3} % Vinet — NaCl: 0.037637, TiC: 0.105771, FeSi: 0.125342 \addplot+[fill=purple!75, draw=purple!75!black] coordinates { (NaCl (B1),0.037637) (TiC (B1),0.105771) (FeSi (B20),0.125342) }; \addlegendentry{Vinet} % q-EoS (n=2) — NaCl: 0.027461, TiC: 0.057532, FeSi: 0.072068 \addplot+[fill=green!70!black, draw=green!50!black] coordinates { (NaCl (B1),0.027461) (TiC (B1),0.057532) (FeSi (B20),0.072068) }; \addlegendentry{q-EoS $(n=2)$} % q-EoS (n=3) — NaCl: 0.027537, TiC: 0.058481, FeSi: 0.073480 \addplot+[fill=orange!90, draw=orange!70!black] coordinates { (NaCl (B1),0.027537) (TiC (B1),0.058481) (FeSi (B20),0.073480) }; \addlegendentry{q-EoS $(n=3)$} % ====================================================== % (b) Regime \pm 50% V0 — DADOS REAIS DOS FICHEIROS % ====================================================== \nextgroupplot[ bar width=6pt, title={(b) Regime $\pm 50\%\,V_0$}, ymin=1e0, ymax=1e4, ] % Murnaghan — NaCl: 38.483922, TiC: 179.827163, FeSi: 209.918058 \addplot+[fill=blue!75, draw=blue!75!black] coordinates { (NaCl (B1),38.483922) (TiC (B1),179.827163) (FeSi (B20),209.918058) }; % BM3 — NaCl: 2.118186, TiC: 44.043547, FeSi: 63.469045 \addplot+[fill=red!80, draw=red!80!black] coordinates { (NaCl (B1),2.118186) (TiC (B1),44.043547) (FeSi (B20),63.469045) }; % Vinet — NaCl: 23.998934, TiC: 27.367181, FeSi: 38.077585 \addplot+[fill=purple!75, draw=purple!75!black] coordinates { (NaCl (B1),23.998934) (TiC (B1),27.367181) (FeSi (B20),38.077585) }; % q-EoS (n=2) — NaCl: 1.962260, TiC: 54.617663, FeSi: 61.961751 \addplot+[fill=green!70!black, draw=green!50!black] coordinates { (NaCl (B1),1.962260) (TiC (B1),54.617663) (FeSi (B20),61.961751) }; % q-EoS (n=3) — NaCl: 3.740124, TiC: 59.084828, FeSi: 68.649034 \addplot+[fill=orange!90, draw=orange!70!black] coordinates { (NaCl (B1),3.740124) (TiC (B1),59.084828) (FeSi (B20),68.649034) }; \end{groupplot} % Legenda centralizada acima dos dois painéis \node at ($(group c1r1.south east)!0.5!(group c2r1.south west)+(0,-1.1cm)$) {\pgfplotslegendfromname{gruppolegend}}; \end{tikzpicture} \end{document}

  • Lstlisting copy paste code properly, without showing ␣
    by gioQ on May 12, 2026 at 8:51 am

    I'm trying to improve the copy paste from a lstlisting code block. Firstly, I removed the possibility to copy the line numbers, but now I can't keep the spaces/tabs as I want. \documentclass{article} \usepackage[T1]{fontenc} \usepackage{lmodern} % font \usepackage{accsupp} \usepackage{listings} \usepackage{xcolor} \newcommand{\noncopynumber}[1]{% \BeginAccSupp{ActualText={}}#1\EndAccSupp{}% } \makeatletter \def\lst@outputspace{{\ifx\lst@bkgcolor\empty\color{white}\else\lst@bkgcolor\fi\lst@visiblespace}} \makeatother \lstdefinestyle{BaseProgrammingStyle}{ keywordstyle=\color[HTML]{d8127e}\bfseries, % keyword: bf pink commentstyle=\color[HTML]{009900}, % comments: green backgroundcolor=\color[HTML]{f2f2eb}, % Background: beige numbers=left, numberstyle=\color{gray}\noncopynumber, % line numbers: gray stringstyle=\color[HTML]{9400d1}, % strings: purple aboveskip=1em, belowskip=1em, upquote=true, basicstyle=\ttfamily\small, frame=none, showstringspaces=false, breaklines=true, breakatwhitespace=true, lineskip=0pt, sensitive=false, literate={~} {$\sim$}{1}, % classic tilde keepspaces=true, columns=fullflexible, tabsize=2, } \lstdefinestyle{cstyle}{ style=BaseProgrammingStyle, language=C, morekeywords={system} } \begin{document} \begin{lstlisting}[style=cstyle] #include <stdio.h> int main(){ int s = 0; char buffer[10]; gets(buffer); // any lenght allowed, but adds \0 at the end printf("buffer: %s\n", buffer); printf("s: %d\n", s); } \end{lstlisting} \end{document} This is the solution I found, but when I copy the code, the spaces are shown as ␣.

  • Accent shift with `yhmath`'s nested `\widehat`/`\hat` command?
    by Explorer on May 12, 2026 at 3:55 am

    I have the following code: \documentclass{article} \usepackage{amsmath} \usepackage{yhmath} \begin{document} $\widehat{AAABCCC}$ $\widehat{AAA\hat{B}CCC}$ $\widehat{AAA\widehat{B}CCC}$ \end{document} Here are some related information I have searched: How to make the \widehat wider? https://tex.stackexchange.com/a/320440 https://tex.stackexchange.com/a/101136 If I don't want mtpro2's style of \widehat(like this), any suggestions on the accent shift issues with nested \widehat/\hat commands? Edited: The symbol used here is common with statistic lession, for example the Asymptotic Standard Error:

  • Why is the current page.center of a beamer page not making my image flush with the edges?
    by Jasper on May 12, 2026 at 2:29 am

    Why is the current page.center of a beamer page not making my image flush with the edges? Compile with lualatex: Learning from samcarter's solution, the code below is okay to put the image: \documentclass{beamer} \usepackage{tikz} \begin{document} \begin{frame}[plain] \begin{tikzpicture}[remember picture,overlay] \node[at=(current page.center)] { \includegraphics[width=\paperwidth, height=\paperheight]{example-image} }; \end{tikzpicture} \end{frame} \end{document} However, if put inside animateinline, as below: \documentclass{beamer} \usepackage{graphicx,tikz,animate} \begin{document} { \setbeamertemplate{navigation symbols}{} \begin{frame}[plain] \begin{animateinline}[autoplay,loop]{10}% % Credit to @Explorer's comment: \begin{tikzpicture}[remember picture,overlay] \node at (current page.center) {\includegraphics[ width=\pagewidth,height=\pageheight ]{example-image}}; \end{tikzpicture} \end{animateinline} \end{frame} } \end{document} The code complained that: ! Package animate Error: Content of first frame must not have zero width. See the animate package documentation for explanation. Type H <return> for immediate help. ... l.20 \end{frame} ? In regard to the comment about https://tex.stackexchange.com/a/656219/319072, the following MWE still is not flush. \documentclass{beamer} \usepackage{graphicx,tikz,animate} \begin{document} \AtBeginShipoutNext{% \AtBeginShipoutUpperLeft{% \unitlength=\paperheight% \put(0,-1){% \begin{animateinline}[autoplay,loop]{10}% \begin{tikzpicture} \node at (current page.center) {\includegraphics[ width=\pagewidth,height=\pageheight ]{example-image}}; \end{tikzpicture} \end{animateinline}% }% }% }% { \setbeamertemplate{navigation symbols}{} \begin{frame} \end{frame} } \end{document}

  • Minted–add a box around each token
    by Jean Dubois on May 11, 2026 at 3:00 pm

    I have some minted code blocks in a beamer, such as: \documentclass[compress]{beamer} \usepackage{minted} \setminted[ocaml]{ frame=leftline, framesep=6pt, rulecolor=gray, linenos=true, numbersep=4pt, xleftmargin=20pt, breaklines=true, tabsize=2, } \begin{document} \begin{frame} \inputminted{ocaml}{some_file.ml} %% HERE \end{frame} \end{document} where some_file.ml is, say: let rec sum l = match l with | [] -> 0 | x::q -> x + sum q As expected, this is the output I get: I would like to box every token in the file, either automatically or manually (every snippet is as small as this example), approximately like this: I have absolutely no idea how to do this. I searched in the minted documentation for “token” but found nothing relevant. Is it possible to do this and if so, how can I achieve it? Thank you in advance 🙂

  • How to draw two squares beside each other?
    by Intuition on May 11, 2026 at 11:23 am

    Here is the picture I want to draw: I know how to draw just one colored square, for example here is a code to it: \documentclass[12pt]{article} \usepackage[utf8]{inputenc} \usepackage[a4paper, margin=1.5in]{geometry} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{tikz-cd} \usepackage{amsmath,amsfonts,amssymb} \usepackage{amsthm} \usepackage{graphicx} \usepackage[all,cmtip]{xy} \usepackage[english]{babel} \usepackage{xurl} \usetikzlibrary{positioning, shapes.geometric} \begin{document} \begin{tikzpicture}[ every path/.style={thick}, every node/.style={circle,fill=black,draw,inner sep = 0pt, minimum size= 2pt} ] \draw[red] (0,0)--(2,0); \draw[cyan] (2,0)--(2,2); \draw[yellow] (2,2)--(0,2); \draw[red] (0,2)--(0,0); \draw[green] (0,0)--(2,2); %\draw[green] (0,2)--(2,0); \foreach \corner in {(0,0), (2,0), (2,2), (0,2)} \node at \corner {}; \end{tikzpicture} \end{document} Also, how to remove the common edge if I aligned the two squares beside each other? Any help will be greatly appreciated.

  • Sans serif font [duplicate]
    by m4r35n357 on May 11, 2026 at 11:04 am

    How do I set a sans-serif document font in Latex? This simple question does not seem to have an answer here at all - everyone already seems to know it and nobody asks. MWE: \documentclass{book} \usepackage[T1]{fontenc} \author{me} \title{Blah} \date{never} \begin{document} \frontmatter \maketitle\tableofcontents \mainmatter Hello \end{document} I have been asked to explain why my question is different to this one. Two reasons: I am looking for a global solution, not tweaking as I go. The answers there are not what I want. The ones here are what I want.

  • Lua based solution for tracking equivalent to fontspec LetterSpace Opentype feature
    by David Purton on May 9, 2026 at 10:41 am

    I've been using the OpenType LetterSpace font feature to adjust tracking. It does what I want, but has the side effect of creating a new font instance, which is annoying when babel is in use as the newly created instance is not known to babel. I'd like a drop in alternative implemented in Lua that behaves the same. But it's beyond my skill and understanding. Requirements: No change in the word spacing (like fontspec). Like for like behaviour when same number is supplied as I was using with LetterSpace (I already spent time tuning things to this number). Group safe. Switch-like behaviour (like \bfseries). Optional compatibility with the microtype package if loaded. I probably don't care specifically what happens if you try and use both tracking methods at the same time – one or the other in use is sufficient. But other microtype features need to still work (like protrusion, etc.). Here's a MWE that shows the current behaviour I have with the LetterSpace option. If possible, I'd like the numbers and output to match. %! TeX Program = lualatex \documentclass{article} \pagestyle{empty} \usepackage{fontspec} \setmainfont{Noto Serif} \newlength{\testlen} \newcommand{\settracking}[1]{% \addfontfeatures{LetterSpace=#1}} \begin{document} \begin{tabbing} \settowidth{\global\testlen}{Test Test} Test Test \= width: \the\testlen \\ \settracking{-5}\settowidth{\global\testlen}{Test Test} Test Test \> width: \the\testlen \\ \settowidth{\global\testlen}{Test Test} Test Test \> width: \the\testlen \\ \end{tabbing} \end{document}