Hot
- How can i highlight in Latexby Giovanna Oliveira Silva on October 1, 2026 at 1:56 pm
I saw that the packages xcolor and soul, but i didn't find how to use then, the commands for highlighting, etc. I mostly fond how to put colors in latex. I would like to use highlight as i use the bold and italic. Am I on the right path ? is there a better package for my need ?
- How to get path info from arg of \usepackageby lyl on October 1, 2026 at 12:52 pm
I build a marco package named 0-path.sty which is loacated in the subdirectory of lib under the root path of my project. In this package, I create a macro named \setpath to designate all directoried for file search. Meanwhile, optional args are given to this package for addtional search pathes. I want to set search pathes when this package is introduced like: \usepackage[pic/, tex/]{../lib/0-path}: With this, the root path, which is used as the start point of file search, would be ../(father directory of lib), and program will find files in these pathes: .././, ../lib/, ../material/, ../pic/, ../tex. \usepackage{lib/0-path}: The default root path is ./ The file test-path.tex in ./test/ introduces this package. But error is given when compiling it: ERROR: Paragraph ended before \path@split was complete. --- TeX said --- <to be read again> \par l.56 What's wrong with my codes? ./lib/0-path.sty: \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{0-path}[2026/09/24 v1.0 ...] \edef\path@currname{\CurrentFilePath/\CurrentFile}%like ../lib/0-path.sty %\show\path@currname \RequirePackage{graphicx} \ExplSyntaxOn \tl_new:N \l_setsearchpath_paths_tl \NewDocumentCommand{\setpath}{s O{} m}{ \clist_set:Nn \l_tmpa_clist {#2} \IfBooleanF{#1} { \clist_put_left:Nn \l_tmpa_clist {./, lib/, material/} } \tl_clear:N \l_setsearchpath_paths_tl \clist_map_inline:Nn \l_tmpa_clist { \tl_put_right:Nx \l_setsearchpath_paths_tl { {#3\tl_trim_spaces:n {##1}} } } \exp_args:NV \graphicspath \l_setsearchpath_paths_tl \cs_set:cpx { input@path } { \exp_not:V \l_setsearchpath_paths_tl } }%\setpath \ExplSyntaxOff %========================================================= % Get opt args of this package \newcommand{\path@options}{} \DeclareOption*{% \ifx\path@options\@empty \xdef\path@options{\CurrentOption}% \else \xdef\path@options{\path@options,\CurrentOption}% \fi } \ProcessOptions\relax %==================================================== % Get root path \def\path@split#1lib/0-path#2\@nil{% \def\path@root{#1}% \ifx\path@root\@empty \def\path@root{./}% \fi } \expandafter\path@split\path@currname\@nil % ========================================================= \setpath[\path@options]{\path@root} %========================================================= \endinput ./test/test-path: \documentclass{article} \usepackage{../lib/0-path} \usepackage{4.1-element}%in the directory of "./lib" \begin{document} \makeatletter \path@currname %print "../lib/0-path.sty" \makeatother \end{document}
- lua-unicode-math makes \parbox generate font warningsby David Purton on October 1, 2026 at 12:29 pm
If I select a non-standard font size and then use a \parbox, I get font substitution warnings relating to maths fonts when lua-unicode-math is loaded. This happens even though I do not have any maths in my document. No warnings are produced for normal text (unless I actually include maths, of course). And unicode-math does not do this. Is this expected? Am I doing something wrong? Can I get rid of the warnings? I can use something other than a \parbox, but I have trouble with tagging with boxes… MWE % TeX Program = lualatex \documentclass{article} \usepackage{lua-unicode-math} \usepackage{fontspec} \setmainfont{Noto Serif} \begin{document} \fontsize{16pt}{24pt}\selectfont \parbox{3cm}{Some text} \end{document}
- Is there any method to invert the even odd rule?by D G on October 1, 2026 at 8:37 am
I want to get rather than Appending (0,0) circle (3.5) is fine but I am wondering whether there are any nicer approaches. odd even rule does not exist too. \documentclass[tikz,border=1cm,12pt]{standalone} \begin{document} \begin{tikzpicture}[ultra thick] \filldraw[fill=red,even odd rule] \foreach \i in {0,0.5,...,3.5}{(0,0) circle (\i)} (0,0) circle (3.5) % just a hack to invert the even odd rule ; \end{tikzpicture} \end{document}
- How do I run plain TeX, LaTeX or XeLaTeX with texify?by ltcomdata on October 1, 2026 at 4:00 am
I am working with the latest MiKTeX (26.5) on Windows 11 (and using TeXnicCenter if that makes a difference). The simplest texify call on file.tex is texify.exe file.tex. This runs LaTeX by default on file.tex, producing a DVI file. The MiKTeX manual lists the option --pdf for texify as well. It explains that using this option texify will call miktex-pdftex or miktex-pdflatex to typeset file.tex and produce a pdf file. Well, which one does it call? If it calls pdflatex, how would I create a plain TeX document with texify (and vice-versa)? Finally, from what I read, texify used to have the option ---engine= with the possible values of pdftex, xetex, and luatex. I do not see this option in the latest MiKTeX manual for texify. Does this option still work? And can I pass XeLaTeX or LuaLaTeX instead?
- Latex syntax, LR mode,by James Durfee on October 1, 2026 at 12:31 am
I have very limited experience with latex and coding in general. I am trying to use latex to create a pdf of a proof I have already written out by hand, but I am getting several errors that I do not understand. Any feedback on the code or suggestion on where to start learning would be very appreciated, I have been researching the errors But I can't seem to find a good source for this. thank you for your time. \documentclass[12pt]{article} \usepackage{graphicx} % Required for inserting images \newtheorem{proposition}{proposition} \newtheorem{case}{case} \usepackage{dsfont} \usepackage[OT1]{fontenc} \usepackage{amsthm} \usepackage{amsmath} \title{Equivalence Proof} \author{James Durfee} \date{September 2026} \usepackage{amsthm} \begin{document} \maketitle \begin{proposition} \item Suppose n is an integer. Then the following are equivalent. \begin{enumerate} \item 1. n is odd \item 2. $3n+2$ is odd \item 3. $n^2$ is odd. \end{enumerate} \end{proposition} \begin{proof} Assume n is an odd integer. \begin{case} assume n is odd. By definition $n=2k+1$ where $k \in \mathds{Z}$. \newline thus, \begin{align} n &= 2k + 1 3n + 2 &= 6k + 3 + 2 &= 2(3k+2) + 1 \end{align} where $3k+2$ is a integer by closure. Thus by definition $3n+2$ is odd. \end{case} \begin{case} We will prove the contrapositive. Assume n is even. then by definition $n+2k$ where $k \in \mathds{Z}$. \newline Then, \newline \begin{align} n &= 2k 3n &= 6k 3n+2 &= 6k+2 &= 2(3k+1) \end{align} where by closure $3k+1$ is an integer. So $3n+2$ is even. Thus if $3n+2$ is odd, then $n$ is odd. \end{case} \begin{case} Assume n is odd. Then by definition $n=2k+1$, where $k \in \mathds{Z}$. \newline Then, \begin{align} n &= 2k+1 n^2 &= 4k^2+4k+1 &= 2(2k^2+2k)+1 \end{align} where $2k^2+2k$ is an integer under closure. Then by definition $n^2$ is odd. \end{case} \begin{case} We will prove the contrapositive. Assume n is even. So by definition $n+2k$ where $k \in \mathds{Z}$.\newline then, \begin{align} n &= 2k n^2 &= 4k^2 &= 2(2k^2). \end{align} By closure $2k^2$ is a integer. then by definition $n^2$ is even. Thus if $n^2$ is odd then $n$ is odd. \end{case} Therefore, if n is a integer, then the following are equivalen. 1. $n$ is odd, 2. $3n+2$ is odd, 3. $n^2$ is odd. \end{proof} \end{document}
- How do we find an alternative to align, similar to \begin{aligned}[t], that allows \allowdisplaybreaks in amsart?by Arbuja on September 30, 2026 at 11:00 pm
I am using Latex Overleaf. Suppose we have the following code: \documentclass[11pt]{amsart} \usepackage{amsmath} \usepackage{enumitem} \usepackage{lipsum} \begin{document} \allowdisplaybreaks \begin{enumerate} \item \lipsum[1-2] \item \lipsum[3-4] \item {\large$\begin{aligned}[t] % Random Equations % & x+y+xyz=10\\ & x+2y+yz=13\\ & 2x+xyz+z=15\\ & 3x+y+yz=7\\ & xy+y^2+zx=100\\ & 7x+yz+xz=1 \end{aligned}$} \end{enumerate} \end{document} Despite the end of the last paragraph (in the code above) being close to the end of page 1, the list of equations in the code does not split into two pages, where the first equation is right next to the item number without spacing. (The other equations are aligned with the first equation.) Question: How do we find an alternative to align (similar to aligned) such that x+y+xyz=10 is right next to its item number with no space in between, the remaining equations are aligned with the first equation right next to the item number, the list of equations are split into two pages? There was an answer to a similar question, but it has spacing between the equations and item number and when applying this to the code above: \documentclass[11pt]{amsart} \usepackage{amsmath} \usepackage{environ, enumitem} \makeatletter \let\olditem\item% Store regular \item macro \newlength{\LHS} \def\processitem#1\relax{% \olditem\hspace*{\LHS}% \llap{$\displaystyle #1{}$}% $\displaystyle{}#2$% } \NewEnviron{mathlist}[1][3em]{% \setlength{\LHS}{#1}% Set Left-Hand Side length \g@addto@macro{\BODY}{\item\relax\item}% Used to delimit the items; last item identified by \item\relax\item \def\item##1\item{% Redefine \item to capture contents \def\optarg{##1}% \expandafter\ifx\optarg\relax\else% Last item not reached \expandafter\processitem##1\relax% Process item \expandafter\item% Recursively continue processing items \fi } \begin{itemize}[label={},labelsep=0pt] \BODY% Process environment (save items) \end{itemize} } \makeatother \usepackage{lipsum} \begin{document} \allowdisplaybreaks \begin{enumerate} \item \lipsum[1-2] \item \lipsum[3-4] \item {\large\begin{mathlist}[1em] % Random Equations % & x+y+xyz=10\\ & x+2y+yz=13\\ & 2x+xyz+z=15\\ & 3x+y+yz=7\\ & xy+y^2+zx=100\\ & 7x+yz+xz=1 \end{mathlist}} \end{enumerate} \end{document} I get errors on latex overleaf. I think this is due to the documentclass being amsart.
- Change only one word's color in beamer to beamer colorsby Jim on September 30, 2026 at 6:45 pm
I want to change the color of only one word within a larger text in beamer. The color I need is one of the default beamer colors, say I want to make this word have the same color as the title of the presentation. Unfortunately, the beamercolorbox environment ends the paragraph and is itself a "paragraph environment" breaking the text. Also, I don't know (and I shouldn't have to) what the exact color of the title is within the particular beamer theme, which means I cannot use \textcolor or \color to manually type in the color. How can one do this? Can I "retrieve" the color somehow or is there a way to stop beamercolorbox from breaking the paragraph?
- How to use conditional if-then statements in luacas (LuaLaTeX) to filter algebraic solutions based on a sign condition?by minthao_2011 on September 30, 2026 at 3:51 pm
I am using the luacas package in LuaLaTeX to dynamically generate and solve radical equations. In my example, I want to solve the equation: $\sqrt{4x+3} = -x+5$. By squaring both sides, the package successfully finds two roots, $r_{1}$ and $r_{2}$. However, I need to check the extraneous root condition, which is checking if the right-hand side $-x+5 \geq 0$ at those specific root values. Currently, I have to manually hardcode the text conclusions (e.g., deciding which root is valid and writing the final conclusion line by hand). I want to automate this process inside the \begin{CAS} environment using an if-then block or a similar logic feature, so that it automatically filters the valid root and prints the correct concluding text depending on the sign of the evaluated expression. Here is my current working LaTeX code (with manual conclusions): \documentclass{article} \usepackage{luacas} \begin{document} \begin{CAS} vars("x") sq = -x+5 f = topoly((-x + 5)^2) g = topoly(4*x +3) eq = f-g r = ZTable( roots(eq) ) y1 = substitute({[x]=r[1]}, f):simplify() y2 = substitute({[x]=r[2]}, f):simplify() sol1 = substitute({[x]=r[1]}, sq):simplify() sol2 = substitute({[x]=r[2]}, sq):simplify() \end{CAS} Solve the equation: \[\sqrt{\print{g}} = \print{sq}.\] Squaring both sides of the equation, we get: \[\print{f} = \print{g}.\] Simplifying the equation above yields: \[ \print{eq} = 0. \] This equation has two roots: \[r_1 = \print{r[1]}, \quad r_2 = \print{r[2]}.\] We have: \[-r_1 + 5 = \print{sol1} < 0,\] hence $r_1$ is an extraneous root (not a solution). \[-r_2 + 5 = \print{sol2} > 0,\] hence $r_2$ is a valid solution. Therefore, the final solution to the equation is $x = \print{r[2]}.$ \end{document} How can I rewrite this using conditional statements (if ... then ... else) or loop routines inside the \begin{CAS} environment to: Dynamically evaluate if sol1 and sol2 are $\geq 0$ or $<0$ (handling luacas algebraic objects properly when comparing).
- LuaLaTeX help? Subscripts copy wrongby Sebastian Dryl on September 30, 2026 at 12:49 pm
Gentium Plus font characters, Unicode h₁, h₂, h₃. The subscript doesn't copy. When I copy it copies h1 h2 h3. I need the correct symbol because of linguistics. h₁, h₂, h₃ It renders correctly but copies wrong.
- Table of amino acidsby Svend Tveskæg on September 30, 2026 at 9:12 am
Introduction This is very much a "please do (some of) it for me" question. I'm very sorry for that but I don't know where to start with the table. Code The following code is nothing more than a possible very early starting point for a document. (Again, I'm sorry for that.) \DocumentMetadata{tagging = off} \documentclass{article} \usepackage{graphicx} \usepackage{chemfig} \usepackage{tabularray} % maybe use this package for the table \begin{document} \setchemfig{atom sep = 2em} \chemfig{H_2N-CH(-[6,,,,red]{\color{red}H})-C(=[2]O)-OH} \end{document} Question How do I produce the following table? I would like to also have a table boundary. I hope that I can create all of the 20 drawings myself so I would appreciate some help with the construction of the table and the placement of the name of the amino acid in the top left corner of the first cell.
- Keep consistent vertical spacing with beamer when using overlaysby profj on September 30, 2026 at 3:32 am
I am using a combination of only and onslide overlays in beamer, and the vertical spacing is inconsistent between different slides of a frame. Here is a minimum working example: \documentclass{beamer} \begin{document} \begin{frame}{Vertical spacing is inconsistent} \begin{itemize} \item here is an example \begin{itemize} \item<2-> Here is an equation: \only<3> {$$P = 2\times Q1$$} \only<4> {$$P = 2\times Q$$} \onslide<5-> {$$P = 2\times 4$$} \item<6-> some more stuff \item<7-> some more stuff \item<8-> some more stuff \end{itemize} \item<9-> Next block of text \begin{itemize} \item<9-> Here's another equation: \only<10> {$$Q = 0.5 \times P1$$} \only<11> {$$Q = 0.5 \times P$$} \onslide<12-> {$$Q = 0.5\times 8$$} \item<13-> some more stuff \item<14-> some more stuff \item<15-> some more stuff \end{itemize} \end{itemize} \end{frame} \end{document} Is there a way to keep the vertical spacing consistent. The only way I've figured out is to use phantom to hold space until the only lines can take up vertical space. But I wonder if there is a more elegant way: \documentclass{beamer} \begin{document} \begin{frame}{Vertical spacing is inconsistent} \begin{itemize} \item here is an example \begin{itemize} \item<2-> Here is an equation: \only<-2> {$$\phantom{P}$$} \only<3> {$$P = 2\times Q1$$} \only<4> {$$P = 2\times Q$$} \onslide<5-> {$$P = 2\times 4$$} \item<6-> some more stuff \item<7-> some more stuff \item<8-> some more stuff \end{itemize} \item<9-> Next block of text \begin{itemize} \item<9-> Here's another equation: \only<-9> {$$\phantom{Q}$$} \only<10> {$$Q = 0.5 \times P1$$} \only<11> {$$Q = 0.5 \times P$$} \onslide<12-> {$$Q = 0.5\times 8$$} \item<13-> some more stuff \item<14-> some more stuff \item<15-> some more stuff \end{itemize} \end{itemize} \end{frame} \end{document}
- Text width on paper is different from \textwidthby Ievgen on September 29, 2026 at 12:27 pm
Somehow the text width of my printed document (pdf created from LaTEX) is different from the \textwidth parameter. The main font size also appears visually somewhat smaller on paper than it should be. What may be the reason? The problem doesn't seem to be caused by zooming the pdf by the software I printed from. Here's the preamble: \documentclass[11pt, makeidx, a4paper]{book} \textheight=172mm \textwidth=112mm \usepackage{makeidx} \makeindex %\nofiles \usepackage[english,russian, ukrainian]{babel} \usepackage[cp1251]{inputenc} \usepackage[T2A]{fontenc} \usepackage{amsmath,amssymb,calc} % \usepackage{indentfirst} \usepackage{amsmath,multicol} \usepackage{amssymb} \usepackage{amsthm} \usepackage{amscd} \usepackage[pdftex]{graphicx} %%% \usepackage[mathscr]{eucal} \usepackage[dvips]{color} %%% \usepackage{layout} \usepackage{floatflt} \usepackage{calc} \usepackage{here} \usepackage{nccsect} % \newtheoremstyle{nashstteorem}% name {1pt}% Space above {1pt}% Space below {\it}% Body font {}% Indent amount (empty = no indent, \parindent = para indent) {\mdseries}% Thm head font {. }% Punctuation after thm head {}% Space after thm head: " " = normal interword space; % \newline = linebreak {}% Thm head spec (can be left empty, meaning `normal') \theoremstyle{nashstteorem} \newtheorem{thm}{\hspace*{\parindent}Т\,е\,о\,р\,е\,м\,а}[section] \newtheorem{lmm}{\hspace*{\parindent}Л\,е\,м\,а}[section] \newtheorem{ex}{\hspace*{\parindent}П\,р\,и\,к\,л\,а\,д}[section] \newtheoremstyle{problemstyle}% name {0pt}% Space above {0pt}% Space below {\rm}% Body font {}% Indent amount (empty = no indent, \parindent = para indent) %{\mdseries}% Thm head font %%%%% {\bfseries} % Thm head font {. }% Punctuation after thm head {}% Space after thm head: " " = normal interword space; % \newline = linebreak {}% Thm head spec (can be left empty, meaning `normal') \theoremstyle{problemstyle} \newtheorem{probl}{\hspace*{\parindent}Задача}[chapter] % THEOREMS ------------------------------------------------------- % ---------------------------------------------------------------- \includeonly{ pr_ua, ch1_ua, ch2_ua, ch3_ua } \def\emline#1#2#3#4#5#6{% \put(#1,#2){\special{em:moveto}}% \put(#4,#5){\special{em:lineto}}}% % \renewcommand{\theequation}{\thesection.\arabic{equation}} \renewcommand{\thefigure}{\thesection.\arabic{figure}} \renewcommand{\thetable}{\thesection.\arabic{table}} \newcommand{\sign}{\mathop{\rm sign}\nolimits} \newcommand{\mgtF}{\mathfrak{F}} % \newcommand{\PO}{\mathsf{P}} % \newcommand{\Pbb}{\mathbb{P}} \newcommand{\Qbb}{\mathbb{Q}} \newcommand{\R}{\mathbb{R}} \newcommand{\Dov}{Д\,о\,в\,е\,д\,е\,н\,н\,я. } \newcommand{\Opr}{О\,з\,н\,а\,ч\,е\,н\,н\,я. } \newcommand{\Otv}{В\,і\,д\,п\,о\,в\,і\,д\,ь: } \newcommand{\Rozv}{Р\,о\,з\,в'\,я\,з\,а\,н\,н\,я. } \newcommand{\Sleds}{Н\,а\,с\,л\,і\,д\,о\,к } \newcommand{\Sledsdot}{Н\,а\,с\,л\,і\,д\,о\,к.} \newcommand{\Theornonum}{Т\,е\,о\,р\,е\,м\,а.\ } \newcommand{\Zau}{З\,а\,у\,в\,а\,ж\,е\,н\,н\,я. } \newcommand{\sts}{\,\,} \newcommand{\suml}{\sum\limits} \newcounter{formula} \pagestyle{myheadings} % \renewcommand{\baselinestretch}{0.8} Thanks in advance.
- Continuous/running footnotes with Paracolby Home Typesetter on September 29, 2026 at 11:07 am
I'm trying to make footnotes while using paracol. I'd like to have them in one continuous text like shown in the image here. However, it seems to be tricky to do, especially with paracol. My current preamble looks like this: % --- Voetnoten --- \footnotelayout{p} \makeatletter \renewcommand{\thefootnote}{\Roman{footnote}} \renewcommand{\@makefnmark}{% \textcolor{rood}{\schuinfont\textsuperscript{\@thefnmark}}% % Ankersymbooltjes rood en schuin } \renewcommand{\@makefntext}[1]{% \noindent \makebox[3.5em][l]{% \textcolor{rood}{\@thefnmark.}%\hspace{1em}% }% {\footnotesize #1}% } \renewcommand{\footnoterule}{% \kern -3pt \textcolor{rood}{\hrule width 0.4\textwidth height 0.4pt} \kern 2.6pt } \let\pcol@footnoterule\footnoterule \makeatother Mostly AI-generated and edited myself with trail and error (still learning). I am getting better at this however more complex stuff like this seems tricky for a novice like me. Any general tips on proper coding in here are also most welcome. Thanks in advance. My minimal working document: \documentclass[11pt,twoside]{book} \usepackage{paracol} \usepackage{lipsum} \begin{document} \footnotelayout{p} \begin{paracol}{2} \begin{leftcolumn} \lipsum[1] \footnote{This is a footnote} \end{leftcolumn} \begin{rightcolumn} \lipsum[1] \footnote{yet another footnote} \end{rightcolumn} \end{paracol} \end{document} Gives this: While I am trying to get something like this:
- use newline in f:writeby flawr on September 28, 2026 at 10:08 pm
I'd like to create a data file using lua in LuaTeX that I can reuse e.g. using pgfplots. But currently I'm stuck printing multiple lines as it seems the "\n" will always get interpreted as a TeX command and not as a newline. How would we correctly do that in this document? \documentclass{article} \usepackage{pgfplots} \usepackage{luacode} \begin{document} \begin{luacode} local f = io.open("data.txt", "w") for x = 0, 10, 0.5 do local y = math.sin(x) f:write(x .. " " .. y .. "\n") end f:close() \end{luacode} \begin{tikzpicture} \begin{axis} \addplot table {data.txt}; \end{axis} \end{tikzpicture} \end{document}
- How to get pre-numbered theorems in a post-ntheorem world?by Gaussler on September 28, 2026 at 5:56 pm
As mentioned by @UlrikeFischer in this question, ntheorem is currently not compatible with \DocumentMetadata, as the latter now provides theorem environments out of the box which emulate the amsthm interface. Combined with the fact that ntheorem is seemingly unmaintained, it seems I must prepare myself for a post-ntheorem world. But that is quite unfortunate since I prefer pre-numbering my theorem environments. I also like to make the custom argument (if it is provided) completely replace the theorem label. How can I get something similar to this with the new interface? %\DocumentMetadata{pdfstandard=UA-2} % incompatible with ntheorem \documentclass{article} \usepackage{ntheorem} \makeatletter \newtheoremstyle{prenumber}% {\item[\hskip\labelsep \theorem@headerfont ##2\theorem@separator\ ##1\theorem@separator]}% {\item[\hskip\labelsep \theorem@headerfont ##2\theorem@separator\ ##3\theorem@separator]} \newtheoremstyle{prenumberbreak}% {\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont ##2\theorem@separator\ ##1\theorem@separator}\hbox{\strut}}}]}% {\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont ##2\theorem@separator\ ##3\theorem@separator}\hbox{\strut}}}]} \newtheoremstyle{nonumberplainflex}% for proof environments, see below {\item[\theorem@headerfont\hskip\labelsep ##1\theorem@separator]}% {\item[\theorem@headerfont\hskip \labelsep ##3\theorem@separator]} \newtheoremstyle{nonumberbreakflex}% {\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont ##1\theorem@separator}\hbox{\strut}}}]}% {\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont ##3\theorem@separator}\hbox{\strut}}}]} \makeatother \theoremseparator{.} \theorembodyfont{\itshape} \theoremstyle{prenumber} \newtheorem{theorem}{Theorem} \theoremstyle{prenumberbreak} \newtheorem{theorembreak}[theorem]{Theorem} \theoremheaderfont{\itshape} \theorembodyfont{\normalfont} \theoremstyle{nonumberplainflex} \newtheorem{proof}{Proof} \theoremstyle{nonumberbreakflex} \newtheorem{proofbreak}{Proof} \begin{document} \begin{theorem} First theorem. \end{theorem} \begin{proof} Proof \end{proof} \begin{theorem}[Pythagorean Theorem] We have~\( c^2 = a^2 + b^2 \). \end{theorem} \begin{proof}[Proof of the Pythagorean Theorem] Draw it! \end{proof} \begin{theorembreak} Theorem environment for use e.g. when the body is a list. \end{theorembreak} \begin{theorembreak}[Fermat's Last Theorem] No non-trivial integral solutions to~\( c^{n} = a^{n} + b^{n} \) for~\( n > 2 \). \end{theorembreak} \begin{proofbreak}[Proof of Fermat's Last Theorem] Too long for this MWE. \end{proofbreak} \end{document}
- Inconsistent \fint symbol with olddefault option in fontsetup [closed]by Alexander Voigt on September 28, 2026 at 5:10 pm
When I compile the following MWE with LuaLaTeX 1.18.0, \documentclass{article} \usepackage[olddefault]{fontsetup} % default works \begin{document} \[\int\fint\] \end{document} I obtain two integral signs: Note, that the second one (\fint) does not appear slanted. In general, \fint looks inconsistent with all other integral signs in the olddefault font. (This issue does not appear with default font.) How can I get \fint to be as slanted as \int when using olddefault? Edit: The same issue exists with \intbar.
- Critical Apparatus pushing over page footerby muk.li on September 28, 2026 at 1:55 pm
[Revised question:] Under certain circumstances, such as when you adjust the line spacing, or perhaps with certain fonts, reledmac fails to calculate correctly the space needed for paragraphed footnotes, which leads to the critical apparatus taking too much space, pushing into the page footer. How to fix that? \documentclass{memoir} \usepackage{lipsum} \usepackage{reledmac} \usepackage{showframe} \Xarrangement[]{paragraph} \begin{document} \begin{Spacing}{1.20} \beginnumbering \pstart \lipsum[1-3] \edtext{test}{\Afootnote{A somewhat lengthy footnote. We need it to be a bit longer, so that we have at least two lines. And a bit longer even, such that it will go into a third line. Some more filler text.}} \edtext{test}{\Afootnote{A somewhat lengthy footnote. We need it to be a bit longer, so that we have at least two lines. And a bit longer even, such that it will go into a third line. Some more filler text.}} \edtext{test}{\Afootnote{A somewhat lengthy footnote. We need it to be a bit longer, so that we have at least two lines. And a bit longer even, such that it will go into a third line. Some more filler text.}} \lipsum[4] \pend \endnumbering \end{Spacing} \end{document} The last two lines, 33 and 34, should have been printed on the next page in order to make room for the critical apparatus below. [Supplement to the revised question:] It took a while figuring out what was going on. Thus below some earlier parts of the question, to which some of the comments to it relate, with a much more complex example: Up until recently, I was not able to use reledmac's paragraphed footnotes with Devanāgarī text due to a bug. With a workaround, I can start using them now, but in several places the critical apparatus now extends over the page footer, as here: EDIT September 30: Here my changed, still not very Minimal WE. I will try to isolate the problem more. But for now, I have for the purpose of the example only changed the font from Pedantic Devanagari, which I had employed due to its feature of applying formatting such as bolding on the sub-syllabic (sub-akṣara) level which however I am currently not using, for which reason we also have the many bolding commands which presently are set to not do anything, to the more common Shobika font. As the pages render differently, I had to add some extra text both to the running text as well as as to the critical apparatus to reproduce the problem. Furthermore, I'm now loading the showframe package to show where the textbox should actually be ending. In my understanding, LaTeX should start a new page after line 5 of the commentary on verse 38 (३८), but that would lead to the last two lines of the paragraph being displayed on page two. Would that already be considered a widow? In any case, the apparatus pushing even below the footer is far worse than a widow. \documentclass[11pt,article,a4paper,oneside]{memoir} \setstocksize{230mm}{150mm} \settrimmedsize{230mm}{150mm}{*} \setulmarginsandblock{34mm}{20mm}{} \setlrmarginsandblock{20mm}{20mm}{} \checkandfixthelayout \usepackage{showframe} \usepackage[english]{babel} \babelprovide[% typography/prehyphenchar = `-, transforms=transliteration.iast, ]{sanskrit} \babelfont{rm}[Renderer=HarfBuzz]{Libertinus Serif} \babelfont[*devanagari]{rm}{Shobhika}%{PedanticDevanagariLight.otf}[Script=Devanagari,BoldFont={PedanticDevanagariBold.otf}] \babelprovide[import=sa, hyphenrules=sanskrit, typography/prehyphenchar = `-, % onchar=ids ]{sanskrit-latin} \babelfont[sanskrit-latin]{rm}{Libertinus Serif}[Renderer=HarfBuzz] \NewDocumentCommand{\textsanskrit}{m}{\foreignlanguage{sanskrit-latin}{#1}} \NewDocumentCommand{\sktd}{m}{\foreignlanguage{sanskrit}{#1}} \newcommand{\skti}[1]{\emph{\textsanskrit{#1}}} \newcommand{\sktr}[1]{\textsanskrit{#1}} \newcommand{\sktt}[1]{\emph{\textsanskrit{#1}}\index{\emph{\textsanskrit{#1}}{}}} \newcommand{\sktw}[1]{\emph{\textsanskrit{#1}}\index{\emph{\textsanskrit{#1}}{}}} \newcommand{\sktn}[1]{\textsanskrit{#1}\index{\textsanskrit{#1}{}}} \makeatletter \NewDocumentCommand\SwitchToCommentary{}{ \endnumbering \bigskip \beginnumbering \renewcommand\linenumrep[1]{\foreignlanguage{english}{\@arabic{##1}}} \setcounter{firstlinenum}{3} \setcounter{linenumincrement}{3} \pstart \patchcmd{\endquote}{\vskip\topsep}{\relax}{}{} \noindent } \NewDocumentCommand\SwitchToVerse{}{ \pend \endnumbering \bigskip \beginnumbering \setcounter{firstlinenum}{1000} \linenumberstyle{alph} } \newcommand\sa[1]{\foreignlanguage{sanskrit}{#1}} \newcommand\en[1]{\foreignlanguage{english}{#1}} \NewDocumentCommand{\devjoin}{o m m}{#2#3} \newcommand\danda{.} \newcommand\ddanda{..} \newcommand\emend{\mbox{\en{em.}}} \newcommand\ENdot{} \newcommand{\abbr}{-} \newcommand\Lpc{\en{L$^{pc}$}} \newcommand\Lac{\en{L$^{ac}$}} \newcommand\mh{\en{MH07}} \newcommand\bti{\en{BTI}} \newcommand\conj{\mbox{\en{conj.}}} \newcommand\Ldot{\en{L}} \newcommand\msln[1]{% \@bsphack \@esphack } \newcommand\KAbold[1]{#1} \newcommand\commpratikaseparator{..} \newcommand\KAquestion{\danda} \newcommand{\zwnj}{\char"200C} \newcommand\KAcomma{\zwnj} \newcommand{\devjoinPB}{} \begingroup \catcode`\&=\active \gdef\devjoinPB#1#2{- & #1#2} \endgroup \newcommand\KAcommaAnusvaara{% ṃ% \@bsphack \@esphack } \newcommand\stringhole{% \@bsphack \@esphack } \makeatother \usepackage{circledsteps} \usepackage{reledmac} \setlength{\stanzaindentbase}{\leftmargin} \setstanzaindents{4,1,2,1,2,3,3,1,2,1} \setstanzapenalties{1,10000,5000,10000,0} \numberstanzatrue \renewcommand{\stanzanumwrapper}[1]{} \newcounter{stanzanum} \Xstanza \Xnotenumfont{\selectlanguage{english}} \Xstanzaseparator[A]{.} \Xstanzaseparator[B]{} \Xstanzaseparator[C]{.} \Xstanzaseparator[D]{.} \Xarrangement[]{paragraph} % Keep the footers in English even if we're in a Sanskrit environment \newcommand{\fixedtoday}{\english{}} \edef\fixedtoday{\today} \makepagestyle{mydraft} \makeevenfoot{mydraft}{}{\en{\normalfont\ttfamily\fontsize{8bp}{10bp}\selectfont\jobname\ \ \fixedtoday\ \ \printtime\ \ Page \thepage}}{} \makeoddfoot{mydraft}{}{\en{\normalfont\ttfamily\fontsize{8bp}{10bp}\selectfont\jobname\ \ \fixedtoday\ \ \printtime\ \ Page \thepage}}{} %\pagestyle{mydraft} \newtoggle{draft-mode} \toggletrue{draft-mode} %\togglefalse{draft-mode} \iftoggle{draft-mode}{\pagestyle{mydraft}}{} \usepackage{multicol} \usepackage{docmute} \usepackage[hidelinks]{hyperref} % Workaround for bug which otherwise makes paragraphed footnotes % impossible with Devanāgarī, see % https://github.com/latex3/luaotfload/issues/317#issuecomment-5764124744 \directlua{ local direct = node.direct local disc_t, whatsit_t = node.id("disc"), node.id("whatsit") local function strip_disc_whatsits(head) for n in direct.traverse_id(disc_t, head) do local replace = direct.getfield(n, "replace") if replace then for w in direct.traverse_id(whatsit_t, replace) do replace = direct.remove(replace, w) end direct.setfield(n, "replace", replace) end end return head end luatexbase.add_to_callback("pre_linebreak_filter", function(head) return direct.tonode(strip_disc_whatsits(direct.todirect(head))) end, "remove whatsits from discs") } \begin{document} \begin{otherlanguage}{sanskrit} \setSingleSpace{1.20} \SingleSpacing \beginnumbering \setcounter{firstlinenum}{1000} \linenumberstyle{alph} \setlength{\stanzaindentbase}{0pt} \Large \setcounter{stanza}{36} \stanza ratiṃ dadhat tilakapade kṛtāspadaḥ & kapolayoś ciram atha cumbitastanaḥ \danda{} & dhṛtāyatir vapur abhito 'bhiṣasvaje & natabhruvāṃ salilabharo nidāghajaḥ \ddanda{} 37 \ddanda{} \& \SwitchToCommentary {}\msln{78b5}% \KAbold{rati}\commpratikaseparator{} \KAbold{nidāghajo} \edtext{gharmajaḥ \KAbold{salilabharo}}{% \lemma{gharmajaḥ salilabharo}\Cfootnote{\emend{}; gharmajasya lilabharo \Ldot{}}} \KAbold{natabhruvāṃ} \msln{6} strīṇāṃ satkaṃ \KAbold{vapur abhiṣasvaje} samāliliṅga. katham\KAquestion{} abhitaḥ \edtext{samantāt}{\Cfootnote{\emend{}; samāntāt \Ldot{}}}. kīdṛśo 'sau\KAquestion{} \KAbold{tilakapade} lalāṭe \KAbold{ratiṃ} dhṛtiṃ \KAbold{dadha}\devjoin[BR]{d}{bi}bhrāṇaḥ. tathā \KAbold{kapolayoḥ kṛtāspadaḥ} \msln{7} \edtext{tasthivān}{ \lemma{tasthivān} \Cfootnote{\conj{}; tatasthirān san \Ldot{}} }.% kiñca\KAcomma{} \KAbold{athā}nantaraṃ \KAbold{cumbitau} śliṣṭau \KAbold{stanau} yena\KAcomma{} sa tathā. tathā\KAcomma{} \KAbold{dhṛtāyati}\devjoin[BR]{r}{vi}stāro yena\KAcomma{} sa evam. anyo 'pi kāntāyā evaṃ kurva%n \edtext{\devjoin{nn}{ā}liṅganaṃ}{ \lemma{āliṅganaṃ} \Cfootnote{\emend; āliṅgana \Ldot}} kuruta \edtext{i\msln{79a1}ti}{\Cfootnote{iti \emend{}; i\msln{79a1} \Ldot{}}} śleṣacchāyā~\ddanda{}37\ddanda \SwitchToVerse \setlength{\stanzaindentbase}{0pt} \Large \stanza mṛgīdṛśāṃ rucitakacācitair api & smitodayād ativikacatvam āgataiḥ \danda{} & sugandhibhiḥ \edtext{sadalikatā\devjoin{m}{a}}{ \lemma{sadalikatām} \Bfootnote{\bti; sadalitatām \mh{}\ENdot} }pi śritai\devjoinPB{r}% & {da}dhe mukhair asadalikatvam agrataḥ \ddanda{} 38 \ddanda{} \& \SwitchToCommentary {}\msln{79a1}% \KAbold{mṛgī}\commpratikaseparator{} hariṇākṣīṇāṃ \KAbold{mukhaiḥ} \edtext{\KAbold{sugandhibhiḥ}}{% \lemma{sugandhibhiḥ} \Cfootnote{\Lpc{}; sugandhiḥ \Lac{}\ENdot} } sadbhir agrato rasanto \KAbold{'layo} yeṣā\KAcommaAnusvaara{} tāny eva\KAcommaAnusvaara{} tadbhāvaḥ % ta\devjoin[RB]{t}{tvaṃ} \edtext{\KAbold{dadhe}}{\lemma{dadhe}\Cfootnote{\conj{}; babhre \Ldot{}}} dhṛtam. kīdṛśaiḥ\KAquestion{} \KAbold{santi} śobhanā% \devjoin[RB]{ny}{a}% \KAbold{likāni} lalaṭāni yeṣu\KAcomma{} tadbhāvas ta\devjoin[RB]{t}{tā}\KAcomma{} tā\devjoin[RB]{m}{a}\KAbold{pi} \KAbold{śritaiḥ}. \edtext{apiḥ}{\Cfootnote{\emend; api \Ldot}} śrutiviruddhatām āha. \edtext{asadalikatvaṃ}{\Cfootnote{\conj; sadalikatātvaṃ \Ldot}} kathaṃ dhriyate\KAquestion{} kiñca\KAcomma{} \KAbold{rucirāḥ} \KAbold{kacāḥ} \edtext{keśāḥ}{\Cfootnote{\emend{}; keśā \Ldot{}}}\KAcomma{} tai\devjoin[RB]{r}{ā}\KAbold{citāni} yā\msln{3}ni\KAcomma{} tair evam. \edtext{smitodayā\devjoin[BR]{d}{dhe}}{% \lemma{smitodayād} \Cfootnote{\emend; smṛtodayād \Ldot} }% to\devjoin[RB]{r}{a}\KAbold{tivikacatvaṃ} vikāsitva\stringhole{}%m \edtext{\devjoin[RB]{m}{ā}\KAbold{gataiḥ}}{% \lemma{āgataiḥ} \Cfootnote{\Lpc{}; āgataiḥ \Lac{}\ENdot} }. ihāpy api \edtext{\devjoin{s}{ta}ttvato}{ \lemma{tattvato} \Cfootnote{\emend; tattvata \Ldot}} yāni \edtext{kacācitāni}{\Cfootnote{\emend; kacāni \Ldot}}\KAcomma{} \edtext{tāni}{\Cfootnote{\emend; tāna \Ldot{} kiṃcit kiṃcit kiṃcit | kiṃcit kiṃcit kiṃcit | kiṃcit kiṃcit kiṃcit | kiṃcit kiṃcit kiṃcit | kiṃcit kiṃcit kiṃcit | kiṃcit kiṃcit kiṃcit | kiṃcit kiṃcit kiṃcit | kiṃcit kiṃcit kiṃcit | }} kathaṃ vigatakacatvaṃ yāntīti~% \ddanda{}~38~\ddanda kiṃcit kiṃcit kiṃcit kiṃcit kiṃcit kiṃcit kiṃcit kiṃcit \SwitchToVerse \setlength{\stanzaindentbase}{0pt} \Large \stanza nitambinīmukhakamaleṣu sālasāṃ & dṛśoḥ sthitiṃ param upadiśya vallabhaiḥ \danda{} & athādadhe pulakapayobhir anvaya\devjoinPB{s}% & {ta}dīkṣaṇavyasaniṣu nāyakeṣv api \ddanda{} 39 \ddanda{} \& \SwitchToCommentary {}\msln{79a4}% \KAbold{nita}\commpratikaseparator{} \KAbold{pulakapayobhir nitambinīmukha}\edtext{\KAbold{kamaleṣu}}{% \lemma{\abbr{}kamaleṣu}\Cfootnote{\emend{}; \abbr{}kamale \Ldot{}}} \edtext{\KAbold{dṛśo}\devjoin[BR]{r}{a}}{% \lemma{dṛśor} \Cfootnote{\Lpc{}; dṛśoru \Lac\ENdot} }% a kṣṇo\stringhole{}ḥ \KAbold{sālasāṃ} \KAbold{sthitiṃ} \KAbold{paraṃ} su\devjoin[RB]{ṣṭh}{ū}\KAbold{padiśya} saṃkrama%yya \edtext{\devjoin[RB]{yy}{ā}\KAbold{tha}}{ \lemma{atha} \Cfootnote{\emend{}; adhva \Ldot{}}} \edtext{\KAbold{nāyake}\devjoin[BR]{ṣv}{a}}{% \lemma{nāyakeṣv} \Cfootnote{\emend{}; nāya\danda{}keṣv \Ldot{}} }% nvayaḥ paricaya \msln{5} \KAbold{ādadhe} kṛtaḥ. te 'pi tadvanto jātā iti bhāvaḥ. kīdṛśais taiḥ\KAquestion{} \edtext{\KAbold{vallabhai}\devjoin[BR]{r}{a}}{% \lemma{vallabhair} \Cfootnote{\Lpc{}; vallabhaiḥ \Lac{}\ENdot} }%a bhipretaiḥ. kīdṛśeṣu nāyakeṣu\KAquestion{} \KAbold{tāsām īkṣaṇe} vilokane \KAbold{vyasaniṣu} \msln{6} rāgiṣu \ddanda{}~39~\ddanda \pend \endnumbering \end{otherlanguage} \end{document} I don't quite understand what exactly causes this issue. If I change the language-switching environment containing the edition to sanskrit-latin, the problem does not seem to occur. If I comment out the page-layout-specific commands, it does not occur either, and also not if I do not increase the line spacing at the beginning of the Sanskrit environment.
- Proof environment already defined with \DocumentMetadata{pdfstandard=UA-2}by Gaussler on September 28, 2026 at 12:04 pm
I just updated to TeX Live 2026. Now when I compile the following, I get ! LaTeX Error: Command \proof already defined. The problem disappears if I remove the \DocumentMetadata line: \DocumentMetadata{pdfstandard=UA-2} \documentclass{article} \usepackage{amsmath} \usepackage{ntheorem} \theoremstyle{nonumberplain} \newtheorem{proof}{Proof} \begin{document} You want proof? \end{document}
- Macro which prints input only if all internal invocations of a second macro are non-blank?by modallyFragile on September 28, 2026 at 9:11 am
I want to define two macros, let's call them \coalesce and \coalescegroup. \coalescegroup is only ever used within \coalesce (names are inspired by the Postgres command). \coalesce prints its input if and only if every instance of \coalescegroup within that input prints something non-blank (where blankness is tested by \tl_if_blank:nTF or a variant). Otherwise it discards its input. \coalescegroup divides its input at every instance of some delimiter -- say \coalesceor, and then prints the first division which is not blank (by the same test). If all are blank, it prints nothing. The motivation is templating in class files. I maintain class files for things like handouts and syllabi, where I often want to do things like print 'my email is ', but only if my email is defined. Usually that would be something like \ifblank{\email}{}{My email is: \email} but with coalesce it can be \coalesce{My email is: \coalescegroup{\email}}, which to me makes much more sense. I also like the idea of setting up active characters for these things within coalesce, so that the last example could be written \coalesce{My email is: <\email>}, but that's a separate issue. How can I do this? Below is a MWE of what I've tried so far. I feel like it's close, but not quite there. My idea was to define \coalesceor to evaluate to itself, then define \coalescegroup to exhaustively expand its input, split it on \coalesceor (which will survive the expansion, because it expands to itself), then map over the result and print the first non-blank element, or the token \__coalesce_stop if they're all blank. Then \coalesce uses the same trick: define \__coalesce_stop to expand to itself, \coalesce then just expands its input, checks to see if the resulting token list includes \__coalesce_stop, and prints it all just if it doesn't. I think the basic idea is probably OK, but I can't get the expl3 details right. \documentclass{article} \ExplSyntaxOn % First attempt at coalescegroup % Define a boolean for 'already done' \bool_new:N \__coalesce_coalescegroup_bool % Processor for arguments \cs_new:Npn \__coalesce_coalescegroup_step #1 { \bool_if:NF \__coalesce_coalescegroup_bool \tl_if_blank:nF #1 % If the group isn't blank, then ... % ... we will (eventually) print this arg. {\tl_set:Nn \tl_tmpa_tl {#1} % ... and set the boolean. \bool_set_true:N \__coalesce_coalescegroup_bool } } % Disjunction token \cs_new:Npn \coalesceor { \exp_not:N \coalesceor } \NewDocumentCommand{\coalescegroup}{ m }{ \bool_set_false:N \__coalesce_coalescegroup_bool % Set the scratch list a to be empty. \tl_set:Nn \tl_tmpa_tl {\__coalesce_stop} \tl_set:Nn \tl_tmpb_tl {\exp_args:Ne {\SplitList{\coalesceor}} { #1 }} \ProcessList \tl_tmpb_tl { \__coalesce_coalescegroup_step } % Print the output \tl_tmpa_tl } % Second attempt \NewDocumentCommand{\newcoalescegroup}{ >{\SplitList{\coalesceor}} m }{ \tl_new:N \coalescegroup_output_tl \tl_set:Nn \coalescegroup_output_tl \__coalesce_stop \tl_set:Nn \tl_tmpa_tl {\exp_args:ne { #1 }} \tl_map_inline:Nn \tl_tmpa_tl { % If the token is non-empty ... \tl_if_blank:nF #1 { % ... then write it to output var \coalescegroup_output_tl \tl_set:Nn \tl_tmpa_tell #1 % ... and break. \tl_map_break: } } % Leave result in the input stream \coalescegroup_output_tl } % Blocker token \cs_new:Npn \__coalesce_stop { \exp_not:N \__coalesce_stop } \NewDocumentCommand{\coalesce}{ m }{ % Print nothing if the blocker cs is found. \exp_args:Ne \tl_if_in:nnTF { #1 } \__coalesce_stop {} { #1 } } \ExplSyntaxOff % Testing values \def\blank{} \def\something{something} \begin{document} \section{First attempt} % Should print nothing, prints `foo bar' \coalesce{foo \coalescegroup{\blank} bar} % Should print nothing (because the second coalesce group fails), % prints `foo something bar baz' \coalesce{foo \coalescegroup{\something} bar \coalescegroup{\blank} baz} % Should print `foo something bar', and does! \coalesce{foo \coalescegroup{\blank \coalesceor \something} bar} % Should print `foo literal bar', and does! \coalesce{foo \coalescegroup{\blank \coalesceor literal} bar}\ \section{Second attempt} % Should print nothing, prints `foo bar' \coalesce{foo \newcoalescegroup{\blank} bar} % These all produce Error: Control sequence \coalescegroup_output_tl % already defined: % % \coalesce{foo \newcoalescegroup{\something} bar \newcoalescegroup{\blank} baz} % \coalesce{foo \newcoalescegroup{\blank \coalesceor \something} bar} % \coalesce{foo \newcoalescegroup{\blank \coalesceor literal} bar} \end{document} TIA.
- MLTeX and encTeX interactionby lodwicz on September 27, 2026 at 7:34 pm
I know that modern 8bit TeX implementations (TeXLive) may enable both MLTeX and encTeX extensions. My question is thus both technical and historical. I am enabling all three extensions (with eTeX) for some custom Plain pdfTeX macros, but I'd like to understand the processing order, and thus the interaction, amongst these extensions in terms of reencoding and hyphenation. So, assume I have an hyphenation pattern including with 1n defined in the format, that I have a pdfTeX with all three extensions enabled, and I reencode and substitute ñ, as follows, to enable UTF-8 input: \mubyte ^^D1 ^^C3 ^^91 \endmubyte % Ñ \mubyte ^^F1 ^^C3 ^^B1 \endmubyte % ñ \charsubdef ^^D1 = '176 ^^4E % Ñ \charsubdef ^^F1 = '176 ^^6E % ñ My actual question is this: in this case, it is clear to me that the hyacc-cm macros, to enable hyphenation in the remaining part of a composite word (say: "pi-ña-ta"), are unnecessary to enforce hyphenation even in Computer Modern fonts, if I define the \chars for Latin1 and compatible encodings as follows: \catcode^^D1=\active \catcode^^F1=\active \def^^D1={\~N} \def^^F1={\~n} I ran some experiments to check whether this was true, rather successfully, but I cannot understand exactly why. I haven't seen (maybe haven't searched enough for) any explanation of the interaction between MLTeX and encTeX that explains this behavior. update However, I found that without the UTF8 definitions from llist-latin.tex, in the Knuth local/lib directory, the character does not show up. MNWE as follows: \input pdftex.ini \font\ttfont= cmtt8 \font\syttfont= cmtex10 at 8pt \mubyte ^^D1 ^^C3 ^^91 \endmubyte % Ñ \mubyte ^^F1 ^^C3 ^^B1 \endmubyte % ñ \charsubdef "D1 = '176 "4E % Ñ \charsubdef "F1 = '176 "6E % ñ \catcode"D1=\active \catcode"F1=\active \def^^D1={\~N} \def^^F1={\~n} piñata \newcount\n \catcode`\^^c3=\active \def\missing{{\syttfont\char15}} \def^^c3#1{\n=`#1\advance\n by-128 {%\ttfont \ifcase\n \`A\or\'A\or\^A\or\~A\or\"A\or\AA\or\AE\or\c C\or \`E\or\'E\or\^E\or\"E\or\`I\or\'I\or\^I\or\"I\or \missing\or\~N\or\`O\or\'O\or\^O\or\~O\or\"O\or{\syttfont\char2}\or \O\or\`U\or\'U\or\^U\or\"U\or\'Y\or\missing\or\ss\or \`a\or\'a\or\^a\or\~a\or\"a\or\aa\or\ae\or\c c\or \`e\or\'e\or\^e\or\"e\or\`\i\or\'\i\or\^\i\or\"\i\or \missing\or\~n\or\`o\or\'o\or\^o\or\~o\or\"o\or{\syttfont\char4}\or \o\or\`u\or\'u\or\^u\or\"u\or\'y\or\missing\or\"y\fi}} piñata \bye Somehow the diacritic letter does not show up. Run with pdftex -ini -8bit -ml -enc -etex test as usual. My best guess is that the \mubyte/\endmubyte, \charsubdef code might work for other purposes, and the macro definitions are still required. Some references to some documentation are surely welcome.
- Align the equal sign of two groups `aligned` with two tagsby myhsia on September 27, 2026 at 5:45 pm
Two aligned environments inside two equation environments (obviously, two tags), now I want to align the 4 = signs. I know I can place the middle text inside the \shortintertext or \intertext provided by the mathtools package, but how to keep only 2 numbered tags keep in the middle of each aligned group vertically? \documentclass{article} \usepackage{mathtools} \begin{document} some text \begin{equation}\label{eq:eta_quantum} \begin{aligned} abc & = defghij\\ & = \int f(x) dx, \end{aligned} \end{equation} some text \begin{equation}\label{eq:eta_classical} \begin{aligned} defghi & = defghij\\ & = \int f(x) dx, \end{aligned} \end{equation} \end{document}
- Why does combining TikZ `patterns` and `fadings` cause rendering problems in some PDF viewers?by kabenyuk on September 27, 2026 at 3:47 pm
I have come across an interesting difference in how a PDF produced by TikZ is rendered by different PDF viewers. The following MWE isolates the issue: \documentclass{article} \usepackage{tikz} \usetikzlibrary{patterns,fadings} \begin{document} \begin{tikzpicture} % Pattern only \fill[draw,pattern=north west lines] (0,0) rectangle (3,.4); % Fading only \fill[draw,path fading=east] (0,-1) rectangle (3,-.6); % Pattern + fading \fill[draw,pattern=north west lines,path fading=east] (0,-2) rectangle (3,-1.6); \end{tikzpicture} \end{document} Left: Adobe Acrobat. Right: WinEdtPDF. The same PDF file is shown in both viewers. In WinEdtPDF the first two rectangles are rendered correctly. The problem appears only in the third one, where pattern=north west lines and path fading=east are used together: the hatching is not rendered correctly. Thus, pattern=north west lines works by itself, and path fading=east works by itself. The rendering difference appears only when the two TikZ mechanisms are combined. The same PDF is rendered correctly in Adobe Acrobat, Microsoft Edge, and Firefox. The same defect as in WinEdtPDF is also visible in Google Drive's PDF preview. I initially reported this to the WinEdt developer. Alex Simonic explained that WinEdtPDF uses PDFium for rendering and that the behavior observed there is a limitation of PDFium rather than of WinEdtPDF itself: https://github.com/WinEdt-Team/WinEdt-Support/discussions/131#discussioncomment-18627725 So my question is about the TikZ/PDF side of this behavior: what does TikZ write into the PDF when a pattern and path fading are combined, and what is special about this construction that makes different PDF rendering engines handle it differently?
- How to adjust the width and height of underbracket and overbracket with LuaLaTeX?by Mika Ike on September 26, 2026 at 10:17 pm
Mathtools package admits width and height adjusts with PDFLaTeX, but with LuaLaTeX width and height is not adjustable. How to adjust or use native mathtools? \documentclass{article} \usepackage[spanish,es-notilde]{babel} \usepackage{amsmath,amssymb,mathtools} % amssymb, en LuaLaTeX, debe cargarse antes que unicode-math \usepackage{fontspec} \usepackage{unicode-math} \setmainfont{TeX Gyre Pagella} \setmathfont{TeX Gyre Pagella Math} \usepackage{xcolor} \begin{document} \[ B(x)\underbracket[0.5pt]{A(z)}_{\text{Esto es una prueba}}C(w) B(x)\underbracket{A(z)}_{\text{Esto es una prueba}}C(w) \] \[ B(x)\overbracket[0.5pt]{A(z)}^{\text{\footnotesize Esto es una prueba}}C(w) B(x)\overbracket{A(z)}^{\text{\footnotesize Esto es una prueba}}C(w) \] \end{document}
- How to adjust the placement of the chemical reaction arrows in chemmacros so that it is horizontally aligned with the center of the chemfig figures?by alayne on September 26, 2026 at 4:25 pm
I need to show the structure of the products and reactants in a chemical equation. However, the arrow is not horizontally aligned to the center of the chemical figures. Here is the commands: \documentclass[12pt]{article} \special{papersize=3in,5in} \usepackage{chemmacros} \usepackage{chemfig} \usepackage[version=4] {mhchem} \begin{document} \begin{reaction*} \chemfig{(-[:210])(-[:330]OH)} ->[O] \chemfig{(-[:210])(=[:330]O)} \end{reaction*} \end{document}
- Adding -\infty and +\infty using nl-intervalby Sebastiano on September 26, 2026 at 12:40 pm
Is there a remote possibility to have, -\infty and +\infty, below the real line using only the package nl-interval? \documentclass{article} \usepackage{nl-interval} \begin{document} \begin{tikzpicture} \nlAxisX{-2}{5} \nlnuminf[pattern=north west lines]{1.5}[+3]{c}[.2] \end{tikzpicture} \begin{tikzpicture} \nlAxisX{-2}{5} \nlinfnum[pattern=north west lines]{1}[-5]{o}[.2] \end{tikzpicture} \begin{tikzpicture} \nlAxisX{-2}{5} \nlnumnum{-1}{o}{3}{c}[.2] \end{tikzpicture} \end{document}
- why is TeX capacity exceeded with \DocumentMetadata{tagging=off}?by murray on September 26, 2026 at 1:34 am
This source compiles just fine with the line \DocumentMetadata{tagging=off} commented out, as shown. Why, if I uncomment that line, do I get a "TeX capacity exceeded" at line 15, and how can this be fixed? \NeedsTeXFormat{LaTeX2e}[2026-06-01] % !TEX program = lualatex %\DocumentMetadata{tagging=off} \documentclass{book} \usepackage{fontspec} \usepackage{lua-unicode-math} \usepackage[thmtools-compat]{keytheorems} \newkeytheoremstyle{thmstyle}{} \AtBeginDocument{\newkeytheorem{theorem}[name=Theorem,style=thmstyle,numberwithin=chapter]} \usepackage{hyperref} \begin{document} \chapter{A chapter} \section{The section} \begin{theorem}[A key theorem] Some theorem text \end{theorem} \end{document}
- Producing the Thirteen Stars' Distribution on the 1777 American Flagby DDS on September 25, 2026 at 11:48 am
This is an extension of Replacing a Circle of Asterisks with Tikz Colored Stars Consider the code: \documentclass{book} \usepackage{tikz} \usetikzlibrary{shapes.geometric} \definecolor{thisblue}{RGB}{10,49,97} %\definecolor{thisred}{RGB}{179,25,66} \begin{document} \thispagestyle{empty} \pagecolor{thisblue} \noindent {\LARGE\bfseries{\textcolor{white}{Twelve even-spaced stars:}}} \vspace{10pt} \begin{center} \begin{tikzpicture} \foreach \k in {0,30,...,330} \node[ shape=star, star points=5, star point ratio=2.5, minimum size=0.8cm, fill=white, draw=white ] at (\k:3.5cm) {}; \end{tikzpicture} \end{center} \vspace{40pt} \noindent {\LARGE\bfseries{\textcolor{white}{Supposed to be thirteen even-spaced stars:}}} \vspace{10pt} \begin{center} \begin{tikzpicture} \foreach \k in {0,27.69,55.38,...,332.28} \node[ shape=star, star points=5, star point ratio=2.5, minimum size=0.8cm, fill=white, draw=white ] at (\k:3.5cm) {}; \end{tikzpicture} \end{center} \end{document} which produces: The first problem (regarding the second set of stars) is that there are only twelve stars (not thirteen). The second problem should be (the way I thought I have estimated it) should be roughly according to the thirteen (original colonies) represented as stars in the original (Betsy Ross) flag (See: Betsy Ross Flag): QUESTION: What am I doing wrong? How may I replicate the star-distribution on Betsy Ross' flag? (Incidentally, I still do not understand how my code did not display thirteen stars for the second figure.) Thank you.
- Drawing a rectangular box in three different orientations with TikZby Sebastiano on September 24, 2026 at 7:26 pm
I am preparing some physics exercises about pressure, and I would like to illustrate a rectangular box that can be placed on each of its three different faces. In this way, the same box would have three different base areas, while its dimensions remain unchanged. For example, my box has dimensions: 23 cm, 24 cm, 46 cm I would like to create the three possible orientations of the box with TikZ, so that in each drawing a different face is touching the ground. At the moment, I have this code for one orientation: \documentclass{article} \usepackage[margin=0.5in]{geometry} \usepackage{tikz} \begin{document} \begin{center} \begin{tikzpicture}[x=0.027cm,y=-0.027cm,line width=0.35pt,draw=black!75] \draw (77,123)--(77,199)--(146,231)--(281,163)--(281,110); \draw (146,156)--(146,231); \draw (212,55)--(212,122); \draw (77,123)--(60,84)--(126,117)--(146,156)--cycle; \draw (77,123)--(51,96)--(186,27)--(212,55)--(109,109); \draw (212,55)--(232,16)--(301,48)--(281,87)--cycle; \draw (146,156)--(281,87)--(319,91)--(184,160)--cycle; \draw[<->] (66,126)--(66,198); \draw[<->] (72,210)--(141,242); \draw[<->] (151,242)--(286,173); \node[rotate=-90,inner sep=0pt,font=\small] at (57,160) {23 cm}; \node[rotate=-25,inner sep=0pt,font=\small] at (101,233) {24 cm}; \node[rotate=27,inner sep=0pt,font=\small] at (227,213) {46 cm}; \end{tikzpicture} \end{center} \end{document} Is there a relatively simple way to modify this code (or to define a reusable TikZ command) so that I can obtain the other two orientations of the same box, with the 23 cm, 24 cm, and 46 cm dimensions exchanged accordingly? Ideally, I would like to be able to write something like \boxorientation{23}{24}{46} and obtain the corresponding drawing, or otherwise have a convenient way to generate the three possible orientations. The purpose is to use the drawings in physics exercises about pressure, where the students have to calculate the pressure exerted by the box when it rests on each of its three possible bases.
- Modern Scientific illustrations: what can we "show off" now that wasn't possible 12 years ago?by DJP on September 23, 2026 at 1:05 am
There is a highly popular post from 2014 showcasing Nice scientific pictures show off but a lot has changed with LaTeX over the last 12 years. What is your best science picture to show off now that wasn't possible 12 years ago? Constraints for each answer: The Picture & Code: Show off a beautiful scientific illustration that utilizes features, packages, or engine capabilities (e.g., LuaLaTeX memory handling, modern pgfplots limits, Luametafun) that remove barriers which routinely stopped typical users from doing this 12 years ago (such as hard memory crashes, lack of default ecosystem support, or prohibitive manual workarounds). The Evolution: You must explicitly explain what technological progress or package developmentover the last decade made this picture possible today. AI usage is allowed, but must be acknowledged per community guidelines.