Hot
- Remember coordinate in nested tikzpicture with listingsby 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>{\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 commandby الحساب الأساسي 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.styby 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 pageby 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}
- "TeXpresso incremental compilation: how are cross-file dependencies and BibTeX aux files handled?"by 안수남 on May 13, 2026 at 1:46 am
TeXpresso's driver maintains an incremental view of the document by re-rendering only modified portions. However, I'm unclear on how it resolves cross-file dependency invalidation specifically: If a shared macro file (macros.tex) is modified, does TeXpresso correctly invalidate and re-render all files that \input{} it, or does it only track the root file's dependency tree? Since TeXpresso requires a separate full compilation pass to generate .aux files for BibTeX, what is the recommended workflow when citations are frequently updated mid-editing session? Does the incremental engine retain stale citation data between full compilation passes? I'm evaluating TeXpresso for a large collaborative project and trying to understand the boundaries of its incremental model before committing to the toolchain.
- 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 ␣.
- ConTeXt: "inbetween" math option is not working properlyby 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 documentby 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 mathby 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 operatorby 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 tokenby 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 🙂
- Interlinear glossing - Notes above the text that wrap with the paragraphby 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} \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.
- 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.
- How to use/define longtblr (from tabularray) with two independent caption countersby 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 PDFby 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.
- Arrows pointing into dotsby 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).
- Best base class for developing class to match existing MS word templateby James Tocknell on May 10, 2026 at 6:09 am
I have an existing MS 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 itemsby 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.)
- Lua based solution for tracking equivalent to fontspec LetterSpace Opentype featureby 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 symbolsby 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.
- 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}