Hot
- Replacing every period with a commaby Friedrich Falkner on October 24, 2025 at 11:42 am
I want to replace every period with a comma globally, except for the last period at the end of each footnote respectively bibliography entry. How can I do it? \documentclass[a4paper, 12pt]{scrartcl} \usepackage[ngerman]{babel} \usepackage[ backend=biber, style=musuos, doi=false, isbn=false, url=true, ]{biblatex} \renewbibmacro*{series+number}{% \setunit{\addspace}% \printtext[parens]{% \printfield{series}% \setunit*{\addspace}% \printfield{number}% \newunit}} \usepackage{xpatch} \DeclareFieldFormat{edition}{% \ifinteger{#1} {\textsuperscript{#1}} {#1\isdot\setunit{\addcomma\space}}} \renewbibmacro*{publisher+location+date}{% \printlist{location}% \iflistundef{publisher} {\setunit*{\addcomma\space}} {\setunit*{\addcolon\space}}% \printlist{publisher}% \setunit*{\addcomma\space}% \printfield{edition}% \usebibmacro{date}% \newunit} \newcommand{\replaceedition}[1]{% \xpatchbibdriver{#1} {\printfield{edition}% \newunit} {}% {} {\typeout{failed to patch driver #1}}} \replaceedition{book} \replaceedition{collection} \replaceedition{inbook} \replaceedition{incollection} \replaceedition{manual} \newcommand{\mkbibnodate}{n\adddot d\adddot} \AtEveryCitekey{\iffieldundef{labelyear}{\restorefield{labelyear}{\mkbibnodate}}{}} \AtEveryBibitem{\iffieldundef{labelyear}{\restorefield{year}{\mkbibnodate}}{}} \begin{filecontents}[force]{\jobname.bib} @Collection{Titel2000, date = {2000}, editor = {Mustermann, Max}, title = {Titel}, location = {Ort}, } @InCollection{Titel2001, author = {Mustermann, Max}, booktitle = {Buchtitel}, date = {2020}, title = {Titel}, editor = {Bauer, Agathe}, location = {Ort}, number = {1}, pages = {100--200}, series = {Reihe}, } \end{filecontents} \addbibresource{\jobname.bib} \begin{document} Zitat 1\autocite{Titel2000} und Zitat 2\autocite{Titel2001} \end{document}
- keytheorems: naming of proof environmentby Akira on October 24, 2025 at 10:55 am
I have a tex file \documentclass{amsart} \usepackage{zref-clever} \zcsetup{cap=true,comp=false,sort=false} \usepackage[hypertexnames=false]{hyperref} \hypersetup{ colorlinks=true, linkcolor=blue, } \usepackage{amssymb,keytheorems} \newkeytheoremstyle{myprf}{ inherit-style=definition, qed=$\blacksquare$, } \numberwithin{equation}{section} \newkeytheorem{theorem}[parent=section] \renewkeytheorem{proof}[numbered=no,style=myprf] \begin{document} \section{Introduction} \begin{theorem} \label{thm} If A then B. \end{theorem} \begin{proof}[Proof of \zcref{thm}] It is because ... \end{proof} \end{document} Above, I use keytheorems to create proof environment. Is it possible to have Proof of Theorem 1.1 in bold rather than the duplication Proof (Proof of Theorem 1.1)?
- Set column width using text exampleby Philipp on October 24, 2025 at 10:31 am
I’m setting multiple tables on separate pages that have two columns each using tabularx. The cells in the left columns only contain a time in the format 15:00. Since not all times are available in all tables, the left columns are not of equal width in all tables. I’m looking for a way to use the longest such time (say 00:00 in my font) as a string to define the column width for all tables so they look alike. I tried to use makebox, but that didn’t work. Minimal example that doesn’t work: \documentclass{article} \usepackage{tabularx} \begin{document} \begin{tabularx}{\textwidth}{p{\makebox{00:00}}X} 11:00 & Some text here\\ \end{tabularx} \end{document} How can I define column width using the length of a text string?
- How do I add these lines above and below the equation in the double-column format?by Dr. user44690 on October 24, 2025 at 8:25 am
I wish to add these kind of lines in latex above and below a long equation in the double column format such as the one presented here. Can someone tell me what they are called and how can I code for it in latex?
- how can I find my .tex program..an invisible backspace character in a .tex file?by Abdelhafid DIB on October 24, 2025 at 6:54 am
I can no longer find my TeX program in TeXstudio... when I compile it, the text line contains an invalid character.^^ This happens repeatedly... and they are invisible. Any help appreciated.
- fallback fonts in LuaLaTeXby murugan anbu on October 24, 2025 at 6:04 am
I need to add fallback fonts in LuaLaTeX (2023). For example, I want to use the "Source Han" font for Chinese characters if they are not available in the main font, and apply the same approach for other fonts as shown below. My MWE is below \documentclass{article} \usepackage{fontspec} \setmainfont{Arno Pro}% \setsansfont{Arial}% %%Chinese character need to render in SourceHanSerifHK-Regular.otf %%Sans Chinese character need to render in SourceHanSerifSC-Regular.otf %%emoj need to render in Segoe UI Emoj %%Adobe thai need to render in AdobeArabic-Regular.otf \begin{document} Main font Latin text → café — 漢字 — 😀 {\itshape\selectfont Latin text → café — 漢字 — 😀 -- Adobe Thai ชักศึเข้\par} {\bfseries\selectfont Latin text → café — 漢字 — 😀 -- Adobe Thai ชักศึเข้\par} {\bfseries\itshape\selectfont Latin text → café — 漢字 — 😀 -- Adobe Thai ชักศึเข้\par} \vspace*{12pt} {\sffamily Sansfont Latin text → café — 漢字 — 😀 -- Adobe Thai ชักศึเข้ {\itshape\selectfont Latin text → café — 漢字 — 😀 -- Adobe Thai ชักศึเข้\par} {\bfseries\selectfont Latin text → café — 漢字 — 😀 -- Adobe Thai ชักศึเข้\par} {\bfseries\itshape\selectfont Latin text → café — 漢字 — 😀 -- Adobe Thai ชักศึเข้\par} } \end{document}
- How to apply a combining unicode character to other math characters?by Luluio on October 24, 2025 at 3:04 am
I would like to create my own command to apply the unicode character U+0338 (Combining Long Solidus Overlay) to other characters in formulas. I know that there are a number of solutions for slash notation out there, but all of them that I found simply superimpose characters, leading to visual misalignment issues for certain characters. Using font anchors (as I believe this would do) should create better results here. I have gotten only this far (STIX Two Math has a character for U+0338): \documentclass{article} \usepackage{fontspec} \usepackage{unicode-math} \setmainfont{STIX Two Text} \setmathfont{STIX Two Math} \DeclareDocumentCommand{\slashed}{m}{\char"0338{#1}} \begin{document} \[ \slashed{D} \] \end{document} However, the "D" comes out without the slash and issues the following warning instead: Missing character: There is no ̸ (U+0338) in font cmmi10! Why does it check the Computer Modern font for the character? Also, since I have not worked a lot with inserting unicode characters like this before: Is there an issue with my command?
- Add today's date manuallyby bakhta marouf on October 24, 2025 at 1:38 am
I want to add today's date, for example 10/26/2025 How do I do that? \documentclass[20pt,margin=1in,innermargin=-4.5in,blockverticalspace=-0.25in]{tikzposter} \geometry{paperwidth=33.11in,paperheight=46.81in} %A0 % \geometry{paperheight=33.11in,paperwidth=23.4in} %A1 \usepackage[utf8]{inputenc} \usepackage{csquotes} %\usepackage[estonian]{babel} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amsthm} \usepackage{amssymb} \usepackage{mathrsfs} \usepackage{graphicx} \usepackage{lipsum} \usepackage[export]{adjustbox} \usepackage{enumitem} \usepackage[backend=biber,style=numeric]{biblatex} \usepackage{unitartu-theme} \makeatletter \setlength{\TP@visibletextwidth}{31.0in} \setlength{ \TP@visibletextheight}{45in} \makeatother \usepackage{mwe} % for placeholder images \usepackage{bm} \usepackage{bbm} \addbibresource{refs.bib} % set theme parameters \tikzposterlatexaffectionproofoff \usetheme{UniTartuTheme} \usecolorstyle{UniTartuStyle} \usepackage[scaled]{helvet} \renewcommand\familydefault{\sfdefault} \renewcommand{\vec}[1]{\bm{#1}} \newcommand{\Tr}{\text{Tr}} \usepackage[T1]{fontenc} %********************************************* added <<<<<< \makeatletter \settitle{\vspace*{-10mm} %setup the title <<<<<<<<<<<<<<< \centering \vbox{% \@titlegraphic \\[\TP@titlegraphictotitledistance] \centering \color{titlefgcolor} {\bfseries \Huge \sc \@title \par} \vspace*{1em} {\huge \@author \par} \vspace*{1em} {\LARGE \@institute} }} \makeatother %***************************************************** \title{\parbox{0.8\linewidth}{UniTartuCS Poster Template - Example of a long title for a poster}} \author{\textbf{John Smith}\textsuperscript{1}} \institute{\textsuperscript{1}Institute of Computer Science, University of Tartu} \titlegraphic{\includegraphics[width=\linewidth]{CONF-IOCFF-2026.jpg}} %changed. Use your bannwer <<<<<<<<<< % begin document \begin{document} \maketitle \centering \begin{columns} \column{0.5} \block{Section 1}{ \lipsum[30] \begin{align*} \includegraphics[width=0.1\textwidth,valign=c]{example-image-a.jpg} % changed for this example \end{align*} \lipsum[10] \begin{align*} x = \frac{-b \pm\sqrtsign{b^2 - 4ac}}{2a}. \end{align*} \lipsum[20] } \block{Section 2}{ \lipsum[100] \lipsum[100] \lipsum[100] \lipsum[100] \lipsum[100] \lipsum[100] \lipsum[100] \lipsum[100] } \column{0.5} \block{Section 3}{ \lipsum[100] \lipsum[100] \textcolor{MainBlue}{\lipsum[100]} \lipsum[100] \lipsum[100] \lipsum[100] \lipsum[100] } \block{Conclusions}{ \lipsum[100] \cite{dirac} \cite{knuthwebsite} \lipsum[100] \lipsum[100] } \block{References}{ \lipsum[100] \lipsum[100] \begin{center} \mbox{}\vspace{-1\baselineskip} \printbibliography[heading=none] \end{center} } \end{columns} \end{document}
- Add a relative sized and stretching spaceby HerpDerpington on October 23, 2025 at 11:08 pm
Normally, the spaces in a line can stretch and expand, see for example \documentclass{article} \usepackage{showframe} \setlength{\parindent}{0pt} \begin{document} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed eiusmod tempor ii \par Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed eiusmod tempor iin \par Lorem {} ipsum dolor sit amet, consectetur adipiscing elit, sed eiusmod tempor ii \end{document} which becomes In the last example, I added a double space which should, by construction, always have the size of twice the space on that line, regardless of how it is stretched. This is because it is exactly two spaces with an empty word inbetween. This of course trivially extends to all integer number of spaces. My question is whether this can be generalized to fractional spaces. Thus, the task is for example: Insert a 1.5 space-wide whitespace between two letters in such a way that if the line is expanded or contracted, the space remains 1.5 spaces wide. My idea: Access the \fontdimen2, 3 and 4 to determine how much a space may contract and insert \hskip 1.5\spacewidth plus 1.5\spacestretchplus minus \spacestretchminus\relax. However, it is not clear to me whether this guarantees that this inserted space is always 1.5 times the width of the space on that line.
- Tabular reproductionby Fractal on October 23, 2025 at 9:08 pm
I'm trying to reproduce this table, and I'm having trouble. What I tried : \documentclass{article} \usepackage[margin=1.7cm]{geometry} \usepackage{xcolor} % -------------------------- Tableaux ------------------------ \usepackage{array,booktabs,tabularx,multirow,colortbl} \begin{document} {% \renewcommand{\arraystretch}{1.18}% \setlength{\arrayrulewidth}{0.6pt}% \definecolor{acctHead}{RGB}{245,199,26} % jaune d’en-tête \begin{tabularx}{\linewidth}{| >{\centering\arraybackslash}p{2.6cm} | >{\arraybackslash}X | >{\raggedleft\arraybackslash}p{2.9cm} | >{\raggedleft\arraybackslash}p{2.9cm} |} \hline \rowcolor{acctHead} \makecell[c]{\bfseries N° de\\ \small comptes} & \bfseries Intitulé des comptes & \multicolumn{2}{c|}{\bfseries Soldes} \\\hline \rowcolor{acctHead} \multicolumn{2}{|c|}{} & \bfseries Soldes débiteurs & \bfseries Soldes créditeurs \\\hline 6111 & Achats de marchandises & 600\,000 & \\\hline 6119 & RRR obtenus sur achats de marchandises & & 45\,000 \\\hline 6121 & Achats de matières premières & 700\,000 & \\\hline 6125 & Achats non stockés de matières et fournitures & 18\,000 & \\\hline 6129 & RRR obtenus sur achats de matières et fournitures & & 28\,000 \\\hline 7121 & Ventes de produits finis & & 1\,200\,000\\\hline 7129 & RRR accordés par l’entreprise & 80\,000 & \\\hline \end{tabularx} }% fin groupe \end{document} The result :
- How to compile front matter without the document body?by drl on October 23, 2025 at 8:44 pm
In my custom class, I would like to compile separately the front matter of a document and generate the whole document itself (with the front matter in it). Is there a way to remove the content of the document, i.e. between \begin{document} and \end{document}, in order to only get the front matter? Here's an MWE class: \NeedsTeXFormat{LaTeX2e} \ProvidesClass{TestReportClass}[2025/10/23 v0.0.1 Test class] \LoadClass{report} %option [frontmatter] used by the ShellEscape \newif\iffrontmatteroption \DeclareOption{frontmatter}{\frontmatteroptiontrue} \ProcessOptions\relax \RequirePackage{shellesc} \RequirePackage[realmainfile]{currfile} \newcommand\myabstract[1]{\def\@myabstract{#1}} %Generate the second document containing only the front matter and with a different layout \ifdefined\frontmattercompiled\else \ShellEscape{latexmk -jobname="Front matter" -pdfxe -xelatex='xelatex -shell-escape -jobname="Front matter" -interaction=nonstopmode -synctex=1 "\string\gdef\string\frontmattercompiled{}\string\PassOptionsToClass{frontmatter}{TestReportClass}\string\input{"\currfilebase"}"' \currfilebase} \frontmatteroptionfalse \fi %Custom command to generate the 2 front matter layouts \renewcommand{\maketitle}{% \raggedright \noindent \iffrontmatteroption \@author \par Abstract: \par \@myabstract \else \@title \par \@author \par \@date \fi } \AtBeginDocument{% \maketitle } and here's a sample document: \usepackage{lipsum} \title{TestRemoveDocContent} \author{John Smith} \date{October 2025} \myabstract{\lipsum[1]} \begin{document} \chapter{Introduction} \lipsum[1-4] \end{document}
- How do I get thumbs to show only on the right hand/odd pages?by Andre on October 23, 2025 at 8:13 pm
I am trying to get thumbs to appear only on the right hand/odd pages. Right now thumbs appear on both sides. I currently have this piece of code to make the thumbs: \usepackage[height={2cm},distance={5mm},topthumbmargin={auto},bottomthumbmargin={auto}]{thumbs} \newcommand{\thumbforchapter}{ \addthumb{Chapter \thechapter}{\Huge{\thechapter}}{white}{thumbcolor} } I'm using \documentclass[11pt,b5paper]{book} and I put \thumbforchapter once at the start of each chapter. I feel I am missing a simple setting somewhere. How do I get thumbs only on odd pages?
- Definition name showing up on page headerby Miguel N. on October 23, 2025 at 7:30 pm
In my dissertation, I've made some customizations to the page header with fancyhdr: \renewcommand{\chaptermark}[1]{\markboth{\thechapter.\ #1}{}} \fancypagestyle{fancy}{ \fancyhf{} \fancyheadoffset{0cm} \setlength{\headheight}{1.1cm+12pt} \renewcommand{\headrulewidth}{1pt} \renewcommand{\footrulewidth}{0pt} \fancyhead[CE]{\begin{minipage}[b]{.9\linewidth}\begin{center} {\large Capítulo \leftmark} \end{center} \end{minipage}} \fancyhead[CO]{\begin{minipage}[b]{.8\linewidth} \begin{center} {\large \titulo} \end{center} \end{minipage}} \fancyhead[RE, RO]{\thepage} } These have led to a rather odd bug: some definition headers end up on the page header, as you can see here: Definition 3.1.9 doesn't even show up on page 76, rather it shows up on page 77, but that header is fine. My definitions were created with thmtools, as such: \declaretheorem[style=definition, name=Definição, qed=\downtriangle, sibling=teorema]{definicao} This very same issue happens on page 89, with the dissertation title on the header, and again the offending definition is only present on the following page. I tried asking ChatGPT about this issue, but the solution that it provided, claiming it solved "~99% of cases of this bug", did absolutely nothing. Eventually I did find a bizarre solution: adding the \leftmark command to a new paragraph just about anywhere that gets rendered on page 76, but this would leave me with the contents of \leftmark on the middle of the page, so I tried to do: \phantom{\leftmark} \vspace{-\baselineskip} Which broke again, I figured that the fact the entire line got \vspace'd out of existence meant that some LaTeX optimization mechanism just deleted it, I figured then if I were to add just a tiny amount of space maybe that would not happen, so I tried: \phantom{\leftmark} \vspace{0.1cm-\baselineskip} Which worked. But this solution does not explain to me what is happening or why, so this is why I'm here writing this question. Any insight would be greatly appreciated, as I fear this massive bodge may not be the most robust solution ever. I would like to add a MWE to better show the issue, but as this only happens twice on a 140 page document, I do believe the only MWE possible would be my entire dissertation.
- How to display per-chapter endnotes with correct bidirectional hyperlinks and custom section titles in TeX Live 2024–2025 (enotez + hyperref)by Jon Andoni Gomez on October 23, 2025 at 6:42 pm
I’m trying to organize endnotes per chapter with clickable hyperlinks in both directions (text → note and note → text) in a book project compiled with pdfLaTeX / TeX Live 2025. I use the enotez package together with hyperref. I want each chapter to have its own endnote counter (starting from 1) and, at the end of the document, all notes grouped under a final section titled AMAI-OHARRAK (Basque for Endnotes), showing custom section titles such as HITZAURREA, SARRERA, KAPITULUA 1, EPILOGOA, etc. ✅ What already works Notes appear correctly at the end of the document. Counters restart at each chapter. Hyperlinks from text → note work correctly (except in some chapters). Layout and typography compile cleanly in TeX Live 2025 (no obsolete split=chapter). ⚠️ Remaining problem Hyperlinks from note → text do not return to the correct position in chapters 1–N. They often jump back to the SARRERA chapter instead. In an earlier MWE (mwe_conservador_v2.tex), the reverse links worked perfectly, but the section titles of endnotes were wrong or undefined (\enotez@listname@chapter undefined). In newer versions (using the recommended modern syntax), titles work but reverse links break. So there seems to be a subtle conflict between hyperref anchor creation and how enotez labels the individual notes when split per chapter. Example MWE (fully compilable with pdfLaTeX / TeX Live 2025) \documentclass[12pt,openright,twoside]{book} \usepackage[T1]{fontenc} \usepackage{libertinus} \usepackage[english,basque]{babel} \usepackage{csquotes} \usepackage{hyperref} \usepackage{enotez} % Modern setup (no split=chapter) \setenotez{ list-heading = \section*{#1}, backref = true, reset = chapter, mark = \textsuperscript, numbering = per-chapter, } \begin{document} \tableofcontents \chapter*{HITZAURREA} Text in the prologue.\endnote{Note in the Hitzaurrea.} More text.\endnote{Second note in the Hitzaurrea.} \chapter{SARRERA} Introductory text.\endnote{Note in Sarrera.} \chapter{KAPITULUA 1} Text in first chapter.\endnote{First note in Kapitulua 1.} More text.\endnote{Second note in Kapitulua 1.} \chapter{KAPITULUA 2} Text in second chapter.\endnote{Note in Kapitulua 2.} \chapter*{EPILOGOA} Final text.\endnote{Note in Epilogue.} \cleardoublepage \chapter*{\centering\Large AMAI-OHARRAK} \printendnotes \end{document} What I would like to achieve Correct bidirectional hyperlinks in all chapters (text ↔ note). Custom headings for each group of notes (HITZAURREA, SARRERA, KAPITULUA 1, etc.). Full compatibility with hyperref and TeX Live 2024–2025 (no deprecated macros). Related observations The issue seems related to the internal anchor naming of enotez (\theHchapter or similar). In older releases, split=chapter worked but is now obsolete in TeX Live 2024+. The reverse links point to the first \theenmark anchor defined in the document (the one in SARRERA). Has anyone found a modern, fully functional setup for enotez + hyperref achieving this? Any help would be greatly appreciated! (This question was prepared with the assistance of ChatGPT for clarity and completeness.)
- Adjusting line spacing in table of content for amsbooks (plus having two tables of contents)by Andy Putman on October 23, 2025 at 5:58 pm
I'm writing a book with using amsbooks. I would like to have two tables of contents: One that just lists the parts and chapters, but does not include sections. A second more detailed one that lists parts, chapters, and sections. Just including two \tableofcontents with different tocdepth's doesn't seem to work: the second is empty. I'll include a minimal working example below. Before giving it, there is another related issue. In the shorter table of contents, there is a space between every chapter. What I'd prefer is for there to be a space between each part, but no spaces between the chapters in each part. However, I like the default spacing for the detailed table of contents. Here is a minimal (non)-working example: \documentclass{amsbook} \begin{document} \setcounter{tocdepth}{0} \tableofcontents \setcounter{tocdepth}{1} \tableofcontents \part{First part} \chapter{First chapter of first part} \section{A section} \section{Another section} \chapter{Second chapter of first part} \section{A section} \section{Another section} \part{Second part} \chapter{First chapter of second part} \section{A section} \section{Another section} \chapter{Second chapter of second part} \section{A section} \section{Another section} \end{document}
- Issue with APA citation styleby Gautam Shahi on October 23, 2025 at 5:43 pm
I am using the main.tex for my thesis on Overleaf, and everything is correct except the APA citation. In the current form, the citation is printing in the text as (P. Arora 2019) instead of (Arora, P. 2019). I have tried multiple options, even suggested at ! LaTeX Error: Option clash for package biblatex. while there is no duplicate of code All other formats work except APA, like (Arora, P. 2019) or Gautam Kishore Shahi, Basyurt, et al. 2024) (should be Shahi, G.K. et al. 2024). The citations look wrong. Am I doing anything wrong? \usepackage{times} \usepackage[utf8]{inputenc} \usepackage{caption} \usepackage{amsmath,amsthm,amssymb,amsfonts} \usepackage{comment} \usepackage{svg} \usepackage{multirow} \usepackage{rotating, graphicx} \usepackage{tabularx} \usepackage{ragged2e} \usepackage{textcomp} \usepackage{titletoc} \usepackage{listings} \usepackage{setspace} \usepackage[normalem]{ulem} \useunder{\uline}{\ul}{} \usepackage{hyperref} \usepackage{xcolor} \usepackage{titlesec} \usepackage{fancyhdr} \usepackage{tocloft} \usepackage{chngcntr} % For counter control \usepackage{todonotes} \usepackage{subcaption} % add this in your preamble \usepackage[ backend=biber, style=alphabetic, citestyle=authoryear ]{biblatex} \DeclareLanguageMapping{english}{english-apa} \addbibresource{references.bib} % Page numbering customization \pagestyle{fancy} \fancyhf{} \fancyfoot[R]{\thepage} \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} % Redefine the plain page style (used by ToC, LoF, LoT) \fancypagestyle{plain}{ \fancyhf{} % Clear headers and footers \fancyfoot[R]{\thepage} % Place page numbers on the bottom-right } % Configure hyperref \hypersetup{ colorlinks=true, linkcolor=black, filecolor=black, urlcolor=blue, citecolor=black, } % Use the same style for URLs as the text \urlstyle{same} % Customizing the appearance of the Table of Contents (ToC), List of Figures (LoF), and List of Tables (LoT) \setstretch{1.5} \renewcommand{\cfttoctitlefont}{\bfseries\fontsize{14}{16}\selectfont} % ToC title font size \renewcommand{\cftloftitlefont}{\bfseries\fontsize{14}{16}\selectfont} % LoF title font size \renewcommand{\cftlottitlefont}{\bfseries\fontsize{14}{16}\selectfont} % LoT title font size \renewcommand{\cftdotsep}{1} % Dot spacing in ToC, LoF, LoT \renewcommand{\cftchapdotsep}{\cftdotsep} \renewcommand{\cftchapfont}{\normalfont} \renewcommand{\cftchappagefont}{\normalfont} \renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}} % Adjust indentation and spacing \setlength{\cftchapindent}{0pt} % No indent for chapter titles \setlength{\cftsecindent}{1em} % Indent for section titles \setlength{\cftsubsecindent}{3em} % Indent for subsection titles \setlength{\cftbeforechapskip}{0.1 em} \setlength{\cftbeforesecskip}{0.1 em} \setlength{\cftbeforesubsecskip}{0.1 em} \iffalse % Customize figures and tables in ToC \renewcommand{\cftfigfont}{\fontsize{12}{14}\selectfont} \renewcommand{\cfttabfont}{\fontsize{12}{14}\selectfont} \renewcommand{\cftfigpresnum}{Figure~} % Prefix for figure numbers \setlength{\cftfignumwidth}{4.75em} % Space for figure numbers \renewcommand{\cftfigaftersnum}{:~} % Formatting after figure numbers \renewcommand{\cfttabpresnum}{Table~} % Prefix for table numbers \setlength{\cfttabnumwidth}{4.75em} % Space for table numbers \renewcommand{\cfttabaftersnum}{:~} % Formatting after table numbers \fi % Remove chapter number from figure/table numbering \renewcommand{\thefigure}{\arabic{figure}} \renewcommand{\thetable}{\arabic{table}} \counterwithout{figure}{chapter} \counterwithout{table}{chapter} % Customize appearance in List of Figures and Tables \renewcommand{\cftfigfont}{\fontsize{12}{14}\selectfont} \renewcommand{\cfttabfont}{\fontsize{12}{14}\selectfont} \renewcommand{\cftfigpresnum}{Figure~} \setlength{\cftfignumwidth}{4.75em} \renewcommand{\cftfigaftersnum}{:~} \renewcommand{\cfttabpresnum}{Table~} \setlength{\cfttabnumwidth}{4.25em} \renewcommand{\cfttabaftersnum}{:~} % Page Margins \usepackage[a4paper, left=1.5in, % Left margin right=1in, % Right margin top=1in, % Top margin bottom=1in % Bottom margin ]{geometry} % Left-align captions \captionsetup{justification=raggedright, singlelinecheck=false} % Left-align captions % Customize indentation for subsections and sub-subsections \setcounter{tocdepth}{3} % Include subsubsections in the Table of Contents \setlength{\cftsubsecindent}{2.4em} % Indent subsections by 2.4em \setlength{\cftsubsubsecindent}{3.4em} % Indent sub-subsections by 6em % Customize the section font \usepackage{sectsty} % For section style customization \usepackage{times} % For Times New Roman font \usepackage[utf8]{inputenc} % For proper encoding \usepackage[T1]{fontenc} % For proper font encoding \sectionfont{\fontsize{12}{14}\selectfont\rmfamily\textbf} \subsectionfont{\fontsize{12}{14}\selectfont\rmfamily\textit} \subsubsectionfont{\fontsize{12}{14}\selectfont\rmfamily\textit} % Customize chapter formatting \titleformat{\chapter}[block] {\normalfont\bfseries\fontsize{14}{16}\selectfont\rmfamily\raggedright} {CHAPTER \thechapter:}{0pt} {} \titlespacing*{\chapter}{0pt}{0pt}{0pt} \setcounter{secnumdepth}{3} % Enable subsubsection numbering \begin{document} \makeatletter \renewcommand\subsubsection{% \@startsection{subsubsection}{2}{0pt}{-\baselineskip}{0.25\baselineskip}% {\setlength{\parindent}{0pt}\fontsize{12}{14}\selectfont\rmfamily\textit}% } \makeatother % Include the front matter such as Title Page, Abstract, Table of Contents, List of Figures, List of Tables, Preface, Acknowledgments, Declaration, Dedication, Acronyms, and Nomenclature % Title Page \input{title page} % Front Matter Pages \input{Front Matter Pages/acknowledgments} \input{Front Matter Pages/TOC_LOF_LOT} %\input{Front Matter Pages/preface} %\input{Front Matter Pages/declaration} %\input{Front Matter Pages/dedication} \input{Front Matter Pages/acronyms} %\input{Front Matter Pages/nomenclature} %\input{Front Matter Pages/listofpublications} \input{Front Matter Pages/abstract_de} \input{Front Matter Pages/abstract_en} % All the chapters are stored in a separate folder (chapters) % Include Chapter 1 \input{chapters/Introduction} % Include Chapter 2 \input{chapters/Background} % Include Chapter 3 \input{chapters/ResearchDesign} % Include Chapter 4 \input{chapters/ResearchResults} % Include Chapter 5 \input{chapters/DiscussionandImplications} % Include the End Matter Pages % References or bibliography \input{End Matter Pages/references} % Appendix section for additional materials %\input{End Matter Pages/appendix} %\bibliography{references} \end{document} ```
- tikz-feynman flipping verticesby Beth Long on October 23, 2025 at 5:31 pm
I tried compiling the basic feynman diagram from here but I get the input vertices inverted. I expect: But I get: The code: \documentclass[a4paper,12pt]{article} \usepackage[compat=1.0.0]{tikz-feynman} \begin{document} \feynmandiagram [horizontal=a to b] { i1 -- [fermion] a -- [fermion] i2, a -- [photon] b, f1 -- [fermion] b -- [fermion] f2, }; \end{document} I'm compiling with pdfLaTeX and LuaLaTeX using \usepackage[compat=1.0.0]{tikz-feynman} in LaTeXiT
- Latexdiff handle \newcommandby Dschoni on October 23, 2025 at 5:19 pm
I'm defining macros in my document, that I use to replace expressions in my document. RevA.tex: \documentclass{scrartcl} \newcommand*{\Revision}{A} \begin{document} \Revision \end{document} I would want latexdiff to markup all changes in my documents, so, e.g. if I change the second line to \newcommand*{\Revision}{B} in RefB.tex, I would want each usage of \Revision in my document to show up in the diff. So for above example, I'd expect a document with a red strike-out A and a blue B when running latexdiff RevA.tex RevB.tex > diff.tex Such as the document produced by this diff snippet: \DIFdelbegin \DIFdel{A }\DIFdelend \DIFaddbegin \DIFadd{B }\DIFaddend How can I achieve this?
- TeX capacity exceeded with xsim and tikzby Aradnix on October 23, 2025 at 5:09 pm
I am working on this document for a remote assistance session, but I cannot identify what is triggering the error. Commenting out two of the three exercises allows the compilation to work fine, but adding a second exercise results in the following error: ! TeX capacity exceeded, sorry [input stack size=10000]. \g__xsim_list_system_seq ..._xsim_list_system_seq \__seq_item:n {exercise-1=... l.153 \end This happens when using Overleaf and when compiling locally on my machine with a few days' worth of updates to TeXlive. The critical packages are xsim and TikZ. I have seen similar problems in previous queries, but I cannot find an answer that applies to my situation. I apologise in advance if I have overlooked it. Ignoring irrelevant packages, my code is as follows: \documentclass{scrartcl} \KOMAoptions{ fontsize=12pt, paper=letter, DIV=calc, headings=normal, titlepage=false, parskip=half- } \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[spanish,mexico]{babel} \usepackage{amsmath} \usepackage{mathtools} \usepackage[vfrac]{mathfixs} \usepackage{xsim} % Configuración de xsim \xsimsetup{ exercise/name = Ejercicio, solution/name = Solución, exercise/within = section, exercise/the-counter = \arabic{exercise}, solution/print = true } \usepackage{tikz} \usetikzlibrary{shapes,arrows,positioning} \begin{document} Resuelve los sistemas de dos ecuaciones con el método gráfico. Despeja la $y$ de cada ecuación, después sustituye los valores de $x$ que se indican en cada inciso para obtener las coordenadas de las dos rectas. \begin{exercise}[system=a] \begin{equation*} \begin{cases} 4x-4y=12\\ 3x+5y=25 \end{cases} \end{equation*} $x=5$ y $x=7$ \end{exercise} \begin{solution} \minisec{Paso 1:} Expresar ambas ecuaciones en la forma $y=mx+b$. Para la primera ecuación: \begin{align*} 4x - 4y &= 12 \\ -4y &= -4x + 12 \\ y &= x - 3 \end{align*} Para la segunda ecuación: \begin{align*} 3x + 5y &= 25 \\ 5y &= -3x + 25 \\ y &= -\dfrac{3}{5}x + 5 \end{align*} \minisec{Paso 2:} Evaluar en los valores dados: Para $y = x - 3$: \begin{align*} x = 5 &\Rightarrow y = 5 - 3 = 2 \\ x = 7 &\Rightarrow y = 7 - 3 = 4 \end{align*} Para $y = -\vfrac{3}{5}x + 5$: \begin{align*} x = 5 &\Rightarrow y = -\dfrac{3}{5}(5) + 5 = -3 + 5 = 2 \\ x = 7 &\Rightarrow y = -\dfrac{3}{5}(7) + 5 = -\dfrac{21}{5} + 5 = -4.2 + 5 = 0.8 \end{align*} \minisec{Paso 3:} Coordenadas de los puntos: Primera recta: $(5,2)$ y $(7,4)$ Segunda recta: $(5,2)$ y $(7,0.8)$ \textbf{Paso 4:} Representación gráfica \begin{center} \begin{tikzpicture}[scale=1.0] \draw[gray!30] (0,0) grid (10,6); \draw[->] (0,0) -- (10,0) node[right] {$x$}; \draw[->] (0,0) -- (0,6) node[above] {$y$}; \foreach \x in {0,1,...,9} \draw (\x,0.1) -- (\x,-0.1) node[below] {\x}; \foreach \y in {0,1,...,5} \draw (0.1,\y) -- (-0.1,\y) node[left] {\y}; % Primera recta (roja) \draw[red, thick] (0,-3) -- (10,7); \fill[red] (5,2) circle (3pt); \fill[red] (7,4) circle (3pt); \node[red, right] at (7,4) {$y=x-3$}; % Segunda recta (azul) \draw[blue, thick] (0,5) -- (10,-1); \fill[blue] (5,2) circle (3pt); \fill[blue] (7,0.8) circle (3pt); \node[blue, right] at (7,0.8) {$y=-\dfrac{3}{5}x+5$}; % Punto de intersección \fill[teal] (5,2) circle (3pt); \node[teal, above right] at (5,2) {$(5,2)$}; \end{tikzpicture} \end{center} \textbf{Paso 5:} Punto de intersección El punto de intersección es $(5,2)$, que es la solución del sistema. \end{solution} \begin{exercise}[system=b] \[ \begin{cases} x-y=1\\ x+y=7 \end{cases} \] $x=3$ y $x=5$ \end{exercise} \begin{solution} \minisec{Paso 1:} Expresar en forma $y=mx+b$ Para la primera ecuación: \begin{align*} x - y &= 1 \\ -y &= -x + 1 \\ y &= x - 1 \end{align*} Para la segunda ecuación: \begin{align*} x + y &= 7 \\ y &= -x + 7 \end{align*} \minisec{Paso 2:} Evaluar en los valores dados Para $y = x - 1$: \begin{align*} x = 3 &\Rightarrow y = 3 - 1 = 2 \\ x = 5 &\Rightarrow y = 5 - 1 = 4 \end{align*} Para $y = -x + 7$: \begin{align*} x = 3 &\Rightarrow y = -3 + 7 = 4 \\ x = 5 &\Rightarrow y = -5 + 7 = 2 \end{align*} \minisec{Paso 3:} Coordenadas de los puntos Primera recta: $(3,2)$ y $(5,4)$ Segunda recta: $(3,4)$ y $(5,2)$ \minisec{Paso 4:} Representación gráfica \begin{center} \begin{tikzpicture}[scale=1.0] \draw[gray!30] (0,0) grid (8,8); \draw[->] (0,0) -- (8,0) node[right] {$x$}; \draw[->] (0,0) -- (0,8) node[above] {$y$}; \foreach \x in {0,1,...,7} \draw (\x,0.1) -- (\x,-0.1) node[below] {\x}; \foreach \y in {0,1,...,7} \draw (0.1,\y) -- (-0.1,\y) node[left] {\y}; % Primera recta (roja) \draw[red, thick] (0,-1) -- (8,7); \fill[red] (3,2) circle (3pt); \fill[red] (5,4) circle (3pt); \node[red, right] at (5,4) {$y=x-1$}; % Segunda recta (azul) \draw[blue, thick] (0,7) -- (8,-1); \fill[blue] (3,4) circle (3pt); \fill[blue] (5,2) circle (3pt); \node[blue, right] at (5,2) {$y=-x+7$}; % Punto de intersección \fill[teal] (4,3) circle (3pt); \node[teal, above right] at (4,3) {$(4,3)$}; \end{tikzpicture} \end{center} \minisec{Paso 5:} Punto de intersección Resolviendo el sistema: \begin{align*} x - y &= 1 \\ x + y &= 7 \\ 2x &= 8 \Rightarrow x = 4 \\ 4 + y &= 7 \Rightarrow y = 3 \end{align*} El punto de intersección es $(4,3)$, que es la solución del sistema. \end{solution} \begin{exercise}[system=c] \[ \begin{cases} 5x-y=-1\\ -x+2y=0 \end{cases} \] $x=-2$ y $x=2$ \end{exercise} \begin{solution} \minisec{Paso 1:} Expresar en forma $y=mx+b$ Para la primera ecuación: \begin{align*} 5x - y &= -1 \\ -y &= -5x - 1 \\ y &= 5x + 1 \end{align*} Para la segunda ecuación: \begin{align*} -x + 2y &= 0 \\ 2y &= x \\ y &= \frac{1}{2}x \end{align*} \minisec{Paso 2:} Evaluar en los valores dados Para $y = 5x + 1$: \begin{align*} x = -2 &\Rightarrow y = 5(-2) + 1 = -10 + 1 = -9 \\ x = 2 &\Rightarrow y = 5(2) + 1 = 10 + 1 = 11 \end{align*} Para $y = \frac{1}{2}x$: \begin{align*} x = -2 &\Rightarrow y = \dfrac{1}{2}(-2) = -1 \\ x = 2 &\Rightarrow y = \dfrac{1}{2}(2) = 1 \end{align*} \minisec{Paso 3:} Coordenadas de los puntos Primera recta: $(-2,-9)$ y $(2,11)$ Segunda recta: $(-2,-1)$ y $(2,1)$ \minisec{Paso 4:} Representación gráfica \begin{center} \begin{tikzpicture}[scale=0.9] \draw[gray!30] (-4,-10) grid (4,12); \draw[->] (-4,0) -- (4,0) node[right] {$x$}; \draw[->] (0,-10) -- (0,12) node[above] {$y$}; \foreach \x in {-4,-3,...,3} \draw (\x,0.1) -- (\x,-0.1) node[below] {\x}; \foreach \y in {-10,-8,...,10} \draw (0.1,\y) -- (-0.1,\y) node[left] {\y}; % Primera recta (roja) \draw[red, thick] (-3,-14) -- (3,16); \fill[red] (-2,-9) circle (3pt); \fill[red] (2,11) circle (3pt); \node[red, right] at (2,11) {$y=5x+1$}; % Segunda recta (azul) \draw[blue, thick] (-4,-2) -- (4,2); \fill[blue] (-2,-1) circle (3pt); \fill[blue] (2,1) circle (3pt); \node[blue, right] at (2,1) {$y=\dfrac{1}{2}x$}; % Punto de intersección \fill[teal] (-0.222,-0.111) circle (3pt); \node[teal, above left] at (-0.222,-0.111) {$(-\vfrac{2}{9},-\vfrac{1}{9})$}; \end{tikzpicture} \end{center} \minisec{Paso 5:} Punto de intersección Resolviendo el sistema: \begin{align*} 5x - y &= -1 \\ -x + 2y &= 0 \Rightarrow x = 2y \\ 5(2y) - y &= -1 \\ 10y - y &= -1 \\ 9y &= -1 \Rightarrow y = -\dfrac{1}{9} \\ x &= 2(-\dfrac{1}{9}) = -\dfrac{2}{9} \end{align*} El punto de intersección es $(-\vfrac{2}{9},-\vfrac{1}{9})$, que es la solución del sistema. \end{solution} \end{document} What do I need to change to compile this document correctly?
- Final token number counter of TeX's mouth?by Explorer on October 23, 2025 at 4:12 pm
I can't guarantee that my statement is completely accurate here, if there exists some error, feel free to point out and edit. My question is as below(something like counting token, but I want to count that in TeX's mouth): \documentclass{article} \parindent=0pt \ExplSyntaxOn % https://tex.stackexchange.com/a/748243/322482 \NewExpandableDocumentCommand{\counttokens}{sm} {% *-version only counts items, ignoring spaces and treating braced groups as one % #2 = tokens to be counted \IfBooleanTF{#1}{\tl_count:n {#2}}{\tl_count_tokens:n {#2}} } \ExplSyntaxOff \begin{document} $\frac12$ $\sqrt\frac12$ \counttokens* a+b % \counttokens only gobble "a", so I want number of item = 1 , and extra "+b" here \counttokens*{a+b} % \counttokens gobbles "a+b", so I want number of item = 3 \counttokens*{\frac12} % because \frac12, in \frac, it needs two arguments, here is "1" and "2", so "\frac12" is regarded as a whole, so I want the number = 1 \counttokens*{\frac{1}{2}} % same, I want number = 1 \counttokens*{\sqrt\frac12} % because \sqrt also takes one argument, and "\frac12" is as a whole, I also want number = 1 here \end{document} Is that possible or easy to achieve with expl3? Maybe the paraphase of my desired result is still in vague, if needed, ask my to edit, thanks in advance. Edited to prevent a xy-problem: I want to automatical add \lvert and \rvert in \mysqrt, if the concept of "number of the final elements in TeX's mouth"(I really don't know how to describe... sob for this) \documentclass{article} \begin{document} I want \verb|$\mysqrt{a}$| to be $\sqrt{a}$ number = 1 I want \verb|$\mysqrt{a+b}$| to be $\sqrt{|a+b|}$ number = 3 I want \verb|$\mysqrt{\frac12}$| to be $\sqrt{\frac12}$ number = 1 I want \verb|$\mysqrt{\frac{1}{2}}$| to be $\sqrt{\frac{1}{2}}$ number = 1 I want \verb|$\mysqrt{\frac{1}{2}+a}$| to be $\sqrt{|\frac{1}{2}+a|}$ number = 3 % ("\frac{1}{2}" as a whole, and "+" and "a", total 3) \end{document} If the concept of "number of the final elements in TeX's mouth" is greater than 1, I want \mysqrt to automatically add | left and right. Edited again: What is the meaning of "in the mouth" or "final", that is in the PDF: If something is finally shown 3, one "element", I want 1 if finally shown ½, also in form of one "element", I want 1 if finally shown ½+1 there is three "element" here, I want 3 But if as David commented, this concept of "element number" is not the way TeX handles: The number you are trying to get does not exist in TeX's normal workflow and seems completely useless for any typeset uses Then this post would be useless, I would consider to delete it in 12 hours.
- Dashed boxes with fractions [duplicate]by Danya Zh on October 23, 2025 at 3:43 pm
I want to use a dashed box, instead of a regular one in the following example: \documentclass{article} \usepackage[T1]{fontenc} \usepackage{mathtools,amssymb} \begin{document} Applying the Euler's formula we obtain \begin{equation*} \frac{e^{(2n+1)i\theta} - e^{i\theta}}{e^{2i\theta}-1} \;\Rightarrow\; \boxed{ \frac{\bigl(\cos([2n+1]\theta)+i\sin([2n+1]\theta)\bigr) - \bigl(\cos(\theta)+i\sin(\theta)\bigr)} {\cos(2\theta)+i\sin(2\theta)-1} } \end{equation*} \end{document} I've tried using dahsbox package, as well as the following colorbox script I borrowed from a tread on the subject \usepackage[most]{tcolorbox} \newtcbox{\dashedbox}[1][]{equal height group=dashedbox, nobeforeafter, colback=white, boxrule=0pt, enhanced jigsaw, borderline horizontal={1pt}{0pt}{dashed}, borderline vertical={1pt}{0pt}{dashed}, #1 } Both solutions squish the fraction, and I am not sure how to fix it Am I just misusing the given packages? Should I just borrow one of the tikz scripts people have been writing here? If tikz is the answer, where can I learn how to write tikz tools for situations like this?
- Style Adjustments of bibstyle musuosby Friedrich Falkner on October 23, 2025 at 2:33 pm
I want to change a few things about the bibstyle musuos I use. As of right now, it prints brackets even in entries that do not comprise series+number entry. I want to avoid that. Every "In:" should should be in lowercase letter, e.g. "in:". Every period, except the last one, should be a comma. There should be no comma between location and date. How can I make further changes without always asking the forum? Is there a good tutorial to make those question myself, even with my limited knowledge about LaTex? \documentclass[a4paper, 12pt]{scrartcl} \usepackage[ngerman]{babel} \usepackage[ backend=biber, style=musuos, doi=false, isbn=false, url=true, ]{biblatex} \renewbibmacro*{series+number}{% \setunit{\addspace}% \printtext[parens]{% \printfield{series}% \setunit*{\addspace}% \printfield{number}% \newunit}} \usepackage{xpatch} \DeclareFieldFormat{edition}{% \ifinteger{#1} {\textsuperscript{#1}} {#1\isdot\setunit{\addcomma\space}}} \renewbibmacro*{publisher+location+date}{% \printlist{location}% \iflistundef{publisher} {\setunit*{\addcomma\space}} {\setunit*{\addcolon\space}}% \printlist{publisher}% \setunit*{\addcomma\space}% \printfield{edition}% \usebibmacro{date}% \newunit} \newcommand{\replaceedition}[1]{% \xpatchbibdriver{#1} {\printfield{edition}% \newunit} {}% {} {\typeout{failed to patch driver #1}}} \replaceedition{book} \replaceedition{collection} \replaceedition{inbook} \replaceedition{incollection} \replaceedition{manual} \newcommand{\mkbibnodate}{n\adddot d\adddot} \AtEveryCitekey{\iffieldundef{labelyear}{\restorefield{labelyear}{\mkbibnodate}}{}} \AtEveryBibitem{\iffieldundef{labelyear}{\restorefield{year}{\mkbibnodate}}{}} \begin{filecontents}[force]{\jobname.bib} @Collection{Titel2000, date = {2000}, editor = {Mustermann, Max}, title = {Titel}, location = {Ort}, } @InCollection{Titel2001, author = {Mustermann, Max}, booktitle = {Buchtitel}, date = {2020}, title = {Titel}, editor = {Bauer, Agathe}, location = {Ort}, number = {1}, pages = {100--200}, series = {Reihe}, } \end{filecontents} \addbibresource{\jobname.bib} \begin{document} Zitat 1\autocite{Titel2000} und Zitat 2\autocite{Titel2001} \end{document}
- Vertical distance between bibliographic items in ConTeXtby Muhammad Rizqi Siregar on October 23, 2025 at 2:16 pm
I am trying to convert a normal bibliography into an endnote at the end of each chapter. I use \placelistofpublication[criterium=chapter, repeat=yes] in a section titled References, but I cannot suppress or remove the distance between reference lines. Thank you. Edit: \placelistofpublication[criterium=chapter] only does not print used references when cited in subsequent chapters. From the answer provided in invoking \placelistofpublications several times in a document question, I appended repeat=yes.
- Lose italic style when convert HTML to Word using Pandoc [closed]by GowriSaro on October 23, 2025 at 2:09 pm
Content of my HTML file is: <?xml version="1.0" encoding="iso-8859-1" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd" > <html xmlns="http://www.w3.org/1999/xhtml"> <body> conditions (<i><span class="cite"><a href="#Xieda1995commuter"><span class="ptmri7t-">1</span></a></span><span class="ptmri7t-">,</span><span class="ptmri7t-"> </span><span class="cite"><a href="#Xtan2020evacuating"><span class="ptmri7t-">2</span></a></span></i>). However, URT systems </body> </html> I'm converting this HTML file into Word file by using the below command in MS-DOS Prompt: pandoc -s test.html --mathml -o test.docx It converts the Word file successfully, the numbers 1 and 2 was looks like italic, but if I select those numbers, then italic was not shown properly. Please advise how to achieve my requirement
- How to remove text indentation after epigraph?by forrest on October 23, 2025 at 9:49 am
I use the memoir document class to typeset the book text. How to force the epigraph package to not allow indentation of the first line of the paragraph that follows the sentence placed below the chapter title? Usage of the command \epigraphnoindent leads to the message: ! Undefined control sequence. <recently read> \epigraphnoindent. \documentclass{memoir} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lipsum} \usepackage{epigraph} \epigraphnoindent \begin{document} \chapter{Some chapter title} \epigraph{Some sentence}{The author of the sentence} \lipsum[1][1-3] \end{document}
- Babel package with language option does not seems to go well with realscript packageby glenncounty on October 23, 2025 at 5:27 am
I am writing in a paper in which I use five or more languages. Recently I converted from polyglossia to babel. But I have a problem with realscript package when babel has language options: I expect this with \usepagkage[bidi=basic,main=english,german,provide*=*]{babel}: How can I solve this problem? I use windows 10 x64 pro, texlive 2025, and Lualatex. Here is an working example: % !TeX encoding = UTF-8 % !TeX spellcheck = en_US % !TeX TS-program = lualatex \documentclass[letterpaper,12pt]{article} \usepackage[main=english]{babel} % this displays the fake super|subscript. %\usepackage{babel} % this displays the real super|subscript glyphs if available. \usepackage{realscripts} \babelfont{rm}{Noto Serif} \begin{document} normal text and footnote\footnote{footnote1} superscript intended: \textsuperscript{1234567890abcdefghijklmnopqrstuvwxyz} fake superscript: \textsuperscript*{1234567890abcdefghijklmnopqrstuvwxyz} subscript intended: \textsubscript{1234567890abcdefghijklmnopqrstuvwxyz} fake subscript: \textsubscript*{1234567890abcdefghijklmnopqrstuvwxyz} \end{document}
- Why does \marginpar break wrapstuff?by Sammy on October 22, 2025 at 6:25 pm
I'm creating worksheets that require text-wrapped graphics and margin notes. For wrapping, I use the wrapstuff package, which handles lists and other content well. For margin notes, I use \marginpar, sometimes together with \leavevmode to align the note with the surrounding text. However, when I combine wrapstuff and \marginpar, the text stops wrapping properly after the margin note. If I use \leavevmode, it even causes an error. I need both wrapped figures and margin notes inside a custom environment, but the issue can be reproduced with the following minimal (not) working example: \documentclass{article} \usepackage{wrapstuff} \usepackage{tikz} \usepackage{lipsum} \begin{document} \begin{wrapstuff} \tikz{\draw (0,0) rectangle (5,3);} \end{wrapstuff} \lipsum[1][1-3] \begin{enumerate} \item \marginpar{Test} \lipsum[1][1-3] \end{enumerate} \end{document} Why does \marginpar break wrapstuff and is there a workaround that allows both margin notes and wrapped content to work reliably in such cases?
- amsart: error arises when $\tilde \cV$ in section titleby Akira on October 22, 2025 at 11:16 am
I have a tex file \documentclass{amsart} \newcommand{\cV}{\mathcal{V}} \begin{document} \tableofcontents \section{Regularity of $\tilde{\mathcal{V}}$} \section{Regularity of $\tilde{\cV}$} $\tilde \cV$ \section{Regularity of $\tilde \cV$} \end{document} The command \section{Regularity of $\tilde \cV$} causes the error Argument of \math@egroup has an extra }. <inserted text> Could you elaborate on this problem?
- \textfrak and German umlautsby Reinhard Neuwirth on October 22, 2025 at 8:16 am
Fraktur font in text mode is fine for German umlauts in lower case but reports a "corrupted NFSS tables" error for upper case, although it compiles and produces a flawless .pdf file. \documentclass{article} % RN. 22/10/2025 %======================= \usepackage{yfonts} \begin{document} \textfrak{\"a\"o\"u} \textfrak{\"A\"O\"U} \end{document}
- Using macros to define optional arguments for environmentsby user419944 on October 21, 2025 at 12:24 am
I am trying to use a macro to define the optional arguments to a tcbraster environment. Here is a simple example: \documentclass{article} \usepackage{tcolorbox} \tcbuselibrary{raster} \def\myoptions{raster columns=2} \begin{document} \begin{tcbraster}[\myoptions] \end{tcbraster} \end{document} This fails with Error: I do not know the key '/tcb/raster columns=2'. What I want is for TeX to see [\myoptions] as [raster columns=2]. This must be easy, but I have been going around in circles for hours trying to solve it. My end goal is to write a macro using, e.g., \clist_map_inline that will allow me to dynamically set options to tcbraster, so that I can write, e.g.,: \begin{tcbraster}[\myoptions{3,4}] and have it interpreted as: \begin{tcbraster}[raster columns=2,raster force size=false,raster column 1/.style={width=3cm},raster column 2/.style={width=4cm}] Any advice very gratefully accepted! Michael Thanks for the rapid and helpful replies below! It would probably help if I tried to explain what I'm trying to do here. Basically, I want to reduce the amount of effort required to produce arbitrarily deep nests of tcbrasters, with specified column widths. I'm thinking of a macro, e.g., \COLS, that has two arguments: (1) a clist of column widths (in units of \textwidth), and (2) a bunch of tcolorboxes, and it returns a tcolorbox that contains a tcbraster containing the tcolorboxes. One or more of the tcolorboxes in the 2nd argument to \COLS can in turn be another \COLS. E.g., suppose \A, \B, \C are tcolorboxes, then I can do something like \COLS{0.3,0.2,0.5}{\A\B\COLS{0.4,0.6}{\C\COLS{1.0}{\A\B}}} to produce: A B C A B This particular example is pretty silly, but the general idea is to make beamer slides that can easily contain boxes of configurable width for text, tcboxfit, images, etc, and to be able to create these very quickly and flexibly. For example, suppose I want a beamer slide with two images in the left 30% of the slide, aligned on top of each other, followed to the right by a tcboxfit of width 40% containing text, with an image below it, and the remaining column on the right containing a few more tcolorboxes. Handcoding all of this would involve a page of bespoke TeX. I may have a hundred or more slides, each one of which I would like to be able to quickly create. In principle all I should need are the column widths, the contents of the boxes, and a simple way of describing the layout. Update Following all the helpful comments, I have something that works. E.g., my definition of \COLSthree for three columns is as follows: \def\COLSthree#1#2{% \begin{tcolorbox}[blankest] \expandafter\tcbraster\expandafter[\mythree{#1}] #2 \endtcbraster \end{tcolorbox} } Where \mythree is cfr's \myoptions with 3 widths, each given as a fraction of \textwidth. E.g., \COLSthree{0.3,0.3,0.4}{} creates a tcolorbox which contains a tcbraster with three columns with the indicated widths. I also define \COLSone, \COLStwo, etc. The output of any of these \COLS can be used as a tcolorbox in the argument list of another \COLS, to arbitrary depth. I use \tcbraster rather than \begin{tcbraster} since the former does what I want with respect to \linewidth and nested rasters. The end result is a very compact way of specifying any slide layout I want, freeing me up to concentrate on the content. Now I can get back to writing my physics lectures! The final enhancement would be to replace the separate \COLS with a single macro that makes decisions based on the number of column widths. Final(?) update OK, after much wrangling I've got a solution using \begin{tcbraster} etc. I've defined three macros: \A to handle a single column tcbraster, \B for two columns, and \C for three. Also, I have a macro \BOX which is needed to embed some of the tcbrasters inside a tcolorbox to get around problems with \textwidth changing mysteriously (e.g., if you have a single column raster that contains a two column raster - \textwidth changes before and after the \tcbset line if you don't use \BOX). \def\A#1#2{% \tcbset{ my options/.style args={##1}{ raster columns=1, raster force size=false, raster column 1/.style={width=##1\textwidth}, raster row skip=0pt, }, } \begin{tcbraster}[my options={#1},blankest] #2 \end{tcbraster} } \def\B#1#2{% \tcbset{ my options/.style args={##1,##2}{ raster columns=2, raster force size=false, raster column 1/.style={width=##1\textwidth}, raster column 2/.style={width=##2\textwidth}, raster row skip=0pt, }, } \begin{tcbraster}[my options={#1},blankest] #2 \end{tcbraster} } \def\C#1#2{% \tcbset{ my options/.style args={##1,##2,##3}{ raster columns=3, raster force size=false, raster column 1/.style={width=##1\textwidth}, raster column 2/.style={width=##2\textwidth}, raster column 3/.style={width=##3\textwidth}, raster row skip=0pt, }, } \begin{tcbraster}[my options={#1},blankest] #2 \end{tcbraster} } \def\BOX#1{% \begin{tcolorbox}[blankest] #1 \end{tcolorbox} } This works very nicely, apart from the need to have a separate macro for each number of columns. Thanks for everyone's help along the way.