Hot
- French text in superscriptby Phil8544 on July 5, 2026 at 4:08 pm
What package I have to use if I want to get French text in superscript? I want to write "57ème croche sur 92" with the term "ème" in superscript.
- How can I format the total value of a counter (as printed by `total` from totcount)?by modallyFragile on July 5, 2026 at 12:36 pm
I use countwords to count the number of words in some LaTeX documents. The package counts words into a standard LaTeX counter. I then use totcount to display this wordcount at the beginning of the document. The number is generally in the thousands. Totcount provides a single macro \total{<counter>} for printing the eventual value of a counter, but it doesn't do any intelligent formatting, like dividing thousands with a comma/space (and fair enough -- very few situations call for counters in the thousands!). I would like to print the eventual value of the counter at the beginning of the document in a nicely formatted way. How can I do this? Based on other discussions of formatting counters, I have tried using numprint and siunitx, but neither of these work -- MWEs below. TIA! Failure #1 numprint \documentclass{article} \title{Foobar} % For counting words \usepackage{countwords} \newcounter{words} \setcounter{words}{0} % For printing final value \usepackage{totcount} \regtotcounter{words} % For dummy text \usepackage{lipsum} \usepackage{numprint} \begin{document} \maketitle % Prints `1112' (no comma) \total{words} % `Should' print `1,112', but gives an error. \numprint{\total{words}} \countwordsstart{words} \lipsum[1-12] \countwordsstop{words} \end{document} I get an error: ./test.tex:27: Package numprint Error: Invalid characters `\def ' in mandatory argument of (numprint) \numprint. Allowed are (numprint) `0123456789.,eEdD+-\pm '. Failure #2 siunitx \documentclass{article} \title{Foobar} % For counting words \usepackage{countwords} \newcounter{words} \setcounter{words}{0} % For printing final value \usepackage{totcount} \regtotcounter{words} % For dummy text \usepackage{lipsum} \usepackage{siunitx} \begin{document} \maketitle % Prints `1112' (no comma) \total{words} % `Should' print `1,112', but gives an error. \num[group-separator={,}]{\total{words}} \countwordsstart{words} \lipsum[1-12] \countwordsstop{words} \end{document} I get an error: ./test.tex:27: Package siunitx Error: Invalid number '\def \c@words@totc {\c@words@totc (siunitx) }1112'. I also looked at fmtcount but found it doesn't cover thousands separators.
- To the revtex maintainer (Ulrika) fix for \label warning posted [closed]by David Morrissey on July 5, 2026 at 6:50 am
A fix for the "well worn" warning about the redefinition of \label in revtex 4-1 and 4-2 has been posted. Is is possible to have this implemented in the distribution? Conflict revtex4-2 class and nameref package Yes, it a warning but it is annoying. thank you.
- Spacing of `\hline`by zgrizz on July 4, 2026 at 10:46 pm
I'm wondering why columns in tabular seem to not add space but \hline does. Is there a way to make it so that everything overlaps? \documentclass{article} \setlength{\parindent}{0pt} \setlength{\parskip}{0pt} \setlength{\tabcolsep}{0pt} \begin{document} Line\\ Line \vspace*{-2\baselineskip} \begin{tabular}{|l|} \hline Line\\ \hline Line\\ \hline \end{tabular}%\par\prevdepth=\dp\strutbox \vspace*{-2\baselineskip} Line\\ Line \end{document} EDIT: Thank you to all who answered. Using David Carlisle's comment, I now have the below: \documentclass{article} \setlength{\parindent}{0pt} \setlength{\parskip}{0pt} \setlength{\tabcolsep}{0pt} \setlength{\lineskip}{0pt} \begin{document} \def\newhline{% \noalign{\kern-.5\arrayrulewidth}\hline\noalign{\kern-.5\arrayrulewidth}% } Line\\ Line \vspace*{-2\baselineskip} \begin{tabular}[t]{|l|} \newhline % <- causing problems Line\\ \newhline Line\\ \newhline \end{tabular}\par\prevdepth=\dp\strutbox % for overlap \vspace*{-2\baselineskip} Line\\ Line \end{document} Seems the top \newhline prevents everything from lining up.
- Forcing a line break for a long chapter title using a conference booklet templateby Edward on July 4, 2026 at 6:30 pm
I am a beginner LaTeX user who's utilizing the conference booklet template (found here) for a document, but I've run into a problem when having a chapter title be too long. Leaving it in a single line messes up its placement (and even makes it go through the end of the page if the title is long enough). I cannot seem to manage to get a line break there. Putting a \\ in the middle of \chapter{Long \\ title} gives me a 'somethin's wrong, perhaps a missing \item' error message, whereas \linebreak and \newline in its place both do nothing at all. Here are some screenshots to showcase what I mean: vs What I'm ideally looking for is to be able to break the chapter title into two lines and having the colored bar be thicker enough to compensate for it, but at this point I'd also be happy if I can just introduce any line break at all and just have the text aligned properly (to the side of the bar). Apologies if the solution is right there in my face or I've not provided sufficient information. Any help is appreciated!
- Preview knitr and `\Sexpr` output in LyXby NicolasBourbaki on July 4, 2026 at 6:05 pm
Using knitr in LyX provides a very convenient way of dynamic (and reproducible) report generation. It works well for me except for preview of the knitr and \Sexpr{} chunks. I wrapped my \Sexpr{} with a preview box, but it didn't generate or insert a preview. Of course, knitr requires a preceding run (evaluation) with R to resolve R code into text, but I don't see a reason why the preview shouldn't work.
- Adjusting a tikz pictureby Joao Paulo Guardieiro on July 4, 2026 at 1:59 pm
I want to draw the graph of z = x^2 + y^2, and I am using tikz for that. I used the following command: \begin{tikzpicture}[ x={(1cm,0cm)}, y={(-0.6cm,-0.35cm)}, z={(0cm,1cm)}, line join=round, line cap=round, scale=1, ] % Axes \draw[->] (0,0,0) -- (2,0,0); \draw[->] (0,0,0) -- (0,2.5,0); \draw[->] (0,0,0) -- (0,0,4); % Graph \draw[thick,smooth,variable=\t,domain=-1.8:1.8] plot ({\t},{0},{\t*\t}); % Circle that gives a 3d impression \draw[thick,smooth,variable=\t,domain=0:360] plot ({1.8*sin(\t)},{1.8*cos(\t)},{3.24}); \end{tikzpicture} However, the circle does not "fit" the graph: How can I adjust this?
- Unable to get Hindi text in a mostly English Beamer document using Babelby codeandfire on July 4, 2026 at 12:59 pm
I've gone through several threads on this forum, as well as videos by Javier Bezos, and these samples, but as the title says I'm unable to get Hindi text to work within a mostly English Beamer presentation, using Babel. Polyglossia works for me: \documentclass{beamer} \usepackage{polyglossia} \setdefaultlanguage{english} \setotherlanguage{hindi} \newfontfamily\devanagarifontsf[Script=Devanagari]{Noto Sans Devanagari} \begin{document} \title{\texthindi{नमस्ते}} \author{Lorem Ipsum} \begin{frame} \titlepage \end{frame} \end{document} However, I want to switch from Polyglossia to Babel because compilation is taking too long with Polyglossia for a large presentation. But I'm unable to find a snippet that works. For e.g.: \documentclass{beamer} \usepackage[english]{babel} \babelprovide[import, onchar=ids fonts]{hindi} \babelfont[devanagari]{sf}{Noto Sans Devanagari} \begin{document} \title{नमस्ते} \author{Lorem Ipsum} \begin{frame} \titlepage \end{frame} \end{document} When I compile this snippet with lualatex, I get this error: [1 Missing character: There is no न (U+0928) in font [lmsans12-regular]:+tlig;! {/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map} Missing character: There is no म (U+092E) in font [lmsans12-regular]:+tlig;! Missing character: There is no स (U+0938) in font [lmsans12-regular]:+tlig;! Missing character: There is no ् (U+094D) in font [lmsans12-regular]:+tlig;! Missing character: There is no त (U+0924) in font [lmsans12-regular]:+tlig;! Missing character: There is no े (U+0947) in font [lmsans12-regular]:+tlig;! ] (./hindi_reproducible_eg.aux)) I'm also getting two other messages from Babel in this compilation, and I'm not sure what they mean: Package babel Info: The current font is not a babel standard family: (babel) [lmsans10-regular]:+tlig; at 10.95pt (babel) There is nothing intrinsically wrong with this warning, and (babel) you can ignore it altogether if you do not need these (babel) families. But if they are used in the document, you should be (babel) aware 'babel' will not set Script and Language for them, so (babel) you may consider defining a new family with \babelfont. (babel) See the manual for further details about \babelfont. (babel) Reported on input line 7. (./hindi_reproducible_eg.aux Package babel Info: The following font families will use the default (babel) settings for all or some languages: (babel) * \rmfamily = lmr (babel) [lmroman10-regular]:+tlig; at 10.95pt (babel) * \sffamily = lmss (babel) [lmsans10-regular]:+tlig; at 10.95pt (babel) * \ttfamily = lmtt (babel) [lmmono10-regular]: at 10.95pt (babel) There is nothing intrinsically wrong with it, but (babel) 'babel' will no set Script and Language, which could (babel) be relevant in some languages. If your document uses (babel) these families, consider redefining them with \babelfont. (babel) Reported on input line 6. ) I have LuaLaTeX version 1.18.0, Beamer version 3.72, and Babel version 25.4.
- Is there today 2026 any use case for dvi files other than creating html and that like with tex4ht?by user2609605 on July 3, 2026 at 10:33 pm
I am aware for creating historical documents, the DVI format is still in use. And there is still tex4ht, as far as I know the only way to convert latex to HTML offered in TeXlive, but, apart from this, is there any use case for the DVI format? Maybe another package relying on it. I ask because i maintain a kind of build tool (very roughly comparable with latexmk) and ask myself on the details of supporting the dvi format.
- Asymptote Light Rendering with a Unit Cubeby LuckElixir on July 3, 2026 at 9:44 pm
I'm having trouble understanding Asymptote's (3.11) light rendering. When I run this code below: import three; size(8cm); currentprojection = orthographic((5,4,2), up=Y); currentlight = light(new pen[]{white}, new triple[]{(1,1,1)}); draw(unitcube, surfacepen=material(cyan)); real L = 2; draw(O--L*X, Arrow3); draw(O--L*Y, Arrow3); draw(O--L*Z, Arrow3); label("$x$", L*X, E); label("$y$", L*Y, N); label("$z$", L*Z, Z); I expected it to light up the whole cube (from my viewpoint; I understand the backside might not be lit). However, I instead got this: The left side of the cube is completely dark, which does not make sense considering the unit cube should essentially be lit with the placement of the light. However, changing the perspective to (5, 4, -2) yields this: The side that's pitch black here is the side that was initially lit in the first image. Considering there was no change to the light's position, I did not expect this to happen. I experimented with the emissive argument, however that is not what I wish to do. How does the lighting actually work in asymptote, and how do I fully illuminate all three sides of the cube, using the initial orthographic projection?
- latexml: how to remove ( ) around \date{\today} in title?by Nasser on July 3, 2026 at 8:01 pm
I've been working with google AI on this for 2 hrs. It can't figure a solution. One time it gave me 100 lines javascript code to fix this. Then it gave 50 lines .css code which made the date vanish. Here is MWE \documentclass[12pt]{article} \usepackage{latexml} \begin{document} \title{my book} \author{me} \date{\today} \maketitle \tableofcontents \section{first section} text \end{document} latexml always adds () around the date for some reason: How to tell it not to do that? commands used >latexml --dest=A.xml A.tex >latexmlpost --format=html5 --dest=A.htm A.xml
- How to make a complex citation on LateX? [closed]by Miguel on July 3, 2026 at 5:33 pm
I am trying to make the next complex citation with suffixes and prefixes: Shabica, 1970, 1971, Baird et al., 1985a; Baird & Sroka, 1990, their figure 5, p. C12-C13; Baird, 1997a, c, his figure 5A.4, p. 40) I know that in this case, we have to use \cite[prefix={}, suffix={}]{\reference}, but here there is another suffix at the end. I tried a lot of combinations using the previous command, but none of them worked.
- How to redefine amsmath's implicit-base logarithm operator (\log) according to typesetting conventions whenever it's not followed by a subscript?by Nyx on July 3, 2026 at 1:36 pm
The following is my MWE: \documentclass{article} \usepackage{mathtools} % Loads amsmath and defines \shortintertext % Logarithms \DeclareMathOperator{\lb}{lb} \NewCommandCopy{\oldlog}{\log} \newcommand*{\implicitbaselog}{% Uncomment only one of the following lines \oldlog % Uncomment to set ambiguous logarithm as default % \lb % Uncomment to set binary logarithm as default % \lg % Uncomment to set common logarithm as default % \ln % Uncomment to set natural logarithm as default } \newcommand*{\useambiguouslog}{\renewcommand*{\implicitbaselog}{\oldlog}} \newcommand*{\usebinarylog}{\renewcommand*{\implicitbaselog}{\lb}} \newcommand*{\usecommonlog}{\renewcommand*{\implicitbaselog}{\lg}} \newcommand*{\usenaturallog}{\renewcommand*{\implicitbaselog}{\ln}} \RenewDocumentCommand{\log}{e{_}}{ \IfNoValueTF{#1}{\implicitbaselog}{\oldlog_{#1}} } \begin{document} \begin{alignat*}{4} \shortintertext{With default definition of \texttt{\textbackslash implicitbaselog}: } \log x &= \oldlog x, && && && \\ \shortintertext{after \texttt{\textbackslash usebinarylog}: } \usebinarylog \log x &= \lb x \; &&\text{ and } && \; \log_3 x &&= \oldlog_3 x, \\ \shortintertext{after \texttt{\textbackslash usecommonlog}: } \usecommonlog \log x &= \lg x \; &&\text{ and } && \; \log_4 x &&= \oldlog_4 x, \\ \shortintertext{after \texttt{\textbackslash usenaturallog}: } \usenaturallog \log x &= \ln x \; &&\text{ and } && \; \log_5 x &&= \oldlog_5 x, \\ \shortintertext{after \texttt{\textbackslash useambiguouslog}: } \useambiguouslog \log x &= \oldlog x \; &&\text{ and } && \; \log_6 x &&= \oldlog_6 x. \end{alignat*} \end{document} Essentially, I would like to simply use \useambiguouslog, \usebinarylog, \usecommonlog, and \usenaturallog to change how \log is typeset in the document whenever it is not followed by a subscript indicating a specific base. Is there a way to improve my solution? Thank you in advance.
- latexml: Error:unexpected:\vtop when using listings inside tabularby Nasser on July 3, 2026 at 11:06 am
Using latexml (LaTeXML version 0.8.8) I am not able to compile an existing latex document which has listings inside tabular. I asked google AI but it does not know why. Here is MWE \documentclass[12pt]{article} \usepackage{latexml} \usepackage{listings} \lstdefinestyle{MMA}{% language=Mathematica,% basicstyle=\ttfamily\normalsize, } \begin{document} \begin{tabular}[c]{|p{3in}|p{3in}|}\hline \begin{lstlisting}[style=MMA] num = (s+1)(s+2); \end{lstlisting}% & \begin{lstlisting}[style=MMA] Clear["Global`*"]; ode=y'[x]==Sin[x] \end{lstlisting} \\\hline \end{tabular} \end{document} compiled with lualatex gives But with latexml >latexml --dest=A.xml A.tex latexml (LaTeXML version 0.8.8) processing A.tex Error:unexpected:\vtop Attempt to end mode text at A.tex; line 16 col 0 Error:unexpected:\vtop Attempt to end mode text at A.tex; line 22 col 0 Error:unexpected:\endgroup Attempt to close non-boxing group at A.tex; line 23 col 0 Warning:unexpected:\end{document} Attempt to end document with open groups, environments or conditionals at A.tex; line 25 col 0 Error:unexpected:<endgroup> Attempt to pop last locked stack frame at String; line 1 col 0 Error:malformed:ltx:listing <ltx:listing> isn't allowed in <ltx:p> at A.tex; line 15 col 0 Error:malformed:ltx:listing <ltx:listing> isn't allowed in <ltx:p> at A.tex; line 21 col 0 Conversion complete: 1 warning; 6 errors Is there a workaround for this? Why does latexml give this error on valid Latex code? Update Thanks to fix below. This is what I get now in HTML I just need now to figure how to remove those annoying little blue arrows
- Is that always possible to patch the code in complicated form of macros?by Explorer on July 3, 2026 at 10:38 am
The case I was confronted with that, I want to patch the code here, changing the: from ( to 『 from ) to 』 % latexmk -pdfxe needed \documentclass[fontset=fandol]{exam-zh} \AtEndPreamble{\geometry{paperheight=10cm,paperwidth=12cm}} \usepackage{etoolbox} % \AtEndPreamble{ % \patchcmd{\paren}{(}{『}{}{} % \patchcmd{\paren}{)}{』}{}{} % } % https://github.com/xkwxdyy/exam-zh/blob/main/exam-zh-question.sty#L1021-L1066 \ExplSyntaxOn \RenewDocumentCommand \paren { s O { } } { \bool_if:NT \l__examzh_question_show_paren_answer_bool { \bool_set_true:N \l__examzh_question_show_paren_bool } \bool_if:NT \l__examzh_question_show_paren_bool { \bool_if:NT \l__examzh_paren_type_hfill_bool { \nobreak \hfill \allowbreak \null \nobreak \hfill \nobreak } \hbox:n { % ( 『 % \hbox_to_wd:nn { 2em } % { \bool_if:NTF \l__examzh_question_show_paren_answer_bool % { \hfill \__examzh_paren_print_answer:n {#1} \hfill } { \IfBlankTF{#2} { \kern 2em } { \kern0.7em \__examzh_paren_print_answer:n {#2} \kern0.7em } } { \IfBooleanTF{#1}{ \kern 3em }{ \kern 2em } } % } % ) 』 \kern -.4em } } } \ExplSyntaxOff \begin{document} \begin{question} 这是一个题目 \paren[] \end{question} \end{document} It gives the pairs of 『 and 』: However, I tried with \patchcmd: % latexmk -pdfxe needed \documentclass[fontset=fandol]{exam-zh} \AtEndPreamble{\geometry{paperheight=10cm,paperwidth=12cm}} \usepackage{etoolbox} \AtEndPreamble{ \patchcmd{\paren}{(}{『}{}{} \patchcmd{\paren}{)}{』}{}{} } % https://github.com/xkwxdyy/exam-zh/blob/main/exam-zh-question.sty#L1021-L1066 \begin{document} \begin{question} 这是一个题目 \paren[] \end{question} \end{document} It gives two No!s in the terminal: <some logs> (c:/texlive/2026/texmf-dist/tex/latex/ninecolors/ninecolors.sty)) (c:/texlive/2026/texmf-dist/tex/latex/wrapstuff/wrapstuff.sty)) (c:/texlive/2026/texmf-dist/tex/latex/exam-zh/exam-zh-math.sty)) No! No! (c:/texlive/2026/texmf-dist/tex/latex/newcomputermodern/NewCM10-Book.fontspec) (c:/texlive/2026/texmf-dist/tex/latex/newcomputermodern/NewCMSans10-Book.fontsp ec) (c:/texlive/2026/texmf-dist/tex/latex/newcomputermodern/NewCMMono10-Book.fontsp <some other logs> It doesn't work. I was not sure is that \patchcmd could work in such a complicated \paren definition. Any suggestions? If not, the \RenewDocumentCommand would be toooooooo looooooong in the main tex document ;-(
- On Changing the Color Between Two Frames in a Transparent Tikz Pictureby DDS on July 2, 2026 at 10:09 pm
Consider the code: \documentclass{article} \usepackage{xcolor,graphicx} %\usepackage{transparent} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{figure} [!htb] \centering \includegraphics[width=8em,height=12em]{example-image} \end{figure} \begin{figure} [!htb] \centering \begin{tikzpicture} \node (a) at (0,0) {\includegraphics[width=8em,height=12em]{example-image}}; \filldraw[draw=red,fill opacity=.55,fill=green!65!black] (a.north west) rectangle (a.south east); \end{tikzpicture} \end{figure} \end{document} which produces Notice that in the second image there is a lighter shade of green between the outer red frame and in the inner black frame. QUESTION: How may I change the color of the region between the two frames from "lighter shade of green" to, say, red? I compile the code with xelatex. Thank you.
- Effect of mleftright command on delimiter shapes with MTPro2 Liteby Sebastiano on July 2, 2026 at 8:38 pm
In the file where I load the packages for my book, I noticed that introducing \usepackage{mleftright} \mleftright changes the shape of the delimiters when I use mtpro2 Lite. I no longer remember why I added the \mleftright command. I also checked that, if I remove \mleftright but keep \usepackage{mleftright} nothing changes. Moreover, I expected the "new" curly braces to appear only when I use \ccases (the version with the braces that I prefer), while the standard cases environment should still use the default mtpro2 delimiters. However, in the last example I still get the new braces even though I am using cases rather than \ccases. Could you explain why this happens? \documentclass{book} \usepackage{mathtools} \usepackage{newtxtext} \usepackage[lite]{mtpro2} \usepackage{mleftright} \mleftright \begin{document} Il sistema associato ad $R$ è il seguente: \begin{equation}\label{rotassz} \ccases{\begin{aligned} x&=x'\cos \psi -y'\sin \psi \\ y&=x'\sin \psi +y'\cos \psi \\ z&=z' \end{aligned}} \end{equation} \begin{equation}\label{sisto1} \ccases{\begin{aligned} x_1&=a_{11}x'_1+a_{12}x'_2+a_{13}x'_3+a_{14}x'_4\\ x_2&=a_{21}x'_1+a_{22}x'_2+a_{23}x'_3+a_{24}x'_4\\ x_3&=a_{31}x'_1+a_{32}x'_2+a_{33}x'_3+a_{34}x'_4\\ x_4&=a_{41}x'_1+a_{42}x'_2+a_{43}x'_3+a_{44}x'_4 \end{aligned} } \end{equation} \[ \delta_{jk}= \begin{cases} 0 & \text{per $j\ne k$} \\ 1 & \text{per $j=k$} \end{cases} \] \end{document} Without \mleftright command:
- context: Workaround for context not generating a valid XML file. after by Nasser on July 2, 2026 at 8:21 pm
I am learning context and found this problem below and looking for workaround. Below are two examples where context generates invalid XML EXAMPLE 1 When there is more than ONE paragraph in section, the XML generated is not valid. This works \setupbackend[export=yes, xhtml=yes] \starttext \startsection[title={Introduction}] A \stopsection \stoptext The XML is valid <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!-- input filename : A processing date : 2026-07-02 15:56:59-05:00 context version : 2026.04.10 18:55 exporter version : 0.36 --> <?xml-stylesheet type="text/css" href="styles/A-defaults.css" ?> <?xml-stylesheet type="text/css" href="styles/A-images.css" ?> <?xml-stylesheet type="text/css" href="styles/A-fonts.css" ?> <?xml-stylesheet type="text/css" href="styles/A-styles.css" ?> <?xml-stylesheet type="text/css" href="styles/A-templates.css" ?> <document context="2026.04.10 18:55" date="2026-07-02 15:56:59-05:00" file="A" language="en" title="A" version="0.36" xml:lang="en"> <section detail="section" chain="section" implicit="1" level="3"> <sectioncaption> <sectionnumber>1</sectionnumber> <sectiontitle>Introduction</sectiontitle> </sectioncaption> <sectioncontent> A </sectioncontent> </section> </document> Adding second paragraph, it now generates bad XML \setupbackend[export=yes, xhtml=yes] \starttext \startsection[title={Introduction}] A B \stopsection \stoptext The XML is <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!-- input filename : A processing date : 2026-07-02 15:58:06-05:00 context version : 2026.04.10 18:55 exporter version : 0.36 --> <?xml-stylesheet type="text/css" href="styles/A-defaults.css" ?> <?xml-stylesheet type="text/css" href="styles/A-images.css" ?> <?xml-stylesheet type="text/css" href="styles/A-fonts.css" ?> <?xml-stylesheet type="text/css" href="styles/A-styles.css" ?> <?xml-stylesheet type="text/css" href="styles/A-templates.css" ?> <document context="2026.04.10 18:55" date="2026-07-02 15:58:06-05:00" file="A" language="en" title="A" version="0.36" xml:lang="en"> <section detail="section" chain="section" implicit="1" level="3"> <sectioncaption> <sectionnumber>1</sectionnumber> <sectiontitle>Introduction</sectiontitle> </sectioncaption> <sectioncontent> A <break/> B </sectioncontent> </section> </document> <break/> Notice the break is inserted after end of document. This gives error with xsltproc >xsltproc transform.xsl A-export/A-raw.xml > A.htm A-export/A-raw.xml:29: parser error : Extra content at the end of the document <break/> ^ unable to parse A-export/A-raw.xml EXAMPLE 2 When using \startalignment there is extra break after document: \setupbackend[export=yes, xhtml=yes] \starttext \startalignment[middle] \setupblank[big] {\definedfont[SerifBold at 24pt]\setupinterlinespace[line=58pt] the title} \blank[medium] {\tfa m} \blank[medium] {\tfa \currentdate} \stopalignment \stoptext The XML generated also has a break after document ends: <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!-- input filename : A processing date : 2026-07-02 16:15:24-05:00 context version : 2026.04.10 18:55 exporter version : 0.36 --> <?xml-stylesheet type="text/css" href="styles/A-defaults.css" ?> <?xml-stylesheet type="text/css" href="styles/A-images.css" ?> <?xml-stylesheet type="text/css" href="styles/A-fonts.css" ?> <?xml-stylesheet type="text/css" href="styles/A-styles.css" ?> <?xml-stylesheet type="text/css" href="styles/A-templates.css" ?> <document context="2026.04.10 18:55" date="2026-07-02 16:15:24-05:00" file="A" language="en" title="A" version="0.36" xml:lang="en"> the title <break/> m <break/> July 2, 2026</document> <break/> Is there a workaround? TL 2026
- Package clash between pdfpages and polyglossiaby fauve on July 2, 2026 at 5:56 pm
MWE \documentclass{article} \usepackage{pdfpages} \usepackage{polyglossia} \setdefaultlanguage{french} \setotherlanguages{arabic,english} \begin{document} Voici une page avant le PDF. \includepdf[pages={1}]{mon_document.pdf} Voici une page après le PDF. \end{document} My case is pretty simple, I just try to use two packages polyglossia and pdfpages while \includepdf is used. The problem When I compile with XeLaTeX I get: … (/usr/share/texlive/texmf-dist/tex/xelatex/bidi/pdflscape-xetex-bidi.def) [1] ! Undefined control sequence. <argument> ...\\\ht \@tempbox \else \AM@view@ypos \p@ \fi \hbox to 0pt {\hsk... l.14 \includepdf[pages={1}]{mon_document.pdf} ? The complete log file This is XeTeX, Version 3.141592653-2.6-0.999996 (TeX Live 2025/dev/Debian) (preloaded format=xelatex 2026.3.24) 4 JUL 2026 19:08 entering extended mode restricted \write18 enabled. %&-line parsing enabled. **test.tex (./test.tex LaTeX2e <2024-11-01> patch level 2 L3 programming layer <2025-01-18> (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls Document Class: article 2024/06/29 v1.4n Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo File: size10.clo 2024/06/29 v1.4n Standard LaTeX file (size option) ) \c@part=\count192 \c@section=\count193 \c@subsection=\count194 \c@subsubsection=\count195 \c@paragraph=\count196 \c@subparagraph=\count197 \c@figure=\count198 \c@table=\count199 \abovecaptionskip=\skip49 \belowcaptionskip=\skip50 \bibindent=\dimen141 ) (/usr/share/texlive/texmf-dist/tex/xelatex/bidi/bidi.sty Package: bidi 2025/02/02 v25.2.2 (Release Maryam Mirzakhani) Bidirectional type setting in plain TeX and LaTeX **************************************************** * * bidi package (Bidirectional typesetting in * plain TeX and LaTeX, using XeTeX engine) * * Description: A convenient interface for * typesetting bidirectional texts in plain TeX * and LaTeX. The package includes adaptations * for use with many other commonly-used packages. * * Copyright (c) 2007--2025 Vafa Khalighi * Copyright (c) 2018--2020 bidi-tex GitHub organization * * v25.2.2 (Release Maryam Mirzakhani), 2025/02/02 * * License: LaTeX Project Public License, version * 1.3c or higher (your choice) * * Location on CTAN: /macros/xetex/latex/bidi * * Issue tracker: https://github.com/xepersian/bidi/issues * * Discussions: https://github.com/xepersian/bidi/discussions * * Primary author of bidi package: Vafa Khalighi. * **************************************************** (/usr/share/texlive/texmf-dist/tex/xelatex/bidi/biditools.sty Package: biditools 2025/02/02 v2.7 Programming tools for bidi package \@bidi@envbody=\toks17 \@bidi@emptytoks=\toks18 \bidi@poscount=\count266 \bidi@tempcountb=\count267 \bidi@temptoksa=\toks19 \bidi@temptoksb=\toks20 \bidi@dummies=\count268 \bidi@are@these@correct=\toks21 \bidi@toks@lista=\toks22 \bidi@toks@listb=\toks23 \bidi@stack@length=\count269 \bidi@empty@stack=\toks24 \bidi@looprepeat@depth=\count270 ) (/usr/share/texlive/texmf-dist/tex/latex/zref/zref-abspage.sty Package: zref-abspage 2023-09-14 v2.35 Module abspage for zref (HO) (/usr/share/texlive/texmf-dist/tex/latex/zref/zref-base.sty Package: zref-base 2023-09-14 v2.35 Module base for zref (HO) (/usr/share/texlive/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty Package: ltxcmds 2023-12-04 v1.26 LaTeX kernel commands for general use (HO) ) (/usr/share/texlive/texmf-dist/tex/generic/infwarerr/infwarerr.sty Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO) ) (/usr/share/texlive/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty Package: kvsetkeys 2022-10-05 v1.19 Key value parser (HO) ) (/usr/share/texlive/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty Package: kvdefinekeys 2019-12-19 v1.6 Define keys (HO) ) (/usr/share/texlive/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty Package: pdftexcmds 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO ) (/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty Package: iftex 2024/12/12 v1.0g TeX engine tests ) Package pdftexcmds Info: \pdf@primitive is available. Package pdftexcmds Info: \pdf@ifprimitive is available. Package pdftexcmds Info: \pdfdraftmode not found. ) (/usr/share/texlive/texmf-dist/tex/generic/etexcmds/etexcmds.sty Package: etexcmds 2019/12/15 v1.7 Avoid name clashes with e-TeX commands (HO) ) (/usr/share/texlive/texmf-dist/tex/latex/auxhook/auxhook.sty Package: auxhook 2019-12-17 v1.6 Hooks for auxiliary files (HO) ) Package zref Info: New property list: main on input line 767. Package zref Info: New property: default on input line 768. Package zref Info: New property: page on input line 769. ) \c@abspage=\count271 Package zref Info: New property: abspage on input line 67. ) \@bidi@copyins@=\insert252 \bidi@typesethour=\count272 \bidi@typesetminute=\count273 (/usr/share/texlive/texmf-dist/tex/xelatex/bidi/latex-xetex-bidi.def File: latex-xetex-bidi.def 2025/01/03 v1.5.2 bidi adaptations for `latex.ltx' f or XeTeX engine \bidi@n@everypar=\toks25 LaTeX Info: Redefining \centerline on input line 316. LaTeX Info: Redefining \leftline on input line 325. LaTeX Info: Redefining \rightline on input line 326. LaTeX Info: Redefining \underline on input line 334. \bidi@column@check@number=\count274 (/usr/share/texlive/texmf-dist/tex/xelatex/bidi/footnote-xetex-bidi.def File: footnote-xetex-bidi.def 2024/12/14 v1.3 bidi footnote macros for XeTeX en gine \c@footdir@label=\count275 \footdir@toks=\toks26 ) (/usr/share/texlive/texmf-dist/tex/xelatex/bidi/article-xetex-bidi.def File: article-xetex-bidi.def 2025/01/05 v0.9 bidi adaptations for standard arti cle class for XeTeX engine )) \bidi@digits=\count276 \bidi@digits@charclass=\XeTeXcharclass1 \bidi@sepmark@charclass=\XeTeXcharclass2 ) (/usr/share/texlive/texmf-dist/tex/latex/polyglossia/polyglossia.sty Package: polyglossia 2025/01/31 v2.4 Modern multilingual typesetting with XeLaT eX and LuaLaTeX (/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty Package: etoolbox 2025/02/11 v2.5l e-TeX tools for LaTeX (JAW) \etb@tempcnta=\count277 ) (/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.sty (/usr/share/texlive/texmf-dist/tex/latex/l3packages/xparse/xparse.sty (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty Package: expl3 2025-01-18 L3 programming layer (loader) (/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-xetex.def File: l3backend-xetex.def 2024-05-08 L3 backend support: XeTeX \g__graphics_track_int=\count278 \l__pdf_internal_box=\box52 \g__pdf_backend_annotation_int=\count279 \g__pdf_backend_link_int=\count280 )) Package: xparse 2024-08-16 L3 Experimental document command parser ) Package: fontspec 2024/05/11 v2.9e Font selection for XeLaTeX and LuaLaTeX (/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty Package: fontspec-xetex 2024/05/11 v2.9e Font selection for XeLaTeX and LuaLaTe X \l__fontspec_script_int=\count281 \l__fontspec_language_int=\count282 \l__fontspec_strnum_int=\count283 \l__fontspec_tmp_int=\count284 \l__fontspec_tmpa_int=\count285 \l__fontspec_tmpb_int=\count286 \l__fontspec_tmpc_int=\count287 \l__fontspec_em_int=\count288 \l__fontspec_emdef_int=\count289 \l__fontspec_strong_int=\count290 \l__fontspec_strongdef_int=\count291 \l__fontspec_tmpa_dim=\dimen142 \l__fontspec_tmpb_dim=\dimen143 \l__fontspec_tmpc_dim=\dimen144 (/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty Package: fontenc 2021/04/29 v2.0v Standard LaTeX package ) (/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.cfg))) \l_xpg_alias_keyvals_int=\count292 (/usr/share/texlive/texmf-dist/tex/latex/polyglossia/gloss-latex.ldf File: gloss-latex.ldf polyglossia: module for default language )) (/usr/share/texlive/texmf-dist/tex/latex/pdfpages/pdfpages.sty Package: pdfpages 2025/01/30 v0.6e Insert pages of external PDF documents (AM) (/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty Package: ifthen 2024/03/16 v1.1e Standard LaTeX ifthen package (DPC) ) (/usr/share/texlive/texmf-dist/tex/latex/tools/calc.sty Package: calc 2023/07/08 v4.3 Infix arithmetic (KKT,FJ) \calc@Acount=\count293 \calc@Bcount=\count294 \calc@Adimen=\dimen145 \calc@Bdimen=\dimen146 \calc@Askip=\skip51 \calc@Bskip=\skip52 LaTeX Info: Redefining \setlength on input line 80. LaTeX Info: Redefining \addtolength on input line 81. \calc@Ccount=\count295 \calc@Cskip=\skip53 ) (/usr/share/texlive/texmf-dist/tex/latex/eso-pic/eso-pic.sty Package: eso-pic 2023/05/03 v3.0c eso-pic (RN) \ESO@tempdima=\dimen147 \ESO@tempdimb=\dimen148 (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty Package: keyval 2022/05/29 v1.15 key=value parser (DPC) \KV@toks@=\toks27 ) (/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty Package: xcolor 2024/09/29 v3.02 LaTeX color extensions (UK) (/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg File: color.cfg 2016/01/02 v1.6 sample color configuration ) Package xcolor Info: Driver file: xetex.def on input line 274. (/usr/share/texlive/texmf-dist/tex/latex/graphics-def/xetex.def File: xetex.def 2022/09/22 v5.0n Graphics/color driver for xetex ) (/usr/share/texlive/texmf-dist/tex/latex/graphics/mathcolor.ltx) Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1349. Package xcolor Info: Model `RGB' extended on input line 1365. Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1367. Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1368. Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1369. Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1370. Package xcolor Info: Model `Gray' substituted by `gray' on input line 1371. Package xcolor Info: Model `wave' substituted by `hsb' on input line 1372. ) (/usr/share/texlive/texmf-dist/tex/xelatex/bidi/xcolor-xetex-bidi.def File: xcolor-xetex-bidi.def 2022/06/13 v0.3 bidi adaptations for xcolor package for XeTeX engine LaTeX Info: Redefining \color on input line 48. )) (/usr/share/texlive/texmf-dist/tex/xelatex/bidi/eso-pic-xetex-bidi.def File: eso-pic-xetex-bidi.def 2022/02/18 v0.4 bidi adaptations for eso-pic packa ge for XeTeX engine ) (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty Package: graphicx 2021/09/16 v1.2d Enhanced LaTeX Graphics (DPC,SPQR) (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty Package: graphics 2024/08/06 v1.4g Standard LaTeX Graphics (DPC,SPQR) (/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty Package: trig 2023/12/02 v1.11 sin cos tan (DPC) ) (/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration ) Package graphics Info: Driver file: xetex.def on input line 106. ) \Gin@req@height=\dimen149 \Gin@req@width=\dimen150 ) (/usr/share/texlive/texmf-dist/tex/xelatex/bidi/graphicx-xetex-bidi.def File: graphicx-xetex-bidi.def 2017/06/17 v0.5 bidi adaptations for graphicx pac kage for XeTeX engine ) \AM@pagewidth=\dimen151 \AM@pageheight=\dimen152 \AM@fboxrule=\dimen153 (/usr/share/texlive/texmf-dist/tex/latex/pdfpages/ppxetex.def File: ppxetex.def 2025/01/30 v0.6e Pdfpages driver for XeTeX (AM) ) \pdfpages@includegraphics@status=\count296 \AM@pagebox=\box53 \AM@global@opts=\toks28 \AM@pagecnt=\count297 \AM@toc@title=\toks29 \AM@lof@heading=\toks30 \c@AM@survey=\count298 \AM@templatesizebox=\box54 ) (/usr/share/texlive/texmf-dist/tex/xelatex/bidi/pdfpages-xetex-bidi.def File: pdfpages-xetex-bidi.def 2010/07/25 v0.1 bidi adaptations for pdfpages pac kage for XeTeX engine ) (/usr/share/texlive/texmf-dist/tex/latex/polyglossia/gloss-french.ldf File: gloss-french.ldf polyglossia: module for French \french@openbrackets=\XeTeXcharclass3 \french@closebrackets=\XeTeXcharclass4 \french@questionexclamation=\XeTeXcharclass5 \french@punctthin=\XeTeXcharclass6 \french@punctthick=\XeTeXcharclass7 \french@punctguillstart=\XeTeXcharclass8 \french@punctguillend=\XeTeXcharclass9 ) Package polyglossia Info: Default language is french (/usr/share/texlive/texmf-dist/tex/latex/polyglossia/gloss-arabic.ldf File: gloss-arabic.ldf polyglossia: module for Arabic (/usr/share/texlive/texmf-dist/tex/latex/polyglossia/arabicnumbers.sty Package: arabicnumbers 2010/03/18 v0.2 Formatting of Arabic and Farsi digits an d of Arabic abjad numerals ) (/usr/share/texlive/texmf-dist/tex/latex/polyglossia/hijrical.sty Package: hijrical 2010/07/12 v0.2 Islamic calendar (/usr/share/texlive/texmf-dist/tex/latex/polyglossia/cal-util.def \c@tmpA=\count299 \c@tmpB=\count300 \c@tmpC=\count301 \c@tmpD=\count302 \c@tmpE=\count303 \c@tmpF=\count304 ) \c@Hijriday=\count305 \c@Hijrimonth=\count306 \c@Hijriyear=\count307 )) (/usr/share/texlive/texmf-dist/tex/latex/polyglossia/gloss-english.ldf File: gloss-english.ldf polyglossia: module for English ) (/usr/share/texlive/texmf-dist/tex/latex/xpatch/xpatch.sty Package: xpatch 2020/03/25 v0.3a Extending etoolbox patching commands ) (./test.aux) \openout1 = `test.aux'. LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 31. LaTeX Font Info: ... okay on input line 31. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 31. LaTeX Font Info: ... okay on input line 31. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 31. LaTeX Font Info: ... okay on input line 31. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 31. LaTeX Font Info: ... okay on input line 31. LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 31. LaTeX Font Info: ... okay on input line 31. LaTeX Font Info: Checking defaults for TU/lmr/m/n on input line 31. LaTeX Font Info: ... okay on input line 31. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 31. LaTeX Font Info: ... okay on input line 31. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 31. LaTeX Font Info: ... okay on input line 31. Package fontspec Info: (fontspec) Adjusting the maths setup (use [no-math] to avoid (fontspec) this). \symlegacymaths=\mathgroup4 LaTeX Font Info: Overwriting symbol font `legacymaths' in version `bold' (Font) OT1/cmr/m/n --> OT1/cmr/bx/n on input line 31. LaTeX Font Info: Redeclaring math accent \acute on input line 31. LaTeX Font Info: Redeclaring math accent \grave on input line 31. LaTeX Font Info: Redeclaring math accent \ddot on input line 31. LaTeX Font Info: Redeclaring math accent \tilde on input line 31. LaTeX Font Info: Redeclaring math accent \bar on input line 31. LaTeX Font Info: Redeclaring math accent \breve on input line 31. LaTeX Font Info: Redeclaring math accent \check on input line 31. LaTeX Font Info: Redeclaring math accent \hat on input line 31. LaTeX Font Info: Redeclaring math accent \dot on input line 31. LaTeX Font Info: Redeclaring math accent \mathring on input line 31. LaTeX Font Info: Redeclaring math symbol \colon on input line 31. LaTeX Font Info: Redeclaring math symbol \Gamma on input line 31. LaTeX Font Info: Redeclaring math symbol \Delta on input line 31. LaTeX Font Info: Redeclaring math symbol \Theta on input line 31. LaTeX Font Info: Redeclaring math symbol \Lambda on input line 31. LaTeX Font Info: Redeclaring math symbol \Xi on input line 31. LaTeX Font Info: Redeclaring math symbol \Pi on input line 31. LaTeX Font Info: Redeclaring math symbol \Sigma on input line 31. LaTeX Font Info: Redeclaring math symbol \Upsilon on input line 31. LaTeX Font Info: Redeclaring math symbol \Phi on input line 31. LaTeX Font Info: Redeclaring math symbol \Psi on input line 31. LaTeX Font Info: Redeclaring math symbol \Omega on input line 31. LaTeX Font Info: Redeclaring math symbol \mathdollar on input line 31. LaTeX Font Info: Redeclaring symbol font `operators' on input line 31. LaTeX Font Info: Encoding `OT1' has changed to `TU' for symbol font (Font) `operators' in the math version `normal' on input line 31. LaTeX Font Info: Overwriting symbol font `operators' in version `normal' (Font) OT1/cmr/m/n --> TU/lmr/m/n on input line 31. LaTeX Font Info: Encoding `OT1' has changed to `TU' for symbol font (Font) `operators' in the math version `bold' on input line 31. LaTeX Font Info: Overwriting symbol font `operators' in version `bold' (Font) OT1/cmr/bx/n --> TU/lmr/m/n on input line 31. LaTeX Font Info: Overwriting symbol font `operators' in version `normal' (Font) TU/lmr/m/n --> TU/lmr/m/n on input line 31. LaTeX Font Info: Overwriting math alphabet `\mathit' in version `normal' (Font) OT1/cmr/m/it --> TU/lmr/m/it on input line 31. LaTeX Font Info: Overwriting math alphabet `\mathbf' in version `normal' (Font) OT1/cmr/bx/n --> TU/lmr/b/n on input line 31. LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `normal' (Font) OT1/cmss/m/n --> TU/lmss/m/n on input line 31. LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `normal' (Font) OT1/cmtt/m/n --> TU/lmtt/m/n on input line 31. LaTeX Font Info: Overwriting symbol font `operators' in version `bold' (Font) TU/lmr/m/n --> TU/lmr/b/n on input line 31. LaTeX Font Info: Overwriting math alphabet `\mathit' in version `bold' (Font) OT1/cmr/bx/it --> TU/lmr/b/it on input line 31. LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `bold' (Font) OT1/cmss/bx/n --> TU/lmss/b/n on input line 31. LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `bold' (Font) OT1/cmtt/m/n --> TU/lmtt/b/n on input line 31. (/usr/share/texlive/texmf-dist/tex/latex/pdflscape/pdflscape.sty Package: pdflscape 2022-10-27 v0.13 Display of landscape pages in PDF (/usr/share/texlive/texmf-dist/tex/latex/pdflscape/pdflscape-nometadata.sty Package: pdflscape-nometadata 2022-10-28 v0.13 Display of landscape pages in PD F (HO) (/usr/share/texlive/texmf-dist/tex/latex/graphics/lscape.sty Package: lscape 2020/05/28 v3.02 Landscape Pages (DPC) ) (/usr/share/texlive/texmf-dist/tex/xelatex/bidi/lscape-xetex-bidi.def File: lscape-xetex-bidi.def 2025/01/03 v0.3 bidi adaptations for lscape package for XeTeX engine ) Package pdflscape Info: Auto-detected driver: dvipdfm (xetex) on input line 98. )) (/usr/share/texlive/texmf-dist/tex/xelatex/bidi/pdflscape-xetex-bidi.def File: pdflscape-xetex-bidi.def 2022/02/18 v0.1 bidi adaptations for pdflscape p ackage for XeTeX engine ) File: vault.pdf Graphic file (type pdf) <use vault.pdf> File: vault.pdf Graphic file (type pdf) <use vault.pdf, page 1> File: vault.pdf Graphic file (type pdf) <use vault.pdf, page 1> [1 ] File: vault.pdf Graphic file (type pdf) <use vault.pdf, page 1> File: vault.pdf Graphic file (type pdf) <use vault.pdf, page 1> ! Undefined control sequence. <argument> ...x \ht \@tempbox \else \AM@view@ypos \p@ \fi \hbox to 0pt {\hsk... l.35 \includepdf[pages={1}]{vault.pdf} ? ! Undefined control sequence. <argument> ... \hbox to 0pt {\hskip \AM@view@xpos bp\AM@hyper@begin@i }\glob... l.35 \includepdf[pages={1}]{vault.pdf} ? ! Missing number, treated as zero. <to be read again> b l.35 \includepdf[pages={1}]{vault.pdf} ? File: vault.pdf Graphic file (type pdf) <use vault.pdf, page 1> [2 ] [3] (./test.aux) *********** LaTeX2e <2024-11-01> patch level 2 L3 programming layer <2020/03/25> *********** ) Here is how much of TeX's memory you used: 8835 strings out of 473835 227730 string characters out of 5731946 702429 words of memory out of 5000000 31794 multiletter control sequences out of 15000+600000 558853 words of font info for 38 fonts, out of 8000000 for 9000 1348 hyphenation exceptions out of 8191 93i,17n,107p,13615b,424s stack positions out of 10000i,1000n,20000p,200000b,200000s Output written on test.pdf (3 pages). Additionnal observations The problem doesn’t depend of the order of package invocation. The question How to avoid this error message?
- Reproduce this example with large outline font, in pdflatex without TikZby Arnoldo Bric on July 2, 2026 at 3:30 pm
Please write LaTeX code using pdflatex to reproduce "MODULO 2" with an approximate outline style similar to the image, sized to 12.4 cm wide and 5.3 cm high, without using TikZ. My best attempt has been: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{xcolor} \usepackage{graphicx} \usepackage{contour} \renewcommand{\familydefault}{\sfdefault} \begin{document} \noindent \resizebox{8.5cm}{3cm}{% \contourlength{0.5pt}% \contour{black}{\textcolor{white}{\textbf{MODULO}}}% }\, \resizebox{2.6cm}{5.2cm}{% \contourlength{0.5pt}% {\textcolor{black}{\textbf{2}}}% } \end{document} Using pdfLaTeX: but I would like something as close as possible to this:
- Incorrect spacing around digits with newpx and tagged PDFsby user444613 on July 2, 2026 at 2:29 pm
Turning on LaTeX3’s experimental Tagged PDF support with the newpx fonts sometimes causes spacing between characters to be incorrect, especially when there are digits next to commas. Am I doing something wrong, or is there a workaround? The LaTex3 Project’s tagging status page lists newpx as compatible with tagging. The problem disappears if either tagging is turned off or if a different typeface (e.g. Computer Modern) is used. I am using TeXLive 2026 with pdftex. Minimal example: \DocumentMetadata{tagging=on} \documentclass{article} \usepackage{newpx} \listfiles \begin{document} \((1,2)_3\) \begin{tabular}{cccc} \((1,2)_3\) \\ \(J\) & \((1,2)_3\) \end{tabular} \end{document} Further technical info (output with \listfiles): This is pdfTeX, Version 3.141592653-2.6-1.40.29 (TeX Live 2026/Debian) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode (./example.tex LaTeX2e <2025-11-01> L3 programming layer <2026-05-15> (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/documentmetadata-support.ltx (/usr/share/texlive/texmf-dist/tex/latex/pdfmanagement/pdfmanagement-testphase. sty (/usr/share/texlive/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty) (/usr/share/texlive/texmf-dist/tex/latex/pdfmanagement/pdfmanagement.ltx))) (/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def) (/usr/share/texlive/texmf-dist/tex/latex/pdfmanagement/l3backend-testphase-pdft ex.def) (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-latest.s ty (/usr/share/texlive/texmf-dist/tex/latex/tagpdf/tagpdf.sty (/usr/share/texlive/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty)) (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-names.st y) (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-new-or-2 .sty (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/latex-lab-footnotes.ltx )) (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-block.st y (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/latex-lab-kernel-changes.sty (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/glyphtounicode-cmex.tex)) (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-context. sty)) (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-sec.sty) (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-toc.sty ) (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-minipage .sty (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-new-or-1 .sty)) (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-graphic. sty) (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-float.st y) (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-bib.sty) (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-text.sty ) (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-marginpa r.sty) (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-title.st y) (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-table.st y (/usr/share/texlive/texmf-dist/tex/latex/tools/array.sty)) (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-math.sty (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/latex-lab-math.ltx) (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/latex-lab-mathpkg.ltx) (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/latex-lab-mathintent.ltx)) (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-firstaid .sty) (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-tikz.sty )) (/usr/share/texlive/texmf-dist/tex/latex/pdfmanagement/pdfmanagement-firstaid.s ty) (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls Document Class: article 2025/01/22 v1.4n Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo)) (/usr/share/texlive/texmf-dist/tex/latex/newpx/newpx.sty `newpx'v1.551, 2025/10/30 Integrated loading of newpxmath and a text font for all latex engines (msharpe) (/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty) (/usr/share/texlive/texmf-dist/tex/latex/fontaxes/fontaxes.sty (/usr/share/texlive/texmf-dist/tex/latex/figureversions/figureversions.sty)) (/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty) (/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty) (/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty) (/usr/share/texlive/texmf-dist/tex/latex/carlisle/scalefnt.sty) (/usr/share/texlive/texmf-dist/tex/latex/trimspaces/trimspaces.sty) (/usr/share/texlive/texmf-dist/tex/latex/kvoptions/kvoptions.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty) (/usr/share/texlive/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty) (/usr/share/texlive/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty)) (/usr/share/texlive/texmf-dist/tex/generic/xstring/xstring.sty (/usr/share/texlive/texmf-dist/tex/generic/xstring/xstring.tex)) IV (/usr/share/texlive/texmf-dist/tex/latex/newpx/newpxmath.sty `newpxmath' v1.551, 2025/10/30 Math macros based on pxfonts (msharpe) (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty For additional information on amsmath, use the `?' option. (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty)) (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty) (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty)) (/usr/share/texlive/texmf-dist/tex/latex/latex-lab/latex-lab-amsmath.ltx) (/usr/share/texlive/texmf-dist/tex/generic/kastrup/binhex.tex) (/usr/share/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty (/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex (/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkvutils.tex))) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/centernot.sty) amsthm NOT loaded ) (/usr/share/texlive/texmf-dist/tex/latex/newpx/newpxtext.sty `newpxtext' v1.542, 2025/06/07 Text macros taking advantage of TeXGyre Pagella and its extensions (msharpe) (/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty (/usr/share/texlive/texmf-dist/tex/latex/newpx/t1minzpl.fd)) (/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg) (/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def) (/usr/share/texlive/texmf-dist/tex/latex/graphics/mathcolor.ltx)) (/usr/share/texlive/texmf-dist/tex/latex/pdfmanagement/xcolor-patches-tmp-ltx.s ty) (/usr/share/texlive/texmf-dist/tex/latex/xpatch/xpatch.sty (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty) (/usr/share/texlive/texmf-dist/tex/latex/l3packages/xparse/xparse.sty)) (/usr/share/texlive/texmf-dist/tex/latex/base/textcomp.sty) (/usr/share/texlive/texmf-dist/tex/latex/newpx/t1zpllf.fd) (/usr/share/texlive/texmf-dist/tex/latex/newpx/t1zpltlf.fd) (/usr/share/texlive/texmf-dist/tex/latex/newpx/t1zplosf.fd) (/usr/share/texlive/texmf-dist/tex/latex/newpx/t1zpltosf.fd))) (./example.aux) (/usr/share/texlive/texmf-dist/tex/latex/newpx/omlnpxmi.fd) (/usr/share/texlive/texmf-dist/tex/latex/newpx/unpxexa.fd) (/usr/share/texlive/texmf-dist/tex/latex/newpx/lmsnpxsy.fd) (/usr/share/texlive/texmf-dist/tex/latex/newpx/lmxnpxexx.fd) Info: mathml file example-mathml does not exist Info: mathml file example-luamml-mathml does not exist (/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii [Loading MPS to PDF converter (version 2006.09.02).] ) LaTeX DocumentMetadata Warning: The language has not been set in (DocumentMetadata) \DocumentMetadata. (DocumentMetadata) Setting it to 'en' as fallback. (/usr/share/texlive/texmf-dist/tex/latex/newpx/ot1minzpl.fd) (/usr/share/texlive/texmf-dist/tex/latex/newpx/unpxmia.fd) (/usr/share/texlive/texmf-dist/tex/latex/newpx/unpxsym.fd) (/usr/share/texlive/texmf-dist/tex/latex/newpx/unpxsyc.fd) [1{/var/lib/texmf/fo nts/map/pdftex/updmap/pdftex.map}{/usr/share/texlive/texmf-dist/fonts/enc/dvips /newpx/px-lms.enc}{/usr/share/texlive/texmf-dist/fonts/enc/dvips/newtx/ntx-ot1- tlf.enc}{/usr/share/texlive/texmf-dist/fonts/enc/dvips/newtx/ntx-ec-tlf.enc}]<< latex-list-css.html>><<latex-align-css.html>> (./example.aux) *File List* documentmetadata-support.ltx pdfmanagement-testphase.sty 2026-05-26 v0.97c LaTeX PDF management bundle tagpdf-base.sty 2026-05-17 v1.0c part of tagpdf - provide base, no-op versio ns of the user commands pdfmanagement.ltx 2026-05-26 v0.97c PDF management code l3backend-pdftex.def 2026-02-18 L3 backend support: PDF output (pdfTeX) l3backend-testphase-pdftex.def latex-lab-testphase-latest.sty 2025-09-13 v0.1d latex-lab modules tagpdf.sty 2026-05-17 v1.0c LaTeX kernel code for PDF tagging tagpdf-mc-code-generic.sty 2026-05-17 v1.0c part of tagpdf - code related to marking chunks - generic mode latex-lab-testphase-names.sty 2025-08-14 v0.8f Code related to the names of tags latex-lab-testphase-new-or-2.sty 2025-05-10 v0.86d Changes to the output rou tine latex-lab-footnotes.ltx 2025-07-04 v0.8o changes to the footnote interfaces latex-lab-testphase-block.sty 2025-07-26 v0.9k blockenv implementation latex-lab-kernel-changes.sty 2025-07-09 v0.85i General kernel and class chan ges glyphtounicode-cmex.tex latex-lab-testphase-context.sty 2025-10-09 v0.5b Providing context for insta nce, etc. latex-lab-testphase-sec.sty 2025-10-20 v0.84k Code related to the tagging of sectioning commands latex-lab-testphase-toc.sty 2025-07-02 v0.85h Code related to the tagging o f toc-like lists latex-lab-testphase-minipage.sty 2025-05-10 v0.81g Code related to the taggi ng of minipages and parboxes latex-lab-testphase-new-or-1.sty 2025-05-10 v0.85d Temporary output patches for tagging and better link support -- no longer active latex-lab-testphase-graphic.sty 2025-09-25 v0.80i Code related to the taggin g of graphics latex-lab-testphase-float.sty 2025-10-17 v0.81l Code related to the tagging of floats latex-lab-testphase-bib.sty 2025-05-09 v0.81c Code related to the tagging of bibliography and cite command latex-lab-testphase-text.sty 2025-05-10 v0.85f Code related to the tagging o f various small text commands latex-lab-testphase-marginpar.sty 2025-07-23 v0.85h Changes related to the t agging of the margin notes latex-lab-testphase-title.sty 2025-03-08 v0.85d Changes related to the taggi ng of the title latex-lab-testphase-table.sty 2025-08-01 v0.85s Code related to the tagging of tables array.sty 2025/09/25 v2.6n Tabular extension package (FMi) latex-lab-testphase-math.sty 2025-03-10 v0.8d code related to the math taggi ng latex-lab-math.ltx 2025-10-02 v0.6w Grab all the math(s) and tag it (experim ents) latex-lab-mathpkg.ltx 2025-06-20 v0.1c mathpkg adaptions latex-lab-mathintent.ltx 2025-08-03 v0.1c MathML intent attributes latex-lab-testphase-firstaid.sty 2025-11-03 v2025-11-03 Temporary patches to external packages needed for the tagging project latex-lab-testphase-tikz.sty 2025-09-27 v0.80d Code related to the tagging o f tikz pictures pdfmanagement-firstaid.sty 2026-05-26 v0.97c LaTeX PDF management bundle / f irstaid-patches article.cls 2025/01/22 v1.4n Standard LaTeX document class size10.clo 2025/01/22 v1.4n Standard LaTeX file (size option) newpx.sty 2025/10/30 v1.551 LaTeX and unicode LaTeX support for newpxmath and newpxtext, or for newpxtext and an otf math package (Michael Sharpe) fontenc.sty 2025/07/18 v2.1d Standard LaTeX package fontaxes.sty 2026-01-02 v2.0.2 Font selection axes (deprecated) figureversions.sty 2025-04-29 v1.0.1 Figure versions ifthen.sty 2024/03/16 v1.1e Standard LaTeX ifthen package (DPC) iftex.sty 2024/12/12 v1.0g TeX engine tests etoolbox.sty 2025/10/02 v2.5m e-TeX tools for LaTeX (JAW) scalefnt.sty trimspaces.sty 2009/09/17 v1.1 Trim spaces around a token list kvoptions.sty 2022-06-15 v3.15 Key value format for package options (HO) keyval.sty 2022/05/29 v1.15 key=value parser (DPC) ltxcmds.sty 2023-12-04 v1.26 LaTeX kernel commands for general use (HO) kvsetkeys.sty 2022-10-05 v1.19 Key value parser (HO) xstring.sty 2023/08/22 v1.86 String manipulations (CT) newpxmath.sty 2025/10/30 v1.551 LaTeX math support for newpx (Michael Sharpe ) amsmath.sty 2025/07/09 v2.17z AMS math features amstext.sty 2024/11/17 v2.01 AMS text amsgen.sty 1999/11/30 v2.0 generic functions amsbsy.sty 1999/11/29 v1.2d Bold Symbols amsopn.sty 2022/04/08 v2.04 operator names latex-lab-amsmath.ltx 2025-09-29 v0.1i amsmath adaptions binhex.tex xkeyval.sty 2025/11/04 v2.10 package option processing (HA) xkeyval.tex 2014/12/03 v2.7a key=value parser (HA) centernot.sty 2016/05/16 v1.4 Centers the not symbol horizontally (HO) newpxtext.sty 2025/06/07 v1.542 LaTeX and unicode LaTeX support for TeXGyreP agellaX (Michael Sharpe) fontenc.sty 2025/07/18 v2.1d Standard LaTeX package t1minzpl.fd 2021/05/25 v1.0 font definition file for T1/minzpl/TLF xcolor.sty 2024/09/29 v3.02 LaTeX color extensions (UK) color.cfg 2016/01/02 v1.6 sample color configuration pdftex.def 2025/09/29 v1.2d Graphics/color driver for pdftex mathcolor.ltx xcolor-patches-tmp-ltx.sty 2026-05-26 v0.97c patch xcolor for l3color xpatch.sty 2020/03/25 v0.3a Extending etoolbox patching commands expl3.sty 2026-05-15 L3 programming layer (loader) xparse.sty 2025-10-09 L3 Experimental document command parser textcomp.sty 2024/04/24 v2.1b Standard LaTeX package t1zpllf.fd 2021/05/25 v1.0 font definition file for T1/zpl/lf t1zpltlf.fd 2021/05/25 v1.0 font definition file for T1/zpl/tlf t1zplosf.fd 2021/05/25 v1.0 font definition file for T1/zpl/osf t1zpltosf.fd 2021/05/25 v1.0 font definition file for T1/zpl/tosf omlnpxmi.fd 2013/03/21 Fontinst v1.933 font definitions for OML/npxmi. unpxexa.fd 2013/03/24 Fontinst v1.933 font definitions for U/npxexa. lmsnpxsy.fd 2016/07/04 Fontinst v1.933 font definitions for LMS/npxsy. lmxnpxexx.fd 2016/07/04 Fontinst v1.933 font definitions for LMX/npxexx. supp-pdf.mkii ot1minzpl.fd 2021/05/25 v1.0 font definition file for OT1/minzpl/TLF unpxmia.fd 2013/03/24 Fontinst v1.933 font definitions for U/npxmia. unpxsym.fd 2023/08/16 Fontinst v1.933 font definitions for U/npxsym. unpxsyc.fd 2013/03/24 Fontinst v1.933 font definitions for U/npxsyc. *********** LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right. Package tagpdf Info: Finalizing the tagging structure: (tagpdf) Writing out ~24 structure objects (tagpdf) with ~21 'MC' leaf nodes. (tagpdf) Be patient if there are lots of objects! Package tagpdf Info: writing ParentTree Package tagpdf Info: writing IDTree Package tagpdf Info: writing RoleMap Package tagpdf Info: writing ClassMap Package tagpdf Info: writing NameSpaces Package tagpdf Info: writing StructElems Package tagpdf Info: writing Root )</usr/share/texlive/texmf-dist/fonts/type1/public/newpx/NewPXMI.pfb></usr/sha re/texlive/texmf-dist/fonts/type1/public/newpx/pxsys.pfb></usr/share/texlive/te xmf-dist/fonts/type1/public/newpx/zplr.pfb> Output written on example.pdf (1 page, 50114 bytes). Transcript written on example.log.
- Strange behavior of custom itemize in marginblockby Aviroum on July 2, 2026 at 12:08 pm
I asked this question before. Puttting this custom itemize in marginblock, I get this: As you can see, vertical lines disappear. Maybe this is the problem? in log : backgrounds > shapes > invalid region for 'tbg:1' %%%%%%%%%%%%%%%%%%%%%% %%% Implementation %%% %%%%%%%%%%%%%%%%%%%%%% %% Define the variables. \definecolor [MyItemizeColor] [red] \definemeasure[MyItemizeOffset] [1em] \definemeasure[MyItemizeThickness][1pt] %% Draw the rule to the left of the items. \definetextbackground[MyItemize][ mp=mpos:region:sideline, location=paragraph, framecolor=MyItemizeColor, rulethickness=\measure{MyItemizeThickness}, frameoffset=\measure{MyItemizeOffset}, ] %% Draw the bullet symbol. \startreusableMPgraphic{MyBullet} path p ; p := unitcircle scaled 5pt ; fill p withcolor white ; draw p withcolor "MyItemizeColor" withpen pencircle scaled \measure{MyItemizeThickness} ; setbounds currentpicture to boundingbox currentpicture leftenlarged ( -0.5bbwidth(currentpicture) + 0.5*\measure{MyItemizeThickness} ) ; \stopreusableMPgraphic \definesymbol[MyBullet][\reuseMPgraphic{MyBullet}] %% Define the itemize environment to use the custom symbol and rule. \defineitemgroup[MyItemize][itemize][ symbol=MyBullet, before={% \godown[0.5\measured{MyItemizeOffset}]% \starttextbackground[MyItemize]% \godown[0.5\measured{MyItemizeOffset}]% }, after={% \godown[0.5\measured{MyItemizeOffset}]% \stoptextbackground% \godown[0.5\measured{MyItemizeOffset}]% }, width=\measure{MyItemizeOffset}, ] \setupmarginblock[location=left,align=flushleft,width=3cm] %\showframe %%%%%%%%%%%%%%%%%%%%% %%% Demonstration %%% %%%%%%%%%%%%%%%%%%%%% \setuppapersize[A4, portrait] \setuplayout[ width=16cm, backspace=4cm, cutspace=1.5cm, leftmargin=3cm, leftmargindistance=4mm, ] %% Demonstration text. \starttext \startmarginblock \startMyItemize \item First item. \item Second item. \item Third item. \item Fourth item. \item Fifth item. \item Next page. \item Seventh item. \item Eighth item. \item Ninth item. \stopMyItemize \stopmarginblock \input ward \startMyItemize \item First item. \item Second item. \item Third item. \item Fourth item. \item Fifth item. \item Next page. \item Seventh item. \item Eighth item. \item Ninth item. \stopMyItemize Text after. \stoptext
- Solve the problem of the size and angle value of the "⦦" angle symbolby mathrm alpha on July 2, 2026 at 4:50 am
I noticed that when I try to type unicode-math "⦦", the angle symbol is smaller than "∠" and "∟". Is there a way to draw another angle symbol that is outwardly slanted and the same size as "∠" and "∟"? \documentclass{article} \usepackage{unicode-math} \setmathfont{NewCMMath-Regular.otf} \begin{document} $∠∟⦦$ \end{document}
- Custom ToC entries in LaTeX June 2026 releaseby Alexander Perlis on July 2, 2026 at 12:07 am
For certain tagged documents I need the following: Periods after numbers both in numbered headings and in ToC entries. Centered single-line chapter titles, no extraneous vertical space. No extraneous vertical space between chapters in List of Tables / Figures. The word “Part” / “Chapter” / “Appendix” in ToC lines for part and chapter. Up until the June 2026 release of LaTeX, I achieved the above by modifying bits copied from book.cls: \def\numberline#1{\hb@xt@\@tempdima{#1.\hfil}} %% Add period after numbers in ToC \def\@chapter[#1]#2{ ... 4 lines unchanged code ... \addcontentsline{toc}{chapter}{\@chapapp\space\thechapter.\hspace{1em}#1}% %% Custom ToC ... 7 lines unchanged code ... %%\addtocontents{lof}{\protect\addvspace{10\p@}}% %% No extra blank lines in LoF %%\addtocontents{lot}{\protect\addvspace{10\p@}}% %% No extra blank lines in LoT ... 6 lines unchanged code ... } \def\@makechapterhead#1{% %%\vspace*{50\p@}% %% Eliminate vertical space {\parindent \z@ \centering \normalfont %% Centered ... 2 lines unchanged code ... \huge\bfseries \@chapapp\space \thechapter. %% Add period after number %%\par\nobreak\vskip 20\p@ %% Eliminate newline and vertical space ... 4 lines unchanged code ... %%\vskip 40\p@ %% Eliminate vertical space }} %% Similarly modified versions of \@makeschapterhead, \@part, \@spart In the presence of \DocumentMetadata (the PDF needs to be tagged), the LaTeX June 2026 release uses the template mechanism for sectioning commands. The old fragile approach shown above no longer works. I can now achieve my first three goals by editing appropriate key-value pairs as in the following MWE: \DocumentMetadata{lang=en-us,tagging=on} \documentclass[oneside]{book} \makeatletter \def\numberline#1{\hb@xt@\@tempdima{#1.\hfil}} \EditInstance{heading}{chapter} { , after-penalty-vspace = 0pt , after-vspace = \baselineskip , prefix = \@chapapp , number-format = \thechapter. , heading-decls = \centering \parindent0pt \bfseries \Huge , contents-extra = } \EditInstance{heading}{part} { , number-format = \thepart. , heading-decls = \centering\bfseries\Huge } \DeclareInstanceCopy{headformat}{part}{std} \DeclareInstanceCopy{headformat}{chapter}{std} \makeatother \begin{document} \tableofcontents \mainmatter \part{My part} \chapter{My chapter} \section{My section} \appendix \chapter{My appendix} \end{document} Kudos to the developers for providing this more convenient and robust approach! As for the ToC lines for part and chapter, is there a key-value pair that controls how \addcontentsline gets called?, or how should I control those lines? I currently have the output but want the following output: My current (totally fragile) “solution” is to modify a copy of \__head_handle_marks_etc: \cs_set:Npn \__head_handle_marks_etc:nnnnn #1#2#3#4#5 { ... 23 lines of unchanged code ... \str_case:VnF{\l__head_name_tl} { {part}{\partname\space\thepart.\space} %% Custom ToC for Part {chapter}{\@chapapp\space\thechapter.\space} %% Custom ToC for Chapter } {\protect\numberline{ \use:c{ the \l__head_name_tl } } } %% Original code is fallback for Sections etc ... 8 lines of unchanged code ... } Is there a better way?
- Problems with table wrapped with textby Daniel Neskorodov on July 1, 2026 at 5:29 pm
I have the following \documentclass[12pt,a4paper]{article} \usepackage{amsmath,amssymb} \usepackage{geometry} \usepackage{lipsum} \geometry{margin=2cm} \setlength{\parindent}{0pt} \renewcommand{\arraystretch}{1.25} \newsavebox{\leftbox} \begin{document} \begin{lrbox}{\leftbox} \begin{minipage}[t]{0.33\textwidth} \textbf{Given:}\hspace{2.5cm}\textbf{SI:} \vspace{2mm} \begin{tabular}{@{}l|l@{}} $m_1=120$ g & $0.12$ kg\\ $m_2=50$ g & $0.05$ kg\\ $c_1=4200\ \dfrac{\text{J}}{\text{kg}\cdot^\circ\text{C}}$ &\\ $c_2=920\ \dfrac{\text{J}}{\text{kg}\cdot^\circ\text{C}}$ &\\ $R=2\ \Omega$ &\\ $U=5$ V &\\ $\Delta t=12^\circ\text{C}$ &\\ $\eta=20\%$ &\\ \hline \multicolumn{2}{@{}l@{}}{\textbf{Find:}}\\ \multicolumn{2}{@{}l@{}}{$U-?$} \end{tabular} \end{minipage} \end{lrbox} \noindent \usebox{\leftbox} \hfill \begin{minipage}[t][\dimexpr\ht\leftbox+\dp\leftbox\relax][t]{0.64\textwidth} \textbf{Solution:} \vspace{2mm} \lipsum[1] \vfill \end{minipage} \lipsum[1-2] \end{document} which gives me this However I would like to write text in the right minipage as a continuous text without the need to break it (now it is causing problems with overlapping). I also would like to automatically left align the word 'SI' with the letters below it. It obviously comes from the fact that neither 'SI' or 'Given' are in the table, but that's on purpose - I need 'Given', 'SI' and 'Solution' to be on the same level vertically. How do I do that?
- braces in delimited argumentsby user2026844 on July 1, 2026 at 3:10 pm
I have a complicated environment that scans for presence of tokens and "patches" them by adding some tokens before. I implemented this using macros with arguments delimited by the tokens I want to patch. Once the patching is done, I'd like to respect the token stream as much as possible (i.e. make it as close to the original as possible). However, whenever the text between the delimiters is exactly of the form "{ text }", the braces are sadly removed. I'd like to find a way to avoid this behavior. I had a look here but I'm afraid this will change the token stream too much, so I'm wondering if there is a simpler fix. Edit: Better MWE based on David's reply. Goal: Implement such a patch command so that the token stream after \patch is as close as possible (identical?) to the original one. \documentclass{article} \def\Z{Z} % Does not work with first def of \A \def\patch\A#1\Z{patched:\A#1\Z} % Does not work with second def of \A \def\patch\A#1{\xpatch\A{{#1}}} \def\xpatch\A#1\Z{patched:\A#1\Z} \begin{document} First def of A :\def\A#1{(A #1)} \A{arg} \Z \patch\A{arg} \Z \A{arg}\Z \patch\A{arg}\Z Second def of A:\def\A[#1]{(A #1)} \A[arg] \Z \patch\A[arg] \Z \A[arg]\Z \patch\A[arg]\Z \end{document} Output (first def of \A) (A arg) Z patched:(A arg) Z (A arg)Z patched:(A a)rgZ Thanks a lot for your help!
- Is that possible to declare harpoon arrow with two directions more compact without defining twice?by Explorer on July 1, 2026 at 2:09 pm
I have the following code partly comes from here: \documentclass[tikz,border=5pt]{standalone} \usetikzlibrary{arrows.meta,bending,nfold} \makeatletter \tikzset{ shrink/.style={thick,shorten >=5pt,shorten <=5pt}, offset/.code= \tikz@addoption{% \pgfgetpath\tikz@temp \pgfsetpath\pgfutil@empty \pgfoffsetpath\tikz@temp{#1}% }, foo/.tip={Straight Barb[harpoon,length=5pt]}, foo'/.tip={Straight Barb[harpoon,swap,length=5pt]}, dualharpoon/.style={ draw=none, postaction={path only,draw,foo'-,shrink,offset=+#1ex}, postaction={path only,draw,-foo',shrink,offset=-#1ex}, }, dualharpoon/.default=1, dualharpoon'/.style={ draw=none, postaction={path only,draw,-foo,shrink,offset=+#1ex}, postaction={path only,draw,foo-,shrink,offset=-#1ex}, }, dualharpoon'/.default=1, relarrow/.style={ dualharpoon,orange,thick,#1 }, relarrow'/.style={ dualharpoon',orange,thick,#1 }, } \makeatother %%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} \begin{tikzpicture} \node[fill=cyan,circle] (A) at (-2,-1) {A}; \node[fill=magenta,circle] (B) at (2,-1) {B}; \node[fill=cyan,circle] (C) at (-2,1) {C}; \node[fill=magenta,circle] (D) at (2,1) {D}; \draw[relarrow=teal] (A) -- (B); \draw[relarrow'] (C) -- (D); \end{tikzpicture} \end{document} which declare two arrow style, relarrow and relarrow': However, I did the similar things twice here! Which I was not quite comfortable with dupliacted syntax: foo/.tip={Straight Barb[harpoon,length=5pt]}, foo'/.tip={Straight Barb[harpoon,swap,length=5pt]}, dualharpoon/.style={ draw=none, postaction={path only,draw,foo'-,shrink,offset=+#1ex}, postaction={path only,draw,-foo',shrink,offset=-#1ex}, }, dualharpoon/.default=1, dualharpoon'/.style={ draw=none, postaction={path only,draw,-foo,shrink,offset=+#1ex}, postaction={path only,draw,foo-,shrink,offset=-#1ex}, }, dualharpoon'/.default=1, relarrow/.style={ dualharpoon,orange,thick,#1 }, relarrow'/.style={ dualharpoon',orange,thick,#1 }, I wonder I could simplify the code to define the '-version in a reverse dualharpoon direction?
- How to Increase the Spacing Between Arched Letters?by DDS on June 30, 2026 at 10:57 pm
Consider the code: \documentclass[12pt]{book} \usepackage{tikz,xcolor} \usetikzlibrary{decorations.text} % Spaceout Algorithm \def\theLetterSpace{0.5pt} \def\theWordSpace{1.5\LocalLetterSpace} \newlength\LocalLetterSpace \newcommand\spaceout[2][\theLetterSpace]{% \setlength\LocalLetterSpace{#1}\expandafter\spaceouthelpA#2 \relax\relax} \def\spaceouthelpA#1 #2\relax{% \spaceouthelpB#1\relax\relax% \ifx\relax#2\else\ \kern\theWordSpace\spaceouthelpA#2\relax\fi } \def\spaceouthelpB#1#2\relax{% #1% \ifx\relax#2\else \kern\LocalLetterSpace\spaceouthelpB#2\relax% \fi } \begin{document} \thispagestyle{empty} Here is some text. \vspace{10pt} {\spaceout[2pt]{Here is some "spaced out" text.}} \vspace{65pt} \begin{tikzpicture} \draw[-latex,white,postaction={decorate},decoration={text along path, text={I WOULD LIKE TO INCREASE SPACING BETWEEN THESE ARCHED LETTERS},text color={blue!85!black},text align=center}] (7,0) arc [start angle=180,end angle=0,radius=8]; \end{tikzpicture} \end{document} which produces: The above "spaceout" algorithm (if I recall correctly) cf. Steven B. Segeletes. As you can see, I have encountered no difficulty in applying the algorithm to a regular sentence. However, I have not been apply to apply it correctly to the arched words above. QUESTION: How may I, using this algorithm or by some other method, increase the spacing between the displayed arched letters? I compile the code with xelatex. Thank you.
- Get an overbrace over a matrix, with entries aligned with columns and rows of matrixby jayant on June 30, 2026 at 7:32 pm
I am trying to get a matrix with an overbrace and sidebrace which looks like the following; I tried the following code so far, \documentclass[12pt]{article} \usepackage{epsfig} \usepackage{amssymb} %\usepackage[dvips]{color} \usepackage{amsmath} \usepackage{amsthm} \[ \begin{array}{ccc} \overbrace{\text{Col 1}}^{\text{Label A}} & %\overbrace{\text{Col 2 \quad Col 3}}^{\text{Label B}} & %\overbrace{\text{Col 4}}^{\text{Label C}} \\ \begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{bmatrix} \end{array} \] \end{document} But it is not giving the desired output. Kindly help.
- Formatting long division without the longdivision packageby Matt on June 28, 2026 at 3:59 am
I'm trying to make a worksheet where students need to fill out parts of a long division statement. I usually use the longdivision package, but realized that I can't cover up parts of it for students to fill out. Any suggestions? I've attached an image for reference.