• Troubles with negative numbers on bar graph
    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 ␣.

  • ConTeXt: "inbetween" math option is not working properly
    by Georgian Ilie on May 12, 2026 at 8:49 am

    Good morning everyone, I am encountering a problem while typing systems of equations. I would like to increase the space separating the equations, but I am not finding a sound way to do it. From the best that I have understood from the ConTeXt math documentation, this parameter should be set by the option inbetween, which should be appended to the \startcase...\stopcase environment. This approach was tried unsuccessfully in the simple example reported next: \setuphead[section] [style=\ss\bf, grid=line, method=m, % 'm' stands for 'max'—it forces the line height to the grid max before={\blank[force, 2*line]}, after={\blank[line]}] \setuphead[chapter] [page=right, style=\ss\tfc\bf, header=high, before=, after={\blank[line]\placecontent[criterium=local]\blank[line]}, grid=tolerant] \definecolumnset [example] [n=2] %\definecolumnsetspan[wide][n=2] \setuplayout[grid=yes] % \showgrid \starttext \startcolumnset[example] %\startcolumnsetspan[wide] %\startchapter[title=Introduction,grid=tolerant] %\stopcolumnsetspan \startsection[title=Happy] The quick, brown fox jumps \m{\varepsilon_p^*} over a lazy dog. DJs flock by when MTV ax quiz prog. Junk MTV quiz graced by fox whelps. Bawds jog, flick quartz, vex nymphs. Waltz, bad nymph, for quick jigs vex! Fox nymphs grab quick-jived waltz. Brick quiz whangs jumpy veldt fox. Bright vixens jump; dozy fowl quack. Quick wafting zephyrs vex bold Jim. Quick zephyrs blow, vexing daft Jim. Sex-charged fop blew my junk TV quiz. How quickly daft jumping zebras vex. \startformula f(x) = \startcases \NC x \NC x \geq 0 \NR \NC -x \NC x < 0 \NR \stopcases \quad \breakhere f(x) = \startcases [spaceinbetween=1\lineheight] \NC x \NC x \geq 0 \NR \NC -x \NC x < 0 \NR \stopcases \stopformula Two driven jocks help fax my big quiz. Quick, Baz, get my woven flax jodhpurs! "Now fax quiz Jack!" my brave ghost pled. Five quacking zephyrs jolt my wax bed. Flummoxed by job, kvetching W. zaps Iraq. Cozy sphinx waves quart jug of bad milk. A very bad quack might jinx zippy fowls. Few quips galvanized the mock jury box. Quick brown dogs jump over the lazy fox. The jay, pig, fox, zebra, and my wolves quack! Blowzy red vixens fight for a quick jump. Joaquin Phoenix was gazed by MTV for luck. A wizard’s job is to vex chumps quickly in fog. Watch "Jeopardy!", Alex Trebek's fun TV quiz game. Woven silk pyjamas exchanged for blue quartz. Brawny gods just \stopsection \stopcolumnset \stoptext What am I mistaking? Thank you in advance for your help.

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

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

  • I want a fullscreen image in beamer; corner to corner [duplicate]
    by Jasper on May 12, 2026 at 1:43 am

    I want a fullscreen image in beamer. Corner to corner; no more, no less. Currently that is not the case. An answer would be sufficient if it could produce the same size of frame, replaced by the exact same size of image. Compile this with lualatex. \documentclass{beamer} \usepackage{graphicx} % https://tex.stackexchange.com/a/143102/319072 \makeatletter \newlength\beamerleftmargin \setlength\beamerleftmargin{\Gm@lmargin} \makeatother \begin{document} { \setbeamertemplate{navigation symbols}{} \begin{frame} \hspace*{-\beamerleftmargin} \includegraphics[width=\pagewidth,height=\pageheight]{example-image} \end{frame} } \end{document}

  • Multilingual document: switch main language in order to switch layout within a document
    by ncdipde on May 11, 2026 at 8:27 pm

    I am writing a document whose main language is French. A whole section is in English \section{Abstract} And then other sections are in French \section{Résumé} \section{Méthodes} etc. I would like the English section to respect English typographic rules (note only punctuation or quotes) and other sections in French to respect French typographic rules. Writing \selectlanguage{english} or using otherlanguage environment only change the locale language which changes how quotes render for example, but it does not change first paragraph indentation nor the \labelitemi Is it possible to switch the main language for a whole section ? Thereafter a minimal example: \documentclass[paperletter, 12pt, english, french]{article} \usepackage{babel} \usepackage[inline]{enumitem} \usepackage{lipsum} \title{Plain Latex} \begin{document} \section{Français} Une liste en français \begin{itemize} \item La langue \og principale\fg{} est : \mainlocalename ! \item La langue \og courante\fg{} est : \localename ; \end{itemize} \lipsum[1][1-3]\par \lipsum[1][4-6] \selectlanguage{english} \section{English} A list in English \begin{itemize} \item The \og main\fg{} language is : \mainlocalename ! \item The \og current\fg{} language is : \localename ; \end{itemize} \lipsum[2][1-3]\par \lipsum[2][4-6]\par \subsection{poor patches} \noindent \lipsum[3][1-3]\par \lipsum[3][4-6]\par \begin{itemize}[label={\textbullet}] \item The \og main\fg{} language is : \mainlocalename ! \item The \og current\fg{} language is : \localename ; \end{itemize} \end{document}

  • ConTeXt: Why don't these footnote symbols resolve?
    by Jeff Dodson on May 11, 2026 at 8:17 pm

    I'm having some issues getting way=bypage footnotes to resolve with ConTeXt. I'm seeing instances where a footnote caller appears in my main text on the last line of a page, but the actual footnote appears on the following page. Here's an MWE to show what I'm referring to: \setuppapersize[A5] \setupbodyfont[10pt] \setupinterlinespace[line=13bp] \setuplayout[lines=20] \setupnote[footnote] [split=verystrict, scope=page, location=page, nextpage=yes] \setupnotation[footnote] [way=bypage, numberconversion=characters] \starttext \dorecurse{18}{\input ward\footnote{Note \recurselevel\ on page one.} } \dorecurse{18}{\input ward\footnote{Note \recurselevel\ on page two.} } \stoptext

  • Is there an AI-powered latex IDE? [duplicate]
    by ipeiem ipeiem on May 11, 2026 at 5:06 pm

    The question of whether an AI-powered LaTeX IDE exists has become increasingly common among researchers and students wrestling with complex document preparation. Such a tool would theoretically combine the precision of traditional typesetting with intelligent assistance for equation generation, error resolution, and structural organization.

  • \selectfont does not affect font size for math
    by D G on May 11, 2026 at 3:55 pm

    The math mode is not affected by the selected font size. \documentclass[border=1cm]{standalone} \usepackage{xeCJK} \usepackage{siunitx} \sisetup{detect-all} \begin{document} \fontsize{10cm}{10cm}\selectfont dimension: $\SI{10}{\cm}\times\SI{20}{\cm}$ \end{document} Note: xeCJK is mandatory.

  • Creating a \hookrightnotleftarrows operator
    by Alma Arjuna on May 11, 2026 at 3:21 pm

    I wish to create a math operator, which I'm calling \hall, similar to \rightleftarrows, but the arrows should be hooked, as in \hookrightarrow and \hookleftarrow; the left arrow (which is below) should be crossed. I've tried to create the symbol with the following code, but it turned out quite ugly because of spacing. \documentclass{standalone} \usepackage{amssymb, amsmath} \usepackage{centernot} \newcommand{\hall}{{\hookrightarrow}\atop{\centernot\hookleftarrow}} \begin{document} $\rightleftarrows$ $\hall$ \end{document} It would also be nice if the hook in the left arrow would be pointed downwards instead of upwards. I tried fixing this with a \rotatebox, but this messed up with the arrow size.

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

  • Context: how can I deal with line spreading due to inline math?
    by Georgian Ilie on May 11, 2026 at 1:39 pm

    Good afternoon, I would like to know if I can do grid typesetting without the need of enlarging too much the line spacing to accomodate the subscripts of math formulas. Indeed, without adjsuments the latter leave annoying white spaces afterwards. In the following, I provide an example code and its output to make it clear: \setuphead[section] [style=\ss\bf, grid=line, method=m, % 'm' stands for 'max'—it forces the line height to the grid max before={\blank[force, 2*line]}, after={\blank[line]}] \setuphead[chapter] [page=right, style=\ss\tfc\bf, header=high, before=, after={\blank[line]\placecontent[criterium=local]\blank[line]}, grid=tolerant] \definecolumnset [example] [n=2] %\definecolumnsetspan[wide][n=2] \setuplayout[grid=yes] % \showgrid \starttext \startcolumnset[example] %\startcolumnsetspan[wide] %\startchapter[title=Introduction,grid=tolerant] %\stopcolumnsetspan \startsection[title=Happy] The quick, brown fox jumps \m{\varepsilon_p^*} over a lazy dog. DJs flock by when MTV ax quiz prog. Junk MTV quiz graced by fox whelps. Bawds jog, flick quartz, vex nymphs. Waltz, bad nymph, for quick jigs vex! Fox nymphs grab quick-jived waltz. Brick quiz whangs jumpy veldt fox. Bright vixens jump; dozy fowl quack. Quick wafting zephyrs vex bold Jim. Quick zephyrs blow, vexing daft Jim. Sex-charged fop blew my junk TV quiz. How quickly daft jumping zebras vex. Two driven jocks help fax my big quiz. Quick, Baz, get my woven flax jodhpurs! "Now fax quiz Jack!" my brave ghost pled. Five quacking zephyrs jolt my wax bed. Flummoxed by job, kvetching W. zaps Iraq. Cozy sphinx waves quart jug of bad milk. A very bad quack might jinx zippy fowls. Few quips galvanized the mock jury box. Quick brown dogs jump over the lazy fox. The jay, pig, fox, zebra, and my wolves quack! Blowzy red vixens fight for a quick jump. Joaquin Phoenix was gazed by MTV for luck. A wizard’s job is to vex chumps quickly in fog. Watch "Jeopardy!", Alex Trebek's fun TV quiz game. Woven silk pyjamas exchanged for blue quartz. Brawny gods just \stopsection \stopcolumnset \stoptext Thank you in advance for your help.

  • Interlinear glossing - Notes above the text that wrap with the paragraph
    by J. M. on May 11, 2026 at 11:29 am

    I have been trying to create a feature that would allow me to add translations into another language in small font above the sentences in the source paragraph. The translations must start above the target word (at the beginning of the sentence), but then flow with the rest of the main paragraph and wrap along with it (or at least give that impression visually). The goal here is not to translate word for word— I could easily add a note with translated word above the source words separately. The font is set to a small size to ensure that the translation does not overflow the end of the source sentence. This is best illustrated by the image: I have carried out this successful attempt in the HTML / CSS / JS using latex.css, but the process fails when paginating with paged.js—the source paragraph wraps when transitioning from page to page, but the added translation sentences are problematic in this regard, as they are simply separately generated paragraphs with calculated first-line indentation (x coordinate shift) and wide line spacing that is shifted above the target coordinate (y coordinate shift). Since I plan to print the final result as a language teaching material, pagination and layout are crucial, so I’ve decided to switch to LaTeX instead. Since I have been unable to achieve the desired result through various methods there, I would like to ask for your help in finding or creating a feature that produces the same effect. I haven't been involved with LaTeX for very long, and I admit that I may be missing some knowledge needed to achieve the goal. GPT is not much help with this particular problem. Thank you very much for your willingness to help and for your time

  • 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} % start document \frontmatter % the front of the book has roman numerals \maketitle\tableofcontents % generates a titlepage and Contents \mainmatter % the main part of the book will have standard pages 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.

  • Has processing of blank source lines in array environments changed?
    by Klaus on May 11, 2026 at 10:00 am

    I have a LaTeX source text which I could run through pdflatex on April 15 but which fails today May 11. I can make the source text work again by deleting blank lines in array environments (400 places in my case). Here is a minimal failing example of a source text which does not compile: \documentclass{article} \begin{document} \[\begin{array}{l} foo \end{array}\] \end{document} In contrast, this compiles: \documentclass{article} \begin{document} \[\begin{array}{l} foo \end{array}\] \end{document} Also, this compiles: \documentclass{article} \begin{document} \[\begin{array}{l} foo \\ \end{array}\] \end{document} So my question is: what makes the minimal failing example above fail today? Or, equivalently, what made it work on April 15? Between April 15 and today I have upgraded my Fedora Linux installation so, in particular, I have upgraded TeX related packages. My guess is that some TeX related package has changed. My LaTeX source text which worked on April 15 used the following packages: centernot latexsym amssymb graphicx amsmath url enumitem stackengine accents printlen cancel tocloft makeidx tikz. So it could be that one of those packages made the minimal failing example work previously but not anymore.

  • TeX4ht fails to find image if make4ht -B option is used
    by oleksii.markovets on May 11, 2026 at 8:18 am

    I'm compiling my document in 3 different formats (pdf, odt, html), in order to avoid conflicts I'm using separate build directories for each format. But compilation to odt/html fails if document contains images and -B/--build-dir is used. Here is my sources test.tex: \documentclass{article} \usepackage{graphicx} \begin{document} test \begin{figure} \centering \includegraphics{img/test.eps} \caption{Test} \label{fig:test} \end{figure} \end{document} test.mk: Make:latexmk {} And here is compilation output: $ make4ht -e test.mk4 -B odt-build -d odt-out -f odt --lua test [STATUS] make4ht: Conversion started [STATUS] make4ht: Input file: test --- error --- Can't find/open file `img/test.png.4og' [FATAL] make4ht-lib: Fatal error. Command tex4ht returned exit code 1 But if I don't use -B option, it compiles just fine: $ make4ht -e test.mk4 -d odt-out -f odt --lua test [STATUS] make4ht: Conversion started [STATUS] make4ht: Input file: test [STATUS] make4ht: Conversion finished

  • How to use/define longtblr (from tabularray) with two independent caption counters
    by Vitor Coimbra on May 11, 2026 at 12:58 am

    For a document I'm working on, there's a distinction between "frames" and "tables". Long story short, tables are for purely numerical data, while frames can contain text. Because they're separate entities, I need to make sure they're also indexed separately. I managed to somehow figure out how to do that for normal tblrs by creating my own floating environments, which can easily keep track of their own counters. Main issue is that I'm working with some massive tables of numbers and text, meaning I need to use longtblrs for both of these entities pretty much everywhere. longtblrs, however, seem to embed caption stuff into their own innards and so far all my attempts to get independent counters to work have not worked. Here's the latest attempt I've made: \documentclass{article} \usepackage{tabularray} \DeclareTblrTemplate{caption-sep}{default}{ -- } \UseTblrLibrary{counter} \newcounter{framecounter} \NewTblrTheme{frame}{ \DeclareTblrTemplate{caption-tag}{default}{ \stepcounter{framecounter} Frame\ \theframecounter } } \begin{document} \begin{tblr}[ long, caption = {This should be Frame 1}, label = {frm:testframe1}, theme=frame ]{ colspec = {X[c]X[c]}, hlines, vlines } This is & a table test \\ to see & if counters work \\ \end{tblr} \begin{tblr}[ long, caption = {This should be Table 1}, label = {tab:testtable1}, ]{ colspec = {X[c]|X[c]}, hlines } This is & a table test \\ to see & if counters work \\ \end{tblr} \begin{tblr}[ long, caption = {This should be Frame 2}, label = {frm:testframe2}, theme=frame ]{ colspec = {X[c]X[c]}, hlines, vlines } This is & a table test \\ to see & if counters work \\ \end{tblr} References (and what they should be, in brackets): Frame \ref{frm:testframe1} (1), Table \ref{tab:testtable1} (1), Frame \ref{frm:testframe2} (2) \end{document} And what it looks like:

  • ATS-compliant CV: suppress text of an icon when coping from PDF
    by Akira on May 10, 2026 at 7:33 pm

    I am compiling my CV with lualatex. I would like to make my CV ATS-compliant where ATS is "Applicant Tracking System". \documentclass{article} \usepackage{fontawesome5} \newcommand{\iconExternal}{{\tiny \faExternalLink*} } \begin{document} I have an icon \iconExternal which is beautiful. \end{document} gives When I copy the content from the PDF, I get I have an icon External-Link-Alt which is beautiful. I would like to ask how to suppress External-Link-Alt when copying. Thank you for your elaboration.

  • Tikz node text width and alignment messed up spaces and indentation
    by aky-her on May 10, 2026 at 5:52 pm

    I have a mono-spaced font (TeX Gyre Cursor), but when I use it in a Tikz node with text width = XYcm the spaces change size. Is there a way to either preserve the space size with the width command, or achieve automatic line breaks in tikz node in some other way that does not break the spaces? Additionally, when using alignemnt, it inserts an indent at the start of the text, which I was not able to remove with \setlength{parindent}{0pt}. What causes this indent and how can I remove it? Here is my full node code: \node at (3, 1.75) [ align = left, text width = 4.6cm, ] {\setlength{\parindent}{0pt}\textbf{\setfontsz{\sztext} Text line 1, Longer text line 2, Even way way way way longer text line 3, Text line 4}}; EDIT: here is the full code: \documentclass{article} \usepackage[paperheight=8cm, paperwidth=6cm, left=0pt, top=0pt, right=0pt, bottom=0pt]{geometry} \usepackage{tikz} \usepackage{fontspec} \usepackage{array} \setmainfont{TeX Gyre Cursor} \newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}} %% horizontal centering \newcommand{\setfontsz}[1]{ \fontsize{#1}{1.2#1} \selectfont } \pagestyle{empty} %\renewcommand{\arraystretch}{2.2} \newcommand{\sztext}{8pt} \begin{document} %\vspace*{-\baselineskip} \begin{tikzpicture}[remember picture, overlay, shift = {(current page.south west)}] \node at (current page.center) [] {\includegraphics[height=\paperheight]{example-image-a.png}}; \node at (3, 1.75) [ align = left, text width = 4.6cm, ] {\setlength{\parindent}{0pt}\textbf{\setfontsz{\sztext} Text line 1, Longer text line 2, Even way way way way longer text line 3, Text line 4}}; \end{tikzpicture} \end{document}

  • Arrows pointing into dots
    by Tala Cruz on May 10, 2026 at 11:51 am

    I am trying to draw a diagram that shows an equivalence chain between statements. I am trying to use tikz-cd to achieve this, here is my code. \[ \begin{tikzcd} \exists \alpha_1,\cdots,\alpha_n \in \mathbb{R} \;\; f(\alpha_1,\cdots,\alpha_n) < 0 \ar[d, Leftrightarrow] \\ \exists \alpha_1,\cdots,\alpha_n \in \mathbb{R}(X_1) \;\; f(\alpha_1,\cdots,\alpha_n) \prec 0 \ar[d, Leftrightarrow] \\ \exists \alpha_1,\cdots,\alpha_n \in \mathbb{R}(X_1,X_2) \;\; f(\alpha_1,\cdots,\alpha_n) \prec 0 \ar[d, Leftrightarrow] \\ \vdots \ar[d, Leftrightarrow] \\ \exists \alpha_1,\cdots,\alpha_n \in \mathbb{R}(X_1,\cdots,X_n) \;\; f(\alpha_1,\cdots,\alpha_n) \prec 0 \end{tikzcd} \] However, there is an undesired space above the \vdots, as shown: I have tried using \raisebox but it only seems to make the lower gap larger. Is there a way to make the dots’ spacing the same as the other lines? (I am also fine with a solution that does not need tikz-cd).

  • “This page intentionally left blank” after \part when titlesec is used
    by John C on May 10, 2026 at 9:12 am

    I wanted the text "This page intentionally left blank." to appear in the book class whenever a new chapter starts leaving the preceding even page empty. I solved this problem a few years ago by adding the following code to the preamble: \makeatletter \def\cleardoublepage{\clearpage% \if@twoside \ifodd\c@page\else \vspace*{\fill} \hfill \begin{center} \emph{This page intentionally left blank.} \end{center} \vspace{\fill} \thispagestyle{empty} \newpage \if@twocolumn\hbox{}\newpage\fi \fi \fi } \makeatother Recently, I noticed that the page following \part was completely empty. I found the solution here “This page intentionally left blank” after \part, where it was suggested to modify the \@endpart command as follows: \makeatletter \def\@endpart{\vfil\newpage\if@twoside \if@openright \mbox{} \vspace*{\fill} \begin{center} \emph{This page intentionally left blank.} \end{center} \vspace{\fill} \thispagestyle{empty} \newpage\fi\fi \if@tempswa\twocolumn\fi} \makeatother However, when formatting the titles with titlesec, the problem reappears: pages inserted after \part are completely empty, ignoring the previous instructions. Nevertheless, the empty page before \part correctly mainteins the text "This page intentionally left blank.". Is there a way to solve this problem? Below is a minimal working example showing what I have been able to achieve so far: \documentclass{book} % This page intentionally left blank \makeatletter \def\cleardoublepage{\clearpage% \if@twoside \ifodd\c@page\else \vspace*{\fill} \hfill \begin{center} \emph{This page intentionally left blank.} \end{center} \vspace{\fill} \thispagestyle{empty} \newpage \if@twocolumn\hbox{}\newpage\fi \fi \fi } \makeatother % This page intentionally left blank after "\part" \makeatletter \def\@endpart{\vfil\newpage\if@twoside \if@openright \mbox{} \vspace*{\fill} \begin{center} \emph{This page intentionally left blank.} \end{center} \vspace{\fill} \thispagestyle{empty} \newpage\fi\fi \if@tempswa\twocolumn\fi} \makeatother \usepackage{titlesec} \usepackage{xcolor} \titleformat{\part}[display]{\centering\sffamily\huge\bfseries\color{red}}{\partname\ \thepart}{20pt}{\Huge} \begin{document} Text \part{Text} Text \end{document}

  • Best base class for developing class to match existing MS word template
    by James Tocknell on May 10, 2026 at 6:09 am

    I have an existing MQ word template (.dotx) that I would like to translate to a LaTeX class. It is not an especially complex template: a standard header and footer which could be reproduced using fancyhdr and minipage (though the first page footer is different to the rest of the pages), an inline (i.e. not full page) title with custom style, a document revision table and table of contents, and follows similar rules to the article class (though with some extra metadata, no abstract and section (not subsection) headers are coloured). I could start with the article class and add extra packages on top, but I'm wondering is there a better base class which might save me some time/effort and be more maintainable? I'm aware of both the koma-script and memoir classes: I'm not familiar with koma-script (and I can't read German, though this is for an AU-based organisation, so might benefit from choices there), and memoir seems to be designed for much larger documents than this?

  • Overriding the column number for enumext inline list items
    by Teepeemm on May 9, 2026 at 2:34 pm

    The enumext package allows inline lists with a set number of columns that can be overridden, like this: \documentclass{article} \usepackage{enumext} \begin{document} \begin{enumext*}[columns=2] \item Short \item Short \item Short \item Short \item(2) A longer item that takes both columns to show \item Short \item Short \item Short \item Short \end{enumext*} \end{document} This works well if most items need the short column, and there's an occasional longer item. I have the opposite setup: most of my items are longer, but there's an occasional pair of short items. I could do this with: \documentclass{article} \usepackage{enumext} \begin{document} \begin{enumext*}[columns=2] \item(2) A longer item that takes both columns to show \item(2) A longer item that takes both columns to show \item Short \item Short \item(2) A longer item that takes both columns to show \item(2) A longer item that takes both columns to show \end{enumext*} \end{document} But writing (2) every time is annoying. Is there a way to say that (2) is the default, and then specify (1) for the short items? Something like: \documentclass{article} \usepackage{enumext} \begin{document} \begin{enumext*}[columns=2,item-columns=2] % Package enumext Error: The key 'item-columns=2' is unknown by environment 'enumext*' and is being ignored. \item A longer item that takes both columns to show \item A longer item that takes both columns to show \item(1) Short \item(1) Short \item A longer item that takes both columns to show \item A longer item that takes both columns to show \end{enumext*} \end{document} I've tried \NewCommandCopy\olditem\item \RenewDocumentCommand\item{D(2)}{\olditem(#1)} Within the {enumext*} environment this causes an error ("! Missing number, treated as zero." and then a fatal error). Outside the environment this causes the next item to display as "()2).[]", but with less spacing. (Note that this document needs to be tagged, so using the enumitem or enumerate packages is not an option.)

  • How to make the `\hrule` in custom math symbol rounded?
    by Explorer on May 9, 2026 at 1:05 pm

    Learning from the classical egreg's solution for example here and here, I try to construct the custom symbols: with the following code: \documentclass{article} \usepackage{amsmath} \makeatletter \newcommand{\myge}{\mathrel{\mathpalette\myrel@{\@firstoftwo}}} \newcommand{\myle}{\mathrel{\mathpalette\myrel@{\@secondoftwo}}} \newcommand{\myrel@}[2]{% \begingroup \setbox\z@=\hbox{$\m@th#1=$}% \vcenter to \dimexpr.75\ht\z@\relax{% #2{% \hrule width \dimexpr2\wd\z@\relax \vfill \hrule width \wd\z@ }{% \hrule width \wd\z@ \vfill \hrule width \dimexpr2\wd\z@\relax }% }% \endgroup } \makeatother \begin{document} \[ a \myge b \quad a \myle b \] \[ \displaystyle a \myge b \quad \textstyle a \myge b \quad {}_{\scriptstyle a \myge b} \quad {}_{\scriptscriptstyle a \myge b} \] \[ \displaystyle a \myle b \quad \textstyle a \myle b \quad {}_{\scriptstyle a \myle b} \quad {}_{\scriptscriptstyle a \myle b} \] \end{document} but which gives: I want to know that, based on my code, any suggestions to change the rule from butt to rounded? I don't think with tikz is a good choice... here...

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

  • negating math symbols
    by Antonis on May 9, 2026 at 10:36 am

    I have been asked to introduced negated mathrel symbols in NewCM that do not exist in Unicode standard. Before I get into adding extra symbols in NewCMMath I would like to make sure that a macro does not suffice. I tested with the \not command or relative packages like centernot without good results. Then there is \ooalign. For example, \documentclass{article} \usepackage[olddefault]{fontsetup} \makeatletter \newcommand{\ndisin}{\mathrel{\mathpalette\overlay@slash\disin}} \newcommand{\overlay@slash}[2]{% \ooalign{$\m@th#1#2$\cr\hss$\m@th#1/$\hss}% } \makeatother \begin{document} $y\ndisin A_{y\ndisin A_{y\ndisin A}}$ \end{document} Produces This shows that exactly centering the two symbols is not always good. The slash should be better placed a bit to the right (centered with respect to \in). So the question is if it is possible to make such adjustments on the above or other code to get the desired result, or one has to go to the font level and design new characters.

  • How can I list or visualize all available anchors of a CircuitTikZ component?
    by internet on May 8, 2026 at 9:31 am

    I am using CircuitTikZ and often need to connect wires or labels to component anchors. However, it is not always easy to know which anchors are available for a specific component. For example, different components may provide anchors such as north, south, in, out, gate, collector, emitter, etc., and the available anchors vary depending on the component type. When building more complicated schematics, I frequently need to stop and search through the documentation to check anchor names. I was wondering whether there is a way to programmatically: List all available anchors of a given CircuitTikZ/TikZ shape/components, and/or Visualize those anchors directly on the rendered component. For example, something conceptually like: \showanchors{a component/shape} that would either print all anchor names and draw markers/labels on the component itself. So my question is: Is there a practical way to list all anchors associated with a TikZ/CircuitTikZ shape? My motivation is mainly usability and workflow efficiency. A tool like this would make it much easier to explore unfamiliar components and reduce the need to constantly check the manual, especially for beginners or occasional CircuitTikZ users. This is an example of visualizing the anchors to help wiring from CircuiTikz documentation. A possible MWE (clearly, the pin thing must be adjusted somehow to have a better distribution, and to take into account that labels can have spaces and strange characters, but well...). The task it to substitute the \allanchors definition with something automatic, see the comment above it. \documentclass[border=10pt]{standalone} \usepackage[T1]{fontenc} \usepackage[siunitx, RPvoltages]{circuitikz} \begin{document} \begin{tikzpicture}[every pin/.append style={text=red, inner sep=1pt, font=\tiny\ttfamily}] \node [npn](myshape) at (0,0) {}; % Example: this should be autofilled % Basically, for every shape named, say, "gizmo", the anchor "spot" % is a macro named pgf@anchor@gizmo@spot % --- so to do what you want, you should be able to find all % the macros with that pattern that exist % (and I do not know if this is possible in TeX in general, % maybe in LuaTeX...). \newcommand{\allanchors}{center,E,B,south} \foreach \anc in \allanchors { \node[circ, pin=45:\anc] at (myshape.\anc) {}; } \end{tikzpicture} \end{document}

  • Why is there no spacing around the plus sign?
    by John Sullivan on May 7, 2026 at 10:02 am

    Why is there nice spacing around the + inside the parentheses, but not around the one just after the parentheses? \documentclass{article} \begin{document} $$-\tau N = B'=-\theta'\bigl(\cos\theta\, U + \sin\theta\, V\bigl) + 0 T = -\theta' N$$ \end{document}