• babel package breaks the cleveref package : Missing \endscname inserted [duplicate]
    by Drazer on August 18, 2026 at 4:25 pm

    Recently, I was editing a file that used by default english. I wanted to change the default language to french using \usepackage[french]{babel}. Since then, I reduced to a (almost) MWE showing that whenever I cross ref a theoremenv, it breaks. Note that a simple \ref works. It works if I compiled with lualatex, but with pdflatex, it complained that: ! Missing \endcsname inserted. <to be read again> \penalty l.22 \cref{thm:test} ? Here is the code : \documentclass[11pt]{scrbook} \usepackage[T1]{fontenc} \usepackage[french]{babel} %when this is put in comments, cref works fine \usepackage{amsmath} \usepackage{hyperref} \usepackage[nameinlink]{cleveref} \usepackage{tikz} \usepackage[most]{tcolorbox} \newtheorem{theoremenv}{Theorem} \begin{document} This is a test \begin{theoremenv}{} \label{thm:test} This is a theorem. \end{theoremenv} \cref{thm:test} % \ref{thm:test} %This seems to work fine using babel \end{document}

  • Using package poetry, no list of poems created
    by Yves on August 18, 2026 at 2:59 pm

    I a continuing my efforts of creating a book for a friend who wishes to compile her poems. I had initially selected the poetrytex package for its reasonable capabilities combined with a reasonable simplicity, and in particular the convenience of creating a list of poems. Out of curiosity, I am now experimenting with the poetry package, that seems to offer additional convenience in locating the poems on the page. However, to my surprise, the \listofpoems command produces nothing. I have been wondering about a conflict with other packages, but after removing almost all packages, as in the MWE, no change. There is some kind of warning in the poetry manual, stating that the command leaves the details up to the user... Any help appreciated. \documentclass[12pt]{book} \usepackage{poetry} \poemlinenumsfalse \title{Test of Poetry package} \author{Someone} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} \maketitle \listofpoems %produces nothing \poemgroup \poemgroupheading {Miscellaneous poets} {} \titlepoem {Crossing the Bar}{Alfred, Lord Tennyson (1809\textendash 1892)} \begin{poem} Sunset and evening star, \\ And one clear call for me! \\ And may there be no moaning of the bar, \\ When I put out to sea, \\- \end{poem} \titlepoem{Untitled}{Anonymous} \begin{poem} O captain! my captain! The fearful trip is done; \\ The ship has weather'd every rack, the prize we sought is won;\\- \end{poem} \titlepoem{Untitled}{Anonymous} \begin{poem} Let me not to the marriage of true minds \\ \hin Admit impediments. Love is not love \\ Which alters when it alteration finds, \\ \hin Or bends with the remover to remove: \\! O, no! it is an ever-fixed mark, \\ \hin That looks on tempests and is never shaken; \\ It is the star to every wandering bark, \\ \hin Whose worth's unknown, although his height be taken. \\- \end{poem} \titlepoem{Untitled}{Anonymous} \begin{poem} O captain! my captain! The fearful trip is done; \\ The ship has weather'd every rack, the prize we sought is won;\\- \end{poem} \endpoemgroup \end{document}

  • Conflict with `luatexja` and `\DocumentMetadata{tagging=on}`?
    by Explorer on August 18, 2026 at 7:52 am

    Here below is the code, if I load luatexja, it complains: \DocumentMetadata{tagging=on} \documentclass{article} \usepackage{luatexja}% \begin{document} Text with \verb!\item! inline. \end{document} ! Package tagpdf Error: there is no open structure on the stack Type <return> to continue. ... l.6 \end{document} ? Is this the tagging side or the luatexja side should be reported to? Or any fix of this?

  • How to create a dynamic fan in TikZ in LaTeX?
    by mathrm alpha on August 18, 2026 at 5:49 am

    Although I've created a basic fan shape in TikZ, how do I make the center blade of the TikZ fan dynamic rotate? the value you enter determines exactly how fast the TikZ fan I created will spin. \documentclass{article} \usepackage{tikz} \usepackage[paperwidth=9cm, paperheight=9cm, margin=1.5cm]{geometry} \begin{document} \pagestyle{empty} \begin{figure}[htbp] \begin{tikzpicture} \filldraw[color=yellow!60, fill=orange!40, very thick](0,0) circle (3); \filldraw[color=yellow!60, fill=red!0, very thick](0,0) circle (2.5); \begin{scope}[rotate=0] \draw [line width=0.3cm] (0,0) -- (2,2); \draw [line width=0.3cm] (0,0) -- (0,3); \draw [line width=0.3cm] (0,0) -- (-2,2); \draw [line width=0.3cm] (0,0) -- (2,-2); \draw [line width=0.3cm] (0,0) -- (3,0); \draw [line width=0.3cm] (0,0) -- (-3,0); \draw [line width=0.3cm] (0,0) -- (0,-3); \draw [line width=0.3cm] (0,0) -- (-2,-2); \filldraw[orange] (0,0) circle (30pt) node[anchor=west]{}; \end{scope} \end{tikzpicture} \end{figure} \end{document}

  • longtable is breaking \fancyhead [duplicate]
    by ali bab613 on August 17, 2026 at 10:34 pm

    I have this MWE: \documentclass[12pt,a4paper]{report} \usepackage{lipsum} \usepackage[twoside]{fancyhdr} \pagestyle{fancy} \fancyhf{} \usepackage{longtable,multicol,multirow} \fancyfoot[C]{\thepage} \fancyhead[RO,LE]{\footnotesize\nouppercase{\leftmark}} \renewcommand{\headrulewidth}{0pt} \setlength{\headheight}{10pt} \usepackage[title]{appendix} \usepackage{longtable} \usepackage{array} \newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}} \usepackage{atbegshi} \AtBeginShipout{\typeout{PAGE \thepage: leftmark=[\leftmark] rightmark=[\rightmark]}} \begin{document} \pagestyle{fancy} \chapter*{Introduction} \markboth{Introduction}{Introduction} \lipsum[] \chapter{This is Chapter 1} \markright{Chapter \thechapter} \lipsum[] \chapter{This is Chapter 2} \markright{Chapter \thechapter} \lipsum[] \newpage \begin{appendices} \chapter{Addendum to Introduction} \lipsum[] \chapter{Addendum to Chapter 1} \begin{longtable}{|C{2.5cm}|C{3cm}|C{5cm}|C{4cm}|} \caption{Tester} \\ \hline Col4 & Col2 & Col3 & Col4 \\ \hline \endfirsthead \multicolumn{4}{c}{\tablename\ \thetable\ -- continued from previous page} \\ \hline Col4 & Col2 & Col3 & Col4 \\ \hline \endhead \hline \multicolumn{4}{r}{\textit{continued on next page}} \\ \endfoot \hline \endlastfoot% Col4 & Col2 & Col3 & Col4 \tabularnewline \cline{4-4} Col4 & Col2 & Col3 & Col4 \tabularnewline \cline{4-4} Col4 & Col2 & Col3 & Col4 \tabularnewline \cline{4-4} Col4 & Col2 & Col3 & Col4 \tabularnewline \cline{4-4} Col4 & Col2 & Col3 & Col4 \tabularnewline \cline{4-4} Col4 & Col2 & Col3 & Col4 \tabularnewline \cline{4-4} Col4 & Col2 & Col3 & Col4 \tabularnewline \cline{4-4} Col4 & Col2 & Col3 & Col4 \tabularnewline \cline{4-4} Col4 & Col2 & Col3 & Col4 \tabularnewline \cline{4-4} Col4 & Col2 & Col3 & Col4 \tabularnewline \cline{4-4} Col4 & Col2 & Col3 & Col4 \tabularnewline \cline{4-4} Col4 & Col2 & Col3 & Col4 \tabularnewline \cline{4-4} Col4 & Col2 & Col3 & Col4 \tabularnewline \cline{4-4} Col4 & Col2 & Col3 & Col4 \tabularnewline \cline{4-4} Col4 & Col2 & Col3 & Col4 \tabularnewline \cline{4-4} Col4 & Col2 & Col3 & Col4 \tabularnewline \cline{4-4} Col4 & Col2 & Col3 & Col4 \tabularnewline \cline{4-4} Col4 & Col2 & Col3 & Col4 \tabularnewline \cline{4-4} Col4 & Col2 & Col3 & Col4 \tabularnewline \cline{4-4} Col4 & Col2 & Col3 & Col4 \tabularnewline \cline{4-4} Col4 & Col2 & Col3 & Col4 \tabularnewline \cline{4-4} Col4 & Col2 & Col3 & Col4 \tabularnewline \cline{4-4} Col4 & Col2 & Col3 & Col4 \tabularnewline \cline{4-4} Col4 & Col2 & Col3 & Col4 \tabularnewline \cline{4-4} Col4 & Col2 & Col3 & Col4 \tabularnewline \cline{4-4} \end{longtable} \end{appendices} \end{document} I apologize for the table, but it is precisely a longtable that's breaking my document. As you can see, the headers are correct throughout the document (explicitly stated as Introduction in the Introduction, and then automatically rendered for chapters and appendices because they're numbered). The headers, however, break for Appendix B. Even if I shoehorn \chapter{Addendum to Chapter 1} \fancyhead{} \markright{Appendix \thechapter} \begin{longtable}{|C{2.5cm}|C{3cm}|C{5cm}|C{4cm}|} to clear out the header, it remains stuck on Appendix A. Removing the longtable removes this issue. To be clear, for my actual document, I need the somewhat janky ability to add marks manually, because as stated, in the Introduction I want to manually insert Introduction (instead of Chapter 0), and so forth. A screenshot of the broken header is attached here: EDIT John Kormylo in the comments pointed out that, for them, my MWE compiled normally. I thought I'd add some detail, that might make a difference: I'm using Overleaf, TeX Live 2025, and compiling with LuaLaTeX. If I switch to pdfLaTeX (also on Overleaf), the issue persists. I added the following two lines of code into my MWE: \usepackage{atbegshi} \AtBeginShipout{\typeout{PAGE \thepage: leftmark=[\leftmark] rightmark=[\rightmark]}} Looking at the logs, I can see a mismatch: Appendix B. Overfull \hbox (72.56491pt too wide) in alignment at lines 46--51 [][][][] [] Overfull \hbox (72.56491pt too wide) in alignment at lines 51--57 [][][][] [] Overfull \hbox (72.56491pt too wide) in alignment at lines 57--61 [][][][] [] Overfull \hbox (72.56491pt too wide) in alignment at lines 61--64 [][][][] [] Overfull \hbox (72.56491pt too wide) in alignment at lines 64--118 [][][][] [] PAGE 9: leftmark=[\MakeUppercase []{Appendix\ A. \ Addendum to Introduction}] rightmark=[] [9 Non-PDF special ignored!] You can see that even though Appendix B began, the log still registers it as Appendix A.

  • Unicode-math: \symscr{} works on lowercase latin letters for some OpenType fonts but not all
    by Daniel Flipo on August 17, 2026 at 4:47 pm

    XCharter-Math provides lowercase script letters e,g,o in the range U+2100 to U+2140, they can be accessed by their Unicode name but not as \symscr{e} etc. For other fonts, f.i. NewComputerModern the commands \symscr{e}… work as expected. \symscr{e} also works with XCharter-Math when used with lua-unicode-math. Test file to be compiled with LuaLaTeX: \documentclass{article} \newcount\test \test=0 % 0, 1 or 2 \ifcase\test % This fails: \symscr{} prints italic instead of cursive \usepackage{unicode-math} \setmathfont{XCharter-Math.otf} \or % This works as expected: \usepackage{unicode-math} \setmathfont{NewCMMath-Book.otf} \or % This works as expected too with lua-unicode-math : \usepackage{lum-xcharter} \fi \begin{document} %\showoutput \(\mscre \mscrg \mscro, \symscr{ego}, \symscr{EGO}\)\quad \ifcase\test xcharter \or NCM \or lum-xcharter\fi \end{document} And the outputs: I guess there is something wrong with my font XCharter-Math, hints to fix this bug would be greatly appreciated. Edit: Thanks to @DavidCarlisle who pointed out the explanation found in file um-code-sym-commands.dtx: unicode-math checks if the first character of a given alphabet is available; if it is not, it tries to replace the whole alphabet by another one, regardless whether some characters are available. This looks sub-optimal to me but fully explains why the \symcr{} command behaves differently with XCharter-Math and NCM. I will (have to) add a \mscra character (U+1D4B6) to XCharter-Math…

  • biber from TeXLive cannot run
    by murray on August 17, 2026 at 4:20 pm

    Under macOS, after updating TeXLive packages that, among other things updated biber to the August 14, 2026, version, the biber binary will not run. How fix? [~] % which biber /Library/TeX/texbin/biber [~] % biber --version Can't load '/var/folders/g6/s0wj67096d1dssm42vzm8g4c0000gn/T/par-6d7572726179/cache-ef3dd1ed22f781987901e25bacfd01179fba172f/inc/lib/auto/Unicode/LineBreak/LineBreak.bundle' for module Unicode::LineBreak: dlopen(/var/folders/g6/s0wj67096d1dssm42vzm8g4c0000gn/T/par-6d7572726179/cache-ef3dd1ed22f781987901e25bacfd01179fba172f/inc/lib/auto/Unicode/LineBreak/LineBreak.bundle, 0x0001): Library not loaded: /opt/homebrew/opt/libthai/lib/libthai.0.dylib Referenced from: <3012B9CE-F560-3F5A-B30D-2A829472CEEC> /private/var/folders/g6/s0wj67096d1dssm42vzm8g4c0000gn/T/par-6d7572726179/cache-ef3dd1ed22f781987901e25bacfd01179fba172f/inc/lib/auto/Unicode/LineBreak/LineBreak.bundle Reason: tried: '/var/folders/g6/s0wj67096d1dssm42vzm8g4c0000gn/T//par-6d7572726179/cache-ef3dd1ed22f781987901e25bacfd01179fba172f/libthai.0.dylib' (no such file), '/opt/homebrew/opt/libthai/lib/libthai.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/libthai/lib/libthai.0.dylib' (no such file), '/opt/homebrew/opt/libthai/lib/libthai.0.dylib' (no such file) at /loader/HASH(0x737096a50)/DynaLoader.pm line 210. at /loader/HASH(0x7370ff990)/PAR/Heavy.pm line 104. Compilation failed in require at /var/folders/g6/s0wj67096d1dssm42vzm8g4c0000gn/T/par-6d7572726179/cache-ef3dd1ed22f781987901e25bacfd01179fba172f/inc/lib/Unicode/GCString.pm line 24. BEGIN failed--compilation aborted at /var/folders/g6/s0wj67096d1dssm42vzm8g4c0000gn/T/par-6d7572726179/cache-ef3dd1ed22f781987901e25bacfd01179fba172f/inc/lib/Unicode/GCString.pm line 24. Compilation failed in require at /var/folders/g6/s0wj67096d1dssm42vzm8g4c0000gn/T/par-6d7572726179/cache-ef3dd1ed22f781987901e25bacfd01179fba172f/inc/lib/Biber/Utils.pm line 32. BEGIN failed--compilation aborted at /var/folders/g6/s0wj67096d1dssm42vzm8g4c0000gn/T/par-6d7572726179/cache-ef3dd1ed22f781987901e25bacfd01179fba172f/inc/lib/Biber/Utils.pm line 32. Compilation failed in require at /var/folders/g6/s0wj67096d1dssm42vzm8g4c0000gn/T/par-6d7572726179/cache-ef3dd1ed22f781987901e25bacfd01179fba172f/inc/lib/Biber/Internals.pm line 8. BEGIN failed--compilation aborted at /var/folders/g6/s0wj67096d1dssm42vzm8g4c0000gn/T/par-6d7572726179/cache-ef3dd1ed22f781987901e25bacfd01179fba172f/inc/lib/Biber/Internals.pm line 8. Compilation failed in require at /loader/HASH(0x7370fd6d8)/parent.pm line 17. BEGIN failed--compilation aborted at /var/folders/g6/s0wj67096d1dssm42vzm8g4c0000gn/T/par-6d7572726179/cache-ef3dd1ed22f781987901e25bacfd01179fba172f/inc/lib/Biber.pm line 5. Compilation failed in require at script/biber-darwin line 21. BEGIN failed--compilation aborted at script/biber-darwin line 21. [~] % biber --cache Can't load '/var/folders/g6/s0wj67096d1dssm42vzm8g4c0000gn/T/par-6d7572726179/cache-ef3dd1ed22f781987901e25bacfd01179fba172f/inc/lib/auto/Unicode/LineBreak/LineBreak.bundle' for module Unicode::LineBreak: dlopen(/var/folders/g6/s0wj67096d1dssm42vzm8g4c0000gn/T/par-6d7572726179/cache-ef3dd1ed22f781987901e25bacfd01179fba172f/inc/lib/auto/Unicode/LineBreak/LineBreak.bundle, 0x0001): Library not loaded: /opt/homebrew/opt/libthai/lib/libthai.0.dylib Referenced from: <3012B9CE-F560-3F5A-B30D-2A829472CEEC> /private/var/folders/g6/s0wj67096d1dssm42vzm8g4c0000gn/T/par-6d7572726179/cache-ef3dd1ed22f781987901e25bacfd01179fba172f/inc/lib/auto/Unicode/LineBreak/LineBreak.bundle Reason: tried: '/var/folders/g6/s0wj67096d1dssm42vzm8g4c0000gn/T//par-6d7572726179/cache-ef3dd1ed22f781987901e25bacfd01179fba172f/libthai.0.dylib' (no such file), '/opt/homebrew/opt/libthai/lib/libthai.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/libthai/lib/libthai.0.dylib' (no such file), '/opt/homebrew/opt/libthai/lib/libthai.0.dylib' (no such file) at /loader/HASH(0xb730fca50)/DynaLoader.pm line 210. at /loader/HASH(0xb731d1990)/PAR/Heavy.pm line 104. Compilation failed in require at /var/folders/g6/s0wj67096d1dssm42vzm8g4c0000gn/T/par-6d7572726179/cache-ef3dd1ed22f781987901e25bacfd01179fba172f/inc/lib/Unicode/GCString.pm line 24. BEGIN failed--compilation aborted at /var/folders/g6/s0wj67096d1dssm42vzm8g4c0000gn/T/par-6d7572726179/cache-ef3dd1ed22f781987901e25bacfd01179fba172f/inc/lib/Unicode/GCString.pm line 24. Compilation failed in require at /var/folders/g6/s0wj67096d1dssm42vzm8g4c0000gn/T/par-6d7572726179/cache-ef3dd1ed22f781987901e25bacfd01179fba172f/inc/lib/Biber/Utils.pm line 32. BEGIN failed--compilation aborted at /var/folders/g6/s0wj67096d1dssm42vzm8g4c0000gn/T/par-6d7572726179/cache-ef3dd1ed22f781987901e25bacfd01179fba172f/inc/lib/Biber/Utils.pm line 32. Compilation failed in require at /var/folders/g6/s0wj67096d1dssm42vzm8g4c0000gn/T/par-6d7572726179/cache-ef3dd1ed22f781987901e25bacfd01179fba172f/inc/lib/Biber/Internals.pm line 8. BEGIN failed--compilation aborted at /var/folders/g6/s0wj67096d1dssm42vzm8g4c0000gn/T/par-6d7572726179/cache-ef3dd1ed22f781987901e25bacfd01179fba172f/inc/lib/Biber/Internals.pm line 8. Compilation failed in require at /loader/HASH(0xb730ff6d8)/parent.pm line 17. BEGIN failed--compilation aborted at /var/folders/g6/s0wj67096d1dssm42vzm8g4c0000gn/T/par-6d7572726179/cache-ef3dd1ed22f781987901e25bacfd01179fba172f/inc/lib/Biber.pm line 5. Compilation failed in require at script/biber-darwin line 21. BEGIN failed--compilation aborted at script/biber-darwin line 21.

  • \oiiint undefined control sequence [closed]
    by Noah B on August 17, 2026 at 12:19 pm

    I'm trying to write out some formulas from my Aerospace textbook but when I use \oiiint (with \usepackage{esint}) I get an undefined control sequence. Here are the Tex expressions that I'm having trouble with: \documentclass{article} \usepackage{amssymb} \usepackage{mathtools} \usepackage{amsthm} \usepackage{esint} \begin{document} \[ \oiint_{S} \vec{A} \cdot \mathrm{d}\vec{S} = \oiiint _{\mathcal{V}}\left( \nabla \cdot \vec{A} \right) \mathrm{d}\mathcal{V} \] \[ \frac{\partial}{\partial t}\oiiint _{\mathcal{V}}\rho \,\mathrm{d}\mathcal{V} + \oiint _{S}\rho\vec{V}\cdot \mathrm{d}\vec{S} = 0 \] \end{document} This is what is rendered as well: Here are the Raw Logs: ! Undefined control sequence. l.214 ...\vec{A} \cdot \mathrm{d}\vec{S} = \oiiint _{\mathcal{V}}\left( \nab... The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined. ! Undefined control sequence. l.218 \frac{\partial}{\partial t}\oiiint _{\mathcal{V}}\rho \,\mathrm{d}\mat... The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined.

  • Compiling latexdiff in Overleaf
    by AcadEconInd on August 17, 2026 at 10:58 am

    I am submitting a revised version of a paper to a journal. The editor has asked for a track changes file. I used latex-diff (Tom-Hejda's solution) in Overleaf, however it doesnt give the desired output and I get a compilation error with the diff file (but the individual files do compile). My files have a lot of packages in the preamble because of the equations/tables etc that I have used. How can I generate a clean differences file? Update: If I remove the tables in main2.tex, the diff file does compile. I cant identify where are the tables breaking. Please advise. 1. main.tex \documentclass[10pt]{article} \usepackage{graphicx} \usepackage{ragged2e} \usepackage{pdflscape} \usepackage{setspace} \usepackage{amssymb} \usepackage{floatpag} \usepackage{float} \usepackage{fontspec} \usepackage{afterpage} \usepackage{adjustbox} \usepackage{threeparttablex} \usepackage{makecell} \usepackage{fixmath} \usepackage[margin=0.9in]{geometry} \usepackage{booktabs} \usepackage{multirow} \usepackage{longtable} \usepackage{siunitx} \usepackage{appendix} \usepackage{threeparttable} \usepackage{pdfpages} \usepackage{mathptmx} \usepackage{capt-of} \usepackage[none]{hyphenat} \usepackage{microtype} \usepackage{rotating} \usepackage{tablefootnote} \usepackage{tabularx} \usepackage[toctitles]{titlesec} \usepackage{t1enc} \usepackage{placeins} \usepackage{amsmath} \usepackage[english]{babel} \usepackage{natbib} \usepackage{fancyhdr} \usepackage{tfrupee} \usepackage{datetime} \usepackage{subfiles} \renewcommand\theadalign{cl} \renewcommand\theadfont{\normalfont} \usepackage{caption}% or use the larger `caption` package \linespread{1.2} \pagestyle{fancy} \pagestyle{fancy} \fancyhf{} \fancyhead[R]{\thepage} \newdateformat{}{\monthname[\THEMONTH] \THEYEAR} \date{} \makeatletter \newcommand\ackname{Acknowledgements} \newcommand\conflictname{Conflict of Interest} \newcommand\dataavailabilityname{Data Availability Statement} \newcommand\fundname{Funding Information} \newcommand\contriname{Author Contributions} \usepackage{hyperref} \begin{document} \subsection{Robustness checks} To examine the robustness of results, we utilise alternative methodologies and data. While the results in Section 5.1 combine household data with district-level school quality data, it will be useful to see the effect of private tutoring on learning while controlling for the characteristics of the school that the child actually attends. For this purpose, we use the school schedule of the ASER dataset. The school schedule collects information on up to two government schools in each surveyed village. In the household schedule, each surveyed child is asked whether s/he attends the surveyed school. This allows us to match the students to the school they attend and we are able to ascertain the features of the school a student attends. However, we lose some observations while matching students to the school due to two reasons: one, not all children attend the surveyed school, and two, the school schedule did not collect data from private schools. Nevertheless, the sample we use is large enough to allow a meaningful analysis. We estimate this model using the treatment effects model described earlier, with the same exclusion restrictions (Table \ref{treatreg_govtOnly}). We also use %propensity score matching (Table \ref{psm}) and the instrumental variables estimation to investigate the causal effect (Table \ref{tab:sibling_IV}). The association between learning outcomes and private tutoring participation appears stable, in the face of these alternative methodologies and datasets. \subsubsection{Treatment effects model: government school students, with school-level characteristics} Table \ref{treatreg_govtOnly} shows the ATET (first row) and regression coefficients for selected variables used in the outcome equation. Similar to previous findings, the ATET is positive and statistically significant. However, the asset index variable is no longer significant. Some (but not all) variables capturing school characteristics, viz., infrastructure (usable blackboard) and governance (student and teacher attendance), are statistically significant. Our results are in line with the literature. Kumar and Choudhury \citeyearpar{Kumar2021} report a positive relation between student attendance and learning outcomes, while \citet{Gouda} find a positive association between infrastructure quality and test performance. Note that the sample in this specification is restricted only to government schools. We are unable to reject the null hypothesis of no selection in three of the four specifications. However, since unobserved confounders at the household or individual level may still bias the estimates, as is often the case in observational studies, we believe that it is more appropriate to use the endogenous treatment effects model than the OLS. \begin{table}[!h] \centering \renewcommand{\arraystretch}{0.65} \setlength{\tabcolsep}{3pt} \footnotesize \caption{Endogenous treatment effects model, restricted sample, with school quality controls \label{treatreg_govtOnly}} \begin{tabular}{l l l l l} \hline & \multicolumn{2}{l}{Math} & \multicolumn{2}{l}{Reading} \\ \hline & Class 1 & Class 2 & Class 1 & Class 2 \\ \hline %ATET & & & & \\ Tuition participation (Yes=1, No=0) & 0.238\textsuperscript{***} & 0.131\textsuperscript{***} & 0.180\textsuperscript{***} & 0.149\textsuperscript{***} \\ & (3.45) & (3.79) & (2.69) & (2.81) \\ \hline \textbf{Outcome equation (selected variables)} & & & & \\ Standardized household asset index score& 0.0757 & 0.0564 & 0.0398 & 0.0629 \\ & (1.38) & (1.01) & (0.91) & (1.24) \\ School satisfies RTE norms for pupil-teacher ratio (Yes=1)& 0.119 & 0.0732 & -0.184 & 0.168 \\ & (1.09) & (0.64) & (-1.53) & (1.49) \\ Multigrade teaching practised in school (Yes=1)& 0.0805 & -0.137 & 0.0366 & -0.139 \\ & (0.84) & (-1.22) & (0.32) & (-1.36) \\ Number of students per room& -0.000859 & 0.000180 & -0.00158 & 0.000325 \\ & (-0.61) & (0.13) & (-1.37) & (0.21) \\ Teacher attendance on day of survey (\%)& 0.000537 & 0.00379\textsuperscript{*} & -0.00152 & 0.000778 \\ & (0.31) & (1.74) & (-0.86) & (0.40) \\ Usable blackboard in Class 2 (Yes = 1)& 0.0109 & 0.547\textsuperscript{**} & 0.222 & 0.386\textsuperscript{*} \\ & (0.05) & (2.24) & (0.98) & (1.78) \\ Average attendance of Class 1 students (\%)& 0.00501\textsuperscript{**} & & 0.00606\textsuperscript{**} & \\ & (2.13) & & (2.26) & \\ Average attendance of Class 2 students (\%)& & 0.00248 & & 0.000616 \\ & & (1.20) & & (0.34) \\ \hline N & 7174 & 7201 & 7202 & 7252 \\ %chi2 & 1.663 & 8.003 & 3.957 & 2.666 \\ Test for endogeneity (p-value) & 0.43 & 0.018 & 0.138 & 0.26 \\ \hline \multicolumn{5}{l}{\footnotesize \textit{Source}: See Tables 1 and 2.}\\ \multicolumn{5}{l}{\footnotesize \textit{Notes}: See Notes to Table 3.}\\ \end{tabular} \end{table} \pagestyle{fancy} \end{document} 2. main2.tex \documentclass[10pt]{article} \usepackage{graphicx} % Required for inserting images \usepackage{ragged2e} \usepackage{pdflscape} \usepackage{setspace} \usepackage{graphicx} \usepackage{amssymb} \usepackage{floatpag} \usepackage{float} \usepackage{fontspec} \usepackage{afterpage} \usepackage{adjustbox} \usepackage{threeparttablex} \usepackage{fixmath} \usepackage[margin=0.9in]{geometry} \usepackage{booktabs} \usepackage{makecell} \usepackage{multirow} \usepackage{longtable} \usepackage{siunitx} \usepackage{appendix} \usepackage{threeparttable} \usepackage{pdfpages} \usepackage{mathptmx} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsthm} \usepackage{array} \usepackage{tabularx} \usepackage{xcolor} \usepackage[round, authoryear, sort]{natbib} \usepackage{cancel} \usepackage{capt-of} \usepackage[none]{hyphenat} \usepackage{microtype} \usepackage{rotating} \usepackage{tablefootnote} \usepackage[toctitles]{titlesec} \usepackage{t1enc} \usepackage{placeins} \usepackage[english]{babel} \usepackage{fancyhdr} \usepackage{tfrupee} \usepackage{datetime} \usepackage{subfiles} \usepackage{makecell} % <<<<<< added \renewcommand\theadalign{cl} \renewcommand\theadfont{\normalfont} \onehalfspacing \usepackage[colorlinks=true, linkcolor=blue, citecolor=blue, urlcolor=blue]{hyperref} \newcommand{\Ehat}{\widehat{E}} \newcommand{\Kstar}{K^{\ast}} \newcommand{\KG}{K^{G}} \newcommand{\KP}{K^{P}} \newcommand{\TG}{T^{G}} \newcommand{\TP}{T^{P}} \newcommand{\CG}{C^{G}} \newcommand{\CP}{C^{P}} \newcommand{\mG}{m^{G}} \newcommand{\mP}{m^{P}} \newcommand{\muG}{\mu^{G}} \newcommand{\muP}{\mu^{P}} \newcommand{\partd}[2]{\dfrac{\partial #1}{\partial #2}} \newcommand{\totd}[2]{\dfrac{\mathrm{d}#1}{\mathrm{d}#2}} \usepackage{caption}% or use the larger `caption` package \usepackage{amsmath} % easier math formulae, align, subequations \ldots \linespread{1.2} \pagestyle{fancy} \pagestyle{fancy} \fancyhf{} \fancyhead[R]{\thepage} \defcitealias{csf2020}{CSF, 2020} \defcitealias{CSF2021SystemicDrivers}{CSF, 2021} \defcitealias{mospi2025education}{MoSPI, 2025} \defcitealias{learningncert}{NCERT, 2017} \defcitealias{UDISE2026}{U-DISE, 2026} \newdateformat{}{\monthname[\THEMONTH] \THEYEAR} \date{} \makeatletter \newcommand\ackname{Acknowledgements} \newcommand\conflictname{Conflict of Interest} \newcommand\dataavailabilityname{Data Availability Statement} \newcommand\fundname{Funding Information} \newcommand\contriname{Author Contributions} \if@titlepage \newenvironment{acknowledgements}{% \titlepage \null\vfil \@beginparpenalty\@lowpenalty \begin{center}% \bfseries \ackname \@endparpenalty\@M \end{center}}% {\par\vspace{0.5em}% \begin{center}% \bfseries \conflictname \end{center} \noindent The authors declare that they have no conflict of interest. \par\vspace{0.5em}% \begin{center}% \bfseries \dataavailabilityname \end{center} \noindent The data that support the findings of this study are available from the corresponding author upon reasonable request. \vfil\null\endtitlepage} \else \newenvironment{acknowledgements}{% \if@twocolumn \section*{\ackname}% \else \small \begin{center}% {\bfseries \ackname\vspace{-.5em}\vspace{\z@}}% \end{center}% \quotation \fi} {\if@twocolumn\else\endquotation\fi \par\vspace{-0.5cm}% \begin{center}% \bfseries \conflictname \end{center} \noindent The authors declare that they have no conflict of interest. \par\vspace{-0.25cm}% \begin{center}% \bfseries \dataavailabilityname \end{center} \noindent The data is freely available from the ASER centre upon submitting a requisition form. We regret that the data cannot be shared without the explicit permission from ASER. \par% \begin{center}% \bfseries \fundname \end{center} \noindent No funding was received for conducting this study. \par\vspace{0.5em}% \begin{center}% \end{center} } \fi \makeatother \begin{document} \subsection{Robustness checks} To examine the robustness of results, we utilise alternative methodologies, in particular, considering tuition intensity (captured by monthly tuition \textit{spending} instead of participation), pseudo-panel methods, and an alternative IV. The association between learning outcomes and PT participation appears stable, in the face of these alternative methodologies. \pagestyle{fancy} \subsubsection{Tuition Spending} In Section 4.1, we use tutoring participation, defined as a binary indicator. To help assess intensity effects, we now consider monthly tutoring spending in lieu of the participation variable, to allow for a more nuanced analysis (Table \ref{tab:spending}). We find that the amount spent matters and a 1\% increase in private tuition spending is associated with 2 to 3 \% point increase in the probability of being at grade level. Also, the returns to spending continue to be higher for Class 1 students than for those studying in Class 2. %\renewcommand{\arraystretch}{0.7} \begin{table}[H] \centering \renewcommand{\arraystretch}{0.7} \footnotesize \caption{IV estimation with tuition spending, entire sample, with school quality controls} \label{tab:spending} \begin{tabular}{l l l l l}\toprule & \multicolumn{2}{l}{Math} & \multicolumn{2}{l}{Reading} \\\midrule & Class 1 & Class 2 & Class 1 & Class 2 \\ \hline\\ %& & & & Log of monthly tuition spending & 0.029*** & 0.016*** & 0.026*** & 0.017*** \\ & (4.39) & (3.83) & (3.95) & (3.33) \\ % & & & & \\ \textbf{Outcome equation (selected variables)} & & & & \\ \textbf{Household and child variables} & & & & \\ Standardized household asset index score & 0.025*** & 0.015*** & 0.027*** & 0.025*** \\ & (7.31) & (5.28) & (6.90) & (7.38) \\ % & & & & \\ School type (Government = 1, Private = 0) & -0.155*** & -0.064*** & -0.179*** & -0.118*** \\ & (-18.92) & (-9.63) & (-20.13) & (-14.11) \\ \textbf{School quality: PGI-D scores} & & & & \\ Effective classroom teaching practices & 0.001** & -0.023*** & 0.005*** & -0.018*** \\ & (2.19) & (-73.63) & (8.18) & (-44.73) \\ % & & & & \\ Governance processes & -0.003*** & 0.009*** & -0.007*** & 0.005*** \\ & (-15.12) & (56.46) & (-39.06) & (23.40) \\ % & & & & \\ Infrastructure and entitlements & 0.002 & 0.008*** & -0.009*** & 0.012*** \\ & (1.47) & (16.35) & (-7.62) & (20.05) \\ \hline N & 30658 & 29208 & 30805 & 29340 \\ LM statistic for underidentification & 224.804 & 217.561 & 225.358 & 218.278 \\ F-statistic for weak identification & 579.086 & 740.915 & 577.009 & 743.578 \\ Overidentification test (p-value) & 0.257 & 0.139 & 0.515 & 0.619 \\ %Test for endogeneity (p-value) & 0.0125 & 0.0000401 & 0.169 & 0.00842 \\ \bottomrule \multicolumn{5}{l}{\footnotesize \textit{Source}: ASER (2018) and DISE (2018). For details, see Tables 1 and A2.} \\%[-1.5ex] \multicolumn{5}{l}{\footnotesize \textit{Notes}: See Notes to Table 3.}\\ \end{tabular} \end{table} \subsubsection{Pseudo-panel analysis} While ASER is not a household-level longitudinal survey, nearly all districts are surveyed in each round. Exploiting this feature of the dataset, we construct a district-level pseudo-panel using multiple rounds of ASER and DISE from 2018, 2022 and 2024. The dependent variable is the proportion of students at-grade-level in the district, and the key variable of interest is the average tuition participation in the district. The results using a two-way fixed effects estimation with this pseudo-panel reveal a positive relation between district-level tutoring and learning outcomes in math and reading, while controlling for characteristics aggregated at the district-level. %characteristics school quality, and district-level averages for parental education, school participation and household asset ownership. %More precisely, there is evidence that math and reading proficiency is higher in districts where a greater proportion of students avail tuition. The estimates are also statistically significant for all outcomes \footnote{The estimates from a child-level pooled OLS regression, with district and year fixed effects included are presented in the Appendix. The qualitative results are similar, although the estimates are not directly comparable because of the differences in units of measurement.}. %\renewcommand{\arraystretch}{0.7} \begin{table}[H] \centering \renewcommand{\arraystretch}{0.7} \footnotesize \caption{Private tuition and foundational learning: pseudo-panel estimates} \label{pseudopanel} \begin{tabular}{l l l l l}\toprule & \multicolumn{2}{l}{Math} & \multicolumn{2}{l}{Reading} \\\midrule & Class 1 & Class 2 & Class 1 & Class 2 \\ \hline & & & & \\ Average tuition participation in the district & 0.183*** & 0.135*** & 0.135*** & 0.062* \\ & (3.54) & (4.64) & (2.64) & (1.7) \\ \hline N & 1445 & 1445 & 1446 & 1446 \\ \bottomrule \multicolumn{5}{l}{\footnotesize \textit{Source}: ASER and DISE (2018, 2022, 2024) For details, see Table \ref{summary_model}.} \\%[-1.5ex] \multicolumn{5}{l}{\footnotesize \textit{Notes}: (i) t-statistics in parentheses. (ii) District fixed effects and year fixed effects are included.}\\ \multicolumn{5}{l}{\footnotesize (iii) District-level controls for school quality, government school participation, household asset }\\ \multicolumn{5}{l}{ownership, family size and parental education are included. * $p<0.10$, ** $p<0.05$, *** $p<0.01$} \\%[-1.2ex] \end{tabular} \end{table} \end{document} 3. diff.tex \RequirePackage{shellesc} \ShellEscape{latexdiff main.tex main2.tex > main-d.tex} %latexdiff --subtype=COLOR old.tex new.tex > diff.tex \input{main-d} \documentclass{dummy} \title{Demonstrating latexdiff}

  • Custom colour scheme/style for a chronos timeline
    by tnt on August 17, 2026 at 10:23 am

    I am trying to achieve the following look for my chronos timeline: This is the "date centric" style and I have tried to define a new colour scheme like so: \documentclass[a4paper,12pt]{article} \usepackage[dvipsnames,svgnames]{xcolor} \usepackage{chronos} \chronosnewcolourscheme{newcols}{% event/above={Rhodamine,Cerulean}, event/below={Cerulean,Rhodamine}, } \begin{document} \begin{figure} \centering \begin{chronos} [ date centric, colour scheme=newcols, timeline={ dates=1974:1990, }, ] \chronosevent {date={1978}, as is, yshift=5pt, special date={1978}, name=A, name content=Theory A, } \chronosevent {date={1984}, as is, name=B, name content=Theory B, yshift=30pt, } \end{chronos} \end{figure} \end{document} With this code, the colours of the event lines/text stay unchanged, so I understand that I need to make adjustments to the "date centric" style too, but what exactly needs to be changed?

  • Drawing a bracket over several lines in a table
    by rensemil on August 17, 2026 at 9:15 am

    I need to draw a cornered bracket over several lines in a table. I want it to look somewhat like this: You can see the bracket on the right. I also have a table with three columns, just like in the picture. The first columns are the line numbers, the second latin text, the third are abbreviations about the lines' metre. I have all this working just fine except for the bracket. I first tried to get help from AI and this is the result: \documentclass{article} \usepackage{tikz} \usetikzlibrary{tikzmark} \newcounter{verstabsystem} \NewDocumentCommand{\startsystem}{}{% \stepcounter{verstabsystem}% \xdef\verstabSysCurrent{\theverstabsystem}% \makebox[0pt][l]{\strut\tikzmark{verstabSysStart\verstabSysCurrent}}% } \NewDocumentCommand{\endsystem}{}{% \makebox[0pt][l]{\strut\tikzmark{verstabSysEnd\verstabSysCurrent}}% \begin{tikzpicture}[remember picture, overlay] \draw[thick] ([xshift=-0.3em]pic cs:verstabSysStart\verstabSysCurrent) -- ++(-0.3em,0) -- ([xshift=-0.3em]pic cs:verstabSysEnd\verstabSysCurrent) -- ++(0.3em,0); \end{tikzpicture}% } \begin{document} \begin{table} \begin{tabular}{rcl} 1 & text & \startsystem \\ 2 & text & an sy\textsuperscript{10} \\ 3 & text & \\ 4 & text & \endsystem \\ 5 & text & \\ 6 & text & \\ \end{tabular} \end{table} \end{document} Which produces: As you can see, the bracket is there, but there are a few issues with it that I have been unable to solve: It has the shape of an opening bracket [, but I need a closing one ]. The vertical line is not vertical. I first thought that the verticalness issue was due to there being text in the same line, but that happens even when there is none. I believe that the solution would be to move the horizontal line to the right so it is at the same height as the bottom one and then connect the right ends of both lines with a vertical one. How may this be achieved? Thanks in advance!!

  • قالب مذكرة.tex: erreur: 215: Undefined control sequence. ^^I^^I\begin{tabular} [closed]
    by خالد بن حورية on August 17, 2026 at 7:51 am

    \begin{center} \begin{tabular}{|c|c|c|} \hline \rowcolor{gold!40} \textbf{المرحلة} & \textbf{عناصر الدرس} & \textbf{المدة} \\ \hline مرحلة الانطلاق & مراجعة المكتسبات القبلية وربطها بالدرس الجديد & 10 دقائق \\ \hline مرحلة الاكتشاف & تقديم التعريفات الأساسية مع أمثلة توضيحية & 20 دقيقة \\ \hline مرحلة بناء التعلمات & نشاط حول العمليات على الدوال + شرح الحل & 25 دقيقة \\ \hline مرحلة التطبيق & تمرين فردي أو جماعي مع مناقشة النتائج & 15 دقيقة \\ \hline مرحلة التقويم & تمرين ختامي أو أسئلة قصيرة للتأكد من الفهم & 10 دقائق \\ \hline \end{tabular} \end{center}

  • My goal is to approximate an arc length reparameterization
    by Jasper on August 16, 2026 at 9:51 pm

    My goal is to approximate an arc length reparameterization. The thick curve and the red curve should nearly coincide is the expected result. \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \usepackage{mathtools} \usepackage{unicode-math} \tikzset{ declare function={ alpha(\t)=1/\t; dalpha(\t)=(alpha(\t+0.02)-alpha(\t-0.02))/0.04; length(\x,\y)=sqrt((\x)^2+(\y)^2); ldalpha(\t)=length(1,dalpha(\t)); } } \pgfmathdeclarefunction{riemannsumldalpha}{3}{% \pgfmathsetmacro{\count}{0}% \pgfmathsetmacro{\dx}{(#2-#1)/#3}% \pgfplotsinvokeforeach{1,...,#3} {% \pgfmathsetmacro{\count}{\count+ldalpha(#1+##1*\dx)*\dx}% }% \let\pgfmathresult\count% } \pgfmathdeclarefunction{inverseriemannsumldalpha}{4}{% \pgfmathsetmacro{\lo}{#2}% \pgfmathsetmacro{\hi}{#3}% \pgfplotsinvokeforeach{1,...,#4}{% \pgfmathsetmacro{\mid}{(\lo+\hi)/2}% \pgfmathsetmacro{\value}{riemannsumldalpha(0.25,\mid,#4)}% \pgfmathsetmacro{\test}{\value < #1}% \ifnum\test=1 \pgfmathsetmacro{\lo}{\mid}% \else \pgfmathsetmacro{\hi}{\mid}% \fi }% \pgfmathsetmacro{\pgfmathresult}{(\lo+\hi)/2}% } \tikzset{ declare function={ alphainverseriemannsumldalpha(\t,\s,\e,\sam)=alpha( inverseriemannsumldalpha(\t,\s,\e,\sam) ); } } \begin{document} Let \(\alpha(t)=1/t\). My goal is to approximate an arc length reparameterization. I believe that plotting the following composition will achieve this; \[\alpha\Biggl(\biggl(\int_{t_0}^t\lvert\alpha'(t)\rvert\,dt\biggr)^{-1}\Biggr).\] \begin{center} \begin{tikzpicture}[samples=5] % producing the expected result \draw[red] plot[domain=0.25:4] (\x,{alpha(\x)}); \draw[green] plot[domain=0.25:4] (\x,{dalpha(\x)}); \draw[blue] plot[domain=0.25:4] (\x,{ldalpha(\x)}); \draw[purple] plot[domain=0.25:4] (\x,{riemannsumldalpha(0.25,\x,7)}); \draw[yellow] plot[domain=0.25:4] (\x,{inverseriemannsumldalpha(\x,0.25,4,7)}); % not producing the expected result \draw[thick] plot[domain=0.25:4] (\x,{alphainverseriemannsumldalpha(\x,0.25,4,7)}); \end{tikzpicture} \end{center} \end{document}

  • Using lettrine equivalent inside Verse or Poem environment
    by Yves on August 16, 2026 at 1:39 pm

    This is a follow-up question of https://tex.stackexchange.com/a/163355. After numerous experiments with the lettrine package in the task of preparing a collection of poems for a friend who is unfamiliar with LaTeX, I have found the superb piece of code from Steven B. Segletes, and was delighted primarily because only the \startverse command does the job. However when long verses exceed the settings as in the example below, there is a space created between the lines 2 and 3 of the poem. I have been able to eliminate the problem by removing the "verse" package from the preamble, and also to some extent by changing the length of the minipage, in the code \begin{minipage}{4in}. But I wish to better understand the role of the {4in} minipage lenghth. (I wonder if a size depending on the textwidth would be more adequate and why the verse package affects the results. \documentclass[12pt, a5paper,draft]{book} \usepackage{scalerel} \usepackage[english]{babel} \usepackage[numberpoems, clearpageafterpoem]{poetrytex} \usepackage{showframe} \usepackage{stackengine} \usepackage{verse} %Following code borrowed from Steven B. Segletes %https://tex.stackexchange.com/a/163355 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def\startverse#1\\#2\\{% \begin{minipage}{4in}% \firstline#1\relax% \def\verselineB{#2}% \if Q\versalletter\def\descstrut{\strut}\else\def\descstrut{}\fi% \def\Versal{\scalerel*{$\fontsize{28}{30}\selectfont\versalletter$}% {\def\stacktype{L}\stackon{T\descstrut}{T}}}% \setbox0=\hbox{\Versal\,}% \noindent\hspace*{\wd0}\verselineA\\% \smash{\Versal\,}\verselineB\strut% \end{minipage}\\% } \def\firstline#1#2\relax{\def\versalletter{#1}\def\verselineA{#2}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} Note: The witdh of the text is {\the\textwidth} \begin{poem}{A Limerick}{} \startverse There was an old party of Lyme\\ Who married three wives at one time. \\ When asked: ‘Why the third?’ \\ He replied: ‘One’s absurd, \\ And bigamy, sir, is a crime.’ \\ \end{poem} \end{document}

  • Crafting tcolorbox theorem environments with ams-like syntax and working \label and \ref
    by GeometriaDifferenziale on August 16, 2026 at 8:08 am

    I'm trying to define some custom theorem environments with tcolorbox, while keeping the usual amsth syntax \begin{my_env}[My Optional Title] \label{my_optional_label} stuff \end{my_env} instead of tcolorboxs \begin{my_tcb_env}{My Optional Title}{my_optional_label} stuff \end{my_tcb_env} one. This way, if I decide to get rid of tcolorbox, I can do that without much hassle. I achieved a good-looking result with the following definitions: \definecolor{definitioncolor}{HTML}{0072B2} % Blue \definecolor{theoremcolor}{HTML}{D55E00} % Vermillion \definecolor{examplecolor}{HTML}{F0E442} % Yellow \definecolor{propositioncolor}{HTML}{D55E00} % Vermillion \definecolor{corollarycolor}{HTML}{D55E00} % Vermillion \definecolor{lemmacolor}{HTML}{D55E00} % Vermillion \definecolor{constructioncolor}{HTML}{CC79A7} % Reddish Purple \tcbset{ breakable, commonbox/.style={ boxrule=0.3pt, left=10pt, right=10pt, top=8pt, bottom=8pt, arc=3pt, outer arc=3pt, %colback=white, colbacktitle=white, coltitle=black, colframe=black!12, % Very subtle border enhanced, }, } % Theorem \NewTColorBox[auto counter, number within=section]{thm}{+O{}}{% commonbox, title={\textbf{Theorem} \thetcbcounter\IfBlankTF{#1}{}{ --- #1}}, colframe=theoremcolor, colback=theoremcolor!10, } % Definition \NewTColorBox[use counter from=thm]{dfn}{+O{}}{% commonbox, title={\textbf{Definition} \thetcbcounter\IfBlankTF{#1}{}{ --- #1}}, colframe=definitioncolor, colback=definitioncolor!10, } % Definition \NewTColorBox[use counter from=thm]{construction}{+O{}}{% commonbox, title={\textbf{Construction} \thetcbcounter\IfBlankTF{#1}{}{ --- #1}}, colframe=constructioncolor, colback=constructioncolor!10, } and so on. The problem now is that whenever I \begin{dfn}[My definition] \label{my_definition} stuff \end{dfn} and then try to \ref{my_definition}, I end up with the section number, not the definition number. The same goes for the other environments. This is in some sense expected, but I don't know how to change my code to make it work properly.

  • Is there a simple way to compile a LaTeX document that contains knitr chunks without compiling the knitrx chunks?
    by joshisanonymous on August 15, 2026 at 10:07 pm

    I have a rather long LaTeX document. I compile it with XeLaTeX. It additionally contains knitr chunks. Some of the R code that is executed during this process takes a very long time to run because it's doing things like fitting a bunch of multinomial models and making API calls to Open Street Maps and the General Social Survey. Sometimes, I just want to compile the pure LaTeX portions of the document to make sure I didn't format something wrong or just to be able to read a paragraph that I just edited in PDF format instead of in plain text. In other words, I don't want to wait for the knitr chunks to run just to see how a modified table looks or to read a few paragraphs. The only way I know of to do this is to comment out every knitr chunk in the document. I can easily comment out just the very first chunk that runs my R scripts in the first place, but then the document breaks and can't be compiled due to all the knitr chunks and in-line knitr stuff. Alternatively, I could comment out all these later portions of code, too, but this is a book-length document, so that would be exceedingly tedious, more tedious than just waiting for the R scripts to all run. Is there an option or something built into the knitr package that would allow me to compile the LaTeX document but skip literally every knitr portion of the document? For example, say I have the following very small document: \documentclass{article} \title{Some title} \author{Some person} \date{Some date} \begin{document} <<run_script>>= source("stats_stuff.R") @ Here is some text. This number, \Sexpr{calculated_num}, comes from an object generated by my R script. <<plot>>= plot_from_R @ Now I am done with this document. \end{document} And say I have this in stats_stuff.R: calculated_num <- 5 + 7 plot_from_R <- boxplot(sample(1:20, 5)) My goal is to be able to do something simple like add an argument to run_script so bypass the knitr stuff in the document. Is that possible?

  • How to stretch these double-angle delimiters appropriately?
    by Frode Alfson Bjørdal on August 15, 2026 at 9:30 pm

    I have this MWE: \documentclass{article} \usepackage{amsmath} \newcommand{\AnschauungMultiline}[2]{% \left\langle\hspace{-1.8mm}\left\langle \vphantom{\begin{matrix} A \\ A \end{matrix}} #1 \mathrel{:} #2 \right\rangle\hspace{-1.8mm}\right\rangle } \begin{document} \[ \AnschauungMultiline{x}{ \begin{aligned} \forall y\biggl( g(&0)\in y \wedge H(0)\in y \wedge \forall n \Bigl((g(n)\in y\to g(n+1)\in y)~\\[-1mm] &\wedge (H(n)\in y\to H(n+1)\in y)\Bigr) \to x\in y\biggr) \end{aligned}} \] \end{document} How may I obtain outer double angle delimiters whose tops align with the top of the upper written line $g(0)\in y\wedge H(0)\in y \ldots$, and whose bottoms align with the bottom of the lower written line $\wedge (H(n)\in y\to H\ldots$? It would be very useful if the solution allows regulation for fine adjustment.

  • Triangle Nesting ( Similar to Sierpinski Triangles ) [duplicate]
    by Discrete on August 15, 2026 at 7:09 pm

    Im curious to know if there is a more efficient way to have triangles repeat themselves in one another without needing to run the \draw command for each line of the triangle; similar to Sierpinski's triangles is essentially what it is but in a different way for nesting. So far i've been doing the \draw command as such \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} [scale = 3] \draw[thick] (0,0) -- (2,0) -- (1,1.73205) -- cycle; \draw[thick] (0,0) -- (1,0.8) (2,0) -- (1,0.8) -- (1,1.73205) -- (1,0.8); \draw[thick] (1,0.8) -- (1.566667,0.769); \end{tikzpicture} \end{document} Ive provided an example above of what it should look like however I need to define what the colors mean and some rules it has. Meaning of Colors: Black = 1st Generation triangles, Blue = 2nd Generation triangles, and Red = 3rd Generation triangles as well each generation has a specific intersection where all the points meet ( for example black has a intersection in the middle where all points meet ) I should also say that each generation has its own "sub section" where the rule above applies to each sub section and these sub sections are divided by the lines of the previous generation. ( for example a 3rd generation sub section can have a different intersection than another 3rd generation sub section this is so each has one intersection which will for the sake of simplicity be set in the center for all generations) if you have any questions on this to better help me feel free to ask and I apologize if some of it seems confusing it is a rather "niche" section of discrete geometry relating to triangles and other two dimensional shapes ( side note i'd like this concept to be done with other two dimensional shapes as well so if theres a way to set the starting shape to say a circle or another shape that would be amazing; and it would follow the same rules I have revealed here).

  • standalone class gives PDF warning
    by karlh on August 15, 2026 at 6:13 pm

    If I create a minimal drawing using the standalone class, I get a warning: \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture} \draw circle (1); \end{tikzpicture} \end{document} $ pdflatex [filename] [blah blah] [1 Non-PDF special ignored! <special> papersize=57.30548pt,57.30548pt A similar warning is emitted when using LuaTeX instead of PDFTeX. This message can safely be ignored, of course, but if I recall correctly, it was not there in past versions, and I thought I'd ask if someone knows why it occurs and whether it should occur. I don't know when this started happening, but I also do not remember it happening prior to a particular TeXLIVE upgrade (which would have been from TeXLIVE 2022 -> 2025, iirc, which Fedora was waiting on for quite a while so they could reorganize the packages).

  • BibLatex not working on Mac TeXShop [duplicate]
    by Kevin on August 15, 2026 at 7:45 am

    I'm using Mac TeXShop Version 5.57, on Mac OS Sequoia 15.7.4. I had been using BibTeX before with no problem but I've heard about BibLaTeX and figured I should get with the times and start using it (I also hope to do more complicated things like having several Bibliographies in the same document and such). \documentclass{amsbook} \include{header} % things I define in all my stuff here \usepackage{biblatex} \addbibresource{refs.bib} % my BibTeX file \begin{document} My document, blah blah, \cite{firstcitation}. \printbibliography \end{document} In TeXShop, I go to the "Typeset" Menu > LaTeX Then "Typeset" Menu > BibTeX Then "Typeset" Menu > LaTeX Then "Typeset" Menu > LaTeX like I always did with BibTeX. When it runs BibTeX, I get the following: This is BibTeX, Version 0.99d (TeX Live 2025) The top-level auxiliary file: app-history.aux I found no \citation commands---while reading file myfile.aux I found no \bibdata command---while reading file myfile.aux I found no \bibstyle command---while reading file myfile.aux (There were 3 error messages) and it doesn't generate anything in the .bbl file. In the end, I LaTeX it twice and no bibliography appears but instead I get the error: Package biblatex Warning: Please (re)run Biber on the file: (biblatex) app-history (biblatex) and rerun LaTeX afterwards. I am able to use BibTeX fine: \documentclass{amsbook} \include{header} % things I define in all my stuff here \begin{document} My document, blah blah, \cite{firstcitation}. \bibliographystyle{plain} % We choose the "plain" reference style \bibliography{refs} \end{document} works just fine.

  • "Red. by", series editor in bibliography
    by Mirco Nonchef on August 15, 2026 at 7:03 am

    I'm using Latex with Zotero. I want to cite a book from a book series. The book has an author and an editor, and the book series has a separate title (the Dover Thrift Editions) and its own editor. When I add an Editor and a Series Editor role as in the MWEB below, I get the following in the bibliography: "Ed. by Janet B. Kopito, Red. by Susan L. Rattiner". The Red. (redacted) does not reflect the role of the series editor properly. Also, the name of the series is currently not part of the entry in the .bib file. How can I add the information for this publication such that it is displayed completely and accurately? MWEB: \begin{filecontents*}{\jobname.bib} @book{frost2019, title = {New {H}ampshire}, author = {Frost, Robert}, editor = {Kopito, Janet B.}, editora = {Rattiner, Susan L.}, editoratype = {redactor}, } \end{filecontents*} \documentclass{article} \usepackage[% autolang=other, backend=biber, style=numeric, defernumbers=true, autocite=superscript, giveninits=false, uniquename=false, language=english ]{biblatex} \addbibresource{\jobname.bib} \begin{document} \cite{frost2019} \printbibliography \end{document}

  • How to make Verbatim environment that matches my current one based on tcolorbox
    by Nasser on August 15, 2026 at 12:01 am

    Currently I use this to make verbatim display with rounded frame and yellow background, which works well, but I have to use \begin{tcolorbox}[myBox] \begin{verbatim} ..... \end{verbatim} \end{tcolorbox} But I'd like to be shorten this and be able to just write \begin{myVerbatim} ..... \end{myVerbatim} I can't make normal latex environment using \newenvironment{myVerbatim}[1]{% \begin{tcolorbox}[myBox] \begin{verbatim} }{% \end{verbatim} \end{tcolorbox} } Because what I am passing is verbatim. So I tried to use fancyvrb and its \DefineVerbatimEnvironment{myVerbatim}{Verbatim}{ but I am not able to get the exact look I currently have using tcolorbox and verbatim. From what I found it seems fancyvrb does not support rounded corners for frame and also does not support background color. fillcolor is not same. I do not want to use listings package in any way in all of this. (causes issue with tex4ht) Below I show my current tcolorbox implementation and my fancyvrb one. The question is: Is it possible to obtain the same look but using \DefineVerbatimEnvironment ? \documentclass[12pt]{article} \usepackage{tcolorbox} \usepackage{xcolor} \usepackage{verbatim} \tcbuselibrary{breakable} \definecolor{bg}{RGB}{255,255,226} \tcbset{ myBox/.style={ colframe=gray, colback=bg, boxrule=0.5pt, boxsep=4pt, arc=4pt, left=0pt, right=0pt, top=0pt, bottom=0pt } } \begin{document} \begin{tcolorbox}[myBox] \begin{verbatim} some 3^2 verbatim % text \sin x def hello_world_and_my_var(): print("Underscores work fine inside standard verbatim!") return True \end{verbatim} \end{tcolorbox} %I'd like to just do the following instead %\begin{myVeratim} % ................ %\end{myVerbatim} \end{document} Compiled using lualatex Here is the best I can do using fancyvrb \documentclass[12pt]{article} \usepackage{fancyvrb} \usepackage{xcolor} \definecolor{bg}{RGB}{255,255,226} % Define the custom verbatim environment \DefineVerbatimEnvironment{myVerbatim}{Verbatim}{ frame=single, % Adds the outer border framerule=0.5pt, % Sets border thickness rulecolor=\color{gray}, % Sets border color fillcolor=\color{yellow}, % Sets the yellow background color framesep=4pt, % Adjusts internal padding (matches boxsep) } \begin{document} \begin{myVerbatim} some 3^2 verbatim % text \sin x def hello_world_and_my_var(): print("Underscores work fine inside standard verbatim!") return True \end{myVerbatim} \end{document} Gives Which is not exactly the same. The solution I am looking for is to generate similar output as the first one above, but using \begin{myVerbatim}....\end{myVerbatim} to reduce typing. But with restrictions no use or loading listing package no use of external temporary files Any solution that does this will be great. It does not have to use fancyvrb either For an example, solution such as \newtcblisting{myVerbatim}{ colback=yellow!20, % background color colframe=gray, % border color boxrule=0.5pt, % border thickness arc=4pt, % rounded-corner radius boxsep=4pt, % padding left=4pt, right=4pt, top=4pt, bottom=4pt, listing only } Will not work, as this causes listing package to be loaded. TL 2026

  • How to embed a qr code in a tcolorbox?
    by modallyFragile on August 14, 2026 at 10:58 am

    I want to make an environment which takes two mandatory arguments, a title and a url, and prints a box, with the title at the top, a QR code of the url on the left, and the url itself at the bottom. The contents of the environment should be printed in the right of the box, wrapping under the qr code if long enough. I've got close. The MWE below creates a command which does this. But: It's not an environment. The tcolorbox tools available make it harder to create an environment with preset content. The qr code is printed, but leaves a thick margin at the top, between the QR code and the box. If the text is short, the QR code doesn't 'push' the bottom of the box down to accommodate it. (all demonstrated by the MWE below). The main issue seems to be floating (or otherwise managing) the QR code inside the box. I'm not sure how to approach this; below I used wrapfig2 because another question I found had success it. It compiles, but it doesn't quite work. How can I achieve what I want? \documentclass{article} \usepackage[skins]{tcolorbox} \usepackage{qrcode} \usepackage{wrapfig2} \usepackage{lipsum} % <title> <link> <description> \NewTotalTColorBox{\mweqrbox}{ m m m }{ enhanced,colback = white,colframe=black,coltitle=black, sharp corners,boxrule = 0.4pt, fonttitle = \itshape, attach boxed title to top text left = { yshift = -0.5\baselineskip-0.5pt, yshifttext = -0.25\baselineskip }, boxed title style={ tile, size = minimal, left = 0.5mm, right = 0.5mm, colback = white, before upper = \strut }, title={#1}, subtitle style = { fontupper = \scriptsize\ttfamily, colback = white, colframe = white, top=0pt, nobeforeafter }, lower separated=false }{% \begin{wrapfigure}{l} \qrcode{#2} \end{wrapfigure} #3 % Description % this is useful because otherwise, with a short description, the % subtitle cuts through the middle of the QR code. \tcblower \tcbsubtitle{#2} } \begin{document} \mweqrbox{Foo}{https://example.com/some/long/path#fragment}% { Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here.} \end{document}

  • Text in multicolumn cells does not center in tabularx
    by Alexander Z. on August 14, 2026 at 10:23 am

    I am trying to create a tabularx table with centered content. Everything works as long as each cell is one column wide. But as long as I add multicolumn cells, the centering is skewed. How do I make the content centered properly? MWE: \documentclass[12pt,a4paper]{book} \usepackage{graphicx} % Required for inserting images \usepackage{float} \usepackage{tabularx} \usepackage[a4paper,hmargin=1.0cm,vmargin=1.5cm]{geometry} \newcolumntype{R}{>{\centering\arraybackslash}X} \renewcommand\tabularxcolumn[1]{m{#1}} \usepackage{multicol} \setlength{\columnsep}{1.0pc} \usepackage{multirow} \begin{document} \begin{figure}[H] \centering \begin{minipage}{1.0\textwidth} \Large \centering \begin{tabularx}{\textwidth}{|R|R|R|R|R|R|R|R|R|R|} \hline 30 & 31 & 32 & 33 & 34 & 35 & 36 & 37 & 38 & 39 \\ \hline 40 & 41 & 42 & 43 & 44 & 45 & 46 & 47 & 48 & 49 \\ \hline 50 & 51 & 52 & 53 & 54 & 55 & 56 & 57 & 58 & 59 \\ \hline 60 & (61) & (64) & (85) & (94) & (140) & (162) & \multicolumn{3}{>{\hsize=3\hsize\linewidth=\hsize}R|}{(\emph{on the right:} 163)} \\ \hline \multicolumn{6}{|>{\hsize=6\hsize\linewidth=\hsize}R|}{(\emph{on the left:} 170)} & & & & \\ \hline \end{tabularx} \end{minipage} \end{figure} \end{document} Result:

  • Combining "manyfoot" with "endnotes" package to store two different sets of endnotes
    by BarbarianLunatic on August 14, 2026 at 9:56 am

    I am currently working on a new book and would like to store two different sets of endnotes at the end of the document. One Should go under the Title "Botanical Relevance" and one "Noteworthy Mentions". I have managed at least to set the titles, but I cannot wrap my mind around the formatting. The idea is to predefine two sets of endnotes (one \alph and one \ arabic) with manyfoot and store them in two separate endnote libraries at the end of the document. The endnote libraries should preferably be called with a command like "\theendnotesB" and "\theendnotesN". I tried using "\let\footnoteB=\endnote" and changing it to "\let\footnoteN=\endnote" after having called the first endnote library, but the attempt failed. Any help appreciated. This is the MWE: \documentclass[12pt,draft]{book} \usepackage[ paperwidth=148mm,%242mm, paperheight=210mm, top=17mm, bottom=10mm, inner=15mm, outer=13mm, ]{geometry} \usepackage{nopageno} \usepackage[T1]{fontenc} \usepackage{manyfoot} \usepackage{endnotes} % multifoot Declaration \DeclareNewFootnote{B}[alph] % B = Botanical Relevance \DeclareNewFootnote{N}[arabic] % N = Noteworthy Mentions % How to Create a custom command to store all “B” Notes in one Endnote Library and all “N” Notes in another. \newcommand{\theendnotesB}{ } % not sure how to do this \newcommand{\theendnotesN}{ } % not sure how to do this % Sending "B" footnotes to endnotes library \let\footnoteB=\endnote % this command stores the “B” notes in Endnotes, but also changes them to arabic numbering \begin{document} ...and the Mage picked a white multifaceted flower and said ''Kham\footnoteB{This flower is equivalent to Yarrow (Achillea millefolium) and has the same properties}'' to the stranger, who understood nothing for the moment, but promised to himself quietly that he would learn everything he could from this man, who seemed so strange and yet so resourceful...for he knew that his people were in need of this knowledge\footnoteN{Here it must be mentioned that any man, who strives to become truly wise in the properties of healing plants, is an asset to his people.}.\\ The Moment passed and turned to dust, as everything will do at last, but worry not for life moves on and shows the seeking heart what's strong. %Endnotes Title B \renewcommand{\notesname}{\hphantom{cccccc}Botanical Relevance} %Endnotes B \newpage \begingroup \parindent 0pt \parskip 2ex \def\enotesize{\normalsize} \theendnotes %should probably be a new command → \theendnotesB \endgroup %Endnotes Title N \renewcommand{\notesname}{\hphantom{cccccc}Noteworthy Mentions} \let\footnoteN=\endnote % it was an attempt, but it failed %Endnotes N \newpage \begingroup \parindent 0pt \parskip 2ex \def\enotesize{\normalsize} \theendnotes %should probably be a new command → \theendnotesN \endgroup \end{document} These are the Pages with comments:

  • kpfonts-otf: too much whitespace between integral sign and integrand?
    by Jürgen on August 13, 2026 at 4:16 pm

    Maybe it is a matter of taste, but I think the space between integral sign and integrand is way too large when the kpfonts-otf package is in use: \documentclass{scrartcl} \usepackage{kpfonts-otf} %\usepackage{unicode-math} % loaded automatically by kpfonts-otf \removenolimits{\int} \removenolimits{\oint} \begin{document} \begin{equation} I = \int_0^x S ds \end{equation} \begin{equation} I = \oint_0^x S ds \end{equation} \end{document} This has already been discussed in this question, but I still think the space is not correct. [I am not sure, whether the tags are ok. Pls modify them if necessary.]

  • Problem when defining a new operator for the l3fp module: \fp_tuple_item:nn
    by Jasper Habicht on August 12, 2026 at 3:09 pm

    Note that the aim of this is to add a new operator to the l3fp module of the LaTeX3 kernel and therefore internal functions and reserved prefixes are used throughout the code. Please use this code with the due caution. I try to add a function and operator to the l3fp module that extracts an item from a tuple. I started with defining a public function and underlying internal functions that leave the relevant item of a tuple in the internal fp representation in the input stream. Placed into \fp_eval:n, this results in the intended output (one could also imagine adding \fp_to_decimal:n to this, so it returns the relevant number directly): \documentclass{article} \begin{document} \ExplSyntaxOn \makeatletter % public function \cs_new:Npn \fp_tuple_item:nn #1#2 { \exp_args:Nee \__fp_tuple_item:nn { \__fp_parse:n {#2} } { \__fp_parse:n {#1} } } % internal functions \cs_new:Npn \__fp_tuple_item:nn #1#2 { \__fp_tuple_item_aux:ww #1#2 } \cs_new:Npn \__fp_tuple_item_aux:ww #1 \__fp_sep: { \__fp_tuple_item_select_aux:nw { \__fp_to_int:w #1 \__fp_sep: } } \cs_new:Npn \__fp_tuple_item_select_aux:nw #1 \s__fp_tuple \__fp_tuple_chk:w #2 \__fp_sep: { \int_compare:nNnTF {#1} < 0 { \__fp_tuple_item_select_aux:nw { \__fp_int_eval:w \__fp_array_count:n {#2} + 1 + #1 \__fp_int_eval_end: } \s__fp_tuple \__fp_tuple_chk:w {#2} \__fp_sep: } { \__fp_tuple_item_select_auxi:nw {#1} #2 \s__fp_stop } } \cs_new:Npn \__fp_tuple_item_select_auxi:nw #1 { \int_compare:nNnTF {#1} = 1 { \__fp_tuple_item_select_auxii:w } { \__fp_tuple_item_select_auxiii:nw {#1} } } \cs_new:Npn \__fp_tuple_item_select_auxii:w #1 \__fp_sep: #2 \s__fp_stop { #1 \__fp_sep: } \cs_new:Npn \__fp_tuple_item_select_auxiii:nw #1#2 \__fp_sep: { \__fp_tuple_item_select_auxi:nw { \__fp_int_eval:w #1 - 1 \__fp_int_eval_end: } } \makeatother \fp_eval:n { \fp_tuple_item:nn { ( 1 , 2 ) } { 1 } } % returns 1 \fp_eval:n { \fp_tuple_item:nn { 2 * ( 1 , 2 ) } { 2 } } % returns 4 \fp_eval:n { \fp_tuple_item:nn { ( 1 , 2 , 3 ) } { -1 } } % returns 3 \ExplSyntaxOff \end{document} So far, so good, but now I want to define a new function operator that can be used in an fp expression. The syntax should be item(n,t) where n is the index of the item and t is the tuple. I looked at the implementation of various other functions in the l3fp module such as round() or rand() and came up with the following relatively straight-forward defintion: \cs_new:Npn \__fp_parse_word_item:N { \__fp_parse_function:NNN \__fp_item_o:Nw ? } \cs_new:Npn \__fp_item_o:Nw ? #1 @ { \exp_after:wN \__fp_item_o:w #1 @ } \cs_new:Npn \__fp_item_o:w { \exp_after:wN \__fp_tuple_item_aux:ww } However, this results in an error as eventually \__fp_parse_after:ww does not see the expected tokens. I checked the expansion process up to this point using the unravel package and I can see that I get something along the following lines (<fp> being the relevant internal fp representation): \__fp_parse_after:ww \s__fp <fp> \__fp_sep: @ \exp:w \exp_end_continue_f:w \__fp_parse_infix_end:N \c__fp_prec_end_int \s__fp_expr_stop \exp_end: Other functions return something similar but without \c__fp_prec_end_int which is exactly what \fp__parse_after:ww wants whose argument defintion is #1 @ \__fp_parse_infix_end:N \s__fp_expr_stop #2. Now, I am lost at this point. I can see that my implementation yields the correct fp representation, but I am unable to find the reason why \c__fp_prec_end_int (along with \exp:w \exp_end_continue_f:w) is left in the stream and what I should do to remove this. Full MWE: \documentclass{article} \begin{document} \ExplSyntaxOn \makeatletter % public function \cs_new:Npn \fp_tuple_item:nn #1#2 { \exp_args:Nee \__fp_tuple_item:nn { \__fp_parse:n {#2} } { \__fp_parse:n {#1} } } % internal functions \cs_new:Npn \__fp_tuple_item:nn #1#2 { \__fp_tuple_item_aux:ww #1#2 } \cs_new:Npn \__fp_tuple_item_aux:ww #1 \__fp_sep: { \__fp_tuple_item_select_aux:nw { \__fp_to_int:w #1 \__fp_sep: } } \cs_new:Npn \__fp_tuple_item_select_aux:nw #1 \s__fp_tuple \__fp_tuple_chk:w #2 \__fp_sep: { \int_compare:nNnTF {#1} < 0 { \__fp_tuple_item_select_aux:nw { \__fp_int_eval:w \__fp_array_count:n {#2} + 1 + #1 \__fp_int_eval_end: } \s__fp_tuple \__fp_tuple_chk:w {#2} \__fp_sep: } { \__fp_tuple_item_select_auxi:nw {#1} #2 \s__fp_stop } } \cs_new:Npn \__fp_tuple_item_select_auxi:nw #1 { \int_compare:nNnTF {#1} = 1 { \__fp_tuple_item_select_auxii:w } { \__fp_tuple_item_select_auxiii:nw {#1} } } \cs_new:Npn \__fp_tuple_item_select_auxii:w #1 \__fp_sep: #2 \s__fp_stop { #1 \__fp_sep: } \cs_new:Npn \__fp_tuple_item_select_auxiii:nw #1#2 \__fp_sep: { \__fp_tuple_item_select_auxi:nw { \__fp_int_eval:w #1 - 1 \__fp_int_eval_end: } } % operator defintion \cs_new:Npn \__fp_parse_word_item:N { \__fp_parse_function:NNN \__fp_item_o:Nw ? } \cs_new:Npn \__fp_item_o:Nw ? #1 @ { \exp_after:wN \__fp_item_o:w #1 @ } \cs_new:Npn \__fp_item_o:w { \exp_after:wN \__fp_tuple_item_aux:ww } \makeatother \fp_eval:n { item ( 1 , ( 1 , 2 ) ) } \ExplSyntaxOff \end{document}

  • Text disappears in tabularray with bg color (polyglossia)
    by user446526 on August 12, 2026 at 9:25 am

    I am typesetting an Arabic document using XeLaTeX and the polyglossia package. I am trying to build a table using the tabularray package. The Problem: Whenever I apply a background color to a specific row using the bg key (e.g., row{1} = {bg=blue!20}), the Arabic text inside that row completely disappears in the output PDF. The text in the other rows (which do not have a background color) renders perfectly fine. It seems like a layering or grouping issue where the bidi package (loaded by polyglossia) conflicts with tabularray's drawing engine, causing the colored box to either cover the text or push the RTL text out of bounds. I have already tried: Removing font=\bfseries from the row settings. Using manual \textbf{} inside the cells. Wrapping the text in \mbox{}. Using \SetCell{bg=blue!20} instead of row{1}. None of these solved the issue; as long as the background color is present, the text vanishes. Minimum Working Example (MWE): \documentclass{article} \usepackage{xcolor} \usepackage{tabularray} % RTL Setup \usepackage{polyglossia} \setmainlanguage{arabic} \setmainfont{Amiri} % Standard Arabic font for testing \begin{document} \begin{center} \begin{longtblr}{ colspec = {|X[c,m,1.6]|X[c,m,1.4]|X[c,m,1.4]|}, hlines, vlines, row{1} = {bg=blue!20, rowsep=5pt}, % The text in this row disappears rowsep=8pt } \textbf{النهاية} & \textbf{التفسير الهندسي} & \textbf{التمثيل البياني} \\ Text appears here & Text appears here & Text appears here \\ \end{longtblr} \end{center} \end{document}

  • How to get WebOMints GD to work in LuaLaTeX
    by Maronite Monks on August 11, 2026 at 8:42 pm

    I'm running an antique MacOS (mojave) with MacTeX 2022 installed. The MWE below compiles successfully with XeLaTeX, but with LuaLaTeX, I get the following message: kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 WebOMintsGD mktexpk: don't know how to create bitmap font for WebOMintsGD. mktexpk: perhaps WebOMintsGD is missing from the map file. kpathsea: Appending font creation commands to missfont.log. ! error: (file WebOMintsGD) (type 3): font WebOMintsGD at 600 not found ! ==> Fatal error occurred, no output PDF file produced! What does LuaLaTeX want me to do to make this work? %%%%%%%%%%%%%%%%%%%%%%%% \documentclass{memoir} \usepackage{fontspec} \newfontfamily\wb{WebOMints GD} \pagestyle{empty} \begin{document} \wb ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz \end{document}

  • Title ends with two periods using apacite
    by Mirlan on August 11, 2026 at 6:39 pm

    I'm citing a popular online dictionary: \documentclass{article} \usepackage[natbibapa]{apacite} \begin{filecontents}{\jobname.bib} @inbook {MWOganesson, author = {Merriam-Webster}, title = {Oganesson}, book = {Merriam-Webster.com dictionary}, url = {https://www.merriam-webster.com/dictionary/oganesson} } \end{filecontents} \begin{document} The word ``oganesson'' is stressed on the third syllable \citep{MWOganesson}. \bibliographystyle{apacite} \bibliography{\jobname} \end{document} In the output, the title is printed as "Oganesson.." with two periods. Is a workaround known?