Hot
- The sizes of \because and \therefore in exam-zhby M. Logic on March 3, 2026 at 1:34 am
A MWS is as follows. \documentclass{exam-zh} \makeatletter \DeclareSymbolFont{AMSa}{U}{msa}{m}{n} %\DeclareSymbolFont{AMSb}{U}{msb}{m}{n} \DeclareMathSymbol{\therefore}{\mathrel}{AMSa}{"29} \DeclareMathSymbol{\because}{\mathrel}{AMSa}{"2A} \makeatother \begin{document} $\because ABCD=\therefore ABCD$ \end{document} As you see, the sizes of \because and \therefore in exam-zh are very small although I invoke them from amssymb. How to fix this to make the sizes of them be normal when invoking them from amssymb?
- tabularray - make talltblr caption mirror other captionsby user20478285 on March 3, 2026 at 12:13 am
\documentclass{article} \usepackage[font=small, labelfont=bf, format=hang]{caption} \usepackage{tabularray} \usepackage{tblr-extras} \UseTblrLibrary{amsmath, booktabs, caption} \begin{document} \begin{table}[h] \centering \begin{talltblr}[caption={A talltblr table.}]{colspec={cc}} \toprule a & b\\ \midrule x & y\\ \bottomrule \end{talltblr} \end{table} \end{document} Using the code above, I get the following result for my talltblr (i.e. the caption width is limited to the table width). I tried the approach from here: \documentclass{article} \usepackage[font=small, labelfont=bf, format=hang]{caption} \usepackage{tabularray} \usepackage{tblr-extras} \UseTblrLibrary{amsmath, booktabs, caption} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \DefTblrTemplate{firsthead}{caption}{% \makebox[\tablewidth]{\parbox{\columnwidth}{% \UseTblrTemplate{caption}{normal}% }}% } \SetTblrTemplate{firsthead}{caption} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} \begin{table}[h] \centering \caption{A regular table. A regular table. A regular table. A regular table. A regular table. A regular table. A regular table. A regular table. A regular table.} \begin{tabular}{cc} \toprule a & b\\ \midrule x & y\\ \bottomrule \end{tabular} \end{table} \begin{table}[h] \centering \caption{A tblr table. A tblr table. A tblr table. A tblr table. A tblr table. A tblr table. A tblr table. A tblr table. A tblr table. A tblr table. A tblr table.} \begin{tblr} { colspec={cc} } \toprule a & b\\ \midrule x & y\\ \bottomrule \end{tblr} \end{table} \begin{table}[h] \centering \begin{talltblr} [ caption={A talltblr table. A talltblr table. A talltblr table. A talltblr table. A talltblr table. A talltblr table. A talltblr table. A talltblr table. A talltblr table.} ] { colspec={cc} } \toprule a & b\\ \midrule x & y\\ \bottomrule \end{talltblr} \end{table} \end{document} Now the caption has the right width, but it is too close to the table itself. Also, the caption font is too big and the label is not bold, which I can fix / hack if I add \SetTblrStyle{caption-tag}{font=\small\bfseries} \SetTblrStyle{caption-text}{font=\small} but I'm not sure if this is the way to go (and it does not fix the issue of the caption touching the table). I also tried to have a look at the default caption definitions myself in the source code but I just don't understand even remotely enough of LaTeX3).
- Issue with lslisting "leaking" in headerby user3771535 on March 2, 2026 at 10:13 pm
I have code snippets in my document, which I present using the listings package. Specifically, I want the code to be in \ttfamily. However, it seems that the lstlisting environments “leak” into the page headers (in this case, fancy headers): In the header, the text should not be in ttfamily, but in normal small caps. I tried adding \normalfont in \lstset{basicstyle= and also in the header definition \fancyhead[LO], but it didn't change anything. How can I fix this? Here is my code: \documentclass[twoside]{book} \usepackage{polyglossia} \setmainlanguage{french} \usepackage[paperheight=23.4cm,paperwidth=16cm,left=2cm,right=2cm,top=1.5cm,bottom=2.4cm]{geometry} \renewcommand{\baselinestretch}{1.15} \usepackage{fancyhdr} \pagestyle{fancy} %dit qu'on utlise le package \fancyhf{} % vide l'en tete et le pied de page par defaut de latex \fancyhead[LO]{\normalfont\small\textsc{\nouppercase{\rightmark}}} %extremite droite des pages paires \fancyhead[RE]{\normalfont\small\textsc{\nouppercase{\leftmark}}} %extremte gauche des pages impaires \fancyhead[LE,RO]{\normalfont\thepage} % \fancyfoot{} \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} \usepackage{listings} \lstset{basicstyle=\normalfont\ttfamily,frame=single,numbers=left, numberstyle=\scriptsize} \begin{document} \chapter{Nom de chapitre} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, \begin{lstlisting} No \author given. \end{lstlisting} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod \begin{lstlisting} No \author given. Reference `fig:igraph:histdegre' on page 6 undefined There were undefined references. No \author given. Reference `fig:igraph:histdegre' on page 6 undefined There were undefined references. No \author given. Reference `fig:igraph:histdegre' on page 6 undefined There were undefined references. No \author given. Reference `fig:igraph:histdegre' on page 6 undefined \end{lstlisting} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam \begin{lstlisting} No \author given. Reference `fig:igraph:histdegre' on page 6 undefined There were undefined references. No \author given. Reference `fig:igraph:histdegre' on page 6 undefined There were undefined references. No \author given. Reference `fig:igraph:histdegre' on page 6 undefined There were undefined references. No \author given. Reference `fig:igraph:histdegre' on page 6 undefined \end{lstlisting} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi \begin{lstlisting} No \author given. Reference `fig:igraph:histdegre' on page 6 undefined There were undefined references. No \author given. Reference `fig:igraph:histdegre' on page 6 undefined There were undefined references. No \author given. Reference `fig:igraph:histdegre' on page 6 undefined There were undefined references. No \author given. \end{lstlisting} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore \begin{lstlisting} No \author given. \end{lstlisting} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do \begin{lstlisting} No \author given. \end{lstlisting} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\footnote{Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt }. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. \begin{lstlisting} No \author given. \end{lstlisting} Lorem ipsum dolor sit amet, consectetur adipiscing elit, \begin{lstlisting} No \author given. Reference `fig:igraph:histdegre' on page 6 undefined There were undefined references. \end{lstlisting} \end{document}
- How to make block titles go on more than one lineby George Dewhirst on March 2, 2026 at 8:33 pm
I have a long block title, "L1 scheme for numerical approximations for stochastic subdiffusion problems" and I want to wrap it on multiple lines but am not sure how to do this. Ideally it would be L1 scheme \\ for numerical approximations \\ for stochastic subdiffusion problems where \\ denotes the new line which I am after It is coming from the template file which I enclose: \ProvidesPackage{beamerthemeParisSaclay} % this style was created by frédéric Mazaleyrat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \RequirePackage{fontawesome5} \mode<presentation> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \definecolor{jaune}{RGB}{243 185 0}%{0,150,204} \definecolor{saclaydk}{RGB}{99,0,60} \definecolor{saclayl}{RGB}{243,185,0} \definecolor{prunel}{RGB}{184, 172, 215} \definecolor{vertl}{RGB}{213,223,61} \definecolor{vert}{RGB}{140,198,62} \definecolor{rouge}{RGB}{198, 11, 70} \definecolor{mandarine}{RGB}{243, 115, 32} \definecolor{bleu}{RGB}{80, 144, 205} \setbeamercolor{headline}{fg=mandarine,bg=saclaydk} \setbeamercolor{footline}{fg=mandarine, bg=saclaydk} \setbeamerfont{footline}{size=\large,series=\sf} \setbeamercolor{separation line}{bg=saclaydk} \setbeamercolor{title in headline}{fg=white} \setbeamercolor{author in headline}{fg=bleu} \setbeamercolor{institute in headline}{fg=white} \setbeamercolor{framesubtitle}{fg=mandarine, bg=gray} \setbeamercolor{author in head/foot}{fg=white, bg=black} \setbeamercolor{title in head/foot}{fg=white, bg=saclaydk} %\setbeamercolor*{normal text}{fg=saclaydk, bg=white} % set block \setbeamercolor*{block body}{bg=saclaydk!20,fg=black} \setbeamercolor*{block title}{fg=white,bg=saclaydk} \setbeamerfont*{block title}{size=\large,series=\bf} %\setbeamercolor*{upper separation line head}{fg=saclaydk} \setbeamercolor*{block text}{fg=saclaydk,bg=vertl} % set example block \setbeamercolor*{example body}{bg=gray,fg=black} \setbeamercolor*{example text}{fg=saclaydk,bg=vertl} \setbeamercolor*{example title}{bg=vert,fg=white} \setbeamercolor{alerted body}{bg=mandarine,fg=vert} \setbeamercolor{alerted title}{fg=white,bg=rouge} \setbeamercolor{alerted text}{fg=white,bg=rouge} \setbeamercolor{structure}{fg=bleu} \setbeamertemplate{itemize items}[triangle] \setbeamertemplate{navigation symbols}{} % no navigation on a poster %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \setbeamertemplate{block begin}{ \vskip.75ex \begin{beamercolorbox}[ht=3.5ex,dp=0.5ex,center,leftskip=-1em,colsep*=.75ex]{block title}% \usebeamerfont*{block title}% %{\phantom{Gg}\insertblocktitle}% phantom because of baseline problem \parbox{\dimexpr\textwidth-2em\relax}{\insertblocktitle}% \end{beamercolorbox}% {\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}% \usebeamerfont{block body}% \begin{beamercolorbox}[leftskip=1em,colsep*=.75ex,sep=0.5ex,vmode]{block body}% \ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}% } \setbeamertemplate{block end}{ \end{beamercolorbox} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%% \setbeamertemplate{headline}{ \leavevmode \begin{beamercolorbox}[wd=\paperwidth]{headline} \begin{columns}[T] \begin{column}{.02\paperwidth} \end{column} \begin{column}{.6\paperwidth} \vskip4ex \raggedleft \usebeamercolor{title in headline}{\color{fg}\textbf{\Huge{\inserttitle}}\\[1ex]} \usebeamercolor{author in headline}{\color{fg}\large{\insertauthor}\\[1ex]} \usebeamercolor{institute in headline}{\color{fg}\large{\insertinstitute}\\[1ex]} \end{column} \begin{column}{.1\paperwidth} \vskip8ex \begin{center} %\includegraphics[width=2\linewidth]{LogoUPaS} \end{center} \vskip2ex \end{column} \begin{column}{.02\paperwidth} \end{column} \end{columns} \vskip2ex \end{beamercolorbox} \begin{beamercolorbox}[wd=\paperwidth]{lower separation line head} \rule{0pt}{3pt} \end{beamercolorbox} } %%%%%%%%%%%%%%%%%%%%% \setbeamertemplate{footline}{ % \begin{beamercolorbox}[wd=\paperwidth]{upper separation line foot} % \rule{0pt}{3pt} % \end{beamercolorbox} \setbeamercolor{coloredboxstuff}{fg=white,bg=saclaydk} \leavevmode% \begin{beamercolorbox}[ht=4ex,leftskip=1em,rightskip=1em]{coloredboxstuff}% %<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< \begin{center} % \includegraphics[height=5cm]{LOGO_CNRS_BLEU} \hspace{4cm} \includegraphics[height=5cm]{logo_ENSPaS.pdf} \hspace{4cm} % \includegraphics[height=5cm]{GS_IS}\hspace{4cm} % \includegraphics[height=5cm]{spintronique} \end{center} \faEnvelope \;2234061@chester.ac.uk %<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< \hfill Conference name %<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< \hfill \faUbuntu \; \LaTeX %<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< \vskip1ex \end{beamercolorbox} \vskip0pt% \begin{beamercolorbox}[wd=\paperwidth]{lower separation line foot} \rule{0pt}{3pt} \end{beamercolorbox} } %%%%%%%%%%%%%%%%%%%% % Display a grid to help align images ... and it looks nice with this color scheme \beamertemplategridbackground[1cm] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \mode<all> % adapt height of imtemize rectangles \setbeamertemplate{itemize items}[triangle] \setbeamertemplate{itemize item}{\raisebox{0.12ex}{\faSplotch}\hskip0.1em} \setbeamertemplate{itemize subitem}{\raisebox{0.12ex}{$\triangleright$}\hskip0.1em} % or define your own template using \defbeamertemplate{itemize item}, see beameruserguide.pdf % equal font sizes for all levels \setbeamerfont{itemize/enumerate body}{size=\normalsize} \setbeamerfont{itemize/enumerate subbody}{size=\normalsize} \setbeamerfont{itemize/enumerate subsubbody}{size=\normalsize} %%%%%%%%%%%%%%%%%%%%%%%%%%%%
- Improving the visibility of a curve in a 3D PGFPlots surfaceby Octavius on March 2, 2026 at 4:50 pm
In the left-hand figure, I would like to improve the visualization so that the red curve is more clearly visible. \documentclass[12pt,b5paper,twoside,openany]{book} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{amsmath,amssymb,amsfonts,amsthm} \usepackage{graphicx} \usepackage{xcolor} \usepackage{tikz} \usepackage{tikz-3dplot} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \hypersetup{colorlinks=true,linkcolor=black,citecolor=black} \newtheorem{example}{Example} \setlength{\parindent}{0pt} \begin{document} \begin{example} Consider the function \[ f(x,y)=x^2+y^2, \] the point \[ c=(0,0), \] and the direction \[ u=(1,0). \] To study the variation of $f$ at $c$ in the direction $u$, we define the one-variable function \[ F(t)=f(c+tu). \] In this case, \[ c+tu=(t,0), \] and therefore \[ F(t)=f(t,0)=t^2. \] Thus, when we move away from $c$ in the direction $u$, the values of $f$ vary according to the quadratic function $F(t)=t^2$. The directional derivative of $f$ at $c$ in the direction $u$ is given by \[ f'(c;u)=F'(0). \] Since \[ F'(t)=2t, \] we obtain \[ f'(c;u)=F'(0)=0. \] \end{example} \bigskip \begin{center} \begin{tikzpicture} % --- SURFACE --- \begin{axis}[ at={(0,0)}, anchor=origin, view={120}{25}, axis lines=center, axis line style={->}, xlabel={$x$}, ylabel={$y$}, zlabel={$z$}, domain=-2:2, y domain=-2:2, samples=30, samples y=30, width=8cm, height=8cm ] % Surface z = x^2 + y^2 \addplot3[surf, opacity=0.4] {x^2+y^2}; % Curve corresponding to F(t) \addplot3[very thick, red, domain=0:1.2, samples=100] ({x},{0},{x^2}); \end{axis} % --- GRAPH OF F(t) --- \begin{axis}[ at={(7cm,0)}, anchor=origin, axis lines=middle, axis line style={->}, xlabel={$t$}, ylabel={$F(t)$}, domain=-1.5:1.5, samples=200, width=7cm, height=6cm ] \addplot[very thick, red] {x^2}; \node at (axis cs:1,1) [red, anchor=west] {$F(t)=t^2$}; \end{axis} \end{tikzpicture} \end{center} \end{document}
- Disable stretching between words while using babel for Thaiby p_pattedd on March 2, 2026 at 8:04 am
When typing a document in Thai with babel (using XeLaTeX via MikTeX), sometimes it outputs with these spaces between words, for example: MWE: \documentclass[12pt,a4paper]{article} \usepackage[no-math]{fontspec} \usepackage[thai,provide=*]{babel} \babelfont[thai]{rm}[Scale=1.33333]{TH Sarabun New} \renewcommand\baselinestretch{1.4} \begin{document} เดิมแผ่นดินเมืองจีนทั้งปวงนั้น เปนสุขมาช้านานแล้วก็เปนศึก ครั้นศึกสงบแล้วก็เปนสุข มีพระมหากษัตริย์ทรงพระนามพระเจ้าจิวบูอ๋อง แลพระวงศ์ได้เสวยราชย์ต่อ ๆ ลงมาเปนหลายพระองค์ ได้ความสุขมาถึงเจ็ดร้อยปี จึงมีผู้ตั้งแขงเมืองถึงเจ็ดหัวเมือง ครั้งนั้นพระเจ้าจิ๋นอ๋องได้เสวยราชย์ในเมืองจิ๋นก๊กให้ไปตีเอาหัวเมืองทั้งเจ็ดนั้น เข้าอยู่ในอาณาจักรพระเจ้าจิ๋นอ๋องทั้งสิ้น ครั้นอยู่มาพระเจ้าจิ๋นอ๋องเสียแก่ฮั่นฌ้อ แล้วฮั่นโกโจกับฮั่นฌ้อรบกัน จึงได้ราชสมบัติแก่ฮั่นโกโจ ฮั่นโกโจแลพระราชวงศ์ได้เสวยราชสมบัติต่อ ๆ มาในแผ่นดินจีนนั้นถึงสิบสององค์ มีขุนนางคนหนึ่งชื่ออองมังเปนขบถชิงเอาราชสมบัติได้ เปนเจ้าแผ่นดินอยู่สิบแปดปี แล้วจึงมีหลานพระเจ้าฮั่นโกโจชื่อฮั่นกองบู๊จับอองมังฆ่าเสียชิงเอาราชสมบัติได้เสวยราชย์สืบวงศ์มาสิบสององค์ พระองค์ได้เสวยราชย์ที่สุดนั้น ทรงพระนามพระเจ้าเหี้ยนเต้ จึงแตกเปนสามเมือง ภาษาจีนเรียกว่า สามก๊ก \end{document} How to stop LaTeX from doing this? (I have read babel-thai documentation, but none of the macros seems to work.)
- Redesign of arrow at circuitikz ccgsw symbolby Zarko on March 2, 2026 at 7:20 am
In circuitikz symbol ccgsw I like to change the color of arrow (by simple in-line selection, if is possible) and arrow head for example from stealth to Straight Barb. How to do this? \documentclass[margin=3mm]{standalone} \usepackage{xcolor} \usepackage{circuitikz} \begin{document} \begin{circuitikz} \draw[gray] (0,0) to [ccgsw={$t=t_b$}] (2,0) ; \end{circuitikz} \end{document}
- BibLaTeX specified language is not usedby Knudsen on March 2, 2026 at 6:40 am
Why would biblatex fill out this entry with Cyrillic while the language being specified is Serbian written in Latin? \documentclass{article} \begin{filecontents*}{test.bib} @book{Mitri-vol1-sr, title={Cauchyjev račun ostataka sa primenama}, author = {Mitrinović, Dragoslav S. and Kečkić, Jovan D.}, series = {Matematički problemi i ekspozicije}, volume = {8}, year = {1978}, publisher = {Naučna Knjiga}, address = {Beograd}, pages = {271}, langid = {serbian}, } \end{filecontents*} \usepackage{fontspec} \newfontfamily\cyrillicfont{STIX Two Text} \usepackage{polyglossia} \usepackage{csquotes} \setmainlanguage{english} \setotherlanguage{serbian} \usepackage[style=authoryear, backend=biber, autolang=other, ]{biblatex} \addbibresource{test.bib} \begin{document} \nocite{*} \printbibliography \end{document}
- How to draw this shape? [closed]by bakhta marouf on March 2, 2026 at 5:49 am
I want to draw this shape using TikZ, but I don't know how. Could anyone provide an example of how to do it?
- Will (Lua)LaTeX always find a png image located in same directory as the cls file?by rallg on March 2, 2026 at 12:06 am
Using lualatex, texlive 2025, Linux (jailed on Android). I do not think this involves Lua. I know the answer to my question on my own system. But since Linux jailed in Android has some file directory peculiarities, I wish to know whether my results are generally applicable. Question: Given any document class, which may be custom, will TeX automatically find any png image located in the same directory as the cls file? The cls file might be in TEXMF-DIST, TEXTMF-LOCAL, TEXMFHOME. When I say "automatically find" I mean without setting the graphics path, and without a two-pass compile. I should be able to include the png using only its file name. In the following MWE, the png does not need to be a real image, since it is not printed. You can follow the MWE by navigating to the directory that contains memoir.cls then (if privileged) touch NothingToSeeHere.png, followed by mktexlsr. \documentclass{memoir} \IfFileExists{NothingToSeeHere.png} {\typeout{HOORAY}}{\typeout{BOOHOO}} \begin{document} Hello, World \end{document} I chose memoir because it is widely available, but not in LaTeX base. In my own case, I get HOORAY no matter where the custom cls file (and png) is located in the TEXMF tree, as long as both are in the same place. Is that true for everybody?
- \regex_if_match:nnTF creates an undefined control sequence error on Ubuntu [closed]by Paul Wintz on March 1, 2026 at 10:46 pm
I was trying to use the LaTeX3 regex package to match text, but was running into trouble because \regex_if_match:nnTF is not defined, despite appearing in the LaTeX3 documentation. \documentclass{article} \usepackage{expl3} \ExplSyntaxOn \begin{document} \regex_if_match:nnTF{aaa}{aaa}{ TRUE }{ FALSE } \end{document} \ExplSyntaxOff
- Proper way to set 'global' and 'local' TOC in Beamer with \part, \section, \subsectionby Dimitrios ANAGNOSTOU on March 1, 2026 at 8:31 pm
I want to have a hierarchical Beamer structure: parts → sections → subsections which 1) automatically generate subsection slides to highlight transitions; 2) show mini TOC per section, 3) giving context within sections; 4) show a global TOC divided by parts, hiding subsections for clarity. As (I hope!) MWE \documentclass{beamer} \usetheme{moloch} \title{Title} \subtitle{Subtitle} \author{DA} \newcommand{\makepart}[1]{ % For convenience \part{Title of part #1} \frame{\partpage} \section{Section} \begin{frame} Section \end{frame} \subsection{Subsection} \begin{frame} Subsection \end{frame} \subsection{Subsection} \begin{frame} Subsection \end{frame} \section{Section} \begin{frame} Section \end{frame} } \AtBeginSubsection[]{ \begin{frame}[plain, noframenumbering] \centering \vfill \Large\textbf{\insertsubsection} \vfill \end{frame} } % ============================================================ % TABLE DES MATIÈRES PAR SECTION % ============================================================ \addtobeamertemplate{section page}{}{% \hspace{1cm}% \begin{minipage}{.8\textwidth} \tableofcontents[ sections=\thesection, sectionstyle=hide/hide, currentsubsection, hideothersubsections ] \end{minipage} } \begin{document} \begin{frame} \titlepage \end{frame} \begin{frame}{Global outline} \setbeamertemplate{section in toc}[sections numbered] Part I: \tableofcontents[part=1, hidesubsections] Part II: \tableofcontents[part=2, hidesubsections] \end{frame} \makepart{1} \makepart{2} \end{document} Is this a proper way to achieve my goals? Thanks a lot! Merci for every comment or/and answer!
- How can I terminate a wire with an X symbol in quantikz?by tparker on March 1, 2026 at 8:08 pm
I would like to terminate a quantum wire in Quantikz with an "X" drawn over the rightmost end. (I don't want to put the "X" in a box, because that would look like a Pauli X-gate.) The best way that I've found to do this is to with the swap{} command, like this: \documentclass{article} \usepackage{tikz} \usetikzlibrary{quantikz} \begin{document} \begin{quantikz} \lstick{} & \swap{} \end{quantikz} \end{document} This isn't bad, but the wire extends a little bit past the center of the "x". Is there any way to get the wire to terminate right at the cross of the "x"?
- Copying code from pdf [closed]by Ali Hejazi on March 1, 2026 at 7:09 pm
\documentclass[12pt,a4paper]{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{geometry} \usepackage{listings} \usepackage{xcolor} \usepackage{graphicx} \geometry{margin=2.5cm} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{listings} \lstset{ basicstyle=\ttfamily\small, columns=fullflexible, keepspaces=true, showstringspaces=false, upquote=true, breaklines=true, frame=none, numbers=none } My code works perfectly fine however when I copy my code from a the PDF and run it. It give error does anyone know how I can fix this issue using latex.
- tiered list with a heading with tree-like |- line connectors that enumerate itemsby Mampac on March 1, 2026 at 4:08 pm
how do i get a list that has a heading (in this example, "Deep Learning Methods" as the heading), from which level-2 entries are connected with solid lines? so far i draw the connector lines with tikz like this: which looks fine except for the extra-bolded trunk of the tree due to multiple retracing of the same connector path in my current implementation. it is super-subtle, but when you zoom out of the PDF file, you can see marginal pixel strips lacking at the upper part of the tree trunk where it's thinner than the rest. the MRE is as follows: \documentclass{article} \usepackage{tikz} \usetikzlibrary{tikzmark,calc} \tikzset{ taxonomy/.style={ overlay, remember picture } } \newcommand{\subcatindent}{1.3em} \newcommand{\methodsindent}{2.3em} \begin{document} unrelated text\\ \textbf{\tikzmarknode{dl}{\underline{Deep Learning Methods}}}\\ \hspace*{\subcatindent}\textbf{\tikzmarknode{dl_convo}{Convolution}}\\ \hspace*{\methodsindent}AE-based\\ \hspace*{\subcatindent}\textbf{\tikzmarknode{dl_ae}{Autoencoders}}\\ \hspace*{\methodsindent}Method D2\\ \hspace*{\subcatindent}\textbf{\tikzmarknode{dl_gan}{GANs}}\\ \hspace*{\methodsindent}Method D3\\ \hspace*{\subcatindent}\textbf{\tikzmarknode{dl_diff}{Diffusion}}\\ \hspace*{\methodsindent}Method D3\\ \hspace*{\subcatindent}\textbf{\tikzmarknode{dl_att}{Attention-Driven}}\\ \hspace*{\methodsindent}Method D3\\ \hspace*{\subcatindent}\textbf{\tikzmarknode{dl_ens}{Ensemble}}\\ \hspace*{\methodsindent}Method D3 \begin{tikzpicture}[taxonomy] \newcommand{\srcOffsetX}{+0.3em} \newcommand{\srcOffsetY}{-1.0ex} \coordinate (dl_start) at ($(dl.south west)+(\srcOffsetX,\srcOffsetY + 0.3ex)$); \coordinate (dl_lowest) at (dl_ens.west); \coordinate (dl_trunk) at ($(dl_start |- dl_lowest)$); \draw (dl_start) -- (dl_trunk); \draw (dl_trunk) |- (dl_convo.west); \draw (dl_trunk) |- (dl_ae.west); \draw (dl_trunk) |- (dl_gan.west); \draw (dl_trunk) |- (dl_diff.west); \draw (dl_trunk) |- (dl_att.west); \draw (dl_trunk) |- (dl_ens.west); \end{tikzpicture} \end{document} is there a way to dynamically and systematically implement this so that the connectors are drawn exactly at the place where the previous one turned 90 degrees to the right? ideally, i could turn this in a custom list environment, but so far i don't see a clear way of solving the retracing problem.
- How to change "python" language style of listings packageby Syvshc on March 1, 2026 at 3:28 pm
I want to define my own style of Python, so I write \documentclass{article} \usepackage{listings, xcolor} \lstset { basicstyle = \ttfamily\small, frame = leftline, framerule = 1pt, } \lstdefinelanguage{python}{ morekeywords = {python, red}, keywordstyle = {\bfseries\color{red}}, rulecolor = {\color{red}}, } \begin{document} \begin{lstlisting}[language=python] python, red \end{lstlisting} \end{document}% after compiling with texlive 2025, I got: It did not work. I thought it might be the problem with the default settings of listings.sty package, i.e. lstlang1.sty. However, I can change the style of matlab language: \documentclass{article} \usepackage{listings, xcolor} \lstset { basicstyle = \ttfamily\small, frame = leftline, framerule = 1pt, } \lstdefinelanguage{python}{ morekeywords = {python, red}, keywordstyle = {\bfseries\color{red}}, rulecolor = {\color{red}}, } \lstdefinelanguage{Matlab}{ morekeywords = {Matlab, lime}, keywordstyle = {\bfseries\color{lime}}, rulecolor = {\color{red}}, } \begin{document} \begin{lstlisting}[language=python] python, red \end{lstlisting} \begin{lstlisting}[language=Matlab] Matlab, lime \end{lstlisting} \end{document}% The output is: I wonder why it happened and how I can actually change the style of "python" language. EDIT: I found that this does not work only on TexLive 2025; my version of listings is 76899, and it's cat-version is 1.11b. If I compile this file with 1.10a and TexLive 2024 on Overleaf, all things worked well. EDIT: I found that listings package is insensitive to the language name, Python, python, and PYTHon point to the same language
- texlive install as admin? [closed]by user2609605 on March 1, 2026 at 2:31 pm
I need some guidance. Even the documentation of texlive seems to be inconsistent whether to install as root or not. I think the choice is either root or some group texadmin or even a single user texadminu. The question admin or not seems to be relevant to me only in case of multi user engines. Usually, software is installed as admin. The only special thing about texlive is, that it is not really software but a cosmos of software packages with a proper package manager, tlmgr. This is the only aspect I can figure out which would justify a separate layer of IT administration, in particular, if there is the need to run with a choice of packages. I would prefer the group admin because texlive has a package manager and so needs a kind of sub-admin. The motivation for my question is that at work i gained the role as texlive responsible in a multi user environment and I want to have control over the packages. Which arguments are in favor the IT shall pass installation to a texadmin? What in mixed linux/unix/windows environment? I would like to administrate in linux, have centralized installation for some years and our platforms. Some comments talk about texlive in distro. I think, original has some advantage, it is easily reproducible in frozen releases and cutting edge else. IMPORTANT: I always want to ask high quality questions. So if rating down, leave a comment on what is wrong. Give me a chance and give the other readers a chance.
- Automatic italic for foreign wordsby Apothikon on March 1, 2026 at 2:06 pm
Foreign words or phrases inside a mostly monolingual document should usually be displayed in italic. How can this be achieved automatically using babel? I have produced the following code: \documentclass{article} \usepackage{lipsum} \usepackage[french, british, italian]{babel} % Font for the main language \babelfont{rm}{ebgaramond} % Font for foreign languages, inverting roman and italic \babelfont [french, british]{rm}{ebgaramond-Italic} \begin{document} MAIN LANGUAGE \lipsum[1] \vspace{1em} FOREIGN LANGUAGE \foreignlanguage{british}{\lipsum[1]} \end{document} However, I can see some problems in my approach: If I define new features for the font (ligatures, character variants...) I must repeat them for both the main and the foreign font; If I add new languages I must remember to add them to the list of foreign languages to which the italic must be applied. I am quite sure that the amazing babeltransform can easily make it more automatic.
- Italic text with upright uppercasesby Apothikon on March 1, 2026 at 1:45 pm
Can someone suggest a method to have Roman (upright) capitals in italic texts, in the style of Aldus Manutius and of the early Renaissance books? I believe it could probably be done with the lua.otf.font.handler but I don't know where to start. Also, I think at least two aspects need to be kept in mind: Efficiency: the approach should not be too heavy, in order to be usable also for large documents with many paragraphs in italics; Kerning: it will probably be required to define new kerning pairs for many (or every) capital, and I expect this to be done manually depending on the font used in the document. As an example to test this: \documentclass{article} \usepackage{lipsum} \usepackage{ETbb} % A font in the style of Aldus Manutius \begin{document} A B C D E F G H I J K L M N O P Q R S T U V W X Y Z \vspace{1em} \textit{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} \vspace{1em} \lipsum[1] \vspace{1em} \textit{\lipsum[1]} \end{document} Every suggestion, even if not a complete answer, is very appreciated.
- How to fix LaTeX: You have requested package `../package_name', but the package provides `package_name'. for git submodule usage self-containedby clel on March 1, 2026 at 12:32 pm
I have a LaTeX style package that I typically use as git submodule and thus import from some relative path. This however will then result in a warning like that: "LaTeX: You have requested package `../package_name', but the package provides `package_name'." What is a good way to solve this? Ideally, I want the solution to be self-contained and to work nicely in different setups. Thus, modifying the Makefile as described here (install package in subfolder) might not be good, right? So either through silence, maybe (but that might not be robust, and looks kind of like a workaround), or through \input@path in the files where the style file is used?
- Reset counter in \newtheoremby Afonso Guerra on March 1, 2026 at 10:52 am
I'm trying to make a title with \newtheorem{case}{Caso} (My code is in Portuguese-Portugal) and it outputs Caso X. "X" being the next number. So here is the thing, I actually need to reset the "X" value, and I have tried the [theorem] parameter, but it doesn't work for me so can anyone help? Here is my code: \documentclass[12pt]{report} \usepackage[]{amsmath,amsthm,amssymb,amscd} \usepackage[a4paper,margin=25mm]{geometry} \usepackage{babel} \usepackage{pgfplots} \usepackage{multirow} \usepackage{booktabs} \usepackage{framed} \newtheorem{case}{Caso} \begin{document} \begin{case} Não conhecemos a distribuição de $X_1$ ou $X_2$, mas os tamanhos das amostras não apresentão assimetrias exageradas. \end{case} \begin{case} % Some text here % \end{case} % Reset the X value % \begin{case} % More text here, but with it saying "Caso 1." % \end{case} \end{document} If you want something else please tell me.
- I want to add 4 authors for my research paper in IEEE tran formatby Nishant ES on March 1, 2026 at 9:27 am
The below is the given code for the author block.. I already managed to add 3 authors but I could not add the 4th one.. Can anyone please tell how to do so \author{ \IEEEauthorblockN{Dr. Sandosh S.} \IEEEauthorblockA{ Faculty for Computer Science with \\ Specialization in Artificial Intelligence \\ and Machine Learning \\ Vellore Institute of Technology, \\ Chennai, India \\ Email: sandosh.s@vit.ac.in } \and \IEEEauthorblockN{E S Nishant} \IEEEauthorblockA{ Computer Science with specialization \\ in Artificial Intelligence and Machine\\ Learning\\ Vellore Institute of Technology,\\ Chennai, India\\ Email: nishant.es2023@vitstudent.ac.in } \and \IEEEauthorblockN{Sandeep V} \IEEEauthorblockA{ Computer Science with specialization \\ in Artificial Intelligence and Machine\\ Learning\\ Vellore Institute of Technology, \\ Chennai, India\\ Email: sandeep.v2023@vitstudent.ac.in } }
- How to produce an effect of bracket below with text?by Sunshine on March 1, 2026 at 5:29 am
I want to produce the bracket like this: \documentclass{article} \begin{document} There is a bracket below with text. \end{document}
- How to fit these items on three separate linesby Ricky W. on March 1, 2026 at 3:11 am
I am trying to make this bullet points look nice in three lines but here is the problem. it won't fit. Here is my code \documentclass{beamer} \setbeamertemplate{theorems}[numbered] \begin{frame} \frametitle{Definitions} \begin{definition}[Normed Linear Space] A linear space $\mathbb{X}$ is a normed linear space if, to each vector $x\in \mathbb{X}$, there is a real-valued norm $\left\|x\right\|$ that satisfies \begin{itemize}[$\bullet$] \item $\left\|x\right\| \geq 0$ for all $x\in \mathbb{X}$, with $\left\|x\right\|=0$ if and only if $x=0$ \item $\left\|x+y\right\| \leq \left\|x\right\| + \left\|y\right\| $ for all $x,y\in \mathbb{X}$ \item $\left\|ax\right\|=|a|\left\|x\right\|$ for all $a\in \mathbb{R}$ and $x\in \mathbb{X}$ \end{itemize} Here is what I got
- How to create a subset of a large presentation? ("Harvey balls")by Ulrich Seelbach on February 28, 2026 at 9:01 pm
I have a very large Beamer presentation (several hundreds of slides) for a lecture. To make life easier for the students, I am using "Harvey balls" in the upper right corner to indicate the relevance of the respective slide (ranging from 4=must be understood to 0=not relevant). To that end, I created a command \newcommand{\harvey}[1]{\logo{\includegraphics[width=1cm]{img/harvey#1.png}}} which sets the relevance for the next slide(s) until changed by another invocation: \harvey4 \begin{frame}{An important frame} ... \end{frame} Works nicely, and the students like it. Thing is, they suggested that I supply a stripped-down version of the presentation with only the "important" slides present (that is, those with a full or three-quarters-full Harvey ball). In other words, I am looking for a way to include, in the final PDF, only those slides with a Harvey score of at least n, where n may be 0 (all slides) to 4 (just the "full ball" slides). I guess that can be achieved with a Perl script or the like, but maybe there's a more TeXy solution? I'm not very TeX savvy, I have to admit... As requested, here is a small example (the Harvey balls show up in the wrong place when compiled, irrelevant to the question). You'd have to find the "Harvey balls" symbols somewhere in the Web to successfully compile: \documentclass[svgnames, dvipsnames, aspectratio=169,11pt]{beamer} \usepackage[T1]{fontenc} \newcommand{\harvey}[1]{\logo{\includegraphics[width=1cm]{img/harvey#1.png}}} \begin{document} \harvey{4} \begin{frame}{Relevant} This slide must be included in the final PDF. \end{frame} \begin{frame}{Also relevant} This one also, because the Harvey score was not changed. \end{frame} \harvey{2} \begin{frame}{Not so important} This frame not to be included if "output score" is at least three \end{frame} \harvey{0} \begin{frame}{Completely irrelevant} This frame only to be included if output score is zero \end{frame} \harvey{4} \begin{frame}{Very important} Another important frame \end{frame} \end{document}
- VS Code LaTeX Workshop: how to configure settings.json when using both chemnum and nomencl?by palloc on February 28, 2026 at 4:13 pm
I am working on a LaTeX document in VS Code using the LaTeX Workshop extension (Windows 11). My document uses chemnum/chemstyle as well as the nomencl package to generate a nomenclature. How should I correctly configure the settings.json file in VS Code to handle both chemnum/chemstyle and makenomenclature? The following code works as intended on Overleaf with Latex Compiler: main.tex \documentclass{article} \usepackage{geometry} \usepackage{graphicx} \usepackage[version=4]{mhchem} \usepackage{chemstyle} \usepackage{chemnum} \usepackage[backend=biber]{biblatex} \addbibresource{bib.bib} \usepackage{nomencl} \makenomenclature \begin{document} \nomenclature{A}{a} \printnomenclature \section{First} \cite{knuth1984texbook} \begin{scheme} \replacecmpd{benezen} \replacecmpd{toluene} \includegraphics[scale=0.8]{aromatic-compounds.eps} \caption{Aromatic-compounds} \label{aromatic-compounds} \end{scheme} \refcmpd{benezen, toluene} \printbibliography \end{document} bib.bib @book{knuth1984texbook, title={The texbook}, author={Knuth, Donald Ervin and Bibby, Duane}, volume={15}, year={1984}, publisher={Addison-Wesley Reading} } aromatic-compounds.eps https://drive.google.com/file/d/1faCOOvd5xcVAF_KZqhx7vAI0Mqh7pmF6/view?usp=sharing Overleaf output: VS Code settings.json { "latex-workshop.latex.tools": [ { "name": "latexmk", "command": "latexmk", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "-pdf", "%DOC%" ] }, { "name": "makenomenclature", "command": "makeindex", "args": [ "%DOCFILE%.nlo", "-s", "nomencl.ist", "-o", "%DOCFILE%.nls" ] } ], "latex-workshop.latex.recipes": [ { "name": "latexmk → nomencl → latexmk", "tools": [ "latexmk", "makenomenclature", "latexmk" ] } ], "latex-workshop.latex.recipe.default": "latexmk → nomencl → latexmk", "latex-workshop.latex.autoBuild.run": "never", } VS Code output: As you can see there is no overwrite on TMP1, TMP2 in the scheme in case of VS Code. I only found the following question, but I do not really get it: chemnum numbering only working in overleaf Could you give me a answer?
- How can I calculate or approximate the intersection(s) or lack thereof of a line and an exponential curve using Lua?by Jasper on February 27, 2026 at 5:58 pm
How can I calculate or approximate the intersection(s) or lack thereof of a line and an exponential curve. My goal is to avoid using an approach which first tessellates curves into line segments, and tests each line segment pair. That is O(n^2). I want something which can scale. I think Lua is appropriate for this, based on evidence in the comments. \documentclass[tikz,border=1cm]{standalone} \begin{document} \begin{tikzpicture} \draw[->] (-2,0) -- (2,0); \draw[->] (0,-2) -- (0,e^2); \draw[domain=-2:2] plot (\x,e^\x); \draw[domain=-2:2] plot (\x,\x+1.5); % two intersections \draw[domain=-2:2] plot (\x,\x+1); % one intersection \draw[domain=-2:2] plot (\x,-\x+4.5); % one intersection \draw[domain=-2:2] plot (\x,\x); % zero intersections % My goal is to use pgfmath to calculate, or if % necessary iteratively approximate, the intersections % of these lines with the exponential curve. % If it is not easy in pgfmath, then I want a Lua-based solution. \end{tikzpicture} \end{document}
- Problem (warning message) with Calculator packageby ViToni on February 27, 2026 at 4:03 pm
This rather small document \documentclass{article} \usepackage{calculator} \newcommand{\myPerCent}[2]{% \DIVIDE{#1}{#2}{\sol}% \MULTIPLY{\sol}{100}{\sol}% \ROUND{\sol}{\sol}% \sol% } \begin{document} Computed \myPerCent{2441}{8667}.\par \end{document} produces this warning (I guess it's a warning and not an error as the PDF is finally built): (\end occurred when \ifdim on line 13 was incomplete) I have no clue how to solve the issue as the code looks ok at first glance, but it seems something is off here. How can I use the package in a proper way? (I'm quite happy I was able to identify the source for the warnings at least as the original document is rather large and I started looking into things like How to diagnose unclosed (incomplete) \iftrue or \ifnum? but somehow I didn't get me anywhere and I don't seem to know anything more than before...)
- Redefine \gg in ‘unicode-math’by mvs on February 27, 2026 at 2:41 pm
I have: \documentclass{article} \usepackage{fontspec} \usepackage{unicode-math} \setmainfont{STIX Two Text}[Ligatures=TeX] \setmathfont{STIX Two Math} \usepackage{amsmath} % need a suitable redefinition of ‘\gg’ \begin{document} $\gg$ \end{document} with Lualatex but I want to redefine \gg to print a boldface g (such as \symbf{g}). I even asked ChatGPT but it could not find any solution which would work. Is there any? (of course I know that I could use a different command....)
- I am plotting a family of parabolas in TikZ, and there is a stray parabola. I'm confusedby Jasper on February 25, 2026 at 7:14 pm
I am plotting a family of parabolas in TikZ, and there is a stray parabola. I'm confused. \documentclass[tikz,border=1cm]{standalone} \begin{document} \begin{tikzpicture} \pgfmathsetmacro{\SIGMALstart}{-3} \pgfmathsetmacro{\SIGMALstop}{3} \pgfmathsetmacro{\SIGMALsamples}{50} \pgfmathsetmacro{\SIGMALstep}{(\SIGMALstop-\SIGMALstart)/(\SIGMALsamples-1)} \foreach \SIGMAL[parse=true] in {\SIGMALstart,\SIGMALstart+\SIGMALstep,...,\SIGMALstop} { \draw[ variable=\TAUL, domain=-3:3 ] plot ( {\SIGMAL*\TAUL}, {((\TAUL)^2-(\SIGMAL)^2)/2} ); } \end{tikzpicture} \end{document}