• tikz: absolute coordinates of a node placed in a second node positioned relative to a third node
    by pluton on June 10, 2026 at 4:18 pm

    A MWE is probably better than lengthy explanations: \documentclass[tikz,10pt]{standalone} \usetikzlibrary{positioning} % savedbox with a sketch \newsavebox{\sdbox} \sbox{\sdbox}{% \begin{tikzpicture}[scale=0.35] \node (rbox) [fill=red] at (1,0) {}; \node (bbox) [fill=blue] at (1,1) {}; \end{tikzpicture}% } \begin{document} \begin{tikzpicture}[scale=0.5,font=\small] % blocks \node (comp) {computer}; \node[right = 1cm of comp] (sb) {\usebox{\sdbox}}; % arrow \draw[->] (rbox) -- (comp); \end{tikzpicture} \end{document} Upon compilation, you'll notice that the arrow does not link the node (rbox) from its absolute position after the node (sb) is drawn, as it should go from the red rectangle to the computer box. Would it be possible to achieve that goal?

  • How do I directly input foreign scripts into LuaLaTeX equations?
    by Sageof6Paths on June 10, 2026 at 4:03 pm

    How do I directly input foreign scripts into LuaLaTeX equations? I'm using LuaLaTeX with the unicode-math package. I have text mode setup that uses fallback font for any glyphs not covered. I also want to do the same for math mode, but with different font choices. I'm currently unable to input a foreign script like Kanji and Thai without adding commands like \text{} around it, despite having fonts that support Kanji and Thai. I want to be able to input scripts like Kanji and Thai into equations without extra commands as long as I have the proper font for it. \documentclass{article} \usepackage{unicode-math} \directlua{ luaotfload.add_fallback ("textFallback", { "SimSun:mode=harf;", } ) } \setmainfont{Arial}[RawFeature={fallback=textFallback}] \setmathfont{Latin Modern Math} \begin{document} This is a sample text. この文章は日本語です。 $∀天∈ℝ, ∀ค∈ℝ, 天+ค∈ℝ$ \end{document} Edit: Added clarification and included the Thai script.

  • Good way to write dynamical physics problems
    by Rassine Orange on June 10, 2026 at 3:58 pm

    I'm a physics teacher and I'd like to share here my way to write "dynamical" exercises. After posting a couple of questions more or less related, I've read comments implying that my way of doing could be improved. When I say "dynamical" I mean that the variables of my problem (\mass, \speed, ...) are coded in the questions. I don't wanna hard-code for the following reasons: If I write everything with, say, m=3kg, and then I wanna change to m=2kg, I don't wanna rewrite everything. I can reuse the questions very fast with different values, e.g. for exams or for the students to practise. Below a MWE of a "typical" problem. Please, do not focus on the Physics, but on the LaTeX ideas, mainly: Could I improve the way I store variables and compute other quantities? For the units, which command should I use: mathrm; text ; textup; ... ? Anything else? I want to make clear that, even if in this example I use basic maths (mainly the 4 operations), I typically need all the usual fonctions (powers, log, sqrt, exp, trigo), so any solution that you suggest should handle all these functions. \documentclass{article} \usepackage{xfp} % provides \fpeval \usepackage{amsmath} \begin{document} \def\mass{3} \def\speed{10} \def\distance{1} \edef\Ekin{\fpeval{0.5*\mass*\speed^2}} \edef\force{\fpeval{0.5*\mass*\speed^2/\distance}} A mass $m=\mass\, \mathrm{kg}$ starts moving from rest. After a distance $d=\distance\, \textup{m}$ its velocity is $\speed\, \text{m} \times \text{s}^{-1}$\,. Compute the force. \vspace{5cm} Solution First you compute the kinetic energy $$ E=\frac 12 mv^2 = \Ekin\, \mathrm{J} $$ blabla more details, more equations, blablabla Use the work theorem to find $$ F=\frac{mv^2}{2d} = \force\, \mathrm{N}\,. $$ \end{document} Community Edit: Current output

  • rowcolor not fill properly when \multicolumn comes
    by MadyYuvi on June 10, 2026 at 1:47 pm

    In my table, column heads are in shade and the text should be in white color, and the table body have alternative shades, I've try with: \documentclass{article} \usepackage{tabularx} \usepackage[table]{xcolor} \begin{document} \newcommand{\colhead}[1]{\color{white}#1} \newcolumntype{P}[1]{>{\raggedright\arraybackslash}p{#1}}% \def\toprule{\rowcolor{black!70}} \def\midrule{\relax} \rowcolors{0}{black!10}{black!20}% \arrayrulecolor{white} \setlength{\arrayrulewidth}{1pt} \begin{table} \caption{Party identification, by social characteristics, 2024} \begin{tabularx}{\textwidth}{ P{50pt}| P{45pt}|X|X|X|X|X|X|} \toprule \colhead{Category (Percentage of Sample)} &\multicolumn{2}{X}{\colhead{Democrats}} &\multicolumn{3}{X}{\colhead{Independents}} &\multicolumn{2}{X}{\colhead{Republicans}}\\ \toprule \colhead{} & \colhead{Strong} & \colhead{Weak} & \colhead{Lean Dem} & \colhead{Pure} & \colhead{Lean Rep} & \colhead{Weak} & \colhead{Strong}\\ \hline \midrule Men\index{Men} (48) & 20 & 9 & 17 & 5 & 20 & 10 & 19\\ \hline Women\index{Women} (52) & 24 & 16 & 16 & 6 & 13 & 9 & 16\\ \hline Whites (72) & 21 & 10 & 12 & 6 & 14 & 12 & 26\\ \hline \end{tabularx} \end{table} \end{document} when \multicolumn comes, shades for column heads not coming properly: Please advise.

  • Custom optional parameters for classes in LaTeX
    by Zerina on June 10, 2026 at 9:46 am

    I have customized a MyReport.cls file with a custom optional parameter "Reference", which functions as follows: It defaults to None. If the user passes a bib file path via \documentclass[Reference={ref.bib}]{MyReport}, then execute: \RequirePackage[hyperref=true,backend=biber,url=false,doi=false,sorting=none,style=gb7714-2015]{biblatex} \AtBeginDocument{\addbibresource{ref.bib}} \AtEndDocument{\printbibliography[heading=bibintoc]} How can I implement this feature? Here is the MyReport.cls \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} \ProvidesClass{MyReport}[2024/01/01 v1.0.0 My custom report class] \def\xjtuthesis{MyReport} \def\meta@version{1.0.0} \def\metaversion{\meta@version} \newcommand{\MyReport@bibfile}{} \DeclareOption{Reference}{ \renewcommand{\MyReport@bibfile}{#1} } \ProcessOptions\relax \LoadClass[twoside]{article} \RequirePackage[zihao=-4]{ctex} \RequirePackage[a4paper,left=2.54cm,right=2.54cm,top=3.18cm,bottom=3.18cm]{geometry} \RequirePackage[hidelinks,bookmarksnumbered=true]{hyperref} \makeatletter \ifx\MyReport@bibfile\@empty % do nothing \else \RequirePackage[hyperref=true,backend=biber,url=false,doi=false,sorting=none,style=gb7714-2015]{biblatex} \AtBeginDocument{\addbibresource{\MyReport@bibfile}} \AtEndDocument{ \clearpage \printbibliography[heading=bibintoc] } \fi \makeatother and the below is the main.tex \documentclass[Reference={ref.bib}]{MyReport} \begin{document} \section{test} text\cite{Deb2014} \end{document} the ref.bib: @article{Deb2014, title = {An {{Evolutionary Many-Objective Optimization Algorithm Using Reference-Point-Based Nondominated Sorting Approach}}, {{Part I}}: {{Solving Problems With Box Constraints}}}, shorttitle = {An {{Evolutionary Many-Objective Optimization Algorithm Using Reference-Point-Based Nondominated Sorting Approach}}, {{Part I}}}, author = {Deb, Kalyanmoy and Jain, Himanshu}, date = {2014-08}, journaltitle = {IEEE Transactions on Evolutionary Computation}, shortjournal = {IEEE Trans. Evol. Computat.}, volume = {18}, number = {4}, pages = {577--601}, issn = {1089-778X, 1089-778X, 1941-0026}, doi = {10.1109/TEVC.2013.2281535}, url = {http://ieeexplore.ieee.org/document/6600851/}, urldate = {2025-11-08}, langid = {english} } No matter how I try, although the compilation does not report an error, it prompts: LaTeX: Unused global option(s): [Reference]. LaTeX: Empty bibliography. In fact, there is no "References" section, as if the operation to generate the references was not executed. How can I solve this problem? Note: \documentclass{MyReport} \addbibresource{ref.bib} \begin{document} \section{test} text\cite{Deb2014} \printbibliography[heading=bibintoc] \end{document} This main.tex can be compiled successfully, indicating that the basic functionalities of ref.bib and MyReport.cls are correct.

  • Make a special integral symbols in tikz
    by mathrm alpha on June 10, 2026 at 8:34 am

    Although you can draw \int extended parts "\qsymb" in Tikz, it doesn't fit when zoomed in with math-mode. \documentclass{article} \usepackage{tikz} \usepackage{graphicx} \usepackage{amsmath} \usepackage[margin=0.5in]{geometry} \newcommand{\qsymb}{% \mathbin{ \vcenter{\hbox{ \scalebox{0.075}{ \begin{tikzpicture}[line width=2.5pt, line cap=round, line join=round, yscale=0.6] \draw (0.2, 2.4) -- (2.7, 3.9) -- (4.7, 2.9) -- (2.2, 1.4) -- cycle; \draw (2.2, 1.4) -- (4.2, 0.4) -- (1.7, -0.6) -- (-0.3, 0.4) -- cycle; \end{tikzpicture}% }% }}% }% } \newcommand{\qint}{\int\!\!\!\!\!\!\!\!\qsymb} \newcommand{\qiint}{\iint\!\!\!\!\!\!\!\!\!\!\qsymb} \begin{document} $A \qint B \qiint C$\\ $$A \qint B \qiint C$$ \end{document}

  • flipped \sum symbols
    by mathrm alpha on June 10, 2026 at 7:57 am

    I found that using it this way doesn't result in the same subscript and superscript positions as \sum, and it's even crooked, which is really undesirable. % Source - https://tex.stackexchange.com/a/689279 % Posted by egreg % Retrieved 2026-06-10, License - CC BY-SA 4.0 % Code modified by: @mathrm alpha \documentclass{article} \usepackage{amsmath,graphicx} \makeatletter \NewDocumentCommand{\flippedsum}{e{_^}}{% \mathop{\mathpalette\flippedsum@{{#1}{#2}}}% } \NewDocumentCommand{\flippedsum@}{mm}{% \flippedsum@@#1#2% } \NewDocumentCommand{\flippedsum@@}{mmm}{% \begingroup \sbox\z@{$\m@th#1\sum$}% \reflectbox{\usebox\z@}% \IfValueT{#2}{% subscript _{#2}% }% \IfValueT{#3}{% superscript ^{\kern-\ifx#1\displaystyle0.5\else0.4\fi\wd\z@#3}% }% \endgroup } \makeatother \begin{document} \[ \flippedsum_a^b \] \begin{center} $\flippedsum_a^b$\\ $\scriptstyle\flippedsum_a^b$\\ $\scriptscriptstyle\flippedsum_a^b$ \end{center} \end{document} References: Superscript horizontal alignment on flipped integral symbol

  • Why loading autobreak package breaks code even when not using the command?
    by Nasser on June 10, 2026 at 7:05 am

    This old code used to compile OK. \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} Substituting $\sqrt{-x}$ in first equation gives% \begin{align} y-e^{\frac{\sqrt{-x}}{-x-x}} & =0\nonumber\\ y & =e^{\frac{\sqrt{-x}}{-2x}}\nonumber\\ \ln y & =\frac{\sqrt{-x}}{-2x}\nonumber\\ \left( \ln y\right) ^{2} & =\frac{-x}{4x^{2}}\nonumber\\ 4x\left( \ln y\right) ^{2}+1 & =0\nonumber\\ y_{s} & =\left\{ \begin{array} [c]{c}% e^{\frac{-i}{2\sqrt{x}}}\\ e^{\frac{i}{2\sqrt{x}}}% \end{array} \right. \tag{4}% \end{align} \end{document} Compiling gives no error: >lualatex 9.tex This is LuaHBTeX, Version 1.24.0 (TeX Live 2026) restricted system commands enabled. (./9.tex LaTeX2e <2025-11-01> L3 programming layer <2026-03-20> (/usr/local/texlive/2026/texmf-dist/tex/latex/base/article.cls Document Class: article 2025/01/22 v1.4n Standard LaTeX document class ... Output written on 9.pdf (1 page, 73469 bytes). Transcript written on 9.log. > But when changing preamble to this \usepackage{amsmath} \usepackage{autobreak} %added this with no code change at all, Now lualatex gives error >lualatex 9.tex This is LuaHBTeX, Version 1.24.0 (TeX Live 2026) restricted system commands enabled. (./9.tex LaTeX2e <2025-11-01> L3 programming layer <2026-03-20> (/usr/local/texlive/2026/texmf-dist/tex/latex/base/article.cls Document Class: article 2025/01/22 v1.4n Standard LaTeX document class (/usr/local/texlive/2026/texmf-dist/tex/latex/base/size12.clo)) (/usr/local/texlive/2026/texmf-dist/tex/latex/amsmath/amsmath.sty For additional information on amsmath, use the `?' option. (/usr/local/texlive/2026/texmf-dist/tex/latex/amsmath/amstext.sty (/usr/local/texlive/2026/texmf-dist/tex/latex/amsmath/amsgen.sty)) (/usr/local/texlive/2026/texmf-dist/tex/latex/amsmath/amsbsy.sty) (/usr/local/texlive/2026/texmf-dist/tex/latex/amsmath/amsopn.sty)) (/usr/local/texlive/2026/texmf-dist/tex/latex/autobreak/autobreak.sty (/usr/local/texlive/2026/texmf-dist/tex/generic/catchfile/catchfile.sty (/usr/local/texlive/2026/texmf-dist/tex/generic/infwarerr/infwarerr.sty) (/usr/local/texlive/2026/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty) (/usr/local/texlive/2026/texmf-dist/tex/generic/etexcmds/etexcmds.sty (/usr/local/texlive/2026/texmf-dist/tex/generic/iftex/iftex.sty)))) (/usr/local/texlive/2026/texmf-dist/tex/latex/l3backend/l3backend-luatex.def) (./9.aux) ! Missing # inserted in alignment preamble. <to be read again> \cr l.22 \end{align} ? Notice there is no usage of the autobreak command in code. Only loading the package itself causes this error. Is this supposed to happen? Or is this a bug? TL 2026 on Linux ps. please do not complain about the code itself. It is auto-generated by external software.

  • How to change arrow style for a NPN component in CircuiTikZ
    by Forrest on June 10, 2026 at 1:35 am

    I want to change the arrow style of NPN when I use circuiTikz. I read the manual of CircuiTikz. All I found is that: I can only change the arrow position in 4.15.5.2 \ctikzset{transistors/arrow pos=end} It do change the position of arrow. Then, I tried to change the arrow style. I tried the following ways: \draw (7, 0) node[npn, scale=2.0, flow arrow/.style={->, >=Stealth}] (T) {}; \ctikzset{bipoles/npn/arrow/.style={>=Stealth}} None works! Could you kindly give me a solution? Thanks!

  • Compression for subequations parent numbers with cleveref
    by Jonk on June 9, 2026 at 5:15 pm

    With TeX Live 2024 cleveref can compress cross-references including subequations parent numbers, like so: \documentclass{article} \usepackage{amsmath} \usepackage{cleveref} \begin{document} \begin{subequations}\label{eqn:one} \begin{align} a\label{eqn:onea}\\ b\label{eqn:oneb} \end{align} \end{subequations} \begin{align} c\label{eqn:two}\\ d\label{eqn:three} \end{align} \cref{eqn:one,eqn:two,eqn:three} \end{document} The \cref command gives as desired eqs. (1) to (3) However, with TeX Live 2025 and 2026, the compression does not occur and I get eqs. (1), (2) and (3) Is there a way to obtain the compressed output with TeX Live 2025 and 2026, without explicitly requiring a range (e.g., with \crefrange)? (This question is similar to this one, but the answer seems to indicate that I shouldn't get the compressed output with TeX Live 2024, which I do.)

  • autobreak. How make all lines flush to left when first line is long?
    by Nasser on June 9, 2026 at 12:17 pm

    Consider this MWE \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{autobreak} \begin{document} \begin{align*} \begin{autobreak} A= (x + a + b +c+d+e+f+g) +y +z +(x + a + b +c+d+e+f+g) +e +d \end{autobreak} \end{align*} \end{document} Compile with lualatex gives I do not know how to make the output something like this (*), i.e. shift second and the rest of the lines more to the left. Using \MoveEqLeft from mathtools made it worst \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{autobreak} \usepackage{mathtools} %\MoveEqLeft \begin{document} \begin{align*} \MoveEqLeft \begin{autobreak} A= (x + a + b +c+d+e+f+g) +y +z +(x + a + b +c+d+e+f+g) +e +d \end{autobreak} \end{align*} \end{document} Without modifying the lines themselves inside the autobreak manually by rewriting them, is it possible to obtain the desired output shown above in (*) by adding something in preamble or some other option for autobreak? Lualatex, TL 2026

  • How to make the parenthesis around equation number be colorful and hyperlinked too when using \eqref?
    by M. Logic on June 9, 2026 at 11:07 am

    A minimal working sample is as follows. \documentclass{article} \usepackage{amsmath} \usepackage[colorlinks=true]{hyperref} %\makeatletter %\def\tagform@#1{\maketag@@@{(\ignorespaces#1\unskip\@@italiccorr)}} %\DeclareRobustCommand{\eqref}[1]{\textup{\tagform@{\ref{#1}}}} %\makeatother \begin{document} \begin{equation}\label{eq} 1+2=3 \end{equation} TEXT \eqref{eq} TEXT \end{document} As you see, when using \eqref on the equation number, it produce only colorful equation number but black parenthesis, and also it produce a hyperlink only on equation number but including no parenthesis. Then how to make the parenthesis around equation number be colorful and hyperlinked too when using \eqref? I hope, the color could change when I reset linkcolor in hyperref. is it possible to redefine some setting to make the equation number be around with parenthesis when using \ref? In this case I think the parenthesis must be colorful and hyperlinked too.

  • Incompatibility between memoize and luacolor
    by PHL on June 9, 2026 at 5:13 am

    The following MWE compile correctly, but if luacolor is uncommented the triangle is black instead of red. % !TEX TS-program = lualatex \documentclass{article} \usepackage{memoize} %\usepackage{luacolor} \usepackage{tikz} \begin{document} \begin{tikzpicture} \fill[red] (0,0)--(1,1)--(2,0)--cycle; \end{tikzpicture} \end{document} Is there a workaround? Or is this a bug in memoize and/or luacolor? (luacoloris needed for kerning reasons, that do not show in the above MWE.)

  • How can I get less than one frame per second in \animategraphics?
    by Jasper on June 9, 2026 at 3:50 am

    How can I get less than one frame per second in \animategraphics? \documentclass{article} \usepackage{animate} \usepackage{graphicx} \begin{document} \animategraphics{ % a framerate less than one, say 1/3. }{cow}{}{} \end{document}

  • ltx-talk overlay and tcolorbox?
    by Richard Wong on June 8, 2026 at 3:25 pm

    I'm trying to modify the theorem environment in ltx-talk so that it visually resembles the theorem environment in beamer. I was able to do so using talkthemetcolorbox. However, my attempt breaks the uncover overlay specification in a way that I don't quite understand. (MWE example below) \DocumentMetadata{tagging = on} \documentclass[aspect-ratio=4:3]{ltx-talk} \usepackage{talkthemetcolorbox} %Create a custom tcolorbox style for theorems \newtcolorbox{mythmbox}[1]{ title=#1, boxrule=0pt, enhanced, } \newtheorem{theorem}{Theorem} \RenewDocumentEnvironment{theorem}{D<>{all} +m}{ \begin{uncoverenv}<#1> \begin{mythmbox}{Theorem (#2)} }{ \end{mythmbox} \end{uncoverenv} } \begin{document} \begin{frame} Text \pause \begin{theorem}<3->{Pythagoras} The square of the hypotenuse is equal to the sum of the squares of the other two sides: \[ a^2 + b^2 = c^2 \] \end{theorem} Text \end{frame} \end{document} The code above changes the theorem environment visually as I desire, but it doesn't have the intended uncover behavior. (e.g. I see the theorem on all three slides). However, the code does have the right visual theorem environment and respects the overlay if I replace uncoverenv with onlyenv. (e.g. I see the theorem only on slide 3, but the spacing on slide 2 is not what I desire). It also has the right uncover behavior, but the wrong visual theorem environment if I replace D<>{all} +m with d<>{all} +m. (e.g. I see the theorem only on slide 3 , and the spacing on slide 2 is right, but there is no tcolorbox).

  • Hyperref and xindy with new hyperxindexformat
    by Francesco Endrici on June 8, 2026 at 1:13 pm

    I have a file written about 10 years ago that at the moment is not working on an updated Texlive2026 due to a problem with the new \hyperxindexformat command of hyperref. This is a mwe \documentclass{article} \usepackage{imakeidx} \makeindex[name=alfabetico,title=Indice alfabetico,program=truexindy,options=-M texindy -C utf8 -L italian -M xindystyle] \newcounter{mynum} \newcommand{\mystring}[1]{% \stepcounter{mynum} #1.\themynum \index[alfabetico]{#1|textit{\themynum}}} \usepackage{hyperref} \begin{document} \mystring{pear} \mystring{apricot} \pagebreak \mystring{apple} \printindex[alfabetico] \end{document} (of course my real command is not \textit 🙂 ) If I compile his with lualatex I get an .idx file like: \indexentry{pear|hyperxindexformat{\textit{1}}}{1} \indexentry{apricot|hyperxindexformat{\textit{2}}}{1} \indexentry{apple|hyperxindexformat{\textit{3}}}{2} and when I run the command xindy -M texindy -C utf8 -L italian -M xindystyle alfabetico.idx I receive the error WARNING: unknown cross-reference-class `hyperxindexformat'! (ignored) and no valid .ind file is generated. If I manually change hyperxindexformat to hyperindexformat I get what I want. Any idea? xindystyle.xdy follows: ;; $Id: xindystyle.xdy,v 0.1 2015_10_25 Endrici $ ;; Define all attributes appearing in your document. Your attributes ;; are all encapsulators you use in your \index commands following the ;; vertical bar sign `|'. For example `foo' is the attribute in the ;; command \index{...|foo}. Here you specify the set of attributes ;; that appear in your document, the order in which they appear in the ;; index and which one superdes the other. ;; (define-crossref-class "indexanchor") (markup-crossref-list :class "indexanchor" :open "\indexanchor{" :sep ";" :close "}" ) (markup-index :open "\begin{theindex}~n \providecommand*\lettergroupDefault[1]{} \providecommand*\lettergroup[1]{% \par\penalty-50\textbf{#1}\nopagebreak }" :close "~n~n\end{theindex}~n" :tree) ;; The indexentries (item_<..> specifiers) (markup-indexentry :open "~n \item " :depth 0) (markup-indexentry :open "~n \subitem " :depth 1) (markup-indexentry :open "~n \subsubitem " :depth 2) ;; Location-references (markup-locclass-list :open "\dotfill" :sep ", ") (markup-crossref-layer-list :class "see" :sep ", ") ;; delim_n <string> ", " (markup-locref-list :sep "," :class "see") ;; delim_r <string> "--" (markup-range :sep "--") ;; Local Variables: ;; mode: lisp ;; End :

  • ⅌ apply in tikz text symbols?
    by mathrm alpha on June 8, 2026 at 11:58 am

    The original drawing instructions in ⅌: \documentclass{article} \usepackage{tikz} \usepackage[margin=0.5in]{geometry} \begin{document} \centering \begin{tikzpicture}[scale=2] % The stylized symbol is a calligraphic character, likely a script 'P' or 'V' with an ellipse. % We recreate it using thick paths and curves. % 1. The horizontal ellipse \draw[line width=6pt] (0.4, 0) ellipse (2.2 and 0.7); % 2. The main "U" shape (the stems) % Left stem starts from the flourish, goes down, curves at the bottom, and goes up to form the right stem. \draw[line width=14pt, line cap=round] (-0.6, 1.5) .. controls (-0.6, -3.2) and (0.6, -3.2) .. (0.6, 1.5); % 3. The flourish on the top left % A decorative hook and a small "bud" on top of the left stem. \draw[line width=14pt, line cap=round] (-0.6, 1.5) .. controls (-1.8, 2.8) and (-3.0, 1.5) .. (-2.2, 1.2); \fill (-0.5, 1.9) circle (0.25); % 4. The large loop on the right (completing the 'P' shape) % It starts from the top of the right stem, loops over to the right, and curves back down. \draw[line width=14pt, line cap=round] (0.6, 1.5) .. controls (0.6, 4.2) and (3.5, 3.2) .. (3.5, 0.5) .. controls (3.5, -0.8) and (2.5, -1.2) .. (1.8, -1.0); \end{tikzpicture} \end{document} However, after reading his/her command usage, This convert to can typed ⅌ text symbols method doesn't seem to work for multiple overlapping shapes in tikz (or maybe I just don't know how to use it). Is there better method to declare tikz picture with proper baseline and fontsize?

  • How can xeCJK expand its support to include "new standard Unihan characters"?
    by mathrm alpha on June 8, 2026 at 8:52 am

    The font is available as long as you type something like U+323B0, but xeCJK does not provide the newer CJK font standard (for example: CJK Unified Ideographs Extension J standard in Unicode 17.0). \documentclass{article} \usepackage{xeCJK} \setCJKmainfont{Jigmo3.ttf} \begin{document} xeCJK: \symbol{"323B0}\\ fontspec: \fontspec{Jigmo3.ttf}{\symbol{"323B0}} % U+323B0 Must force the display using fontspec. \end{document}

  • Example of how to set up a custom tagged structure
    by David Purton on June 8, 2026 at 3:29 am

    I'm trying to learn how to set up tagging for a document with a custom structure. For example, consider a document containing a quotation from the Bible. This has built in structure with things like chapters, verses, (potentially headings), different layouts, and maybe a reference at the end. At a minimum, I need to use the new block code to set up the blocks. But I'm guessing I also need to tag other elements like chapters and verses. But there's still minimal examples out there of how to do all this. If I want to to support tagging in my scripture package, I need to make good design decisions up front. And I don't really know what I'm doing. Here's a MWE example showing a basic structure for a quote from the Bible along with my best guesses relating to tagging. I'm interested in knowing if I'm on the right track or not, things that should be done differently or anything else to be aware of. MWE \DocumentMetadata{ lang=en, pdfstandard=ua-2, tagging=on } \documentclass{article} \pagestyle{empty} \DeclareInstance{blockenv}{scripture/main}{std} { , name = scripture/main , transparent-level = true , max-inner-levels = 0 , block-instance = scripture/main } \DeclareInstance{block}{scripture/main-1}{std} { , begin-vspace = 0pt , begin-extra-vspace = 0pt , left-margin = 0pt , right-margin = 0pt , para-indent = \parindent } \DeclareInstance{blockenv}{scripture/poetry}{std} { , name = scripture/poetry , transparent-level = true , max-inner-levels = 0 , block-instance = scripture/poetry , tagging-suppress-paras = true , final-code = \obeylines\ignorespaces } \DeclareInstance{block}{scripture/poetry-1}{std} { , begin-vspace = \medskipamount , begin-extra-vspace = 0pt , left-margin = 2em , right-margin = 0pt } \NewDocumentEnvironment{scripture}{o} {\SimpleBlockEnv{scripture/main}{}} { \IfNoValueF{#1}{% \par \reference{#1}}% \BlockEnvEnd } \NewDocumentEnvironment{poetry}{!O{}} {\SimpleBlockEnv{scripture/poetry}{#1}} {\BlockEnvEnd} \NewStructureName{scripture/reference} \AssignStructureRole{scripture/reference}{Span} \NewStructureName{scripture/chapter} \AssignStructureRole{scripture/chapter}{Span} \NewStructureName{scripture/verse} \AssignStructureRole{scripture/verse}{Span} \NewDocumentCommand\reference{m} {% \begingroup \leavevmode \UseTaggingSocket{inline/begin}{tag=\UseStructureName{scripture/reference}}% \hfill\textbf{(#1)}% \UseTaggingSocket{inline/end}% \endgroup } \NewDocumentCommand\ch{m} {% \begingroup \leavevmode \UseTaggingSocket{inline/begin}{tag=\UseStructureName{scripture/chapter}}% \textbf{#1}\kern0.5em% \UseTaggingSocket{inline/end}% \endgroup } \NewDocumentCommand\vs{m} {% \begingroup \leavevmode \UseTaggingSocket{inline/begin}{tag=\UseStructureName{scripture/verse}}% \textsuperscript{#1}% \UseTaggingSocket{inline/end}% \endgroup } \begin{document} \begin{scripture}[Book 1:1--5] \ch{1}A chapter start. \vs{2}A verse. A paragraph. \begin{poetry} \vs{3}A line Another line \vs{4}A line Another line \end{poetry} \vs{5}Another verse. \end{scripture} \end{document} Here's the output from show-pdf-tags: Document (http://iso.org/pdf2/ssn): └─text-unit (https://www.latex-project.org/ns/dflt) / Part (http://iso.org/pdf2/ssn): └─Div (http://iso.org/pdf2/ssn): ├─text-unit (https://www.latex-project.org/ns/dflt) / Part (http://iso.org/pdf2/ssn): │ └─text (https://www.latex-project.org/ns/dflt) / P (http://iso.org/pdf2/ssn): │ ┝━━Attributes: │ │ └/Layout: │ │ └TextAlign: "Justify" │ ├─Span (http://iso.org/pdf2/ssn): │ │ └─Marked content on page 1: 1 │ ├─Marked content on page 1: A chapter start. │ ├─Span (http://iso.org/pdf2/ssn): │ │ └─Span (http://iso.org/pdf2/ssn): │ │ ┝━━Attributes: │ │ │ └/Layout: │ │ │ └TextPosition: "Sup" │ │ └─Marked content on page 1: 2 │ └─Marked content on page 1: A verse. ├─text-unit (https://www.latex-project.org/ns/dflt) / Part (http://iso.org/pdf2/ssn): │ └─text (https://www.latex-project.org/ns/dflt) / P (http://iso.org/pdf2/ssn): │ ┝━━Attributes: │ │ └/Layout: │ │ └TextAlign: "Justify" │ └─Marked content on page 1: A paragraph. ├─text-unit (https://www.latex-project.org/ns/dflt) / Part (http://iso.org/pdf2/ssn): │ └─Div (http://iso.org/pdf2/ssn): │ ├─text (https://www.latex-project.org/ns/dflt) / P (http://iso.org/pdf2/ssn): │ │ ┝━━Attributes: │ │ │ └/Layout: │ │ │ └TextAlign: "Justify" │ │ ├─Span (http://iso.org/pdf2/ssn): │ │ │ └─Span (http://iso.org/pdf2/ssn): │ │ │ ┝━━Attributes: │ │ │ │ └/Layout: │ │ │ │ └TextPosition: "Sup" │ │ │ └─Marked content on page 1: 3 │ │ └─Marked content on page 1: A line │ ├─text (https://www.latex-project.org/ns/dflt) / P (http://iso.org/pdf2/ssn): │ │ ┝━━Attributes: │ │ │ └/Layout: │ │ │ └TextAlign: "Justify" │ │ └─Marked content on page 1: Another line │ ├─text (https://www.latex-project.org/ns/dflt) / P (http://iso.org/pdf2/ssn): │ │ ┝━━Attributes: │ │ │ └/Layout: │ │ │ └TextAlign: "Justify" │ │ ├─Span (http://iso.org/pdf2/ssn): │ │ │ └─Span (http://iso.org/pdf2/ssn): │ │ │ ┝━━Attributes: │ │ │ │ └/Layout: │ │ │ │ └TextPosition: "Sup" │ │ │ └─Marked content on page 1: 4 │ │ └─Marked content on page 1: A line │ └─text (https://www.latex-project.org/ns/dflt) / P (http://iso.org/pdf2/ssn): │ ┝━━Attributes: │ │ └/Layout: │ │ └TextAlign: "Justify" │ └─Marked content on page 1: Another line ├─text-unit (https://www.latex-project.org/ns/dflt) / Part (http://iso.org/pdf2/ssn): │ └─text (https://www.latex-project.org/ns/dflt) / P (http://iso.org/pdf2/ssn): │ ┝━━Attributes: │ │ └/Layout: │ │ └TextAlign: "Justify" │ ├─Span (http://iso.org/pdf2/ssn): │ │ └─Span (http://iso.org/pdf2/ssn): │ │ ┝━━Attributes: │ │ │ └/Layout: │ │ │ └TextPosition: "Sup" │ │ └─Marked content on page 1: 5 │ └─Marked content on page 1: Another verse. └─text-unit (https://www.latex-project.org/ns/dflt) / Part (http://iso.org/pdf2/ssn): └─text (https://www.latex-project.org/ns/dflt) / P (http://iso.org/pdf2/ssn): ┝━━Attributes: │ └/Layout: │ └TextAlign: "Justify" └─Span (http://iso.org/pdf2/ssn): └─Marked content on page 1: (Book 1:1–5) Out the PDF output: Just for fun, here's another go. For my use case I think it makes sense to have headings and paragraphs as the main structural elements rather than chapters and verses since modern Bibles can place chapter breaks within paragraphs and verses can split across paragraphs. The below example does validate with VeraPDF and seems to give sane output at ngpdf.com But from Ulrike's answer below it seems like there's not a correct answer to this question at the moment. %! TeX = lualatex \DocumentMetadata { , lang = en , pdfstandard = ua-2 , tagging = on , tagging-setup = { math/mathml/luamml/load = false } } \documentclass{article} \ExplSyntaxOn % Tagging set up \tagpdfsetup { , role / new-tag = chapter / Span , role / new-tag = heading / H3 , role / new-tag = poetry / Div , role / new-tag = reference / Part , role / new-tag = scripture / Div , role / new-tag = verse / Span , role / user-NS = scripture } \NewStructureName { sec / 6 } \AssignStructureRole { sec / 6 } { Sect } \NewStructureName { sec / 6 / title } \AssignStructureRole { sec / 6 / title } { heading } % Block environments \DeclareInstance { blockenv } { scripture / main } { std } { , block-instance = scripture / main , max-inner-levels = 0 , name = scripture / main , tag-name = scripture , transparent-level = true } \DeclareInstance { block } { scripture / main-1 } { std } { , begin-extra-vspace = 0pt , begin-vspace = 0pt , left-margin = 0pt , para-indent = \parindent , right-margin = 0pt } \DeclareInstance { blockenv } { scripture / poetry } { std } { , block-instance = scripture / poetry , final-code = \raggedright \obeylines \ignorespaces , max-inner-levels = 0 , name = scripture / poetry , tag-name = poetry , tagging-suppress-paras = true , transparent-level = true } \DeclareInstance { block } { scripture / poetry-1 } { std } { , begin-extra-vspace = 0pt , begin-vspace = \medskipamount , left-margin = 1em , right-margin = 0pt } \NewDocumentEnvironment { scripture } { m } { \SimpleBlockEnv { scripture / main } { } } { \par \UseTaggingSocket { sec / end } { 6 } \reference #1 \BlockEnvEnd } \NewDocumentEnvironment { poetry } { } { \SimpleBlockEnv { scripture / poetry } { } } { \BlockEnvEnd } % Headings \DeclareInstance { heading } { scripture / heading } { display } { , name = scripture / heading , level = 6 , before-vspace = \medskipamount , after-vspace = \smallskipamount , heading-decls = \normalfont \itshape , headformat-instance = scripture / heading } \DeclareInstanceCopy { headformat } { scripture / heading } { std } \DeclareDocumentCommand \heading { s = { shorttitle } o m } { \ParseLaTeXeHeading { scripture / heading } { \BooleanTrue } {#2} {#3} } % Functions \NewDocumentCommand \reference { m m m } { \group_begin: \AssignStructureRole { para / semantic } { reference } \raggedleft \mode_leave_vertical: \UseTaggingSocket { inline / begin } { , actualtext = #1 ~ chapter ~ #2 ~ verse ~ #3 , tag = Span } \textbf { ( #1 ~ #2 : #3 ) } \UseTaggingSocket { inline / end } \par \group_end: } \NewDocumentCommand \ch { m } { \par \group_begin: \noindent \UseTaggingSocket { inline / begin } { , actualtext = { Chapter   #1 ~ verse   1 :   } , tag = chapter } \textbf {#1} \kern 0.5em \UseTaggingSocket { inline / end } \group_end: } \NewDocumentCommand \vs { m } { \group_begin: \mode_leave_vertical: \UseTaggingSocket { inline / begin } { , actualtext = { Verse   #1 :   } , tag = verse } \textsuperscript {#1} \UseTaggingSocket { inline / end } \group_end: } \ExplSyntaxOff \begin{document} \title{Scripture test} \author{David Purton} \maketitle \begin{scripture}{{Book}{1}{1–5}} \heading{Non-canonical heading} \ch{1}A chapter start. \vs{2}A verse. A paragraph. \begin{poetry} \vs{3}A line Another line \vs{4}A line Another line \end{poetry} \vs{5}Another verse. \heading{Another non-canonical heading} \ch{2}A chapter start. \vs{2}Another verse. \end{scripture} \end{document} Tagging structure: Document (http://iso.org/pdf2/ssn): ├─text-unit (https://www.latex-project.org/ns/dflt) / Part (http://iso.org/pdf2/ssn): │ ├─Title (http://iso.org/pdf2/ssn): │ │ └─text (https://www.latex-project.org/ns/dflt) / P (http://iso.org/pdf2/ssn): │ │ ┝━━Attributes: │ │ │ └/Layout: │ │ │ └TextAlign: "Center" │ │ └─Marked content on page 1: Scripture test │ ├─text (https://www.latex-project.org/ns/dflt) / P (http://iso.org/pdf2/ssn): │ │ ┝━━Attributes: │ │ │ └/Layout: │ │ │ └TextAlign: "Center" │ │ └─Marked content on page 1: David Purton │ └─text (https://www.latex-project.org/ns/dflt) / P (http://iso.org/pdf2/ssn): │ ┝━━Attributes: │ │ └/Layout: │ │ └TextAlign: "Center" │ └─Marked content on page 1: June 10, 2026 └─text-unit (https://www.latex-project.org/ns/dflt) / Part (http://iso.org/pdf2/ssn): └─scripture (https://www.latex-project.org/ns/local/scripture) / Div (http://iso.org/pdf2/ssn): ├─Sect (http://iso.org/pdf2/ssn): │ ├─heading (https://www.latex-project.org/ns/local/scripture) / H3 (http://iso.org/pdf2/ssn): │ │ ┝━━Title: Non-canonical heading │ │ └─Marked content on page 1: Non-canonical heading │ ├─text-unit (https://www.latex-project.org/ns/dflt) / Part (http://iso.org/pdf2/ssn): │ │ └─text (https://www.latex-project.org/ns/dflt) / P (http://iso.org/pdf2/ssn): │ │ ┝━━Attributes: │ │ │ └/Layout: │ │ │ └TextAlign: "Justify" │ │ ├─chapter (https://www.latex-project.org/ns/local/scripture) / Span (http://iso.org/pdf2/ssn): │ │ │ ┝━━Actual text: Chapter 1 verse 1:  │ │ │ └─Marked content on page 1: 1 │ │ ├─Marked content on page 1: A chapter start. │ │ ├─verse (https://www.latex-project.org/ns/local/scripture) / Span (http://iso.org/pdf2/ssn): │ │ │ ┝━━Actual text: Verse 2:  │ │ │ └─Span (http://iso.org/pdf2/ssn): │ │ │ ┝━━Attributes: │ │ │ │ └/Layout: │ │ │ │ └TextPosition: "Sup" │ │ │ └─Marked content on page 1: 2 │ │ └─Marked content on page 1: A verse. │ ├─text-unit (https://www.latex-project.org/ns/dflt) / Part (http://iso.org/pdf2/ssn): │ │ └─text (https://www.latex-project.org/ns/dflt) / P (http://iso.org/pdf2/ssn): │ │ ┝━━Attributes: │ │ │ └/Layout: │ │ │ └TextAlign: "Justify" │ │ └─Marked content on page 1: A paragraph. │ ├─text-unit (https://www.latex-project.org/ns/dflt) / Part (http://iso.org/pdf2/ssn): │ │ └─poetry (https://www.latex-project.org/ns/local/scripture) / Div (http://iso.org/pdf2/ssn): │ │ ├─text (https://www.latex-project.org/ns/dflt) / P (http://iso.org/pdf2/ssn): │ │ │ ┝━━Attributes: │ │ │ │ └/Layout: │ │ │ │ └TextAlign: "Start" │ │ │ ├─verse (https://www.latex-project.org/ns/local/scripture) / Span (http://iso.org/pdf2/ssn): │ │ │ │ ┝━━Actual text: Verse 3:  │ │ │ │ └─Span (http://iso.org/pdf2/ssn): │ │ │ │ ┝━━Attributes: │ │ │ │ │ └/Layout: │ │ │ │ │ └TextPosition: "Sup" │ │ │ │ └─Marked content on page 1: 3 │ │ │ └─Marked content on page 1: A line │ │ ├─text (https://www.latex-project.org/ns/dflt) / P (http://iso.org/pdf2/ssn): │ │ │ ┝━━Attributes: │ │ │ │ └/Layout: │ │ │ │ └TextAlign: "Start" │ │ │ └─Marked content on page 1: Another line │ │ ├─text (https://www.latex-project.org/ns/dflt) / P (http://iso.org/pdf2/ssn): │ │ │ ┝━━Attributes: │ │ │ │ └/Layout: │ │ │ │ └TextAlign: "Start" │ │ │ ├─verse (https://www.latex-project.org/ns/local/scripture) / Span (http://iso.org/pdf2/ssn): │ │ │ │ ┝━━Actual text: Verse 4:  │ │ │ │ └─Span (http://iso.org/pdf2/ssn): │ │ │ │ ┝━━Attributes: │ │ │ │ │ └/Layout: │ │ │ │ │ └TextPosition: "Sup" │ │ │ │ └─Marked content on page 1: 4 │ │ │ └─Marked content on page 1: A line │ │ └─text (https://www.latex-project.org/ns/dflt) / P (http://iso.org/pdf2/ssn): │ │ ┝━━Attributes: │ │ │ └/Layout: │ │ │ └TextAlign: "Start" │ │ └─Marked content on page 1: Another line │ └─text-unit (https://www.latex-project.org/ns/dflt) / Part (http://iso.org/pdf2/ssn): │ └─text (https://www.latex-project.org/ns/dflt) / P (http://iso.org/pdf2/ssn): │ ┝━━Attributes: │ │ └/Layout: │ │ └TextAlign: "Justify" │ ├─verse (https://www.latex-project.org/ns/local/scripture) / Span (http://iso.org/pdf2/ssn): │ │ ┝━━Actual text: Verse 5:  │ │ └─Span (http://iso.org/pdf2/ssn): │ │ ┝━━Attributes: │ │ │ └/Layout: │ │ │ └TextPosition: "Sup" │ │ └─Marked content on page 1: 5 │ └─Marked content on page 1: Another verse. ├─Sect (http://iso.org/pdf2/ssn): │ ├─heading (https://www.latex-project.org/ns/local/scripture) / H3 (http://iso.org/pdf2/ssn): │ │ ┝━━Title: Another non-canonical heading │ │ └─Marked content on page 1: Another non-canonical heading │ └─text-unit (https://www.latex-project.org/ns/dflt) / Part (http://iso.org/pdf2/ssn): │ └─text (https://www.latex-project.org/ns/dflt) / P (http://iso.org/pdf2/ssn): │ ┝━━Attributes: │ │ └/Layout: │ │ └TextAlign: "Justify" │ ├─chapter (https://www.latex-project.org/ns/local/scripture) / Span (http://iso.org/pdf2/ssn): │ │ ┝━━Actual text: Chapter 2 verse 1:  │ │ └─Marked content on page 1: 2 │ ├─Marked content on page 1: A chapter start. │ ├─verse (https://www.latex-project.org/ns/local/scripture) / Span (http://iso.org/pdf2/ssn): │ │ ┝━━Actual text: Verse 2:  │ │ └─Span (http://iso.org/pdf2/ssn): │ │ ┝━━Attributes: │ │ │ └/Layout: │ │ │ └TextPosition: "Sup" │ │ └─Marked content on page 1: 2 │ └─Marked content on page 1: Another verse. └─reference (https://www.latex-project.org/ns/local/scripture) / Part (http://iso.org/pdf2/ssn): └─text (https://www.latex-project.org/ns/dflt) / P (http://iso.org/pdf2/ssn): ┝━━Attributes: │ └/Layout: │ └TextAlign: "End" └─Span (http://iso.org/pdf2/ssn): ┝━━Actual text: Book chapter 1 verse 1–5 └─Marked content on page 1: (Book 1:1–5)

  • How to place the `pic` in a recursive layer order more elegantly?
    by Explorer on June 7, 2026 at 2:06 pm

    What I want to replicate is something as below: My very first (failed) attempt is as below: \documentclass[tikz,border=5pt]{standalone} \definecolor{myyellow}{RGB}{224,239,158} \definecolor{myteal}{RGB}{47,89,85} \begin{document} \begin{tikzpicture}[ cover/.style={line width=3pt,myyellow,fill=myteal}, myrect/.pic={\draw[cover] (0,0) rectangle (3,3) --cycle;} ] \foreach \i in {0,45,...,315} {\pic[rotate=\i] {myrect};} % \foreach \i in {0,10,...,350} {\pic[rotate=\i] {myrect};} \end{tikzpicture} \end{document} The last layer's order should be at the behind of the first one, which is not easy to be handle within the forloop \pic. Here below is my workaround: \documentclass[tikz,border=5pt]{standalone} \definecolor{myyellow}{RGB}{224,239,158} \definecolor{myteal}{RGB}{47,89,85} \begin{document} \tikzset{cover/.style={line width=3pt,myyellow,fill=myteal},myrect/.pic={\draw[cover] (0,0) |- (3,3) --++(0,-\fpeval{3*(2-sqrt(2))}) --(45:3)--cycle;}} \begin{tikzpicture} \pic{myrect}; \end{tikzpicture} \begin{tikzpicture} \foreach \i in {0,45,...,315} {\pic[rotate=\i] {myrect};} % \foreach \i in {0,10,...,350} {\pic[rotate=\i] {myrect};} \end{tikzpicture} \end{document} However, if I want to extend the angle step: \foreach \i in {0,10,...,350} {\pic[rotate=\i] {myrect};} that is not quite easy to get the code: \draw[cover] (0,0) |- (3,3) --++(0,-\fpeval{3*(2-sqrt(2))}) --(45:3)--cycle; exactly, the ++(0,-\fpeval{3*(2-sqrt(2))}) here. Any suggestions to solve the layer order issues?

  • spacing is too tight inside \begin{array} using stix2 font. OK using default CM font. How to improve?
    by Nasser on June 7, 2026 at 1:14 pm

    This math is auto-generated by CAS. When using stix2 font, with lualatex, the letters on two rows of array are almost touching each others, making it little hard to read. Here is MWE. \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{unicode-math} \setmainfont{STIX Two Text} \setmathfont{STIX Two Math} \begin{document} Since $n\neq -2$ then the solution of the reduced Riccati ode is given by \begin{align*} w & =\sqrt{x}\left\{ \begin{array}[c]{cc} c_{1}\operatorname{BesselJ}\left( \frac{1}{2k},\frac{1}{k}\sqrt{ab} x^{k}\right) +c_{2}\operatorname{BesselY}\left( \frac{1}{2k},\frac{1}% {k}\sqrt{ab}x^{k}\right) & ab>0\\ c_{1}\operatorname{BesselI}\left( \frac{1}{2k},\frac{1}{k}\sqrt{-ab}% x^{k}\right) +c_{2}\operatorname{BesselK}\left( \frac{1}{2k},\frac{1}% {k}\sqrt{-ab}x^{k}\right) & ab<0 \end{array} \right. \tag{1}\\ y & =-\frac{1}{b}\frac{w^{\prime}}{w}\nonumber\\ k &=1+\frac{n}{2}\nonumber \end{align*} \end{document} lualatex gives Notice how the bottom of 1/2k in first line is almost touching the letters on the second line. This is not the case with other fonts I tried: Removing the 3 lines so it now uses default CM font \usepackage{unicode-math} \setmainfont{STIX Two Text} \setmathfont{STIX Two Math} and compiling again, this is the result And replacing the 3 lines with this to try mlmodern \usepackage[T1]{fontenc} \usepackage{mlmodern} \DeclareSymbolFont{largesymbols}{OMX}{cmex}{m}{n} This is the result I can't change the code itself. But why stix2 lines seem to be too close to each others making it little hard to read. Is this just the nature of the stix2 font? Is there something one can add to preamble to help with this? TL 2026, Linux.

  • How to make new combining below letters in LaTeX
    by mathrm alpha on June 7, 2026 at 9:04 am

    I tried this command, but vertical spacing is bad; Even using part in $^\star$. \documentclass{article} \usepackage{amsmath} \makeatletter \long\def\bs#1{% {\mathop {#1}\limits _{\vbox to-1.4\ex@ {\kern -\tw@ \ex@ \hbox {\normalfont $^\star$}\vss }}}% } \makeatother \begin{document} $\bs{A}$ \end{document} Although there are similar posts, none mention accent below only. How to denote the fifth derivative in Newton’s notation? How to create a new accents notation

  • Using vertical fill produces lines at end of page and beginning of the next with longtable
    by mathbekunkus on June 7, 2026 at 2:11 am

    Here's my code: \documentclass[12pt,a4paper]{article} \usepackage[margin=2cm]{geometry} \usepackage{booktabs} \usepackage{longtable} \usepackage{xcolor} \usepackage{colortbl} \usepackage{chngcntr} \begin{filecontents}[overwrite]{tabula_x} \begin{longtable}{cccc} \multicolumn{4}{c}{In subsection \thesubsection}\\ \toprule \multicolumn{4}{c}{\ifodd\value{subsection} Odd \else Even \fi \hspace*{\fill} Here now!} \\ \endfirsthead \midrule \endhead \midrule \endfoot first & second & third & fourth \\\hline 9.060583 & 3.099301 & 1.304659 & 2.966522 \\ 7.099018 & 6.419018 & 6.834728 & 4.852705 \\ 4.187040 & 2.068783 & 4.898241 & 1.763889 \\ 5.016939 & 10.477702 & 8.975654 & 10.002336 \\ 2.277892 & 6.871933 & 8.414864 & 6.467176 \\ 6.563823 & 9.796346 & 1.875647 & 4.106242 \\ 2.160430 & 3.672068 & 2.165029 & 3.392034 \\ 1.440084 & 10.498921 & 2.728627 & 9.182959 \\ 3.610660 & 1.754062 & 7.281674 & 6.254935 \\ 5.419606 & 3.844363 & 6.129970 & 5.719383 \\ 6.901397 & 2.455204 & 8.342956 & 5.032185 \\ 7.047981 & 6.455106 & 2.105076 & 2.397603 \\ 4.438281 & 6.507701 & 4.445317 & 9.151459 \\ 3.297900 & 4.430763 & 7.793719 & 8.457399 \\ 8.666209 & 2.878122 & 9.074786 & 6.709299 \\ \end{longtable} \end{filecontents} \begin{document} \title{Bombastic Title} \author{Nobody} \date{Many years ago} \maketitle \section{Free} \subsection{Uno} \input{tabula_x} \vspace*{\fill} \subsection{Dos} \input{tabula_x} \vspace*{\fill} \subsection{Tres} \input{tabula_x} \vspace*{\fill} \subsection{Cuatro} \input{tabula_x} \vspace*{\fill} \end{document} These two lines are produced by the above code, at the end of the first page and start of the second: It gets even weirder if I comment out \endfirsthead: I need this 'preamble' (the first 8 lines after \begin{longtable}) for the longtable. In this example I'm using the same table, but in reality the number of rows may vary. The tables used in \input are produced automatically and as read-only, so the longtable cannot be replaced by another environment, nor the 'preamble' edited (the code producing the tables may be, in any case). The point is that I need both table and subsection to pass to the next page if they don't fit in the current page, that's why I used \vspace*{\fill}. Is there another way of doing this? Does \vspace interfere with longtable? As I said, the code producing the tables may be edited (not my code, BTW), so a solution involving tinkering with the table code is possible, except for the constraint of using longtable, which is a must. Apart from a solution (i.e. removing those lines) I'd like to understand why this happens. I know longtable is supposed to break tables along pages, but I don't understand why the 'preamble' produces the above pictures. EDIT: Just to be absolutely clear as to what I'm aiming for, this is what the document looks like if I remove the longtable preamble: I do need tables and subsection titles to go to the next page if they don't fit in the current one. (/EDIT) Thanks!

  • Is luaotfload now in l3kernel?
    by rallg on June 6, 2026 at 10:53 pm

    Lualatex, TeXlive 2026, Linux. Compiling via command line. Technical question. MWE: \documentclass{article} %% Compile with lualatex. \usepackage{fontspec} \setmainfont{LibertinusSerif} %% Or any OpenType font. \begin{document} Hello, World. \end{document} Even though \fontspec requires packages xparse and luaotfload, I do not see those files included in either the Terminal output, or the log file. But obviously they are used. The same with fontenc if using only OpenType with UTF-8. In fact, I can comment-out the associated \RequirePackage lines in the various fontspec files, and all is good. I recall reading that xparse has been in the l3kernel (or related files) for several years. I can see why fontenc is not needed for the situation here. My question: Is it the case that luaotfload is now in the l3kernel when lualatex is the compiler? How I discovered this: Using my own custom document class, I experimented (cargo cult) with code that invoked luaotfload, but forget to \RequirePackage{luaotfload}. Nevertheless, my code worked, just as if I had loaded the package.

  • Spacing between the last line of a paragraph inside minipage and the first line of next paragraph
    by Mikey on June 6, 2026 at 5:17 pm

    Hello, I want to understand the spacing after a minipage. As you can see in the image, after a minipage, it doesn't behave like two normal paragraphs. Please help me understand What does that space (marked '??' in the image) consist of? Is there anyway to make it automatically behave like two normal paragraphs or I can only fix it manually by adding \vspace? Thank you! Here is the MWE: \documentclass[12pt, a4paper]{article} \usepackage[ top = 1.6cm, bottom = 1.6cm, left = 1.8cm, right = 1.8cm ]{geometry} \setlength{\parskip}{10pt} \setlength{\parindent}{0pt} \linespread{1.2} \usepackage{enumitem} \setlist[enumerate, 1]{ label=\textit{\alph*.}, parsep=0pt, topsep=0pt, partopsep=0pt, itemsep=10pt } \begin{document} This is a plain text whose sole purpose is for the reader and composer of this document to see how the lines of text are spaced and to test the various spacing parameters that LaTeX offers. This text needs to be a little bit longer so I am currently typing nonsense. This is a plain text whose sole purpose is for the reader and composer of this document to see how the lines of text are spaced and to test the various spacing parameters that LaTeX offers. This text needs to be a little bit longer so I am currently typing nonsense. \begin{minipage}[t]{0.75\linewidth} \setlength{\parskip}{12pt} \setlength{\parindent}{0pt} This is a plain text paragraph that is inside a minipage, followed by an enumerate environment (in a separate paragraph). The list has its \textbackslash parsep, \textbackslash partopsep and \textbackslash topsep all set to 0pt. Look at the space between the last line of this paragraph and the first item of the list. What does it consist of? How do I make it exactly the same as one \textbackslash parskip? \end{minipage}\hfill \begin{enumerate} \item The first item of the long list of items. \item The second item of the long list of items. \item The third item of the long list of items. \end{enumerate} This is a plain text paragraph, followed by an enumerate environment (in a separate paragraph). The list has its \textbackslash parsep, \textbackslash partopsep and \textbackslash topsep all set to 0pt. Look at the space between this line and the first item below. It should be exactly one \textbackslash parskip, right? \begin{enumerate} \item The first item of the long list of items. \item The second item of the long list of items. \item The third item of the long list of items. \end{enumerate} \end{document}

  • double or triple ring above combining in math mode
    by mathrm alpha on June 6, 2026 at 11:03 am

    Since I found \ddot{A} and \dddot{A}, can I create \rring{A} or \rrring{A}, that is, a double ring, and a triple ring like Å but with two or three extra dots? There seems to be a usage like this: How to denote the fifth derivative in Newton’s notation?, However, I tried a similar usage(by adding \scriptscriptstyle), but many error messages popped up. \documentclass{article} \usepackage{amsmath} \makeatletter \long\def\rring#1{% {\mathop {#1}\limits ^{\vbox to-1.4\ex@ {\kern -\tw@ \ex@ \hbox {\normalfont {\scriptscriptstyle \circ\!\circ}}\vss }}}% } \long\def\rrring#1{% {\mathop {#1}\limits ^{\vbox to-1.4\ex@ {\kern -\tw@ \ex@ \hbox {\normalfont {\scriptscriptstyle \circ\!\circ\!\circ}}\vss }}}% } \makeatletter \begin{document} $\rring{A}\rrring{a}$ \end{document} The error message is as below: ! Missing $ inserted. <inserted text> $ l.19 $\rring{A} \rrring{a}$ ?

  • Horizontal alignment of longtblr
    by ChrisS on June 5, 2026 at 7:03 pm

    When using the longtblr environment to typeset a table over multiple pages, the table is horizontally centred on the page. How can I have the table aligned flush with the left margin of the page? Minimum working example: \documentclass{article} \usepackage{tabularray} \begin{document} \begin{longtblr}[entry=none,label=none]{colspec={ll}} A & B \\ C & D \end{longtblr} \end{document}

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

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