• Vertical spacing between fbox
    by zgrizz on June 5, 2026 at 1:21 am

    Just wondering what is happening between fboxs on separate paragraphs, which prevents them from lining up as follows: \documentclass{article} \setlength{\parskip}{0pt} \setlength{\fboxsep}{0pt} \begin{document} \fbox{\strut Line One} \vspace*{-\baselineskip} \fbox{\strut Line Two} \end{document}

  • Promotion issue in xskak package
    by Yasin Şale on June 4, 2026 at 8:17 pm

    I am using the xskak and chessboard packages in MikTeX to typeset chess games. I have encountered an issue with pawn promotion with the ordinary command d1=Q given in xskak document. Then, after some debeates with claude.ai, I used d8=\figsymbol{Q} and interestingly, in text it worked well, as follows: \mainline{21. d5 $1}. some text... \mainline{21... Nd8 22. d6 Rc5 23. d7 Re7 24. Qf4 Bg7 25. Qb8 $1 Qxh6 26. Qxd8+ $1 Bf8 27. Re3} (27. \qq$\times$f8+ some text). \mainline{27... Bc6 28. Qxf8+ Qxf8 29. d8=\figsymbol{Q}}. In another promotion in the same document, I again used d1=\figsymbol{Q} (this time for black), but it returned me following errors (with some other errors, but I thought these are essential ones): Missing \endcsname inserted. Improper alphabetic constant. Here is the related part: \mainline{24... cxd4 25. Rxc8 Bxc8 $1 26. Re1 d3 27. Qd1} (\variation[invar]{27. Qxe5 Qxe5 28. Rxe5 d2}, some text). \mainline[outvar]{27... Bg4 28. Qa1 d2 29. Rxe5 d1=\figsymbol{Q} 30. Re8+ Rxe8 31. Qxf6 Be2 32. Ng3 Bg7}, some text. Then I tried the same with the famous generic position in xskak doc for white and black, and my "solution" worked for both. I have no any idea about what's going on. Moreover, why cannot I see promoted figures on the board? I read the 10-year-old post here, but I could not solve my issue. What is the clearest method to promote a pawn and to see it on the board? In that respect xskak file is too limited. Here is my MWP covering all I have written above: \documentclass[10pt, twocolumn, openany]{book} \usepackage[b5paper,margin=2.0cm, bottom=2cm, top=2.0cm]{geometry} \setlength{\columnsep}{0.5cm} \usepackage{tikz} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{hyperref} \usepackage{pgfplots} \usepackage{titlesec} \usepackage{graphicx} \usepackage[turkish]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{xskak} \usepackage{chessboard} \xskakset{style=UF} \usepackage{multicol} \newcommand{\kk}{\symking} \newcommand{\qq}{\symqueen} \newcommand{\rr}{\symrook} \newcommand{\bb}{\symbishop} \newcommand{\nn}{\symknight} \newcommand{\pp}{\sympawn} %$1 : ! $2 : ? $3 : !! $4 : ?? $5 : !? $6 : ?! \begin{document} \subsubsection{This is working one} \newchessgame \mainline{1. c4 c5 2. Nf3 Nf6 3. Nc3 d5 4. cxd5 Nxd5 5. e3 e6 6. d4 cxd4 7. exd4 Be7 8. Bd3 O-O 9. O-O Nc6 10. Re1 Nf6 11. a3 b6 12. Bc2 Bb7 13. Qd3 Rc8 $2 14. Bg5 g6 15. Rad1 Nd5 16. Bh6 Re8 17. Ba4 a6 18. Nxd5 Qxd5 $2 19. Qe3 Bf6 20. Bb3 Qh5 21. d5 $1 Nd8 22. d6 Rc5 23. d7 Re7 24. Qf4 Bg7 25. Qb8 $1 Qxh6 26. Qxd8+ $1 Bf8 27. Re3 Bc6 28. Qxf8+ Qxf8 29. d8=\figsymbol{Q}} \textbf{(1-0).}\\ \showboard \subsubsection{This is problematic one} \newchessgame \fenboard{2rr2k1/1b1nqpbp/p4np1/2pp4/8/1P2PN2/PB2NPPP/1QRR1BK1 b - - 0 17} \mainline[outvar]{17... Bh6 $1 18. Ba3 Ng4 19. Qd3 Nde5 20. Nxe5 Qxe5 21. Ng3 Qf6 $1 22. Nh1 d4 $1 23. Qe2 Ne5 24. exd4 $6 cxd4 25. Rxc8 Bxc8 $1 26. Re1 d3 27. Qd1 Bg4 28. Qa1 d2 29. Rxe5 d1=\figsymbol{Q}} \\% 30. Re8+ Rxe8 31. Qxf6 Be2 32. Ng3 Bg7}, ve Siyahlar çabucak kazandılar. \showboard \subsubsection*{With the generic position in xskak doc} \newchessgame \fenboard{4k2r/2P4p/5n2/3pn1P1/4P1B1/7b/P1p4P/R3K3 w Q - 0 1} \mainline{1. c8=\figsymbol{Q}}\\ \showboard \newchessgame \fenboard{4k2r/2P4p/5n2/3pn1P1/4P1B1/7b/P1p4P/R3K3 b Q - 0 1} \mainline{1... c1=\figsymbol{Q}}\\ \showboard \end{document}

  • Double Minipage Macro Aligns to Bottom with [t]
    by user1668001 on June 4, 2026 at 7:03 pm

    I came across this issue while making a chess macro: chess.sty \newcommand{\chessblock}[2]{% \noindent \begin{minipage}[t]{0.45\textwidth} \centering \fcolorbox{black}{gray!12}{% \begin{minipage}[t]{0.95\textwidth} #1 \end{minipage}% } \end{minipage}% \hfill \begin{minipage}[t]{0.45\textwidth} \centering \newchessgame \hidemoves{#1} \xskakset{moveid=#2} \chessboard[setfen=\xskakget{nextfen}] \captionof{figure}{Position after \xskakget{lan}} \end{minipage}% } main.tex \documentclass{article} \usepackage{chess} \begin{document} \chessblock{1. e4 e5 2. Nf3 Nc6 3. Bc4}{3w} \end{document} Output Why does the left minipage send the fcolorbox to the bottom rather than the top? How can I make it go to the top? I've tried using [b] instead of [t] but it does not work, and I do not want to use \vspace to manually adjust it. I've also tried to put \vfill after the fcolorbox but this did not fix it either.

  • 'colortbl' breaks 'pmatrix' inside 'tblr' cells when both 'tabularray' and 'tabular' are used
    by Ced P on June 4, 2026 at 6:51 pm

    In my document, tabularray is my main table engine, but I also have a few macros that use classic tabular with \arrayrulecolor (from colortbl) for colored rules. The problem is that loading colortbl breaks any tblr environment containing pmatrix cells, with amsmath loaded. Minimal example \documentclass{article} \usepackage{amsmath} \usepackage{colortbl} \usepackage{tabularray} \begin{document} % This breaks as soon as colortbl is loaded: \begin{tblr}{hlines,vlines,colspec={ccc}} $\begin{pmatrix}a\\b\end{pmatrix}$ & $\begin{pmatrix}c\\d\end{pmatrix}$ & $\begin{pmatrix}e\\f\end{pmatrix}$ \\ \end{tblr} % This works fine (no nested array environment): \begin{tblr}{hlines,vlines,colspec={ccc}} $u_n$ & $v_n$ & $w_n$ \\ \end{tblr} % This also works fine (native tabular): \arrayrulecolor{red} \begin{tabular}{ccc} \hline $\begin{pmatrix}a\\b\end{pmatrix}$ & $\begin{pmatrix}c\\d\end{pmatrix}$ & $\begin{pmatrix}e\\f\end{pmatrix}$ \\ \hline \end{tabular} \end{document} Error ! Missing number, treated as zero. <to be read again> > l.XX \end{tblr} My file list *File List* article.cls 2025/01/22 v1.4n Standard LaTeX document class size10.clo 2025/01/22 v1.4n Standard LaTeX file (size option) colortbl.sty 2026/05/01 v1.0l Color table columns (DPC) array.sty 2026/02/24 v2.7b Tabular extension package (FMi) color.sty 2026-05-17 v1.3f Standard LaTeX Color (DPC) color.cfg 2016/01/02 v1.6 sample color configuration luatex.def 2025/09/29 v1.2f Graphics/color driver for luatex mathcolor.ltx tabularray.sty 2025-11-27 v2025C Typeset tabulars and arrays with LaTeX3 amsmath.sty 2026/05/19 v2.18d AMS math features amstext.sty 2024/11/17 v2.01 AMS text amsgen.sty 1999/11/30 v2.0 generic functions amsbsy.sty 1999/11/29 v1.2d Bold Symbols amsopn.sty 2022/04/08 v2.04 operator names l3backend-luatex.def 2026-02-18 L3 backend support: PDF output (LuaTeX) supp-pdf.mkii *********** What I've tried Swapping load order (tabularray before/after colortbl): no effect Loading colortbl via \usepackage[table]{xcolor}: no effect Use \UseTblrLibrary{amsmath} Notes The bug only affects tblr cells containing pmatrix (or presumably any amsmath array-based environment with \\ inside). I prefer keeping both engines: tabularray for complex tables, and tabular+colortbl for dynamically generated tables (loop-based content with \foreach etc., which tblr handles poorly). Posted here too: https://github.com/TeXackers/tabularray/issues/664 Is there a way to neutralize colortbl's patch selectively, or to protect pmatrix inside tblr cells?

  • referencing custom counter along with chapter counter
    by underflow on June 4, 2026 at 4:20 pm

    I want to have a custom counter for examples, and then display it alongside with the value of the chapter counter where the example counter appears. Here is a MWE of what I currently have: \documentclass{amsbook} \begin{document} \newcounter{example} \chapter{One} \chapter{Two} \refstepcounter{example} \label{firstexample} \refstepcounter{example} \label{secondexample} Here are example \ref{firstexample} and example \ref{secondexample}. \end{document} The MWE above gives the output Here are example 1 and example 2. What I want instead is Here are example 2.1 and 2.2. What is the best/simplest ways to go about this? THANKS!

  • Problem with empty frame/frame with enumerate
    by Rassine Orange on June 4, 2026 at 12:05 pm

    I'm using the following code to write boxes. I have two problems: If in my box I only put \vspace{..}, the "name" of the box goes at the very end of the box. If in the box I only put an enumerate/itemize environment, the fist bullet goes right after the name of the box. I can a "\ " before the enumerate but then there is a big space between the first item and the name of the box. Is there any way to avoid these two situations? Many thanks! \usepackage{amsthm} \usepackage{thmtools} \declaretheoremstyle[ headfont=\bfseries\sffamily\color{Blue!70!black}, headpunct=\par, postheadspace = \newline, spaceabove=0.2cm, mdframed={ roundcorner=10pt, linewidth=2pt, rightline=false, topline=false, bottomline=false, leftline=true, linecolor=Red, backgroundcolor=Blue!10, nobreak=false } ]{thmbluebox} \declaretheorem[style=thmbluebox, numbered=no, name=Nameofbox]{reso} %%%Problem 1 \begin{reso} \vspace{5cm} \end{reso} %%%Problem 2 \begin{reso} \begin{itemize} \item Hello \item Hello \end{itemize} \end{reso}

  • \ExplSyntaxOn ignored within \@ifclassloaded{…}'s argument
    by Denis Bitouzé on June 4, 2026 at 9:09 am

    The following MCE works nicely. \documentclass{article} \makeatletter % \@ifclassloaded{article}{% \ExplSyntaxOn \AtBeginDocument{\NewCommandCopy\textbf__orig\textbf} \ExplSyntaxOff % }{} \makeatother \begin{document} \end{document} But, if \@ifclassloaded{article} is uncommented, it doesn't work anymore, complaining that: ! LaTeX Error: Command \textbf already defined. Forcing to continue, we are facing: ! Missing $ inserted. which clearly confirms that \ExplSyntaxOn is ignored. Do you understand what's going on?

  • How to use musixflx with luaLaTeX
    by Kamaron Wilcox on June 3, 2026 at 11:31 pm

    I am using TeXworks to compile a file that is a mixture of Gregorian chant and regular music scores. In order to use the GregorioTeX package, I have to use a modified LuaLaTeX processing tool with the following arguments: --shell-escape $synctexoption $fullname The Gregorian chant works just fine, but my issue occurs when I try to use MusixTeX to include a metered song. The music does not wrap properly, and it looks clunky. Reading through the MusixTeX documentation file here, it appears that I need to use musixflx to fix this issue. However, I have no idea how to do that. I think I need to include it somehow in the processing tool's arguments, but I'm unsure. Is there a way to use musixflx while also running the necessary commands for GregorioTeX? Also, do I need to download anything to use musixflx, or is it part of the MusixTeX package? Here is a sample set of code: % !TEX program = LuaLaTeX+se \documentclass[12pt, twoside]{article} \usepackage[paperheight=8.5in,paperwidth=5.5in,margin=.5in]{geometry} \usepackage{tabularx} \newcolumntype{Y}{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}X} \usepackage[autocompile]{gregoriotex} \usepackage{import} \usepackage{tikz} \usetikzlibrary{tikzmark} \usepackage{fontspec} \setmainfont{Times New Roman} \setlength{\parindent}{0pt} \setlength{\parskip}{6pt} \newenvironment{nscenter} {\par\nopagebreak\centering} {\par\vspace{-6pt}\noindent\ignorespacesafterend} \usepackage{changepage} \usepackage{xcolor} \usepackage{verbatim} \usepackage{amssymb} \usepackage{enumitem} \usepackage{textcomp} \input musixtex \input musixlyr \input musixdbr \setclef{1}{\treble} \nobarnumbers \def\voltadot{} %\grechangedim{spacebeneathtext=2cm} \usepackage{fancyhdr} \fancyhf{} \renewcommand{\headrulewidth}{0pt} \fancyfoot[LE,RO]{\thepage} \pagestyle{fancy} \geometry{footskip=-3pt} \begin{document} \begin{nscenter} \textbf{Sample} \end{nscenter} \textsc{\textcolor{red}{Intro}} \hspace{2em}Below, I would like to include a metered song, rendered in modern musical format. After that, I would like to use Gregorian chant in the same document for unmetered song. \textsc{\textcolor{red}{Metered}} \generalsignature{1} \startpiece \Notes\Dqbu{2}{3}\en\bar \Notes\qu{4}\qu{4}\qu{4}\Dqbu{5}{4}\en\bar \Notes\qu{3}\qu{3}\qu{3}\qu{6}\en\alaligne \Notes\qu{^5}\qu{6}\Dqbu{5}{4}\Dqbu{3}{2}\en\bar \Notes\qu{1}\qu{0}\Fermataup{7}\qu{-1}\en \endpiece \textsc{\textcolor{red}{Unmetered}} \hspace{2em}The following is the eighth Meinrad tone as an example. \gregorioscore{mode-8-4} \begin{tikzpicture}[remember picture, overlay] \draw ([shift={(-.725em,1em)}]viii4mode) node {\scriptsize{\textcolor{red}{VIII}}}; \draw ([shift={(2.05em,1em)}]viii4star) node {\scriptsize{\textcolor{red}{*}}}; \end{tikzpicture} \end{document} where mode-8-4 is a .gabc file with the following contents: name: mode-8-4; mode: 8; %% (c4)(gr[nv:\tikzmarknode{viii4mode}]!/[8]e/f/g.[nv:\tikzmarknode{viii4star}]) (:) (hr!/[8]g/h.) (:) (hr!/[8]f/h/j.) (:) (hr!/[8]i/g.) (::)(z) Here's what the output looks like:

  • Value for option of anchor not iterable in TikZ
    by youthdoo on June 3, 2026 at 3:15 pm

    The following code raises an error \documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{arrows.meta} \begin{document} \begin{tikzpicture} \def\radius{3} \def\smallr{0.3} \def\angleof#1{#1*360/18+3*360/18} \foreach \i in {0,...,17} { \draw ( \angleof{\i}:\radius ) circle (\smallr); } \foreach \i/\labl/\pos in { 1/$1$/center, 2/$2$/center, 3/$3=d$/east, 4/$4$/center, 6/$6=2d$/east, 9/$9=3d$/east, 12/$12=4d$/west, 15/$15=5d$/west, 18/$18=6d$/west } { \node[anchor=\pos] at ({\angleof{\i}}:\radius+\smallr+.25) {\labl}; } \end{tikzpicture} \end{document} The problem is with the second \foreach loop. But the error message is confusing, Package PGF Math Error: Unknown function `west' (in 'west '). I don't see why west would be used as a "function" in any way. What is the correct way of assigning different anchor points in the iteration?

  • LaTeX working half only in unicode-math \bm
    by mathrm alpha on June 3, 2026 at 1:57 pm

    Because I discovered that NewCMMath has a bold version, I set the \bm command in unicode-math. However, whenever I try to use \bm{\symsf{A}} or similar to other \bm{\symxx} fonts, it fails; However, it works for pure letters. \documentclass{article} \usepackage{unicode-math} \setmathfont{NewCMMath-Regular.otf} \setmathfontface{\bm}{NewCMMath-Bold.otf} \begin{document} $\symsf{ABCabc}, \symscr{ABCabc}$\\ with bm command: $\bm{\symsf{ABCabc}, \symscr{ABCabc}}$\\ ideal glyphs: $\symbfsf{ABCabc}, \symbfscr{ABCabc}$ \end{document} \documentclass{article} \usepackage{unicode-math} \setmathfont{NewCMMath-Regular.otf} \setmathfontface{\bm}{NewCMMath-Bold.otf} \begin{document} $\bm{ABCabc123\alpha\beta\gamma}$ \end{document}

  • Some kinds of Multiplication tables
    by Vanellope on June 3, 2026 at 5:43 am

    Recently, I came across a multiplication table in Visual Group Theory (Fig. 4.6). I tried to reproduce it, including asking AI assistants (ChatGPT, Claude), but without success. It seems that AI struggles to handle the subtle blanks in this table. I believe TikZ could produce something similar, but the result would feel unnatural. Is it possible to construct this in the form of a table? The closest result I've achieved so far is as follows. It uses the package nicematrix . \documentclass{article} \usepackage{nicematrix} \usepackage{tikz} \usepackage{amsmath} \begin{document} \begin{NiceTabular}{c*{4}{c}}[ hvlines, corners = NW, ] & $N$ & $R$ & $B$ & $RB$ \\ $N$ & $N$ & $R$ & $B$ & $RB$ \\ $R$ & $R$ & $N$ & $RB$ & $B$ \\ $B$ & $B$ & $RB$ & $N$ & $R$ \\ $RB$ & $RB$ & $B$ & $R$ & $N$ \\ \end{NiceTabular} \end{document} The book also contains more intricate tables of this kind(same elements have a same color), and I'm curious how those might be reproduced as well.

  • "How to place item numbers inside colored circles in ConTeXt LMTX?"
    by nasim ahmed on June 2, 2026 at 5:54 pm

    I am working with ConTeXt LMTX 2026 and trying to customize an itemgroup (or itemize) to display the numbers inside colored circles. I have tried several approaches, including \framed, MetaPost graphics, and \defineconversion with Unicode symbols. However, I am facing consistent issues where either the numbers don't render inside the shapes, or the itemize environment overrides the custom formatting. Here is the basic structure I am currently using that works for standard underlining:

  • Using multiple fonts and also using old-style numbers
    by Nex on June 2, 2026 at 5:43 pm

    I am currently working on a document that uses both Greek and English. For these two languages, I would like to use two different fonts, namely EB Garamond and GFS Neohellenic. I would also like to use old style numbers. For some reason, I am not able to get both options working. Here's an example of what I mean: \documentclass{article} \usepackage{fontspec} \setmainfont[Numbers=OldStyle,Language=English]{EBGaramond-Regular} \setmainfont[Script=Greek]{GFSNeohellenic-Regular} \usepackage{lipsum} \begin{document} \lipsum[1] \begin{quote} Ἥκω Διὸϲ παῖϲ τήνδε Θηβαίαν χθόνα‎\\ Διόνυϲοϲ‎, ὃν τίκτει ποθ‎' ἡ Κάδμου κόρη‎\\ Ϲεμέλη λοχευθεῖϲ‎' ἀϲτραπηφόρωι πυρί‎·\\ μορφὴν δ‎' ἀμείψαϲ ἐκ θεοῦ βροτηϲίαν‎\\ πάρειμι Δίρκηϲ νάμαθ‎' Ἱϲμηνοῦ θ‎' ὕδωρ‎.\\ (Eur. \textit{Bacch.} 1-5)\end{quote} \end{document} This gives the following output: Then, when I flip the two font options around, this happens: \documentclass{article} \usepackage{fontspec} \setmainfont[Script=Greek]{GFSNeohellenic-Regular} \setmainfont[Numbers=OldStyle,Language=English]{EBGaramond-Regular} \usepackage{lipsum} \begin{document} \lipsum[1] \begin{quote} Ἥκω Διὸϲ παῖϲ τήνδε Θηβαίαν χθόνα‎\\ Διόνυϲοϲ‎, ὃν τίκτει ποθ‎' ἡ Κάδμου κόρη‎\\ Ϲεμέλη λοχευθεῖϲ‎' ἀϲτραπηφόρωι πυρί‎·\\ μορφὴν δ‎' ἀμείψαϲ ἐκ θεοῦ βροτηϲίαν‎\\ πάρειμι Δίρκηϲ νάμαθ‎' Ἱϲμηνοῦ θ‎' ὕδωρ‎.\\ (Eur. \textit{Bacch.} 1-5)\end{quote} \end{document} When I try to use a different font, however, a different problem occurs: \documentclass{article} \usepackage{fontspec} \setmainfont[Numbers=OldStyle,Language=English]{EBGaramond-Regular} \setmainfont[Script=Greek]{New Athena Unicode} \usepackage{lipsum} \begin{document} \lipsum[1] \begin{quote} Ἥκω Διὸϲ παῖϲ τήνδε Θηβαίαν χθόνα‎\\ Διόνυϲοϲ‎, ὃν τίκτει ποθ‎' ἡ Κάδμου κόρη‎\\ Ϲεμέλη λοχευθεῖϲ‎' ἀϲτραπηφόρωι πυρί‎·\\ μορφὴν δ‎' ἀμείψαϲ ἐκ θεοῦ βροτηϲίαν‎\\ πάρειμι Δίρκηϲ νάμαθ‎' Ἱϲμηνοῦ θ‎' ὕδωρ‎.\\ (Eur. \textit{Bacch.} 1-5)\end{quote} \end{document} What happens in the last picture is almost what I would like to happen, except for the fact that the numbers are not in old style and that the Latin font is not EB Garamond... Does anyone know how to fix this?

  • Precisely Positioning a GS1 ISBN and EANBarcode
    by DDS on June 2, 2026 at 2:37 pm

    This is an extension of the question asked here: Wrapping Text Around a Barcode within Minipage and Tikzpicture Environments ; and in particular, relates to the second part of egreg's excellent answer. Consider the code: \documentclass[12pt,onecolumn,openany,final]{book} \usepackage[hmargin=0in,vmargin=0in,paperwidth=12.7525in,paperheight=9.25in]{geometry} \usepackage{GS1} \usepackage{pstricks,psvectorian,cabin} \usepackage{wrapstuff} \usepackage{pst-barcode} \psset{unit=1in} \usepackage{tikz,xcolor} \usetikzlibrary{decorations.text} \usetikzlibrary{decorations.pathmorphing} \usetikzlibrary{positioning} \newcommand{\longemdash}{{\fontfamily{lmss}\selectfont---}} %\newcommand{\emdash}{\nobreak---\nobreak\hskip0pt} \definecolor{cranberry}{RGB}{149, 7, 20} \definecolor{pylight}{RGB}{247, 235, 205} \definecolor{py}{RGB}{243, 224, 181} \definecolor{pydark}{RGB}{221, 182, 110} \definecolor{pyhighlight}{RGB}{254, 235, 204} \pgfdeclareverticalshading{parchment}{100bp}{% color(0bp)=(pydark); color(25bp)=(pydark); color(30bp)=(py); color(50bp)=(pylight); color(70bp)=(py); color(75bp)=(pydark); color(100bp)=(pydark)% } \pgfdeclareradialshading{rparchment}{\pgfpoint{0cm}{0cm}}{% color(0bp)=(pylight); color(13bp)=(pylight); color(20bp)=(py); color(40bp)=(pydark); color(60bp)=(pydark!50!black); color(100bp)=(black)% } \tikzset{ pencildraw/.style={% decorate, %decoration={% % random steps, segment length=1.1ex, amplitude=.5ex% % } }, drop shadow/.style={ blur shadow={% shadow xshift=.5pt, shadow yshift=-.5pt, shadow blur steps=9, shadow blur extra rounding=1.5pt% }, }, parchment fill/.style={ pencildraw, fill=pyhighlight, postaction={shading=parchment, opacity=1}, postaction={shading=rparchment, opacity=.7} } } \pagecolor{cranberry} \begin{document} \thispagestyle{empty} \setmainfont{Cabin} \noindent\begin{pspicture}(-6.37625,0)(6.37625,9.25) \psframe[fillcolor=cranberry,fillstyle=solid](-6.37625,0)(6.37625,9.25)% \psframe[linecolor=cranberry](-6.37625,0)(6.37625,9.25) % draws frame. \rput(-3.15,1.35){\begin{tikzpicture} \shade node[parchment fill, text width=14.15cm, text height=5.15cm, inner sep=.4, align=justify] {\hspace{12pt}\begin{minipage}{5.25in}\vspace*{-155pt} \fontsize{8.5}{9}\selectfont \begin{wrapstuff}[width=4.75cm,r,top=4] \centering {\texttt{\footnotesize ISBN 978-1-574889-72-9}\par\smallskip {\,\EANBarcode[module_height=15mm,module_width=0.4mm]{978-1-574889-72-9}}} \end{wrapstuff} \bfseries This is a sentence to be repeated many times.This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times.This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. \par \end{minipage}}; \end{tikzpicture}} \end{pspicture} \end{document} Output: I would like to position the ISBN and barcode in the lower right-hander corner of the parchment box. I have tried to manually do this without complete success. I am using here the GS1 package and am using \EANBarcode. (I did not have so much trouble doing this with the pst-barcode package, though I did have other difficulties to contend with.) QUESTION: How may I, if possible, automatically specify that the ISBN and barcode be placed in the lower right-hand corner location from the onset? If this is not possible, perhaps someone could advise an efficient way to do it manually. Before posting this question, I was able to make vertical shifts; however, I was no able to do so horizontally where the entire ISBN and barcode picture moved in unison. I compile with xelatex. Thank you.

  • latex 3 toggle a boolean variable and print its value
    by user1850133 on June 2, 2026 at 11:43 am

    First of all, how do we name a boolean variable? I tried \l_myvar_bool by similarity with what i found in an online tutorial. Why do we need \l_? For toggling the variable value i used \bool_set_inverse:N. I think here it's fine. I might have done it right. For printing I used \cs_meaning:N. It prints \char", don't know why. I don't want it. I need a better command. So I'd like to improve this piece of code. \documentclass[a4paper]{article} \setlength{\parindent}{0pt} \ExplSyntaxOn \bool_new:N \l_myvar_bool \NewDocumentCommand{\togglebool}{ }{ \bool_set_inverse:N \l_myvar_bool \cs_meaning:N \l_myvar_bool } \ExplSyntaxOff \begin{document} \togglebool \togglebool \togglebool \end{document}

  • unicode-math font character new mapping in \symsf
    by mathrm alpha on June 1, 2026 at 10:10 pm

    Why do I want to create a new mapping for unicode-math? I noticed that Unicode has sans-serif arrow keys in U+1F850 - U+1F859 range, but unicode-math and \symsf seem to only superficially include them. Also, I noticed that the NewCMMath font has additional sans-serif non-bold Greek characters, but it's not being recognized. Is it possible to create a new mapping in \symsf? \documentclass{article} \usepackage{unicode-math} \setmathfont{NewCMMath-Book.otf} \begin{document} Expected glyphs: $\symbol{"E002}\symbol{"E003}\symbol{"E007}\symbol{"E018}\symbol{"E019}\symbol{"E01A}\symbol{"1F850}\symbol{"1F851}\symbol{"1F852}\symbol{"1F853}\symbol{"E043}\symbol{"E044}\symbol{"E048}\symbol{"E059}\symbol{"E05A}\symbol{"E05B}$\\ Actual glyphs: $\symsf{\Gamma\Delta\Theta\alpha\beta\gamma\leftarrow\uparrow\rightarrow\downarrow}\symsfit{\Gamma\Delta\Theta\alpha\beta\gamma}$ \end{document}

  • How to increase the radius/bend of the voltage label arrow in CircuiTikZ?
    by ankit kumar on June 1, 2026 at 11:17 am

    I am a beginner at using LATEX. I have a question about increasing/decreasing the radius/curve/bulge of the voltage arrow. I am creating a very simple RLC series circuit along with a DC voltage source. I have attached my code below: \begin{circuitikz} \draw (0,0) to [american voltage source, invert, l=$V_s$] (0,6) to [R, l=$R_1$] ++(2.5,0) to [L, l_=$L$] ++(2.5,0) to [C, l=$C$, i=$i_C$, v^<=$v_C$] ++ (0,-6) to [short] ++(-5,0); \draw (2.5,6) to [R, l=$R_2$, *-*] ++(0,-6); \draw (0,0) node[ground, label=west:G] (GND) {}; \end{circuitikz} The output of this code is: As you can see, the text C and the arrow of v_c are sort of overlapping each other. I can easily overcome this issue by bringing the label C to the left or by bringing the voltage arrow to the left. However, I would like to know how I can manipulate the curvature of the arrow itself. I went through the CircuiTikZ User Manual, and questions such as this, this, this, and this but I was unable to solve the issue. I look forward to the opinion of the advanced LATEX users.

  • fbox/parbox works well for text, but refuses to print code listings
    by Reinhard Neuwirth on June 1, 2026 at 4:46 am

    \documentclass{article} % RN. 1 June 2026 % BRIEF DESCRIPTION: % fbox/parbox works well for text but refuses to print code listings. %====================================================================== \usepackage{listings} \usepackage{color} \definecolor{macroscolor}{rgb}{0.8,0.85,1} \begin{document} \noindent\fbox{% \parbox{\textwidth}{% fbox/parbox works well for text, but refuses to print listings. Is there a work-around? %\lstset{language=Python} %\begin{lstlisting}[basicstyle=\small,backgroundcolor=\color{macroscolor},commentstyle=\color{red}, %caption={}, %label= ] %>>>matrix = [[1, 2, 3,], [4, 5, 6,], [7, 8, 9,], ] %>>>matrix %[[1, 2, 3], [4, 5, 6], [7, 8, 9]] %>>>flat = [item for sublist in matrix for item in sublist] %>>>flat %[1, 2, 3, 4, 5, 6, 7, 8, 9] %\end{lstlisting} }% } \lstset{language=Python} \begin{lstlisting}[basicstyle=\small,backgroundcolor=\color{macroscolor},commentstyle=\color{red}, caption={}, label= ] >>>matrix = [[1, 2, 3,], [4, 5, 6,], [7, 8, 9,], ] >>>matrix [[1, 2, 3], [4, 5, 6], [7, 8, 9]] >>>flat = [item for sublist in matrix for item in sublist] >>>flat [1, 2, 3, 4, 5, 6, 7, 8, 9] \end{lstlisting} \end{document}

  • Wrapping Text Around a Barcode within Minipage and Tikzpicture Environments
    by DDS on May 31, 2026 at 11:43 pm

    Consider the code: \documentclass[12pt,onecolumn,openany,final]{book} \usepackage[hmargin=0in,vmargin=0in,paperwidth=12.7525in,paperheight=9.25in]{geometry} \usepackage{pstricks,psvectorian,cabin} \usepackage{wrapfig} \usepackage{pst-barcode} \psset{unit=1in} \usepackage{tikz,xcolor} \usetikzlibrary{decorations.text} \usetikzlibrary{decorations.pathmorphing} \usetikzlibrary{positioning} \definecolor{myred}{RGB}{149, 7, 20} \definecolor{pylight}{RGB}{247, 235, 205} \definecolor{py}{RGB}{243, 224, 181} \definecolor{pydark}{RGB}{221, 182, 110} \definecolor{pyhighlight}{RGB}{254, 235, 204} \pgfdeclareverticalshading{parchment}{100bp}{% color(0bp)=(pydark); color(25bp)=(pydark); color(30bp)=(py); color(50bp)=(pylight); color(70bp)=(py); color(75bp)=(pydark); color(100bp)=(pydark)% } \pgfdeclareradialshading{rparchment}{\pgfpoint{0cm}{0cm}}{% color(0bp)=(pylight); color(13bp)=(pylight); color(20bp)=(py); color(40bp)=(pydark); color(60bp)=(pydark!50!black); color(100bp)=(black)% } \tikzset{ pencildraw/.style={% decorate, %decoration={% % random steps, segment length=1.1ex, amplitude=.5ex% % } }, drop shadow/.style={ blur shadow={% shadow xshift=.5pt, shadow yshift=-.5pt, shadow blur steps=9, shadow blur extra rounding=1.5pt% }, }, parchment fill/.style={ pencildraw, fill=pyhighlight, postaction={shading=parchment, opacity=1}, postaction={shading=rparchment, opacity=.7} } } \pagecolor{myred} \begin{document} \thispagestyle{empty} \setmainfont{Cabin} \noindent\begin{pspicture}(-6.37625,0)(6.37625,9.25) \psframe[fillcolor=myred,fillstyle=solid](-6.37625,0)(6.37625,9.25)% \psframe[linecolor=myred](-6.37625,0)(6.37625,9.25) % draws frame. \rput(-3.15,1.35){\begin{tikzpicture} \shade node[parchment fill, text width=14.15cm, text height=5.15cm, inner sep=.4, align=justify] {\hskip 12pt \begin{minipage}{5.25in}\vspace*{-155pt} {\fontsize{8.75}{8.25}\selectfont{This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. This is a sentence to be repeated many times. \begin{wrapfigure}{r}{4.75cm} \psbarcode{0-89555-821-1}{backgroundcolor=FFFFFF borderleft=15 borderright=15 bordertop=14 borderbottom=10 textsize=8 includetext height=0.7 width=1.3125}{isbn}% \end{wrapfigure} This is a sentence to be repeated many times. This is a sentence to be repeated many times.}\par} \end{minipage}}; \end{tikzpicture}} \end{pspicture} \end{document} which produces Within the tikzpicture, I have a minipage wherein I am trying to wrap the text around the barcode which I would like to place in the bottom right-hand corner of the minipage. QUESTION: How may I modify the code which will allow me to place the barcode in the lower right-hand corner of the minipage surrounded by text above it and to the left of it? I must compile with xelatex. Thank you.

  • In my list of references, why would there be no line break within certain links but right before them leaving most of the line blank?
    by Simon on May 31, 2026 at 10:21 pm

    I am required to break the links within url{} to my references only after / or //, not after any other symbol that also might occur in a link. As can be seen in this post, this was achieved by adding \def\UrlBigBreaks{\do\/} to my code. Fixing this issue made another problem apparent though, as there would be no line break within certain links but right before them, leaving most of the line blank. How can this problem be resolved? By given guidelines, the list of references is to be formatted left-aligned without hyphenation, yet, links can include a line break after said symbols, thus replacing \raggedright globally by \RaggedRight of \usepackage{ragged2e} unfortunately isn't an option. Setting it locally by wrapping \url{} with \RaggedRight like {\RaggedRight\url{}} seems to make no difference. Potential alternative phrasing for title question: How can I locally allow hyphenation for certain passages in a text that globally doesn't allow hyphenation? Please see the following MWE and its output: \documentclass{article} \usepackage[hidelinks]{hyperref} \def\UrlBigBreaks{\do\/} %\usepackage{ragged2e} \begin{document} { \raggedright %\RaggedRight \begin{thebibliography}{} \bibitem[Smith 2026]{reference} \textsc{Smith}, John (2026) \textit{HMP} : \textit{Hippopotomonstrosesquippedaliophobia} [online]. London : The Publisher. [Retrieved on 2 June 2026] -- Available at \url{https://tex.stackexchange.com/one/two-three/four_five_six} \end{thebibliography} } \end{document} Context: This is a follow-up question to a question that I posted some time ago. I already asked this follow-up question back then in a comment to an answer to my original question, however, I have neither received a response to it nor have I found a solution to it myself in the meantime.

  • TeX Gyre Pagella font: italic parentheses are missing
    by Denis Bitouzé on May 31, 2026 at 6:23 pm

    It looks like the TeX Gyre Pagella font is missing italic parentheses: \documentclass{article} \usepackage{fontspec} \begin{document} \emph{(foo)} \setmainfont{texgyrepagella} \emph{(foo)} (\emph{foo}) \end{document} Am I missing something?

  • Why making integral sign upright works for some fonts but not others?
    by Nasser on May 31, 2026 at 1:03 am

    I found this code (bottom of page) which makes the integral sign upright, which I like more than slanted integral sign \usepackage{scalerel} \let\oldint\int \DeclareMathOperator*{\uint}{\scalerel*{\rotatebox{8}{$\textstyle\oldint$}}{\oldint}} \renewcommand{\int}{\uint} I noticed it works on some fonts but not others. Why is that? Is there a way to make either the above code works on all fonts, or a better way to make the integral sign upright for all fonts? Below I give examples where it works and examples where it does not, depending on which font is used. I use only lualatex Here is without adding the code \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \[ \int \sin x \, dx \] \end{document} When adding the above code to the preamble, here is the output Here is an example when using different font than default it no longer works \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{scalerel} \let\oldint\int \DeclareMathOperator*{\uint}{\scalerel*{\rotatebox{8}{$\textstyle\oldint$}}{\oldint}} \renewcommand{\int}{\uint} \usepackage{unicode-math} \setmainfont{STIX Two Text} \setmathfont{STIX Two Math} \begin{document} \[ \int \sin x \, dx \] \end{document} Here is an example where it worked when trying another font. First without the code \documentclass[12pt]{article} \usepackage{amsmath} \usepackage[T1]{fontenc} \usepackage[math]{anttor} \begin{document} \[ \int \sin x \, dx \] \end{document} When adding the code, it changes OK Is there a better method than the above trick which works for all fonts?

  • Automatically shift arrow heads in TikZ for piecewise defined functions or gaps
    by CampanIgnis on May 30, 2026 at 7:40 pm

    The tip of arrow heads in TikZ usually extends on exactly the specified coordinate, for example in \draw[->] (0,0) -- (1,1);. Is it possible to align the center of the end mark automatically at the specified coordinate? This is useful for plotting piecewise defined functions using * or o as arrow heads such as in https://commons.wikimedia.org/wiki/File:Discontinuity_jump.eps.png. Another way to achieve a similar result is by calculating the coordinates of the points and adding the points manually by \filldraw[fill=white] (1,0.5) circle (0.75pt);. To illustrate what I would like to have: The center of the two circles should be in the middle of the two blue lines of the MWE. It would also be great if we could define certain x-values to set marks at exactly desired points. MWE \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows} \begin{document} \begin{tikzpicture}[scale=3] \draw[blue!25,line width=4.80pt] (0,-0.25) -- ++(0,1.25) (1,-0.25) -- ++(0,1.25) ; \draw[domain=0:1, smooth, variable=\x, samples=4, *-o] plot ({\x}, {0.55}); \draw[->] (0,0) -- (1,0); \end{tikzpicture} \end{document}

  • Why does this block become longer despite \uncover?
    by Davide Masi on May 30, 2026 at 3:29 pm

    I am preparing a Beamer using Overleaf. I would like to have a long block where statements appear as I proceed. Everything except \uncover<4-> seems to work well. I mean that when "Per il principio del massimo modulo..." appears, the block becomes longer. This is the only instance where it occurs. I'll add two screens; the difference is not that easy to catch from them but it is clear from the presentation. Why is this the case? How can I solve this issue? Note: the environment {pf}, which I defined, simply creates a block entitled "Dimostrazione", that is "proof" in Italian. \documentclass{beamer} \usepackage{amsfonts,amsmath,oldgerm} \usepackage{amsthm} %\usetheme{dmpisa} \usepackage[italian]{babel} \newcommand{\testcolor}[1]{\colorbox{#1}{\textcolor{#1}{test}}~\texttt{#1}} \usefonttheme[onlymath]{serif} %\titlebackground*{assets/background} \newcommand{\hrefcol}[2]{\textcolor{cyan}{\href{#1}{#2}}} \setbeamercovered{invisible} \newenvironment{pf}{ \begin{block}{Dimostrazione} % Titolo personalizzato senza punto }{ \end{block} } \begin{document} \maketitle \begin{frame}{Il Teorema di Bloch} \begin{pf} \uncover<1->{ Siano \(k:[0,1] \to \mathbb R^+\) tale che \(k(r)=\max\{|f'(z)|: |z|=r\}\) e \(h:[0,1] \to \mathbb R^+\) tale che \(h(r)=(1-r)~k(r)\). Allora \(h\) è continua perché \(|f'|\) è uniformemente continua su \(\overline{\mathbb D}, ~ h(0)=|f'(0)|=0, ~ h(1)=0\). }\\ \uncover<2->{ Sia dunque \(r_0=\sup\{r :h(r)=1\}\). Allora \(h(r_0)=1\), \only<2-3,5->{\( r_0 < 1\) e \(h(r)<1\) se \(r>r_0\)}\only<4>{\alert{\(r_0 < 1\)} e \alert{\(h(r)<1\) se \(r>r_0\)}}, per continuità di \(h\) e definizione di \(\sup\). }\\ \uncover<3->{ Sia \(a\) tale che \(|a|=r_0\) e \(|f'(a)|=k(r_0) =\frac{h(r_0)}{1-r_0}=\frac{1}{1-r_0}\). %a che realizza il massimo Sia \(\rho_0=\frac{1-r_0}{2} \implies \only<3-5>{|f'(a)| = \frac{1}{2\rho_0}}\only<6>{\alert{|f'(a)| = \frac{1}{2\rho_0}}}\). Se \(z \in B(a, \rho_0) \implies |z|\le|z-a|+|a|<\frac{1-r_0}{2}+r_0<\frac{1+r_0}{2}.\) }\\ \uncover<4->{ Per il principio del massimo modulo: \only<4->{\(\alert<6>{|f'(z)|} \le k(\frac{1+r_0}{2})=h(\frac{1+r_0}{2})\cdot(1-\frac{1+r_0}{2})^{-1}=\alert<4>{h(\frac{1+r_0}{2})\cdot(\frac{1-r_0}{2})^{-1}\alert<6>{<}(\frac{1-r_0}{2})^{-1}}=\alert<6>{\frac{1}{\rho_0}}.\)} %dove abbiamo usato che \frac{1+r_0}{2} > r_0 \implies h(\frac{1+r_0}{2})<1 %dove abbiamo usato che \frac{1+r_0}{2} > r_0 \implies h(\frac{1+r_0}{2})<1 \uncover<6->{ Quindi \(|f'(z)-f'(a)| \le \alert{|f'(z)|+|f'(a)| < \frac{1}{\rho_0}+\frac{1}{2\rho_0}}=\frac{3}{2\rho_0}\) per ogni \(z \in B(a, \rho_0)\). } } \end{pf} \end{frame} \end{document}

  • setspace package seems to affect the vertical space between the first item of a list and its preceding text
    by glenncounty on May 30, 2026 at 5:46 am

    I want to reduce the line spacing within an item or items. In example 2, \setstretch{1} has a side effect that the vertical space between the first item and its preceding text (2A) is also narrowed (compare with 1A without the command). Strangely, the space between the last item and its following text remains the same (1B and 2B). In other words, \setstretch{1} command affects the space between the first item and its preceding text. Shouldn't it be independent from the line spacing command? (enumitem package manual on page 3 says that the space before the first item depends on \topsep + \parskip [+ \partopsep] which is the same as the space after the last item.) How can I make the two spaces (1A and 2A) same while using \setstretch{1} command? Or, is there any other valid solution for this? (Of course, I know a not-a-beautiful one that I can manually add a space.) Here is the example code: % !TeX encoding = UTF-8 % !TeX spellcheck = en_US % !TeX TS-program = lualatex % !TeX TXS-program:bibliography = txs:///biber \documentclass[letterpaper,10pt]{article} \usepackage{setspace} \usepackage{enumitem} \begin{document} \setstretch{2} I want to reduce the line spacing within an item or items. In example 2, {\ttfamily\textbackslash{setstretch\{1\}}} has a side effect that the vertical space between the first item and its preceding text (2A) is also narrowed (compare with 1A without the command). Strangely, the space between the last item and its following text remains the same (1B and 2B). In other words, {\ttfamily\textbackslash{setstretch\{1\}}} command affects the space between the first item and its preceding text. Shouldn't it be independent from the line spacing command? ({\ttfamily{enumitem}} package manual on page 3 says that the space before the first item depends on {\ttfamily{{\textbackslash}topsep + {\textbackslash}parskip [+ {\textbackslash}partopsep]}} which is the same as the space after the last item.) \noindent Example 1: \begin{itemize} \item This is a very long item, which has more than one line. This is a very long item, which has more than one line. \item This is a very long item, which has more than one line. This is a very long item, which has more than one line. \end{itemize} This is the end of example 1. \noindent Example 2 with {\ttfamily\textbackslash{setstretch\{1\}}} command: %\vspace*{0.5\baselineskip} %I don't like this. \begin{itemize} \setstretch{1} \item This is a very long item, which has more than one line. This is a very long item, which has more than one line. \item This is a very long item, which has more than one line. This is a very long item, which has more than one line. \end{itemize} This is the end of example 2. How can I make the two spaces same while using {\ttfamily\textbackslash{setstretch\{1\}}} command? Or, is there any other valid solution for this? (Of course, I know a not-a-beautiful one that I can manually add a space.) \end{document}

  • combination of enotez and xurl and hyperref not working in XeLaTeX
    by MadyYuvi on May 30, 2026 at 5:25 am

    I'm using (thanks to egreg for his advise) \documentclass{article} \usepackage{enotez} \usepackage{xurl} \usepackage{hyperref} \begin{document} This is for test\endnote{“General Election: Trump vs. Biden,” RealClear Politics, accessed June 24, 2021, \url{https://www.realclearpolitics.com/epolls/2020/president/us/general_election_trump_vs_biden-6247.html#polls}.} \printendnotes \end{document} It works fine with PDFLaTeX but doesn't with XeLaTeX, can anyone advise how to achieve this with XeLaTeX? Please Either the usage of enotez or endnotes, both are fine for me

  • Stylizing the mathematical fraction (afrc)
    by Lars Malmsteen on May 29, 2026 at 3:49 pm

    I'm trying to stylize the mathematical fraction in such a way that both the numerator and the denominator will automatically shrink to roughly fit the line height and preferably the digits will be expanded horizontally to occupy more horizontal space. Being away from the TeX for the last 2-3 years I've consulted an AI-assistent first and it suggested using the afrc (Alternative Fractions) and the font Adobe Caslon Pro which it said supported the afrc but that didn't work out and I gave up asking the AI. "Almost" MWE \documentclass{article} \usepackage{fontspec} \defaultfontfeatures{Ligatures={TeX,Common}} \setmainfont{Adobe Caslon Pro}[] % it's installed on my system \begin{document} gimme {\addfontfeatures{RawFeature=+afrc}1/10} of your money % afrc -> Alternative Fractions \end{document}

  • Left-aligned caption of a figure with subfigures (subcaption package)
    by Folco on May 29, 2026 at 2:21 pm

    I am asked to produce a document where a figure caption is placed above the figure, and left-aligned (even though it is just a one-line caption). By using the subcaption package and the \captionsetup command it works fine when the figure contains only one image. However, when the figure contains several sub-figures, the sub-captions are always left-aligned, like the main caption. I would like to have the main caption left-aligned but the sub-captions (which are very short) centred below each sub-figure. The following MWE illustrates the problem. Figure 1 is the standard. Figures 2 and 3 have the main caption left-aligned as required, but also the sub-captions come out left-aligned. \documentclass{article} \usepackage[document]{ragged2e} % For left-aligned (ragged right) text \usepackage{subcaption} \usepackage{graphicx} \usepackage{lipsum} \begin{document} \lipsum[66] \begin{figure}[h] \caption{Centered caption above figure} \label{fig:f01} \centering \begin{subfigure}{0.30\textwidth}\includegraphics[width=\textwidth]{example-image-duck}\caption{1st}\label{subfig:1st}\end{subfigure} \begin{subfigure}{0.30\textwidth}\includegraphics[width=\textwidth]{example-image-duck}\caption{2nd}\label{subfig:2nd}\end{subfigure} \begin{subfigure}{0.30\textwidth}\includegraphics[width=\textwidth]{example-image-duck}\caption{3rd}\label{subfig:3rd}\end{subfigure} \end{figure} \lipsum[66] \begin{figure}[h] \captionsetup{singlelinecheck=off,justification=raggedright} \caption{Left-aligned caption above left-aligned figure} \label{fig:f02} \begin{subfigure}{0.30\textwidth}\includegraphics[width=\textwidth]{example-image-duck}\caption{1st}\label{subfig:1stb}\end{subfigure} \begin{subfigure}{0.30\textwidth}\includegraphics[width=\textwidth]{example-image-duck}\caption{2nd}\label{subfig:2ndb}\end{subfigure} \begin{subfigure}{0.30\textwidth}\includegraphics[width=\textwidth]{example-image-duck}\caption{3rd}\label{subfig:3rdb}\end{subfigure} \end{figure} \lipsum[66] \begin{figure}[h] \captionsetup{singlelinecheck=off,justification=raggedright} \caption{Left-aligned caption above centered figure} \label{fig:f03} \centering \begin{subfigure}{0.30\textwidth}\includegraphics[width=\textwidth]{example-image-duck}\caption{1st}\label{subfig:1stc}\end{subfigure} \begin{subfigure}{0.30\textwidth}\includegraphics[width=\textwidth]{example-image-duck}\caption{2nd}\label{subfig:2ndc}\end{subfigure} \begin{subfigure}{0.30\textwidth}\includegraphics[width=\textwidth]{example-image-duck}\caption{3rd}\label{subfig:3rdc}\end{subfigure} \end{figure} \end{document} Thank you for your suggestions. Folco

  • How to make the double arrow style more like the `single arrow` in `shapes.arrows`?
    by Explorer on May 29, 2026 at 10:30 am

    What I want to replicate originally is something as below: Now my key point is the arrow of the following style, similar to the single arrow shape in shapes.arrows: \documentclass[tikz,border=5pt]{standalone} \usetikzlibrary{arrows.meta,positioning,shapes.arrows,decorations.markings} \begin{document} \begin{tikzpicture}[ node distance=2cm and 1cm, shrink/.style={shorten >=#1cm,shorten <=#1cm}, myarrow/.style={ shrink=.75,thick,-Stealth, postaction=decorate, decoration={ markings,mark=at position .5 with { \draw[shrink=0,-] (-10pt,-10pt) -- (10pt,10pt); } } }, mysinglearrow/.style={ shape=single arrow,minimum height=1.5cm,inner sep=3pt,draw,line width=1.2pt, } ] \node[draw] (betaII) {AAAAAAAA}; \node[draw] (betaI)[below left=of betaII]{BBBBBBBBB}; \node[draw] (normal)[below right=of betaII]{CCCCCCCCC}; \draw[myarrow] (betaII.west) -- (betaI.north); \draw[myarrow] (normal.north) -- (betaII.east); \draw[myarrow] (betaI) -- (normal); \node[mysinglearrow,rotate=45] at (-1.75,-1.5) {}; \end{tikzpicture} \end{document} However, that is not behave as a "arrow", but a shape. I dislike the syntax: \node[mysinglearrow,rotate=45] at (-1.75,-1.5) {}; Here below is the simplified version, based on the similar solution code here: % Source - https://tex.stackexchange.com/a/662285 \documentclass[tikz,margin=1cm]{standalone} \usetikzlibrary{arrows.meta} \tikzset{ doubleTriangle/.style args={#1 and #2 colored by #3 and #4}{ -Triangle, line width=#1,#3, postaction={ draw, -Triangle,#4, line width=#2, /utils/exec=\pgfmathsetlengthmacro{\doubleTriangleShortenStart}{((#1)-(#2))/2}, /utils/exec=\pgfmathsetlengthmacro{\doubleTriangleShortenEnd}{1.2*(sqrt(3))*((#1)-(#2))}, shorten <=\doubleTriangleShortenStart, shorten >=\doubleTriangleShortenEnd, }, }, } \begin{document} \begin{tikzpicture} \node[draw,below left] at (0,0) {A}; \node[draw,above right] at (5,5) {B}; \draw[doubleTriangle=1cm and 0.7cm colored by black and white] (0,0) -- (5,5); % \draw[doubleTriangle=1cm and 0.7cm colored by black and white,shorten >=.5cm,shorten <=.5cm] (0,0) -- (5,5); \end{tikzpicture} \end{document} which gives: Noted that the arrow's width is not the same. What I was after as an arrow style, is something as below: Any suggestions on how to make more elegant syntax of this arrow style?

  • Why does tex4ht give "! LaTeX Error: There's no line here to end", but lualatex does not?
    by Nasser on May 29, 2026 at 7:48 am

    This file compiles OK with lualatex using TeX Live 2026 on Linux: \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \begin{minipage}{\textwidth}\raggedright \textbf{Problem number} : 1\\ \textbf{Problem} : $$\begin{gathered}\begin{aligned} y^{\prime}&=2 x +1\\ y \left(0\right) &= 3\\ \end{aligned} \end{gathered}$$\\ \textbf{Date solved} : \verb|Friday, May 29, 2026 at 12:37:02 AM| \\ \end{minipage} \end{document} And gives PDF But when doing make4ht -ulm default -a debug 5.tex "mathjax,htm" it gives error (/usr/local/texlive/2026/texmf-dist/tex/generic/tex4ht/html5.4ht)) (/usr/local/texlive/2026/texmf-dist/tex/latex/l3backend/l3backend-dvips.def) (./5.aux) ! LaTeX Error: There's no line here to end. Should it not also compile clean using tex4ht? I removed the \\ after the \end{gathered}$$\\ and now tex4ht is happy and does not give error and also PDF output remained the same as before. So I will remove this \\ from my code now. But the question is this: Why does tex4ht complain about \end{gathered}$$\\, but lualatex does not? >which make4ht /usr/local/texlive/2026/bin/x86_64-linux/make4ht