Hot
- How to dig holes on a three-dimensional curved surface using LuaDraw?by Explorer on November 1, 2026 at 4:23 pm
Here is the follow-up of my previous answer. Now, I want to focus on the holes on the surfaces. zoom in, we could see the details: \documentclass{standalone} \usepackage[3d]{luadraw} \usepackage[svgnames]{xcolor} \usepackage{fourier-otf} \begin{document} \begin{luadraw}{name=gaussian_surface} local ld = luadraw local pt3d, cpx = ld.pt3d, ld.cpx local M, Mc, Ms = pt3d.M, pt3d.Mc, pt3d.Ms local Origin, vecI, vecJ, vecK = pt3d.Origin, pt3d.vecI, pt3d.vecJ, pt3d.vecK local exp = math.exp local pi, cos, sin = math.pi, math.cos, math.sin local h = 0.025 -- half height of the border local g = ld.graph3d:new{ window3d = {-2,2,-2,2,-2.5,2.5,1,1,1.75},window = {-4,4,-4,4}, size = {12,12},viewdir = {-60,55} } local wI, wmax = 0.45, 1 local f = function(x,y) return -exp(-(x*x+y*y)/1.3) end local top = ld.cartesian3d(function(x,y) return h+wI*f(x,y) end,-2,2,-2,2,{50,50}) local bottom = ld.cartesian3d(function(x,y) return -h+wmax*f(x,y) end,-2,2,-2,2,{50,50}) --- begin local cx, cy = 0.5, 1 local a, b, n = 0.4, 0.25, 50 local base = {} for k = 0, n-1 do local t = 2*pi*k/n base[k+1] = M(cx+a*cos(t),cy+b*sin(t),-2) end local cutter = ld.prism(base,M(0,0,4)) top = ld.clip3d(top,cutter,true) bottom = ld.clip3d(bottom,cutter,true) --- end local front = ld.surface(function(s,t) return M(s,-2,(1-2*t)*h+(wI+t*(wmax-wI))*f(s,-2)) end,-2,2,0,1,{50,2}) local back = ld.surface(function(s,t) return M(s,2,(1-2*t)*h+(wI+t*(wmax-wI))*f(s,2)) end,-2,2,0,1,{50,2}) local left = ld.surface(function(s,t) return M(-2,s,(1-2*t)*h+(wI+t*(wmax-wI))*f(-2,s)) end,-2,2,0,1,{50,2}) local right = ld.surface(function(s,t) return M(2,s,(1-2*t)*h+(wI+t*(wmax-wI))*f(2,s)) end,-2,2,0,1,{50,2}) local limits = {-1.75*(h+wmax),0} g:Dmixfacet( top, { mode = ld.mFlat, edgecolor = "gray!25", edgewidth = 2, usepalette = {ld.palRainbow,"z",limits} }, bottom, {}, front, {}, back, {}, left, {}, right, {} ) g:Show() \end{luadraw} \end{document} The cuttter here was not what I want, it gives: What I would prefer is that the cut here should only remove the thick upper layer of the curved surface, rather than completely removing the entire upper and lower curved surfaces. And I have no idea on how to get the thickeness here similar to this hollowed-out sphere example.
- How to reduce the size of chapter names?by Rup_LA on November 1, 2026 at 4:01 pm
I am writing a project report in report environment. I would like to keep the title in LARGE style. Now when I give the chapter names using \chapter, the font size of the chapter names get bigger than that of the title of the report, which does not look good to me. So is there any way to reduce the size of the chapter names keeping the title and other font sizes intact ? \documentclass[a4paper,12pt]{report} \usepackage{amsmath,amssymb,amsthm} \begin{document} \thispagestyle{empty} \begin{center} \LARGE \textbf{A study on Algebraic Connectivity \\ and Spectral Integral Variation of Graphs} \end{center} \newpage \thispagestyle{empty} \tableofcontents \newpage \chapter{Introduction and Preliminaries} \section{Introduction} \subsection{Spectrum of a Graph} \begin{thebibliography}{33} \bibitem Fan Y., On spectral integral variation of graphs. \end{thebibliography} \end{document} I would also like to reduce the sizes of "Contents" and "References" appearing in the document as same as that of Chapter names.
- LaTeX Error: Command \c@Dm already defined with thmtools sibling counters after recent LaTeX kernel updatesby Sebastiano on November 1, 2026 at 1:44 pm
I am opening an old project after 5 months, using a preamble file called prol2025.tex that used to work perfectly until recently. Now, when compiling my main document, the compilation stops with the following error: ! LaTeX Error: Command \c@Dm already defined. Or name \end... illegal, see p.192 of the manual. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.99 \newtheorem{esp}[Es]{\sc Esempio} This happens on all my older files that share this preamble. I suspect it is related to a recent update in the LaTeX kernel regarding how shared/sibling counters are handled, which seems to conflict with thmtools or amsthm. Here is the exact setup of my theorem definitions in the preamble where the crash occurs: \theoremstyle{remark} \newtheorem{oss}{\sc Osservazione}% \newtheorem{Es}{\sc Esercizio}% \newtheorem{Dm}[Es]{\sc Domanda}% \newtheorem{esp}[Es]{\sc Esempio}% <-- It crashes exactly here \newtheorem{Prob}[Es]{\sc Problema}% My questions: How can I fix this \c@Dm already defined error? Is there a known patch or a better way to declare these sibling counters using thmtools or modern amsthm without triggering this conflict? I would be extremely grateful if someone could help me clean up and better organize my full preamble (prol2025.tex). Specifically, where is the best place to load font packages like newtxtext and mtpro2 to avoid clashes with other packages like mathtools or amsmath? Here is my current complete preamble prol2025.tex: %\documentclass[14pt,reqno,a4paper]{amsart} %\usepackage{extsizes} \documentclass[12pt,a4paper]{amsart} \pdfpagewidth=21cm \pdfpageheight=29.7cm \setlength{\textheight}{27cm} \setlength{\textwidth}{18cm} \setlength{\headsep}{.5cm} \setlength{\footskip}{.6cm} \calclayout \usepackage[italian]{babel} \usepackage{parskip} \usepackage{mathtools} \usepackage{newtxtext} \let\Bbbk\relax \usepackage[mtpccal,subscriptcorrection,mtphrb,zswash]{mtpro2} \usepackage{verbatim} \usepackage{esint} \usepackage{textcomp} \usepackage{subcaption} \captionsetup[subfigure]{labelfont=rm} \usepackage{dsfont} \usepackage{graphicx} \usepackage{xcolor} \graphicspath{ {img2/} } \usepackage{epstopdf} \usepackage{amscd} \DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `basename #1 .tif`.png} \usepackage{mdframed} \usepackage{thmtools} \usepackage{hyperref} \usepackage{tikz} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % BOX %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newmdenv[ skipabove=7pt, skipbelow=7pt, rightline=false, leftline=true, topline=false, bottomline=false, linecolor=red, backgroundcolor=red!5, innerleftmargin=5pt, innerrightmargin=5pt, innertopmargin=2pt, innerbottommargin=5pt, leftmargin=0cm, rightmargin=0cm, linewidth=2.5pt, fontcolor=red ]{rBox} \newmdenv[ skipabove=7pt, skipbelow=7pt, rightline=false, leftline=true, topline=false, bottomline=false, linecolor=blue, backgroundcolor=blue!5, innerleftmargin=5pt, innerrightmargin=5pt, innertopmargin=2pt, innerbottommargin=5pt, leftmargin=0cm, rightmargin=0cm, linewidth=2.5pt, fontcolor=blue ]{bBox} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % UPRIGHT (ROMAN) ONLY FOR QUE E RIS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \theoremstyle{definition} \declaretheoremstyle[ headfont=\normalfont\sc, bodyfont=\normalfont, notefont=\normalfont, headpunct={.} ]{col} \declaretheorem[name=Quesito Sebastiano,style=col]{queT} \declaretheorem[name=Risposta GDM,style=col]{risT} \newenvironment{que}{\begin{rBox}\begin{queT}}{\end{queT}\end{rBox}} \newenvironment{ris}{\begin{bBox}\begin{risT}}{\end{risT}\end{bBox}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % OTHER THEOREM IN EMPH (plain) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \theoremstyle{plain} \newtheorem{teor}{\sc Teorema} \newtheorem{cor}{\sc Corollario} \newtheorem*{prop}{\sc Proposizione} \newtheorem*{lemma}{\sc Lemma} \newtheorem{defin}{\sc Definizione} \newtheorem{definn}{Definizioni} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % REMARK STYLE (upright) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \theoremstyle{remark} \newtheorem{oss}{\sc Osservazione}% \newtheorem{Es}{\sc Esercizio}% \newtheorem{Dm}[Es]{\sc Domanda}% \newtheorem{esp}[Es]{\sc Esempio}% \newtheorem{Prob}[Es]{\sc Problema}% \newtheorem*{blankit}{} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % COMMANDS AND OPERATORS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \DeclareMathOperator{\Res}{Res} \def\tir{\tilde{\mathbb{R}}} \def\ve{\varepsilon} \newcommand{\ili}[1]{\item[(#1)]} \def\bite{\begin{itemize}} \def\fite{\end{itemize}} \def\CP{\mathcal P} \newcommand{\dimo}{\renewcommand{\proofname}{\it Dimostrazione}\begin{proof}} \newcommand{\findim}{\end{proof}} \DeclareMathOperator{\dist}{dist} \DeclareMathOperator*{\pr}{pr} \DeclareMathOperator*{\cl}{cl} \newcommand{\sol}{\renewcommand{\proofname}{\it Risoluzione}\begin{proof}} \newcommand{\finsol}{\end{proof}} \newcommand{\ope}[1]{\mathop{\mathrm{#1}}} \def\men{\smallsetminus} \DeclareMathOperator{\ch}{ch} \DeclareMathOperator{\sh}{sh} \DeclareMathOperator{\tah}{th} \def\xyz{(x,y,z)} \def\xy{(x,y)} \def\vf{\varphi} \def\b{\beta} \def\z{\zeta} \def\a{\alpha} \def\la{\lambda} \def\vt{\vartheta} \def\vr{\varrho} \def\s{\sigma} \def\de{\delta} \def\ga{\gamma} \def\om{\omega} \DeclareMathOperator{\Rea}{Re} \DeclareMathOperator{\Ima}{Im} \DeclareMathOperator{\sgn}{sgn} \newcommand{\field}[1]{\mathbb{#1}} \def\R{\field{R}} \def\K{\field{K}} \def\Z{\field{Z}} \def\C{\field{C}} \def\Q{\field{Q}} \def\N{\field{N}} \def\SS{\field{S}} \def\I{\field{I}} \def\H{\field{H}} \def\U{\field{U}} \DeclareMathOperator{\cis}{cis} \DeclareMathOperator{\Card}{Card} \def\e{\`e\ } \def\r{\sqrt{x^2+y^2}} \def\cosi{cos\`\i\ } \newcommand{\suc}[2]{(#1_#2)_{#2\in\N}} \DeclareMathOperator{\Ker}{Ker} \DeclareMathOperator*{\Lin}{L} \DeclareMathOperator*{\fr}{fr} \DeclareMathOperator{\Dom}{Dom} \def\fra{\operatorname{frac}} \allowdisplaybreaks \pagenumbering{arabic} \DeclareMathSymbol{\smallsetminus}{\mathbin}{AMSb}{"72} \DeclareMathSymbol{\pitchfork} {\mathrel}{AMSa}{"74} \DeclareMathSymbol{\preccurlyeq} {\mathrel}{AMSa}{"34} \DeclareMathSymbol{\lneqq} {\mathrel}{AMSb}{"08} \DeclareMathSymbol{\gneqq} {\mathrel}{AMSb}{"09} \DeclareMathSymbol{\nleq} {\mathrel}{AMSb}{"02} \DeclareMathSymbol{\twoheadrightarrow} {\mathrel}{AMSa}{"10} \DeclareMathSymbol{\subsetneq} {\mathrel}{AMSb}{"28} \DeclareMathSymbol{\lesseqqgtr} {\mathrel}{AMSa}{"53} \DeclareMathSymbol{\square} {\mathord}{AMSa}{"03} \DeclareMathSymbol{\gtrless} {\mathrel}{AMSa}{"3F} \ProvidesFile{Umsa.fd} [1995/01/05 v2.2e AMS font definitions% ] \DeclareFontFamily{U}{msa}{} \DeclareFontShape{U}{msa}{m}{n}{ <5> <6> <7> <8> <9> gen * msam <10> <10.95> <12> <14.4> <17.28> <20.74> <24.88> msam10 }{} %\endinput \ProvidesFile{Umsb.fd} [1995/01/05 v2.2e AMS font definitions% ] \DeclareFontFamily{U}{msb}{} \DeclareFontShape{U}{msb}{m}{n}{ <5> <6> <7> <8> <9> gen * msbm <10> <10.95> <12> <14.4> <17.28> <20.74> <24.88> msbm10 }{} \endinput File test.tex: \input{../../prol2025.tex} \usepackage{hyperref} \usepackage{tikz} \def\be{\beta} %%%%%%%%%%%%%%%%%%%%%%%%% %\usepackage{ibrackets} %%%%%%%%%%%%% Se non funziona lo tolga \usepackage{marvosym,cancel} %\usepackage{pgfplots} %\pgfplotsset{compat=1.18} %\usepgfplotslibrary{fillbetween} %\usetikzlibrary{patterns} \newcommand{\ok}{\textcolor{green!60!black}{\fbox{\textbf{OK}}}} \newcommand{\att}{\textcolor{red}{\Large {\fontencoding{U}\fontfamily{futs}\selectfont\char 49\relax}}} %%%% da visionare ancora una volta \newcommand{\stp}{\textcolor{red}{\Large\Stopsign}} %%%% da verificare \usepackage[cmtip,all]{xy} \begin{document} %%%%% Testo \end{document}
- Optimize page where figures apear in a book or report documentby Joce on November 1, 2026 at 11:48 am
In a document of above a dozen of pages, with approximately one half-page figure (or table) every second page, LaTeX tends to display figures at an increasing distance from the place where the float environment is located (and from the place where they're first referred to). As a naive user, an easy but unsatisfactory way to cure this is to insert the float code several paragraphs before the figure is relevant. Would there be a package able to force LaTeX to move floats to previous pages, or to trigger a full-page figure if needed? Ideally, the package should attempt to have the figure appear on the double page (even-odd) where the float code is located.
- Consistency of pdfx standards and color profile using includepdfby Iacobus1983 on November 1, 2026 at 10:15 am
I have a x-1a pdf, generated by means of pdfx package. I need to include it in another document (to be sumbitted to a printing company) via pdfpages; to produce this second document, I'll use pdfx with the same settings and the same ICC color profile of the first document. Can I expect the second document to be x-pdf compliant, and the included pages of the first document behave exactly the same (as to pre-flight and professional printing process) in the second document? An example of code: File 1 \documentclass{article} \usepackage{pagecolor} \usepackage[x-1a]{pdfx} \title{Hello World} \begin{document} \pagecolor{red} \maketitle \end{document} File 2 \documentclass{article} \usepackage[paperwidth=480mm,paperheight=330mm]{geometry} \usepackage{pdfpages} \usepackage[x-1a]{pdfx} \begin{document} \includepdf[noautoscale]{file-1} \end{document}
- How to type set these letters (what even are they)? [duplicate]by Mstislav Keldysh on October 31, 2026 at 2:37 pm
I have seen the following in a few older soviet textbooks. How do I type set them? Also what even are they?
- Controlling the length of a vertical bar with bNiceArrayby user446112 on October 31, 2026 at 2:13 pm
By using bNiceArray,is there a way to control the length of the vertical bar (i.e., with a prescribed length)? See MWE below. \documentclass{beamer} \usepackage{nicematrix} \usepackage{amsmath,amssymb,amsbsy} \begin{document} \begin{frame} \begin{equation*} \begin{bNiceArray}{c|c}[columns-width=5pt,cell-space-limits=3pt,margin] \dfrac{a}{b} & \dfrac{c}{d} \\[15pt] \dfrac{\alpha}{\beta} & \dfrac{\delta}{\eta} \end{bNiceArray} \end{equation*} \end{frame} \end{document}
- HTML Commands in LyX Layoutby chel1 on October 30, 2026 at 6:55 pm
I'm trying to learn how to use this, but it's not working out so well. For example, I write like this: Style MyLayout Margin Static LatexType Paragraph LatexName dummy ParIndent MM ParSkip 0.4 Align Block AlignPossible Block, Left, Right, Center LabelType No_Label HTMLForceCSS 0 HTMLStyle div.MyLayout { # margin-right: 5cm; left: 320px; } EndHTMLStyle Font Color green EndFont End As a result, the text color in the MyLayout layout turns green, in this regard everything is fine, but the text in this layout does not receive any indentation to the right. Maybe someone has ready-made examples of using this. Please share.
- What is the font used for $x$ in the following image? [duplicate]by VoulKons on October 30, 2026 at 6:51 pm
What is the font used in the $x$ in the following image? The suggested questions are not helpful for me.
- Is it possible to change the color of lines in a TikZ pattern?by sgmoye on October 30, 2026 at 12:06 pm
I cannot seem to change the color of the lines in the following, they are always black (based on page 735 of the TikZ documentation, version 3.1.12). The documentation (page 180) says "This option is used to set the color to be used for form-only patterns. This option has no effect on inherently colored patterns" but I'm not entirely sure what that means. Are lines "inherently colored" or "form-only"? The documentation (uses on page 735) seems to imply that the color can be altered. \documentclass[tikz,border=1pt]{standalone} \usetikzlibrary{calc,patterns,patterns.meta} \begin{document} \begin{tikzpicture} \draw[fill=red!20](0,0) rectangle (1,1); \draw[pattern={Lines[angle=-45,yshift=2pt]},pattern color=cyan](0,0) rectangle +(1,1); \end{tikzpicture} \end{document} List of files article.cls 2025/01/22 v1.4n Standard LaTeX document class size10.clo 2025/01/22 v1.4n Standard LaTeX file (size option) tikz.sty 2026-08-01 v3.1.12 (3.1.12) pgf.sty 2026-08-01 v3.1.12 (3.1.12) pgfrcs.sty 2026-08-01 v3.1.12 (3.1.12) pgfutil-common.tex pgfutil-latex.def pgfrcs.code.tex pgf.revision.tex pgfcore.sty 2026-08-01 v3.1.12 (3.1.12) graphicx.sty 2026-05-17 v1.2e Enhanced LaTeX Graphics (DPC,SPQR) keyval.sty 2026-05-17 v1.15 key=value parser (DPC) graphics.sty 2026-05-17 v1.4h Standard LaTeX Graphics (DPC,SPQR) trig.sty 2023/12/02 v1.11 sin cos tan (DPC) graphics.cfg 2016/06/04 v1.11 sample graphics configuration xetex.def 2025/11/01 v5.0p Graphics/color driver for xetex pgfsys.sty 2026-08-01 v3.1.12 (3.1.12) pgfsys.code.tex pgfkeys.code.tex pgfkeyslibraryfiltered.code.tex pgf.cfg 2026-08-01 v3.1.12 (3.1.12) pgfsys-xetex.def 2026-08-01 v3.1.12 (3.1.12) pgfsys-dvipdfmx.def 2026-08-01 v3.1.12 (3.1.12) pgfsys-common-pdf.def 2026-08-01 v3.1.12 (3.1.12) pgfsyssoftpath.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfsysprotocol.code.tex 2026-08-01 v3.1.12 (3.1.12) xcolor.sty 2024/09/29 v3.02 LaTeX color extensions (UK) color.cfg 2016/01/02 v1.6 sample color configuration mathcolor.ltx pgfcore.code.tex pgfmath.code.tex pgfmathutil.code.tex pgfmathparser.code.tex pgfmathfunctions.code.tex pgfmathfunctions.basic.code.tex pgfmathfunctions.trigonometric.code.tex pgfmathfunctions.random.code.tex pgfmathfunctions.comparison.code.tex pgfmathfunctions.base.code.tex pgfmathfunctions.round.code.tex pgfmathfunctions.misc.code.tex pgfmathfunctions.integerarithmetics.code.tex pgfmathcalc.code.tex pgfmathfloat.code.tex pgfint.code.tex pgfcorepoints.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorepathconstruct.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorepathusage.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorescopes.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcoregraphicstate.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcoretransformations.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorequick.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcoreobjects.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorepathprocessing.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorearrows.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcoreshade.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcoreimage.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcoreexternal.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorelayers.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcoretransparency.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorepatterns.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorerdf.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfmoduleshapes.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfmoduleplot.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcomp-version-0-65.sty 2026-08-01 v3.1.12 (3.1.12) pgfcomp-version-1-18.sty 2026-08-01 v3.1.12 (3.1.12) pgffor.sty 2026-08-01 v3.1.12 (3.1.12) pgfkeys.sty pgfkeys.code.tex pgfmath.sty pgfmath.code.tex pgffor.code.tex tikz.code.tex pgflibraryplothandlers.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfmodulematrix.code.tex 2026-08-01 v3.1.12 (3.1.12) tikzlibrarytopaths.code.tex 2026-08-01 v3.1.12 (3.1.12) tikzlibrarypatterns.meta.code.tex pgflibrarypatterns.meta.code.tex l3backend-xetex.def 2026-09-09 L3 backend support: XeTeX
- Misaligned rows if a column is globally colorized thanks to the array package [duplicate]by Denis Bitouzé on October 30, 2026 at 11:12 am
The following MCE code uses the >{…} feature from the array package within a tabular to automatically colorize the contents of all cells in a column (of type “paragraph”: p{…}). However, this causes the lines to become misaligned: \documentclass{article} \usepackage{array} \usepackage{xcolor} \begin{document} \begin{tabular}{l>{\color{blue}}p{5cm}} Foo & Bar \end{tabular} \end{document} Why and how can this problem be avoided?
- Making \tl_step_inline:Nn in expl3by Bob on October 30, 2026 at 3:07 am
I am trying to create \tl_step_inline:Nn, the analog of \int_step_inline:Nn, where upon I can step through a token list n, and return a sequence N containing all the individual tokens, spaces, backslashes, and curly brackets included. On page 110 of interface3.pdf, token lists are described as being comprised of 'items' and 'tokens'. But I cannot seem to be able to parse a list of tokens, only a list of items. I am stuck on the following. \tl_count_tokens:N does not exist, and I cannot seem to generate one. \tl_count_tokens:n {\mytl} returns 1, instead of the length of \mytl. I tried to generate a 😡 and :f, and while those generate they are incorrect, seemingly always reporting 11. But beyond this, I cant seem to produce the analog of \tl_item:Nn \mytl {index}, \tl_tokens:Nn \mytl {index} leaving me with no way to capture a specific token one at a time. Something like \tl_pop_left:N doesnt seem to exist either. How do I begin to approach this task? I am on TeX Live 2024. Reading the most up to date pdf does not indicate any new capabilities in this space. Here is a minimum not-working example, but its not really very helpful as you can imagine. \documentclass{article} \parindent=0in \usepackage[enable-debug]{expl3} \ExplSyntaxOn \debug_on:n { check-declarations , deprecation } \ExplSyntaxOff \usepackage{xparse}%enables expl3 coding %*********************************************************************************************% \ExplSyntaxOn \tl_new:N \temptl \seq_new:N \tempseq \int_new:N \charcount \seq_new:N \targetseq % \cs_generate_variant:Nn \tl_count_tokens:n {N} \cs_generate_variant:Nn \tl_count_tokens:n {f} \cs_new:Npn \tl_step_inline:Nn #1#2 { \tl_set:Nn \temptl {#2} \seq_show:N \tempseq \tl_show:N \temptl \tl_show:x {\tl_item:Nn \temptl {2}} \int_set:Nn \charcount {0} \int_set:Nn \charcount {\tl_count_tokens:f {\temptl}} \int_show:N \charcount \int_step_inline:nnnn {1}{1}{0}{% % \tl_set_eq:Nn \tempptl {\tl_token:Nn \temptl {##1}} % \tl_show:N \tempptl % \seq_put_right:Nn \tempseq {\tl_item:Nn \temptl {##1} } \seq_put_right:Nn \tempseq {z} \seq_set_eq:NN #1 \tempseq } \NewDocumentCommand{\mymacro}{m} { \tl_step_inline:Nn \targetseq {#1} \seq_show:N \targetseq } \ExplSyntaxOff%********************************************************************************************% \NewDocumentCommand{\abc}{}{ \itshape{abc} } %********************************************************************************************% \begin{document} \mymacro{\abc d e } I want to turn \begin{verbatim} \mymacro{\abc d e } \end{verbatim} into \begin{verbatim} seq:{\}{a}{b}{c}{ }{d}{ }{e}{ }} \end{verbatim} \end{document}
- Compiling only the last sectionby invictus on October 29, 2026 at 4:41 pm
I am looking for a way to print only the last section of a document (say, in article class). What I want is to have something like a \PrintOnlyLastSection command which, when placed in the preamble, will cause only the last section to be printed, regardless of how many sections the document contains. Commenting out that command should print the whole document as usual, and including or excluding that one % sign should be the only action required from the user. Possible use cases, to provide some context: a) An instructor hands out weekly homework sets. They keep a single dynamic file where each homework set is a section. Every week a new homework set is added to the end of the file and only that last set is printed and sent out to students, while the file keeps the database of all assignments for the academic semester. b) A financial analyst or lab technician prepares short monthly reports. They record and update the status of their system with the latest data in a new section stamped with the current date. At the end of every month, that month's report is sent to their team as a pdf, while old reports remain in the file for bookkeeping. Edit: Based on the comments, here is some more information. Consider periodic tasks, where at the end of every period, our author has the task of sending out that period's assignment/report etc., to their group, say, as a single mail to a mailing list. The section titles could contain the time stamp (e.g. "June financial report"). Currently, the author would be writing a separate tex file for every period, ending up with many files that need to be maintained. The aim is to replace all that with a single "reports.tex" file that is periodically updated. An MNWE (minimal non-working example): \documentclass{article} \newcommand{\PrintOnlyLastSection}{What should come here?} %\PrintOnlyLastSection \setcounter{secnumdepth}{0} \begin{document} \section{Homework Set 1} Questions for the first week. Already past. \section{Homework Set 2} Questions for the second week. We solved these last week. \section{Homework Set 3} These are the questions that should be sent to students this week. \end{document} What I do not want is moving sections to separate files for the purpose of using includeonly or input type solutions---everything must reside in a single file. Also, the well-known methods of ignoring parts of the document in the output, e.g., by enclosing them within comment environments or inside \iffalse .. \fi pairs, are not what I am after, as I want to avoid solutions that entail moving these commands around as new sections are added. For example, this answer that uses filecontents to simulate an includeonly effect, is rather cumbersome for the present purpose. I want a command that would automatically identify the last section and print only that, without manual intervention as new sections are added. Any ideas?
- How can I pass my floating tcolorbox to \listof{}?by katang on October 29, 2026 at 10:23 am
Based on threads Formatting list of custom floats in classic thesis, and How can I add my tcolorbox to my table of contents?, I prepared the MWE below. However, the list of mypanels does not print. What did I miss? \documentclass{book} \usepackage{siunitx} \usepackage{float} \usepackage{tcolorbox} \usepackage{hyperref} \newfloat{algorithm}{thp}{loa}[chapter] \floatname{algorithm}{Algorithm} \newcounter{myctr} %\numberwithin{myctr}{chapter} \newcommand{\mypanel}[3] { \noindent \refstepcounter{myctr}\par\smallskip \begin{tcolorbox} [float=bthp!, colback=green!5!white, colframe=yellow!10!green,coltitle=white, title=\textbf{\hypertarget{#1}{My panel~\themyctr:\\#2\label{#1}} \rmfamily} ] #3 %The main text \end{tcolorbox} } \floatname{mypanel}{MyPanel} % Fixing the tables with tcolorbox \makeatletter \renewcommand*\l@tcolorbox{\@dottedtocline{1}{1.5em}{3.0em}} \makeatother \begin{document} \chapter{Test chapter}\label{ch:algotest} \section{Some tests} Algorithm \ref{alg:first} shows a plain algorithm. Figures \ref{fig:first} and \ref{fig:second} show a couple figures, and a table is shown in table \ref{tab:first}; furthermore \hyperlink{MyTestA}{my panel \ref{MyTestA}} and \hyperlink{MyTestB}{my another panel \ref{MyTestB}} \begin{algorithm} \caption{A plain algorithm\label{alg:first}} \begin{verbatim} while not finished: do stuff \end{verbatim} \end{algorithm} \begin{figure} \caption{First figure\label{fig:first}} This one is a figure. \end{figure} \begin{figure} \caption{Second figure\label{fig:second}} This one is a figure too. \end{figure} \begin{table} \caption{Table figure\label{tab:first}} This one is a table. \end{table} \mypanel{MyTestA}{A test panel for table of contents} { Just a test } \mypanel{MyTestB}{Another test panel for table of contents} { Another test } \begingroup \let\clearpage\relax \let\cleardoublepage\relax \tableofcontents \listoffigures \listoftables \renewcommand{\figurename}{Algorithm} \listof{algorithm}{List of algorithms} \renewcommand{\figurename}{Algorithm} \tcblistof[\chapter*]{mypanel}{List of My panels} \endgroup \end{document}
- How to tweak the position of super/subscript of `mathop` of custom symbol?by Explorer on October 28, 2026 at 7:09 pm
The post is the follow-up of my previous post, here below is the code: \documentclass{article} \usepackage{geometry} \usepackage{pict2e}% \usepackage{unicode-math} \usepackage{fixdif} \setlength{\parindent}{0pt} \setmathfont{NewCMMath-Book.otf} \let\NCMintop\intop \makeatletter \newcommand{\myint@kern}{\mkern-9.5mu\mathchoice{\mkern-4mu}{}{}{}} \newcommand{\myint@strokes}[2]{#1\nolimits#2#1\nolimits#2#1\nolimits#2#1} \DeclareRobustCommand{\myint}{\DOTSI\myint@strokes{\NCMintop}{\myint@kern}\nolimits} \newcommand{\myint@ringwidthfactor}{.9} \newcommand{\myint@ringheightfactor}{.8} \newdimen\myint@ringwidth \newdimen\myint@ringoffset \newdimen\myint@ringheightdim \newcommand{\myint@ring}[2]{% \begingroup \sbox0{$\m@th#1\myint@strokes{\NCMintop}{\myint@kern}\nolimits$} \myint@ringwidth=\myint@ringwidthfactor\wd0 \sbox2{$\m@th#1\mkern.37mu$} \myint@ringoffset=\wd2% \setlength{\unitlength}{1pt}% \sbox2{$\m@th#1\mkern18mu$} \myint@ringheightdim=\myint@ringheightfactor\wd2 \ifx#1\displaystyle% \linethickness{.08\wd2} \else \divide\myint@ringheightdim by 2% \linethickness{.06\wd2} \fi \smash{\rlap{\ooalign{% \hidewidth$\m@th#1\vcenter{\hbox{\begin{picture}(0,0)% \put(\strip@pt\myint@ringoffset,0){\oval[\myint@ringheightdim](\strip@pt\myint@ringwidth,\strip@pt\myint@ringheightdim)}% \end{picture}}}$\hidewidth\cr% \hbox to\wd0{\hss}\cr% }}}% \endgroup } \DeclareRobustCommand{\myoint}{\DOTSI\mathop{\mathpalette\myint@ring{}}\nolimits\mkern-\thinmuskip\myint@strokes{\NCMintop}{\myint@kern}\nolimits} \makeatother \begin{document} \section{Expected Position} \[\iiiint_{\Omega} f\d V\qquad \oiiint_0^1 f\d V\] \[\iiiint\limits_{\Omega} f\d V\qquad \oiiint\limits_0^1 f\d V\] Inline: $\iiiint\limits_{\Omega} f\d V$ and $\oiiint\limits_0^1 f\d V$. \section{Unexpected Position} \[\myint_{\Omega} f\d V\qquad \myoint_0^1 f\d V\] \[\myint\limits_{\Omega} f\d V\qquad \myoint\limits_0^1 f\d V\] Inline: $\myint\limits_{\Omega} f\d V$ and $\myoint\limits_0^1 f\d V$. \end{document} We could notice that the position with \limits was not expected. Any suggestions on this case of custom \oiiiint symbol?
- How does framezoom work? And why does it fail in RTL context (lualatex)by Salim Bou on October 28, 2026 at 12:05 pm
I would like to know how the \framezoom command works in Beamer, this example work fine in LTR context but fail in RTL and the zoomed part do not show in the second slide. I know the issue is related to the pgfpicture environment, which continues to cause problems in RTL context; I have tried shifting the pgfpicture box in \framezoom command so that it reappears within the slide, but I have been unable to do so. I have beamer version 3.78 and babel version 26.14 % lualatex \documentclass{beamer} \usepackage[bidi=basic-r,layout=graphics]{babel} %\babelprovide[import=ar,main]{arabic} % Uncomment this to reveal the issue \begin{document} \parskip=6pt \begin{frame} \frametitle{zooming} \framezoom<1><2>[border=2](0cm,0cm)(2cm,2cm) \pgfimage[height=4cm]{example-image} \end{frame} \end{document} The definition of \framezoom command \def\framezoom<#1><#2>{\@ifnextchar[{\beamer@framezoom<#1><#2>}{\beamer@framezoom<#1><#2>[]}} \def\beamer@framezoom<#1><#2>[#3](#4,#5)(#6,#7){% \par\nointerlineskip% \global\beamer@slidehaszoomtrue% \advance\beamer@zoomcount by1\relax% \def\beamer@zoomborderwidth{0}% \edef\beamer@labelzoomed{beamer@labelzoomed@\the\beamer@zoomframecount @\the\beamer@zoomcount}% \setkeys{beamerzoom}{#3}% \only<#1>{% {\hypersetup{pdfhighlight={/P},pdfborder={0 0 \beamer@zoomborderwidth}}% \global\setbox\@tempboxa=\vbox{\hyperlink{\beamer@labelzoomed}{% \expandafter\ifx\csname XeTeXrevision\endcsname\relax% \else% \special{pdf:xann width #6 height #7 depth 0pt}% \fi% \vbox to #7{% \hbox to#6{\hfil}% \vfil% }% }}}% \ht\@tempboxa=0pt% \wd\@tempboxa=0pt% \dp\@tempboxa=0pt% \setbox\@tempboxa=\vbox{\moveright#4\hbox{\lower#5\vbox{\box\@tempboxa}}}% \ht\@tempboxa=0pt% \wd\@tempboxa=0pt% \dp\@tempboxa=0pt% \global\setbox\beamer@zoombox=\vbox to0pt{\unvbox\beamer@zoombox\box\@tempboxa}% }% \only<#2>{% \@ifundefined{\beamer@labelzoomed}% {% \hypertarget{\beamer@labelzoomed}{}% \expandafter\gdef\csname\beamer@labelzoomed\endcsname{}% }{}% \gdef\beamer@zoomer{% % compute zoom factor \@tempdima=\beamer@frametextheight% \@tempdimb=#7\relax% \@tempcnta=\@tempdimb% \divide\@tempcnta by4096\relax% \multiply\@tempdima by16\relax% \divide\@tempdima by\@tempcnta% \@tempdimb=\paperwidth% \ifbeamer@plainframe% \else% \advance\@tempdimb by-\beamer@leftsidebar% \advance\@tempdimb by-\beamer@rightsidebar\relax% \fi% \@tempdimc=#6\relax% \@tempcntb=\@tempdimc% \divide\@tempcntb by4096\relax% \multiply\@tempdimb by16\relax% \divide\@tempdimb by\@tempcntb% \ifdim\@tempdimb<\@tempdima% \@tempdima=\@tempdimb% \fi% \edef\beamer@temp{\strip@pt\@tempdima}% \@tempdimc=\beamer@frametextheight% \advance\@tempdimc by4pt% \@tempdimb=\paperwidth% \ifbeamer@plainframe% \else% \advance\@tempdimb by-\beamer@leftsidebar% \advance\@tempdimb by-\beamer@rightsidebar\relax% \fi% \setbox\@tempboxa=\vbox{\hsize=\@tempdimb\Acrobatmenu{GoBack}{\vbox to \beamer@frametextheight{\hbox to\@tempdimb{\hfil}\vfil}}}% \ht\@tempboxa=0pt% \wd\@tempboxa=0pt% \dp\@tempboxa=0pt% \setbox\beamer@framebox=\vbox to\beamer@frametextheight{{% \ifbeamer@plainframe\beamer@leftmargin=\Gm@lmargin\fi% \begin{pgfpicture}{\beamer@leftmargin}{-\beamer@frametextheight}{\beamer@leftmargin}{0pt} \pgftext[left,top]{\box\@tempboxa} \pgfpathrectangle{\pgfpoint{0pt}{-\@tempdimc}}{\pgfpoint{\@tempdimb}{\@tempdimc}}% \pgfusepath{clip} \begingroup \pgftransformscale{\beamer@temp} \@tempdima=#4\relax% \@tempdimb=#5\relax% {\pgftransformshift{\pgfpoint{-\@tempdima}{\@tempdimb}}% \pgftext[left,top]{\vbox{\vbox{}\nointerlineskip\unvbox\beamer@framebox}}} \endgroup \end{pgfpicture}% }}% \setbox\beamer@framebox=\vbox{% \nobreak\vbox{}\nobreak\par\nobreak\beamer@entrycode\nobreak% \nointerlineskip\unvbox\beamer@frametitlebox% \nobreak% \box\beamer@framebox% \nobreak% \vss% \beamer@exitcode% }% \global\setbox\beamer@footins=\box\voidb@x% no footnotes in zoomed slides }% }% } Update If I push the image to the left side a part of zoomed image appears in the second slide % lualatex \documentclass{beamer} \usepackage[bidi=basic-r,layout=graphics]{babel} \babelprovide[import=ar,main]{arabic} \begin{document} \parskip=6pt \begin{frame}[fragile] \frametitle{zooming} \framezoom<1><2>[border=2](0cm,0cm)(2cm,2cm) \ \hfill\pgfimage[height=3cm]{example-image} \end{frame} \end{document}
- Need to know about a Package [closed]by Senthil on October 28, 2026 at 9:41 am
I want to know more and usuage about this \usepackage{multicol-float} package can you give me with the example?
- How to vertical label the `enumext*` environment?by Explorer on October 27, 2026 at 3:09 pm
The post is the follow-up of my previous answer. Noted that in OP's example sketch, that was: we could notice that with multicols, the label was incremented vertically. I have the code with enumext: \documentclass{article} \usepackage{enumext} \setenumext[enumext*]{label=(\Alph*),topsep=2pt} \setenumext[enumext,1]{label=(\Alph*)} \begin{document} \begin{enumerate} \item Question 1 in words \begin{enumext*}[columns=1] \item Option A \item Option B \item Option C \item Option D \end{enumext*} \item Question 2 in words \begin{enumext*}[columns=2] \item Option A \item Option B \item Option C \item Option D \item Option E \item Option F \end{enumext*} \item Question 3 in words \begin{enumext}[columns=2] \item Option A \item Option B \item Option C \item Option D \item Option E \item Option F \end{enumext} \end{enumerate} \end{document} But... we could see that th vertical spacing was not the same, and I found no solution with task package... Except for invictus's answer, I wonder any better suggestions? I don't think manually change the spacing parameters here was good approach...
- Subscripts before a brace in equationby jeirual on October 27, 2026 at 10:35 am
I would like to add a subscript before a brace delimiting a 2-lines array in the following equation: I have tried _{i}\left\{ but subscript is low according to the previous character, and not to the following brace. I have also tried \sideset{_i}{}{\left\{ ...} and although it gives the expected result, it also raises ! Limit controls must follow a math operator. error, which is quite annoying as I intend to use it several times in my document. Any advice will be greatly appreciated. Here is my MWE: \documentclass{article} \usepackage{amsfonts,amsmath,amssymb,leftidx,mathtools} \usepackage{array} \begin{document} %% Using _{i} method $V_i = _{i}\left\{ \begin{array}{l} x \\ y \end{array} \right.$ \\ %% Using \sideset method $V_i = \sideset{_{i}}{}{\left\{ \begin{array}{l} x \\ y \end{array} \right.}$ \end{document}
- Interaction between ltproperties, the hook system and the package pgfby jlab on October 26, 2026 at 9:44 am
The other day, I tried to answer a question with the requirements that: some packages are loaded through the hook \AtBeginDocument; some data are saved through the hook \AtEndDocument, to be retrieved at the next run. I finally used an auxiliary file to store the data, but initially I tried to use the new LaTeX properties mechanism documented in ltproperties-doc.pdf. I came across a strange interaction between ltproperties the LaTeX hook system and the pgf package. If I compile \documentclass{article} \NewProperty{test}{now}{}{test} \AtEndDocument{ \RecordProperties{here}{test} } \AtBeginDocument{ \usepackage{lipsum} % \usepackage{pgf} } \begin{document} aaa \RefProperty{here}{test} bbb \end{document} the property is correctly read and the output file contains But, if I uncomment the line \usepackage{pgf} and load the pgf package \AtBeginDocument, the property is lost. The problem doesn't occur with the lipsum package, nor if \usepackage{pgf} is moved outside \AtBeginDocument. Any idea?
- Convert a PNG image into a valid custom LaTeX integral symbolby mathrm alpha on October 26, 2026 at 12:47 am
I want to use a PNG image to create the \oiiiint symbol—the closed quadruple integral symbol—in LaTeX so I can actually apply it to mathematical formulas. Although I can basically use superscripts and subscripts to make it look nice, I’m not sure if there’s a better way to do this. \documentclass{article} \usepackage{graphicx,amsmath} \makeatletter % --- Inline Version (oiiiintS.png, 20pt) --- \def\oiiiint@inl@base{% \raisebox{-3pt}{% \includegraphics[height=20pt]{oiiiintS.png}}% } \def\oiiiint@inl@sup^#1{% \@ifnextchar_{\oiiiint@inl@both{#1}}{% \raisebox{-3pt}{% \includegraphics[height=20pt]{oiiiintS.png}}% ^{\raisebox{-8.5pt}{$\scriptstyle\hspace*{1pt}#1$}}% }% } \def\oiiiint@inl@sub_#1{% \@ifnextchar^{\oiiiint@inl@revboth{#1}}{% \raisebox{-3pt}{% \includegraphics[height=20pt]{oiiiintS.png}}% _{\hspace*{-4pt}#1}% }% } \def\oiiiint@inl@both#1_#2{% \raisebox{-3pt}{% \includegraphics[height=20pt]{oiiiintS.png}}% ^{\raisebox{-8.5pt}{$\scriptstyle\hspace*{1pt}#1$}}% _{\hspace*{-1pt}#2}% } \def\oiiiint@inl@revboth#1^#2{% \raisebox{-3pt}{% \includegraphics[height=20pt]{oiiiintS.png}}% ^{\raisebox{-8.5pt}{$\scriptstyle\hspace*{1pt}#2$}}% _{\hspace*{-1pt}#1}% } \newcommand{\oiiiint@inline}{% \@ifnextchar^{\oiiiint@inl@sup}{% \@ifnextchar_{\oiiiint@inl@sub}{\oiiiint@inl@base}% }% } % --- Display Version (oiiiint.png, 30pt) --- \def\oiiiint@disp@base{% \raisebox{-8.5pt}{% \includegraphics[height=30pt]{oiiiint.png}}% } \def\oiiiint@disp@sup^#1{% \@ifnextchar_{\oiiiint@disp@both{#1}}{% \raisebox{-8.5pt}{% \includegraphics[height=30pt]{oiiiint.png}}% ^{\raisebox{-8.5pt}{$\scriptstyle\hspace*{1pt}#1$}}% }% } \def\oiiiint@disp@sub_#1{% \@ifnextchar^{\oiiiint@disp@revboth{#1}}{% \raisebox{-8.5pt}{% \includegraphics[height=30pt]{oiiiint.png}}% _{\hspace*{-4pt}#1}% }% } \def\oiiiint@disp@both#1_#2{% \raisebox{-8.5pt}{% \includegraphics[height=30pt]{oiiiint.png}}% ^{\raisebox{-8.5pt}{$\scriptstyle\hspace*{1pt}#1$}}% _{\hspace*{-4pt}#2}% } \def\oiiiint@disp@revboth#1^#2{% \raisebox{-8.5pt}{% \includegraphics[height=30pt]{oiiiint.png}}% ^{\raisebox{-8.5pt}{$\scriptstyle\hspace*{1pt}#2$}}% _{\hspace*{-4pt}#1}% } \newcommand{\oiiiint@display}{% \@ifnextchar^{\oiiiint@disp@sup}{% \@ifnextchar_{\oiiiint@disp@sub}{\oiiiint@disp@base}% }% } % --- Unified Wrapper Command --- \newcommand{\oiiiint}{% \if@display \expandafter\oiiiint@display \else \expandafter\oiiiint@inline \fi } \makeatother \begin{document} $\oiiiint^3_2\oiiiint_2^3\oint^3_2$ \[\oiiiint^3_2\oiiiint_2^3\oint^3_2\] \end{document} PNG: \oiiiint in inline math; PNG style: oiiiintS.png \oiiiint in display math; PNG style: oiiiint.png
- `mono=false` give another mono font except `lmtt` with `libertinus-otf` package?by Explorer on October 25, 2026 at 5:16 pm
In texdoc libertinus-otf, page.11, sec.3.4, we know that: If you do not like the monofont, you can use the package option mono=false, then no mono font is defined and the default Latin Modern Mono will be used unless no one other will be defined. However, on my windows 11, it gives another result: \documentclass{article} \usepackage[mono=false]{libertinus-otf} % \renewcommand{\ttdefault}{lmtt} \begin{document} ABC \texttt{abc} \end{document} That was AnonymousPro but not latin modern typewriter(lmtt)...? Any suggestions on the reason? Either \usepackage[tt=false]{libertine} or \renewcommand{\ttdefault}{lmtt} works...
- Alignment of sections in `parallel` text if one section is a `xskak \chessboard`by Reinhard Neuwirth on October 25, 2026 at 12:12 pm
If the left and right sections in a parallel text are both text, the sections align, if one is text the other an xskak \chessboard they do not, as there is demonstrated in the MWE below. Is there a fix? % RN. 25/10/2026 % BRIEF DESCRIPTION: % using parallel \documentclass{article} \usepackage{xskak} \usepackage{parallel} \begin{document} \begin{Parallel}{}{} \ParallelPar \ParallelLText{ \fenboard{8/8/8/8/8/8/8/8 b - - 0 1} \chessboard[smallboard] } \ParallelRText{ Right text: sd ad fas gargER Ger g RG rg V V S G DFADaa ga ga a ga dfg agadfg a gadf ga ga ga rt hqth qrtg qarg sd ad fas gargER Ger g RG rg V V S G DFADaa ga ga a ga dfg agadfg a gadf ga ga ga g ag ad ga ga fga g adfgaegr aerg wht w hwrt hqth qrtg qarg } %\renewcommand{\ParallelAtEnd}{} \end{Parallel} \vspace{20mm} \begin{Parallel}{}{} \ParallelPar \ParallelLText{ Left text: d ga ga fga g adfgaegr aerg wht w hwrt hqth qrtg qarg sd ad fas gargER Ger g RG rg V V S G a ga dfg agadfg a gadf ga ga ga g ag ad ga ga fga g adfgaegr aerg wht w hwrt hqth qrtg qarg sd ad fas gargER Ger g RG rg V V S G DFADaa ga ga a ga dfg agadfg a gadf ga ga ga g ag ad ga ga } \ParallelRText{ Right text: sd ad fas gargER Ger g RG rg V V S G DFADaa ga ga a ga dfg agadfg a gadf ga ga ga g ag asd adth qrtg g qarg sd ad fas gargER Ger g RG rg V V S G DFADaa ga ga a ga dfg agadfg a gadf ga ga ga g ag ad ga ga fga g adfgaegr aerg wht w hwrt hqth qrtg qarg } %\renewcommand{\ParallelAtEnd}{} \end{Parallel} \end{document}
- Output Text Onlyby Dennis Noel de Lara on October 25, 2026 at 5:47 am
I want to output text only, but all the text formatting commands are not executed\not expanded. Also, the text formatting commands are also not printed. I'm familiar with the \verb command, the verbatim environment and similar commands, but these are not what I want. MWE \documentclass{book} \newcommand*{\myText}{This is any text. It contains a \textbf{bold} command. It may also contain other text formatting commands, or \hspace{1.0in} spacing commands.} \begin{document} \myText %This will print the text with the formatting commands. %But I want to have a new command \myOutputTextNoFormat so that when I execute %\myOutputTextNoFormat{\myText}, the following ``text only'' is printed: %This is any text. It contains a bold command. It may also contain other text formatting commands, or spacing commands. \end{document} Kindly seeking help. This is XeTeX, Version 3.141592653-2.6-0.999996 (MiKTeX 24.4) (preloaded format=xelatex 2025.1.1) 26 OCT 2026 08:14 entering extended mode restricted \write18 enabled. %&-line parsing enabled. **./untitled-6.tex (untitled-6.tex LaTeX2e <2024-06-01> patch level 2 L3 programming layer <2024-09-10> (C:\Users\New Century Books\AppData\Local\Programs\MiKTeX\tex/latex/base\book.c ls Document Class: book 2024/02/08 v1.4n Standard LaTeX document class (C:\Users\New Century Books\AppData\Local\Programs\MiKTeX\tex/latex/base\bk10.c lo File: bk10.clo 2024/02/08 v1.4n Standard LaTeX file (size option) ) \c@part=\count190 \c@chapter=\count191 \c@section=\count192 \c@subsection=\count193 \c@subsubsection=\count194 \c@paragraph=\count195 \c@subparagraph=\count196 \c@figure=\count197 \c@table=\count198 \abovecaptionskip=\skip49 \belowcaptionskip=\skip50 \bibindent=\dimen141 ) (C:\Users\New Century Books\AppData\Local\Programs\MiKTeX\tex/latex/l3backend\l 3backend-xetex.def File: l3backend-xetex.def 2024-05-08 L3 backend support: XeTeX \g__graphics_track_int=\count199 \l__pdf_internal_box=\box52 \g__pdf_backend_annotation_int=\count266 \g__pdf_backend_link_int=\count267 ) (untitled-6.aux) \openout1 = `untitled-6.aux'. LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 12. LaTeX Font Info: ... okay on input line 12. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 12. LaTeX Font Info: ... okay on input line 12. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 12. LaTeX Font Info: ... okay on input line 12. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 12. LaTeX Font Info: ... okay on input line 12. LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 12. LaTeX Font Info: Trying to load font information for TS1+cmr on input line 1 2. (C:\Users\New Century Books\AppData\Local\Programs\MiKTeX\tex/latex/base\ts1cmr .fd File: ts1cmr.fd 2023/04/13 v2.5m Standard LaTeX font definitions ) LaTeX Font Info: ... okay on input line 12. LaTeX Font Info: Checking defaults for TU/lmr/m/n on input line 12. LaTeX Font Info: ... okay on input line 12. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 12. LaTeX Font Info: ... okay on input line 12. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 12. LaTeX Font Info: ... okay on input line 12. [1 ] (untitled-6.aux) *********** LaTeX2e <2024-06-01> patch level 2 L3 programming layer <2024-09-10> *********** ) Here is how much of TeX's memory you used: 492 strings out of 409029 9844 string characters out of 5754306 386850 words of memory out of 20000000 23236 multiletter control sequences out of 15000+600000 558093 words of font info for 39 fonts, out of 8000000 for 9000 1348 hyphenation exceptions out of 8191 35i,5n,50p,191b,157s stack positions out of 10000i,1000n,20000p,200000b,200000s Output written on untitled-6.pdf (1 page).
- Conflict between \babelfont and Chinese font commands defined by `\CJKfamilyfont`by M. Logic on October 24, 2026 at 6:34 am
First a minimal working sample is as follows. \documentclass[fontset=fandol]{ctexbook} \setCJKfamilyfont{fandolkaiti}{FandolKai-Regular.otf}% \newcommand{\kaiti}{\CJKfamily{fandolkaiti}} \usepackage{babel} \babelprovide{russian}% \babelfont[russian]{rm}[Scale=MatchUppercase, Script=Cyrillic, Renderer=Harfbuzz, ItalicFont={NewCM10-Italic.otf}, BoldFont={NewCM10-Bold.otf}, BoldItalicFont={NewCM10-BoldItalic.otf}]{NewCM10-Regular.otf} \usepackage{fancyhdr} \fancypagestyle{main}{% \fancyhf{} \fancyhead[LE]{\kaiti\small\thepage\hspace{4em}\leftmark}% \fancyhead[RO]{\kaiti\small\rightmark\hspace{4em}\thepage}% \renewcommand{\headrule}{}% } \begin{document} \pagestyle{main} \chapter{测试文字Test} \section{依然是测试文字} {\kaiti 第一章\quad 测试文字TEST}%\kaiti affects only on Chinese \clearpage 文字 \end{document} As you see, to make the header be in Chinese regular script font (Kaiti; only Chinese texts turn to be the font while English texts keep in default fonts), I defined \kaiti. But when I set \babelfont, \kaiti doesn't work anymore in the header although it still works well in the main body of the document. Compare 第一章 测试文字TEST in the main body of the document and the header. They should be the same while in fact not. Then how to solve the conflict? Note that \itshape works well but it works both on Chinese and English texts.
- zh_pin.pl can't be found when using MacTeX after updatingby M. Logic on October 24, 2026 at 4:33 am
First a minimal working sample. \documentclass{article} \usepackage[style=authoryear, sortlocale=zh__pinyin %<---- ]{biblatex} \addbibresource{biblatex-examples.bib} \begin{document} \cite{westfahl:space} \printbibliography \end{document} As you see, I use zh_pin.pl to sort references, but today when I update the MacTeX and compile the files, it says: Unicode/Collate/Locale/zh_pin.pl can't be found at /var/folders/8y/zkd60m1s7jz_73wr7hjjnq5r0000gn/T/par-436f6e64656e/cache-364a02962a45a52cab8961a336f60ec963624107/inc/lib/Biber.pm line 1076. INFO - This is Biber 2.22 INFO - Logfile is 'test.blg' INFO - Reading 'test.bcf' INFO - Found 1 citekeys in bib section 0 In fact, the problem comes out two months ago, but I reinstall MacTeX. But today when I update the MacTeX, the problem comes out again. Then how to solve the problem?
- Tight spacing when typesetting limit of a function in TeX Gyre fontsby ethan the unreal on October 22, 2026 at 3:54 pm
I'm trying to typeset a project using TeX Gyre Pagella (Math). When I try to produce the limit of a function (see MWE), the space between the "lim" and "f" is far too small. Is there a way to increase this space (for all instances of the limit) outside of manually using \, or other spacing commands? For transparency, I'm using XeLaTeX on Overleaf. I don't know whether a local instance of XeLaTeX will produce the same result. \documentclass{minimal} % \usepackage{amsmath} \usepackage{unicode-math} \setmainfont{TeX Gyre Pagella} \setmathfont{TeX Gyre Pagella Math} \begin{document} We say that \begin{equation*} \lim_{x \to a} f(x) = L \end{equation*} if, insert $\varepsilon$ and $\delta$ definition here. \end{document} Interestingly, newpxmath (which apparently loads Pagella) does not have this problem. The image comes from the code below: \documentclass{article} % \usepackage{newtxmath} \usepackage{newpxmath} \begin{document} % With \texttt{newtxmath} With \texttt{newpxmath} \begin{equation*} \lim_{x \to a} f(x) = L \end{equation*} \end{document} (But I have other opinions about it which are not within the scope of the question anymore.) Similar results are produced using TeX Gyre Termes Math and newtxmath (see images).
- TikZ code, OK directly in a file, not OK in a standalone subfileby Denis Bitouzé on October 21, 2026 at 5:13 pm
The following file (which comes from an article in the TeXnische Komödie about the schulma-physik package), say subfile.tex, compiles like a charm: \documentclass{article} \usepackage[compatibility]{circuitikz} \usetikzlibrary{circuits.ee.IEC} \makeatletter % Ergänzungen von Schaltzeichenformen auf der Grundlage von pgflibraryshapes.gates.ee.IEC.code.tex \pgfdeclareshape{leere diode} {% \inheritsavedanchors[from=rectangle ee]% \inheritanchor[from=rectangle ee]{center}% \inheritanchor[from=rectangle ee]{north}% \inheritanchor[from=rectangle ee]{south}% \inheritanchor[from=rectangle ee]{east}% \inheritanchor[from=rectangle ee]{west}% \inheritanchor[from=rectangle ee]{north east}% \inheritanchor[from=rectangle ee]{north west}% \inheritanchor[from=rectangle ee]{south east}% \inheritanchor[from=rectangle ee]{south west}% \inheritanchor[from=rectangle ee]{input}% \inheritanchor[from=rectangle ee]{output}% \inheritanchorborder[from=rectangle ee]% % \backgroundpath{ \pgf@process{\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}} \pgf@xa=\pgf@x \pgf@ya=\pgf@y \pgf@process{\pgfpointadd{\northeast}{\pgfpointscale{-1}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}} \pgf@xb=\pgf@x \pgf@yb=\pgf@y % Move tip back a little bit \advance\pgf@xb by-.5\pgflinewidth % Triangle triangle: \pgfpathmoveto{\pgfqpoint{\pgf@xa}{\pgf@ya}} \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@yb}} \pgf@yc=.5\pgf@ya \advance\pgf@yc by .5\pgf@yb \pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@yc}} \pgfpathclose }% \beforebackgroundpath{ { \pgf@process{\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}} \pgf@ya=\pgf@y \pgf@process{\pgfpointadd{\northeast}{\pgfpointscale{-1}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}} \pgf@xb=\pgf@x \pgf@yb=\pgf@y \pgf@yc=.5\pgf@ya \advance\pgf@yc by.5\pgf@yb \pgfusepathqstroke \pgftransformshift{\pgfqpoint{\pgf@xb}{\pgf@yc}} \pgf@yc=.5\pgf@yb \advance\pgf@yc by-.5\pgf@ya \pgftransformscale{\pgf@sys@tonumber{\pgf@yc}} \pgfkeysvalueof{/pgf/generic diode IEC/before background} } }% } \makeatother \tikzset{ leere diode graphic/.style={ circuit symbol open, circuit symbol size=width 1.25 height 1.25, transform shape, shape=leere diode, /pgf/generic diode IEC/before background={ \pgfpathmoveto{\pgfqpoint{0pt}{-1pt}} \pgfpathlineto{\pgfqpoint{0pt}{1pt}} \pgfusepathqstroke }, }, } \begin{document} \begin{tikzpicture}[circuit ee IEC,circuit symbol unit=5.5pt] \tikzset{set diode graphic=leere diode graphic}\draw (0,0) to[diode] (1,0); \end{tikzpicture} \end{document} But if it is compiled via another file—say, mainfile.tex—using the standalone package: \documentclass{article} \usepackage[subpreambles]{standalone} \begin{document} \input{subfile.tex} \end{document} the second compilation fails with the following error: (./subfile.tex ! Undefined control sequence. \pgf@sh@bg@leere diode ->\pgf @process{\pgfpointadd {\southwest }{\pgfpoint ... l.77 ... diode graphic}\draw (0,0) to[diode] (1,0) ; ? Although the mainfile.sta file contains the entire preamble of the subfile.tex file—including the \makeatletter and \makeatother commands—it appears that the @ character is not treated as a letter. Do you understand why, and do you know how to solve this problem?
- Is TeX Live 2016 compatible with macOS Tahoe?by PJ49 on October 19, 2026 at 10:17 pm
For certain reasons I have to use TeXShop version 3.62 in a project. It works fine with Sequoia 15.7.7, but will it work if I upgrade to Tahoe? Sorry, I guess I asked the wrong question. The TeXShop version does not seem to be important in this project. The relevant question should probably be "Will TeXLive 2016 work with MacOS Tahoe?" Obviously, I run into problems when I try TeXLive 2025 on Sequoia. So, why is this a problem? It works fine for me as it is, but I have a collaborator who does not have administrator rights on his computer. He has to use the OS that his employer has chosen, in this case Tahoe.
- Why should I continue learning LaTeX?by Sourav on October 13, 2026 at 6:11 pm
I started learning (and using) LaTeX almost two years ago. But I see now that AI can produce the code for whatever I may want in a few seconds. This has demotivated me to continue learning more about LaTeX. Should I continue learning it ? If yes, why ? Just for the sake of enjoyment ? Or, are there more practical reasons ?