• Why does [H] float a full-page figure to the next page while [h] keeps it on the first page?
    by taiwan12 on February 26, 2026 at 7:42 pm

    When I use [h], the figure appears on the first page as intended. When I use [H], the figure jumps to the second page, leaving the first page empty. Why does [H] behave like this? How can I force the figure to stay on the first page while still using [H]. This is only for curiosity. \documentclass{report} \usepackage{graphicx} \usepackage{geometry} \usepackage{lipsum} \usepackage{float} \begin{document} % --- Full-page image without margins --- \newgeometry{top=0pt,bottom=0pt,left=0pt,right=0pt} \thispagestyle{empty} % remove page number \begin{figure}[h] \centering \includegraphics[width=\paperwidth,height=\paperheight]{example-image} \end{figure} \clearpage \restoregeometry % restore the original margin % --- Normal content on the following pages --- \lipsum[1-2] \end{document} \begin{figure}[h]...\end{figure}: \begin{figure}[H]...\end{figure}:

  • Using a range from TeX Gyre Termes Math causes arithmetic overflow
    by murray on February 26, 2026 at 6:29 pm

    The following source produces the expected output. % !TEX program = lualatex \NeedsTeXFormat{LaTeX2e}[2025-11-01] \documentclass{article} \usepackage[russian,english]{babel} \babeltags{russian=russian} \usepackage{fontspec} \usepackage{lua-unicode-math} \defaultfontfeatures{Scale=MatchLowercase, Ligatures=TeX} \setmathfont{STIX Two Math}[Scale=MatchUppercase,math-style=ISO] %\setmathfont{TeX Gyre Termes Math}[Scale=MatchUppercase,math-style=ISO,range={\bigcup,\bigcap}] \ExpandArgs{c}\def{ver@unicode-math.sty}{} \babelfont{rm}[Scale=1.0]{TeXGyreTermesX} \babelfont[russian]{rm}{tempora} \usepackage{newunicodechar} \newunicodechar{♢}{\mdlgwhtdiamond} \usepackage{scalerel} \DeclareRobustCommand\myDiamond{\scalerel*{\mdlgwhtdiamond}{X}} \usepackage[thmtools-compat]{keytheorems} \DeclareRobustCommand{\qed}{% run-in QED: \ifmmode \mathqed \else \leavevmode\unskip\penalty9999 \hbox{}\nobreak%\hfill \quad\hbox{\qedsymbol}% \fi } \newkeytheoremstyle{exstyle}{} \newkeytheorem{example}[name=Example, style=exstyle, qed=$\myDiamond$] \begin{document} \begin{example} $3^{2} + 4^{2} = 5^{2}$. \end{example} \noindent We have $\bigcup_{i \in I} A_{i} = \bigcap_{j \in J} B_{j}$. \end{document} I want to pull the \bigcap and \bigcup symbols not from STIX Two Math but instead from TeX Gyre Termes Math (because in the latter they are lighter weight). However, if the commented-out line \setmathfont{TeX Gyre Termes Math...[...range=...] is uncommented then I get an arithmetic overflow when the qed-like diamond symbol is to appear. But why is the diamond symbol being selected from TeX Gyre Termes Math now, when apparently it was not before? Missing character: There is no ◇ (U+25C7) in font "name:TeX Gyre Termes Math:m ode=base;script=math;language=dflt;+tlig;"! ./clash.tex:39: Arithmetic overflow. <recently read> \calc@denominator l.39 \end{example} I can't carry out that multiplication or division, since the result is out of range.

  • Creating Boxplot from precomputed value for each line in table
    by skanarr on February 26, 2026 at 4:53 pm

    I am using the box plot prepared method from here: Read boxplot prepared values from a table. My problem is the following: I have multiple rows in that csv and I want a box plot for each of these rows. How can I loop over all rows and create those? Added bonus: Some of my table columns are shorter than others, some have only enough data for 2 box plots, some have enough data for 10 box plots. % 1: extra for box plot, % 2: Identifier % 3: table, % 4: row \newcommandx{\TimeBoxPlot}[4][1={}]{ \addplot+[#2, #1, fill, boxplot prepared from table={ table=#3, row=#4, lower whisker= #2-time-min, lower quartile= #2-time-1, median= #2-time-med, upper quartile= #2-time-q3, upper whisker= #2-time-max, sample size = #2-sample-size, draw position = edge_count, }, boxplot prepared, ] coordinates {}; } % draw % Identifier % Table \newcommandx{\PlotPoint}[3][1={}]{ \pgfplotstablegetrowsof{#3} \pgfmathtruncatemacro{\numrows}{\pgfplotsretval-1} \pgfplotsinvokeforeach{0,...,\numrows}{ \TimeBoxPlot[#1]{#2}{#3}{##1} } } The identifier Mentioned is just a string-prefix for the columns in question and also a style I defined, so they are colored and drawn correctly. Though every Identifier has unbounded coords=discard set thats about the similarities. The implementation of \PlotPoint does not work. It is the macro that should go through all the lines (at least those with values).

  • Hide synctex file -- TeXstudio, Windows 11
    by Dave on February 26, 2026 at 2:42 pm

    I use TeXstudio (currently 4.9.2) with MikTeX (currently 4.12) in Windows 11, and I have things set up so that auxillary files are automatically dumped into a "TeX_Aux" folder, which is nice for me. My question is about the synctex file (or zip folder). I know that it needs to be in the same directory as the pdf, but if possible I would at least like to do the following: When compiling a .tex file in TeXstudio, is there a way to automatically have the synctex file/folder become hidden in the Windows 11 File Explorer (i.e. the hidden attribute just from a Windows 11 OS perspective)? This is similar to the question here: Hide .synctex files, but it is not for TeXstudio and I'm not tech-savvy enough to really understand what it's doing. In case it helps, I currently have the following in my "Configure TeXstudio"->"Commands" for PdfLaTeX: pdflatex.exe -synctex=1 -interaction=nonstopmode -aux-directory=TeX_Aux %.tex

  • FiraSans and math font in Beamer
    by Dimitrios ANAGNOSTOU on February 26, 2026 at 2:21 pm

    I am using Moloch theme and FiraSans font. When choosing the font for the math text, how to be sure which fonts are compatible with respect to sizes? As an example of comparison: % ============================================================ % CLASSE ET THÈME % ============================================================ \documentclass[10pt]{beamer} \usetheme{moloch} % Thème moloch % ============================================================ % ENCODAGE ET LANGUE % ============================================================ \usepackage[T1]{fontenc} \usepackage[french]{babel} \usepackage[semibold,light]{FiraSans} \usepackage{FiraMono} \usepackage{mathpazo} %\usepackage{newtxmath} \usefonttheme[onlymath]{serif} \begin{document} \begin{frame} Soit $E$ un espace vectoriel réel de dimension finie. On considère une application linéaire $T : E \to E$ telle que \[ T(\alpha x + \beta y) = \alpha T(x) + \beta T(y). \] On suppose que la matrice associée à $T$ dans une base donnée est \[ A = \begin{pmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ \vdots & \ddots & & \vdots \\ a_{n1} & \cdots & & a_{nn} \end{pmatrix}. \] Le déterminant $\det(A)$ permet de caractériser l'inversibilité de $T$. En particulier, \[ \det(A) \neq 0 \Longleftrightarrow T \text{ est bijective}. \] On en déduit que le système linéaire $Ax = b$ admet une solution unique si et seulement si le rang de $A$ est égal à $n$. \end{frame} \end{document} With mathpazo With newtxmath Default

  • Building table lines via conditional
    by daleif on February 26, 2026 at 12:50 pm

    For a book project we're experimenting with configuring glossary. In our case we'd like to use xltabular. But sometimes the term in the first column is a bit wide, in that case we'd like to use \multicolumn and typeset the description on the row below. The naïve approch of course does not work (MWE below). Since we're using this for glossary entrys we can only use a single macro. Anyone have a good approach on how to do this? I'm assuming it is down to what is "allowed" at the start of a table row. Edit, version 2: This at least gets around the incomplete \ifdim error. But if we use the \multicolumn line, we instead get a Misplaced \omit. \multispan ->\omit \@multispan l.31 \Foo{AAAAAAAAAAAAAAAAAA}{BBB} error. One can get around this by starting the entry by \tabularnewline, but then we have an extra blank linie, that we'd need to back track \documentclass[a4paper]{article} \usepackage{array,booktabs} \begin{document} \makeatletter % if #1 is too long, typeset it in \multicolumn, and move description % to next line \NewDocumentCommand\Foo{mm}{ \settowidth\@tempdima{#1} \ifdim\@tempdima> 0.2\textwidth\relax \FooLong{#1}{#2} \else \FooShort{#1}{#2} \fi } \NewDocumentCommand\FooLong{mm}{ % \multicolumn{2}{l}{#1} #1 \tabularnewline & #2 \tabularnewline } \NewDocumentCommand\FooShort{mm}{ #1 & #2 \tabularnewline } \makeatother \noindent \begin{tabular}{@{}l l@{}} \Foo{AAA}{BBB} \Foo{AAAAAAAAAAAAAAAAAA}{BBB} \end{tabular} \end{document} Version 1: \documentclass[a4paper]{article} \usepackage{xltabular} \begin{document} \makeatletter % if #1 is too long, typeset it in \multicolumn, and move description % to next line \NewDocumentCommand\Foo{mm}{ \settowidth\@tempdima{#1} \ifdim\@tempdima> 0.2\textwidth\relax \multicolumn{2}{l}{#1} \tabularnewline & #2 \tabularnewline \else #1 & #2 \tabularnewline \fi } \makeatother \noindent \begin{xltabular}{\textwidth}{@{}l X@{}} \Foo{AAA}{BBB} \Foo{AAAAAAAAAAAAAAAAAA}{BBB} \end{xltabular} \end{document}

  • What's the best way to compile or view a really long latex expression?
    by uggupuggu on February 26, 2026 at 11:22 am

    I have a latex expression that is 635k characters long. What is the most feasible way of viewing it in its entirety? I want to be able to scroll through the entire expression longitudinally. Online LaTeX viewers don't cut it, and the ones downloaded like Texstudio hang. Any python code I try to use to view it also hangs. The expression in question goes like this: X = ... where ... is a long nested radical expression that evaluates to a real number. (something like $3 = \sqrt{1+2\sqrt{1+3\sqrt{1+4...}$)

  • Alternative to allowframbreaks and framebreak
    by Dimitrios ANAGNOSTOU on February 26, 2026 at 11:20 am

    I know that there is allowframebreaks and framebreak and I have read a manual (of beamer?) that suggests to avoid using them. Nevertheless, when preparing course notes sometimes I need to split to several slides of similar content. I am asking if it is possible to do automatically the numbering 1/n, 2/n, 3/, etc. As an example: \documentclass[10pt]{beamer} \usetheme{moloch} \usepackage{babel} \title{Algèbre linéaire} \author{DA} \date{} \begin{document} \maketitle \section{Introduction} %-------------------------------------- \begin{frame}{De la structure à la représentation (1/3)} \begin{block}{Objets essentiels} \begin{itemize} \item \ldots \end{itemize} \end{block} \end{frame} %-------------------------------------- \begin{frame}{De la structure à la représentation (2/3)} \begin{block}{Concepts clés} \begin{itemize} \item \ldots \end{itemize} \end{block} \end{frame} %-------------------------------------- \begin{frame}{De la structure à la représentation (3/3)} \begin{alertblock}{Idée centrale : diagonalisation} blabla \end{alertblock} \end{frame} \end{document}

  • Large font size throughout writing notes [duplicate]
    by Maths Rahul on February 26, 2026 at 10:46 am

    I am trying to type notes on a4 page though latex but with font-size larger. In the usual writing, I start with \documentclass[a4paper,12pt]{article} \usepackage{amsmath, amssymb, amdfonts} \begin{document} Consider the sequence $$ 1, 1+\frac{1}{1!}, 1+\frac{1}{1!}+\frac{1}{2!}, \ldots $$ of real numbers. ....... \end{document} After compiling it, I get a4 page in pdf, which, after printing is not so easy to read for me unless I take the page very close. Q. How can I increase the font beyond 12 pt, throughout the notes on a4 sheet?

  • How to zoom in on an image? [duplicate]
    by Kong on February 26, 2026 at 10:15 am

    How can I crop an image and then keep its aspect ratio automatically resized and keep its resolution the same as what it originally us ? Basically I want to like zoom in on an image. For example, I want to zoom in such that the A fills the top and bottom of the image. Here is a MWE but you dont have to stick to it. I dont know what I am doing at all. \documentclass[twocolumn]{article} \usepackage{graphicx} \usepackage{subcaption} % <-- correct package \usepackage{booktabs} \usepackage[colorlinks]{hyperref} \usepackage{nicematrix} \usepackage[export]{adjustbox} % <-- provides \adjincludegraphics and cropping+scaling tools [1](https://tex.stackexchange.com/questions/57418/crop-an-inserted-image)[2](https://ctan.org/pkg/adjustbox) \begin{document} % ---- Tight frame: no padding between border and content ---- \setlength{\fboxsep}{0pt} \setlength{\fboxrule}{0.4pt} % ---- Cell geometry (ONE truth for all subfigures) ---- \newlength{\cellw} \newlength{\cellh} \setlength{\cellw}{0.23\textwidth} \setlength{\cellh}{0.17\textwidth} % choose the height you want (tweak once, applies everywhere) % ---- Image cell: crop (trim+clip) THEN scale to EXACT cell size ---- % The key trick is using BOTH width and height; adjustbox handles the crop+resize pipeline. [1](https://tex.stackexchange.com/questions/57418/crop-an-inserted-image)[2](https://ctan.org/pkg/adjustbox) \newcommand{\imgcell}[2][]{% \fbox{% \adjincludegraphics[ width=\cellw, height=\cellh, keepaspectratio, clip, #1 ]{#2}% }% } % ---- Text cell: EXACT same outer size; text centered both ways ---- \newcommand{\textcell}[1]{% \fbox{% \parbox[c][\cellh][c]{\cellw}{% \centering\small #1% }% }% } \begin{figure*}[htbp] \centering % --- Row 1 --- \subfloat{% % trim order: left bottom right top (graphicx/adjustbox convention) [1](https://tex.stackexchange.com/questions/57418/crop-an-inserted-image) \imgcell{example-image-a}% }\hfill \subfloat{% \imgcell{example-image-a}% }\hfill \subfloat{% \imgcell{example-image-a}% }\hfill \subfloat{% \imgcell{example-image-a}% } \vspace{0cm} % --- Row 2 --- \subfloat[Text Box]{% \textcell{% This is your\\ custom text\\ for the\\ bottom-left cell.% }% }\hfill \subfloat[Caption 2b]{% \imgcell{example-image-a}% }\hfill \subfloat[Caption 2c]{% \imgcell{example-image-a}% }\hfill \subfloat[Caption 2d]{% \imgcell{example-image-a}% } \caption{Overall figure caption} \label{fig:grid} \end{figure*} \end{document} Here is an example of what happens when I zoom in by cropping. It fails. If the dimensions on paper is 1337x137, then after zooming in via cropping it must still be 1337x137. I dont know how else to say it other than i just want to zoom in on an image. EDIT: Crop certain percent from each side of the figure not the same because cropping a % from 1 side distorts the human in the figure above. I need to crop with correct set of numbers. Alternatively, is there a [zoom] function that I can use ?

  • Modifying existing math kerns (aka cut-ins or staircase kerning) to OpenType math fonts
    by Apoorv Potnis on February 26, 2026 at 6:53 am

    It seems that the code from this answer works when introducing new math kerns (aka cut-ins or staircase kerning), but does not seem to modify existing ones. \documentclass{article} \usepackage{luacode} % code adapted from Marcel Kruger's answer https://tex.stackexchange.com/a/760117/128462 \begin{luacode} local kerns = { ["NewCMMath-Book"] = { ["uni211D.bb"] = { topright = { { kern = -70 } } }, -- DOUBLE-STRUCK CAPITAL R (Stylistic Set = 3) ["u1D6F9"] = {bottomright = { { kern = -1000 } } }, -- MATHEMATICAL ITALIC CAPITAL PSI }, } local function addkerns(tfmdata) if tfmdata.mathparameters then local kerns = kerns[tfmdata.properties.fontname] local unicodes = tfmdata.resources.unicodes if kerns then local characters = tfmdata.characters for name, specification in pairs(kerns) do local character = characters[unicodes[name]] if character and not character.mathkerns then character.mathkerns = specification end end end end end fonts.handlers.otf.features.register { name = "mathkerns", description = "additional math kerns", initializers = { position = 1, base = addkerns, node = addkerns, } } \end{luacode} \usepackage{unicode-math} \setmathfont[ StylisticSet={3}, BoldFont = NewCMMath-Bold.otf, RawFeature=+mathkerns ]{NewCMMath-Book.otf} % code copied from here https://tex.stackexchange.com/a/82221/128462 \everymath=\expandafter{% \the\everymath% \Umathsubshiftdown\textstyle=1.5pt\Umathsubshiftdrop\textstyle=0.5pt} \everydisplay=\expandafter{% \the\everydisplay% \Umathsubshiftdown\displaystyle=1.5pt\Umathsubshiftdrop\displaystyle=0.5pt} \usepackage{lua-visual-debug} \lvdset{glyph={show=true}} \begin{document} \(\symit{\Psi}_{\symit{\Psi}}\symbb{R}^n\) \end{document} This is a problem because of the modifications I've made. The math kerns in New Computer Modern Math have been set with the SubscriptShiftDown value set as 247. This causes the subscripts to be placed too low, as compared to the traditional Computer Modern fonts. In order to change that, this parameter has been modified to 1.5pt, using Khaled Hosny's code. I found the 1.5pt value in the goodie file for NewCM Math provided by ConTeXt. I wish to increase the math kern values for some glyphs. I've included \symbb{R}^n to show that the newly added math kern works, but does not modify the existing one (set to -1000 which should cause collisions).

  • 'pdfsavepos' / 'ypos' ​of the last line of a page
    by cis on February 26, 2026 at 6:44 am

    I want to determine, save, and later use the pdfsavepos / ypos value ​​of the last line of a page. \def\getposition#1{% \pdfsavepos\RecordProperties{#1}{xpos,ypos}} \newcommand\Ypos[1]{\RefProperty{#1}{ypos}}% To reach the last line, I could use \vfill, but this affects the following text. I created a scrlayer for this purpose. However, this not that good (e.g., Ypos(end) is now measured on every page, resulting in a LaTeX Warning: Label 'end' multiply defined.). Therefore, the question is: Is there an easier way to determine the pdfsavepos / ypos value ​​of the last line? \documentclass{article} \usepackage[margin=7mm, paperheight=88mm, paperwidth=77mm, showframe=true, ]{geometry} \usepackage{xcolor} \usepackage{scrlayer-scrpage} %% Ypos{<pos>} - pdfsavepos ================== \def\getposition#1{% \pdfsavepos\RecordProperties{#1}{xpos,ypos}} \newcommand\Ypos[1]{\RefProperty{#1}{ypos}}% \DeclareNewLayer[ foreground, %hoffset=.0\paperwidth, voffset=0.5\textheight-1.0\baselineskip, contents={% \parbox[c][\layerheight][c]{\layerwidth}{% \centering\footnotesize \getposition{end}% \color{red}\rule[0.5ex]{0.5\textwidth}{0.4pt} Ypos(end)=\Ypos{end}% }}% ]{lastline} \AddLayersToPageStyle{scrheadings}{lastline} \begin{document} \section{Test} text text text \getposition{test} Ypos(test) = \Ypos{test}sp %\vfill x % moves resttesxt too 🙁 resttext resttext resttext \newpage \section{One Time Readout of Ypos(end) is enough!} \end{document}

  • quotchap with LuaLaTeX and fontsetup
    by user20478285 on February 25, 2026 at 11:41 pm

    How can I have the quotchap package use the utopia font (only for the chapter number) with lualatex and fontsetup, like it does when using pdflatex? \documentclass{book} \usepackage{ifluatex} \ifluatex \usepackage{fontsetup} \else \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \fi \usepackage[grey, utopia]{quotchap} \begin{document} \chapter{Foo} \end{document} Result with pdflatex: Result with lualatex:

  • en-dash for Authorname in bibliography sbl
    by test on February 25, 2026 at 11:23 pm

    How can I replace the standard em dash used for repeated author names in the bibliography with an en dash instead? Here is my example: \documentclass{scrbook} \usepackage[ngerman]{babel} \usepackage[utf8]{inputenc} \usepackage[autostyle=true,german=quotes]{csquotes} \usepackage[style=sbl,citepages=separate,backend=biber,sblfootnotes=false,ibidpage=true,ibidtracker=true,idemtracker=true,pagetracker=spread,sorting=nyvt,url=false,isbn=false,doi=false,clearlang=false,uniquename=false]{biblatex} \begin{filecontents*}[overwrite]{\jobname.bib} @article{Penna.R, author = {Penna, R.}, gender = {sm}, date = {1997}, title = {Abramo}, pages = {15–31}, volume = {3}, keywords = {sekundaer}, journaltitle = {RS}, } @article{Penna.W, author = {Penna, R.}, gender = {sm}, date = {1996}, title = {Abrams}, pages = {1–3}, volume = {2}, keywords = {sekundaer}, journaltitle = {RS}, } \end{filecontents*} \addbibresource{\jobname.bib} \begin{document} Abramo schrieb ein Buch.\footnote{Der Titel lautet Geschichte des Abramo \parentext{cf. \cite[10]{Penna.R}}.} Abramo schrieb ein Buch.\footnote{Der Titel lautet Geschichte des Abramo \parentext{cf. \cite[10]{Penna.W}}.} \printbibliography \end{document}

  • How to compile LaTeX bibliography with journal abbreviations without using .ldf files?
    by David Russell on February 25, 2026 at 9:08 pm

    I am submitting an article written in LaTeX (document class elsarticle) to an Elsevier journal. For journal abbreviations in the bibliography, I have been using jabbrv.sty, together with the lists of abbreviations in jabbrv-ltwa-en.ldf and jabbrv-ltwa-all.ldf. However, Elsevier’s online system for building a PDF from LaTeX source files only allows for certain file types, not including .ldf files. What is the simplest workaround for this problem?

  • I am plotting a family of parabolas in TikZ, and there is a stray parabola. I'm confused
    by 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}

  • enumerate with right-aligned labels, the widest is flush-left to left edge of text area without setting widest=
    by tsj on February 25, 2026 at 6:40 pm

    I want the following simple layout with enumitem: Blah blah noindent I. Foo II. Bar blah blah long line paragraph wrapping continues here III. Baz Blah blah noindent non-enumerate text Labels are right aligned, \labelsep can be fixed (e.g. 0.5em), and text continues from the same horizonal position on the next line in the case of a longer paragraph (I think this means \itemsep should be zero). enumitem apparently has the capacity to calculate the width of the widest label and set \labelwidth accordingly, though I can't determine under what circumstances that happens after reading the documentation. I can set widest=<whatever> to achieve the output I want, but I'd like to know if I can achieve the same by setting one or more parameters to ! or *, i.e. computing the parameters automatically. MWE and output are below, basically I just want the widest label (maybe VI or III or IV) label to be left-aligned with the left edge of the VVVVV (the left edge of the text area), everything else the same. \documentclass{article} \usepackage{enumitem} \begin{document} \begin{enumerate}[label=\Roman*.,nosep,align=right, leftmargin=*, labelindent=0pt, labelsep=0.5em, itemsep=0pt, % widest=VI, % I don't want to use this! ] \item Alpha. \item Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis sem. Nullam nec mi et neque pharetra sollicitudin. \item Gamma \item Delta \item Epsilon \item Zeta \end{enumerate} VVVVV \end{document}

  • Retrieve the value of a variable earlier in the document
    by Subhajit Paul on February 25, 2026 at 5:54 pm

    I am preparing the schedule for a conference and using a time counter controlled by the macro \Next. By default, \Next advances the time by 15 minutes, but it can also accept an optional argument to specify a different increment. The definition of \Next is not perfect; a full discussion appears in this question. However, for convenience, I am using the version shown below. My preamble is: \documentclass{article} \usepackage{calc} \def\kntime{45} \def\pttime{35} \def\qatime{5} \def\kntottime{\kntime+\qatime} \def\pttottime{\pttime+\qatime} % % \newcounter{hour} \newcounter{minute} \newcounter{flag} \newcommand{\Time}[2]{% \setcounter{flag}{0}% \setcounter{hour}{#1}% \setcounter{minute}{#2}% } \newcommand*{\Next}[1][15]{% \addtocounter{minute}{#1}% \ifnum\value{minute}>59% \stepcounter{hour}% \addtocounter{minute}{-60}% \fi% \ifnum\value{hour}>11% \stepcounter{flag}% \ifnum\value{hour}>12 \addtocounter{hour}{-12}% \fi \fi% % \ifnum\value{hour}<10 0\fi% \thehour% :% \ifnum\value{minute}<10 0\fi\theminute% \ifnum\value{flag}<1\ am\fi% \ifnum\value{flag}>0\ pm\fi% } % \newcounter{tsession} \renewcommand{\thetsession}{\Roman{tsession}} \newcommand{\tsession}{% \stepcounter{tsession}% Technical Session -- \thetsession% } I would like to display the total runtime of each session in the table header (masthead). Specifically, I want a macro \endtsession{\thetsession} that can be used as follows: \begin{document} \Time{8}{10} \begin{tabular}{ll} \multicolumn{2}{c}{\tsession: \Next[0] -- \value{\endsession{\thetsession}}}\\\hline \Next[\kntime] & Keynote Speaker\\ \Next[\qatime] & Q\&A\\ \Next[\pttime] & Plenary Speaker\\ \Next[\qatime] & Q\&A\\ \Next[0] & Speaker 1\\ \Next\endsession{\thetsession} & Speaker 2 \end{tabular} \end{document} The macro \endtsession should return the final time of the session in the same format produced by \Next. Any assistance would be appreciated.

  • Two 'Missing character: There is no ; (U+003B) in font nullfont!' warnings with pgfplots
    by Apoorv Potnis on February 25, 2026 at 5:13 pm

    I get two Missing character: There is no ; (U+003B) in font nullfont! warnings when I compile the below code with LuaLaTeX. I don't see any line numbers for the warnings in the .log file. I don't see any visual problem with the output though. \documentclass{article} \usepackage[newcmbb]{fontsetup} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \usetikzlibrary{decorations.markings} \usetikzlibrary {arrows.meta,bending} \newcommand{\e}{\symrm{e}} \begin{document} \begin{figure}[h] \centering \begin{tikzpicture}[line cap=round] \begin{axis}[ samples=200, domain=0.24:4.5, xmin=0, xmax=5, ymin=-4.4, ymax=0.5, axis lines=middle, ticks=none, width=0.5\textwidth, xlabel={$r$}, ylabel={$V(r)$}, x axis line style={thick, -{>[bend]}}, y axis line style={thick, {<[bend]}-{>[bend]}}, y label style={anchor=south}, x label style={anchor=west}, legend style={ draw=none, at={(axis cs:2,-1.8)}, anchor=north west, row sep=10pt } ] \addplot[thick, red] {-exp(-x)/(x)}; \addplot[thick, blue, dashed] {-1/(x)}; \addlegendentry{$\displaystyle\frac{-\e^{-r}}{r}$}; \addlegendentry{$\displaystyle\frac{-1}{r}$}; \end{axis} \end{tikzpicture} \end{figure} \end{document} I saw another question with the same warning but there was a \tikz command in it which was causing issues. There is no \tikz command in my code. And I can't seem to find any stray semi-colons in the TikZ code either.

  • Square brackets in citations when in parentheses [duplicate]
    by test on February 25, 2026 at 2:56 pm

    This is probably a long shot, but I have the following problem: when a bibliographical reference appears within parentheses, my supervisor would like the inner parentheses to be changed to square brackets, like this: Der Titel lautet Geschichte des Abramo (cf. R. Penna, ”Abramo“, RS 3 [1997]: 15–31 [hier 10]). Here is my example file: \documentclass{scrbook} \usepackage[ngerman]{babel} \usepackage[utf8]{inputenc} \usepackage[autostyle=true,german=quotes]{csquotes} \usepackage[style=sbl,citepages=separate,backend=biber,sblfootnotes=false,ibidpage=true,ibidtracker=true,idemtracker=true,pagetracker=spread,sorting=nyvt,url=false,isbn=false,doi=false,clearlang=false,uniquename=false]{biblatex} \usepackage{filecontents} \begin{filecontents*}{\jobname.bib} @article{Penna.R, author = {Penna, R.}, gender = {sm}, date = {1997}, title = {Abramo}, pages = {15–31}, volume = {3}, keywords = {sekundaer}, journaltitle = {RS}, } \end{filecontents*} \addbibresource{\jobname.bib} \begin{document} Abramo schrieb ein Buch.\footnote{Der Titel lautet Geschichte des Abramo (cf. \cite[10]{Penna.R}).} \printbibliography \end{document}

  • Two synchronised but different documents on even and odd pages
    by Christophe on February 25, 2026 at 11:59 am

    I would like to generate a document that merges two documents: the first one states the theory, and the second one presents examples. Both documents have exactly the same structure: the chapters, sections, and subsections are identical. However, the lengths of these structural elements differ. The merged document should show the theoretical part on the even pages and the examples on the odd pages. And of course, despite the difference in length between the chapters, sections, etc., their titles must appear at the same height on the page. I have no MWE to show (and I tried to follow question 354456, but unsuccesfully). What I want to achieve is completely beyond my skills. Note that the “two documents” do not exist yet, so nothing needs to be imported from an existing source. In addition, I am using the following template (class memoir): https://www.overleaf.com/latex/templates/matnat-compendium/xbfgbfgzpcxz

  • How to read correct \lastskip just after a figure?
    by forrest on February 25, 2026 at 9:07 am

    This is somehow a continuation of Usage of the `\lastskip` as a flag and \intextsep gives doubled space The code snippet below produces the following fragment of the vertical list: ...\glue 12.0 plus 2.0 minus 2.0 <-- \intextsep added by the figure environment ...\glue 0.0 plus -1.0 ...\glue -16371.99998 plus 2.0 minus 2.0 ...\glue 16383.99998 <-- \maxdimen added by \myfancybreak ...\penalty 10000 I want to move \glue 16383.99998 AFTER \penalty 10000 so that it will be accessible in \lastskip after the figure environment and thus accessible by \addvspace in \myfancybreak. How to do this? \documentclass{memoir} \newlength\fancybreakskip \setlength\fancybreakskip{.5\intextsep} \newcommand*{\myfancybreak}[1]{% \par \addvspace\fancybreakskip \centerline{#1}% \vskip\glueexpr\fancybreakskip-\maxdimen\relax \nobreak \vskip\maxdimen} \newlength{\auxiliarylength} \setlength{\auxiliarylength}{\glueexpr\intextsep-\maxdimen\relax} \usepackage{etoolbox} \makeatletter% \patchcmd{\@addtocurcol}% {\vskip\intextsep}{\aftergroup\vskip\aftergroup\auxiliarylength\aftergroup\vskip\aftergroup\maxdimen}% this trick doesn't work as there is \nobreak added at the end of float that resets \lastskip to 0pt {\typeout{*** SUCCESS ***}}% {\typeout{*** FAIL ***}} \makeatother% \begin{document} \section{Distance between float and fancy break} \begin{figure}[h] \centering% AAA% \caption{Caption to figure.}% \end{figure}% \myfancybreak{$\ast$} \end{document} Update: \documentclass{memoir} \showoutput \newlength\fancybreakskip \setlength\fancybreakskip{.5\intextsep} \newcommand*{\myfancybreak}[1]{% \par\nointerlineskip \addvspace\fancybreakskip \centerline{#1}% \vskip\glueexpr\fancybreakskip-\maxdimen\relax \nobreak \vskip\maxdimen} \usepackage{etoolbox} \makeatletter% \patchcmd{\@addtocurcol}% {\vskip \intextsep}{\addvspace\intextsep}% {\typeout{*** SUCCESS ***}}% {\typeout{*** FAIL ***}} \patchcmd{\@addtocurcol}% {\@inserttrue}{\@inserttrue\vskip -\intextsep\vskip -\maxdimen\vskip\maxdimen}% this trick doesn't work as there is \nobreak added at the end of float that resets \lastskip to 0pt {\typeout{*** SUCCESS ***}}% {\typeout{*** FAIL ***}} \makeatother% \begin{document} \section{Distance between float and fancy break} \hrule\begin{figure}[h] \centering% \rule{10cm}{1cm}% \caption{Caption to figure.}% \end{figure}\hrule% \myfancybreak{$\ast$}\hrule \end{document}

  • \nopagebreak in \paragraph don’t have effect
    by fauve on February 25, 2026 at 4:44 am

    General overview I redefine \paragraph{} in order to get a wrap paragraph title like this : The problem But sometimes, when I reach the bottom page, a \section or \subsection comming just before the \paragraph stay at widow, like this: The MWE \documentclass{article} \usepackage{fontspec} \usepackage{xunicode} \usepackage{fontenc} \usepackage{wrapfig} \usepackage{needspace} \setlength\intextsep{0pt} \newlength{\wrapparwidth} \renewcommand{\paragraph}[1]{% %\needspace{3\baselineskip}% \nopagebreak[4]% \settowidth{\wrapparwidth}{\centering\bfseries\normalsize\small #1}% \ifdim\wrapparwidth>3cm% \setlength{\wrapparwidth}{3cm}% \fi% \begin{wrapfigure}{l}{\wrapparwidth} % l = left, 3cm largeur max \vspace{-0.04em} \centering\bfseries\normalsize\small #1 \end{wrapfigure}% \nopagebreak[4]% } \begin{document} 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. 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. 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. 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. 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. 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. 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. \subsection{A random section} \paragraph{A random paragraph} 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. \end{document} The question As you see, I used many \nopagebreak and also needspace to avoid this behaviour, but LaTeX wan’t hear my \nopagebreaks. So how do I avoid pagebreak between sectioning commands and the new defined \paragraph ?

  • PDF/UA and stretchable math delimiters
    by Vincent Beffara on February 25, 2026 at 12:12 am

    I am trying to generate PDF/UA-2 compliant PDFs, and so far most of what I tried works with the last updates to the tagging support (thanks!). But with this file: \DocumentMetadata{lang=en,tagging=on,pdfstandard={UA-2}} \documentclass{article} \usepackage{newtxmath} \title{.} \begin{document} \maketitle \[\Bigg|\] \end{document} compiled with LuaLaTeX, verapdf tells me that the produced PDF is not valid because of a font issue, namely: The glyph can not be mapped to Unicode The Font dictionary of all fonts shall define the map of all used character codes to Unicode values, either via a ToUnicode entry, or other mechanisms as defined in ISO 14289-2, 8.4.5.8 I am assuming "the glyph" is the stretched vertical bar, and that the issue is with missing info from the math font loaded by newtxmath. What can I do, given that I would really like to keep newtxmath? Teach LuaLaTeX about the Unicode equivalent to that glyph (and others)? Use stretchable characters from another font? (but how?) Put the info in the font? (but how?)

  • How to write at an angle along a straight line
    by rpapa on February 24, 2026 at 8:33 pm

    Using "sloped" I know how to write text parallel to a line, but how do I make the text also at an angle in the second case? \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning,matrix,calc} \begin{document} \begin{tikzpicture} \draw [red,ultra thick] (0,0)coordinate(A1)-- (3,5)coordinate(A2); \path (A1) -- (A2) node[sloped,pos=0.3,draw,fill=white]{aa}; \draw [blue,ultra thick] (1,0)coordinate(A3)-- (4,5)coordinate(A4); \foreach \i in {1,...,5} \node [sloped,draw,fill=white] at ($(A3)!{\i*10mm}!(A4)$) {\i}; \end{tikzpicture} \end{document} To be clear, the nodes must have a set distance between them.

  • Dynamic class/id name in tabularray
    by Mariuslp on February 24, 2026 at 5:50 pm

    I am trying, for the purposes of a reusable library, to create dynamic class names in tabularray. Here is my minimal code: \documentclass{article} \usepackage{tabularray} \usepackage{xcolor} \date{} \newcounter{stylectr} \setcounter{stylectr}{1} % compiles, but non-dynamic \newcommand{\style}{\SetChild{id=Idstylei}\stepcounter{stylectr}} %% does not work %% command to expand the argument before the \SetChild (see https://tex.stackexchange.com/a/133768/430417) %\def\expandArg #1#2{\expandafter\expandArgaux\expandafter{#2}{#1}} %\def\expandArgaux #1#2{#2{#1}} %\newcommand{\style}{\expandArg{\SetChild}{id=Idstyle\roman{stylectr}}\stepcounter{stylectr}} \begin{document} \begin{table} \SetTblrOuter{expand=\style} \begin{tblr} { colspec=lll, cell{Idstylei} = {red9} } \style 1 & \style 2 & 3\\ \end{tblr} \end{table} \end{document} My goal is that, every time I call \style, the cell is given the id Idstyle{ctr} where {ctr} is a roman number (or anything that will yield a valid tblr id name). For instance, in the above code, only the first cell should have red background. I have tried several related solutions (1 2) but none seems to be working, or at least none that I can make to work. Edit: weird behaviour from tabularray, if I try to use the line \newcommand{\style}{\SetChild{id=Idstyle\roman{stylectr}}\stepcounter{stylectr}}, the code compiles but does not work (no cell has id Idstylei or even Idstyle), and an extra comma , appears left of the table. Does anyone knows where this comma is coming from?

  • Spacing and dot weight in bsmallmatrix (from mathtools)
    by Dimitrios ANAGNOSTOU on February 24, 2026 at 4:45 pm

    MWE \documentclass{article} \usepackage{mathtools} \begin{document} Le signe $(-1)^{i+j}$ suit un motif en damier : \( \begin{bsmallmatrix} + & - & + & - & \cdots \\ - & + & - & + & \cdots \\ + & - & + & - & \cdots \\ - & + & - & + & \cdots \\ \vdots & \vdots & \vdots & \vdots & \ddots \end{bsmallmatrix} \) \end{document} Questions There appears to be some horizontal empty space around the matrix. How can I remove or reduce it? It seems that \cdots is not as bold as \vdots and \ddots. Is this actually the case? If so, is there a way to make the various dots visually consistent? THANKS A LOT!

  • Formatting a sequence of items with comma and ending with 'and' or 'respectively'
    by mf67 on February 23, 2026 at 10:02 pm

    Can someone help me create a macro like \MyList{A;B;C;D;E;F} which returns “A, B, C, D, E[,] respectively F" independently on how many ”arguments” (2+) that are specified and also support math, e.g. \MyList{\(A\);\(B\);\(C\);\(D\);\(E\);\(F\)} ? (I used the [,] notation since I’m not sure if the Oxford comma is used today.) If the number of arguments is two; \MyList{A;B} I would like it to return “A respectively B”. Edit: I tried using sinuitx but it might not be suitable for this task as it mainly(?) handles numbers. Here is a test \documentclass{article} \usepackage{siunitx} \begin{document} \numlist[parse-numbers=false]{A;2;3} \numlist[parse-numbers=false]{\text{A};2;3} \numlist[parse-numbers=false]{\(A+B\);2;3} \end{document} but it gives an error on the last line and I would like to have ”roman letters” if no ”math mode” is used, and avoid using \text{}.

  • tabular: add lines until the end of the text body is reached
    by cis on February 23, 2026 at 12:56 pm

    Can I configure this loop, or a similar loop, to add rows until the end of the text body is reached? A small gap at the end will probably be unavoidable. Could this be achieved with \pdfpos? \documentclass[a5paper]{article} \usepackage[margin=14mm, showframe=true, paperheight=126mm, ]{geometry} \newcounter{mycount} \setcounter{mycount}{0} \def\mylines{}% \loop\ifnum\themycount<7% \addtocounter{mycount}{1} \expandafter\def\expandafter\mylines\expandafter{% \mylines & & \themycount \\ }% \repeat% \begin{document} \section{Table} \begin{tabular}{| c c | c|} \hline \multicolumn{3}{|c|}{Something} \\ \hline A & B & (My Head) \\ \hline a & b & n\\ a & b & n\\ a & b & n\\ \mylines \hline A & B & (My Foot)\\ \hline \end{tabular} \end{document}

  • What is the best way to draw a potato (like found in vector analysis/continuum mechanics courses)
    by Dimitrios ANAGNOSTOU on February 21, 2026 at 11:34 pm

    I apologized if this is a duplicate. What is the best way to draw such figures with tikz (or other packages)? For the time being just the potato like figure. I do not care for the vectors and the infinitesimal mass element. I do not want someone to do the work for me. Just some advice or suggestions.