• How to type \symfrak{\imath} glyphs?
    by mathrm alpha on June 5, 2026 at 2:01 pm

    While browsing NewCMMath on FontForge, I suddenly saw dotless i/j in other math fonts "example: \symbb, \symscr, \symfrak", but there was no Unicode standard. Typing unicode-math in LaTeX didn't produce any results. \documentclass{article} \usepackage{unicode-math} \setmathfont{NewCMMath-Book.otf} \begin{document} $\symbb{\imath\jmath}\symscr{\imath\jmath}\symfrak{\imath\jmath}$ \end{document}

  • How to get this angle symbol? [duplicate]
    by BlueNight on June 5, 2026 at 11:59 am

    I would like to reproduce the angle symbol in the picture below, but I don't know how. I found this similar question (How can I do this angle symbol?), but the symbol asked there is somewhat different than the one I want (notice that the arc in that question is way bigger than the one in my picture). The answer provided there produces that symbol, but I don't see a way to modify that code so that it would produce something closer to my symbol.

  • Advice for writing in LaTeX-like environment offline for personal purposes
    by Jakobian on June 5, 2026 at 8:22 am

    I am a Windows user, and I'm looking for an offline option to write math formulas like in LaTeX or MathJax. In the past I used to use overleaf and TeXstudio, but it wasn't ideal, and with overleaf pushing AI onto users and what not, I don't really want to use that site. And TeXstudio stopped working on my pc for some reason. I want something that would be available to me offline, something like a simple text editor like how it's like on Math.SE with MathJax, almost like notepad, but something for which I could still add math formulas in LaTeX (or TeX? I honestly don't know the difference). I also feel like a lot of support for such thing is for Linux. I don't want to switch to Linux, but I might consider it. Any recommendations? The goal is not to write articles or documents. I want to write notes or maybe even something less than that. Anything that allows me just to "wrap things up" for me to see in a nicely formatted way so that I can have my thoughts on screen, perhaps.

  • How to make mathrm effect only to the Upper case letter?
    by Sunshine on June 5, 2026 at 6:43 am

    I need to set in the latex such that only the Upper case letter is the mathrm font in the math environment. Is there a setting in the preamble that allows all uppercase letters to be in mathrm font throughout the entire mathematical context in a document? $\mathrm{3x^2 \in R \subset Q}$

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

  • How to prevent underlines getting colours when the URL contains a line break?
    by niru on June 4, 2026 at 12:34 pm

    Have a look at the following example: \documentclass{article} \usepackage{lua-ul} \usepackage{xurl} \usepackage[colorlinks]{hyperref} \begin{document} \twocolumn \noindent \underLine{% \url{https://en.wikipedia.org/wiki/Leslie_Lamport}% } \end{document} It produces: The underline on the second line gets the colour which I don't want. How to suppress it?

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

  • LyX 2.5: What's this weird blue number "2" in a circle that seems to randomly appear in on the left margin? How to get rid of it?
    by user182601 on June 4, 2026 at 9:10 am

    I just downloaded LyX 2.5 (I've previously used 2.4 and earlier versions since c. 2010). Sometimes a weird blue number 2 in a circle ② appears on the left margin. What is this? (It seems to appear more often when I use ERT.) I can get rid of it by deleting the corresponding line of text. But how do I permanently stop this from appearing without having to delete the line and retype it? And if this blue 2 is there, sometimes it moves to a new line that I'm typing at. And, so far in my about 1 hour of use of LyX 2.5, it's always "2" and never any other number. I had never seen this before in earlier versions of LyX. I can't find anything about this from skimming through the "What is new in LyX 2.5?" page. If it matters, I'm using: LyX version: Version 2.5.1 (Sunday, April 12, 2026) (64-bit installer) OS version: Microsoft Windows 11 Home Version 10.0.26200 Build 26200

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

  • Postnotes, \postnotesection and correct TOC-placement
    by Kubo on June 4, 2026 at 6:56 am

    I’m using the KOMA-script-class scrbook with the postnotes-package. Placing the postnotes and employing the correct \postnotesection turns out to be a bit trickier than I thought. The manual clearly states: »[P]rominently a \postnotesection is skipped at \printpostnotes if it contains no notes. In other words, if two (or more) calls of \postnotesection occur in immediate sequence, with no \postnote in between, the latter call takes precedence over the former, instead of being accumulated in the queue.« (p. 8) Question: Can I force such an entry anyway for the intended position? MWE: \documentclass{scrbook} \usepackage{postnotes} \counterwithin*{postnote}{part} \usepackage{hyperref} \begin{document} \tableofcontents \addpart{First Part} \postnotesection{\addsec{Notes to Part I}} \addchap{First chapter of the First Part} Foo.\postnote{Foo note.} Bar.\postnote{Bar note.} \addchap{Second chapter of the First Part} Foo.\postnote{Foo note.} Bar.\postnote{Bar note.} \addpart{Second Part} \postnotesection{\addsec{Notes to Part II}} \addchap{First chapter of the Second Part} \postnotesection{\subsection*{Notes to Chapter II.1}} Foo.\postnote{Foo note.} Bar.\postnote{Bar note.} \addchap{Second chapter of the Second Part} \postnotesection{\subsection*{Notes to Chapter II.2}} Foo.\postnote{Foo note.} Bar.\postnote{Bar note.} \addpart{Third Part} \postnotesection{\addsec{Notes to Part III}} Foo.\postnote{Foo note.} Bar.\postnote{Bar note.} \addchap{First chapter of the Third Part} \postnotesection{\subsection*{Notes to Chapter III.1}} Foo.\postnote{Foo note.} Bar.\postnote{Bar note.} \addchap{Second chapter of the Third Part} \postnotesection{\subsection*{Notes to Chapter III.2}} Foo.\postnote{Foo note.} Bar.\postnote{Bar note.} \printpostnotes \end{document} Problem 1: »Notes to Part II« is swallowed, as there are no postnotes before the first \addchap comes. See: Problem 2: The necessary entry in the ToC is also swallowed, for the same reason. See: Background to the problem: The book intended shall be divided in three parts. Content-wise, the first part is a long introduction, and the third part is a long afterword with about 100 postnotes each. The second part, however, contains many smaller chapters with separate postnote-numbering. Some of these chapters in the second part don’t contain any postnotes at all, some quite a lot. I would like a reader flicking through the postnotes to receive a clear hint that the chapter-postnotes belong to Part II – which is why I want to force it. The second most important cue (first being the running page numbers in the headers) shall be the section-wise placement in the Toc.

  • LyX: What should I do to support English, Russian, *and* Old Russian (in a single document)?
    by user182601 on June 4, 2026 at 5:05 am

    My question is similar to this: Writing in English and Russian with Lyx But I have English, Russian, and Old Russian. Example of a LyX file with only Old Russian and what happens when I try to hit Ctrl+R: As per the answer at the above linked post, I tried highlighting the text and setting the language to "Russian": But when I hit Ctrl+R, I still get the exact same error as in the first image above. Next, I also tried highlighting the text and setting the language to "Russian (Petrine orthography)": But again, I still get the exact same error as in the first image above. Question: What should I do to support English, Russian, and Old Russian (in a single document)? If it matters, I'm using: LyX version: Version 2.5.1 (Sunday, April 12, 2026) (64-bit installer) OS version: Microsoft Windows 11 Home Version 10.0.26200 Build 26200 Example LyX file

  • XeLaTeX fallback non built-in LM/CM other unicode glyphs to other font
    by mathrm alpha on June 4, 2026 at 4:58 am

    If I type an example in XeLaTeX using \symbol{"20000}, can I fall back to GNU Unifont or other supported example Jigmo2.otf Unicode fonts? This is because LM/CM itself does not have a built-in U+20000 glyph. It doesn't have to be U+20000, as long as it can fallback glyphs to other fonts like U+10000, that's fine. GNU Unifont: https://unifoundry.com/unifont/index.html Jigmo: https://kamichikoichi.github.io/jigmo/

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

  • Texmaker to bi-directional editor
    by ghawt azaman on June 3, 2026 at 9:49 pm

    When I write :\command{arg1}{arg2}{arg3} beside an Arabic text, the Texmaker editor reverses all and gives :{arg3}{arg2}{arg1}command\. How can I setup Texmaker to a bi-directinal editor ?

  • Did something change with the lineno package since Aug 2024 or perhaps I was getting away with an error back then?
    by Gary on June 3, 2026 at 7:19 pm

    This is not a MWE at this point but I'd like to first ask if anything may have changed since August 2024 or so that might make this package and command no longer work as they did at that time. I have the PDF document on my desk that the .tex file and LaTeX (using Kile) produced at that time; but, it will not generate again because of errors like main.tex:102:too deeply nested.\begin{quotationnbr} every where quotationnbr is used. Thank you. In the preamble: \usepackage{lineno} \renewcommand{\linenumberfont}{\fontsize{8}{8}\selectfont \ttfamily\color{mygray}} \newenvironment{quotationnbr} {\list{}{\listparindent 1.5em% \itemindent \listparindent \rightmargin 0em \leftmargin 0em \parsep 0pt % \z@ \@plus\p@ }% \linenumbersep=1em \item\relax} {\endlist} \AtBeginEnvironment{quotationnbr}{ \vspace{-0.2\baselineskip} \begin{linenumbers} } \AtEndEnvironment{quotationnbr}{\end{linenumbers} \vspace{0.5\baselineskip}} In the document files (which here is line 102 for that specific error): \begin{quotationnbr} ``\textsc{It} is remarked by some, that ... '' \vspace{1ex} \leftskip 15em I am, \&c. \vspace{-0.5\baselineskip} \flushright \textsc{Barbe de Marbois.} \end{quotationnbr} A sample of what was generated before, starting at line 102.

  • How to create decorative page numbers using MetaPost in ConTeXt?
    by nasim ahmed on June 3, 2026 at 4:54 pm

    I am developing a document in ConTeXt and I would like to create custom, decorative page numbers using MetaPost. My goal is to design intricate graphics (e.g., shapes or frames) that incorporate the current page number, and to apply this design automatically as the page number in the footer or header of my document. Could you please guide me on: How to define a MetaPost graphic that acts as a page number in ConTeXt? How to pass the current \currentpage value to a MetaPost buffer or a standalone MetaPost module within the header/footer setup? What is the recommended approach in ConTeXt to handle this synchronization between the page counter and the MetaPost rendering? I am working with LMTX/MkIV. Any advice or a minimal working example would be highly appreciated. Thanks in advance!

  • Conditionals not returning correct output
    by AnyAD on June 3, 2026 at 4:32 pm

    Can this code be fixed so I can choose between answers and solutions? It also produces blank pages (that don't go away when I remove newpage command after Qs and As). \newcounter{sheetnumber} \newenvironment{problemsheet}{ \stepcounter{sheetnumber} \bigskip \centerline{\bf \Large \ifQ {Sheet} \else \ifA {Answers for sheet} \fi \fi \arabic{sheetnumber}: \ \sheetname} \addcontentsline{toc}{section}{ \ifQ {Sheet} \else \ifA {Answers for sheet} \fi \fi \arabic{sheetnumber}: \ \sheetname} %% Number questions as sheetnumber.questionnumber eg 1.1, 1.2, ... \begin{enumerate}[label=\arabic{sheetnumber}.\arabic*.] %% Uncomment lines below to continue question numbering across sheets % \ifnum\value{sheetnumber}=1 % % First sheet - start numbering questions from 1 % \begin{enumerate}[series=questions] % \else % % Subsequent sheet - continue numbering questions from previous sheet % \begin{enumerate}[resume=questions] % \fi }{\end{enumerate}\ifQ \newpage \else \ifA \newpage \fi \fi} \long\def\ignore#1\endignore{} \long\def\ignoreQ#1\endquestion{\fi} \long\def\ignoreS#1\endsolution{\fi} \long\def\ignoreA#1\endanswer{\fi} \long\def\ignoreT#1\par{\fi} \def\beginquestion#1{\ifQ\item {\sl #1.}\else\ignoreQ\fi} \def\endquestion{\par\goodbreak} \def\beginsolution{\ifS\ifQ\addtocounter{enumi}{-1}\else\fi\item {\sl Solution.\/\ }\else\ignoreS\fi} \def\endsolution{\goodbreak} \def\beginanswer{\ifA{{ \ifQ \addtocounter{enumi}{-1} %\else \ifS \addtocounter{enumi}{-1} \fi\fi} \item {\sl Answer:\/\ } \else \ifS \addtocounter{enumi}{-1} \fi\fi} \item {\noindent } } \else \ignoreA \fi} \def\endanswer{} \newcommand{\textfixed}[1]{\ifT \item[#1] \else\ignoreT\fi} \newcommand{\arrowvec}[1]{\ensuremath{\overrightarrow{\mathrm{#1}}}} %%%%%% ************

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

  • Using forest package, how do I code the following two trees?
    by Nix on June 2, 2026 at 6:59 pm

    I need to create a flowchart of my dissertation and it seems the forest package suits well. Though, I manage to go down the first fork, I cannot create in the same loop the inverted v. There is no math in this tree, only text. Can someone please help? Thank you. \ex. \begin{forest} [\footnotesize{Systemic Input Variable:}\\ \footnotesize{International Anarchy \& Geopolitical Rivalry}\\ \footnotesize{(Waltz, 2001; Mearsheimer, 2001)} [\footnotesize{Independent Technological Shock:}\\ \footnotesize{Hypersonic Proliferation (Mach 5+) \& Cross-Domain Swarms $(\lambda_{swarm})$}\\ \footnotesize{(Acton, 2013; Speier et al., 2017; Wong et al., 2020)} [ \footnotesize{Kinematic / Spatial Boundary:}\\ \footnotesize{Warning Compression (<180s)}\\ \footnotesize{Sensor Horizon Depletion $(d_LR)$}\\ \footnotesize{Plasma Sheath Ionization Blackouts}\\ \footnotesize{(Skolnik, 2001; Yue et al., 2024)} ] [\footnotesize{Economic / Resource Boundary:}\\ \footnotesize{Asymmetric Cost Deficit $(C_ex)$}\\ \footnotesize{Imported Platform Procurement Trap}\\ \footnotesize{Fiscal \& Strategic Exhaustion Over Time}\\ \footnotesize{(Sandler \& Hartley, 1995; Papasotiriou, 2001)}] ]] \end{forest}

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

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

  • How to get the meta information of a tex file into the pdf meta information?
    by quarague on June 2, 2026 at 11:34 am

    I use xetex to create pdf documents out of LaTeX files. In the interest of general accessibility I would like the pdf file to contain some meta information about the file like the title or the language of the document. This is fairly similar to this question but this is from 2011. Additionally I don't want to manually set the title or the language for the pdf metadata, the LaTeX document already knows what the title is (specified by \title) and what language the document is written in (specified by \setdefaultlanguage) so the pdf meta information should just take this information from the LaTeX directly. The linked question has a way to do this for the title but that was written in 2016 and the comments below show that this feature was already being discontinued back then. So how can I tell xetex to fill as much meta information of the pdf document with the meta information the LaTeX document already has?

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

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