Week
- Producing an Elliptical Ring of Imagesby DDS on March 8, 2026 at 8:34 pm
Consider the code: \documentclass{book} \usepackage{graphicx} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \thispagestyle{empty} \begin{center} \begin{tikzpicture} \fill[red] rectangle (8,6); \foreach \k in {0,30,...,360} \node at ($(4,3)+(\k:2)$) {\includegraphics[width=1.7em]{example-image-a}}; \end{tikzpicture} \end{center} \end{document} which produces: QUESTION: How may I modify this code in order produce an ellipse (instead of circle) of images? Thank you.
- How to correct for LaTeX and/or package changes affecting parsing of text in TikZ decoration for TL2020 vs TL2021 vs TL2022/3 vs TL2024 vs TL2025/6?by cfr on March 8, 2026 at 7:31 pm
Consider the following code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{% decorations.text,% mindmap,% } \begin{document} \begin{tikzpicture} \path[ adddecrev/.style={% postaction={decorate, decoration={text along path, text={##1}, raise=3pt, }}}, small mindmap, ] node (norm) [root concept, concept, adddecrev={AAA AAA|\hskip 7.5pt| ||AAAAA AAA{\kern10ptA}A AA AA}] {AAAAAAAAA} [counterclockwise from=120] % removing this child eliminates the warnings child { node [concept, adddecrev={X{\kern-2ptX}{\kern-1ptX}{\kern4ptX}{\kern0ptX}X|\hskip8pt| ||X{\kern-2ptX}X{\kern-1ptX}{\kern-1ptX} X{\kern-3ptX}{\kern-1ptX}l{\kern-1ptX}|\hskip-2pt|X||{\kern-1ptX}|\hskip4pt|X||{\kern-2ptX}|\hskip-2pt|X|| }] {MMMMMMMM} } ; \end{tikzpicture} \end{document} In TL2020, this compiles without complaint for either pdfLaTeX or LuaLaTeX. In TL2025 or 2026, it complains Missing character: There is no A in font nullfont! In TL2024, the complaint is Missing character: There is no @ in font nullfont! In TL2022 and TL2023, the complaint is Missing character: There is no ? in font nullfont! In TL2021, the complaint is Missing character: There is no > in font nullfont! What causes these differences? Usually the nullfont warnings relate directly to problematic characters in the source. The A suggests that might be the case, except that removing the X line makes the problem disappear. Moreover, for earlier installations, the characters complained of bear no obvious relation to the input and I'm not sure where they are coming from or what the problem is. I also can't see anything obviously wrong with the code specifying the text for the decoration, despite rereading the relevant part of the manual. What is happening here? Is my code erroneous? If so, how can I correct it? In any case, is there a way to avoid the problem with a current TeX Live?
- An equation in the middle between several equations in cases or dcasesby Sebastiano on March 8, 2026 at 1:42 pm
Starting from \documentclass[a4paper,12pt]{article} \usepackage{mathtools} \begin{document} \[ \begin{cases} x=x(t) & t\in[a,b]\\ y=y(t) \end{cases} \begin{cases} x=x & x\in[0,\pi/3]\\ y=y(x) \end{cases} \] \end{document} I would have this: putting the parameter in the middle between the two equations of the system. And if I had n equations, what would be the way to put it in the middle?
- Drawing a topological surface of genus threeby InsideOut on March 8, 2026 at 12:56 pm
I would need your help to draw a surface of genus three like in the picture I attached. More specifically, I aim to draw a torus (surface of genus one) and below the surface of genus three realised by mean of some surgeries on the surface. I already drawn the torus by myself and I need help with the genus 3 surface. As you can see, the torus I drew is not exactly as on paper. Could help me? I also added some notes about colours of curves. Moreover, I'd like the surface is filled with the pattern [pattern=north west lines, pattern color=pallido], where pallido is just a colour I defined in RGB (it's already in the code). In the picture I do not need the names of colours, that's only for you. Thank you in advance! \documentclass[11pt,a4wide]{article} \usepackage[latin1]{inputenc} \usepackage{fancyhdr} \usepackage{indentfirst} \usepackage{graphicx} \usepackage{newlfont} \usepackage{amssymb} \usepackage{amsmath} \usepackage{latexsym} \usepackage{lscape} \usepackage{booktabs} \usepackage{amsthm} \usepackage{lscape} \usepackage{tikz} \usetikzlibrary{patterns,hobby} \usepackage{pgfplots} \pgfplotsset{compat=1.6} \usepackage{faktor} %\faktor{A}{B} %\usepackage{pictexwd,dcpic} \usepackage{pgf,tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \usetikzlibrary{arrows.meta} \usetikzlibrary{decorations.markings} \usetikzlibrary{bending} \usetikzlibrary{patterns} \usetikzlibrary{intersections, calc} \usetikzlibrary{decorations.pathmorphing} \usepackage{soul} \usepackage{rotating} \usepackage[margin=3cm]{geometry} \usepackage{enumitem} \usepackage{color} \usepackage{hyperref} \definecolor{smoked}{RGB}{216, 212, 204} \definecolor{mauve}{RGB}{200, 55, 171} \definecolor{apricot}{RGB}{250, 144, 4} \definecolor{sky}{RGB}{66, 169, 244} \definecolor{plum}{RGB}{76, 0, 102} \definecolor{forest}{RGB}{90,145,120} \definecolor{sand}{RGB}{180,160,120} \begin{document} \begin{figure}[h!] \centering \begin{tikzpicture}[scale=2, every node/.style={scale=0.875}] \definecolor{pallido}{RGB}{221,227,227} \pattern [pattern=north west lines, pattern color=pallido] (0,0) ellipse (3cm and 2cm); \fill [white] (0,0) ellipse (1cm and 0.66cm); \draw[thin, black] (0,0) ellipse (3cm and 2cm) (0,0) ellipse (1cm and 0.66cm); \draw[orange] (0,0) ellipse (2cm and 1.25cm); %\draw[blue] (0,0) arc (030:060:2.5cm and 1.5cm); \draw[blue] (0,0) +(30:2.4 and 1.6) arc [start angle=30, end angle=60, x radius=2.4, y radius=1.6]; \draw[blue] (0,0) +(210:2.4 and 1.6) arc [start angle=210, end angle=240, x radius=2.4, y radius=1.6]; \draw[violet] (0,0) +(120:1.2 and 0.8) arc [start angle=120, end angle=150, x radius=1.2, y radius=0.8]; \draw[violet] (0,0) +(300:1.2 and 0.8) arc [start angle=300, end angle=330, x radius=1.2, y radius=0.8]; \draw[red ] (0 ,-0.66) to[bend left ] (0,-2); \draw[sky ] (0 , 0.66) to[bend left ] (0, 2); \draw[thin, red, dashed] (0 ,-0.66) to[bend right] (0,-2); \draw[thin, sky, dashed] (0 , 0.66) to[bend right] (0, 2); \fill ( 0.2,-1.25) circle (1pt); \fill (-0.2, 1.25) circle (1pt); \fill[violet] (0,0) +(120:1.2 and 0.8) circle (0.5pt); \fill[violet] (0,0) +(150:1.2 and 0.8) circle (0.5pt); \fill[violet] (0,0) +(300:1.2 and 0.8) circle (0.5pt); \fill[violet] (0,0) +(330:1.2 and 0.8) circle (0.5pt); \fill[blue] (0,0) +(030:2.4 and 1.6) circle (0.5pt); \fill[blue] (0,0) +(060:2.4 and 1.6) circle (0.5pt); \fill[blue] (0,0) +(210:2.4 and 1.6) circle (0.5pt); \fill[blue] (0,0) +(240:2.4 and 1.6) circle (0.5pt); \draw[black, thin] (0,0) +(030:2.4 and 1.6) circle (1pt); \draw[black, thin] (0,0) +(060:2.4 and 1.6) circle (1pt); \draw[black, thin] (0,0) +(210:2.4 and 1.6) circle (1pt); \draw[black, thin] (0,0) +(240:2.4 and 1.6) circle (1pt); \draw[violet] (0,0) +(120:1.2 and 0.8) circle (1pt); \draw[violet] (0,0) +(150:1.2 and 0.8) circle (1pt); \draw[violet] (0,0) +(300:1.2 and 0.8) circle (1pt); \draw[violet] (0,0) +(330:1.2 and 0.8) circle (1pt); \node at ( 1.75 , 1.25 ) {\(e_{1,1}\)}; \node at (-1.75 ,-1.25 ) {\(e_{1,2}\)}; \node at (-1.0625, 0.625) {\(e_{2,1}\)}; \node at ( 1.0625,-0.625) {\(e_{2,2}\)}; \end{tikzpicture} \caption{} \label{fig:hypermin} \end{figure} \end{document} My current result The picture I wish to draw:
- How to save x,y,w,h of answer boxes on a quizby Dov on March 7, 2026 at 5:17 pm
I am trying to generate a quiz where I can generate a file answers.txt containing the id of each question, the x,y location on the page, the width,height and the answer. The macro side effects are brutal and I have no idea what is going on. The following minimal non-working example shows the error. I can try to save out the location of each one, but if I try to also print out width,height that give an error. \documentclass{article} \usepackage{xparse} \usepackage{tikz} \usepackage{zref-savepos} \newwrite\ansfile % Answer box size \newlength{\answ} \newlength{\ansh} \setlength{\answ}{36pt} \setlength{\ansh}{18pt} \newcounter{question} \newcounter{ansbox} % Parallel arrays stored as token lists \newtoks\AnsIDs \newtoks\AnsX \newtoks\AnsY \newtoks\AnsW \newtoks\AnsH \newtoks\AnsText \NewDocumentCommand{\question}{mm}{% \stepcounter{question}% \par\noindent\textbf{Q\thequestion\ (#1 pts)} #2\quad } \NewDocumentCommand{\ans}{m}{% \stepcounter{ansbox}% \edef\labelname{Q\thequestion-A\theansbox}% \zsavepos{\labelname}% \tikz[baseline]{\draw (0,0) rectangle (\answ,\ansh);}% % store in arrays \AnsIDs=\expandafter{\the\AnsIDs \labelname,}% \AnsX=\expandafter{\the\AnsX \zposx{\labelname},}% \AnsY=\expandafter{\the\AnsY \zposy{\labelname},}% \AnsW=\expandafter{\the\AnsW \strip@pt\answ,}% \AnsH=\expandafter{\the\AnsH \strip@pt\ansh,}% \AnsText=\expandafter{\the\AnsText #1,}% } \AtBeginDocument{% \immediate\openout\ansfile=answers.txt } \AtEndDocument{% % write arrays to file \def\IDList{\the\AnsIDs}% \def\XList{\the\AnsX}% \def\YList{\the\AnsY}% \def\WList{\the\AnsW}% \def\HList{\the\AnsH}% \def\TList{\the\AnsText}% \newcount\i \i=0 \loop \ifnum\i<\value{ansbox} % extract first item from each comma list \edef\currID{\expandafter\@firstofone\expandafter{\expandafter\@car\IDList\@nil}}% \edef\IDList{\expandafter\@gobble\IDList}% \edef\currX{\expandafter\@firstofone\expandafter{\expandafter\@car\XList\@nil}}% \edef\XList{\expandafter\@gobble\XList}% \edef\currY{\expandafter\@firstofone\expandafter{\expandafter\@car\YList\@nil}}% \edef\YList{\expandafter\@gobble\YList}% \edef\currW{\expandafter\@firstofone\expandafter{\expandafter\@car\WList\@nil}}% \edef\WList{\expandafter\@gobble\WList}% \edef\currH{\expandafter\@firstofone\expandafter{\expandafter\@car\HList\@nil}}% \edef\HList{\expandafter\@gobble\HList}% \edef\currA{\expandafter\@firstofone\expandafter{\expandafter\@car\TList\@nil}}% \edef\TList{\expandafter\@gobble\TList}% % write to file \immediate\write\ansfile{\currID\space \currX\space \currY\space \currW\space \currH\space \currA}% \advance\i by 1 \repeat \immediate\closeout\ansfile } \begin{document} \question{10}{What is $2+2$?} \ans{4} \question{5}{What is $3+5$?} \ans{8} \end{document} The log file is: This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2022/dev/ Debian) (preloaded format=pdflatex 2026.2.22) 7 MAR 2026 14:37 entering extended mode restricted \write18 enabled. %&-line parsing enabled. **mintest5.tex (./mintest5.tex LaTeX2e <2021-11-15> patch level 1 L3 programming layer <2022-01-21> (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls Document Class: article 2021/10/04 v1.4n Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo File: size10.clo 2021/10/04 v1.4n Standard LaTeX file (size option) ) \c@part=\count185 \c@section=\count186 \c@subsection=\count187 \c@subsubsection=\count188 \c@paragraph=\count189 \c@subparagraph=\count190 \c@figure=\count191 \c@table=\count192 \abovecaptionskip=\skip47 \belowcaptionskip=\skip48 \bibindent=\dimen138 ) (/usr/share/texlive/texmf-dist/tex/latex/l3packages/xparse/xparse.sty (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty Package: expl3 2022-01-21 L3 programming layer (loader) (/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def File: l3backend-pdftex.def 2022-01-12 L3 backend support: PDF output (pdfTeX) \l__color_backend_stack_int=\count193 \l__pdf_internal_box=\box50 )) Package: xparse 2022-01-12 L3 Experimental document command parser ) (/usr/share/texlive/texmf-dist/tex/latex/pgf/frontendlayer/tikz.sty (/usr/share/texlive/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty (/usr/share/texlive/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty (/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex \pgfutil@everybye=\toks16 \pgfutil@tempdima=\dimen139 \pgfutil@tempdimb=\dimen140 (/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfutil-common-lists.t ex)) (/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def \pgfutil@abb=\box51 ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex (/usr/share/texlive/texmf-dist/tex/generic/pgf/pgf.revision.tex) Package: pgfrcs 2021/05/15 v3.1.9a (3.1.9a) )) Package: pgf 2021/05/15 v3.1.9a (3.1.9a) (/usr/share/texlive/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty Package: graphicx 2021/09/16 v1.2d Enhanced LaTeX Graphics (DPC,SPQR) (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty Package: keyval 2014/10/28 v1.15 key=value parser (DPC) \KV@toks@=\toks17 ) (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty Package: graphics 2021/03/04 v1.4d Standard LaTeX Graphics (DPC,SPQR) (/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty Package: trig 2021/08/11 v1.11 sin cos tan (DPC) ) (/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration ) Package graphics Info: Driver file: pdftex.def on input line 107. (/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def File: pdftex.def 2020/10/05 v1.2a Graphics/color driver for pdftex )) \Gin@req@height=\dimen141 \Gin@req@width=\dimen142 ) (/usr/share/texlive/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty (/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex Package: pgfsys 2021/05/15 v3.1.9a (3.1.9a) (/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex \pgfkeys@pathtoks=\toks18 \pgfkeys@temptoks=\toks19 (/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.t ex \pgfkeys@tmptoks=\toks20 )) \pgf@x=\dimen143 \pgf@y=\dimen144 \pgf@xa=\dimen145 \pgf@ya=\dimen146 \pgf@xb=\dimen147 \pgf@yb=\dimen148 \pgf@xc=\dimen149 \pgf@yc=\dimen150 \pgf@xd=\dimen151 \pgf@yd=\dimen152 \w@pgf@writea=\write3 \r@pgf@reada=\read2 \c@pgf@counta=\count194 \c@pgf@countb=\count195 \c@pgf@countc=\count196 \c@pgf@countd=\count197 \t@pgf@toka=\toks21 \t@pgf@tokb=\toks22 \t@pgf@tokc=\toks23 \pgf@sys@id@count=\count198 (/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg File: pgf.cfg 2021/05/15 v3.1.9a (3.1.9a) ) Driver file for pgf: pgfsys-pdftex.def (/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def File: pgfsys-pdftex.def 2021/05/15 v3.1.9a (3.1.9a) (/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.de f File: pgfsys-common-pdf.def 2021/05/15 v3.1.9a (3.1.9a) ))) (/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code. tex File: pgfsyssoftpath.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgfsyssoftpath@smallbuffer@items=\count199 \pgfsyssoftpath@bigbuffer@items=\count266 ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code. tex File: pgfsysprotocol.code.tex 2021/05/15 v3.1.9a (3.1.9a) )) (/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty Package: xcolor 2021/10/31 v2.13 LaTeX color extensions (UK) (/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg File: color.cfg 2016/01/02 v1.6 sample color configuration ) Package xcolor Info: Driver file: pdftex.def on input line 227. Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1352. Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1356. Package xcolor Info: Model `RGB' extended on input line 1368. Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1370. Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1371. Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1372. Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1373. Package xcolor Info: Model `Gray' substituted by `gray' on input line 1374. Package xcolor Info: Model `wave' substituted by `hsb' on input line 1375. ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex Package: pgfcore 2021/05/15 v3.1.9a (3.1.9a) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex \pgfmath@dimen=\dimen153 \pgfmath@count=\count267 \pgfmath@box=\box52 \pgfmath@toks=\toks24 \pgfmath@stack@operand=\toks25 \pgfmath@stack@operation=\toks26 ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code.tex (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code .tex) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonomet ric.code.tex) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.cod e.tex) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.comparison .code.tex) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base.code. tex) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code .tex) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code. tex) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integerari thmetics.code.tex))) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex \c@pgfmathroundto@lastzeros=\count268 )) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfint.code.tex) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.te x File: pgfcorepoints.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgf@picminx=\dimen154 \pgf@picmaxx=\dimen155 \pgf@picminy=\dimen156 \pgf@picmaxy=\dimen157 \pgf@pathminx=\dimen158 \pgf@pathmaxx=\dimen159 \pgf@pathminy=\dimen160 \pgf@pathmaxy=\dimen161 \pgf@xx=\dimen162 \pgf@xy=\dimen163 \pgf@yx=\dimen164 \pgf@yy=\dimen165 \pgf@zx=\dimen166 \pgf@zy=\dimen167 ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct. code.tex File: pgfcorepathconstruct.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgf@path@lastx=\dimen168 \pgf@path@lasty=\dimen169 ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code .tex File: pgfcorepathusage.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgf@shorten@end@additional=\dimen170 \pgf@shorten@start@additional=\dimen171 ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.te x File: pgfcorescopes.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgfpic=\box53 \pgf@hbox=\box54 \pgf@layerbox@main=\box55 \pgf@picture@serial@count=\count269 ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.c ode.tex File: pgfcoregraphicstate.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgflinewidth=\dimen172 ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformation s.code.tex File: pgfcoretransformations.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgf@pt@x=\dimen173 \pgf@pt@y=\dimen174 \pgf@pt@temp=\dimen175 ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex File: pgfcorequick.code.tex 2021/05/15 v3.1.9a (3.1.9a) ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.t ex File: pgfcoreobjects.code.tex 2021/05/15 v3.1.9a (3.1.9a) ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing .code.tex File: pgfcorepathprocessing.code.tex 2021/05/15 v3.1.9a (3.1.9a) ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.te x File: pgfcorearrows.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgfarrowsep=\dimen176 ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex File: pgfcoreshade.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgf@max=\dimen177 \pgf@sys@shading@range@num=\count270 \pgf@shadingcount=\count271 ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex File: pgfcoreimage.code.tex 2021/05/15 v3.1.9a (3.1.9a) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code. tex File: pgfcoreexternal.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgfexternal@startupbox=\box56 )) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.te x File: pgfcorelayers.code.tex 2021/05/15 v3.1.9a (3.1.9a) ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.c ode.tex File: pgfcoretransparency.code.tex 2021/05/15 v3.1.9a (3.1.9a) ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code. tex File: pgfcorepatterns.code.tex 2021/05/15 v3.1.9a (3.1.9a) ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorerdf.code.tex File: pgfcorerdf.code.tex 2021/05/15 v3.1.9a (3.1.9a) ))) (/usr/share/texlive/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex File: pgfmoduleshapes.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgfnodeparttextbox=\box57 ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex File: pgfmoduleplot.code.tex 2021/05/15 v3.1.9a (3.1.9a) ) (/usr/share/texlive/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65 .sty Package: pgfcomp-version-0-65 2021/05/15 v3.1.9a (3.1.9a) \pgf@nodesepstart=\dimen178 \pgf@nodesepend=\dimen179 ) (/usr/share/texlive/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18 .sty Package: pgfcomp-version-1-18 2021/05/15 v3.1.9a (3.1.9a) )) (/usr/share/texlive/texmf-dist/tex/latex/pgf/utilities/pgffor.sty (/usr/share/texlive/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty (/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex)) (/usr/share/texlive/texmf-dist/tex/latex/pgf/math/pgfmath.sty (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex)) (/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex Package: pgffor 2021/05/15 v3.1.9a (3.1.9a) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex) \pgffor@iter=\dimen180 \pgffor@skip=\dimen181 \pgffor@stack=\toks27 \pgffor@toks=\toks28 )) (/usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex Package: tikz 2021/05/15 v3.1.9a (3.1.9a) (/usr/share/texlive/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers .code.tex File: pgflibraryplothandlers.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgf@plot@mark@count=\count272 \pgfplotmarksize=\dimen182 ) \tikz@lastx=\dimen183 \tikz@lasty=\dimen184 \tikz@lastxsaved=\dimen185 \tikz@lastysaved=\dimen186 \tikz@lastmovetox=\dimen187 \tikz@lastmovetoy=\dimen188 \tikzleveldistance=\dimen189 \tikzsiblingdistance=\dimen190 \tikz@figbox=\box58 \tikz@figbox@bg=\box59 \tikz@tempbox=\box60 \tikz@tempbox@bg=\box61 \tikztreelevel=\count273 \tikznumberofchildren=\count274 \tikznumberofcurrentchild=\count275 \tikz@fig@count=\count276 (/usr/share/texlive/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex File: pgfmodulematrix.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgfmatrixcurrentrow=\count277 \pgfmatrixcurrentcolumn=\count278 \pgf@matrix@numberofcolumns=\count279 ) \tikz@expandcount=\count280 (/usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tik zlibrarytopaths.code.tex File: tikzlibrarytopaths.code.tex 2021/05/15 v3.1.9a (3.1.9a) ))) (/usr/share/texlive/texmf-dist/tex/latex/zref/zref-savepos.sty Package: zref-savepos 2020-07-03 v2.32 Module savepos for zref (HO) (/usr/share/texlive/texmf-dist/tex/latex/zref/zref-base.sty Package: zref-base 2020-07-03 v2.32 Module base for zref (HO) (/usr/share/texlive/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty Package: ltxcmds 2020-05-10 v1.25 LaTeX kernel commands for general use (HO) ) (/usr/share/texlive/texmf-dist/tex/generic/infwarerr/infwarerr.sty Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO) ) (/usr/share/texlive/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty Package: kvsetkeys 2019/12/15 v1.18 Key value parser (HO) ) (/usr/share/texlive/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty Package: kvdefinekeys 2019-12-19 v1.6 Define keys (HO) ) (/usr/share/texlive/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty Package: pdftexcmds 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO ) (/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty Package: iftex 2020/03/06 v1.0d TeX engine tests ) Package pdftexcmds Info: \pdf@primitive is available. Package pdftexcmds Info: \pdf@ifprimitive is available. Package pdftexcmds Info: \pdfdraftmode found. ) (/usr/share/texlive/texmf-dist/tex/generic/etexcmds/etexcmds.sty Package: etexcmds 2019/12/15 v1.7 Avoid name clashes with e-TeX commands (HO) ) (/usr/share/texlive/texmf-dist/tex/latex/auxhook/auxhook.sty Package: auxhook 2019-12-17 v1.6 Hooks for auxiliary files (HO) ) Package zref Info: New property list: main on input line 764. Package zref Info: New property: default on input line 765. Package zref Info: New property: page on input line 766. ) Package zref Info: New property list: savepos on input line 80. Package zref Info: New property: posx on input line 82. Package zref Info: New property: posy on input line 83. ) \ansfile=\write4 \answ=\skip49 \ansh=\skip50 \c@question=\count281 \c@ansbox=\count282 \AnsIDs=\toks29 \AnsX=\toks30 \AnsY=\toks31 \AnsW=\toks32 \AnsH=\toks33 \AnsText=\toks34 (./mintest5.aux) \openout1 = `mintest5.aux'. LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 85. LaTeX Font Info: ... okay on input line 85. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 85. LaTeX Font Info: ... okay on input line 85. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 85. LaTeX Font Info: ... okay on input line 85. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 85. LaTeX Font Info: ... okay on input line 85. LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 85. LaTeX Font Info: ... okay on input line 85. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 85. LaTeX Font Info: ... okay on input line 85. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 85. LaTeX Font Info: ... okay on input line 85. (/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii [Loading MPS to PDF converter (version 2006.09.02).] \scratchcounter=\count283 \scratchdimen=\dimen191 \scratchbox=\box62 \nofMPsegments=\count284 \nofMParguments=\count285 \everyMPshowfont=\toks35 \MPscratchCnt=\count286 \MPscratchDim=\dimen192 \MPnumerator=\count287 \makeMPintoPDFobject=\count288 \everyMPtoPDFconversion=\toks36 ) (/usr/share/texlive/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty Package: epstopdf-base 2020-01-24 v2.11 Base part for package epstopdf Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4 85. (/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv e )) \openout4 = `answers.txt'. LaTeX Font Info: External font `cmex10' loaded for size (Font) <7> on input line 87. LaTeX Font Info: External font `cmex10' loaded for size (Font) <5> on input line 87. \i=\count289 ! Undefined control sequence. \currW ...firstofone{\spacefactor \@m {}car\strip @pt\answ ,\strip @pt\answ ... l.93 \end{document} ? ! Emergency stop. \currW ...firstofone{\spacefactor \@m {}car\strip @pt\answ ,\strip @pt\answ ... l.93 \end{document} End of file on the terminal! Here is how much of TeX's memory you used: 12504 strings out of 478287 261794 string characters out of 5849289 513433 words of memory out of 5000000 30492 multiletter control sequences out of 15000+600000 469567 words of font info for 29 fonts, out of 8000000 for 9000 1141 hyphenation exceptions out of 8191 100i,2n,104p,414b,398s stack positions out of 5000i,500n,10000p,200000b,80000s ! ==> Fatal error occurred, no output PDF file produced!
- Number of slide at the beginning (OpTeX slides)by juanuni on March 7, 2026 at 6:47 am
I am working with optex 1.17, which comes with TeXLive 2023. I am creating slides, but I am having a problem with the counter at the beginning, on the cover slide. The slide number appears near the lower right corner. How can I make it disappear? Am I doing something wrong? How can I customize the slide number design for the following slides? \fontfam[Fira] \slides \wideformat \load[colors] \def\author#1{\def\theauthor{#1}} \author{Titor} % Redefinimos \tit y \subtit para que solo guarden el texto % pero NO generen una página extra. \def\tit #1{\def\thetit{#1}} \def\subtit #1{\def\thesubtit{#1}} \tit{My slide} \subtit{first intent} \def\azul{\pdfliteral{0.408 0.824 0.875 rg}} \def\gris{\pdfliteral{0.4706 0.5098 0.5412 rg}} \def\negro{\pdfliteral{0 g 0 G Q}} % 2. CARÁTULA MANUAL (Sin margen) \puttext -150mm 0mm {% \vbox to 0pt{ \offinterlineskip \vskip -50mm \vbox{ {\azul\hrule height 90mm width 500mm} {\gris\hrule height 185mm width 500mm} } \vss }% } % 3. CONTENIDO USANDO LAS MACROS NEUTRALIZADAS \null \vskip -1cm %\centerline{ {\setfontsize{at45pt}\caps\rm \pdfliteral{1 1 1 rg} \thetit}%} \vskip 1.5cm %\centerline{ {\setfontsize{at19pt}\caps\it \pdfliteral{0 g} \theauthor}%} \vskip 1cm %\centerline{ {\setfontsize{at20pt}\caps\rm \pdfliteral{0.408 0.824 0.875 rg} \thesubtit}%} \vskip 2cm % {\setfontsize{at15pt}\caps\rm \pdfliteral{0 g}Presented by} \vskip 0cm {\setfontsize{at19pt}\caps\rm \pdfliteral{0 g}Me} \vfill \pg+ % 4. REGISTRO Y CONFIGURACIÓN PARA EL RESTO DE SLIDES \negro \pgbackground={} \def\HeadColor{\pdfliteral{0 g}} \pg; %%%%%%%%%%%%%%%%%%%%%%%%%5 %%%%%%%%%%%%%%%%sec title bar \newdimen\framebarheight \framebarheight=1.2cm \let\oldprintsec=\_printsec \def\_printsec#1{% % barra superior absoluta \puttext -20mm 0mm {% \vbox to0pt{ \offinterlineskip \vskip -16mm \vbox{ {\gris\hrule height 17.5mm width 500mm} %{\gris\hrule height 185mm width 500mm} } \vss } } % acercar el título a la barra \vskip-1.4cm %%%%%%%%%%%%%%%%%%%%custom sec \hbox to\hsize{ \hskip -2.5mm {\azul\setfontsize{at25pt}\caps\rm #1} \hfil \vbox to10mm{ \vfil \hbox{\picw=10mm \inspic{logo.png}} \vfil } \hskip 2.5mm } \par \vskip 6mm } %%%%%%%%%%%%%%%%%%%%%%% %\bigskip %%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%custom bullets \def\BulletColor{0.408 0.824 0.875} \_sdef{_item:X}{% {\pdfliteral{\BulletColor\space rg}\_raise.2ex\_fullrectangle{.8ex}}% \pdfliteral{0 0 0 rg}% \kern.5em } \_sdef{_item:x}{% {\pdfliteral{\BulletColor\space rg}\_raise.3ex\_fullrectangle{.6ex}}% \pdfliteral{0 0 0 rg}% \kern.4em } %%%%%%%%%%%%%%%%%%%%%%%%%% %\pageno=1 %\def\pgfoot{\hfil\the\pageno} \sec Useful links * Wikipedia: \url{https://wikipedia.org} * DuckDuckGo: \url{https://duckduckgo.org} \pg.
- How to customize a header on a nomenclature groupby Knudsen on March 7, 2026 at 4:46 am
I have a set of entries on a nomenclature package that I would like to right-adjust the header of the group. I am able to change the font, color, etc ... but have not succeeded in moving it down to the right, even though it looks possible. In this example here, the word Sets accepts a command \textcolor{gray}{\textbf{Sets}} but NOT the command \hfill\textcolor{gray}{\textbf{Sets}}. My MWE is: \documentclass{report} \usepackage{xcolor} % With notocbasic because of: %https://tex.stackexchange.com/questions/724740/clash-between-package-ntexindy -L english -C utf8 duo-eb.idxomencl-and-possibly-polyglossia/ \usepackage[refpage,intoc,notocbasic]{nomencl} \makenomenclature \renewcommand{\nomname}{List of Symbols} \usepackage{ifthen} \setlength{\nomitemsep}{1pt} % --- REDEFINE \nomgroup TO ADD HEADERS --- \renewcommand{\nomgroup}[1]{% % Adds extra space between groups \item[\vspace{10pt}] % Check the letter assigned to the group and print the header \ifthenelse{\equal{#1}{A}}{\item[{\textcolor{gray}{\textbf{Sets}}}]}{% \ifthenelse{\equal{#1}{B}}{\item[{\textcolor{gray}{\textbf{Sequences}}}]}{% \ifthenelse{\equal{#1}{D}}{\item[{\textcolor{gray}{\textbf{O-notation}}}]}{% } } } } \begin{document} \nomenclature[A-set]{$\max X$}{maximum of a set} \nomenclature[A-set]{$\min X$}{minimum of a set} \nomenclature[A-ysup-inf]{$\liminf_{x\to a}$}{lower limit} \nomenclature[A-ysup-inf]{$\limsup_{x\to a}$}{upper limit} \nomenclature[A-ysup-inf]{$\lim_{t \to a}$}{limit when $t$ approaches $a$} \nomenclature[A-ysup-inf]{$\inf X$}{infimum of the set X} \nomenclature[A-ysup-inf]{$\sup X$}{supremum of the set X} \nomenclature[B-sequence]{$\{f_n\}$}{sequence of functions} \nomenclature[B-sequence]{$(x_n)$}{sequence of numbers} \nomenclature[B-sequence-z]{$\ell^2(N)$}{space of square summable sequences}% \nomenclature[D-o-not]{$f(x)\sim g(x)$}{assymptotically equal} \nomenclature[D-o-not]{$o(g(x))$}{Landau o-notation} \nomenclature[D-o-not]{$O(g(x))$}{Landau O-notation} \printnomenclature[3.5cm] \end{document} to be processed with: xelatex t makeindex t.nlo -s nomencl.ist -o t.nls xelatex t
- Confusions with the new babel-german v3.0by Jinwen on March 7, 2026 at 4:12 am
I am a little bit confused with the new babel-german v3.0, where the naming convention has a breaking change: post-1996 convention is now the default one. Is it OK to still use ngerman in current documents? Would it be different with using the new german option? Should the replacement of ngerman be german or german-de/german-germany? The documentation suggests that "it is always advisable to use a more precise option such as german-de". Thus perhaps it should be safer and more stable to use german-de instead of german. For package authors passing/detecting language options, should there be any caution with this new change? (For example, shall one need to detect the version and apply different rules separately?) Thanks so much!
- Italian Parliament: semicircle and colored dotsby Sebastiano on March 6, 2026 at 8:39 pm
I am preparing a project that involves representing the Italian Parliament using a semicircle made of colored dots, as shown in the following image: I have tried to create something using the wheelchart package (page 19 of the manual), which allows generating similar charts. However, I am unable to automatically increase the number of dots per row. For example, in the figure there are 12 dots per row, but I would like a more customizable (for example 7 balls for every radius) and automatic solution to control this. I prefer big dots and not balls. \documentclass{article} \usepackage{tikz} \usepackage{wheelchart} \begin{document} \begin{tikzpicture} \pgfkeys{ /wheelchart, discrete, discrete pic={\shade[ball color=\WCvarB] (0,0) circle[radius=2pt];}, discrete sort=angle, discrete space at borders=false, start angle=180, total angle=180, value=\WCvarA } \wheelchart{ 120/blue/, 45/green/, 40/red/, 25/orange/, 10/purple/, 5/teal/ } \end{tikzpicture} \end{document}
- Best way to get an extensible arrow with no arrowheads?by Dylan Thurston on March 6, 2026 at 6:42 pm
There are various packages that will conveniently give extensible arrows with sub/superscripts. I'm aware of: amsmath (only for basic arrows) mathtools extarrows chemarrow You can of course do the same thing with TikZ or similar. I want something similar, but with no arrowheads at all. What's the best way to achieve that? I can do it with TikZ, but the mildly annoying part would be matching the standard arrow height and width. Should I figure out how to use the internal \arrowfill@ command in amsmath? My application is essentially marking a chain of edges connected in a graph, with various labels on the edges. Here's one attempt using a text em-dash. You can see that the em-dash isn't the same as the math-mode arrow. \documentclass[12pt]{amsart} \begin{document} \[ x \overset{\mathcal{U}}{\mathbin{\text{---}}} y \overset{\mathcal{U}}{\longrightarrow} z\] \end{document}
- VS Code LaTeX Workshop: latexmk -pdfps fixes chemnum issue but breaks PNG graphics (Cannot determine size of graphic)by palloc on March 6, 2026 at 5:29 pm
I am compiling a LaTeX document in VS Code using the LaTeX Workshop extension on Windows 11. My document uses: chemnum / chemstyle nomencl biblatex mhchem Originally my latexmk tool was configured with: -pdf However, this produced incorrect compound labels when using chemnum with a scheme environment (temporary labels such as TMP1, TMP2 were not replaced). Following advice from a previous question, I changed the compilation pipeline to: -pdfps, (see my previous question: VS Code LaTeX Workshop: how to configure settings.json when using both chemnum and nomencl?) This indeed fixes the chemnum labeling issue. However, now I cannot include PNG graphics. For example: \begin{figure} \centering \includegraphics[scale=0.8]{random.png} \caption{random} \label{fig:random} \end{figure} produces the error: Cannot determine size of graphic (no BoundingBox) (This also does not work with [width=0.5\textwidth] or when using a .pdf image instead of .png.). In the real document there are several PNG graphics. I would also like all PNG images to be included with a fixed scale=0.8. I found the following related question, but it is quite old, so perhaps there is a more up-to-date solution: Cannot determine size of graphic settings.json { "latex-workshop.latex.tools": [ { "name": "latexmk", "command": "latexmk", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "-pdfps", "%DOC%" ] }, { "name": "makenomenclature", "command": "makeindex", "args": [ "%DOCFILE%.nlo", "-s", "nomencl.ist", "-o", "%DOCFILE%.nls" ] } ], "latex-workshop.latex.recipes": [ { "name": "latexmk → nomencl → latexmk", "tools": [ "latexmk", "makenomenclature", "latexmk" ] } ], "latex-workshop.latex.recipe.default": "latexmk → nomencl → latexmk", "latex-workshop.latex.autoBuild.run": "never", } aromatic-compounds.eps https://drive.google.com/file/d/1faCOOvd5xcVAF_KZqhx7vAI0Mqh7pmF6/view?usp=sharing main.tex \documentclass{article} \usepackage{geometry} \usepackage{graphicx} \usepackage[version=4]{mhchem} \usepackage{chemstyle} \usepackage{chemnum} \usepackage[backend=biber]{biblatex} \addbibresource{bib.bib} \usepackage{nomencl} \makenomenclature \begin{document} \nomenclature{A}{a} \printnomenclature \section{First} \cite{knuth1984texbook} \begin{scheme} \replacecmpd{benezen} \replacecmpd{toluene} \includegraphics[scale=0.8]{aromatic.eps} \caption{Aromatic-compounds} \label{aromatic-compounds} \end{scheme} \begin{figure} \centering \includegraphics[width=0.5\textwidth]{random.png} \caption{random} \label{fig:random} \end{figure} \refcmpd{benezen, toluene} \printbibliography \end{document} bib.bib @book{knuth1984texbook, title={The texbook}, author={Knuth, Donald Ervin and Bibby, Duane}, volume={15}, year={1984}, publisher={Addison-Wesley Reading} }
- Ignore case sensitivity in Indexby GowriSaro on March 6, 2026 at 10:29 am
I'm using: \documentclass{book} \usepackage{makeidx} \makeindex \begin{document} Test\index{Test} \newpage test\index{test} \end{document} after running makeindex, output generated as: \begin{theindex} \item Test, 1 \item test, 2 \end{theindex} Is this possible to ignore the case sensitivity and generate the output as \item Test 1, 2?
- What would be the expl3 equivalent of \setbox0... + (Lua) box[0]by Denis Bitouzé on March 6, 2026 at 10:01 am
This question is a followup of a previous question of mine that David kindly answered with the following example: \documentclass{article} \usepackage{csquotes} \def\test#1{% \setbox0\hbox{#1}% \usebox{0}% \directlua{ local nn=0 for n in node.traverse_glyph(tex.box[0].head) do nn=n.char end if nn==8221 then tex.print("\string~yes") else tex.print("\string~no") end }} \begin{document} \begin{enumerate} \item \test{“Foo”} \item \test{\enquote{Bar}} \item \test{xyz} \end{enumerate} \ExplSyntaxOff \end{document} I'd like to expl3-ify this MCE and here is the first step which works nicely: \begin{filecontents*}[overwrite]{myfile.lua} function closing_double_quote(glyph) local nn=0 for n in node.traverse_glyph(glyph) do nn=n.char end if nn==8221 then tex.print("yes") else tex.print("~no") end end \end{filecontents*} \documentclass{article} \usepackage{csquotes} \ExplSyntaxOn \lua_now:n{ require('myfile') } \cs_new_protected:Nn \__mymodule_closing_double_quote:n { \setbox0\hbox{#1} \usebox{0} : \c_space_tl \lua_now:n{ tex.write(closing_double_quote(tex.box[0].head)) } } \begin{document} \begin{enumerate} \item \__mymodule_closing_double_quote:n {“Foo”} \item \__mymodule_closing_double_quote:n {\enquote{Bar}} \item \__mymodule_closing_double_quote:n {xyz} \end{enumerate} \end{document} What remains is: \setbox0\hbox{#1} \usebox{0} that could be expl3-ified as follows: \hbox_set:Nn \l_tmpa_box { #1 } \box_use:N \l_tmpa_box But what would be the equivalent of box[0] in the Lua code: tex.write(closing_double_quote(tex.box[0].head))
- How to set the vertical space between subtables?by CarLaTeX on March 6, 2026 at 8:51 am
Is it possible to set the vertical space between two subtables as in Table 2 in the following MWE, but using something more "automatic" than setting a \vspace manually? \documentclass{book} \usepackage{subcaption} \subcaptionsetup[table]{position=top} \begin{document} \begin{table}[ht]\centering \caption{Table caption} \begin{subtable}{\linewidth}\centering \caption{First subtable caption} \begin{tabular}{cc} \hline a & b \\ c & d \\ \hline \end{tabular} \end{subtable} \begin{subtable}{\linewidth}\centering \caption{Second subtable caption} \begin{tabular}{cc} \hline e & f \\ g & h \\ \hline \end{tabular} \end{subtable} \end{table} \begin{table}[ht]\centering \caption{Table caption} \begin{subtable}{\linewidth}\centering \caption{First subtable caption} \begin{tabular}{cc} \hline a & b \\ c & d \\ \hline \end{tabular} \end{subtable}\vspace{10pt} \begin{subtable}{\linewidth}\centering \caption{Second subtable caption} \begin{tabular}{cc} \hline e & f \\ g & h \\ \hline \end{tabular} \end{subtable} \end{table} \end{document} Maybe this is a trivial question, but I found only the \vspace (or similar) answers.
- \not\supseteq with kpfontsby Jinwen on March 6, 2026 at 4:21 am
With kpfonts, \not\supseteq becomes \supsetneq, which is not desirable: Expected result should look like: This appears to be a bug, because \not\subseteq looks fine. However, before the package gets fixed, is there any temporary way to fix this behavior? \documentclass{article} % \usepackage{kpfonts} % \usepackage{unicode-math} \usepackage{kpfonts-otf} \begin{document} \( \not\supseteq \) \end{document}
- tabularray, how to adjust space between table lastfootby Zarko on March 5, 2026 at 3:53 pm
In the following (not so minimal) MWE \documentclass[border={1mm 3mm}, 11pt]{standalone} %---------------------------------------------------------------% \usepackage[aboveskip=0.5ex, belowskip=0.5ex, format=plain, font = {stretch=0.84, scriptsize}, labelfont = bf, labelsep = colon, singlelinecheck = off]{caption} \usepackage{tabularray} \SetTblrStyle{note}{\tiny} \SetTblrStyle{remark}{\tiny} \usepackage{tblr-extras} \UseTblrLibrary{booktabs, caption, siunitx} \sisetup{range-units = single, range-phrase = {/} } %---------------------------------------------------------------% \begin{document} \begin{talltblr}[ caption = {Specifikacije razredov lastnosti večrodovnih optičnih vlaken.}, label = {tab:kabli-4}, note{*} = {EMB (Effective Modal Bandwidth) je mera kapacitete večrodovnih vlaken. Pove, koliko podatkov lahko prenesemo na dani razdalji. Maksimalni EMB je pri $\lambda=\qty{850}{\micro\metre}$.}, remark{Opomba} = {Razredi kakovosti določajo tudi barvo plaščev optičnih vlaken. Ujemajo se z barvami vrstic v tabeli.} ]{colsep = 3pt, colspec = {@{} *{5}{Q[c]} Q[c, si={table-format=5.0}] Q[c, si={table-format=3.0}] Q[c] @{}}, cells = {font=\scriptsize\linespread{0.84}\selectfont}, cell{1}{1-3,8} = {r=2}{}, cell{1}{4,6} = {c=2}{}, rowsep = 0pt, row{1,2} = {guard} } \toprule {oznaka\\ razreda} & {TIA\\standard} & {premer\\ jedro/plašč} & slabljenje (db/km), & & EMB\TblrNote{*} (MHz$\cdot$km), & & vir \\ \cmidrule[lr]{4-5} \cmidrule[lr]{6-8} & & & \qty{850}{nm} & \qty{1300}{nm} & \qty{850}{nm} & \qty{1300}{nm} & \\ \bottomrule %---------------- \end{talltblr} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \end{document} I like to reduce vertical space between table and (bottom rule) and table note remark. How to do this?
- Tikz error on a not-so-old file (once working)by user126154 on March 5, 2026 at 9:00 am
I have an old latex file that in 2019 was perfectly ok. Today (in 2026) I try to compile the source and I get an error ERROR: Package tikz Error: Cannot parse this coordinate. The point in the file where it seems to be an error (according to emacs) is the following scope environment: \foreach\a in{(-30.5,4),(-13,9),(-16.5,-7.5),(34,0),(53,0),(72,0)} { \begin{scope}[shift={\a}] \draw (0,0) to[out=30, in=150] (4,0); \draw (-1,.5) to[out=-30, in=-150] (5,.5); \end{scope} } The weird thing is that file was completely fine and compiling some years ago! I isolated the problem creating a test file \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \foreach\a in{(10,2), (5,-3)} { \begin{scope}[shift={\a}] \draw (0,0) to (2,2); \end{scope} } \end{tikzpicture} \end{document} and I get the same error. So, my question is What's wrong now, and how I can fix it in the current version of tikz?
- Padded page number with hyperrefby Myvh on March 5, 2026 at 8:09 am
My goal is to have zero-padded page numbers in the footer and in the table of contents. I use the code from this answer. However, it breaks with the hyperref package, only when the total page number has one digit, with the following error: test.tex: error: 86: Use of \??? doesn't match its definition. \newpage. I know that the padding is not needed in this case, but I would like the code to be more robust and also to understand why it breaks in that case. Here is a minimal working example. You can comment out/in \manypages to toggle between the code that breaks or not. \documentclass{article} \usepackage{lastpage} \usepackage{fancyhdr} \usepackage{hyperref} \hypersetup{ colorlinks = true, allcolors = blue } % From https://tex.stackexchange.com/a/730655/228589 \ExplSyntaxOn \NewDocumentCommand{\paddedcounter}{m} { \AtBeginDocument { \cs_if_exist:cF {maxdigits#1} { \cs_gset:cpn {maxdigits#1} {8} } } \AtEndDocument { \iow_now:ce {@mainaux} { \token_to_str:N \maxdigits{#1}{\fp_eval:n{logb(\value{#1}+0.1)+1}} } } \cs_gset:cpn {the#1} { \padded{#1} } } \NewDocumentCommand{\maxdigits}{mm} { \cs_gset:cpn {maxdigits#1}{#2} } \NewExpandableDocumentCommand{\padded}{m} { \prg_replicate:nn { \use:c { maxdigits#1 } - \tl_count:e { \arabic{#1} } } { 0 } \arabic{#1} } \ExplSyntaxOff \paddedcounter{page} \pagestyle{fancy} \fancyhead{} \renewcommand{\headrulewidth}{0pt} \fancyfoot[C]{\thepage\ / \pageref*{LastPage}} \newcommand{\manypages} { \section{Some section} \newpage \section{Some section} \newpage \section{Some section} \newpage \section{Some section} \newpage \section{Some section} \newpage \section{Some section} \newpage \section{Some section} \newpage \section{Some section} \newpage \section{Some section} \newpage \section{Some section} \newpage \section{Some section} \newpage \section{Some section} \newpage \section{Some section} \newpage } \begin{document} \thispagestyle{fancy} \begin{center} {\Huge Some title} \end{center} \tableofcontents \newpage \manypages \end{document}
- mathic not working with \DocumentMetadataby Gargantuar on March 4, 2026 at 7:18 pm
The MWE \DocumentMetadata{} \documentclass{article} \usepackage{mathtools} \mathtoolsset{mathic} \begin{document} \(a\) \end{document} gives the following error Runaway argument? \fi a\) \par \end {document} ! File ended while scanning use of \__math_grab_dollar_delim:w. <inserted text> \par <*> test.tex I suspect you have forgotten a `}', causing me to read past where you wanted me to stop. I'll try to recover; but if the error is serious, you'd better type `E' or `X' now and fix your file. Removing either \DocumentMetadata or mathic compiles. Why is that? It seems like a (recent) bug. EDIT: for reproducibility, the pdfLaTeX version used was pdfTeX 3.141592653-2.6-1.40.29 (TeX Live 2026/Arch Linux) with the command pdflatex -interaction=nonstopmode -shell-escape -halt-on-error.
- LaTeX forest: Reorder leavesby edgelord on March 4, 2026 at 2:52 pm
I'm using the LaTeX package forest to render "surface grammar trees" of sentences. Using the particular grammar I'm using (Eisenberg), you can get trees where the leaves are not in natural order. E. g. the sentence "Ich suche verzweifelt einen Stift" ("I search desperately a pen") would have the adverb "verzweifelt" ("desperately") attached to the rest of the sentence at the very last layer and the syntactical analysis tree would look something like this: How is this possible in forest without having to put the adverb to the end of the sentence (which wouldn't make sense). This would produce the correct tree structure but with the wrong word order. How can I specifically move the "verzweifelt" node to the third word position without changing the tree structure? \documentclass{article} \usepackage{forest} \usetikzlibrary{calc} \usepackage[T1]{fontenc} \begin{document} \begin{forest} for tree={ grow=south, parent anchor=south, child anchor=north, align=center, l sep=15pt, s sep=10pt, edge path={ \noexpand\path [draw] (!u.south) -- +(0,-5pt) -| (.north)\forestoption{edge label}; }, } [$S_2$ [S [Ich, tier=word] [suche, tier=word] [PrGr [einen, tier=word] [Stift, tier=word] ] ] [verzweifelt, tier=word] ] \end{forest} \end{document}
- Luatex - Coloring Harakaby Mario Fischer on March 4, 2026 at 6:08 am
I want to colour the harakat (diacritics) of a text in Pashto. I use Luatex, and I want to switch this function on and off. It should look like I tried this code: \documentclass{article} \usepackage{fontspec} \usepackage{xcolor} \usepackage{luacolor} \usepackage[bidi=basic]{babel} % Setup Arabic language \babelprovide[import, main]{arabic} % THE FIX: Use Renderer=Node instead of Harfbuzz \babelfont{rm}[Renderer=Node]{Amiri} % 1. The Lua Script \directlua{ harakat_attr_val = nil local luacolor_attr = luatexbase.attributes['luacolor'] local function color_harakat(head) if not harakat_attr_val then return head end for item in node.traverse_id(node.id("glyph"), head) do local char = item.char -- Unicode range for Arabic harakat (0x064B to 0x065F) -- and the superscript Alef (0x0670) if (char >= 0x064B and char <= 0x065F) or char == 0x0670 then node.set_attribute(item, luacolor_attr, harakat_attr_val) end end return head end % Add the filter so it runs before the font shaper luatexbase.add_to_callback("pre_linebreak_filter", color_harakat, "color_harakat") } % 2. Custom command to safely set the Harakat color \makeatletter \newcommand{\setHarakatColor}[1]{% \begingroup \color{#1}% \directlua{ harakat_attr_val = tex.attribute[luatexbase.attributes['luacolor']] }% \endgroup } \makeatother \begin{document} \begin{center} \Huge % Tell LuaTeX to color all following harakat Red \setHarakatColor{red} بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ \vspace{1cm} % Switch to blue! \setHarakatColor{blue} بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ \end{center} \end{document} But it is not coloring. What might be the problem, or is there an easy option in Luatex?
- TikZ: How to add a node where a path gets clippedby Edoardo Serra on March 3, 2026 at 3:07 pm
I am designing a square (or “squarish” actually) map protractor in TikZ. So far, I have managed to draw the degree ticks along the four sides by clipping radial lines between two closed paths using the even odd rule like I saw in this answer. The ticks are generated in a \foreach loop. To avoid drawing long ticks on top of short ones, I separated them into two loops using a conditional test. I am not sure whether this separation is actually necessary for correct SVG export/printing, but that is how I implemented it. Below is a MWE: \documentclass[tikz]{standalone} %,convert={outfile=\main.svg} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usetikzlibrary{intersections, pgfplots.fillbetween} \pgfdeclarelayer{pre main} \pgfdeclarelayer{main} \pgfsetlayers{pre main, main} \usetikzlibrary{shapes} \begin{document} %all of this is needed to easily clip between two closed paths using even odd rule \makeatletter \def\@appendnamedsoftpath#1{% \pgfsyssoftpath@getcurrentpath\@temppatha \expandafter\let\expandafter\@temppathb\csname tikz@intersect@path@name@#1\endcsname \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\@temppatha\expandafter\expandafter\expandafter{\expandafter\@temppatha\@temppathb}% \pgfsyssoftpath@setcurrentpath\@temppatha } \def\@appendnamedpathforactions#1{% \pgfsyssoftpath@getcurrentpath\@temppatha \expandafter\let\expandafter\@temppathb\csname tikz@intersect@path@name@#1\endcsname \expandafter\def\expandafter\@temppatha\expandafter{\csname @temppatha\expandafter\endcsname\@temppathb}% \let\tikz@actions@path\@temppatha } \tikzset{ use path for main/.code={% \tikz@addmode{% \expandafter\pgfsyssoftpath@setcurrentpath\csname tikz@intersect@path@name@#1\endcsname }% }, append path for main/.code={% \tikz@addmode{% \@appendnamedsoftpath{#1}% }% }, use path for actions/.code={% \expandafter\def\expandafter\tikz@preactions\expandafter{\tikz@preactions\expandafter\let\expandafter\tikz@actions@path\csname tikz@intersect@path@name@#1\endcsname}% }, append path for actions/.code={% \expandafter\def\expandafter\tikz@preactions\expandafter{\tikz@preactions \@appendnamedpathforactions{#1}}% }, use path/.style={% use path for main=#1, use path for actions=#1, }, append path/.style={% append path for main=#1, append path for actions=#1 } } \makeatother \begin{tikzpicture} \pgfmathsetmacro\bigside{7} \pgfmathsetmacro\smallsidedelta{0.5} %cuts \draw[rounded corners=12pt, name path=outside] (0,0) rectangle (\bigside,\bigside); \draw[dotted, rounded corners=12pt, name path=inside] (\smallsidedelta,\smallsidedelta) rectangle (\bigside-\smallsidedelta,\bigside-\smallsidedelta); %remove before cutting or printign. Just as reference grid %backside print \tikzfillbetween[of=inside and outside] {white}; %print on transparent plastic so this is needed for better readability %frontside print \pgfmathsetmacro\degreesmallticksize{0.2} \pgfmathsetmacro\degreemidticksize{0.35} \pgfmathsetmacro\outerradius{sqrt(2*\bigside/2*\bigside/2)} \path[rounded corners=12pt, name path=degrees short] (\degreesmallticksize,\degreesmallticksize) rectangle (\bigside-\degreesmallticksize,\bigside-\degreesmallticksize); \path[rounded corners=12pt, name path=degrees mid] (\degreemidticksize,\degreemidticksize) rectangle (\bigside-\degreemidticksize,\bigside-\degreemidticksize); \begin{scope} [even odd rule] %small ticks \clip[use path=outside, append path=degrees short]; \foreach \deg in {0, ..., 359} { \pgfmathsetmacro\degmod{mod(\deg,5)} \pgfmathtruncatemacro{\itest}{ifthenelse(\degmod==0,1,0)} \ifnum\itest=0 \draw[thin] (\bigside/2,\bigside/2) -- ({\bigside/2+\outerradius*cos(\deg)},{\bigside/2+\outerradius*sin(\deg)}); \fi } \end{scope} %had to add a second scope and for loop since the clipped area is different \begin{scope} [even odd rule] %mid ticks \clip[use path=outside, append path=degrees mid]; \foreach \deg in {0, ..., 359} { \pgfmathsetmacro\degmod{mod(\deg,5)} \pgfmathtruncatemacro{\itest}{ifthenelse(\degmod==0,1,0)} \ifnum\itest=1 \draw[thick] (\bigside/2,\bigside/2) -- ({\bigside/2+\outerradius*cos(\deg)},{\bigside/2+\outerradius*sin(\deg)}); \fi } \end{scope} \end{tikzpicture} \end{document} And the output is the following: I would now like to add a label at the inner end of each thick (5°) tick, displaying the corresponding degree value (0–355), like this: Now a few nuances: The numbers must always face towards the inside, with the exception, if possible, of the bottom row of numbers from 135° to 225°. When numbers get big, they don't have enough space to fit unless the labels become too small to read (actual printing size of the protractor will be something like 7x7 or 8x8cm). So they need to be shifted in such a way that they fit. 355 in the provided image is a clear example of what I mean. I can consider shifting them radially as well, but they need to stay to the outside of the dotted line, which I can make a little smaller. I really don't know where to start and didn't manage to find anything online. Thank you for your time!
- How to label axes, points, and curves in a 3D plot using luadraw?by Octavius on March 3, 2026 at 2:00 pm
The question arised from the previous link and the luadraw solution. I am using luadraw to visualize the surface z = x^2 + y^2 together with the intersection curve corresponding to the direction u = (1,0). I would like to know whether it is possible to: Label the coordinate axes $x$, $y$, and $z$, Label the point $c = (0,0)$, Indicate the direction $u = (1,0)$, And label the function $F(t) = t^2$ corresponding to the intersection curve. When I try to use Dtext3d, the document compiles but the output appears blank in Overleaf. Is there a reliable way to add these labels when using luadraw? \documentclass[border=5pt]{standalone} \usepackage[svgnames]{xcolor} \usepackage[3d]{luadraw} \usepackage{fourier-otf} \usepackage{tikz} \begin{document} \begin{luadraw}{name=paraboloid} local g = graph3d:new{ window3d = {-2,2,-2,2,0,8}, window = {-4.5,4,-3,9.5}, size = {10,10,0}, viewdir = perspective("central",30,50,20) } -- Surface local S = cartesian3d(function(x,y) return x^2+y^2 end, 2,-2,-2,2) -- Direction local c = Origin local u = M(1,0,0) local N = pt3d.prod(u, vecK) -- Intersection curve local Curve = g:Intersection3d(S, {c,N}) -- Draw surface g:Dfacet(S, {usepalette={palGasFlame,"z"}, edgecolor="gray", clip=true}) -- Draw curve g:Dedges(Curve, {hidden=true, color="Navy", width=12}) -- Axes g:Dline3d({Origin, M(2,0,0)}, {color="black", width=1, dash="dotted"}) g:Dline3d({Origin, M(0,2,0)}, {color="black", width=1, dash="dotted"}) g:Dline3d({Origin, M(0,0,6)}, {color="black", width=1, dash="dotted"}) g:Show() \end{luadraw} % ---- 2D overlay labels (safe in Overleaf) ---- \begin{tikzpicture}[overlay] \node at (3.7,4.2) {$x$}; \node at (1.1,4.8) {$y$}; \node at (2.5,7.3) {$z$}; \end{tikzpicture} \end{document}
- Why is it necessary to keep first line of input in 'buffer' array?by Igor Liferenko on March 3, 2026 at 6:24 am
In §331 of tex.web we have this: first:=1; ... if not init_terminal then goto final_end; first:=last+1; {|init_terminal| has set |loc| and |last|} So, before input_ln, which is called by init_terminal, we have: loc is 0, first is 1, last is 0. Let's type x<return> in response to **. Then after init_terminal we will have: loc is 1, first is 1, last is 2. And then (due to above snippet) first will be 3. This means that first line of input is permanently kept in buffer array throughout the entire TeX job. And so the length of the first line will restrict the length of line that TeX can read. In particular, one and the same file will compile cleanly if file name is relative, and will fail to compile if file name is absolute. Why first line of input is kept in buffer array?
- The sizes of \because and \therefore in exam-zhby M. Logic on March 3, 2026 at 1:34 am
A MWS is as follows. \documentclass{exam-zh} \makeatletter \DeclareSymbolFont{AMSa}{U}{msa}{m}{n} %\DeclareSymbolFont{AMSb}{U}{msb}{m}{n} \DeclareMathSymbol{\therefore}{\mathrel}{AMSa}{"29} \DeclareMathSymbol{\because}{\mathrel}{AMSa}{"2A} \makeatother \begin{document} $\because ABCD=\therefore ABCD$ \end{document} As you see, the sizes of \because and \therefore in exam-zh are very small although I invoke them from amssymb. How to fix this to make the sizes of them be normal when invoking them from amssymb?
- tabularray - make talltblr caption mirror other captionsby user20478285 on March 3, 2026 at 12:13 am
\documentclass{article} \usepackage[font=small, labelfont=bf, format=hang]{caption} \usepackage{tabularray} \usepackage{tblr-extras} \UseTblrLibrary{amsmath, booktabs, caption} \begin{document} \begin{table}[h] \centering \begin{talltblr}[caption={A talltblr table.}]{colspec={cc}} \toprule a & b\\ \midrule x & y\\ \bottomrule \end{talltblr} \end{table} \end{document} Using the code above, I get the following result for my talltblr (i.e. the caption width is limited to the table width). I tried the approach from here: \documentclass{article} \usepackage[font=small, labelfont=bf, format=hang]{caption} \usepackage{tabularray} \usepackage{tblr-extras} \UseTblrLibrary{amsmath, booktabs, caption} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \DefTblrTemplate{firsthead}{caption}{% \makebox[\tablewidth]{\parbox{\columnwidth}{% \UseTblrTemplate{caption}{normal}% }}% } \SetTblrTemplate{firsthead}{caption} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} \begin{table}[h] \centering \caption{A regular table. A regular table. A regular table. A regular table. A regular table. A regular table. A regular table. A regular table. A regular table.} \begin{tabular}{cc} \toprule a & b\\ \midrule x & y\\ \bottomrule \end{tabular} \end{table} \begin{table}[h] \centering \caption{A tblr table. A tblr table. A tblr table. A tblr table. A tblr table. A tblr table. A tblr table. A tblr table. A tblr table. A tblr table. A tblr table.} \begin{tblr} { colspec={cc} } \toprule a & b\\ \midrule x & y\\ \bottomrule \end{tblr} \end{table} \begin{table}[h] \centering \begin{talltblr} [ caption={A talltblr table. A talltblr table. A talltblr table. A talltblr table. A talltblr table. A talltblr table. A talltblr table. A talltblr table.} ] { colspec={cc} } \toprule a & b\\ \midrule x & y\\ \bottomrule \end{talltblr} \end{table} \end{document} Now the caption has the right width, but it is too close to the table itself. Also, the caption font is too big and the label is not bold, which I can fix / hack if I add \SetTblrStyle{caption-tag}{font=\small\bfseries} \SetTblrStyle{caption-text}{font=\small} but I'm not sure if this is the way to go (and it does not fix the issue of the caption touching the table). I also tried to have a look at the default caption definitions myself in the source code but I just don't understand even remotely enough of LaTeX3). Edit for clarity: I don't need to be able to control table, talltblr, and tblr with \captionsetup, I am rather looking for a way to get the same consistent captions for figure, table, tblr and talltblr environments in my document. I realise this is not easy, especially since the different caption style for talltblr is apparently a feature: I don't think it is a bug. In many aspects, tabularray is different from traditional tables https://github.com/TeXackers/tabularray/issues/255#issuecomment-1142833319)
- Improving the visibility of a curve in a 3D PGFPlots surfaceby Octavius on March 2, 2026 at 4:50 pm
In the left-hand figure, I would like to improve the visualization so that the red curve is more clearly visible. \documentclass[12pt,b5paper,twoside,openany]{book} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{amsmath,amssymb,amsfonts,amsthm} \usepackage{graphicx} \usepackage{xcolor} \usepackage{tikz} \usepackage{tikz-3dplot} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \hypersetup{colorlinks=true,linkcolor=black,citecolor=black} \newtheorem{example}{Example} \setlength{\parindent}{0pt} \begin{document} \begin{example} Consider the function \[ f(x,y)=x^2+y^2, \] the point \[ c=(0,0), \] and the direction \[ u=(1,0). \] To study the variation of $f$ at $c$ in the direction $u$, we define the one-variable function \[ F(t)=f(c+tu). \] In this case, \[ c+tu=(t,0), \] and therefore \[ F(t)=f(t,0)=t^2. \] Thus, when we move away from $c$ in the direction $u$, the values of $f$ vary according to the quadratic function $F(t)=t^2$. The directional derivative of $f$ at $c$ in the direction $u$ is given by \[ f'(c;u)=F'(0). \] Since \[ F'(t)=2t, \] we obtain \[ f'(c;u)=F'(0)=0. \] \end{example} \bigskip \begin{center} \begin{tikzpicture} % --- SURFACE --- \begin{axis}[ at={(0,0)}, anchor=origin, view={120}{25}, axis lines=center, axis line style={->}, xlabel={$x$}, ylabel={$y$}, zlabel={$z$}, domain=-2:2, y domain=-2:2, samples=30, samples y=30, width=8cm, height=8cm ] % Surface z = x^2 + y^2 \addplot3[surf, opacity=0.4] {x^2+y^2}; % Curve corresponding to F(t) \addplot3[very thick, red, domain=0:1.2, samples=100] ({x},{0},{x^2}); \end{axis} % --- GRAPH OF F(t) --- \begin{axis}[ at={(7cm,0)}, anchor=origin, axis lines=middle, axis line style={->}, xlabel={$t$}, ylabel={$F(t)$}, domain=-1.5:1.5, samples=200, width=7cm, height=6cm ] \addplot[very thick, red] {x^2}; \node at (axis cs:1,1) [red, anchor=west] {$F(t)=t^2$}; \end{axis} \end{tikzpicture} \end{center} \end{document}
- Disable stretching between words while using babel for Thaiby p_pattedd on March 2, 2026 at 8:04 am
When typing a document in Thai with babel (using XeLaTeX via MikTeX), sometimes it outputs with these spaces between words, for example: MWE: \documentclass[12pt,a4paper]{article} \usepackage[no-math]{fontspec} \usepackage[thai,provide=*]{babel} \babelfont[thai]{rm}[Scale=1.33333]{TH Sarabun New} \renewcommand\baselinestretch{1.4} \begin{document} เดิมแผ่นดินเมืองจีนทั้งปวงนั้น เปนสุขมาช้านานแล้วก็เปนศึก ครั้นศึกสงบแล้วก็เปนสุข มีพระมหากษัตริย์ทรงพระนามพระเจ้าจิวบูอ๋อง แลพระวงศ์ได้เสวยราชย์ต่อ ๆ ลงมาเปนหลายพระองค์ ได้ความสุขมาถึงเจ็ดร้อยปี จึงมีผู้ตั้งแขงเมืองถึงเจ็ดหัวเมือง ครั้งนั้นพระเจ้าจิ๋นอ๋องได้เสวยราชย์ในเมืองจิ๋นก๊กให้ไปตีเอาหัวเมืองทั้งเจ็ดนั้น เข้าอยู่ในอาณาจักรพระเจ้าจิ๋นอ๋องทั้งสิ้น ครั้นอยู่มาพระเจ้าจิ๋นอ๋องเสียแก่ฮั่นฌ้อ แล้วฮั่นโกโจกับฮั่นฌ้อรบกัน จึงได้ราชสมบัติแก่ฮั่นโกโจ ฮั่นโกโจแลพระราชวงศ์ได้เสวยราชสมบัติต่อ ๆ มาในแผ่นดินจีนนั้นถึงสิบสององค์ มีขุนนางคนหนึ่งชื่ออองมังเปนขบถชิงเอาราชสมบัติได้ เปนเจ้าแผ่นดินอยู่สิบแปดปี แล้วจึงมีหลานพระเจ้าฮั่นโกโจชื่อฮั่นกองบู๊จับอองมังฆ่าเสียชิงเอาราชสมบัติได้เสวยราชย์สืบวงศ์มาสิบสององค์ พระองค์ได้เสวยราชย์ที่สุดนั้น ทรงพระนามพระเจ้าเหี้ยนเต้ จึงแตกเปนสามเมือง ภาษาจีนเรียกว่า สามก๊ก \end{document} How to stop LaTeX from doing this? (I have read babel-thai documentation, but none of the macros seems to work.)
- Redesign of arrow at circuitikz ccgsw symbolby Zarko on March 2, 2026 at 7:20 am
In circuitikz symbol ccgsw I like to change the color of arrow (by simple in-line selection, if is possible) and arrow head for example from stealth to Straight Barb. How to do this? \documentclass[margin=3mm]{standalone} \usepackage{xcolor} \usepackage{circuitikz} \begin{document} \begin{circuitikz} \draw[gray] (0,0) to [ccgsw={$t=t_b$}] (2,0) ; \end{circuitikz} \end{document}
- BibLaTeX specified language is not usedby Knudsen on March 2, 2026 at 6:40 am
Why would biblatex fill out this entry with Cyrillic while the language being specified is Serbian written in Latin? \documentclass{article} \begin{filecontents*}{test.bib} @book{Mitri-vol1-sr, title={Cauchyjev račun ostataka sa primenama}, author = {Mitrinović, Dragoslav S. and Kečkić, Jovan D.}, series = {Matematički problemi i ekspozicije}, volume = {8}, year = {1978}, publisher = {Naučna Knjiga}, address = {Beograd}, pages = {271}, langid = {serbian}, } \end{filecontents*} \usepackage{fontspec} \newfontfamily\cyrillicfont{STIX Two Text} \usepackage{polyglossia} \usepackage{csquotes} \setmainlanguage{english} \setotherlanguage{serbian} \usepackage[style=authoryear, backend=biber, autolang=other, ]{biblatex} \addbibresource{test.bib} \begin{document} \nocite{*} \printbibliography \end{document}