• PSTricks-metadata: slow compilation in LuaLaTeX
    by Sebastiano on June 9, 2026 at 9:36 pm

    I am trying to understand how this recent package pst-hyperboloid and how its commands are implemented. I compile my document using LuaLaTeX, but I encounter an error message during compilation. In addition, the compilation time is very long. I would like to understand how to reduce compilation time and prevent or properly debug these errors. Extended graphic state modifications dropped since LaTeX support is not loaded. Insert \DocumentMetadata{} as first line of your document to solve this issue. \documentclass{article} \usepackage{pst-hyperboloid,pst-solides3d} \begin{document} \begin{pspicture}(-6,-6)(6,6) \psset{viewpoint=60 25 20 rtp2xyz,lightsrc=viewpoint,Decran=60} \psHyperboloid[ R=2, h=4, ngrid=40 20, hollow, incolor=black!10, fillcolor=black!25, linecolor=black, linewidth=0.2\pslinewidth ] \gridIIID[Zmin=-5,Zmax=5](-4,4)(-4,4) \end{pspicture} \end{document}

  • `amsthm` theorem referencing with `cleveref` not working with LaTeX release 2026-06-01 (probably related to alias counter functionality)
    by pks40 on June 9, 2026 at 8:45 pm

    Today, I updated my TeX Live installation. This broke cleveref for referencing of theorem-like environments defined with amsthm. Concretely, consider the following MWE: \documentclass{article} \usepackage{amsthm} \usepackage{cleveref} \newtheorem{thm}{Theorem} \begin{document} \begin{thm} \label{thm:test} Test. \end{thm} In \cref{thm:test}, we tested stuff. \end{document} I now get the warning cref reference format for label type `thm' undefined when compiling this, and instead of the desired ‘theorem 1’, the output contains ‘?? 1’. This is apparently caused by a change in the firstaid package, since downgrading the TeX Live firstaid package from revision 79234 to 76740 makes the MWE work again. I suppose this is caused by the alias counter functionality added in LaTeX release 2026-06-01. If I understand the corresponding commit in the LaTeX source correctly, concretely the changes in required/firstaid/latex2e-first-aid-for-external-files.dtx, the problem is as follows. In order to make use of the new alias counter functionality, a new version of the internal amsthm command \@ynthm is defined. However, \@ynthm is also reset to this new version after loading of cleveref, without including the necessary adaptations to make cleveref work. I don’t know enough about the internal workings of cleveref, amsthm or the LaTeX kernel to understand what’s really going on there. So I think my questions are as follows: How can I make \cref{} work correctly again for amsthm theorems? Is the only way (for now) downgrading to firstaid revision 76740? If I downgrade firstaid: does the fact that amsthm doesn’t use the alias counter stuff have any negative consequences? Should I report this as a bug in the LaTeX kernel?

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

  • File involving sharenumber thmtools' option doesn't compile anymore
    by Denis Bitouzé on June 9, 2026 at 3:05 pm

    Whereas it used to compile smoothly until some weeks ago (and with e.g. pdfTeX 3.141592653-2.6-1.40.27), the following MCE: \documentclass{article} \usepackage{thmtools} \newcounter{mycounter} \declaretheorem[ sharenumber=mycounter ]{theorem}[] \begin{document} \end{document} doesn't compile anymore with an up to date TeX Live 2026. Note that it still compiles if sharenumber=mycounter is commented. The compile fails with pdfTeX, Version 3.141592653-2.6-1.40.29 and: article.cls 2025/01/22 v1.4n Standard LaTeX document class size10.clo 2025/01/22 v1.4n Standard LaTeX file (size option) thmtools.sty 2023/05/04 v0.76 thm-patch.sty 2023/05/04 v0.76 parseargs.sty 2023/05/04 v0.76 thm-kv.sty 2023/05/04 v0.76 keyval.sty 2026-05-17 v1.15 key=value parser (DPC) kvsetkeys.sty 2022-10-05 v1.19 Key value parser (HO) thm-autoref.sty 2023/05/04 v0.76 aliasctr.sty 2023/05/04 v0.76 thm-listof.sty 2023/05/04 v0.76 thm-restate.sty 2023/05/04 v0.76 l3backend-luatex.def 2026-02-18 L3 backend support: PDF output (LuaTeX)

  • Good package to write series of exercises with solutions
    by Rassine Orange on June 9, 2026 at 1:54 pm

    I'm teaching maths and I'd like to use a good package to write questions and answers, with the option to printout the answer at the end of the document. I've seen there are various such packages (exesheets, xsim, ...) and I'd like to know if one is considered "better" than the others. More specifically, I'd like a package with: A way to have questions and subquestions A command to store solutions and print them at the end of the document. If possible the name of the command should be different as "solution" as I already defined a command with this name, I would like to avoid changing all my codes. Edit : I would like to be able to define solutions that automatically get updated. The exercise package is a good start, but what I want is a way to make Answer dynamical. Here is a MWE, and I would like to define \addtotemporarysolution and \dumpsolutions (or anything else) to get what I wrote in the Answers environments. So far I have not found any way to "temporary" store the solutions (all my \sum in the first question) and dump them in the next Answer environment. To be more precise, in my MWE, I would be able to: add more additions, change the order of the additions, remove an addition, change the values of some \xand some \y, etc. and the \Answer environment should automaticaly update and display the solution of all the questions after modification. Note: I know my code is far from perfect, and maybe I should not use \defand \edef but that's not what I want/need to discuss now. \documentclass{article} \usepackage{xfp} \usepackage{enumerate} \usepackage{enumitem} \usepackage[answerdelayed]{exercise} \newcommand\addtotemporarysolution{XXX}%Todefine \newcommand\dumpsolutions{XXX}%Todefine \begin{document} \begin{Exercise} In this problem we study additions. \begin{enumerate}[label = \alph*)] \def\x{1}\def\y{1} \edef\sum{\fpeval{\x+\y}} \item Compute $\x+\y$ %\addtotemporarysolution{\sum} %To uncomment \def\x{10}\def\y{20} \edef\sum{\fpeval{\x+\y}} \item Compute $\x+\y$ %\addtotemporarysolution{\sum}%To uncomment \end{enumerate} \end{Exercise} \begin{Answer} %\dumpsolutions would put all the solutions defined in the previous Exercise I want here to write something that get dynamically updated. If I add another addition, or if I change the order, the answers should automatically change, without me to write anything. In this case, this would appear: \begin{enumerate} \item $2$ \item $30$ \end{enumerate} \end{Answer} \begin{Exercise} Now we study multiplications. \begin{enumerate}[label = \alph*)] \def\x{10}\def\y{20} \edef\product{\fpeval{\x*\y}} \item Compute $\x\times \y$ %\addtotemporarysolution{\product} %To uncomment \def\x{4}\def\y{8} \edef\sum{\fpeval{\x* \y}} \item Compute $\x\times \y$ %\addtotemporarysolution{\sum}%To uncomment \end{enumerate} \end{Exercise} \begin{Answer} %\dumpsolutions would put all the solutions defined in the previous Exercise I want here to write something that get dynamically updated. If I add another addition, or if I change the order, the answers should automatically change, without me to write anything. In this case, this would appear: \begin{enumerate} \item $200$ \item $32$ \end{enumerate} \end{Answer} \vspace{3cm} \textbf{Here are the solutions} \vspace{0.5cm} \shipoutAnswer \end{document} Community Edit: Here's a screeshot from the compiled code, marking the "1+1" example mentioned in this comment:

  • How to type rotated Khitan text format in TeX?
    by mathrm alpha on June 9, 2026 at 1:23 pm

    Example of rotated Khitan text on a web page: Image Source: https://www.babelstone.co.uk/Fonts/KhitanSmall.html Font: https://fonts.google.com/noto/specimen/Noto+Serif+Khitan+Small+Script But it seems LaTeX can't output rotated Khitan text. There is no command rotated Khitan text format in LaTeX. \documentclass{article} \usepackage{xeCJK} \setCJKmainfont{NotoSerifKhitanSmallScript-Regular.ttf} \xeCJKDeclareCharClass{CJK}{"18B00 -> "18CD5} \begin{document} 𘬐𘬑𘬒 Doesn't type rotated Khitan text \end{document} References: How can xeCJK expand its support to include "new standard Unihan characters"? Unicode PDF: https://www.unicode.org/charts/PDF/U18B00.pdf

  • 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

  • Moderncv: \cvskillentry in two columns with tabularx broken since package update
    by hari on June 9, 2026 at 11:32 am

    I'd been using a 5 point scale/counter style cvskill in two columns on my CV since many years, as in this image I'd followed the amazing minimum working example provided by Werner in this solution from 2023 https://tex.stackexchange.com/a/698435. But since doing a general update of mactex, this working example throws this error. ./mwe.tex:39: Extra }, or forgotten $. <recently read> \egroup. l.39 \end{tabularx}. Here's a screenshot of the latex console output. Here's the minimal example posted by Werner in 2023 https://tex.stackexchange.com/a/698435 to reproduce the error % Source - https://tex.stackexchange.com/a/698435 % Posted by Werner % Retrieved 2026-06-09, License - CC BY-SA 4.0 \documentclass[11pt,a4paper,roman]{moderncv} \moderncvstyle{classic} \moderncvcolor{blue} \usepackage[scale=0.75]{geometry} \usepackage{tabularx} \firstname{First name} \familyname{Last name} \begin{document} \section{EDV Kenntnisse} \makeatletter \begingroup \renewcommand{\arraystretch}{1.25}% \arrayrulecolor{color1}% \begin{tabularx}{\linewidth}{@{}p{\skillmatrix@hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}% p{\cvskill@width}@{\hspace{\skillmatrix@padding}}% X X% p{\cvskill@width}@{\hspace{\skillmatrix@padding}}% X X@{}}% \cdashline{2-7}[.6pt/1pt] \raggedleft\hintstyle{Text:} &\centering \cvskill{4} &\centering Word & & \centering \cvskill{1} & \centering \LaTeX & \tabularnewline \cdashline{2-7}[.6pt/1pt] \raggedleft\hintstyle{CAD:} &\centering \cvskill{4} &\centering ChemCAD & & \centering \cvskill{2} & \centering PDMS \tabularnewline &\centering \cvskill{3} &\centering Inventor & & & \tabularnewline \cdashline{2-7}[.6pt/1pt] \raggedleft\hintstyle{Languages:} &\centering \cvskill{3} &\centering MATLAB & & & & \end{tabularx} \makeatother \endgroup \end{document} I've been fighting with this problem since about a week~10 days. I'd be really grateful for any quick help help/advice!!

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

  • unicode-math extended length in "🣖, 🣗, 🣘" style
    by mathrm alpha on June 9, 2026 at 10:32 am

    While there are posts that allow changing the unicode arrows length, there's no unicode-math length extend arrows 🣖, 🣗, 🣘 style provided. How to use the extended arrows in unicode-math However, these settings commands cannot be applied to some special arrow styles (such as the Unicode 17.0 Supplemental Arrows-C). However, when I set it up, it only applied subscript arrows under the letters. \documentclass{article} \usepackage{unicode-math,accents} \setmathfont{NewCMMath-Book.otf} \newcommand{\overxrightarrow}[1]{\underaccent{\symbol{"1F8D6}}{#1}} \newcommand{\overSlashrightarrow}[1]{\underaccent{\symbol{"1F8D7}}{#1}} \newcommand{\overlobeleftrightarrow}[1]{\underaccent{\symbol{"1F8D8}}{#1}} \begin{document} $\overxrightarrow{ABCDEF}$, $\overSlashrightarrow{ABCDEF}$, $\overlobeleftrightarrow{ABCDEF}$ \end{document} References: How to make new combining below letters in LaTeX

  • Force math symbols to be italic, but doesn't working in \bm
    by mathrm alpha on June 9, 2026 at 8:59 am

    \documentclass{article} \usepackage{xparse} \DeclareMathAlphabet{\mathu}{OT1}{cmr}{m}{ui} \newsavebox{\slantbox} \newcommand{\slant}[2]{\mbox{% \sbox{\slantbox}{#2}% \hskip\wd\slantbox \pdfsave \pdfsetmatrix{1 0 #1 1}% \llap{\usebox{\slantbox}}% \pdfrestore }} \newcommand{\im}[1]{\slant{0.23086}{\texttt{$\mathu{#1}$}}} \ExplSyntaxOn \cs_set_eq:NN \old_im \im \RenewDocumentCommand{\im}{m}{ \tl_set:Nn \l_tmpa_tl {#1} \tl_map_inline:Nn \l_tmpa_tl { \str_case:nnF {##1} { {\alpha} {\alpha} {\beta} {\beta} {\gamma} {\gamma} {\delta} {\delta} {\varepsilon} {\varepsilon} {\zeta} {\zeta} {\eta} {\eta} {\theta} {\theta} {\iota} {\iota} {\kappa} {\kappa} {\lambda} {\lambda} {\mu} {\mu} {\nu} {\nu} {\xi} {\xi} {\pi} {\pi} {\rho} {\rho} {\varsigma} {\varsigma} {\sigma} {\sigma} {\tau} {\tau} {\upsilon} {\upsilon} {\phi} {\phi} {\chi} {\chi} {\psi} {\psi} {\omega} {\omega} {\partial} {\partial} {\vartheta} {\vartheta} {\epsilon} {\epsilon} {\varrho} {\varrho} {\varphi} {\varphi} {\varpi} {\varpi} } {\old_im{##1}} } } \ExplSyntaxOff \begin{document} $\im{ABC\nabla\alpha\partial}$ \end{document} When I added \bm inside the only math box, a LaTeX No PDF error popped up. This did not change the Bold italic mathematical symbols. \begin{document} $\bm{\im{ABC\nabla\alpha\partial}}$ \end{document} Missing control sequence inserted. Undefined control sequence. Illegal parameter number in definition of \inaccessible. References: make math symbol italic

  • Is it useful to update TexLive
    by Rassine Orange on June 9, 2026 at 8:12 am

    I use LaTeX almost every day for my work and I'm wondering if I should update TeXLive. I currently have the 2024 version. I'm afraid that if I update either my code won't run or I will go into some issues that I cannot solve. What would you recommand ? And if you advise me to update it, how shall I proceed? I have read so many different things online that I get a bit lost. Best,

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

  • pixel square draw spacing bad in LaTeX
    by mathrm alpha on June 8, 2026 at 11:32 pm

    The horizontal spacing is a bit bad when I'm drawing LaTeX pixel maps. \documentclass{article} \usepackage{setspace,parskip,newunicodechar,xcolor,fontspec} % parskip It's failing... \newunicodechar{█}{\fontspec{Arial}{█}} \newunicodechar{ }{\fontspec{Arial}{\color{white}{█}}} \begin{document} \vspace{-1mm} \color{blue}{█ ████ }\color{gray}{█ ████ }\\ \vspace{-1mm} \color{pink}{██ ████}\color{cyan}{█ ████ }\\ \vspace{-1mm} \color{yellow}{██████   ██}\color{blue}{██} \end{document}

  • Tex (MacOS) went to user mode by accident
    by Rassine Orange on June 8, 2026 at 7:34 pm

    I was trying to fix a bug in LaTeX and I ran a command in the terminal. The bug is now solved but I got a warning message "WARNING: you are switching to fmtutil's per-user formats." I have no idea what's the difference between user and system mode. Could someone explain what this means, and how to come back safely without spoiling again my LaTeX codes ? Thanks!

  • Automatically run the latexmk on the non-latex files changes or creation
    by Vladyslav Rehan on June 8, 2026 at 6:09 pm

    hello texstackexchange community! I was missing you! Input My approach uses this for an input: plots/*.py these files generate the pdf plots with matplotlib using the data on disk. data/*.drawio this files just get converted to the pdf files by the drawio utility in the mode wihtout UI. document.tex this file includes the rest of the *.tex sources by the subfile and other means. This means that any changes to the *.tex files are tracked by latexmk itself. Setup I have custom cmake+latexmk pipeline with the cmake target named continuous. The idea is to not keep the pdf files of the corresponding *.drawio files but generate them on demand. Same applies for matplotlib python plots that are made from the data on disk on demand so the version control never ever sees the images of the charts. The continuous target invokes latexmk in continuous mode and provides to it the generated .latexmkrc (the continuous target is created at the very bottom of the listing): set(MAIN_DOCUMENT "${CMAKE_CURRENT_SOURCE_DIR}/document.tex") set(OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/out") set(AUX_DIR "${CMAKE_CURRENT_BINARY_DIR}/aux") set(LATEXMK_OPTIONS "-verbose") set(DIPLOMA_DATA_DIR "${CMAKE_CURRENT_SOURCE_DIR}/data") set(PLOTS_DIR "${CMAKE_CURRENT_BINARY_DIR}/plots") set(SCENARIOS_DIR "${CMAKE_CURRENT_BINARY_DIR}/commands") set(DRAWIO_DIR "${CMAKE_CURRENT_BINARY_DIR}/drawio") list(TRANSFORM SCENARIOS PREPEND "${SCENARIOS_DIR}/") file(GLOB DRAWIO_FILES CONFIGURE_DEPENDS "${DIPLOMA_DATA_DIR}/*.drawio") file(MAKE_DIRECTORY "${PLOTS_DIR}") file(MAKE_DIRECTORY "${SCENARIOS_DIR}") file(MAKE_DIRECTORY "${DRAWIO_DIR}") configure_file("${CMAKE_CURRENT_SOURCE_DIR}/commands.sh.in" "${CMAKE_CURRENT_BINARY_DIR}/commands.sh" FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE @ONLY ) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/drawio.sh.in" "${CMAKE_CURRENT_BINARY_DIR}/drawio.sh" FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE @ONLY ) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/latexmkrc.in" "${CMAKE_CURRENT_BINARY_DIR}/latexmkrc" @ONLY ) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake.tex.in" "cmake.tex" @ONLY ) set(PLOTS_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/plots") set(PLOTS_COMMON_DEPS "${PLOTS_SRC_DIR}/common.py" "${PLOTS_SRC_DIR}/__init__.py" "${PLOTS_SRC_DIR}/__main__.py" ) # Trigger reconfigure when plot files are added or removed file(GLOB _PLOTS_PY_GLOB CONFIGURE_DEPENDS "${PLOTS_SRC_DIR}/*.py") set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${_PLOTS_PY_GLOB}) execute_process( COMMAND "${Python3_EXECUTABLE}" -m plots --deps WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" OUTPUT_VARIABLE _RAW RESULT_VARIABLE _RC ) if(NOT _RC EQUAL 0) message(FATAL_ERROR "plots --deps failed") endif() string(STRIP "${_RAW}" _STRIPPED) string(REPLACE "\n" ";" _LINES "${_STRIPPED}") set(ALL_PLOT_PDFS "") foreach(_LINE ${_LINES}) if(_LINE) string(REGEX MATCH "^([^ ]+) ([01]) (.+)$" _ "${_LINE}") set(_NAME "${CMAKE_MATCH_1}") set(_HAS_CSV "${CMAKE_MATCH_2}") set(_FILE "${CMAKE_MATCH_3}") if(_NAME AND _FILE) set(_PDF "${PLOTS_DIR}/${_NAME}.pdf") set(_OUTPUTS "${_PDF}") if(_HAS_CSV STREQUAL "1") list(APPEND _OUTPUTS "${PLOTS_DIR}/${_NAME}.csv") endif() add_custom_command( OUTPUT ${_OUTPUTS} COMMAND "${Python3_EXECUTABLE}" -m plots --data-dir "${DIPLOMA_DATA_DIR}" --out "${PLOTS_DIR}" --generate "${_NAME}" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" DEPENDS "${_FILE}" ${PLOTS_COMMON_DEPS} "${DIPLOMA_DATA_DIR}" COMMENT "Generating plot ${_NAME}" VERBATIM ) list(APPEND ALL_PLOT_PDFS ${_OUTPUTS}) endif() endif() endforeach() add_custom_command( OUTPUT ${SCENARIOS} COMMAND ${CMAKE_CURRENT_BINARY_DIR}/commands.sh DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/commands.sh.in" "${DIPLOMA_DATA_DIR}" COMMENT "Generating scenarios" VERBATIM ) set(ALL_DRAWIO_PDFS "") foreach(_DRAWIO ${DRAWIO_FILES}) get_filename_component(_NAME "${_DRAWIO}" NAME_WE) set(_PDF "${DRAWIO_DIR}/${_NAME}.pdf") add_custom_command( OUTPUT "${_PDF}" COMMAND ${CMAKE_CURRENT_BINARY_DIR}/drawio.sh "${_DRAWIO}" "${_PDF}" DEPENDS "${_DRAWIO}" "${CMAKE_CURRENT_BINARY_DIR}/drawio.sh" COMMENT "Converting draw.io diagram ${_NAME}" VERBATIM ) list(APPEND ALL_DRAWIO_PDFS "${_PDF}") endforeach() add_custom_target(pdf_generate DEPENDS ${ALL_PLOT_PDFS} DEPENDS ${SCENARIOS} DEPENDS ${ALL_DRAWIO_PDFS} ) add_custom_target(pdf COMMAND ${LATEXMK_EXECUTABLE} ${MAIN_DOCUMENT} -r "${CMAKE_CURRENT_BINARY_DIR}/latexmkrc" ${SILENT_OPTIONS} ${LATEXMK_OPTIONS} WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" BYPRODUCTS "${OUT_DIR}" "${AUX_DIR}" DEPENDS pdf_generate COMMENT "Building pdf with latexmk" ) add_custom_target(continuous COMMAND ${LATEXMK_EXECUTABLE} ${MAIN_DOCUMENT} -cd -r '${CMAKE_CURRENT_BINARY_DIR}/latexmkrc' ${LATEXMK_OPTIONS} -pvc -view=none WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" DEPENDS pdf_generate COMMENT "Running latexmk in continuous preview mode" USES_TERMINAL ) So in general, the target continuous is built only if the target pdf_generate is built. The pdf_generate makes sure that all of the python side mathplotlib diagrams and drawio diagrams are converted to the pdf files so the main document that references them may be built. The latex knows about the location of produced pdfs by including this file that is generated by cmake: \newcommand{\lrtbuild}{@CMAKE_CURRENT_BINARY_DIR@} \newcommand{\lrtresources}{@LRT_RESOURCES_DIR@} \newcommand{\lrtdocument}{@LRT_DOCUMENT@} \newcommand{\plotpath}{@PLOTS_DIR@} % so to include the plot generated by plots/distribution.py you % call \includegraphics{\plotpaht/distribution.pdf} \newcommand{\scenariopath}{@SCENARIOS_DIR@} \newcommand{\drawiopath}{@DRAWIO_DIR@} Here is the .latexmkrc template for cmake: $bibtex = "@BIBTEX_COMPILER@ %O %S"; $dvips = "@DVIPS_CONVERTER@ %O -o %D %S"; $latex = "@LATEX_COMPILER@ %O %S"; $make = "@CMAKE_MAKE_COMMAND@"; $makeindex = "@MAKEINDEX_COMPILER@ %O -o %D %S"; $out_dir = "@OUT_DIR@"; $aux_dir = "@AUX_DIR@"; $pdf_mode = 1; $pdflatex = "@LUALATEX_COMPILER@ -shell-escape -file-line-error -interaction=nonstopmode %O %S"; $ps2pdf = "@PS2PDF_CONVERTER@ %O %S %D"; $compiling_cmd = "@CMAKE_COMMAND@ --build @CMAKE_CURRENT_BINARY_DIR@ --target pdf_generate"; The last line ensures that the cmake checks if all of the pdf files have generated. Also if the python files were changed after the last generation, it regenerates them. This latexmk option is very neat to be honest. The problem So if I edit and save any of the *.tex files the latexmk picks it up right away, but if I change the plots/*.py of data/*.drawio the files won't get regenerated. I have to either: Run cmake . to tell cmake to update the pdf files, and the latexmk sees that the files used in \includegraphics macro have changed and recompiles the document, but cmake wont generate all of the pdfs at once so latexmk may run couple of times wasting cpu. Just add newline to any of the *.tex files and save it after which the latexmk runs the compiling_cmd before the trying to build the document. It works without wasting the cpu (cause latexmk waits for the cmake to finish) but it is still manual work of letting latexmk know about the changes by changing *.tex sources. My ideas I would like to know how could make the latexmk pick up the changes (or creation of files) in data/*.drawio or plots/*.py? I can not provide the extra sources to the latexmk with the config variables in the .latexmkrc, so i guess i could add the dependencies from the latex itself (like the \input{}) but without showing the file contents. Lets assume that comman that does what I have described is called \depend{}. Then I could generate the latex source file with all the files that produce the graphics for my document and include it. If any of them get changed, then the latexmk will try to compile the document but before that it will run the compile_cmd that will regenerate the pdfs of the plots. This wont detect new plot generation script files but anyway its something. As was explained in the 'The problem', letting the latexmk detect changes itself is better approach because it will wait for the cmake to finish before trying to build the document. Reproducing I have uploaded the minimal example to my google drive. Download it, unzip and inside the diploma_minimal: cd build cmake -B . -S .. cmake --build . -t continuous the output pdf will be in diploma_minimal/out/document.pdf. You have to make the drawio and python as well as cmake executables available in the path. Also the python will require pathlib mathplotlib and argparse packages installed. Why it looks so complicated Worth to note the point of all this so called complications - the user should be able to change only one drawio or py file and don't have to wait for ALL of the diagrams to rebuild. In simple case without tracking of the producer-result-consumer this is unavoidable(been there, tried that. project grew and I just could not take it anymore). Because CMake implements the per-target check of the generated assets and also allows to generate them in parallel this is what I have came up with. To be hones I would like to see the latexmk-only implementation. sorry Sorry if I am inventing the wheel here, just don't judge me hard on this. I tried my best, and knowing how toxic the community of the stackexhange network can be I am bit afraid of criticism.

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

  • Fermata symbol not working properly in tables
    by rensemil on June 8, 2026 at 2:04 pm

    I previously asked How to add fermata symbol to metre package? The symbol works fine now with two exceptions: There is too much space to the right of the new \fer symbol. The dot that is placed in the symbol is not in the proper position when the symbol is placed inside a table. Here is my MWE: \documentclass{article} \usepackage{metrix} \usepackage[en]{metre} \newcommand{\fer}{\kern0.15em\raisebox{0.07em}{\rotatebox{180}{\rlap{\kern0.3em\raisebox{0.07em}{\scalebox{0.5}{.}}}\b}}} \makeatletter \renewcommand{\rs@size@warning}[3]{\relax} \makeatother \newcommand{\que}[1]{{\footnotesize #1}} \Magnitudo{+1} \InterSigna{.6} \begin{document} This is text, \metra{\a\m\b\bm\fer\b\m}, blablabla. \begin{table} \begin{tabular}{c} \metra{\a\m\b\bm\fer\b\m} \end{tabular} \end{table} \begin{table}[h]\centering \begin{tabular}{cccccccccccccccc} tr7 & \metra{\m} & \metra{\a} & \metra{\m} & \metra{\a} & \metra{\m} & \metra{\a} & \metra{\m} & \metra{\a} & \metra{\m} & \metra{\b} & \metra{\fer} & \metra{\a} & \metra{\m} & \metra{\b} & \metra{\m} \\ \hline & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 \end{tabular} \end{table} \end{document} Which produces this result: As you can see, the error only occurs in the second table, not the first. I only noticed this while writing the MWE but I still cannot trace the error. Thanks in advance for any help!

  • \mathtt style \approx in Horizontal spacing is bad
    by mathrm alpha on June 8, 2026 at 1:29 pm

    Why my new command \mathtt style \approx spacing is bad? The spacing is too cramped. \documentclass{article} \newcommand\ttapprox{\mathrel{\rlap{\raisebox{\fontdimen4\textfont2}{$\texttt{\textasciitilde}$}}\raisebox{-0.2\fontdimen22\textfont2}{$\texttt{\textasciitilde}$}}} \begin{document} $\ttapprox$ \end{document} The spacing is too large. \documentclass{article} \newcommand\ttapprox{\mathrel{\rlap{\raisebox{\fontdimen5\textfont2}{$\texttt{\textasciitilde}$}}\raisebox{-0.2\fontdimen22\textfont2}{$\texttt{\textasciitilde}$}}} \begin{document} $\ttapprox$ \end{document} However, this new command part unspported decimal point value in \fontdimen4.5, because LaTeX code will report an error. Reference command code: Four line equality

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

  • Why are Parts in memoir documentclass not appearing in the Table of Contents when I suppress their number with *? [closed]
    by Joanna Bryson on June 8, 2026 at 9:52 am

    I have parts clustering chapters in my books, and the \part command works fine for creating a sort of a title page for each part, but the parts weren't showing up in my ToC. All the (few) discussions of this I can find on the Internet are about changing how the Parts are formatted in the ToC but I don't care about that; I just want them to show up at all. The package documentation e.g. for tocloft certainly indicates they should be there by default. Is it possible some other package I'm using is suppressing them? Edit: I figured out that if I changed it from \part*{ to just \part{ they are in the ToC, but I have chapters (e.g. Acknowledgements) with * and they are in the ToC fine :-/ It is probably a stupid thing in my documentclass \documentclass[ebook,9pt,openany]{memoir} I've further figured out that \part* is not a documented feature of memoir, and that the maintainer of the package prefers to be contacted here, so I've now added the correct tags.

  • \DeclareMathOperator doesn't working in math-fonts formating
    by mathrm alpha on June 8, 2026 at 9:14 am

    When I set \DeclareMathOperator to a word mathematical character, it will always only support the Roman style. What's the difference between \mathrm and \operatorname? Although there are differences, they all maintain the same fixed \mathrm style. \documentclass{article} \usepackage{amsmath} \DeclareMathOperator{\mathtest}{mathtest} \begin{document} $\mathtest,\ \mathbf{\mathtest},\ \mathsf{\mathtest},\ \mathtt{\mathtest}$ \end{document} However, when there is only one character, it can be set to math-font formatting. \documentclass{article} \usepackage{amsmath} \DeclareMathSymbol{\m}{\mathalpha}{operators}{`m} \DeclareMathSymbol{\h}{\mathalpha}{operators}{`h} \begin{document} $\m\h,\ \mathbf{\m\h},\ \mathsf{\m\h},\ \mathtt{\m\h}$ \end{document} However, when I try these modified LaTeX codes again, an error message pops up. \documentclass{article} \usepackage{amsmath} \DeclareMathSymbol{\mathtest}{\mathalpha}{operators}{`m`a`t`h`t`e`s`t} \begin{document} $\mathtest,\ \mathbf{\mathtest},\ \mathsf{\mathtest},\ \mathtt{\mathtest}$ \end{document} LaTeX Error: Missing \begin{document}. While this works, the LaTeX code is very messy. \documentclass{article} \usepackage{amsmath} \DeclareMathSymbol{\ml}{\mathalpha}{operators}{`m} \DeclareMathSymbol{\al}{\mathalpha}{operators}{`a} \DeclareMathSymbol{\tl}{\mathalpha}{operators}{`t} \DeclareMathSymbol{\hl}{\mathalpha}{operators}{`h} \DeclareMathSymbol{\el}{\mathalpha}{operators}{`e} \DeclareMathSymbol{\st}{\mathalpha}{operators}{`s} \newcommand{\mathtest}{\ml\al\tl\hl\tl\el\st\tl} \begin{document} $\mathtest,\ \mathbf{\mathtest},\ \mathsf{\mathtest},\ \mathtt{\mathtest}$ \end{document}

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

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

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

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

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