• LuaLaTeX error ! LaTeX Error: Command `\eth' already defined
    by Andy Fletcher on July 23, 2026 at 5:04 pm

    By compiling the following code via Lua LaTeX, I get the message: ! LaTeX Error: Command `\eth' already defined. My code is: \documentclass[a4paper,12pt]{report} \usepackage{unicode-math} \setmainfont{Carlito} \setmathfont{LeteSansMath} \usepackage{amssymb} \usepackage{latexsym} \usepackage{amsmath} \usepackage{amsbsy} \usepackage{amsfonts} \usepackage[mathscr]{eucal} \usepackage{verbatim} \usepackage{graphicx} \usepackage{fancyhdr} \usepackage{fancybox} \usepackage{array} \usepackage{bm} \usepackage{a4wide} \usepackage{enumitem} \usepackage{lipsum} \begin{document} \lipsum \end{document}

  • ABNTeX2 - Custom labels not showing up on custom indexes
    by BsAxUbx5KoQDEpCAqSffwGy554PSah on July 23, 2026 at 1:25 pm

    What I have: A master's dissertation written in LaTeX on Overleaf. It already have figures with custom definitions, and the caption show the correct name. However, they are all listed as "Figura N" on their respective lists, instead of using the custom name they show on the captions. What I need: That the lists of figures show the correct custom names they have: "Map", "Chart", "Flowchart", "Schema", instead of just "Figura" in every single instance... MWE: \documentclass[ % -- memoir class options -- 12pt, oneside, a4paper, english, spanish, esperanto, brazil, ]{abntex2} \usepackage{graphicx} % Required for inserting images \usepackage{newfloat} % provides \DeclareFloatingEnvironment \usepackage{subcaption} \DeclareFloatingEnvironment[ fileext=lsc, listname={List of schemas}, name=Schema, placement=H ]{schema} \DeclareFloatingEnvironment[ fileext=lma, listname={List of maps}, name=Map, placement=H ]{map} \DeclareFloatingEnvironment[ fileext=lch, listname={List of charts}, name=Chart, placement=H ]{chart} \DeclareFloatingEnvironment[ fileext=lfl, listname={List of flowcharts}, name=Flowchart, placement=H ]{flowchart} \begin{document} \listofmaps \listofcharts \listofflowcharts \listofschemas \clearpage \section{Article} Lorem ipsum. \subsection{Map} \begin{map}[h] \caption{Figs on a branch 5.} \centering \includegraphics[width=0.5\linewidth]{figs/fig5.png} \\Source: https://pixabay.com/illustrations/common-fig-fig-ficus-fruit-tree-6275997/. \label{fig:fig-5} \end{map} \subsection{Chart} \begin{chart}[h] \centering \caption{Two figs showing figs.} \begin{subchart}[t]{0.5\textwidth} \centering \includegraphics[height=3cm]{figs/fig1.png} %\caption{\parbox{\linewidth}{\centering Subajustado\\(\textit{underfitted}).}} \caption{\parbox{\linewidth}{\centering Figs on a branch 1.}} \label{fig:fig-1} Source: https://pixabay.com/illustrations/fruit-figs-tree-edible-leaves-7069156/. \end{subchart}% ~ \begin{subchart}[t]{0.5\textwidth} \centering \includegraphics[height=3cm]{figs/fig2.png} \caption{\parbox{\linewidth}{\centering Figs on a branch 2.}} \label{fig:fig-2} Source: https://pixabay.com/illustrations/fig-green-nature-fruit-tree-leaf-5430761/. \end{subchart}% \label{fig:fig-2} \end{chart} \subsection{Flowchart} \begin{flowchart}[h] \caption{Figs on a branch 4.} \centering \includegraphics[width=0.5\linewidth]{figs/fig4.png} \\Source: https://pixabay.com/illustrations/fig-fruit-nature-tree-summer-10169798/. \label{fig:fig-4} \end{flowchart} \subsection{Schema} \begin{schema}[h] \caption{Figs on a branch 3.} \centering \includegraphics[width=0.5\linewidth]{figs/fig3.jpg} \\Source: https://pixabay.com/illustrations/fig-vintage-fruit-branch-food-5801024/. \label{fig:fig-3} \end{schema} \end{document}

  • Package breqn with TeX4ht or Make4ht with same breakings
    by MadyYuvi on July 23, 2026 at 11:04 am

    My code are: \documentclass[twocolumn,twoside]{article} \usepackage{breqn} \usepackage{showframe} \begin{document} \begin{dmath*} \tilde G = diag\left\{ {G,3G} \right\},{\tilde W_2} = diag\left\{ {{W_2},3{W_2}} \right\}, \tilde \Phi = diag\left\{ {\Phi ,3\Phi } \right\} \Xi (0,\mu ) = {\Pi _1} + {\Pi _2}(\mu ) + {\Pi _4}(0,\mu ) + ({\vartheta ^2} + \mu )Sym(\eta _2^T\Gamma _1^T{N_2}) + Sym(\eta _1^T\Gamma _1^T{N_1}) \Xi (\vartheta ,\mu ) = {\Pi _1} + {\Pi _2}(\mu ) + {\Pi _4}(\vartheta ,\mu ) + ({\vartheta ^2} + \mu )Sym(\eta _2^T\Gamma _1^T{N_2}) + Sym(\eta _1^T\Gamma _1^T{N_1}) \Pi ({\vartheta _t},{\dot \vartheta _t}) = {\Pi _1} + {\Pi _2}({\dot \vartheta _t}) + {\Pi _3}({\vartheta _t}, {\dot \vartheta _t}) + {\Pi _4}({\vartheta _t},{\dot \vartheta _t}), \Phi = {\vartheta ^2}G - \mu {W_1} {\Pi _1} = Sym\left\{ {\Sigma _1^T{R_{{\zeta_{ij}}}}{\Sigma _2}} \right\} + \sum\nolimits_{\zeta_{ij}^{'} = 1}^{N^2} {{\mathchar'26\mkern-10mu\lambda_{{\zeta_{ij}}\zeta_{ij}^{'}}}} \Sigma _1^T{R_{\zeta_{ij}^{'}}}{\Sigma _1} {\Pi _2}({\dot \vartheta _t}) = \Sigma _3^T{H_1}{\Sigma _3} - (1 - {\dot \vartheta _t})\Sigma _4^T{H_1}{\Sigma _4} + \Sigma _3^T{H_2}{\Sigma _3} - \Sigma _5^T{H_2}{\Sigma _5} + {\vartheta ^3}e_1^TA_i^TG{A_i}{e_1} + {\vartheta ^3}e_1^TA_i^TG{B_i}{K_j}{e_2} + {\vartheta ^3}e_2^TK_j^TB_i^TG{A_i}{e_1} + {\vartheta ^3}e_2^TK_j^TB_i^TG{B_i}{K_j}{e_2} {\Pi _3}({\vartheta _t},{\dot \vartheta _t}) = {\vartheta _t}e_1^TA_i^T{W_1}{A_i}{e_1} + {\vartheta _t}e_1^TA_i^T{W_1}{B_i}{K_j}{e_2} + {\vartheta _t}e_2^TK_j^TB_i^T{W_1}{A_i}{e_1} + \frac{2}{\vartheta }\Sigma _6^T{Z_1}{\Sigma _7} + \frac{{{{\dot \vartheta }_t}}}{\vartheta }\Sigma _8^T{Z_2}{\Sigma _8} + \frac{2}{\vartheta }\Sigma _8^T{Z_2}{\Sigma _9} + {\vartheta _t}e_2^TK_j^TB_i^T{W_1}{B_i}{K_j}{e_2}- {d_\vartheta }(t)e_6^T{W_2}{e_6} + \frac{{{{\dot \vartheta }_t}}}{\vartheta }\Sigma _6^T{Z_1}{\Sigma _6} - {\vartheta _t}(1 - {\dot \vartheta _t})e_5^T{W_1}{e_5} + {d_\vartheta }(t)(1 - {\dot \vartheta _t})e_5^T{W_2}{e_5} {\Pi _4}({\vartheta _t},{\dot \vartheta _t}) = ({\vartheta ^2} + {\dot \vartheta _t})Sym(\eta _2^T\Gamma _1^T{N_2}) + Sym(\eta _1^T\Gamma _1^T{N_1}) + {\vartheta _t}N_1^T{(\tilde \Phi )^{ - 1}}{N_1} + {\vartheta ^2}(\vartheta - {\vartheta _t})N_2^T{(\tilde G)^{ - 1}}{N_2} + {\dot \vartheta _t}(\vartheta - {\vartheta _t})N_2^T{({\tilde W_2})^{ - 1}}{N_2} {\Sigma _1} = {\left[ {e_1^T,e_2^T,e_3^T} \right]^T},{\Sigma _2} = {\left[ {e_4^T,e_5^T,e_6^T} \right]^T}, {\Sigma _3} = {\left[ {e_1^T,e_4^T} \right]^T},{\Sigma _4} = {\left[ {e_2^T,e_5^T} \right]^T} {\Sigma _5} = {\left[ {e_3^T,e_6^T} \right]^T}, {\Sigma _7} = {\left[ { - {\vartheta _t}e_4^T, - {\vartheta _t}e_2^T, - {\vartheta _t}e_7^T + e_1^T - (1 - {{\dot \vartheta }_t})e_2^T} \right]^T} {\Sigma _6} = {\left[ {e_1^T,e_2^T,e_7^T} \right]^T}, {\Sigma _9} = {\left[ { - {d_\vartheta }(t)e_5^T, - {d_\vartheta }(t)e_6^T, - {{\dot \vartheta }_t}e_8^T + e_2^T - e_3^T} \right]^T} {\Sigma _8} = {\left[ {e_2^T,e_3^T,e_8^T} \right]^T}, \end{dmath*} \begin{dmath*} {e_h} = \left[ {{0_{q \times (h - 1)q}},{I_q},{0_{q \times (8 - h)q}}} \right], h=1, 2,...,8. {\Gamma _1} = {[{\Lambda _1^T(0)}, {\Lambda _1^T(1)}]^T},{\Lambda _1}(0) = [I, -I, 0], {\Lambda _1}(1) = [I, I, -2I], {\eta _1} = [e_1^T, e_2^T, e_7^T]^T {{\bar R}_{{\zeta_{ij}}}} = {Q^{{{ - 1} \mathord{\left/ {\vphantom {{ - 1} 2}} \right. \kern-\nulldelimiterspace} 2}}}{R_{{\zeta_{ij}}}}{Q^{{{ - 1} \mathord{\left/ {\vphantom {{ - 1} 2}} \right. \kern-\nulldelimiterspace} 2}}}, {{\bar H}_1} = {Q^{{{ - 1} \mathord{\left/ {\vphantom {{ - 1} 2}} \right. \kern-\nulldelimiterspace} 2}}}{H_1}{Q^{{{ - 1} \mathord{\left/ {\vphantom {{ - 1} 2}} \right. \kern-\nulldelimiterspace} 2}}}, {{\bar H}_2} = {Q^{{{ - 1} \mathord{\left/ {\vphantom {{ - 1} 2}} \right. \kern-\nulldelimiterspace} 2}}}{H_2}{Q^{{{ - 1} \mathord{\left/ {\vphantom {{ - 1} 2}} \right. \kern-\nulldelimiterspace} 2}}}, \bar G = {Q^{{{ - 1} \mathord{\left/ {\vphantom {{ - 1} 2}} \right. \kern-\nulldelimiterspace} 2}}}G{Q^{{{ - 1} \mathord{\left/ {\vphantom {{ - 1} 2}} \right. \kern-\nulldelimiterspace} 2}}} {\eta _2} = [e_2^T, e_3^T, e_8^T]^T, {\lambda _1} = \mathop {\max }\limits_{{\zeta_{ij}} \in \bar N \times \bar N} \left\{ {{\lambda _{\min }}({{\bar R}_{{\zeta_{ij}}}})} \right\}, {d_\vartheta }(t) = \vartheta - {\vartheta _t} \bar \lambda = \left\{ 3\mathop {\max }\limits_{{\zeta_{ij}} \in \bar N \times \bar N} \left\{ {{\lambda _{\max }}({{\bar R}_{{\zeta_{ij}}}})} \right\} + 2\vartheta {\lambda _{\max }}({{\bar H}_1}) + 2\vartheta {\lambda _{\max }}({{\bar H}_2}) + \frac{{{\vartheta ^4}}}{2}\lambda _{\max }(\bar G) + \vartheta ^2\lambda _{\max }({{\bar W}_1}) + \vartheta ^2\lambda _{\max }({{\bar W}_2}) + \left( {3 + 2\vartheta } \right)\left[ {\lambda _{\max }}({{\bar Z}_1}) + {\lambda _{\max }}({{\bar Z}_2}) \right] \right\} {{\bar W}_1} = {Q^{{{ - 1} \mathord{\left/ {\vphantom {{ - 1} 2}} \right. \kern-\nulldelimiterspace} 2}}}{W_1}{Q^{{{ - 1} \mathord{\left/ {\vphantom {{ - 1} 2}} \right. \kern-\nulldelimiterspace} 2}}}, {{\bar W}_2} = {Q^{{{ - 1} \mathord{\left/ {\vphantom {{ - 1} 2}} \right. \kern-\nulldelimiterspace} 2}}}{W_2}{Q^{{{ - 1} \mathord{\left/ {\vphantom {{ - 1} 2}} \right. \kern-\nulldelimiterspace} 2}}}, {{\bar Z}_1} = {Q^{{{ - 1} \mathord{\left/ {\vphantom {{ - 1} 2}} \right. \kern-\nulldelimiterspace} 2}}}{Z_1}{Q^{{{ - 1} \mathord{\left/ {\vphantom {{ - 1} 2}} \right. \kern-\nulldelimiterspace} 2}}}, {{\bar Z}_2} = {Q^{{{ - 1} \mathord{\left/ {\vphantom {{ - 1} 2}} \right. \kern-\nulldelimiterspace} 2}}}{Z_2}{Q^{{{ - 1} \mathord{\left/ {\vphantom {{ - 1} 2}} \right. \kern-\nulldelimiterspace} 2}}}. \end{dmath*} \end{document} It produced the output as: I run the command make4ht.exe -f jats test.tex "mathml" for XML generation with MathML, is there any way to achieve the same breaking in XML file as exactly in PDF output?

  • titletoc: subpart causes overfull hbox
    by grenville on July 22, 2026 at 8:30 pm

    I am using titlesec/titletoc to give my article a section type \subpart between \section and \part. But there's an alignment problem with the page number in the table of contents, which makes three-figure page numbers cause an overfull hbox. Would be very grateful for some assistance. Attempted MWE below. N.B. I'm new to titlesec, and lifted the relevant code from this answer. \documentclass[draft]{article} \usepackage{titlesec} \usepackage{titletoc} \titleclass{\subpart}{page}[\part] \newcounter{subpart} \renewcommand{\thesubpart}{\Alph{subpart}} \newcommand{\subpartname}{Subpart} \titleformat{\subpart}[display]{\normalfont\LARGE\bfseries}{\subpartname~\thesubpart}{1pc}{} \titlespacing{\subpart}{0pt}{0pt}{0pt} \makeatletter \def\toclevel@part{-1} \def\toclevel@subpart{0} \makeatother \titlecontents{subpart}[0pt]{\addvspace{1pc}\normalfont\large\bfseries}% {\thecontentslabel\enspace ---\enspace}% {}{\hspace{0pt plus 1fill}\contentspage} \begin{document} \tableofcontents \setcounter{page}{100} \part{This is a part} \subpart{This is a subpart} \end{document}

  • force ConTeXt XML export backend to preserve structural line breaks/rows (\NR) or columns (\NC) inside display math alignments?
    by Nasser on July 22, 2026 at 8:19 pm

    I am using context --export=yes to generate structural XML from my TeX documents to process later via saxon and XSLT. While the math display equations render perfectly in the PDF output, the generated XML flattens multiple formulas into one single continuous string, completely discarding row-break data. This makes it not possible to write an XSLT template to generate HTML since there is no XML tag to tell XSLT where to start new formula when there are multiple formulas as in this example. Source Example: \setupbackend[export=yes] \starttext \startformula \sin x \alignhere = B \breakhere A \alignhere = C \stopformula \stoptext The pdf is The XML generated <formula> <formulacontent image="1-image-exported-1" n="1"> <math data-lmtx-blob="1" data-lmtx-meaning="sin 𝑥 equals 𝐵 times 𝐴 equals 𝐶" display="block" displaystyle="true" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> <mi>sin</mi> <mi>𝑥</mi> <mo>=</mo> <mi>𝐵</mi> <mi>𝐴</mi> <mo>=</mo> <mi>𝐶</mi> </mrow> </math> </formulacontent> </formula> Notice that \breakhere is completely gone. converting this to HTML via saxon and xslt, the two formulas will show on one line, since there is no XML tag to tell where the breakhere is to guide the HTML generation. Is there a clean native configuration, an engine hook, or a specialized math function map in LMTX that tells the export processor to structure separate equation lines using custom XML hooks or native MathML container structures (like <mtr> and <mtd>)? I prefer not to use matrices because they alter math font character spacing properties. I worked on this with google AI for 2 hrs and we could not find solution.

  • Carlito font in math mode and "not equal" sign
    by Andy Fletcher on July 22, 2026 at 7:20 pm

    I'm using Carlito font, but in math mode, the not equal sign (\neq) seems to have the vertical bar displaced to the right. I wonder, how this can be fixed? Below find my code: \documentclass[a4paper,12pt]{report} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[sfdefault,lf]{carlito} \usepackage[LGRgreek,italic]{mathastext} \usepackage[active]{srcltx} \usepackage{amsmath} \begin{document} The ``not equal'' sign seems to have the vertical bar displaced: $\neq$ \end{document}

  • How to implement the `thmtools` patch with `kaotheorems` package in `kaobook`?
    by Explorer on July 22, 2026 at 5:41 pm

    The full story comes from this issue. To show the question, we need the kaobook as I stated here. I try to apply mbert's patch, it works with simplified version: \documentclass{book} \let\openbox\relax \RequirePackage{amsmath} % Improved mathematics \RequirePackage{amsthm} % Mathematical environments \RequirePackage{thmtools} % Theorem styles \makeatletter \renewcommand\thmt@autorefsetup{% \@xa\def\csname\thmt@envname autorefname\@xa\endcsname\@xa{\thmt@thmname}% } \makeatother \makeatletter % Theorem styles \declaretheoremstyle[ spaceabove=.6\thm@preskip, spacebelow=.1\thm@postskip, bodyfont=\normalfont\itshape, headpunct={}, ]{kaoplain} \theoremstyle{kaoplain} \declaretheorem[ name=Theorem, refname={theorem,theorems}, Refname={Theorem,Theorems}, numberwithin=section, ]{theorem} \declaretheorem[ name=Proposition, refname={proposition,propositions}, Refname={Proposition,Propositions}, sibling=theorem,%<- ]{proposition} \makeatother \begin{document} Hello! \begin{proposition} This is a proposition. \end{proposition} \end{document} It works to get: But the direct example NOT work: \documentclass{kaobook} \usepackage{kaotheorems} \makeatletter \renewcommand\thmt@autorefsetup{% \@xa\def\csname\thmt@envname autorefname\@xa\endcsname\@xa{\thmt@thmname}% } \makeatother \begin{document} Hello! \begin{proposition} This is a proposition. \end{proposition} \end{document} The patch looks like works too late. How to quick fix in kaotheorems example without change the kaotheorems.sty?

  • I need the symbol "for some"
    by BAAOF on July 22, 2026 at 3:46 pm

    I’ve looked but haven’t found a package that provides it; I know it’s not exactly standard notation, but I use it regularly and would like to have it in LaTeX.

  • How to fix error " ! LaTeX Error: Command \c@definition already defined. Or name \end... illegal, see p.192 of the manual. "? [duplicate]
    by Elia Immanuel Auer on July 22, 2026 at 10:26 am

    I have the following part in my preamble, which used to work: \documentclass{article} \usepackage{amsthm} \usepackage{thmtools} \newcommand{\HelperDeclareTheorem}[1]{ \declaretheorem[ numberlike=subsubsection, ]{#1} } \HelperDeclareTheorem{definition} \HelperDeclareTheorem{lemma} Now, I'm getting the following error: ! LaTeX Error: Command \c@definition already defined. Or name \end... illegal, see p.192 of the manual. Here is the complete output: This is pdfTeX, Version 3.141592653-2.6-1.40.29 (MiKTeX 26.5) (preloaded format=pdflatex.fmt) restricted \write18 enabled. entering extended mode (doc.tex LaTeX2e <2026-06-01> L3 programming layer <2026-06-18> (C:\Program Files\MiKTeX\tex/latex/base\article.cls Document Class: article 2025/01/22 v1.4n Standard LaTeX document class (C:\Program Files\MiKTeX\tex/latex/base\size10.clo)) (C:\Program Files\MiKTeX\tex/latex/amscls\amsthm.sty) (C:\Program Files\MiKTeX\tex/latex/thmtools\thmtools.sty (C:\Program Files\MiKTeX\tex/latex/thmtools\thm-patch.sty (C:\Program Files\MiKTeX\tex/latex/thmtools\parseargs.sty)) (C:\Program Files\MiKTeX\tex/latex/thmtools\thm-kv.sty (C:\Program Files\MiKTeX\tex/latex/graphics\keyval.sty) (C:\Program Files\MiKTeX\tex/latex/kvsetkeys\kvsetkeys.sty)) (C:\Program Files\MiKTeX\tex/latex/thmtools\thm-autoref.sty (C:\Program Files\MiKTeX\tex/latex/thmtools\aliasctr.sty)) (C:\Program Files\MiKTeX\tex/latex/thmtools\thm-listof.sty) (C:\Program Files\MiKTeX\tex/latex/thmtools\thm-restate.sty) (C:\Program Files\MiKTeX\tex/latex/thmtools\thm-amsthm.sty)) ! LaTeX Error: Command \c@definition already defined. Or name \end... illegal, see p.192 of the manual. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.11 \HelperDeclareTheorem {lemma} ? ! Emergency stop. ... l.11 \HelperDeclareTheorem {lemma} ! ==> Fatal error occurred, no output PDF file produced! Transcript written on doc.log. Here is doc.log: This is pdfTeX, Version 3.141592653-2.6-1.40.29 (MiKTeX 26.5) (preloaded format=pdflatex 2026.7.13) 22 JUL 2026 12:16 entering extended mode restricted \write18 enabled. %&-line parsing enabled. **./doc.tex (doc.tex LaTeX2e <2026-06-01> L3 programming layer <2026-06-18> (C:\Program Files\MiKTeX\tex/latex/base\article.cls Document Class: article 2025/01/22 v1.4n Standard LaTeX document class (C:\Program Files\MiKTeX\tex/latex/base\size10.clo File: size10.clo 2025/01/22 v1.4n Standard LaTeX file (size option) ) \c@part=\count276 \c@section=\count277 \c@subsection=\count278 \c@subsubsection=\count279 \c@paragraph=\count280 \c@subparagraph=\count281 \c@figure=\count282 \c@table=\count283 \abovecaptionskip=\skip49 \belowcaptionskip=\skip50 \bibindent=\dimen150 ) (C:\Program Files\MiKTeX\tex/latex/amscls\amsthm.sty Package: amsthm 2020/05/29 v2.20.6 \thm@style=\toks17 \thm@bodyfont=\toks18 \thm@headfont=\toks19 \thm@notefont=\toks20 \thm@headpunct=\toks21 \thm@preskip=\skip51 \thm@postskip=\skip52 \thm@headsep=\skip53 \dth@everypar=\toks22 ) (C:\Program Files\MiKTeX\tex/latex/thmtools\thmtools.sty Package: thmtools 2023/05/04 v0.76 \thmt@toks=\toks23 \c@thmt@dummyctr=\count284 (C:\Program Files\MiKTeX\tex/latex/thmtools\thm-patch.sty Package: thm-patch 2023/05/04 v0.76 (C:\Program Files\MiKTeX\tex/latex/thmtools\parseargs.sty Package: parseargs 2023/05/04 v0.76 \@parsespec=\toks24 )) (C:\Program Files\MiKTeX\tex/latex/thmtools\thm-kv.sty Package: thm-kv 2023/05/04 v0.76 Package thm-kv Info: Theorem names will be uppercased on input line 42. (C:\Program Files\MiKTeX\tex/latex/graphics\keyval.sty Package: keyval 2026-05-17 v1.15 key=value parser (DPC) \KV@toks@=\toks25 ) (C:\Program Files\MiKTeX\tex/latex/kvsetkeys\kvsetkeys.sty Package: kvsetkeys 2022-10-05 v1.19 Key value parser (HO) ) Package thm-kv Info: kvsetkeys patch (v1.16 or later) on input line 158. ) (C:\Program Files\MiKTeX\tex/latex/thmtools\thm-autoref.sty Package: thm-autoref 2023/05/04 v0.76 (C:\Program Files\MiKTeX\tex/latex/thmtools\aliasctr.sty Package: aliasctr 2023/05/04 v0.76 )) (C:\Program Files\MiKTeX\tex/latex/thmtools\thm-listof.sty Package: thm-listof 2023/05/04 v0.76 ) (C:\Program Files\MiKTeX\tex/latex/thmtools\thm-restate.sty Package: thm-restate 2023/05/04 v0.76 ) (C:\Program Files\MiKTeX\tex/latex/thmtools\thm-amsthm.sty Package: thm-amsthm 2023/05/04 v0.76 \thmt@style@headstyle=\toks26 )) ! LaTeX Error: Command \c@definition already defined. Or name \end... illegal, see p.192 of the manual. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.11 \HelperDeclareTheorem {lemma} ? ! Emergency stop. ... l.11 \HelperDeclareTheorem {lemma} Your command was ignored. Type I <command> <return> to replace it with another command, or <return> to continue without it. Here is how much of TeX's memory you used: 968 strings out of 467509 17273 string characters out of 5418882 435365 words of memory out of 5000000 30257 multiletter control sequences out of 15000+600000 627721 words of font info for 40 fonts, out of 8000000 for 9000 1141 hyphenation exceptions out of 8191 57i,0n,65p,176b,36s stack positions out of 10000i,1000n,20000p,200000b,200000s ! ==> Fatal error occurred, no output PDF file produced! Question 1: What changed so that the code no longer works? Question 2: How can I fix this error?

  • Issue tabularray/diagbox together with `\usepackage[table]{xcolor}`(the `colortbl` package)
    by jowe_19 on July 22, 2026 at 9:35 am

    Thanks to the help of an IA, I can reproduce the following clash between the packages tabularray/diagbox and xcolor \documentclass{article} \usepackage{tabularray} \UseTblrLibrary{diagbox} \usepackage[table]{xcolor} % \usepackage{colortbl} %============================================================= \begin{document} \begin{tblr}{hlines,vlines} \diagbox{Aa}{Pp} & Beta & Gamma\\ Epsilon & Zeta & Eta\\ Iota & Kappa & Lambda \end{tblr} \end{document} ! Missing number, treated as zero. <to be read again> > l.12 \end {tblr} ? How can I fix it ?

  • Remove extra horizontal space between box and margin [duplicate]
    by user32960003 on July 22, 2026 at 4:31 am

    I'm typesetting a cover letter using LaTeX, and at the top of the page, separated from the rest by a rule, is my name and contact information. In order to achieve this, I've put a box and a parbox, separated by /hfill, into another box. The parbox is raggedleft, but there is still a little bit of space between the edge of its text and the right margin, which to me looks unsightly: \documentclass{letter} \signature{Firstname Lastname} \begin{document} \begin{letter}{Recipient Address} \makebox[\linewidth]{% \makebox{\Huge{Firstname Lastname}}% \hfill \makebox{ \parbox{110pt}{ \raggedleft +1 (234) 567-8910 \\ emailaddress@gmail.com \\ Earth, probably } }} \smallskip\hrule height .4pt \normalsize \opening{Dear Recruiter,} Some paragraphs and stuff. \closing{So hire me.} \end{letter} \end{document} I've read the entries in the texdoc LaTeX2e manual for box and parbox, but there doesn't seem to be anything about the boxes themselves taking up extra space. I've read around sections of the manual that seem related, and looked around on the internet, but so far have come up with no solution. Does anyone know why that space is there, and how to remove it?

  • Table of Contents headings not displaying Chinese numerals
    by Climber of Mount. LaTeX on July 21, 2026 at 7:54 am

    I came here from another question. After adopting the solution an answer, using zhnumber, titlesec, and ctex, I can create headings that employ Chinese (Traditional, but shouldn't matter here) numerals such as 壹、這是第壹章 instead of 1 這是第壹章 However, while this works for section-level headers in the body of the document, it is not reflected in the Table of Contents. Is there a way to fix this? For reference I use Overleaf, XeLaTeX, and the xeCJK package. MWE: \documentclass{article} \usepackage{xeCJK} \usepackage{titlesec} \usepackage{zhnumber} \titleformat{\section} {\Large\bfseries} {\zhnum[style={Financial,Traditional}]{section}、} {0pt} {} \titleformat{\subsection} {\large\bfseries} {\zhnum{subsection}、} {0pt} {} \begin{document} \tableofcontents \section{甲章} \subsection{甲節} \subsection{乙節} \section{乙章} \subsection{甲節} \subsection{乙節} \end{document}

  • Does `newtx` (the `newtxmath` and `newtxtext` package) act on the numbers font in math?
    by Explorer on July 21, 2026 at 7:08 am

    Let's consider the following three examples: Example1. with newtx: \documentclass{article} \usepackage{newtx} % \usepackage{newtxtext} % \usepackage{newtxmath} \begin{document} ABCDE abcde 12345 $ABCDE abcde 12345$ \end{document} Both the number in text or math was turned "Times": Example2. with newtxtext: \documentclass{article} % \usepackage{newtx} \usepackage{newtxtext} % \usepackage{newtxmath} \begin{document} ABCDE abcde 12345 $ABCDE abcde 12345$ \end{document} Only the text was turned "Times", and that was the expected behaviour. Example3. with newtxmath: \documentclass{article} % \usepackage{newtx} % \usepackage{newtxtext} \usepackage{newtxmath} \begin{document} ABCDE abcde 12345 $ABCDE abcde 12345$ \end{document} That was confusing for me, if and only if newtx was loaded, the numbers in math would be changed to "Times"-style, that was out of my expectation. Is the behaviour of newtxmath that didn't change the number in math that expected and how can it be changed?

  • blank page appears between sections after includepdf [closed]
    by A Burial At Ornans on July 21, 2026 at 1:08 am

    Latex is producing a blank page, which I want to remove, between the first \includepdf and \section{DC1459B}. I tried everything to try to remove that annoying blank page, to no avail. \chapter{Technical Datasheets} \label{chapter:appendixDatasheets} % ---------------------------------------------------------------------- \section{LTC3588-1} %\cite{ltc3588_1_datasheet} \label{section:ltc datasheet} \begin{figure}[!ht] \centering \begin{subfigure}[b]{0.49\textwidth} \centering \includegraphics[width=\textwidth, page=1]{Figures/ltc3588 datasheet.pdf} \caption*{} \label{fig:ltc3588_p1} \end{subfigure} \hfill \begin{subfigure}[b]{0.49\textwidth} \centering \includegraphics[width=\textwidth, page=2]{Figures/ltc3588 datasheet.pdf} \caption*{} \label{fig:ltc3588_p2} \end{subfigure} \caption*{} \label{fig:ltc3588_first2} \end{figure} \includepdf[pages={3-20}, nup = 2x2, landscape=false, scale=1, pagecommand={\thispagestyle{plain}}]{Figures/ltc3588 datasheet.pdf} \section{DC1459B} %\cite{dc1459b_user_guide} \begin{figure}[H] \centering \begin{subfigure}[b]{0.56\textwidth} \centering \includegraphics[width=\textwidth, page=1]{Figures/dc1459B.pdf} \caption*{} \label{fig:dc1459b_page1} \end{subfigure} \hfill \begin{subfigure}[b]{0.56\textwidth} \centering \includegraphics[width=\textwidth, page=2]{Figures/dc1459B.pdf} \caption*{} \label{fig:dc1459b_page2} \end{subfigure} \caption*{} \label{fig:dc1459b_page1_2} \end{figure} \includepdf[pages={3-6}, nup=2x2, landscape=false, scale=1, pagecommand={\thispagestyle{plain}}]{Figures/dc1459B.pdf} Also, I really have to include the first two pages as images using \includegraphics, not with \includepdf, otherwise it won't fit.

  • Making the pages numbers of a \usepackage{report} document easier to read?
    by Arbuja on July 21, 2026 at 12:42 am

    Question: In the following code, how do we place a page number in the upper left corner for even numbered pages and upper right corner for odd numbered pages? (In the current code, the page number is on the bottom center.) I have the following file tree for my \usepackage{report} document: - File Tree - chapters - appendix.tex - chapter02.tex - chapter03.tex - chapter04.tex - introduction.tex - abstract.tex - main.tex - mendeley.bib - references.bib - titlepage.tex I have the following code in main.tex. (The rest of the files can be filled with lipsum.) \documentclass[11pt,twoside]{report} \usepackage[utf8]{inputenc} \usepackage{graphicx} \graphicspath{ {images/} } \usepackage{caption} \usepackage{subcaption} \usepackage{float} \usepackage[width=150mm,top=35mm,bottom=25mm,bindingoffset=6mm]{geometry} \usepackage{fancyhdr} \usepackage{setspace} \pagestyle{plain} \fancyhf{} \fancyhead[R]{\thepage} \renewcommand{\headrulewidth}{0pt} \setlength{\headheight}{14pt} \usepackage{biblatex} \addbibresource{references.bib} \title{Title} \author{Arbuja} \date{July 13th, 2026} \begin{document} \pagenumbering{roman} \input{titlepage} \input{abstract} \tableofcontents \listoffigures \doublespacing \chapter{Introduction} \pagenumbering{arabic} \input{chapters/introduction} \chapter{Asd} \input{chapters/chapter02} \chapter{Bsd} \input{chapters/chapter03} \chapter{Csd} \input{chapters/chapter04} \appendix \chapter{Dsd} \input{chapters/appendix} \singlespacing \printbibliography \end{document} Note: There is plenty of additional code in the original version. If the code you give doesn't work with the rest of the code, see this document. (The only changes I want is for even numbered pages, the page number should be on the upper left corner and for odd numbered pages, the page number should be on upper right corner.)

  • unknown error: LaTeX Error: Environment dialogue undefined [closed]
    by user1720967 on July 20, 2026 at 8:20 pm

    Please, how do I fix this: Command Line: bibtex.exe "ideje" Startup Folder: E:\BitDownloRepair\01CCC\Users\hynek0\Desktop\TH0dipl This is BibTeX, Version 0.99d (MiKTeX 25.4) The top-level auxiliary file: ideje.aux I found no \citation commands---while reading file ideje.aux I found no \bibdata command---while reading file ideje.aux I found no \bibstyle command---while reading file ideje.aux (There were 3 error messages) Command Line: C:\Users\Hynek\AppData\Local\Programs\MiKTeX\miktex\bin\x64\xelatex.exe --interaction=errorstopmode --synctex=-1 "ideje.tex" Startup Folder: E:\BitDownloRepair\01CCC\Users\hynek0\Desktop\TH0dipl This is XeTeX, Version 3.141592653-2.6-0.999997 (MiKTeX 25.4) (preloaded format=xelatex.fmt) restricted \write18 enabled. entering extended mode (ideje.tex LaTeX2e <2025-06-01> patch level 1 L3 programming layer <2025-10-09> (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/base\article.cls Document Class: article 2025/01/22 v1.4n Standard LaTeX document class (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/base\size10.clo)) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/amsfonts\amssymb.sty (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/amsfonts\amsfonts.sty)) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/amsmath\amsmath.sty For additional information on amsmath, use the `?' option. (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/amsmath\amstext.sty (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/amsmath\amsgen.sty)) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/amsmath\amsbsy.sty) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/amsmath\amsopn.sty)) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/accents\accents.sty) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/tikz-cd\tikz-cd.sty (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/pgf/frontendlayer\tikz. sty (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/pgf/basiclayer\pgf.sty (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/pgf/utilities\pgfrcs.st y (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfutil -common.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfutil -latex.def) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfrcs. code.tex (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf\pgf.revision.tex) )) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/pgf/basiclayer\pgfcore. sty (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/graphics\graphicx.sty (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/graphics\keyval.sty) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/graphics\graphics.sty (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/graphics\trig.sty) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/graphics-cfg\graphics.c fg) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/graphics-def\xetex.def) )) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/pgf/systemlayer\pgfsys. sty (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfsy s.code.tex (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfkeys .code.tex (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfkeys libraryfiltered.code.tex)) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgf.c fg) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfsy s-xetex.def (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfsy s-dvipdfmx.def (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfsy s-common-pdf.def)))) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfsy ssoftpath.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfsy sprotocol.code.tex)) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/xcolor\xcolor.sty (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/graphics-cfg\color.cfg) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/graphics\mathcolor.ltx) ) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor e.code.tex (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmath.code .tex (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathutil. code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathparse r.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct ions.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct ions.basic.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct ions.trigonometric.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct ions.random.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct ions.comparison.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct ions.base.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct ions.round.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct ions.misc.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct ions.integerarithmetics.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathcalc. code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfloat .code.tex)) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfint.code. tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor epoints.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor epathconstruct.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor epathusage.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor escopes.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor egraphicstate.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor etransformations.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor equick.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor eobjects.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor epathprocessing.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor earrows.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor eshade.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor eimage.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor eexternal.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor elayers.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor etransparency.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor epatterns.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor erdf.code.tex))) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/modules\pgfmodule shapes.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/modules\pgfmodule plot.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/pgf/compatibility\pgfco mp-version-0-65.sty) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/pgf/compatibility\pgfco mp-version-1-18.sty)) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/pgf/utilities\pgffor.st y (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/pgf/utilities\pgfkeys.s ty (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfkeys .code.tex)) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/pgf/math\pgfmath.sty (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmath.code .tex)) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgffor. code.tex)) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/frontendlayer/tik z\tikz.code.tex (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/libraries\pgflibr aryplothandlers.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/modules\pgfmodule matrix.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/frontendlayer/tik z/libraries\tikzlibrarytopaths.code.tex))) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/tikz-cd\tikzlibrarycd.c ode.tex (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/frontendlayer/tik z/libraries\tikzlibrarymatrix.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/frontendlayer/tik z/libraries\tikzlibraryquotes.code.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/pgf/libraries\pgflibr aryarrows.meta.code.tex))) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/babel\babel.sty (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/babel\xebabel.def) Package babel Warning: Configuration files are deprecated, as (babel) they can break document portability. (babel) Reported on input line 4172. ************************************* * Local config file bblopts.cfg used * (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/arabi\bblopts.cfg) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/babel/locale/cs\babel -czech.tex) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/babel-czech\czech.ldf)) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/base\inputenc.sty Package inputenc Warning: inputenc package ignored with utf8 based engines. ) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/base\fontenc.sty (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/cslatex/base\il2enc.def) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/lm\il2lmr.fd)) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/fontspec\fontspec.sty (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/l3packages/xparse\xpars e.sty (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/l3kernel\expl3.sty (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/l3backend\l3backend-xet ex.def))) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/fontspec\fontspec-xetex .sty (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/base\fontenc.sty) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/fontspec\fontspec.cfg)) ) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/xltxtra\xltxtra.sty (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/iftex\ifluatex.sty (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/iftex\iftex.sty)) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/generic/iftex\ifxetex.sty) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/realscripts\realscripts .sty) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/metalogo\metalogo.sty)) (mypackage.sty) (babyloniannum.sty (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/xelatex/xunicode\xunicode.sty *** you should *not* be loading the inputenc package *** XeTeX expects the source to be in UTF8 encoding *** some features of other encodings may conflict, resulting in poor output. (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/tipa\t3enc.def)) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/numname\numname.sty)) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/enumitem\enumitem.sty) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/epigraph\epigraph.sty (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/nextpage\nextpage.sty)) (ideje.aux) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/tipa\t3cmr.fd) *** you should *not* be loading the inputenc package *** XeTeX expects the source to be in UTF8 encoding *** some features of other encodings may conflict, resulting in poor output. (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/amsfonts\umsa.fd) (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/amsfonts\umsb.fd) Overfull \hbox (4.25034pt too wide) in paragraph at lines 152--152 []\slabikar Jakmile uleh-︰ne¹, za-︰vøe¹ oèi a uvi-︰dí¹ své rucì, Missing character: There is no š in font slabikar! Missing character: There is no ř in font slabikar! Missing character: There is no ž in font slabikar! Missing character: There is no ř in font slabikar! Missing character: There is no ě in font slabikar! Missing character: There is no č in font slabikar! Missing character: There is no č in font slabikar! [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/amsfonts\ueuf.fd) [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54] [55] (C:\Users\Hynek\AppData\Local\Programs\MiKTeX\tex/latex/lm\ot1lmr.fd) [56] [57] Overfull \hbox (1.97777pt too wide) in paragraph at lines 1842--1850 \TU/lmr/m/n/10 úlohu a čekala, až ji vypracujeme. Po hodině práce jsem jí odevz dal prázdný [58] ! Undefined control sequence. l.1864 \speak {Dana Scott} Jak tě ta otázka napadla? Proč se na FOM ? ! Emergency stop. l.1864 _____________________________________________________________________ PDFTeXify Compilation Report (Pages: 0) Errors: 2 Warnings: 2 Bad Boxes: 2

  • French babel raising error if colon in label with cleverref [duplicate]
    by Thomas on July 20, 2026 at 1:40 pm

    In my document, I add label to sections, figures etc with the following \label{sec:a}. In an English document, when I want to refer to these label using the package cleverref (with \cref{sec:a}) and all works well. But if I change the document language to French, I get the following error Missing \endcsname inserted. <to be read again> The issue of the error is the colon : in the label, if I use sec-a instead of sec:a, the compilation works well. But I don't explain why the usage of French language has an incidence on this... Here is a MWE : \documentclass{article} \usepackage[T1]{fontenc} % \usepackage[english]{babel} % If uncommented : no problem \usepackage[french]{babel} % If uncommented : error at compilation \usepackage{cleveref} \begin{document} Voir Section~\cref{sec:a}. \section{A} \label{sec:a} \end{document} Note that if I use \ref{sec:a}, there is no issue at compilation. I'm using LaTeX version 3.141592653-2.6-1.40.25 (TeX Live 2023/Debian)- maybe an old version ?, and here is the list of file (/cc @Joseph) : *File List* article.cls 2023/05/17 v1.4n Standard LaTeX document class size10.clo 2023/05/17 v1.4n Standard LaTeX file (size option) fontenc.sty 2021/04/29 v2.0v Standard LaTeX package babel.sty 2024/01/07 v24.1 The Babel package english.ldf 2017/06/06 v3.3r English support from the babel system babel-english.tex cleveref.sty 2018/03/27 v0.21.4 Intelligent cross-referencing l3backend-pdftex.def 2024-01-04 L3 backend support: PDF output (pdfTeX) ***********

  • Para mode alignment with equal column sep by using tabular or tabular* only
    by MadyYuvi on July 20, 2026 at 12:35 pm

    I'm trying to make all the column into para alignment with equal columnsep, I've referred the answer from @egreg Cells of equal width using tabular which is somewhat match with my requirement and not sure how to fix para mode alignment, and the MWE is: \documentclass{book} \ExplSyntaxOn \newenvironment{ftabular}[2][c] { \lawrence_ftabular:nn { #1 } { #2 } } { \endtabular } \tl_new:N \l__lawrence_ftabular_header_tl \dim_new:N \l__lawrence_ftabular_maxwd_dim \box_new:N \l__lawrence_ftabular_item_box \cs_new_protected:Nn \lawrence_ftabular:nn { \tl_clear:N \l__lawrence_ftabular_header_tl \dim_zero:N \l__lawrence_ftabular_maxwd_dim \clist_map_inline:nn { #2 } { \hbox_set:Nn \l__lawrence_ftabular_item_box { ##1 } \dim_set:Nn \l__lawrence_ftabular_maxwd_dim { \dim_max:nn { \l__lawrence_ftabular_maxwd_dim } { \box_wd:N \l__lawrence_ftabular_item_box } } \tl_put_right:Nn \l__lawrence_ftabular_header_tl { & {\makebox[\l__lawrence_ftabular_maxwd_dim]{##1}} } } \tl_put_right:Nn \l__lawrence_ftabular_header_tl { \\ \hline } \tabular[#1]{ c| *{ \clist_count:n { #2 } } { c| } } \tl_use:N \l__lawrence_ftabular_header_tl } \ExplSyntaxOff \begin{document} \begin{ftabular}{Human capital and research, Reflects countries’ investment in education and research and development. Range: 0 to 100., Captures national investments in general infrastructure, information and communication technologies and ecologically sustainable development. Range} \hline \\ Column 1 & Column2 & Column3\\ \end{ftabular} \end{document} I understood that this requirement easily can fix by using tabularx and tabulary and so on, but it's much helpful for me, if it fix by using either tabular or tabular*

  • What is the correct way to print a mixed number compatible with a tagged PDF?
    by Pablo González L on July 20, 2026 at 12:31 pm

    I am working on a small package for school things (primary/secondary) where the well-known mixed numbers appear frequently ($3\frac{4}{5}$). The MWE I'm showing below does the job and can be validated with veraPDF. I'm using TL26 and LuaTeX: \DocumentMetadata { lang=es-CL, pdfversion=2.0, pdfstandard=ua-2, tagging=on, } \documentclass{article} \usepackage[spanish]{babel} \usepackage{unicode-math, hyperref} \hypersetup { colorlinks = true, pdfstartview = FitH, pdfdisplaydoctitle = true, pdftitle = {Test para números mixtos}, } \ExplSyntaxOn % Invisible Separator (use \Umathchardef from LuaTeX) \hook_gput_code:nnn {begindocument} {spintent} { \Umathchardef \__spintent_invisible_sep: = "0 "0 "2063 } % Vars \box_new:N \l__spintent_spmQ_target_box \box_new:N \l__spintent_spmQ_ref_box \dim_new:N \l__spintent_spmQ_raise_dim \dim_new:N \l__spintent_spmQ_target_dim \dim_new:N \l__spintent_spmQ_ref_dim \tl_new:N \l__spintent_spmQ_factor_tl \tl_new:N \l__spintent_spmQ_math_style_tl % Math style (use \mathstyle from LuaTeX) \cs_new_protected:Npn \__spintent_wrap_math:n #1 { $ \l__spintent_spmQ_math_style_tl #1 $ } \cs_new_protected:Npn \__spintent_spmQ_capture_math_style: { \tl_set:Ne \l__spintent_spmQ_math_style_tl { \int_case:nnF { \mathstyle } { { 0 } { \exp_not:N \displaystyle } { 1 } { \exp_not:N \displaystyle } { 2 } { \exp_not:N \textstyle } { 3 } { \exp_not:N \textstyle } { 4 } { \exp_not:N \scriptstyle } { 5 } { \exp_not:N \scriptstyle } { 6 } { \exp_not:N \scriptscriptstyle } { 7 } { \exp_not:N \scriptscriptstyle } } { \exp_not:N \textstyle } } } \cs_new_protected:Npn \__spintent_spmQ_scale_int:nnn #1 #2 #3 { \__spintent_spmQ_capture_math_style: \hbox_set:Nn \l__spintent_spmQ_target_box { \__spintent_wrap_math:n { #1 } } \hbox_set:Nn \l__spintent_spmQ_ref_box { \__spintent_wrap_math:n { \frac { #2 } { #3 } } } % Alturas \dim_set:Nn \l__spintent_spmQ_target_dim { \box_ht_plus_dp:N \l__spintent_spmQ_target_box } \dim_set:Nn \l__spintent_spmQ_ref_dim { \box_ht_plus_dp:N \l__spintent_spmQ_ref_box } % \dim_ratio:nn \dim_compare:nNnTF { \l__spintent_spmQ_target_dim } = { \c_zero_dim } { \tl_set:Nn \l__spintent_spmQ_factor_tl { 1 } } { \tl_set:Ne \l__spintent_spmQ_factor_tl { \dim_ratio:nn { \l__spintent_spmQ_ref_dim } { \l__spintent_spmQ_target_dim } } } % Sacle int box \box_scale:Nnn \l__spintent_spmQ_target_box { \l__spintent_spmQ_factor_tl } { \l__spintent_spmQ_factor_tl } % Align \dim_set:Nn \l__spintent_spmQ_raise_dim { \box_dp:N \l__spintent_spmQ_target_box - \box_dp:N \l__spintent_spmQ_ref_box } % Print \box_move_up:nn { \l__spintent_spmQ_raise_dim } { \box_use_drop:N \l__spintent_spmQ_target_box } \MathMLintent { enteros } { \__spintent_invisible_sep: } \frac { #2 } { #3 } } % #1 = int, #2 = Numerador, #3 = Denominador \NewDocumentCommand { \spmQ } { m m m } { \__spintent_spmQ_scale_int:nnn { #1 } { #2 } { #3 } } \ExplSyntaxOff \begin{document} Texto en línea $\spmQ{3}{4}{5}$ fin del párrafo. \[ \spmQ{3}{4}{5} \] \end{document} It produces the following output: and: <math xmlns="http://www.w3.org/1998/Math/MathML"> <mtext> <math xmlns="http://www.w3.org/1998/Math/MathML"> <mn>3</mn> </math> </mtext> <mi intent="enteros" mathvariant="normal">⁣</mi> <mfrac> <mn>4</mn> <mn>5</mn> </mfrac> </math> This can be done in a better way? Temporary code (will be removed later) This is an attempt at a generalized version of the answer given by David Carlisle using Lua. The idea is to not depend on the font name lmroman10-Regular.otf, but to capture it directly from Lua when executing the command, scale it, and print it. My best effort using Lua and \raisebox, which don't affect tagged PDFs...follows Max Chernoff style 😀 \DocumentMetadata { lang = es-CL, pdfversion = 2.0, pdfstandard = ua-2, tagging = on, } \documentclass{article} \usepackage[spanish]{babel} \usepackage{unicode-math, hyperref} \hypersetup { colorlinks = true, pdfstartview = FitH, pdfdisplaydoctitle = true, pdftitle = {Test para números mixtos}, } \begin{filecontents*}[overwrite]{\jobname.lua} -- Max Chernoff style (https://chat.stackexchange.com/transcript/message/68993656#68993656) local function register_tex_cmd(name, func, args) name = "__spintent_" .. name .. ":" .. ("n"):rep(#args) local scanners = {} for i = 1, #args do local scan_type = (args[i] == "string" and "scan_argument") or "scan_" .. args[i] scanners[i] = token[scan_type] end local scanning_func if #scanners == 1 then local s1 = scanners[1] scanning_func = function() func(s1()) end elseif #scanners == 2 then local s1, s2 = scanners[1], scanners[2] scanning_func = function() func(s1(), s2()) end else scanning_func = function() local values = {} for i = 1, #scanners do values[i] = scanners[i]() end func(table.unpack(values)) end end local index = luatexbase.new_luafunction(name) lua.get_functions_table()[index] = scanning_func token.set_lua(name, index, "global", "protected") end -- Code for \spmQ local spintent_factor = nil local glyph_id = node.id("glyph") local font_cache = {} local function is_digit(n) return n.char >= 48 and n.char <= 57 end local function get_scaled_font(id, factor) local key = tostring(id) .. ":" .. tostring(factor) if font_cache[key] then return font_cache[key] end local old_font = font.getfont(id) if not old_font then return id end local spec = {} for k, v in pairs(old_font.specification) do spec[k] = v end spec.size = math.floor(old_font.size * factor) local ok, data = pcall(fonts.definers.loadfont, spec) if not ok or not data then return id end local new_id = font.define(data) font_cache[key] = new_id -- texio.write_nl("new font = " .. tostring(new_id)) return new_id end local function scale_glyphs(head, factor) for n in node.traverse_glyph(head) do if is_digit(n) then -- texio.write_nl("glyph = " .. n.char .. " font = " .. n.font) local new_id = get_scaled_font(n.font, factor) n.font = new_id local f = font.getfont(new_id) if f and f.characters then local c = f.characters[n.char] if c then n.width = c.width n.height = c.height n.depth = c.depth end end end end return head end luatexbase.add_to_callback("post_mlist_to_hlist_filter", function(head) if not spintent_factor then return head end local factor = spintent_factor spintent_factor = nil -- texio.write_nl("MATH factor = " .. tostring(factor)) return scale_glyphs(head, factor) end, "spintent-math-scale" ) register_tex_cmd( "luafun_send_factor", function(value) local numerator, denominator = value:match("^(%d+)/(%d+)$") if numerator and denominator then spintent_factor = tonumber(numerator) / tonumber(denominator) else spintent_factor = tonumber(value) end -- texio.write_nl("LUA factor = " .. tostring(spintent_factor)) end,{"string"}) \end{filecontents*} \ExplSyntaxOn \cs_generate_variant:Nn \lua_load_module:n { V } \lua_load_module:V \c_sys_jobname_str \cs_generate_variant:Nn \__spintent_luafun_send_factor:n { V, e } % Invisible Separator (use \Umathchardef from LuaTeX) \hook_gput_code:nnn {begindocument} {spintent} { \Umathchardef \__spintent_invisible_sep: = "0 "0 "2063 } % Vars \box_new:N \l__spintent_spmQ_target_box \box_new:N \l__spintent_spmQ_ref_box \dim_new:N \l__spintent_spmQ_raise_dim \dim_new:N \l__spintent_spmQ_target_dim \dim_new:N \l__spintent_spmQ_ref_dim \tl_new:N \l__spintent_spmQ_factor_tl \tl_new:N \l__spintent_spmQ_math_style_tl % Math style (use \mathstyle from LuaTeX) \cs_new_protected:Npn \__spintent_spmQ_wrap_math:n #1 { $ \l__spintent_spmQ_math_style_tl #1 $ } \cs_new_protected:Npn \__spintent_spmQ_capture_math_style: { \tl_set:Ne \l__spintent_spmQ_math_style_tl { \int_case:nnF { \mathstyle } { { 0 } { \exp_not:N \displaystyle } { 1 } { \exp_not:N \displaystyle } { 2 } { \exp_not:N \textstyle } { 3 } { \exp_not:N \textstyle } { 4 } { \exp_not:N \scriptstyle } { 5 } { \exp_not:N \scriptstyle } { 6 } { \exp_not:N \scriptscriptstyle } { 7 } { \exp_not:N \scriptscriptstyle } } { \exp_not:N \textstyle } } } \cs_new_protected:Nn \__spintent_spmQ_measure:nnn { \__spintent_spmQ_capture_math_style: \hbox_set:Nn \l__spintent_spmQ_target_box { \__spintent_spmQ_wrap_math:n {#1} } \hbox_set:Nn \l__spintent_spmQ_ref_box { \__spintent_spmQ_wrap_math:n { \frac{#2}{#3} } } \dim_set:Nn \l__spintent_spmQ_target_dim { \box_ht_plus_dp:N \l__spintent_spmQ_target_box } \dim_set:Nn \l__spintent_spmQ_ref_dim { \box_ht_plus_dp:N \l__spintent_spmQ_ref_box } \dim_compare:nNnTF { \l__spintent_spmQ_target_dim } = { 0pt } { \tl_set:Nn \l__spintent_spmQ_factor_tl {1} } { \tl_set:Ne \l__spintent_spmQ_factor_tl { \dim_ratio:nn { \l__spintent_spmQ_ref_dim } { \l__spintent_spmQ_target_dim } } } % Pass to Lua 😀 \__spintent_luafun_send_factor:V \l__spintent_spmQ_factor_tl } % print \cs_new_protected:Nn \__spintent_spmQ_scale:nnn { \__spintent_spmQ_measure:nnn {#1}{#2}{#3} \luamml_annotate:en { nucleus = false, core={[0]='mn','#1'} } { \raisebox { -\box_dp:N \l__spintent_spmQ_ref_box } { \__spintent_spmQ_wrap_math:n { #1 } } } \MathMLintent {enteros} { \__spintent_invisible_sep: } \frac{#2}{#3} } \NewDocumentCommand \spmQ { m m m } { \__spintent_spmQ_scale:nnn {#1}{#2}{#3} } \ExplSyntaxOff \begin{document} Texto en línea: $-\spmQ{35}{4}{5}+\frac{2}{5}$ \[ \spmQ{35}{4}{5} \] \end{document} <math xmlns="http://www.w3.org/1998/Math/MathML"> <mn>35</mn> <mi intent="enteros" mathvariant="normal">⁣</mi> <mfrac> <mn>4</mn> <mn>5</mn> </mfrac> </math>

  • What actually is the "binding correction"?
    by M0M0 on July 20, 2026 at 11:36 am

    The KOMA script classes (and probably other classes as well) offer an option to set a binding correction. There are are few questions on the forum regarding how to determine the binding correction if one has a sample book (similar number of pages, same printing service). There are also (in German) two methods to do so described by Markus Kohm. However, I have a hard time understanding how to carry them out. I think this is caused by my total misunderstanding what binding correction even refers to. Often it is said that it is the amount of paper that is "lost due to" or "vanishes inside" the binding. However, I think I don't fully understand what is meant by this. I personally (maybe wrongly) think that it is the difference between the actually paper width and the width of the projection of the bound, curved, actual page inside the book onto a flat surface (the perceived page). The reason why I'm not sure about this is, that here the loss that is due to the actual binding is almost negligible compared to the loss of the curvature of the page. In fact this is more of a "curvature correction" than a "binding correction" then. Also, the curvature applies to the whole page (but is of course strongest close to the inner end of the page), does it really make sense to apply the correction only to the inner margin? It feels like the whole page layout should be recalculated taking the curvature of the page into account. To illustrate my problem: If I use Kohm's second method (open the book in the middle as you would read it; put a ruler in the middle; push a paper of the same width as the page against the ruler; measure how far this page hangs over the end of the book page), it makes a huge difference if I use a flexible paper and push it against the ruler such that follows the curvature of the page or if I use a stiff page and push it against the ruler while the page is parallel to the desk plane. For my reference example the first method gives a few mm and the second 2 cm. The second method takes the lost width due to the curvature into account (projection onto a flat plane) while the first one doesn't. As said, I think the second method is the correct one. But then again it is said that an upper limit for the binding correction is half of the height of the book (without cover) since the page at max needs to wrap around half of it. But why is this is a upper bound? In my example the loss due to the curvature of the pages is much larger than half of the book's width. I apologize if the question is hard to follow. I think it is a problem hard to describe in words, which is probably the reason why I'm such confused. Edit: I hope those two pictures help to illustrate the problem. This, first image, shamelessly stolen from this question shows that commonly used bindings for thesis like documents can cause a strong curvature of the page. This second picture is a drawing (sorry, I really can't draw) of mine to illustrate what I mean. The question in the end is, is the binding correction the page width minus r2 (the projection of the page onto a plane) r4 (the total, curved, visible area of the page) the difference between r1 and r3 I was under the assumption that the term binding allowance/binding correction is well defined and I'm simply not able to understand it. If the question is indeed opinion based (that is the binding allowance is not a well defined term and might to refer to whatever a typesetting thinks they should or should not correct for), I apologize for asking it. Since the discussion came up in the comments: I struggle with the term visibility (I'm not a native speaker). Is r3 considered visible or is r1 considered visible in the context of a binding allowance? I don't mean this in a philosophical way but as a genuine question.

  • Node placement in tikz-cd when compiled in LaTeXML
    by Branimir Ćaćić on July 20, 2026 at 9:39 am

    I'm testing a manuscript for LaTeXML compatibility ahead of submission to the arXiv, and I've run into the following curious issue with tikz-cd when compiled in LaTeXML. In short, node names involving the \overline command are systematically misaligned. Here's a minimal example illustrating this behaviour: \documentclass{article} \usepackage{tikz-cd} \usepackage{latexml} \begin{document} % both node names are centered \[ \begin{tikzcd} Q \\ R \arrow[from=1-1,to=2-1] \end{tikzcd} \] % the name of node 1-1 is now right- and bottom-aligned \[ \begin{tikzcd} \overline{Q} \\ R \arrow[from=1-1,to=2-1] \end{tikzcd} \] \end{document} Here are screencaps of the resulting diagrams side by side: I'm hoping there's a quick workaround for this behaviour. My manuscript involves a number of commutative diagrams where \overline is used repeatedly, some of which are quite large. Note that the above code compiles perfectly in LaTeXML without any errors or warnings. EDIT: For whatever it's worth, here's what you get from the following code: \[ \begin{tikzcd} \overline{Q} & Q \\ Q & \overline{Q} \arrow[from=1-1,to=2-1] \arrow[from=2-1,to=2-2] \arrow[from=1-1,to=1-2] \arrow[from=1-2,to=2-2] \end{tikzcd} \] EDIT 2: The same diagrams but with \tikzcdset{nodes=draw, every diagram/.append style={baseline=(\tikzcdmatrixname-1-1.base)}} as suggested:

  • Jitter Metafont stroke endpoints to make glyphs messier [closed]
    by morgan on July 20, 2026 at 4:03 am

    I would like to use .*TeX to make a variety of documents, including many with handwriting. I would like to avoid the glyphs exactly repeating since that looks less real. I previously found something to offset and rotate words, which definitely would help, but is there a way to have Metafont stroke endpoints be randomly offset? That would make each glyph a bit different, and in combination with other effects and on a handwriting style font, better approximate the look of handwriting as well as be another way to show rushed vs calmly written documents.

  • How to rotate an illustration created using an environment generated using the newfloat command?
    by forrest on July 19, 2026 at 3:49 pm

    In my book I have two kinds of illustrations: photographs and sketches. These should be named respectively and should have distinct counters. This task can be done with the use of the \newfloat command of the memoir package. Great. Now, among both kinds of illustrations are present big graphics which should be rotated by the angle of 90 degrees - together with their captions. The tool aimed to perform this operation is sidewayfigure environment which is included in the rotating package. Fine. The remaining task is to integrate these two environments, but I am failed by it. Code: \documentclass[11pt,twoside]{memoir} \usepackage{mwe} \usepackage[utf8]{inputenc} \usepackage{graphicx} \usepackage{rotating} \setstocksize{180mm}{120mm} \settrimmedsize{180mm}{120mm}{*} \settypeblocksize{160mm}{100mm}{*} \setlrmargins{10mm}{*}{*} \setulmargins{10mm}{*}{*} \setheadfoot{0pt}{0pt} \settypeoutlayoutunit{mm} \checkandfixthelayout \newfloat{photo}{lop}{Photograph} \newfloat{sketch}{los}{Sketch} \begin{document} \begin{photo}[p] \includegraphics[width=\textwidth,height=.9\textheight]{example-image-a}% \caption{First photo}\label{photo:first} \end{photo} \begin{sketch}[p] \includegraphics[width=\textwidth,height=.9\textheight]{example-image-b}% \caption{First sketch}\label{sketch:first} \end{sketch} \begin{sidewaysfigure} \includegraphics[width=\textwidth,height=.5\textheight]{example-image-c}% \caption{First figure}\label{figure:second} \end{sidewaysfigure} \begin{photo} \begin{sideways} \includegraphics[width=\textwidth,height=.5\textheight]{example-image-a}% \caption{Second photo}\label{photo:second} \end{sideways} \end{photo} \end{document} By the way: How width and height optional arguments of \includegraphics work while are called within sidewaysfigure environment?

  • Fine-tuning the box surrounding a bar plot
    by Muhannad Al Ayoubi on July 18, 2026 at 5:22 pm

    This is my first time making a bar plot using pgfplots. I am happy so far with what I have, but I still need some points. How can I make the top-most tick (14) coincide with the top boundary of the box? I do not like the tiny space between the top-most gridline and the top boundary of the box. I've already tried removing 14 from the key ytick but I don't like the result. I think the 14 has to stay. Suppose instead I decided to completely remove the top and right boundaries of the box. I know I can do that using the options axis x line*=bottom and axis y line*=left, but then I'd like to include arrowheads, at least for the y-axis. How to do that? Finally, I've managed to adjust the distance between successive bars by playing with the option x=0.8 cm. Is there a better way? Here is my code. I've also attached the figure. \documentclass[10pt]{book} \usepackage{tikz,pgfplots} \begin{document} \begin{tikzpicture}[every node/.style={font=\footnotesize}] \begin{axis}[ clip=false, ybar, ymajorgrids, grid style={dashed}, ymin=0, %axis x line*=bottom, %axis y line*=left, xlabel=Number of siblings, ylabel=Frequency, ytick pos=left, xtick pos=left, xtick=data, ytick={0,2,4,...,12,14}, bar width=.4cm, x=0.8cm, y=0.3cm, label style={font={\footnotesize \itshape}}, tick label style={font={\footnotesize \itshape}}, nodes near coords, nodes near coords align={vertical}, ] \addplot [fill=orange,] coordinates { (0,3) (1,13) (2,8) (3,3) (4,1) }; \end{axis} \end{tikzpicture} \end{document}

  • Adjusting TikZ code example to create clock faces for modular arithmetic graphics
    by Bryan-StackExchange on July 18, 2026 at 4:30 pm

    The following Stack Exchange answers describe two sort of clock faces which are very close to what I need : Chords between nodes on a clock-like diagram using TikZ As seen in the two examples, I would like to : keep the digits on exterior of circle control whether to display the arrows or lines - or, especially, not display them. I have been able to adjust the code of the two answers (details below) in order to : increase the divisions e.g. from 12 to 98 (but see below) obtain any single face and print it using most of size 8.5 x 11 paper I still would like : display only certain values around perimeter - e.g. 12, 3, 6, 9 as might be seen on a normal clock increase the total to 98 but ideally any value. The purpose is generally for looking at symmetry in modular arithmetic. LaTeX seems ideally suited for this vs. e.g. Gnuplot. omit the lines between "nodes" (or markings) potentially create hash marks on the circle at any increment I do not understand many parts of the two code examples, and I believe this is necessary to adjust the examples to my requirements. e.g. the function of modtweleve and TikZMGClockMath. I am using https://tikz.dev/ as a reference - so I suspect I am overlooking a number of resources. The small adjustments to the two answers in the link are IMHO trivial, and I do not think they need to be reproduced here unless requested. some details : in the accepted answer by user Jake, in \newcommand replace 12 with e.g. 50. However, this approach runs into memory problems as the value increases. adjust stepsize in {1,...,12} to e.g. stepsize in {5} gives the fifth clock face only. This is good. in the answer by user percusse I adjusted 12 to 13 and used a single \begin{scope} to control how many pictures are displayed. The resultant image(s) are closest to what I need ; however, I do not understand how the macro is working - e.g. the \modtwelve part. However, the value can be increased to 98 without any memory problems, and create a nice image. In fact, my exact goal is met by adjusting \TikZMGClockMath{3}{28} - giving a 7-fold pattern. Specifically, the drawing would be perfect if the integers between e.g. 0 and 28 were omitted. in that answer, I commented out line 19-29 - from \draw and the first } that appears - to 'omit' the lines (vectors). This seems good. UPDATE: I added hashmarks with this code: \foreach \angle / \label in {90/0, 38.6/14, -12.8/28, -64.2/42, -115.6/56, -167/70, -218.4/84} ... which is good to show 7-fold symmetry, but they are not on the perimeter. The \draw commands adjust the position of a node or line width by the \angle. This is easy to adjust. See https://tikz.dev/pgffor UPDATE I found an inelegant way to add hashmarks - right after the above code, put this in: \draw[line width=0.5pt] (\angle:8.0cm) -- (\angle:8.5cm); } \foreach \angle in {86.3265, 86.3265, 82.6531, [.. skipping...] -258.98, -262.653, -266.327} the values are pre-calculated using awk. It would be nice to reduce that into a \foreach, multiplying the value of the example (360/98). Then, (360/98) could be any division of the circle. I tried asking on the original post, but I do not have the requisite reputation. If there is a better approach, I'd be glad to change this question.

  • An original cover of my book for a broken clock
    by Sebastiano on July 17, 2026 at 8:21 pm

    I have tried to create a cover for my book that is beautiful and visually appealing. Since the book deals with topics such as relativity, clocks, four-vectors, spacetime, the calculus of variations, and many other fascinating ideas, I imagined clocks being sucked into an unknown spacetime and deformed in the style of Salvador Dalí. The clocks become distorted until they break apart into many fragments, including the smallest and most symbolic components, such as the central pin and the internal spring. Question: How can you improve the broken clock that loses pieces to make it look more beautiful? \documentclass[12pt,a4paper]{book} \usepackage[T1]{fontenc} \usepackage{amsmath,amsfonts,amssymb} \usepackage{tikz} \usetikzlibrary{calc} \usepackage{geometry} \begin{document} \pagestyle{empty} \begin{tikzpicture}[remember picture, overlay] \coordinate (Centro) at (current page.center); \coordinate (TopRight) at (current page.north east); \coordinate (TopLeft) at (current page.north west); \definecolor{bglight}{RGB}{172, 206, 184} \fill[bglight] (current page.south west) rectangle (current page.north east); \definecolor{clockgold}{RGB}{230, 177, 43} \definecolor{clockgreen}{RGB}{166, 209, 108} \definecolor{clockorange}{RGB}{240, 133, 41} \definecolor{clockgrey}{RGB}{140, 155, 145} \definecolor{gridblue}{RGB}{110, 150, 135} \definecolor{authorgreen}{RGB}{18, 92, 79} \node[anchor=north east, align=right, text width=7cm] at ($(TopRight)+(-1.5,-1.5)$) { {\fontfamily{ptm}\selectfont\LARGE\color{authorgreen}\textbf{Name Surname 1}}\\[0.2cm] {\fontfamily{ptm}\selectfont\LARGE\color{authorgreen}\textbf{Name Surname 2}} }; \node[anchor=north west, align=justify, text width=16cm] at ($(TopLeft)+(1.5,-3.5)$) { {\fontfamily{pnc}\selectfont\huge\itshape\color{white}Lezioni di}\\[0.3cm] {\fontfamily{pnc}\fontseries{b}\fontsize{44pt}{46pt}\selectfont\spaceskip=0.5em\color{white} LONGGGGGGGGGGG\\ [.4cm] LONGGGGGGGGGGG} }; \begin{scope}[shift={(Centro)}, scale=1.6] \begin{scope}[gridblue, opacity=0.5, line width=0.8pt] \foreach \k in {-4.5,-3.7,-2.9,-2.1,-1.3,-0.5,0.5,1.3,2.9,3.7,4.5} { \draw[smooth, samples=40] plot[domain=-5.5:4.5] ({ \k * (1 - 0.6 / (1 + 0.2*\k*\k + 0.2*\x*\x)) }, { \x * (1 - 0.6 / (1 + 0.2*\k*\k + 0.2*\x*\x)) }); } \foreach \k in {-5,-4.1,-3.2,-2.3,-1.4,-0.5,0.5,1.4,2.3,3.2,4} { \draw[smooth, samples=40] plot[domain=-4.8:4.8] ({ \x * (1 - 0.6 / (1 + 0.2*\x*\x + 0.2*\k*\k)) }, { \k * (1 - 0.6 / (1 + 0.2*\x*\x + 0.2*\k*\k)) }); } \end{scope} \fill[white, opacity=0.25, rotate around={12:(3.2,-1.5)}] (1.8,-3) rectangle (4,0); \fill[white, opacity=0.25, rotate around={-15:(-3,2)}] (-4.2,0.8) rectangle (-1.8,3.2); \begin{scope}[shift={(-2.8,2)}, rotate=-15, scale=0.95] \draw[white, fill=white, line width=4pt, line join=round] plot[smooth cycle, tension=0.5] coordinates {(-1,1.1) (1,0.9) (0.9,-1) (-1.1,-0.8)}; \draw[gray!60!black, line width=2pt, line join=round] plot[smooth cycle, tension=0.5] coordinates {(-1,1.1) (1,0.9) (0.9,-1) (-1.1,-0.8)}; \fill[clockgold] plot[smooth cycle, tension=0.5] coordinates {(-0.7,0.8) (0.7,0.7) (0.6,-0.7) (-0.7,-0.5)}; \fill[black] (0,0) circle (2.5pt); \draw[black, ultra thick, ->] plot[smooth, tension=1] coordinates{(0,0) (0.05, 0.25) (0.15,0.5)}; \draw[black, ultra thick, ->] plot[smooth, tension=1] coordinates{(0,0) (-0.2, -0.05) (-0.4,-0.1)}; \foreach \a in {0,90,180,270} \draw[white, thick] (\a:0.55) -- (\a:0.7); \end{scope} \begin{scope}[shift={(-2.6,-0.8)}, rotate=22, scale=1.05] \draw[white, fill=white, line width=4pt, line join=round] plot[smooth cycle, tension=0.7] coordinates {(-0.6,1.4) (0.8,0.4) (0.2,-1.5) (-0.9,-0.8)}; \draw[gray!60!black, line width=2.2pt, line join=round] plot[smooth cycle, tension=0.7] coordinates {(-0.6,1.4) (0.8,0.4) (0.2,-1.5) (-0.9,-0.8)}; \fill[clockgreen] plot[smooth cycle, tension=0.7] coordinates {(-0.4,1.1) (0.5,0.2) (0.1,-1.2) (-0.6,-0.6)}; \fill[black] (-0.1,-0.1) circle (2.5pt); \draw[black, ultra thick, ->] plot[smooth, tension=1] coordinates{(-0.1,-0.1) (0, 0.2) (0.15,0.6)}; \draw[black, ultra thick, ->] plot[smooth, tension=1] coordinates{(-0.1,-0.1) (0.05, -0.3) (0.2,-0.5)}; \draw[black!70, thick] (0.1,0.9) -- (0.2,1.1); \draw[black!70, thick] (-0.4,-0.8) -- (-0.5,-1.0); \end{scope} \begin{scope}[shift={(-.5,-3.6)}, rotate=-15, scale=0.9] \draw[white, fill=white, line width=4pt, line join=round] plot[smooth cycle, tension=0.7] coordinates {(-0.7,1.4) (0.8,1.2) (1.1,-2.2) (-0.9,-2.4)}; \draw[gray!60!black, line width=2pt, line join=round] plot[smooth cycle, tension=0.7] coordinates {(-0.7,1.4) (0.8,1.2) (1.1,-2.2) (-0.9,-2.4)}; \fill[clockgrey!70!clockgreen] plot[smooth cycle, tension=0.7] coordinates {(-0.5,1.1) (0.6,1.0) (0.8,-1.9) (-0.6,-2.0)}; \fill[black] (0.05,-0.1) circle (2.5pt); \draw[black, ultra thick, ->] plot[smooth, tension=1.2] coordinates{(0.05,-0.1) (-0.2, 0.4) (0.3,0.9)}; \draw[black, ultra thick, ->] plot[smooth, tension=1.2] coordinates{(0.05,-0.1) (0.4, -0.6) (0.1,-1.5)}; \draw[black!80, thick] (90:0.6) -- (90:0.8); \draw[black!80, thick] (0:0.5) -- (0:0.7); \draw[black!80, thick] (180:0.4) -- (180:0.6); \draw[black!80, thick] (270:0.6) -- (270:1.3); \end{scope} \begin{scope}[shift={(2.5,-3.8)}, rotate=-35, scale=1.1] \draw[white, fill=white, line width=4pt, line join=round] plot[smooth cycle, tension=0.4] coordinates {(-1.3,0.6) (1.3,0.7) (0.9,-0.6) (-1.1,-0.5)}; \draw[clockorange, line width=2.5pt, line join=round] plot[smooth cycle, tension=0.4] coordinates {(-1.3,0.6) (1.3,0.7) (0.9,-0.6) (-1.1,-0.5)}; \fill[black] (0,0) circle (2.5pt); \draw[black, ultra thick, ->] plot[smooth, tension=1] coordinates{(0,0) (0.3, 0.1) (0.7,0.2)}; \draw[black, ultra thick, ->] plot[smooth, tension=1] coordinates{(0,0) (-0.2, -0.05) (-0.5,-0.1)}; \draw[black!70, thick] (1,0.2) -- (1.2,0.2); \draw[black!70, thick] (-0.9,-0.2) -- (-1.1,-0.2); \end{scope} \begin{scope}[shift={(2.5,2.5)}, rotate=15, scale=0.85] \begin{scope}[shift={(-0.3, 0.2)}, rotate=5] \draw[white, fill=white, line width=3pt] (0,0) -- (110:1.2) arc(110:200:1.2) -- cycle; \fill[clockgrey!70!clockgreen] (0,0) -- (110:1.0) arc(110:200:1.0) -- cycle; \draw[black!80, thick] (180:0.7) -- (180:0.9); \draw[black!80, thick] (120:0.7) -- (120:0.9); \end{scope} \begin{scope}[shift={(0.2, 0.4)}, rotate=-8] \draw[white, fill=white, line width=3pt] (0,0) -- (10:1.3) arc(10:85:1.3) -- cycle; \fill[clockgrey!70!clockgreen] (0,0) -- (10:1.1) arc(10:85:1.1) -- cycle; \draw[black!80, thick] (0:0.8) -- (0:1.0); \draw[black!80, thick] (60:0.8) -- (60:1.0); \draw[black, ultra thick] (30:0.2) -- (45:0.7); \end{scope} \begin{scope}[shift={(0.0, -0.4)}, rotate=12] \draw[white, fill=white, line width=3pt] (0,0) -- (220:1.2) arc(220:340:1.2) -- cycle; \fill[clockgrey!70!clockgreen] (0,0) -- (220:1.0) arc(220:340:1.0) -- cycle; \draw[black!80, thick] (270:0.7) -- (270:0.9); \draw[black!80, thick] (300:0.7) -- (300:0.9); \end{scope} \begin{scope}[shift={(-0.8, -0.9)}, rotate=-30] \draw[white, fill=gray!40, line width=1.5pt] (0,0) -- (0.3,0.4) -- (-0.1,0.5) -- cycle; \end{scope} \begin{scope}[shift={(0.9, -0.2)}, rotate=45] \draw[white, fill=white, line width=2pt] (0,0) -- (0.4,0.1) -- (0.2,0.3) -- cycle; \end{scope} \fill[black] (-0.1,0.05) circle (2.5pt); \begin{scope}[shift={(-0.5, 0.8)}, rotate=25] \draw[black, ultra thick, ->] (0,0) -- (-0.4, 0.5); \end{scope} \draw[gray!80!black, thick, smooth] plot[domain=0:540, samples=40] (\x:{\x*0.001 + 0.05}); \end{scope} \begin{scope}[shift={(2.6,-1.4)}, rotate=45, scale=1.2] \draw[clockorange, line width=5pt, line join=round, fill=white, fill opacity=0.1] plot[smooth cycle, tension=0.2] coordinates {(-1.1,0.5) (1.1,0.5) (0.7,-0.5) (-0.7,-0.5)}; \end{scope} \end{scope} \end{tikzpicture} \clearpage \end{document}

  • Drawing and defining functions in tikz
    by Medulla Oblongata on July 16, 2026 at 2:48 pm

    I am trying to draw a graph (function of the form sin()*exp(-x^2)) inside an ellipse. How do I fit the graph inside the ellipse? I don't know how to scale and position it correctly. \documentclass[tikz]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[line width=1.2,fill=white] (1.5,0.5) ellipse (1.5 and 0.5); \draw[scale=0.1, domain=-20:20, samples=500, smooth, variable=\x, blue] (1.5,0.5) plot ({\x}, {0.5*sin(\x) * exp(-0.02*(\x)*(\x))}); \end{tikzpicture} \end{document} I want to produce something like:

  • Text overflowing in tabular cell with makecell
    by Matias Aznar on July 13, 2026 at 11:05 pm

    I'm creating a table in LaTeX with images and multi-line text in one column. The text in the "Observaciones" (Observations) column is overflowing outside the table boundaries and not wrapping properly within the cell. The third row's text wraps correctly, but the first two rows' text extends beyond the table width. I'm using \makecell[l] but it's not containing the text properly. How can I ensure the text stays within the cell boundaries and wraps properly regardless of content length? All rows should align at the top with text contained within the column width. The images sizes are 1257x1262 px \documentclass{article} \usepackage{geometry} \usepackage{makecell} \usepackage{graphicx} \geometry{ letterpaper, margin=3cm } \setlength{\marginparwidth}{2cm} \begin{document} \begin{table}[H] \centering \small \begin{tabular}{ >{\raggedright\arraybackslash}m{2cm} >{\centering\arraybackslash}m{3.4cm} >{\centering\arraybackslash}m{3.4cm} >{\raggedright\arraybackslash}m{6cm} } \hline \textbf{Fase} & \textbf{$L_1$} & \textbf{$L_3$} & \textbf{Observaciones} \\ \hline Poros & \includegraphics[width=3.3cm]{example-image} & \includegraphics[width=3.3cm]{example-image} & \makecell[tl]{ $N$: 127,090\\ $P_j$: 1.52\\ $T_G$: -1.16\\ Fuerte linealidad vertical } \\ \hline Óxido & \includegraphics[width=3.3cm]{example-image} & \includegraphics[width=3.3cm]{example-image} & \makecell[tl]{ $N$: 2,228\\ $P_j$: 1.09\\ $T_G$: -0.18\\ Débil anisotropía } \\ \hline Plagioclasa & \includegraphics[width=3.3cm]{example-image} & \includegraphics[width=3.3cm]{example-image} & \makecell[tl]{ $N$: 1,065\\ $P_j$: 1.29\\ $T_G$: -0.73\\ Orientación preferencial moderada sin embargo, se concentra en el eje Z } \\ \hline \end{tabular} \caption{Análisis de orientación de fases de la muestra L187.} \label{tab:stereonets_l187} \end{table} \end{document}

  • Hollowed-out sphere effect
    by Sebastiano on July 13, 2026 at 10:49 pm

    How can I obtain the hollowed-out sphere effect? The drawing above is my original done many years before. \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows.meta, calc, positioning, shapes.geometric} \begin{document} \begin{tikzpicture}[ scale=1.2, axis/.style={thick, ->} ] \coordinate (O) at (0, 0); \coordinate (X) at (-2, -2.3); \coordinate (Y) at (5.5, 0); \coordinate (Z) at (0, 4); \coordinate (P) at (3.1, 1.3); \draw[axis] (O) -- (X) node[left, font=\large, xshift=-3pt] {$x$}; \draw[axis] (O) -- (Y) node[below, font=\large, yshift=-3pt] {$y$}; \draw[axis] (O) -- (Z) node[left, font=\large, xshift=-3pt] {$z$}; \begin{scope} \shade[ball color=gray!30!white, opacity=0.85] (O) circle (0.9); \draw[gray!60, thin] (O) circle (0.9); \fill[gray!60!black, opacity=0.9] plot[smooth cycle, tension=0.7] coordinates { ($(O)+(-0.2, 0.4)$) ($(O)+(0.5, 0.5)$) ($(O)+(0.6, -0.4)$) ($(O)+(0.1, -0.6)$) ($(O)+(-0.3, -0.3)$) }; \shade[inner color=black!80, outer color=gray!70!black, opacity=0.5] plot[smooth cycle, tension=0.7] coordinates { ($(O)+(-0.2, 0.4)$) ($(O)+(0.5, 0.5)$) ($(O)+(0.6, -0.4)$) ($(O)+(0.1, -0.6)$) ($(O)+(-0.3, -0.3)$) }; \end{scope} \fill[black] (O) circle (0.07) node[below, yshift=-4pt, font=\large] {$O$}; \draw[->, >=Stealth, shorten >= 2.5pt, shorten <= 2pt] (O) -- (P) node[midway, above, yshift=2pt, font=\large] {$r$}; \fill[black] (P) circle (0.08) node[above, yshift=3pt, font=\large] {$P$}; \node[right, font=\Large\itshape, xshift=2pt, yshift=-2pt] at (P) {$m$}; \node[below, font=\large] at (0.2, -0.95) {$M$}; \end{tikzpicture} \end{document}

  • How to make a relatively more beautiful classification table of quadratic functions?
    by D G on July 9, 2026 at 12:16 am

    Objectives: remove top left cell all contents are vertically and horizontally centered well balanced padding in each cell make it relatively much more beautiful \documentclass[12pt,border=12pt]{standalone} \usepackage{amsmath,array,tikz} \usetikzlibrary{math} \newcommand{\graph}[2][]{ \begin{tikzpicture}[baseline=(current bounding box.center)] \draw[blue,thick,->] (-1.5,#2)--(1.5,#2) node[right]{$x$}; \draw[red,thick,domain=-1.5:1.5,samples=100] plot(\x,{#1\x*\x/2}); \end{tikzpicture} } \renewcommand{\arraystretch}{1.8} \setlength{\tabcolsep}{18pt} \begin{document} \begin{tabular}{| >{\centering\arraybackslash}m{2.2cm}| >{\centering\arraybackslash}m{5.2cm}| >{\centering\arraybackslash}m{5.2cm}|} \cline{2-3} & $\mathbf{a>0}$ & $\mathbf{a<0}$ \\ \hline $\mathbf{D<0}$ & \graph{-1/2} & \graph[-]{1/2} \\ \hline $\mathbf{D=0}$ & \graph{0} & \graph[-]{0} \\ \hline $\mathbf{D>0}$ & \graph{1/2} & \graph[-]{-1/2} \\ \hline \end{tabular} \end{document} Any improvements are always welcome!