Hot
- toc appendix fix kicks in too lateby Nate on October 20, 2026 at 11:16 am
I am using the book class. My main file includes the following toc styling commands: \documentclass{book} \usepackage{nonumonpart} \usepackage{tocloft} \usepackage{calc} \usepackage[titletoc,title]{appendix} \renewcommand{\cftpartfont}{\LARGE\bfseries} \renewcommand{\cftchapfont}{\large\bfseries} \setlength{\cftchapnumwidth}{1.1875in}\renewcommand{\cftchappresnum}{Chapter }\renewcommand{\cftchapaftersnum}{:\phantom{mm}}\cftpagenumbersoff{part}\renewcommand\cftchapafterpnum{\par\addvspace{6pt}} \setlength{\cftbeforepartskip}{17pt} Borrowing from Werner's answer here. I included the following code to change the ToC's printing from "Chapter" to "Appendix": \let\oldappendix\appendix \renewcommand{\appendix}{% \oldappendix \addtocontents{toc} % Update \cftchappresnum within the .toc {\protect\renewcommand{\protect\cftchappresnum}{\appendixname\space}} } \renewcommand{\contentsname}{\underline{Table of Contents}}\setlength\cftbeforetoctitleskip{24pt}\setlength\cftaftertoctitleskip{24pt} \begin{document} ... \include{ch12} \appendix \pagenumbering{arabic} \renewcommand\thepage{A\arabic{page}} \include{appendixA} \pagenumbering{arabic} \renewcommand\thepage{B\arabic{page}} \include{appendixB} \end{document} It changes for Appendix B but not Appendix A: Does anyone know why it's not overriding the "Chapter" for Appendix A, and/or how to change that?
- A Potential Approach to Incremental Compilationby Tom on October 20, 2026 at 9:57 am
I’ve found that the secret behind BaKoMa’s incremental compilation seems to be hidden in itex.dll, which is located in the BaKoMa installation directory. There’s a reverse-engineering repository available at https://github.com/morluto/rea. Has anyone tried using Claude or ChatGPT to help implement incremental compilation?
- bm package producing weird outputby Carl Rasmussen on October 20, 2026 at 8:04 am
I want to write bold and italic letters for math vectors. I found on here that the \bm package would handle this. And it does but the letters look like this: This is when I'm writing \bm{\dot{x}(t)}. This project is the first time I'm using LaTeX locally and not in Overleaf. Any idea why it looks like multiple instances on top of each other?
- Using xskak to typeset a bookby Fernando Sthetatos on October 20, 2026 at 3:28 am
I want to typeset the moves of a game in two columns in the following way. e4 e5 Nf3 Nf6 I know how to typeset, for instance 1... e5. I want to know how to typeset e4 ... I need three dots insted of the black move. Can anyone help me? Thanks a lot.
- Marking the end of a calculationby Coda5 55 on October 20, 2026 at 3:07 am
I am looking for a way to highlight the end of a mathematical calculation. Not to say it's important, like \boxed does, but merely to clarify what one has ended with. See the red in the following image: So it can be translated to the following (considering \asresult{} draws the red line as above): \documentclass{article} \usepackage{amsmath, tikz} \newcommand{\diff}{\mathrm{d}} % differential pebble \newcommand{\asresult}[1]{ % result highlight %... } \begin{document} The derivation of the derivate of the exponential, under such new tools, needs a re-route first: \begin{align*} e^{\diff x} &= \sum_{k=0}^\infty \frac{\diff x^k}{k!} \\ &= \asresult{1 + \diff x} \\ (\diff e^x)(t) &= \lim_{h \to 0} e^{x(t+h)} - e^{x(t)} \\ &= e^{x(t)} \lim_{h \to 0} e^{x(t+h) - x(t)} - 1 \\ &= e^{x(t)} (e^{\diff x(t)} - 1) &= \asresult{e^{x(t)} \diff x(t)} \end{align*} And with that, one deduces $\cfrac{\diff e^x}{\diff x} = e^x$, QED. \end{document} How can I add this \asresult?
- How do I hook part and chapter to toc in memoirby Chris Walton on October 19, 2026 at 11:12 pm
How can I link a part toc into the part header page? I am trying to implement part specific and chapter specific toc on their relative title headers. The code for the chapter toc is based directly on pp 414-417 of memman.pdf and works well. I (naively) thought that repeating the code but replacing chapter with part would result in a corresponding part toc. My implementation of this does not seem to hook the part and the toc together. The attached code shows the wanted main toc, and chapter specific toc; but does not show the part toc. I expected a toc very similar to that for chapter on the title page. My example below shows the code for the chapter and the part toc. The part toc portion has been bounded by &**********. I have removed a lot of code concerning toc formatting, so the formats may be off. To aid me I have used: memoir: Chapter TOCs (Part 1) memoir: Chapter TOCs (Part 2) memoir: Chapter TOCs (Part 3) These have been very helpful, but when they venture into Tex code, rewriting parts of memoir, and @ symbols and the like, they are way above my competence. \documentclass{memoir} \usepackage{lipsum} \makeatletter \newcounter{tocmarker} \renewcommand\mempreaddchaptertotochook{\cftinserthook{toc}{stop-\thetocmarker}} \renewcommand\mempreaddparttotochook {\cftinserthook{toc}{stop-\thetocmarker}} \renewcommand{\mempostaddchaptertotochook}{% \stepcounter{tocmarker}\cftinserthook{toc}{start-\thetocmarker}} \let\normalchangetocdepth\changetocdepth \newcommand\chaptertoc{ \begingroup \setcounter{@memmarkcntra}{\value{tocdepth}} \let\changetocdepth\@gobble \normalchangetocdepth{-10} \cftinsertcode{start-\thetocmarker}{\normalchangetocdepth{2}} \cftinsertcode{stop-\thetocmarker}{\normalchangetocdepth{-10}} \let\tocheadstart\relax \let\printtoctitle\@gobble \let\aftertoctitle\relax \tableofcontents* \endgroup \setcounter{tocdepth}{\value{@memmarkcntra}} \par\bigskip \@afterheading } %******************************* \renewcommand\mempostaddparttotochook{% \stepcounter{tocmarker}\cftinserthook{toc}{start-\thetocmarker}} \let\normalchangetocdepth\changetocdepth % for later \newcommand\parttoc{ \begingroup \setcounter{@memmarkcntra}{\value{tocdepth}} \let\changetocdepth\@gobble \normalchangetocdepth{-10} \cftinsertcode{start-\thetocmarker}{\normalchangetocdepth{1}} \cftinsertcode{stop-\thetocmarker}{\normalchangetocdepth{-10}} \let\tocheadstart\relax \let\printtoctitle\@gobble \let\aftertoctitle\relax \tableofcontents* \endgroup \setcounter{tocdepth}{\value{@memmarkcntra}}% \par\bigskip \@afterheading } \makeatother %******************************* \begin{document} \tableofcontents* \part{Rewrite v2} \parttoc \chapter{Chapter} \chaptertoc \section{Section} \lipsum \end{document}
- Is TeXShop version 3.62 compatible with Tahoe?by PJ49 on October 19, 2026 at 10:17 pm
For certain reasons I have to use TeXShop version 3.62 in a project. It works fine with Sequoia 15.7.7, but will it work if I upgrade to Tahoe?
- Lower the overline in Miller indicesby Georgian Ilie on October 19, 2026 at 4:31 pm
Good evening everyone, I am facing a problem when I designate crystallographic faces with the Miller notation (via the miller package). Typing the following code: \documentclass[varwidth=15cm, border=1pt, 11pt]{standalone} \usepackage{amsmath} %\usepackage{physics} \usepackage{fontspec} \usepackage{miller} \setmainfont{STIX Two Text} \usepackage[math-style=upright,mathbf=text,mathbf=sym,mathrm=text,mathrm=sym]{unicode-math} \setmathfont{STIX Two Math} \begin{document} \begin{equation*} \hkl(110)\equiv\hkl(11-20) \end{equation*} \end{document} Leads me to this: I am struggling in getting the bar over the "2" closer to the number. Can the distance between these two be set? Thank you in advance for your help.
- Marking a tail one, two, or four bars by folarrow package for commutative diagramsby Sebastiano on October 19, 2026 at 10:51 am
The folarrow package, available for amscd, xy-pic, and tikz-cd, provides the possibility of placing a marking or description at the center of the arrow's tail. I wonder whether it is possible to obtain markings of the same size, both for the tail and the arrow, with one, two, or four bars, similarly to the three-bar marking provided by folarrow. \documentclass{article} \usepackage{tikz-cd,amssymb} \usepackage{folarrow} \begin{document} \begin{tikzcd} A \arrow[r, foliated] \arrow[rd, "\smallsetminus" marking] & B \arrow[d, "///" marking] \\ & C \end{tikzcd} \end{document}
- longtable caption being tagged as TR > THby Paul J Hurtado on October 19, 2026 at 10:25 am
Here is a MWE where the caption of a longtable is being tagged as a table row (TR) and as a header row (TH) using lualatex (and lualatex-dev) with tagging=on. This leads to Regularity errors in the Adobe Acrobat checker. [I'm running the latest MikTeX updates with latex-tools updated as well.] Am I doing something incorrectly, or is there a longtable conflict with the tagging tools? It's listed as compatible at latex3.github.io/tagging-project/tagging-status/. Thanks! \DocumentMetadata{ lang = en-US, tagging = on, tagging-setup = {math/setup={mathml-SE,mathml-AF}}, check-tagging-status } % END \DocumentMetadata{} \documentclass[letterpaper,12pt,oneside]{report} \usepackage{longtable} \newcommand{\tn}{\tabularnewline} % Shorthand used for cleaner table entries \begin{document} \noindent This table is being tagged incorrectly. The caption as well as the desired header row were both tagged as TR, with the contents of each appearing in TH tags (on TH tag for the caption text, and one TH tag for each of Base 10 and Binary). \begin{longtable} {|c|c|} \caption{The longtable package can be used to split a table across multiple pages when it won't fit onto a single page, as illustrated with this table.}\label{t:long} \\ \hline \textbf{Base 10} & \textbf{Binary} \tn \hline \endhead % Caption still tagged as <TR> if this line commented out (no TH tags in the caption or row above) 1 & 1 \tn \hline 2 & 10 \tn \hline 3 & 11 \tn \hline 4 & 100 \tn \hline 5 & 101 \tn \hline 6 & 110 \tn \hline 7 & 111 \tn \hline 8 & 1000 \tn \hline 9 & 1001 \tn \hline 10 & 1010 \tn \hline 11 & 1011 \tn \hline 12 & 1100 \tn \hline 13 & 1101 \tn \hline 14 & 1110 \tn \hline 15 & 1111 \tn \hline 16 & 10000 \tn \hline 17 & 10001 \tn \hline 18 & 10010 \tn \hline 19 & 10011 \tn \hline 20 & 10100 \tn \hline 21 & 10101 \tn \hline 22 & 10110 \tn \hline 23 & 10111 \tn \hline 24 & 11000 \tn \hline 25 & 11001 \tn \hline 26 & 11010 \tn \hline 27 & 11011 \tn \hline 28 & 11100 \tn \hline 29 & 11101 \tn \hline 30 & 11110 \tn \hline \end{longtable} \end{document}
- A problem involves origdate and text citesby M. Logic on October 19, 2026 at 9:49 am
A minimal working sample is as follows. \documentclass[fontset=fandol]{ctexart} \usepackage[utf8, backend=biber, style=caspervector-ay, sorting=cenyt, sortcites=false, ugly]{biblatex} \makeatletter %change English commas for Chinese enumeration commas \renewcommand*{\bbx@citecomma}{\bbx@cnbcomma} \renewcommand*{\bbx@citebcomma}{\bbx@cnbcomma} %change English semicolons for Chinese commas \renewcommand*{\bbx@citescolon}{\bbx@cncomma} %forbiden p. and pp., and change , for : \renewcommand*{\postnotedelim}{\addcolon\space}% \DeclareFieldFormat{postnote}{\mknormrange{#1}}% \DeclareFieldFormat{multipostnote}{\mknormrange{#1}}% \DeclareFieldFormat{roundcnparens}{(#1)}%Chinese parenthesis \newbool{cbx:cnparens} \renewbibmacro*{textcite:init}{% \citetrackerfalse \pagetrackerfalse \global\undef\cbx@lasthash \global\undef\cbx@lastyear \setcounter{textcitecount}{0}% \global\boolfalse{cbx:cnparens}% } \renewbibmacro*{textcite}{% \iffieldequals{namehash}{\cbx@lasthash} {\iffieldundef{shorthand} {\iffieldundef{origyear} {} {\undef\cbx@lastyear}% \ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)} {\setunit{\addcomma}% \usebibmacro{cite:extradate}} {\setunit{\compcitedelim}% \printfield[roundcnparens]{origyear}%Chinese parenthesis \setunit*{\addspace}% \usebibmacro{cite:labeldate+extradate}% \savefield{labelyear}{\cbx@lastyear}}} {\setunit{\compcitedelim}% \usebibmacro{cite:shorthand}% \global\undef\cbx@lastyear}} {\ifnameundef{labelname} {\iffieldundef{shorthand} {\usebibmacro{cite:label}% \setunit{% \global\booltrue{cbx:cnparens}% \printdelim{nonameyeardelim}\bbx@cnlparen}%Chinese left parenthesis \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} {}% \printfield[roundcnparens]{origyear}%Chinese parenthesis \setunit*{\addspace}% \usebibmacro{cite:labeldate+extradate}} {\usebibmacro{cite:shorthand}}} {\printnames{labelname}% \setunit{% \global\booltrue{cbx:cnparens}% \printdelim{nameyeardelim}\bbx@cnlparen}%Chinese left parenthesis \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} {}% \iffieldundef{shorthand} {\iffieldundef{labelyear} {\usebibmacro{cite:label}} {\printfield[roundcnparens]{origyear}%Chinese parenthesis \setunit*{\addspace}% \usebibmacro{cite:labeldate+extradate}}% \savefield{labelyear}{\cbx@lastyear}} {\usebibmacro{cite:shorthand}% \global\undef\cbx@lastyear}}% \stepcounter{textcitecount}% \savefield{namehash}{\cbx@lasthash}}% \setunit{% \ifbool{cbx:cnparens}%Chinese right parenthesis {\bbx@cnrparen\global\boolfalse{cbx:cnparens}} {}% \textcitedelim}% } \makeatother \begin{filecontents*}{\jobname.bib} @book{bookot, location = {Place}, publisher = {ABC}, author = {Name, Given}, title = {One title}, year = {2001}, origyear = {1978}, } @book{bookat, location = {Place}, publisher = {ABC}, author = {Name, Given}, title = {Another title}, year = {2001}, origyear = {1976}, } \end{filecontents*} \addbibresource{\jobname.bib} \addbibresource{biblatex-examples.bib} \begin{document} 1. \textcite{bookot,bookat,worman,geer} NO 2. \textcites{bookot,bookat,worman,geer} NO 3. \textcites{bookot}{bookat}{geer} NO 4. \textcites[20]{bookot}[29--71]{bookat}{geer} NO %\printbibliography \end{document} As you see, to cite the references with original dates in texts, I define new \textcite and \textcites in my dcocument improved from the link. The commands could make some punctuations be Chinese in text citations (I have succeed defining \cite and \cites). As you see \textcite and \textcites do not work well. The following picture shows what I want. I add cbx:cnparens to replace cbx:parens. But maybe I don't replace all of cbx:parens, then which are not replaced? By the way, don't change other cite commands, such as \cite and \cites. Note that caspervector-ay bases on authoryear-comp.
- A problem involves origdate and multiple citesby M. Logic on October 19, 2026 at 6:44 am
First a minimal working sample is as follows. \documentclass{ctexart} \usepackage[utf8, backend=biber, style=caspervector-ay, sorting=cenyt,sortcites=false,ugly]{biblatex} \DeclareFieldFormat{roundparens}{(#1)}% \makeatletter \newbibmacro{fciting:origdate}{% \iffieldundef{origyear}% {}% {\printtext[roundparens]{%parens \printfield{origyear}}}}% \newbibmacro{fciting:date}{% \printtext[bibhyperref]{% \printfield{year}% \printfield{extradate}}} \newbibmacro*{fciting:temporary-origdate}{% \usebibmacro{fciting:origdate}% \iffieldundef{origyear}% {}% {\setunit*{\addspace}}% } \newbibmacro*{fciting:date+extradate}{% \usebibmacro{fciting:temporary-origdate}% \printtext{\usebibmacro{fciting:date}}} %\newcommand{\ftextcitedelim}{\addcomma\addspace} \newcommand{\fcompcitedelim}{\addcomma\addspace} \newcommand{\fmulticitedelim}{\addsemicolon\addspace} \renewbibmacro*{fcite}{% \iffieldundef{shorthand} {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}} {\usebibmacro{cite:label}% \setunit{\printdelim{nonameyeardelim}}% \usebibmacro{fciting:date+extradate}% \usebibmacro{cite:reinit}} {\iffieldequals{namehash}{\cbx@lasthash} {\iffieldundef{origyear} {} {\undef\cbx@lastyear}% \ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)} {\setunit{\fcompcitedelim}% \usebibmacro{cite:extradate}} {\setunit{\fcompcitedelim}% \usebibmacro{fciting:date+extradate}% \savefield{labelyear}{\cbx@lastyear}}} {\printnames{labelname}% \setunit{\printdelim{nameyeardelim}}% \setunit*{\addspace}% \usebibmacro{fciting:date+extradate}% \savefield{namehash}{\cbx@lasthash}% \savefield{labelyear}{\cbx@lastyear}}}}% {\usebibmacro{cite:shorthand}% \usebibmacro{cite:reinit}}% \setunit{\fmulticitedelim}% } \DeclareCiteCommand{\fcite} {\usebibmacro{cite:init}% \usebibmacro{prenote}}% {\usebibmacro{citeindex}% \usebibmacro{fcite}}% {}%\setunit{\fmulticitedelim} {\usebibmacro{postnote}}% \DeclareMultiCiteCommand{\fcites}[\usebibmacro{cite:init}]{\fcite}{\fmulticitedelim} \makeatother \begin{filecontents*}{\jobname.bib} @book{bookot, location = {Place}, publisher = {ABC}, author = {Name, Given}, title = {One title}, year = {2001}, origyear = {1978}, } @book{bookat, location = {Place}, publisher = {ABC}, author = {Name, Given}, title = {Another title}, year = {2001}, origyear = {1976}, } \end{filecontents*} \addbibresource{\jobname.bib} \addbibresource{biblatex-examples.bib} \begin{document} \fcite{bookot,bookat,worman,geer} YES \fcites{bookot,bookat,worman,geer} YES \fcites{bookot}{bookat}{geer} NO \fcites[20]{bookot}[29--71]{bookat}{geer} NO \printbibliography \end{document} As you see, to cite the references with original dates, I define new \fcite and \fcites (I also use \cite and \cites in my dcocument for some reseasons) improved from the link. As you see \fcite and \fcites work well in most cases, except: when I use \fcites{bookot}{bookat}{geer} and \fcites[20]{bookot}[29--71]{bookat}{geer} in this case, it produce semicolons between years with the same author, while they should be commas. Then how to solve the problem?
- What is the reason for starting preamble comment with a space in TeX and MF?by Igor Liferenko on October 19, 2026 at 2:35 am
Run commands: tex 'story \end' dvitype story Preamble comment is: ' TeX output 2026.10.18:0927' The leading space is added in §617 of tex.web. Why? Run commands: mf '\nodisplays; input cmr10' gftype cmr10.2602gf Preamble comment is: ' METAFONT output 2026.10.18:0928'
- Label over AVMs in langsci-avm packageby Liz C. on October 18, 2026 at 7:05 pm
Is there a way to get an abbreviation label centered over an AVM like the D over the AVM in the SPR list shown here? The code I had to do this using the AVM package was as follows (and admittedly I don't really understand it and usually just copy pasted it): \begin{avm} \avml\hfil D \\[-1ex] \[ COUNT & $+$ \\ \] \avmr \end{avm}
- On the Numerical Justification of Table of Contents Entries [duplicate]by Jethro on October 18, 2026 at 6:46 pm
MWE: \documentclass[openany]{book} \usepackage{tocloft} \renewcommand{\thechapter}{\Roman{chapter}} \setlength{\cftchapnumwidth}{3em}% Width of chapter numbers in ToC \renewcommand{\cftchapaftersnum}{.} % Add a period after each chapter number in ToC \renewcommand{\cftchapleader}{\dotfill} \begin{document} \tableofcontents \chapter{This is the First Chapter} \chapter{This is the Second Chapter} \chapter{This is the Third Chapter} \end{document} Hence, the Table of Contents: Notice that the three Contents entries are left justified according to the beginning of each Roman numeral. How may I produce these entries right justified according to the periods immediately after the Roman numerals?
- Latex References Not Resolving [closed]by Sanjeev N on October 18, 2026 at 6:33 pm
If I number a particular equation my compilation is not able to resolve the symbols and I see ?? Against all references
- Table lines and alignmentby azetina on October 18, 2026 at 3:57 pm
Consider the following MWE: \documentclass[11pt,border=6pt]{standalone} \usepackage{mathptmx} \usepackage{booktabs} \usepackage{array} \usepackage{multirow} \renewcommand{\arraystretch}{1.15} \begin{document} \setlength{\tabcolsep}{7pt} \begin{tabular}{c|cc|cc|cc|cc|cc} \toprule[1.2pt] \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{Line}\\\textbf{number}\end{tabular}} & \multicolumn{10}{c}{\textbf{Column number}} \\ \cmidrule(l){2-11} & \multicolumn{2}{c|}{\textit{00--09}} & \multicolumn{2}{c|}{\textit{10--19}} & \multicolumn{2}{c|}{\textit{20--29}} & \multicolumn{2}{c|}{\textit{30--39}} & \multicolumn{2}{c}{\textit{40--49}} \\ \midrule \textit{00} & 15544 & 80712 & 97742 & 21500 & 97081 & 42451 & 50623 & 56071 & 28882 & 28739 \\ \textit{01} & 01011 & 21285 & 04729 & 39986 & 73150 & 31548 & 30168 & 76189 & 56996 & 19210 \\ \textit{02} & 47435 & 53308 & 40718 & 29050 & 74858 & 64517 & 93573 & 51058 & 68501 & 42723 \\ \textit{03} & 91312 & 75137 & 86274 & 59834 & 69844 & 19853 & 06917 & 17413 & 44474 & 86530 \\ \textit{04} & 12775 & 08768 & 80791 & 16298 & 22934 & 09630 & 98862 & 39746 & 64623 & 32768 \\ \addlinespace[4pt] \textit{05} & 31466 & 43761 & 94872 & 92230 & 52367 & 13205 & 38634 & 55882 & 77518 & 36252 \\ \textit{06} & 09300 & 43847 & 40881 & 51243 & 97810 & 18903 & 53914 & 31688 & 06220 & 40422 \\ \textit{07} & 73582 & 13810 & 57784 & 72454 & 68997 & 72229 & 30340 & 08844 & 53924 & 89630 \\ \textit{08} & 11092 & 81392 & 58189 & 22697 & 41063 & 09451 & 09789 & 00637 & 06450 & 85990 \\ \textit{09} & 93322 & 98567 & 00116 & 35605 & 66790 & 52965 & 62877 & 21740 & 56476 & 49296 \\ \addlinespace[4pt] \textit{10} & 80134 & 12484 & 67089 & 08674 & 70753 & 90959 & 45842 & 59844 & 45214 & 36505 \\ \textit{11} & 97888 & 31797 & 95037 & 84400 & 76041 & 96668 & 75920 & 68482 & 56855 & 97417 \\ \textit{12} & 92612 & 27082 & 59459 & 69380 & 98654 & 20407 & 88151 & 56263 & 27126 & 63797 \\ \textit{13} & 72744 & 45586 & 43279 & 44218 & 83638 & 05422 & 00995 & 70217 & 78925 & 39097 \\ \textit{14} & 96256 & 70653 & 45285 & 26293 & 78305 & 80252 & 03625 & 40159 & 68760 & 84716 \\ \addlinespace[4pt] \textit{15} & 07851 & 47452 & 66742 & 83331 & 54701 & 06573 & 98169 & 37499 & 67756 & 68301 \\ \textit{16} & 25594 & 41552 & 96475 & 56151 & 02089 & 33748 & 65289 & 89956 & 89559 & 33687 \\ \textit{17} & 65358 & 15155 & 59374 & 80940 & 03411 & 94656 & 69440 & 47156 & 77115 & 99463 \\ \textit{18} & 09402 & 31008 & 53424 & 21928 & 02198 & 61201 & 02457 & 87214 & 59750 & 51330 \\ \textit{19} & 97424 & 90765 & 01634 & 37328 & 41243 & 33564 & 17884 & 94747 & 93650 & 77668 \\ \bottomrule[1.2pt] \end{tabular} \end{document} How can I: Ensure the vertical lines and horizontal line connect beside "Line number"; that is form like a T. See image. "Line number" should be bottom aligned with 00-09. As is, it is centered vertically using multirow. Everything else should remain the same.
- Typesetting Variations in xskakby Reinhard Neuwirth on October 18, 2026 at 1:02 pm
The example in 2. Introduction on page 5 of the xskak document suggests to define variations as alternatives to a move defined in the starting board, as for example 3...a6 being a kind of standard first Black move in the Ruy Lopez, and 3...Bc5, 3...Nd4, etc. being variations of it. While this works, it is somewhat illogical. Who is to say which one of the possibilities is to be regarded the "standard" first continuation move? Also, the situation becomes increasingly messy as one progesses down the tree of moves and has to deal with nested variations. Attempting not to define the initial "standard continuation" as in \mainline{1.e4 e5 2.Nf3 Nc6 3.Bb5} leads to the error: White, not Black to move (a6). Purely by chance I found that \mainline{1.e4 e5 2.Nf3 Nc6 3.Bb5 *} or putting some other character where Black's first move should be, improved the issue but needs fixing by getting rid of the spurious ZZ*. Could someone address this please. \documentclass{article} % RN. 18/10/2026 % BRIEF DESCRIPTION: % An alternative to typesetting variations in xskak. %======================= \usepackage{xskak} \begin{document} \usetextfig \setchessboard{smallboard} \section{Ruy Lopez 1} \newchessgame[id=main] \mainline{1.e4 e5 2.Nf3 Nc6 3.Bb5 a6} \chessboard \newchessgame[newvar=main,id=var1] \hspace{15mm}\textbf{Variation 1: }\mainline[invar]{3...Bc5} \hspace{15mm}\chessboard[smallboard] \resumechessgame[id=main] \newchessgame[newvar=main,id=var2] \hspace{15mm}\textbf{Variation 2: }\mainline[invar]{3...Nd4} \resumechessgame[id=main] \newchessgame[newvar=main,id=var3] \hspace{15mm}\textbf{Variation 3: }\mainline[invar]{3...f5} \resumechessgame[id=main] \newchessgame[newvar=main,id=var4] \hspace{15mm}\textbf{Variation 4: }\mainline[invar]{3...Nf6} \resumechessgame[id=main] \newchessgame[newvar=main,id=var5] \hspace{15mm}\textbf{Variation 5: }\mainline[invar]{3...d6} \hspace{15mm}\chessboard[smallboard] \section{Ruy Lopez 2} \newchessgame[id=main] \mainline{1.e4 e5 2.Nf3 Nc6 3.Bb5 *} \chessboard \newchessgame[newvar=main,id=var1] \hspace{15mm}\textbf{Variant 1: }\mainline[invar]{3...a6} \hspace{15mm}\chessboard[smallboard] \resumechessgame[id=main] \newchessgame[newvar=main,id=var2] \hspace{15mm}\textbf{Variant 2: }\mainline[invar]{3...Bc5} \resumechessgame[id=main] \newchessgame[newvar=main,id=var3] \hspace{15mm}\textbf{Variant 3: }\mainline[invar]{3...Nd4} \resumechessgame[id=main] \newchessgame[newvar=main,id=var4] \hspace{15mm}\textbf{Variant 4: }\mainline[invar]{3...f5} \resumechessgame[id=main] \newchessgame[newvar=main,id=var5] \hspace{15mm}\textbf{Variant 5: }\mainline[invar]{3...Nf6} \resumechessgame[id=main] \newchessgame[newvar=main,id=var6] \hspace{15mm}\textbf{Variant 6: }\mainline[invar]{3...d6} \hspace{15mm}\chessboard[smallboard] \end{document}
- Why are end-of-lines commented out, but lines can be indented?by ltcomdata on October 17, 2026 at 11:46 pm
Looking over many examples of LaTeX code in macro definitions, I often find a % at the end of a line --- so that no extraneous spaces are somehow imported into the macro by the end of line character. However, at the same time, I notice that these same macros often have many lines starting wit indentations --- presumably to make the code readable. How come the code can be indented at all? Why should every line in the macro have any opening spaces at all? Isn't the point of % to avoid extraneous spaces? Why do we care about that at the end of the line, but do not care about it at the beginning of the line?
- hyperref package: error after update "\??? doesn't match its definition" "key-value input"by Bernd on October 17, 2026 at 9:17 pm
I have updated MikTex, and now I get this error when I compile my tex files with pdflatex: ! Use of \??? doesn't match its definition. <argument> \??? ! Latex Error: Misplaced '=' in key-value input on line 59. The pdf file produced looks good, it has the hyperlinks that I expect. When I comment out the hyperref package, no error is thrown, but then of course, the expected hyperlinks the hyperref package produces are not there. I have found a post referring to a similar issue, where a re-installation has solved the problem. However, this did not work for me. Here is a minimum working example: \documentclass[a5paper,fontsize=9pt, twoside, DIV=17, BCOR=1mm]{scrbook} \usepackage [bookmarks, colorlinks=true, linkcolor=blue, citecolor=magenta, urlcolor=cyan, pdfpagelayout=TwoPageRight, pdfpagelayout=SinglePage, pagebackref, pdfusetitle ] {hyperref} \usepackage[chorded, noshading]{songs} \baselineadj=-1.8ex plus 0.3ex minus 1.0ex \versesep=0.5ex plus 0.5ex minus 0.5ex \renewcommand{\colbotglue}{0pt plus .5\textheight minus 0pt} \songpos{3} \settowidth{\versenumwidth}{10.} \setlength{\songnumwidth}{7.5ex} \newcommand{\sieben}{\textsuperscript{7}} \begin{document} \chapter{Preface} \label{label} \chapter{Songs} \begin{songs}{} \beginsong{The drunken sailor} [ by = {Traditional} ] \beginverse \[d]What shall we do with the drunken sailor, \[C]what shall we do with the drunken sailor, \[d]what shall we do with the drunken sailor \[C]early in the \[d]morning? \endverse \beginchorus \[d]Hooray! And up she rises. \[C]Hooray! And up she rises. \[d]Hooray! And up she rises \[C]early in the \[d]morning. \endchorus \chordsoff \beginverse Take him and shake ihm and try to awake him! \endverse See Chapter \ref{label} \endsong \end{songs} \end{document} The log file contains this information, which I don't understand: chapter 2. ! Use of \??? doesn't match its definition. <argument> \??? ! LaTeX Error: Misplaced '=' in key-value input on line 59 l.59 \endsong If you say, e.g., `\def\a1{...}', then you must always put `1' after `\a', since control sequence names are made up of letters only. The macro here has not been followed by the required stuff, so I'm ignoring it. Any ideas for a fix or a workaround? Thanks in advance for your help!
- How to make the `\ddots` centering of the bounding box?by Explorer on October 17, 2026 at 4:37 pm
This post is similar to this one, but not exactly the same... With the following code: \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{matrix} \setlength{\fboxsep}{0pt} \begin{document} \[ \begin{tikzpicture} \matrix (magic) [ matrix of math nodes, nodes={circle,draw=magenta,minimum size=1cm}, left delimiter=(, right delimiter=) ] { 1 \\ & 1 \\ & & \ddots \\ & & & \fbox{$\ddots$} \\ & & & & 1 \\ }; \draw[teal,dashed] (magic-1-1.center) -- (magic-5-5.center); \end{tikzpicture} \] \end{document} What I want was the following: only typeset three dots, thus \Ddots with nicematrix was not so flexible; I want the "slope" of \ddots was parallel with the teal,dashed line; I want to ellnimate the extra height of the bounding box of \ddots(why?It looks not good...) It recalled the classical \rvdots here, and we know: $ latexdef \ddots \ddots: macro:->\protect \ddots \ddots : macro:->\mathinner {\mkern 1mu\raise 7\p@ \vbox {\kern 7\p@ \hbox {.}}\mkern 2mu \raise 4\p@ \hbox {.}\mkern 2mu\raise \p@ \hbox {.}\mkern 1mu} I guessed slightly modify the commands could help? Any suggestions? \makeatletter % \DeclareRobustCommand{\rvdots}{% % \vbox{ % \baselineskip4\p@\lineskiplimit\z@ % \kern-\p@ % \hbox{.}\hbox{.}\hbox{.} % }} \DeclareRobustCommand{\rddots}{% \mathinner {% \mkern 1mu\raise 7\p@% \vbox{\kern 1\p@ \hbox {.}}% \mkern 0.4mu \raise 4\p@ \hbox {.}% \mkern 0.4mu\raise \p@ \hbox {.}% \mkern 1mu% }% } \makeatother Edit1 If I zoomed in with with cfr's answer: \makeatletter \newcommand\exddots {% \mathinner {% \mkern 1mu\raise 3.5\p@ % 7 -> 3.5 \vbox {\kern 0\p@ \hbox {.}}% 7 -> 0 \mkern 2mu \raise -0.5\p@ \hbox{.}% 4 -> -0.5 \mkern 2mu \raise -4\p@ \hbox{.}% \p@ -> -4 \mkern 1mu }% } \makeatother Edit2 Just to show the example of cfr's comment: Is the content or, at least, the size of the content in the matrix fixed? because the angle of the diagonal obviously will vary if that varies. so unless you want this only as a one-off, you maybe need to think about how this should work. should \exddots really look different each time and different from any use in maths mode? or do you want to fix the matrix dimensions to keep the angle constant? or ...? I don't think it will look so good if the dots look different in different cases. at least, that is not how it usually would work in latex? \documentclass{article} \usepackage{amsmath} \usepackage{nicematrix} \usepackage{tikz} % \usepackage{kpfonts-otf} \begin{document} \[ \begin{pNiceMatrix} 3 & & & \\ & 555 & & \\ & & \ddots & \\ & & & 66666 \CodeAfter \tikz{ \draw[teal, ultra thin] (1-1.center) -- (4-4.center); \draw[magenta, ultra thin] (2-2.south east) -- (4-4.north west); } \end{pNiceMatrix}\qquad \begin{pNiceMatrix} 3 & & & \\ & 555 & & \\ & & \Ddots & \\ & & & 66666 \CodeAfter \tikz{ \draw[teal, ultra thin] (1-1.center) -- (4-4.center); \draw[magenta, ultra thin] (2-2.south east) -- (4-4.north west); } \end{pNiceMatrix} \] \[ \begin{pNiceMatrix} a & & & \\ & b & & \\ & & \ddots & \\ & & & d \CodeAfter \tikz{ \draw[teal, ultra thin] (1-1.center) -- (4-4.center); \draw[magenta, ultra thin] (2-2.south east) -- (4-4.north west); } \end{pNiceMatrix}\qquad \begin{pNiceMatrix} a & & & \\ & b & & \\ & & \Ddots & \\ & & & d \CodeAfter \tikz{ \draw[teal, ultra thin] (1-1.center) -- (4-4.center); \draw[magenta, ultra thin] (2-2.south east) -- (4-4.north west); } \end{pNiceMatrix} \] \[ \begin{pNiceMatrix} x & & & & \\ & x+y & & & \\ & & \ddots & & \\ & & & \sqrt{x-y} & \\ & & & & \dfrac{x}{y} \CodeAfter \tikz{ \draw[teal, ultra thin] (1-1.center) -- (4-4.center); \draw[magenta, ultra thin] (2-2.south east) -- (4-4.north west); } \end{pNiceMatrix}\qquad \begin{pNiceMatrix} x & & & & \\ & x+y & & & \\ & & \Ddots & & \\ & & & \sqrt{x-y} & \\ & & & & \dfrac{x}{y} \CodeAfter \tikz{ \draw[teal, ultra thin] (1-1.center) -- (4-4.center); \draw[magenta, ultra thin] (2-2.south east) -- (4-4.north west); } \end{pNiceMatrix} \] \end{document} With latin-modern-math: With kpfonts-otf:
- How to perform vector operations and print the result directly in luacas?by minthao_2011 on October 17, 2026 at 5:29 am
I am using the luacas package to handle symbolic math and compute coordinates. Currently, to display the vector $\vec{AB}$ from two points $A$ and $B$, I have to subtract and print each component individually like this: \documentclass[12pt]{article} \usepackage{amsthm} \theoremstyle{definition} \newtheorem{ex}{Example} \usepackage{luacas} \usepackage{esvect} \begin{document} \begin{ex} \begin{CAS} A = {sqrt(2), -2/7, 3/5} B = {sqrt(8), -14/29, 3*sqrt(3)} \end{CAS} \[\displaystyle A=\left(\print{A[1]};\print{A[2]};\print{A[3]} \right), \quad B=\left(\print{B[1]};\print{B[2]};\print{B[3]} \right).\] \[ \vv{AB}=\left(\print{simplify(B[1]-A[1])};\print{B[2]-A[2]};\print{B[3]-A[3]} \right) .\] \end{ex} \end{document} This approach makes the code repetitive and messy. I would like to simplify the workflow by computing the vector directly within the CAS environment and printing it in one go, like this: \begin{CAS} A = {sqrt(2), -2/7, 3/5} B = {sqrt(8), -14/29, 3*sqrt(3)} vAB = B - A \end{CAS} \[\vv{AB} = \print{vAB}\] However, doing this directly does not work as expected. I got the massage: [string "A = {sqrt(Integer('2')), -Integer('2')/Intege..."]:1: attempt to perform arithmet ic on a table value (global 'B') stack traceback: [string "A = {sqrt(Integer('2')), -Integer('2')/Intege..."]:1: in local 'exe' ...26/texmf-dist/tex/lualatex/luacas/test/luacas-parser.lua:329: in function ' CASparse' [\directlua]:1: in main chunk. \luacode@dbg@exec ...code@maybe@printdbg {#1} #1 } l.15 \end {CAS} ? Is there a way to define a custom function, a macro, or use a specific luacas command/method so that I can compute $vAB = B - A$ (or simplify it) and print it cleanly without accessing each index manually?
- How do I typeset castling in xskak?by Reinhard Neuwirth on October 16, 2026 at 10:42 am
The obvious way to typeset castling would be 0-0 (and 0-0-0 for long castling), but \chessboard shows no sign of it, and the move record shows ZZ0-0. I have tried all sorts of options, to no avail. Puzzled. \documentclass{article} % RN. 16/10/2026 % BRIEF DESCRIPTION: % Typesetting castling moves in xskak %======================= \usepackage{xskak} \begin{document} \usetextfig \newchessgame \mainline{1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6 5.0-0} \chessboard \end{document}
- \TblrNote eats spaceby user20478285 on October 15, 2026 at 10:32 pm
\documentclass{article} \usepackage{tabularray} \UseTblrLibrary{booktabs} \begin{document} \begin{table} \centering \small \begin{talltblr}[ note{a} = {Foo!}, caption = {Some Table.} ]{colspec={ll}} \toprule A & B \\ \midrule Foo\TblrNote{a} Bar & 1 \\ Foo\TblrNote{a}~Bar & 2 \\ Foo\TblrNote{a}{} Bar & 3 \\ Foo\TblrNote{a}\ Bar & 4 \\ \bottomrule \end{talltblr} \end{table} \end{document} How can I get normal space between the words Foo and Bar (like I would with \footnote) when using \TblrNote? None of the 3 approaches I tried seems to work.
- How to make a particular exponent larger when compiling with make4ht?by wmora2 on October 15, 2026 at 4:46 pm
I'm compiling a document with make4ht (MathJax output) that contains several worked examples on indeterminate forms. In these examples, some exponents are themselves fractions or expressions, and I need to enlarge only those particular exponents, not all of them. The usual LaTeX approach — wrapping the exponent in \textstyle or \displaystyle — works fine with pdflatex, but has no effect when compiling with make4ht. Here is a minimal example: \documentclass[fontsize=18pt, paper=letter]{scrartcl} \usepackage{lmodern} \usepackage[T1]{fontenc} \usepackage{mathtools} \usepackage{amssymb,amsthm} \usepackage{latexsym,stmaryrd} \begin{document} $\displaystyle \lim_{u\rightarrow 0} \left(\dfrac{\sin u}{u}\right)^{\textstyle u^{-2}} $\\ $\displaystyle \lim_{u\rightarrow 0} \left(\dfrac{\sin u}{u}\right)^{\displaystyle u^{-2}} $\\ \end{document} I compile with: make4ht text.tex "mathml,mathjax,svg,Gin-dim" Questions: Is there a way to make make4ht preserve \displaystyle / \textstyle inside an exponent so MathJax honors it? If not, is there a recommended way (custom macro, MathJax config, CSS with a unique class, etc.) to enlarge a single exponent without affecting the rest? Is this a known limitation of make4ht's math handling? If so, is there a workaround that is robust across MathJax versions? I'm attaching two screenshots showing that the two formulas render identically despite the different style commands. Any help is appreciated. Thanks! This screenshot shows the PDF output generated with pdfLaTeX using TeX Live 2026 on Ubuntu Linux. As you can see, the exponent containing the limit is displayed at a reasonable size and is clearly readable. However, in the HTML output generated by make4ht, the same exponent appears considerably smaller after MathJax finishes rendering the expression. My goal is to make the HTML rendering look as close as possible to the pdfLaTeX output, particularly regarding the size of complex exponents. test.html https://wimate.org/test
- Can we somehow replicate the image with boy, kite, tree?by MS-SPO on October 15, 2026 at 7:47 am
Here's an other fun-competition: replicate the drawing below somehow (boy, kite, tree, i.e. WITHOUT the blue lines, intended for Mr. Pythagoras) describe your approach good enough so others can repeat it (at least try to) Forgot to put my thought in writing: Where somehow means including quite exact reproductions, as many of the first AI-answers showed, but not limited to. E.g. just using strokes would be fine as well. Use yor imagination. IF you use AI for code creation, please consider giving more, at least enough details. As indication see e.g. Explorer's answer, which improved and evolved via comments to add what's missing. Minimum I'd expect in this case: prompt (if it's just a single shot) history of prompts (if it was more an interactive work) AI-machine/-provider, AI-models used other tools used, like oh-my-pi etc. required setups etc. In the original post the drawing was included via graphicx, but wasn't uploaded. So let's take the opportunity to replicate it with your favorite approach for or with LaTeX.
- Why is an appendix referenced as chapter in TeXLive 2024 or above?by miticollo on October 15, 2026 at 3:21 am
Let's consider the following MWE \documentclass{report} \usepackage{cleveref} \begin{document} \appendix \chapter{Title}\label{t} This is a \namecref{t} \end{document} Now compile it using TeXLive 2026 and 2023. Then compare them. TeXLive 2026 TeXLive 2023 Well, I don't understand why in TeXLive 2023 (or 2022) appears appendix while in TeXLive 2024 and above is chapter. I also noticed another thing. Inspecting foo.aux I found \newlabel{t@cref}{{[chapter][1][]A}{[1][1][]1}{}{}{}} in TexLive 2026 \newlabel{t@cref}{{[appendix][1][2147483647]A}{[1][1][]1}} in TeXLive 2023 As always I compiled this MWE with latexmk -Werror -halt-on-error -file-line-error -lualatex ./foo.tex I tried also with -pdflatex but I got the same result.
- Why should I continue learning LaTeX?by Sourav on October 13, 2026 at 6:11 pm
I started learning (and using) LaTeX almost two years ago. But I see now that AI can produce the code for whatever I may want in a few seconds. This has demotivated me to continue learning more about LaTeX. Should I continue learning it ? If yes, why ? Just for the sake of enjoyment ? Or, are there more practical reasons ?
- When to create a new command vs. a code snippetby wjmccann on October 12, 2026 at 7:31 pm
I have been using VS Code in order to type up my documents in Latex, and the terminal to compile/render them. In VS Code, I have various code snippets, such as "Real Numbers": { "prefix": "RR", "body": "\\mathbb{R}", "description": "Real numbers" }, that populate \mathbb{R} whenever I type RR. However, I could have also created a new command \RR in my tex file via \newcommand that does the same thing. I was wondering if y'all had any insight into when it would be better to use one over another. Question: Are there practical reasons to prefer using \newcommand over code fill snippets, or vice versa for certain applications?
- TikZ: good method to add dimension arrowsby cis on October 11, 2026 at 6:03 pm
I would like to add dimension arrows like the ones shown here. What is the most elegant way to do this in common? (Note that I am showing an example here; however, a good general method would be interesting.) So, for instance, the dimension arrows and labels should be placed evenly and systematically. Here is my own rather clumsy attempt: \documentclass[margin=5pt, tikz]{standalone} \usepackage{tikz} \usetikzlibrary{arrows.meta} \begin{document} %% Values \pgfmathsetmacro{\R}{2.0} \pgfmathsetmacro{\a}{1.9} \pgfmathsetmacro{\b}{sqrt(\R^2 - \a^2) + \R} \pgfmathsetmacro{\x}{\R+(sqrt(2)*sqrt(\R*(2*\R-\b)) +\b -2*\R)-\b} \begin{tikzpicture}[scale=1.5, font=\footnotesize, >={Triangle[length=0pt 2*4,width=0pt 4]}, ] %% Coordinates on the main segment \coordinate[label=below:$M$] (M) at (0,0); \coordinate[label=below:$O$] (O) at (-\R,0); \coordinate[label=below:$A$] (A) at (\R,0); \coordinate[label=below:$C$] (C) at (\R-\b,0); %% Draw main segment OA \draw[] (O) -- (A); %% Solution elements on the main segment \coordinate[label=below:$X$] (X) at (\x,0); % Dimension arrows \foreach \P in {C,M,X,A}{%% \path[draw=none, shorten <=1em] (\P) -- +(0,-1.125) coordinate[pos=0.3] (\P-1) coordinate[pos=0.6] (\P-2) coordinate[pos=0.8] (\P-3) coordinate[pos=1.0] (\P-4); }%% \draw[shorten <=1em] (X) -- (X-2); \draw[<->] (C-1) -- (X-1) node[midway, fill=black!1]{$r$}; \draw[shorten <=0.25em] (M-1) -- (M-2); \draw[<->] ([yshift=0.5em]M-2) -- ([yshift=0.5em]X-2) node[midway, below]{$x$}; \draw[shorten <=1em] (C) -- (C-4); \draw[shorten <=1em] (A) -- (A-4); \draw[<->] (C-3) -- (A-3) node[midway, fill=black!1]{$b$}; %% Draw points on the axis (solution) \foreach \P in {A, X} \draw[fill=black!1] (\P) circle (1.5pt); %% Draw points on the axis (task) \foreach \P in {C, M} \draw[fill=black!1] (\P) circle (1.5pt); \draw[fill=black!1] (O) circle (1.5pt); \end{tikzpicture} \end{document}