Hot
- Apply formatting within Piton and still represent line breakby cacamailg on December 2, 2026 at 9:15 am
In the next example there are two piton environments. When formatting is applied to a line, the line break is no longer represented with the arrow. How can the formatting be applied and keep the line break representation? \documentclass[twocolumn]{article} \usepackage{newtx} \newcommand\alert[1]{\textbf{#1}} % https://tex.stackexchange.com/questions/769104 % https://tex.stackexchange.com/questions/770117 \usepackage{piton} \usepackage{tcolorbox} \tcbuselibrary{breakable} \PitonOptions{ raw-detected-commands={\alert}, begin-escape=@,end-escape=@, begin-escape-math=$,end-escape-math=$, } \NewPitonEnvironment{algorithm}{O{}} {% \PitonOptions{% tcolorbox, line-numbers, line-numbers/format=\tiny, line-numbers/sep=\labelsep, continuation-symbol={}, end-of-broken-line={}, indent-broken-lines, font-command=\footnotesize, language=verbatim, gobble=2, #1, }% \tcbset{% after skip=0pt, sharp corners, size=fbox, %colback=lightgray, %colframe=lightgray, }% }{} \begin{document} \begin{algorithm} dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text \end{algorithm} \begin{algorithm} \alert{dummy text dummy text dummy text dummy text dummy text dummy text dummy text} dummy text dummy text dummy text dummy text dummy text dummy text dummy text \end{algorithm} \end{document}
- pgffor calculations off by a small amount in a simple case [duplicate]by Jasper on December 2, 2026 at 4:50 am
What is going on with these pgffor calculations? This seems to be such a simple case that this discrepancy is surprising. \documentclass[tikz,border=1cm]{standalone} \begin{document} \begin{tikzpicture} \foreach[count = \c from 1] \i in {0.1,0.2,...,0.9}{ \node[fill=white, font=\tiny] at (\c,0) {\i}; } \end{tikzpicture} \end{document}
- let ~ ALWAYS be no break space [closed]by Alexander Wittmann on December 1, 2026 at 11:50 pm
I've got lots of languages, lots of environments, I just want the character ~ to be: no break space. That's all of it. Whether the language/environment is Bashturian, Greek, Ingvesnian, Mahlovian, Tereshuric, Egyptian..., let ~ be no break space. Force it.
- How to use bw ice, bw snow, and bw gas material styles in physketch? [closed]by Sebastiano on December 1, 2026 at 10:08 pm
I’d like to use one of these three options, bw ice, bw snow, bw gas, but I’m struggling to understand the manual of physketch now. I am using a recently updated MiKTeX distribution. As things stand, I don’t know how to compile this non-working MWE. \documentclass[a4paper,11pt]{article} \usepackage{physketch} \physketchset{materials=bw} \usepackage{physketch.mechanics} \begin{document} \begin{figure}[htbp] \centering \begin{tikzpicture}[font=\small] \fill[orange!25, draw=orange!60!black] (0,0) rectangle (3.0,1.2); \fill[red!12, draw=red!45!black] (3.0,0) rectangle (6.0,1.2); \fill[blue!12, draw=blue!45!black] (6.0,0) rectangle (9.0,1.2); \fill[bw ice, pattern color=blue!80!black] (0,0) rectangle (3.0,1.2); \fill[bw snow, pattern color=blue!70!black] (3.0,0) rectangle (6.0,1.2); \fill[bw gas, pattern color=blue!50!black] (6.0,0) rectangle (9.0,1.2); \draw[->, very thick, blue!70!black] (3.1,0.6) -- (5.9,0.6); \node[align=center] at (1.5,-0.45) {concentrazione\\alta}; \node[align=center] at (4.5,-0.45) {concentrazione\\media}; \node[align=center] at (7.5,-0.45) {concentrazione\\bassa}; \node[font=\bfseries, blue!70!black] at (4.5,1.55) {direzione del flusso $q(x,t)$}; \end{tikzpicture} \caption{Il farmaco diffonde dalle zone a concentrazione maggiore verso quelle a concentrazione minore.} \label{fig:flusso} \end{figure} \end{document} My error with MikTeX: Package pgfkeys Error: I do not know the key '/physketch/materials', to which you passed 'bw', and I am going to ignore it. Perhaps you misspelled it. See the pgfkeys package documentation for explanation. Type H for immediate help. ... l.7 \physketchset{materials=bw} ? log. file: This is pdfTeX, Version 3.141592653-2.6-1.40.29 (MiKTeX 26.5) (preloaded format=pdflatex 2026.11.23) 1 DEC 2026 23:03 entering extended mode \write18 enabled. %&-line parsing enabled. **"C:/Users/sebys/OneDrive/Desktop/new question/mwe-basic.tex" (C:/Users/sebys/OneDrive/Desktop/new question/mwe-basic.tex LaTeX2e <2026-11-01> L3 programming layer <2026-09-09> (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/base\article.cls Document Class: article 2026-06-04 v1.4n Standard LaTeX document class (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/base\size11.clo File: size11.clo 2026-06-04 v1.4n Standard LaTeX file (size option) ) \c@part=\count276 \c@section=\count277 \c@subsection=\count278 \c@subsubsection=\count279 \c@paragraph=\count280 \c@subparagraph=\count281 \c@figure=\count282 \c@table=\count283 \abovecaptionskip=\skip49 \belowcaptionskip=\skip50 \bibindent=\dimen150 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/physketch\physketch.sty Package: physketch 2026/10/29 v0.1.1 TikZ styles and pictures for physics drawi ngs (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/physketch\physketch.gen eral.sty Package: physketch.general 2026/10/29 v0.1.1 physketch: common styles (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/pgf/frontendlayer\tikz. sty (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/pgf/basiclayer\pgf.sty (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/pgf/utilities\pgfrcs.st y (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfutil -common.tex \pgfutil@everybye=\toks17 \pgfutil@tempdima=\dimen151 \pgfutil@tempdimb=\dimen152 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfutil -latex.def \pgfutil@abb=\box53 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfrcs. code.tex (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf\pgf.revision.tex) Package: pgfrcs 2026-08-01 v3.1.12 (3.1.12) )) Package: pgf 2026-08-01 v3.1.12 (3.1.12) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/pgf/basiclayer\pgfcore. sty (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/graphics\graphicx.sty Package: graphicx 2026-06-26 v1.2e Enhanced LaTeX Graphics (DPC,SPQR) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/graphics\keyval.sty Package: keyval 2026-06-01 v1.15 key=value parser (DPC) \KV@toks@=\toks18 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/graphics\graphics.sty Package: graphics 2026-05-17 v1.4h Standard LaTeX Graphics (DPC,SPQR) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/graphics\trig.sty Package: trig 2023/12/02 v1.11 sin cos tan (DPC) ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/graphics-cfg\graphics.c fg File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration ) Package graphics Info: Driver file: pdftex.def on input line 106. (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/graphics-def\pdftex.def File: pdftex.def 2025/09/29 v1.2d Graphics/color driver for pdftex )) \Gin@req@height=\dimen153 \Gin@req@width=\dimen154 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/pgf/systemlayer\pgfsys. sty (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfsy s.code.tex Package: pgfsys 2026-08-01 v3.1.12 (3.1.12) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfkeys .code.tex \pgfkeys@pathtoks=\toks19 \pgfkeys@temptoks=\toks20 (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfkeys libraryfiltered.code.tex \pgfkeys@tmptoks=\toks21 )) \pgf@x=\dimen155 \pgf@y=\dimen156 \pgf@xa=\dimen157 \pgf@ya=\dimen158 \pgf@xb=\dimen159 \pgf@yb=\dimen160 \pgf@xc=\dimen161 \pgf@yc=\dimen162 \pgf@xd=\dimen163 \pgf@yd=\dimen164 \w@pgf@writea=\write3 \r@pgf@reada=\read2 \c@pgf@counta=\count284 \c@pgf@countb=\count285 \c@pgf@countc=\count286 \c@pgf@countd=\count287 \t@pgf@toka=\toks22 \t@pgf@tokb=\toks23 \t@pgf@tokc=\toks24 \pgf@sys@id@count=\count288 (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgf.c fg File: pgf.cfg 2026-08-01 v3.1.12 (3.1.12) ) Driver file for pgf: pgfsys-pdftex.def (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfsy s-pdftex.def File: pgfsys-pdftex.def 2026-08-01 v3.1.12 (3.1.12) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfsy s-common-pdf.def File: pgfsys-common-pdf.def 2026-08-01 v3.1.12 (3.1.12) ))) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfsy ssoftpath.code.tex File: pgfsyssoftpath.code.tex 2026-08-01 v3.1.12 (3.1.12) \pgfsyssoftpath@smallbuffer@items=\count289 \pgfsyssoftpath@bigbuffer@items=\count290 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfsy sprotocol.code.tex File: pgfsysprotocol.code.tex 2026-08-01 v3.1.12 (3.1.12) )) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/xcolor\xcolor.sty Package: xcolor 2024/09/29 v3.02 LaTeX color extensions (UK) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\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 274. (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/graphics\mathcolor.ltx) Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1349. Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1353. Package xcolor Info: Model `RGB' extended on input line 1365. Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1367. Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1368. Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1369. Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1370. Package xcolor Info: Model `Gray' substituted by `gray' on input line 1371. Package xcolor Info: Model `wave' substituted by `hsb' on input line 1372. ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor e.code.tex Package: pgfcore 2026-08-01 v3.1.12 (3.1.12) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmath.code .tex (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathutil. code.tex) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathparse r.code.tex \pgfmath@dimen=\dimen165 \pgfmath@count=\count291 \pgfmath@box=\box54 \pgfmath@toks=\toks25 \pgfmath@stack@operand=\toks26 \pgfmath@stack@operation=\toks27 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct ions.code.tex) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct ions.basic.code.tex) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct ions.trigonometric.code.tex) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct ions.random.code.tex) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct ions.comparison.code.tex) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct ions.base.code.tex) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct ions.round.code.tex) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct ions.misc.code.tex) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct ions.integerarithmetics.code.tex) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathcalc. code.tex) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfloat .code.tex \c@pgfmathroundto@lastzeros=\count292 )) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfint.code. tex) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor epoints.code.tex File: pgfcorepoints.code.tex 2026-08-01 v3.1.12 (3.1.12) \pgf@picminx=\dimen166 \pgf@picmaxx=\dimen167 \pgf@picminy=\dimen168 \pgf@picmaxy=\dimen169 \pgf@pathminx=\dimen170 \pgf@pathmaxx=\dimen171 \pgf@pathminy=\dimen172 \pgf@pathmaxy=\dimen173 \pgf@xx=\dimen174 \pgf@xy=\dimen175 \pgf@yx=\dimen176 \pgf@yy=\dimen177 \pgf@zx=\dimen178 \pgf@zy=\dimen179 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor epathconstruct.code.tex File: pgfcorepathconstruct.code.tex 2026-08-01 v3.1.12 (3.1.12) \pgf@path@lastx=\dimen180 \pgf@path@lasty=\dimen181 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor epathusage.code.tex File: pgfcorepathusage.code.tex 2026-08-01 v3.1.12 (3.1.12) \pgf@shorten@end@additional=\dimen182 \pgf@shorten@start@additional=\dimen183 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor escopes.code.tex File: pgfcorescopes.code.tex 2026-08-01 v3.1.12 (3.1.12) \pgfpic=\box55 \pgf@hbox=\box56 \pgf@layerbox@main=\box57 \pgf@picture@serial@count=\count293 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor egraphicstate.code.tex File: pgfcoregraphicstate.code.tex 2026-08-01 v3.1.12 (3.1.12) \pgflinewidth=\dimen184 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor etransformations.code.tex File: pgfcoretransformations.code.tex 2026-08-01 v3.1.12 (3.1.12) \pgf@pt@x=\dimen185 \pgf@pt@y=\dimen186 \pgf@pt@temp=\dimen187 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor equick.code.tex File: pgfcorequick.code.tex 2026-08-01 v3.1.12 (3.1.12) ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor eobjects.code.tex File: pgfcoreobjects.code.tex 2026-08-01 v3.1.12 (3.1.12) ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor epathprocessing.code.tex File: pgfcorepathprocessing.code.tex 2026-08-01 v3.1.12 (3.1.12) ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor earrows.code.tex File: pgfcorearrows.code.tex 2026-08-01 v3.1.12 (3.1.12) \pgfarrowsep=\dimen188 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor eshade.code.tex File: pgfcoreshade.code.tex 2026-08-01 v3.1.12 (3.1.12) \pgf@max=\dimen189 \pgf@sys@shading@range@num=\count294 \pgf@shadingcount=\count295 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor eimage.code.tex File: pgfcoreimage.code.tex 2026-08-01 v3.1.12 (3.1.12) ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor eexternal.code.tex File: pgfcoreexternal.code.tex 2026-08-01 v3.1.12 (3.1.12) \pgfexternal@startupbox=\box58 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor elayers.code.tex File: pgfcorelayers.code.tex 2026-08-01 v3.1.12 (3.1.12) ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor etransparency.code.tex File: pgfcoretransparency.code.tex 2026-08-01 v3.1.12 (3.1.12) ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor epatterns.code.tex File: pgfcorepatterns.code.tex 2026-08-01 v3.1.12 (3.1.12) ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor erdf.code.tex File: pgfcorerdf.code.tex 2026-08-01 v3.1.12 (3.1.12) ))) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/modules\pgfmodule shapes.code.tex File: pgfmoduleshapes.code.tex 2026-08-01 v3.1.12 (3.1.12) \pgfnodeparttextbox=\box59 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/modules\pgfmodule plot.code.tex File: pgfmoduleplot.code.tex 2026-08-01 v3.1.12 (3.1.12) ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/pgf/compatibility\pgfco mp-version-0-65.sty Package: pgfcomp-version-0-65 2026-08-01 v3.1.12 (3.1.12) \pgf@nodesepstart=\dimen190 \pgf@nodesepend=\dimen191 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/pgf/compatibility\pgfco mp-version-1-18.sty Package: pgfcomp-version-1-18 2026-08-01 v3.1.12 (3.1.12) )) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/pgf/utilities\pgffor.st y (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/pgf/utilities\pgfkeys.s ty (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfkeys .code.tex)) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/pgf/math\pgfmath.sty (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmath.code .tex)) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgffor. code.tex Package: pgffor 2026-08-01 v3.1.12 (3.1.12) \pgffor@iter=\dimen192 \pgffor@skip=\dimen193 \pgffor@stack=\toks28 \pgffor@toks=\toks29 )) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/frontendlayer/tik z\tikz.code.tex Package: tikz 2026-08-01 v3.1.12 (3.1.12) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/libraries\pgflibr aryplothandlers.code.tex File: pgflibraryplothandlers.code.tex 2026-08-01 v3.1.12 (3.1.12) \pgf@plot@mark@count=\count296 \pgfplotmarksize=\dimen194 ) \tikz@lastx=\dimen195 \tikz@lasty=\dimen196 \tikz@lastxsaved=\dimen197 \tikz@lastysaved=\dimen198 \tikz@lastmovetox=\dimen199 \tikz@lastmovetoy=\dimen256 \tikzleveldistance=\dimen257 \tikzsiblingdistance=\dimen258 \tikz@figbox=\box60 \tikz@figbox@bg=\box61 \tikz@tempbox=\box62 \tikz@tempbox@bg=\box63 \tikztreelevel=\count297 \tikznumberofchildren=\count298 \tikznumberofcurrentchild=\count299 \tikz@fig@count=\count300 (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/modules\pgfmodule matrix.code.tex File: pgfmodulematrix.code.tex 2026-08-01 v3.1.12 (3.1.12) \pgfmatrixcurrentrow=\count301 \pgfmatrixcurrentcolumn=\count302 \pgf@matrix@numberofcolumns=\count303 ) \tikz@expandcount=\count304 (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/frontendlayer/tik z/libraries\tikzlibrarytopaths.code.tex File: tikzlibrarytopaths.code.tex 2026-08-01 v3.1.12 (3.1.12) ))) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/libraries\pgflibr aryarrows.meta.code.tex File: pgflibraryarrows.meta.code.tex 2026-08-01 v3.1.12 (3.1.12) \pgfarrowinset=\dimen259 \pgfarrowlength=\dimen260 \pgfarrowwidth=\dimen261 \pgfarrowlinewidth=\dimen262 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/frontendlayer/tik z/libraries\tikzlibrarycalc.code.tex File: tikzlibrarycalc.code.tex 2026-08-01 v3.1.12 (3.1.12) ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/frontendlayer/tik z/libraries\tikzlibrarydecorations.markings.code.tex (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/frontendlayer/tik z/libraries\tikzlibrarydecorations.code.tex (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/modules\pgfmodule decorations.code.tex \pgfdecoratedcompleteddistance=\dimen263 \pgfdecoratedremainingdistance=\dimen264 \pgfdecoratedinputsegmentcompleteddistance=\dimen265 \pgfdecoratedinputsegmentremainingdistance=\dimen266 \pgf@decorate@distancetomove=\dimen267 \pgf@decorate@repeatstate=\count305 \pgfdecorationsegmentamplitude=\dimen268 \pgfdecorationsegmentlength=\dimen269 ) \tikz@lib@dec@box=\box64 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/libraries/decorat ions\pgflibrarydecorations.markings.code.tex)) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/frontendlayer/tik z/libraries\tikzlibrarydecorations.pathreplacing.code.tex (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/libraries/decorat ions\pgflibrarydecorations.pathreplacing.code.tex)) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/frontendlayer/tik z/libraries\tikzlibrarypatterns.meta.code.tex (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/libraries\pgflibr arypatterns.meta.code.tex))) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/physketch\physketch.mec hanics.sty Package: physketch.mechanics 2026/10/29 v0.1.1 physketch: mechanics ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/physketch\physketch.opt ics.sty Package: physketch.optics 2026/10/29 v0.1.1 physketch: optics ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/physketch\physketch.cir cuits.sty Package: physketch.circuits 2026/10/29 v0.1.1 physketch: circuits (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/latex/circuitikz\circuitikz.s ty Package: circuitikz 2026/09/12{} The CircuiTikz circuit drawing package version 1.8.7 (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/frontendlayer/tik z/libraries\tikzlibrarybending.code.tex File: tikzlibrarybending.code.tex 2026-08-01 v3.1.12 (3.1.12) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/modules\pgfmodule bending.code.tex File: pgfmodulebending.code.tex 2026-08-01 v3.1.12 (3.1.12) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/modules\pgfmodule nonlineartransformations.code.tex File: pgfmodulenonlineartransformations.code.tex 2026-08-01 v3.1.12 (3.1.12) \pgftransformnonlinearflatness=\dimen270 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/libraries\pgflibr arycurvilinear.code.tex File: pgflibrarycurvilinear.code.tex 2026-08-01 v3.1.12 (3.1.12) \pgf@curvilinear@time@a=\dimen271 \pgf@curvilinear@length@a=\dimen272 \pgf@curvilinear@length@b=\dimen273 \pgf@curvilinear@length@c=\dimen274 \pgf@curvilinear@length@d=\dimen275 ) \pgf@arrows@the@rigidity=\dimen276 )) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/frontendlayer/tik z/libraries\tikzlibraryfpu.code.tex (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/pgf/libraries\pgflibr aryfpu.code.tex)) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/circuitikz\pgfcirc.de fines.tex \pgf@circ@count@a=\count306 \pgf@circ@count@b=\count307 \pgf@circ@count@c=\count308 \pgf@circ@res@up=\dimen277 \pgf@circ@res@down=\dimen278 \pgf@circ@res@zero=\dimen279 \pgf@circ@res@left=\dimen280 \pgf@circ@res@right=\dimen281 \pgf@circ@res@other=\dimen282 \pgf@circ@res@step=\dimen283 \pgf@circ@res@temp=\dimen284 \pgf@circ@Rlen=\dimen285 \pgf@circ@scaled@Rlen=\dimen286 \pgfstartlinewidth=\dimen287 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/circuitikz\pgfcircuti ls.tex \ctikz@scratchbox=\box65 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/circuitikz\pgfcircpat h.tex \ctikz@vif@count=\count309 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/circuitikz\pgfcircsha pes.tex) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/circuitikz\pgfcircmon opoles.tex) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/circuitikz\pgfcircbip oles.tex) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/circuitikz\pgfcirctri poles.tex \pgf@circ@res@count=\count310 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/circuitikz\pgfcircqua dpoles.tex) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/circuitikz\pgfcircmul tipoles.tex) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/circuitikz\pgfcirclab el.tex) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/circuitikz\pgfcircvol tage.tex \pgfcirc@labelshift=\dimen288 ) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/circuitikz\pgfcirccur rent.tex) (C:\Users\sebys\AppData\Local\Programs\MiKTeX\tex/generic/circuitikz\pgfcircflo w.tex)))) ! Package pgfkeys Error: I do not know the key '/physketch/materials', to which you passed 'bw', and I am going to ignore it. Perhaps you misspelled it. See the pgfkeys package documentation for explanation. Type H <return> for immediate help. ... l.3 \physketchset{materials=bw} ? ! Emergency stop. ... l.3 \physketchset{materials=bw} End of file on the terminal! Here is how much of TeX's memory you used: 31354 strings out of 467271 848167 string characters out of 5401091 1495004 words of memory out of 5000000 60557 multiletter control sequences out of 15000+600000 628789 words of font info for 41 fonts, out of 8000000 for 9000 1141 hyphenation exceptions out of 8191 132i,1n,135p,520b,142s stack positions out of 10000i,1000n,20000p,200000b,200000s ! ==> Fatal error occurred, no output PDF file produced! I in the MikTeX path have the v. 0.2 of physketch: I would kindly ask that this question be reopened, as there may be other users who, like me, are experiencing the same problem.
- Drug diffusion particles and concentration gradients to a TikZ skin modelby Sebastiano on December 1, 2026 at 9:27 pm
I have created a TikZ illustration showing transdermal drug diffusion from a patch through the skin layers (epidermis, dermis, and subcutaneous tissue). Here is my current MWE: \documentclass[a4paper,11pt]{article} \usepackage{tikz} \usetikzlibrary{arrows.meta, decorations.pathmorphing} \begin{document} \begin{figure}[htbp] \centering \begin{tikzpicture}[ scale=0.8, transform shape, font=\sffamily, >=Stealth ] \definecolor{epiSopra}{RGB}{244, 224, 195} \definecolor{epiFronte}{RGB}{246, 232, 206} \definecolor{epiMacchia}{RGB}{232, 208, 175} \definecolor{epiLinea}{RGB}{224, 198, 165} \definecolor{dermaSup}{RGB}{244, 198, 194} \definecolor{dermaInf}{RGB}{238, 178, 173} \definecolor{dermaPunto}{RGB}{218, 152, 148} \definecolor{sfondoSotto}{RGB}{228, 202, 145} \definecolor{cellulaAdiposa}{RGB}{252, 245, 220} \definecolor{cerottoSopra}{RGB}{252, 218, 182} \definecolor{cerottoFronte}{RGB}{250, 206, 162} \definecolor{cerottoBordo}{RGB}{190, 130, 75} \definecolor{memSopra}{RGB}{232, 232, 232} \definecolor{memFronte}{RGB}{215, 215, 215} \definecolor{memBordo}{RGB}{140, 140, 140} \definecolor{rossoCapillare}{RGB}{185, 10, 10} \definecolor{farmacoBlu}{RGB}{0, 30, 195} \definecolor{testoGrigio}{RGB}{75, 75, 75} \definecolor{parentesiGrigia}{RGB}{110, 110, 110} \def\w{6.8} \def\inset{0.8} \def\topH{0.55} \fill[black!10, rounded corners=4pt] (0, -0.18) rectangle (\w, 0.05); \begin{scope}[yshift=0cm] \def\h{0.95} \fill[sfondoSotto] (0,0) rectangle (\w,\h); \begin{scope} \clip (0,0) rectangle (\w,\h); \foreach \row in {0,1} { \foreach \col in {0,...,11} { \pgfmathsetmacro{\x}{0.25 + \col*0.62 - \row*0.28} \pgfmathsetmacro{\y}{0.22 + \row*0.45} \fill[cellulaAdiposa, rounded corners=2.5pt] (\x-0.26, \y-0.14) rectangle (\x+0.26, \y+0.14); } } \end{scope} \draw[rossoCapillare, line width=2.2pt, line cap=round] (0.15, 0.48) .. controls (1.4, 0.25) and (2.6, 0.70) .. (3.8, 0.48) .. controls (5.0, 0.26) and (6.0, 0.68) .. (\w-0.15, 0.48); \draw[parentesiGrigia, line width=0.8pt] (\w+0.45, 0.03) -- (\w+0.7, 0.03) -- (\w+0.7, \h-0.03) -- (\w+0.45, \h-0.03); \draw[parentesiGrigia, line width=0.8pt] (\w+0.7, \h/2) -- (\w+0.95, \h/2); \node[anchor=west, align=left, text=testoGrigio, font=\sffamily\normalsize] at (\w+1.05, \h/2) {Tessuto sottocutaneo\\e \textcolor{rossoCapillare}{\textbf{capillari sanguigni}}}; \end{scope} \begin{scope}[yshift=0.95cm] \def\h{2.85} \fill[dermaInf] (0,0) rectangle (\w,\h); \begin{scope} \clip (0,0) rectangle (\w, \h-0.55); \foreach \x/\y/\rx/\ry/\ang in { 0.6/0.4/0.12/0.06/20, 1.4/0.9/0.15/0.07/-15, 2.3/0.3/0.10/0.06/40, 3.1/1.1/0.14/0.06/10, 4.2/0.5/0.16/0.07/-25, 5.3/0.8/0.12/0.06/30, 6.1/0.3/0.14/0.06/-10, 0.9/1.6/0.13/0.06/15, 1.9/1.9/0.15/0.07/-35, 2.8/1.7/0.11/0.05/25, 3.8/2.0/0.14/0.06/-15, 4.9/1.6/0.15/0.07/20, 5.9/1.8/0.12/0.06/-30, 1.2/2.2/0.10/0.05/10, 4.5/2.2/0.11/0.05/-20 } { \fill[dermaPunto, rotate around={\ang:(\x,\y)}] (\x,\y) ellipse (\rx cm and \ry cm); } \end{scope} \fill[dermaSup] (0,\h) -- (\w,\h) -- (\w, \h-0.55) decorate [decoration={snake, amplitude=2.2mm, segment length=9mm}] { -- (0, \h-0.55) } -- cycle; \node[text=black!75, font=\sffamily\small\itshape] at (\w/2, 1.35) {diffusione del farmaco}; \draw[dermaPunto, line width=1pt] (0,\h) -- (\w,\h); \draw[parentesiGrigia, line width=0.8pt] (\w+0.45, 0.03) -- (\w+0.7, 0.03) -- (\w+0.7, \h-0.03) -- (\w+0.45, \h-0.03); \draw[parentesiGrigia, line width=0.8pt] (\w+0.7, \h/2) -- (\w+0.95, \h/2); \node[anchor=west, text=testoGrigio, font=\sffamily\large] at (\w+1.05, \h/2) {Derma}; \end{scope} \begin{scope}[yshift=3.80cm] \def\h{0.55} \fill[epiFronte] (0,0) rectangle (\w,\h); \fill[epiSopra] (0,\h) -- (\inset, \h+\topH) -- (\w-\inset, \h+\topH) -- (\w,\h) -- cycle; \foreach \x/\y/\rx/\ry in { 1.5/0.82/0.22/0.07, 2.8/0.70/0.26/0.08, 4.3/0.85/0.24/0.07, 5.4/0.72/0.20/0.06, 2.1/0.98/0.18/0.05, 3.6/0.96/0.22/0.06, 4.9/0.99/0.16/0.05 } { \fill[epiMacchia] (\x,\y) ellipse (\rx cm and \ry cm); } \draw[epiLinea, line width=0.7pt] (0, 0.28) -- (\w, 0.28); \draw[epiLinea, line width=0.5pt] (0.5, 0.14) -- (4.2, 0.14); \draw[epiLinea, line width=0.5pt] (3.5, 0.42) -- (6.5, 0.42); \pgfmathsetmacro{\totalH}{\h + \topH} \draw[parentesiGrigia, line width=0.8pt] (\w+0.45, 0.03) -- (\w+0.7, 0.03) -- (\w+0.7, \totalH) -- (\w+0.45, \totalH); \draw[parentesiGrigia, line width=0.8pt] (\w+0.7, \totalH/2) -- (\w+0.95, \totalH/2); \node[anchor=west, text=testoGrigio, font=\sffamily\large] at (\w+1.05, \totalH/2) {Epidermide}; \end{scope} \begin{scope}[yshift=5.00cm] \def\h{0.25} \def\mInset{0.55} \def\mTopH{0.35} \fill[memFronte, draw=memBordo, line width=0.6pt] (\mInset, 0) rectangle (\w-\mInset, \h); \fill[memSopra, draw=memBordo, line width=0.6pt] (\mInset, \h) -- (\mInset+0.35, \h+\mTopH) -- (\w-\mInset-0.35, \h+\mTopH) -- (\w-\mInset, \h) -- cycle; \node[font=\sffamily\scriptsize, text=black!80] at (\w/2, \h/2) {membrana di controllo (eventuale)}; \end{scope} \begin{scope}[yshift=5.65cm] \def\h{0.70} \def\pInset{0.55} \def\pTopH{0.40} \fill[cerottoFronte, draw=cerottoBordo, line width=0.8pt, rounded corners=2pt] (\pInset, 0) rectangle (\w-\pInset, \h); \fill[cerottoSopra, draw=cerottoBordo, line width=0.8pt] (\pInset, \h) -- (\pInset+0.35, \h+\pTopH) -- (\w-\pInset-0.35, \h+\pTopH) -- (\w-\pInset, \h) -- cycle; \node[font=\sffamily\bfseries\normalsize] at (\w/2, 0.45) {CEROTTO}; \node[font=\sffamily\footnotesize] at (\w/2, 0.18) {farmaco a concentrazione $C_0$}; \end{scope} \def\axisX{-0.55} \draw[line width=0.8pt] (\axisX - 0.12, 4.35) -- (\axisX + 0.12, 4.35); \draw[line width=0.8pt] (\axisX - 0.12, 0.95) -- (\axisX + 0.12, 0.95); \draw[->, line width=0.9pt] (\axisX, 4.35) -- (\axisX, 0.98); \node[anchor=east, font=\normalsize] at (\axisX - 0.18, 4.35) {$x = 0$}; \node[anchor=east, font=\normalsize] at (\axisX - 0.18, 2.65) {$x$}; \node[anchor=east, font=\normalsize] at (\axisX - 0.18, 0.95) {$x = L$}; \node[anchor=west, align=left, font=\sffamily\footnotesize, text=farmacoBlu] at (\w - 0.8, 6.60) {Direzione di\\diffusione}; \foreach \x in {1.8, 3.4, 5.0} { \draw[->, farmacoBlu, line width=1.1pt] (\x, 5.55) -- (\x, 4.45); \draw[->, farmacoBlu, line width=1.1pt, dashed] (\x, 3.70) -- (\x, 1.05); } \end{tikzpicture} \caption{Schema di diffusione transdermica del farmaco da un cerotto.} \label{fig:diffusione-transdermica} \end{figure} \end{document} How can I add drug molecules (different colours or dots/particles) whose density and opacity gradually decrease from the patch ($C_0$) down through the epidermis and dermis toward the blood capillaries? Any suggestions or improvements on styling is welcome.
- Not sure what is the error, I'm using "tabularray"by GowriSaro on December 1, 2026 at 10:54 am
My code are: \documentclass[twocolumn]{article} \usepackage{amsmath} \usepackage{array} \usepackage{xcolor} \usepackage{tabularray} \UseTblrLibrary{booktabs} \NewColumnType{S}{>{\raggedright\hangindent=1em\arraybackslash}X}% \begin{document} \begin{table} \caption{Comparison of Results. \label{table4-02601079261512425}} {\centering\begin{tblr}{@{}SSSSSSS@{}} \toprule {Study} & {} & \SetCell[c=4]{l} Previous studies\\ {Present study ({\%})} & {Rosengart et al. ({\%})} & {Haucap and Just ({\%})} & {Cipriani et al. ({\%})} & \SetCell[c=2]{l} Frey et al. ({\%})\\ \midrule {Business first-year students} & {5.38} & {61.43} & {41} & {54.08} & \SetCell[c=2]{l} 59\\ {\textit{Z} (\textit{p}-value)} & {–} & {−20.19*** (\textit{p} {<} .001)} & {−12.68*** (\textit{p} {<} .001)} & {−18.22*** (\textit{p} {<} .001)} & \SetCell[c=2]{l} −19.25*** (\textit{p} {<} .001)\\ {Business final-year students} & {13.28} & {57.31} & {60} & {53.40} & \SetCell[c=2]{l} 62\\ {\textit{Z} (\textit{p}-value)} & {–} & {−16.33*** (\textit{p} {<} .001)} & {−14.34*** (\textit{p} {<} .001)} & {−15.62*** (\textit{p} {<} .001)} & \SetCell[c=2]{l} −16.79*** (\textit{p} {<} .001)\\ \bottomrule \end{tblr}}{} \end{table} \end{document} It produced the error: ! Missing number, treated as zero. __dim_eval_end: l.23 \end {tblr}}{} ? Not sure where the error was, please help, I'm using xelatex engine
- ConTeXt: grouping of close footnotes with commas and dashesby Georgian Ilie on December 1, 2026 at 6:40 am
Good morning, I would like to know wheter the scripts of close footnotes can be grouped together. For instance, with this code: \setuppapersize[A5] \starttext Hello\footnote{this is a footnote}\footnote{this is another footnote} \stoptext I obtain two separate footnote scripts: What I'd like to do is to bind the scripts "1" and "2" by a comma (i.e., to have "1,2"). Similarly, when I use three footnotes I'd like to represent the script interval (i.e., to see "1–3". Is it possible to achieve these results? Thank you in advance for your help.
- Extra space if \caption is redefined into \marginnoteby Denis Bitouzé on November 30, 2026 at 10:07 pm
In the following MCE: There is no space between the content of the first table and the right margin. Before the second table, \caption is redefined as a margin note, which creates additional space between the content of that second table and the right margin. The only way to avoid this space is to add % immediately after the table contents and \caption{…} (third table), which is tedious. How can I avoid having to add these % characters when redefining \caption to prevent this extra space? \documentclass{article} \usepackage[paperheight=5cm,showframe]{geometry} \usepackage{marginnote} \begin{document} \begin{table} \raggedleft Foo \caption{Usual caption} \end{table} \RenewDocumentCommand{\caption}{ m }{\marginnote{\tiny#1}} \begin{table} \raggedleft Foo \caption{Margin note caption} \end{table} \begin{table} \raggedleft Foo% \caption{Margin note caption}% \end{table} \end{document}
- Importing specific chapter into main document breaks all citations in all chapters [closed]by RBG on November 30, 2026 at 1:30 pm
I'm having an issue with references/citations in a large project containing multiple chapters that are all in a project of their own and are pulled together in the main project. I have one global reference file and I'm using \usepackage[natbib=true,backend=biber,style=apa]{biblatex}. This works fine for all chapters except one: when I include the problematic chapter (and in particular one of its sections), all citations show up as the citation keys in bold, and the bibliography is not created. However, when I compile that chapter within its own project, it works fine. Also sometimes compiling only produces a few pages or just the title page, and recompiling produces the rest, which was not like this before I included that chapter. When I exclude certain references therein, it once again works fine, but I have to test manually which ones are causing issues and I don't see anything wrong with their entry in the reference file. Given that this only happens with this one chapter, there must be something systematic going on. Does anyone have an idea what I could do to troubleshoot? Thank you in advance! The main document looks like this: %TC:fileinclude \import dir,file %\documentclass[12pt,a4paper,oneside]{book} \documentclass{book} % Load all packages and settings \input{preamble} \begin{document} % ================================================== % FRONT MATTER % ================================================== \pagenumbering{roman} \include{00_Front_matter/00a_title} %\tableofcontents %\listoffigures %\listoftables % ================================================== % MAIN TEXT % ================================================== \cleardoublepage \pagenumbering{arabic} \import{01_Introduction}{00_chapter} \import{02_Background}{00_chapter} % ================================================== % REFERENCES % ================================================== \printbibliography \end{document} The preamble looks like this: % ================================================== % GRAPHICS AND COLOURS % ================================================== \usepackage{graphicx} \usepackage[table]{xcolor} \usepackage{import} % ================================================== % FONTS % ================================================== \usepackage{fontspec} \newfontfamily\titlefont{DarbySans-Medium-Trial.otf} \newfontfamily\titlefallback{Latin Modern Roman} \newfontfamily\chapterfont{DarbySans-Medium-Trial.otf} \newfontfamily\epigraphfont{DarbySans-Regular-Trial.otf} % ================================================== % CHAPTER FORMATTING % ================================================== \usepackage{quotchap} \renewcommand*{\sectfont}{\chapterfont} \renewcommand*{\chapnumfont}{% \chapterfont \fontsize{100}{74}\selectfont \color{chaptergrey} } % ================================================== % OTHER FORMATTING % ================================================== \usepackage{mathtools,amsthm,amsfonts,amssymb}% \usepackage[doublespacing]{setspace}% \usepackage{threeparttable,booktabs}% \usepackage{graphicx}% \usepackage[figuresright]{rotating}% \usepackage{enumitem}% \usepackage{caption} \usepackage{subcaption} \newcommand{\keywords}[1]{\bgroup\noindent\textbf{Keywords:} #1\egroup}% \usepackage[natbib=true,backend=biber,style=apa]{biblatex} \addbibresource{references_global.bib} \usepackage[ruled]{algorithm2e}% \usepackage{mathrsfs}% \newtheorem{theorem}{Theorem}% \newtheorem{lemma}{Lemma}% \newtheorem{corollary}{Corollary}% \newtheorem{remark}{Remark}% \newtheorem*{theorem*}{Theorem}% \newtheorem*{lemma*}{Lemma}% \newtheorem*{corollary*}{Corollary}% \newtheorem*{remark*}{Remark}% \usepackage[breaklinks=true]{hyperref}% % ================================================== % HEADERS % ================================================== \pagestyle{headings} % Even pages: Chapter number only \renewcommand{\chaptermark}[1]{% \markboth{Chapter \thechapter}{}% } % Odd pages: Section title only \renewcommand{\sectionmark}[1]{% \markright{#1}% } \newcommand{\notetocomp}[1]{\bgroup\parindent\z@\raggedright% \marginpar{\vbox{\hsize=6pc\footnotesize\raggedright#1}\par} \egroup}% \usepackage{array} % For wrapping table rows onto multiple lines \usepackage{overpic} % For adding letters to figure panels \usepackage{tabularx} \usepackage{array} \usepackage[table]{xcolor} \topmargin -1.2 cm \textheight 23.1 cm \oddsidemargin -0.5 cm \evensidemargin -0.5 cm \textwidth 17.8 cm %%% paragraph indentation and line spacing \parindent 0cm \parskip 0.3cm \linespread{1.3} %%% switch to sans serif font \renewcommand{\familydefault}{\sfdefault} \usepackage{layouts} \usepackage{sansmath} \sansmath 00_chapter.tex for every chapter contains \input{01_Introduction/0_preface} etc.
- Boolean clipping errors due to nonuniform tessellation under stereographic projection in LuaDrawby Jasper on November 29, 2026 at 7:27 pm
NOTE: I used AI to more easily find the specific edge case I was looking for, and to help compose an MWE demonstrating it, as well as the failure of an attempted fix. Consider the solution given in https://tex.stackexchange.com/a/770259. Since stereographic projection is not distance-preserving, a circle tessellated uniformly on the sphere is tessellated nonuniformly after projection. As points approach the projection pole, the distances between consecutive projected points increase. Consequently, some line segments intersect the clipping region even though the circular arcs they approximate do not. One might attempt to exclude these segments by filtering out those exceeding unit length. However, this also removes legitimate segments in regions where the tessellation is coarser. The following MWE demonstrates both problems by toggling filter. How can the tessellation be made sufficiently uniform after projection to avoid these clipping errors? % Adapted from https://tex.stackexchange.com/a/770259 % Posted by nidarfp, modified by community. See post 'Timeline' for change history. % Retrieved 2026-11-29, License - CC BY-SA 4.0 % Changes: fixed rotation and optional unit-length segment filter. \documentclass[tikz,border=0]{standalone} \usepackage[3d]{luadraw} \colorlet{tileblue}{blue!55} \colorlet{tileorange}{orange!65} \begin{document} \begin{luadraw}{name=mobius-filter,exec=true,auto=true} local ld = luadraw local cpx, pt3d = ld.cpx, ld.pt3d local Z, M = cpx.Z, pt3d.M local Origin, vecI, vecJ, vecK = pt3d.Origin, pt3d.vecI, pt3d.vecJ, pt3d.vecK local sin, cos, pi = math.sin, math.cos, math.pi local filter = false -- true: discard segments of Euclidean length > 1 local angle = 90/7 local r, R, h = 4.5, 1, 0 local g = ld.graph3d:new{ window3d = {-r,r,-r,r,-r,r}, viewdir = {"central",35,55,20}, window = {-7,6.25,-5,3.5}, size = {14,14} } require 'luadraw_spherical' require 'luadraw_pdfliteral' local frame = {M(-r,-r,h), M(r,-r,h), M(r,r,h), M(-r,r,h), "l", "cl"} local facets, colorsA, colorsB = {}, {}, {} local axis = {Origin, -vecI} local tileB = {178/255, 63/255, 140/255} local tileO = {1, 94/255, 48/255} local function containsPole(f) local list = {} for k,A in ipairs(f) do if A.z < 0 then return false end list[k] = Z(A.x,A.y) end local n,d = #list,0 for k = 1,n do local a,b = list[k],list[k%n+1] if d == 0 then d = cpx.det(a,b) elseif d*cpx.det(a,b) <= 0 then return false end end return true end -- Split each component rather than reconnecting across rejected edges. local function unitFilter(L) local result = {} for _,line in ipairs(L) do local part = {line[1]} for j = 2,#line do if pt3d.abs(line[j]-line[j-1]) > 1 then if #part > 1 then table.insert(result,part) end part = {} end table.insert(part,line[j]) end if #part > 1 then table.insert(result,part) end end return result end local function dot(u,v) local sv = sin(v) return M(cos(v),sin(u)*sv,-cos(u)*sv) end for i = 0,13 do for j = 0,12 do local a,b = pi/14+i*pi/7,pi/14+(i+1)*pi/7 local c,d = j*pi/13,(j+1)*pi/13 local F = {} pt3d.insert3d(F,dot(a,c)); pt3d.insert3d(F,dot(b,c)) pt3d.insert3d(F,dot(b,d)); pt3d.insert3d(F,dot(a,d)) table.insert(colorsA,(i+j)%2 == 0 and "tileblue" or "tileorange") table.insert(colorsB,(i+j)%2 == 0 and tileB or tileO) table.insert(facets,F) end end local P = ld.parallelep(M(-r,-r,-r),2*r*vecI,2*r*vecJ,2*r*vecK) g:Define_sphere({radius=R,edgestyle="noline"}) local plane = {} local F = ld.rotate3d(facets,angle,axis) for i,facet in ipairs(F) do local colorA,colorB = colorsA[i],colorsB[i] local pole = containsPole(facet) g:DSfacet(facet,{fill=colorA,fillopacity=0.7,style="noline"}) local p1 = ld.projstereo_Sfacet(facet,M(0,0,R),h,true) local L = ld.path3d(p1) if filter then L = unitFilter(L) end L = ld.clippolyline3d(L,P,false,true) if L ~= nil and #L > 0 then if pole then g:Beginclip(ld.polyline2path3d(L),true) g:Dpath3d(frame,"draw=none,fill="..ld.rgb(colorB)) g:Endclip() else table.insert(plane,g:Proj3d(L)) table.insert(plane,{draw="none",fill=colorB}) end end end g:Dliteralpolyline(table.unpack(plane)) g:Dpath3d(frame) local O,r1,N = table.unpack(g:Sphere_outline(Origin,R).data) local A,B = table.unpack(g:Sphere_tangency(Origin,R,{Origin,vecK})) g:Beginclip({A,O,B,R,1,vecK,"ca",O,A,r1,1,N,"ca"}) g:Dspherical() g:Endclip() g:Sendtotex() g:Cleargraph() \end{luadraw} \end{document}
- BibLaTeX MLA adding extra space after semicolon in citation when using hyperref and preceding citation does not end in a numberby Zachary Martinez on November 29, 2026 at 6:34 pm
The BibLaTeX MLA package is adding extra space after the semicolons that are inserted into parenthetical citations to separate two or more citations when the hyperref package is loaded and the citation doesn't end with a page number How can I make it so that it does not add more space than normal? I have found a workaround by this code: \makeatletter \renewcommand\hyper@natanchorstart[2]{} \renewcommand\hyper@natanchorend{} \makeatother and entering my body text in a NoHyper environment. This removes the space but also removes the citations' links to the bibliography, which I would like to preserve. And if I don't use the NoHyper environment, the citations still link to the bibliography page, but to random parts of it, not to the beginning of its corresponding entry; that is not optimal. Working example: \documentclass{article} \usepackage[style=mla]{biblatex} \addbibresource{art-appreciation-the-paper.bib} \begin{filecontents}{art-appreciation-the-paper.bib} @book{Hibbard, author = {Hibbard, Howard}, date = {1985}, date-added = {2026-11-25 18:45:24 -0600}, date-modified = {2026-11-25 18:46:03 -0600}, origdate = {1983}, publisher = {Westview Press}, title = {Caravaggio}} @online{Graham-Dixon, author = {Graham-Dixon, Andrew}, date = {2026-09-16}, date-added = {2026-11-25 15:39:40 -0600}, date-modified = {2026-11-25 19:43:22 -0600}, journaltitle = {Encyclopedia Britannica}, title = {Caravaggio}, url = {https://www.britannica.com/biography/Caravaggio}} @book{Artbook, date = {1999}, date-added = {2026-11-25 00:30:27 -0600}, date-modified = {2026-11-25 00:33:44 -0600}, editor = {Kruger, Anna}, publisher = {DK Publishing Inc.}, title = {ArtBook: Caravaggio}, translator = {Gilbert, John}} @article{Biografia, date-added = {2026-11-25 00:23:12 -0600}, date-modified = {2026-11-25 00:34:53 -0600}, eprinttype = {Internet Archive}, journal = {Rai International Online}, shorttitle = {Biografía De}, title = {Biografía de Caravaggio (Michelangelo Merisi) (1571 - 1610)}, url = {https://web.archive.org/web/20090416123558/http://www.italica.rai.it/index.php?categoria=bio&scheda=caravaggio_prima_parte}, urldate = {2009-04-16}} \end{filecontents} \usepackage[colorlinks=true, citecolor=, urlcolor=blue]{hyperref} \begin{document} \raggedright \autocite{Biografia,Graham-Dixon}\\ \autocites[10]{Artbook}{Biografia}\\ \autocites[10]{Artbook}{Graham-Dixon}[3]{Hibbard}. \end{document} Thank you!!! PS I tried to add screenshots but the system doesn't appear to be working properly. It will not preview images as it did a few days ago when I first wrote this draft. Sorry.
- \pause is not working as I want in beamerby Rup_Cantor on November 29, 2026 at 3:24 pm
I am having a problem while using \pause in my beamer file. Here is an MWE from my code: \documentclass{beamer} \usepackage{tikz} \usetheme{moloch} \begin{document} \begin{frame}{Examples} \begin{center} \tikzset{ vertex/.style={circle, draw=black, fill=white, inner sep=0pt, minimum size=4pt, thick} } \begin{tikzpicture}[baseline=(c.base), thick, scale=0.7] \node[vertex] (a) at (0,0) {}; \node[vertex] (b) at (1.2,0) {}; \node[vertex] (c) at (0,1.2) {}; \node[vertex] (d) at (1.2,1.2) {}; \draw (a)--(b); \draw (c)--(d); \node[draw=none] at (0.6,-0.8) {\small $\{ 0,0,2,2\}$}; \pause \node[vertex] (p) at (4.5,0.5) {}; \node[vertex] (q) at (5.7,0.5) {}; \node[vertex] (r) at (6.9,0.5) {}; \node[vertex] (m) at (8.1,0.5) {}; \draw (p)--(q); \draw (m)--(r); \draw[red] (q)--(r); \node[draw=none] at (6.3,-0.7) {\small $\{ 0,2-\sqrt{2},2,2+\sqrt{2}\}$}; \end{tikzpicture} \end{center} \pause \begin{itemize} \item[$\blacksquare$] adding an edge may result into integral variation or may not \pause \item[$\blacksquare$] sometimes the variation occurs in one place \pause \item[$\blacksquare$] sometimes the variation occurs in two places \end{itemize} \end{frame} \end{document} This produces as follows: which is of course not what I want. I want the first graph to be shown at first then the second and then the texts to appear. How can I fix this issue?
- Creating an example like environment in beamerby Sourav on November 29, 2026 at 12:20 pm
Consider the following MWE : \documentclass[aspect ratio=169]{beamer} \usetheme{moloch} \setbeamertemplate{theorems}[numbered] \begin{frame}{Some Examples} \begin{example} Foo. \end{example} \end{frame} \begin{frame}{Non examples} % want to have a non example environment \end{frame} \end{document} I want to have a "non example" environment with the same shade of green with which the text "Example 1" is printed. Moreover, I want it to be numbered from beginning as 1,2,... and not be continued from the counter where examples end. How can I do so?
- The glossary isn't printingby Suhrud Ekbote on November 29, 2026 at 12:04 pm
I have scoured practically every other question on here about this and none of them have helped. I'm using TeXShop on a Mac, and I'm not using a separate document for the glossary since I don't need that many terms. I'm following the Overleaf tutorial and I'm pretty sure it's to the letter. This is my code: \documentclass[10pt, a4paper, twoside]{book} \usepackage{glossaries} \makeglossaries %\newglossaryentry{ } {name= , description={ }} \newglossaryentry{Pupuli Wekili Maro} { name=Pupuli Wekili Malo, description={Publius Vergilius Maro, author of the Aeneid} } \begin{document} \printglossary[title=List of Tokiponisations] \end{document} and this is the output:
- Concentration/flux map sequence for diffusion (Fick's laws): stationary caseby Sebastiano on November 29, 2026 at 11:26 am
I would like to create a sequence of illustrations of diffusion (concentration and flux) and Fick's laws under steady-state conditions from a transdermal patch across a layer $x \in [0, L]$, where the following conditions hold: The concentration decreases linearly: $c(x,t) = C_0(1 - x/L)$, with boundary conditions $c(0,t) = C_0$ and $c(L,t) = 0$, where $L$ is the thickness of the dermis; The diffusive flux is constant: $\q(x,t) = \left(\frac{D C_0}{L}, 0\right)$. Since I do not know how to use Mathematica 14, I would like to create an animation or a sequence of panels in TikZ/PGFPlots. I am not sure if this code is a starting point and if it can also be easily adapted to model non-stationary (time-dependent) problems. I have done this: \documentclass{article} \usepackage{tikz, pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{center} \begin{tikzpicture} \pgfplotsset{mappa/.style={view={0}{90}, width=1.8cm, height=4.5cm, scale only axis, xmin=0, xmax=1, ymin=0, ymax=1, y dir=reverse, xtick=\empty, ytick={0,0.5,1}, yticklabels={$0$,$L/2$,$L$}, ylabel={profondit\`a $x$}, colormap/jet, colorbar, domain=0:1, y domain=0:1, samples=2, samples y=40}} \begin{axis}[mappa, title={$c(x)/C_0$}, point meta min=0, point meta max=1, colorbar style={ytick={0,0.5,1}}, name=A] \addplot3[surf, shader=interp]{1-y}; \end{axis} \begin{axis}[mappa, at={(A.east)}, xshift=1.7cm, anchor=west, title={$q_x/(DC_0/L)$}, point meta min=0, point meta max=2, colorbar style={ytick={0,1,2}}, ylabel={}, yticklabel=\empty, name=B] \addplot3[surf, shader=interp]{1}; \end{axis} \begin{axis}[at={(B.east)}, xshift=1.9cm, anchor=west, width=3cm, height=4.5cm, scale only axis, xmin=0, xmax=1, ymin=0, ymax=1.1, xlabel={$x/L$}, legend style={font=\scriptsize, at={(0.5,1.04)}, anchor=south}] \addplot[blue, very thick, domain=0:1] {1-x}; \addlegendentry{$c/C_0$} \addplot[red, very thick, dashed, domain=0:1] {1}; \addlegendentry{$q_x/(DC_0/L)$} \end{axis} \end{tikzpicture} \end{center} \end{document} Is it possible to animate it?
- hyperref without zref-clever: ref type in black and numbering in blueby Akira on November 29, 2026 at 10:45 am
I have a tex file taken from this answer: \documentclass{article} % In LaTeX 2026-06-01, alias counters for theorem-like % environments are created automatically. \IfFormatAtLeastTF{2026/06/01} {} {\usepackage{aliascnt}} \usepackage{amsthm} \usepackage{mathtools} % before hyperref \mathtoolsset{showonlyrefs} \usepackage[notcite,notref]{showkeys} \usepackage[hypertexnames=false]{hyperref} \hypersetup{ colorlinks=true, linkcolor=blue, filecolor=blue, urlcolor=red, citecolor=magenta } \numberwithin{equation}{section} \newtheorem{theorem}{Theorem}[section] \IfFormatAtLeastTF{2026/06/01} {% % Current LaTeX: the alias counter is created automatically. \newcommand{\addtheorem}[2]{% \newtheorem{#1}[theorem]{#2}% \ExpandArgs{c}\newcommand{#1autorefname}{#2}% }% } {% % Older LaTeX: create the alias counter using aliascnt. \newcommand{\addtheorem}[2]{% \newaliascnt{#1}{theorem}% \newtheorem{#1}[#1]{#2}% \aliascntresetthe{#1}% \ExpandArgs{c}\newcommand{#1autorefname}{#2}% }% } \addtheorem{corollary}{Corollary} \addtheorem{lemma}{Lemma} \addtheorem{proposition}{Proposition} \theoremstyle{definition} \addtheorem{definition}{Definition} \addtheorem{assumption}{Assumption} \addtheorem{remark}{Remark} \addtheorem{example}{Example} \renewcommand{\sectionautorefname}{Section} % Make \autoref compatible with mathtools' showonlyrefs. \NewCommandCopy{\originalautoref}{\autoref} \RenewDocumentCommand{\autoref}{s m}{% \noeqref{#2}% \IfBooleanTF{#1} {\originalautoref*{#2}}% {\originalautoref{#2}}% } \begin{document} \section{Introduction} \label{chap} \begin{lemma} \label{lem:1} If $U$, then $V$. \end{lemma} \begin{theorem} \label{thm} If A then \begin{align} B & = C, \label{thm:eq1} \\ X & = Y, \label{thm:eq4} \\ U & = V. \label{thm:eq5} \end{align} \end{theorem} From \autoref{thm} and \autoref{lem:1} in \autoref{chap}, we have \autoref{thm:eq1} and \autoref{thm:eq5}. \end{document} In above screenshot, Theorem 1.2 is blue. I would like to keep the numbering 1.2 blue, but Theorem black. Also, the whole Theorem 1.1 remains clickable. Could you explain how to do so? With zref-clever, the answers are available in here and here. Unfortunately, zref-clever seems to not be maintained anymore.
- OpTeX: a usable template for startersby Akira on November 29, 2026 at 10:30 am
Recently, I have come to know OpTeX https://petr.olsak.net/optex. With the help of AI, I am able to create a usable template, which mimics what I already have with LaTeX: Section numbering Theorem environments Cross-reference numbering AI tends to produce unnecessarily complicated code. OpTeX is niche and I am unable to evaluate the correctness of below macro. I hope to have a robust template. Could you have a check on it below? % ------------------------------------------------------------------ % 1) "Smart" cross-reference label % -- sections/chapters: store "Chapter 3" / "Section 2.4" / "Subsection 2.4.1" \_def\_printrefnum [#1@#2]{\_leavevmode % we must be in horizontal mode \_ifnonum \_else #1\_numprint\_therefnum #2\_fi \_edef\_zcrefword{\_ifcase\_sectionlevel\_relax \_or Chapter\_or Section\_or Subsection\_fi}% \_wlabel {\_zcrefword~\_therefnum}% \_ifnotoc \_else \_incr \_tocrefnum \_dest[toc:\_the\_tocrefnum]% \_ewref\_Xtoc{{\_the\_sectionlevel}{\_secinfo}% {\_therefnum}{\_theoutline}\_detokenize\_ea{\_savedtitle}}% \_fi \_gdef\_theoutline{}% } % -- theorem/lemma (\numberedpar): store "Theorem 2.3" / "Lemma 2.4" \_def \_printnumberedpar #1#2{\_par \_noindent\_wlabel {#2~\_numprint{#1}}% {\_bf #2 \_numprint{#1}\_istoksempty\_opt\_iffalse \_space \_the\_opt \_fi.}\_space \_ignorespaces } \_def\zcref{\ref} \_def\eqref{\ref} % equations already store "(2.3)" % ------------------------------------------------------------------ % 2) Suppress numbering of non-referenced equations \refdecl{% \_def\_Xusedref#1{\_expandafter\_gdef\_csname zuse:#1\_endcsname{}}% } \openref % make sure the .ref file exists so \_wref below is not a no-op \_let\_OrigOpTeXref=\ref \_def\ref[#1]{\_wref\_Xusedref{{#1}}\_OrigOpTeXref[#1]} \_def\_ineqmark{\_incr\_dnum \_ifx\_lastlabel\_undefined \_ifinner\_else\_eqno\_fi \_wlabel\_thednum \_hbox{\_numprint\_thednum}% \_else \_ifcsname zuse:\_lastlabel\_endcsname \_ifinner\_else\_eqno\_fi \_wlabel\_thednum \_hbox{\_numprint\_thednum}% \_else \_decr\_dnum % give the number back \_wlabel{}% % \wlabel still creates the \dest[ref:...] destination itself \_fi \_fi } \_def\_thednum {(\_othe\_chapnum.\_othe\_secnum.\_the\_dnum)} % ------------------------------------------------------------------ % 3) General styling \hyperlinks \Blue \Blue % internal links blue \everytocline={\Blue} \_parskip=4pt plus2pt minus1pt \fontfam[LMfonts] \typosize[10/12] \fontfam[Heros] \fontfam[LMfonts] % register \Heros as a family switch, then \def\theorem {\numberedpar A{Theorem}} \def\endtheorem {\par} \def\lemma {\numberedpar A{Lemma}} \def\endlemma {\par} \_def\_titfont{\_scalemain\_typoscale[\_magstep4/\_magstep5]\_boldify\Heros} \_def\_printsec#1{\_par \_abovetitle{\_penalty-151}\_bigskip {\_secfont \_noindent \_raggedright \_printrefnum[@.\_quad]#1\_nbpar}\_insertmark{#1}% \_nobreak \_belowtitle{\_medskip} \_firstnoindent } \tit OpTeX \maketoc \label[sec:math] \sec Math With OpTeX we could write maths. Equations can be referenced. For example, see \eqref[eqn:def-m] in \zcref[sec:math]. \label[eqn:famous-emc] $$ E = mc^2 \eqmark $$ with \label[eqn:def-m] $$ m = {m_0 \over \sqrt{1 - {v^2\over c^2}}} \eqmark $$ \label[lem:testlemma] \lemma Not all abc \endlemma As we see in \zcref[lem:testlemma], the situation is fine. \outlines{1} \bye
- \ifnum throwing error despite using \pgfmathtruncatemacroby Stephanie on November 28, 2026 at 9:58 pm
I'm trying to use the result of a calculation to control flow within a tikzpicture. After consulting this answer and this reddit post, I switched to using the \pgfmathtruncatemacro command and added \relax to the \ifnum statement. However, the \ifnum statement flagged below still gives me the errors Missing number, treated as zero. and Missing = inserted for \ifnum. I also tried several solutions from here and here related to the fpu library, but everything I tried either gave me additional errors, or had no apparent effect. The calculations themselves appear to be correct, so I don't think it's the over/underflow errors referenced in that last link. The code below does run, but the \ifnum statement always executes the True condition whether or not that's actually the case. Is there something else I can do to force \testrefrtheta to be an integer? \documentclass[border=5pt]{standalone} \usepackage{ifthen,tikz,pgfplots} \begin{document} \begin{tikzpicture} % Indices of refraction \def\nnone{1.0} \def\nntwo{2.4} % reference scales \def\H{1.25} \def\normx{-2} % x-component of the incident ray \def\vecx{0.7875} %n_1 sin(theta_1) = n_2 sin(theta_2) % Calculate incident sin(theta) = 0.63 \pgfmathsetmacro{\incidentsin}{\vecx/\H} %sintheta_i=x/y % Calculate refracted sin(theta) = n_1 sin(theta_1) / n_2 = 0.2625 \pgfmathsetmacro{\refrsin}{\nnone*\incidentsin/\nntwo} % Use inverse sin to calculate refracted angle, and print in red as a test -> 15.22 degrees \pgfmathsetmacro{\refrtheta}{asin(\refrsin)} % Use truncatemacro to get the integer (rounded down) of the refracted angle, and print in dark green as a test \pgfmathtruncatemacro{\testrefrtheta}{floor(\refrtheta)} \node[red] at (\normx,0) {\refrtheta}; \node[green!50!black] at (\normx*2,\H/2) {\large \testrefrtheta}; % Print refracted angle in different colors depending on its value %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is where the error comes in - it always runs the first command even if that command is false \ifnum {\testrefrtheta} > {90}\relax% \node[blue] at (1.75,\H) {\Large \testrefrtheta}; \else \node[red] at (1.75,\H) {\Large \testrefrtheta}; \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%% \end{tikzpicture} \end{document}
- Generate {4,5} hyperbolic tiling with LuaDraw. I cannot figure out a simple way to generate them, and would appreciate an explanation as to how I canby Jasper on November 28, 2026 at 3:29 pm
Note: As I am still a beginner in luadraw, I had substantial help from AI to write the MWE of this question. I've mapped a Cartesian grid onto the hyperboloid and then projected it onto the Poincaré disk. \documentclass[border=3.14mm]{standalone} \usepackage[3d]{luadraw} \colorlet{tileblue}{blue!30} \colorlet{tileorange}{orange!80} \begin{document} \begin{luadraw}{name=grid} local ld = luadraw local M = ld.pt3d.M local sqrt, sin, cos, pi = math.sqrt, math.sin, math.cos, math.pi local O, I, K = M(0,0,0), M(1,0,0), M(0,0,1) local n, h = 4, .5 local g = ld.graph3d:new{ window3d={-8,8,-4,4,-4,4}, viewdir="xOy", window={-8,8,-3.2,4.2}, size={17,7.86,1} } local function H(p) return M(p.x,p.y,sqrt(1+p.x^2+p.y^2)) end local function P(p) return M(p.x,p.y,0)/(1+p.z) end local function disk(p) return P(H(p)) end local function view(p) p = ld.rotate3d(p,15,{O,K}) return ld.rotate3d(p,-43,{O,I}) end local L, R = M(-5.4,.8,0), M(5.5,.8,0) local function source(p) return L+view(p) end local function target(p) return R+2.1*p end local function surface(p) return view(H(p)) end local function boundary(f,i,j) local A = {M(i*h,j*h,0), M((i+1)*h,j*h,0), M((i+1)*h,(j+1)*h,0), M(i*h,(j+1)*h,0)} local B = {} for k=1,4 do local a,b = A[k],A[k%4+1] for l=0,23 do B[#B+1] = f(a+(l/24)*(b-a)) end end return B end local function circle(f) local A = {} for k=0,179 do local t=2*pi*k/180 A[#A+1]=f(M(cos(t),sin(t),0)) end return A end local facets, edges = {},{} local function onDisk(p) return target(disk(p)) end g:Dpolyline3d(circle(view),true,"gray,fill=gray!8") g:Dpolyline3d(circle(target),true,"black,fill=gray!8") for i=-n,n-1 do for j=-n,n-1 do local color = (i+j)%2==0 and "tileblue" or "white" if i==0 and j==-3 then color="tileorange" end g:Dpolyline3d(boundary(source,i,j),true,"black,thin,fill="..color) g:Dpolyline3d(boundary(onDisk,i,j),true,"black,thin,fill="..color) g:Dpolyline3d(boundary(function(p) return view(disk(p)) end,i,j), true,"gray,very thin,fill="..color) facets[#facets+1] = ld.surface(function(u,v) return surface(M(u,v,0)) end,i*h,(i+1)*h,j*h,(j+1)*h,{8,8}) facets[#facets+1] = {mode=5,color=color,contrast=.3} edges[#edges+1] = boundary(surface,i,j) end end local C = M(0,0,-1) local A = {M(0,-1.5,0),M(.5,-1.5,0),M(.5,-1,0),M(0,-1,0)} for _,p in ipairs(A) do g:Dpolyline3d({view(C),view(H(p))},false,"orange!90!black,thin") end g:Dmixfacet(table.unpack(facets)) for _,B in ipairs(edges) do g:Dpolyline3d(B,true,"black,very thin") end for _,p in ipairs(A) do g:Dpolyline3d({view(disk(p)),view(H(p))},false,"orange!90!black,thin,dashed") end g:Dlabel3d("$C=(0,0,-1)$",view(C)+M(0,-.27,0),{}) g:Dlabel3d("Cartesian grid",L+M(0,-2.25,0),{}) g:Dlabel3d("Hyperboloid",M(0,3.75,0),{}) g:Dlabel3d("Poincar\\'e disk",R+M(0,-2.5,0),{}) g:Dpolyline3d({M(-3,.8,0),M(-2.55,.8,0)},false,"->,thick") g:Dpolyline3d({M(2.75,.8,0),M(3.15,.8,0)},false,"->,thick") g:Dlabel3d("$H$",M(-2.77,1.05,0),{}) g:Dlabel3d("$P$",M(2.95,1.05,0),{}) g:Show() \end{luadraw} \end{document} What I'd like to do is generate a tiling in the Cartesian plane such that its image under these maps is a regular hyperbolic tiling, say {4,5} (https://en.wikipedia.org/wiki/4-5_kisrhombille). How would one go about generating such tiles? I cannot figure out a simple way to generate them, and would appreciate an explanation as to how I can. My goal is to make a Poincaré animation, similar to this one of the Klein disk that I made with AI, and do not understand the tiling process of. Though, I do understand how to set up the map once tiled.
- Shifting endpoint of an arrowby Jo Jo on November 28, 2026 at 1:10 pm
I'm trying to shift at custom the point where the left arrow ends by using xshift and yshift without success. Any hint? Below, find my code (compiled via LuaLaTeX). Many thanks. \documentclass{beamer} \usepackage{nicematrix} \usepackage{tikz} \usetikzlibrary{tikzmark,calc,positioning,fit,arrows,shapes,backgrounds,shapes.geometric,arrows.meta,patterns.meta,decorations.pathreplacing} \begin{document} \begin{frame} \begin{equation*} \begin{bNiceArray}{cccc}[margin] \CodeBefore \begin{tikzpicture} \fill [green!50!black,opacity=0.7] ([xshift=3pt,yshift=-2pt]1-|1) rectangle ([xshift=-3pt,yshift=-1pt]5-|2); \end{tikzpicture} \Body \tikzmarknode[outer sep=3pt]{x}{v_{11}} & v_{12} & \ldots & v_{1n} \\[5pt] v_{21} & v_{22} & \ldots & v_{2n} \\[5pt] \vdots & \vdots & \ddots & \vdots \\[5pt] v_{n1} & v_{n2} & \ldots & v_{nn} \end{bNiceArray} \begin{bNiceArray}{cccc}[margin] \tikzmarknode[outer sep=4pt]{a}{\lambda_{1}} & 0 & \ldots & 0 \\[5pt] 0 & \lambda_{2} & \ddots & \vdots \\[5pt] \vdots & \ddots & \ddots & 0 \\[5pt] 0 & \ldots & 0 & \lambda_{n} \CodeAfter \tikz \draw[color=green!50!black,very thick,opacity=0.7] (1-1) circle (3mm); \end{bNiceArray} \end{equation*} \begin{tikzpicture}[remember picture,overlay] \draw[green!50!black,<->,opacity=0.7] ([xshift=-8pt, yshift=10pt]x) edge [out=25, in=130] (a); \end{tikzpicture} \end{frame} \end{document} Current result:
- Excessing compile time when loading multiple bibliographies [closed]by Miguel Forteza on November 28, 2026 at 12:20 pm
I have to manage a "big" project with several sections, each with its own bibliography. I've organized the file with multiple subfiles. Example: Articulos Articulo Bib Bibliografia.bib Img Tex Biblioteca Bib Libro1.bib Libro2.bib Libro3.bib Libro4.bib Libro5.bib Img Tex Biografias Bib Bibliografia.bib Img Tex Biografia.tex Then I go to the main and write: \begin{refsection}[Revista/Biografias/Bib/Bibliografia] \input{Revista/Biografias/Tex/Biografia} \printbibliography \end{refsection} And I'm using \RequirePackage[ backend = biber, style = numeric, sorting = none ]{biblatex} And it will just exceed compile time. I've tried loading the package without the options and things like that but it does not work. What am I doing wrong? Do I have to change the platform (overleaf) where I work? Is it that there are a lot of .bib files? I won't compile either if I don't write the first chunk of code, just loading the packages makes it not compile.
- Forest: box around tree with attached nodesby Guido Vanden Wyngaerd on November 28, 2026 at 9:33 am
I'm trying to get a box around a (sub)tree, which should look like this: This is the MWE: \documentclass{article} \usepackage{forest} \useforestlibrary{linguistics} \forestapplylibrarydefaults{linguistics} \begin{document} \begin{forest} [,no edge, tikz={ \node[draw=gray!50,line width=2pt,rounded corners,fit to=tree] (wksp) {}; } [JP,tikz={\node[left] (bell) at (.west) {\emph{bell}$\quad\leftrightarrow\quad$};} [J] [EvalP,name=EvalNP [Eval] [AP [\phantom{text},roof]]]] [PlP,tikz={\node[right] (e) at (.east) {$\quad\leftrightarrow\quad$\emph{e}};} [Pl] [MP [M,name=M]]]] \end{forest} \end{document} But it produces this, with the bell outside of the box, and I want it inside: I've tried various solutions (eg with fit=(bell)(M)), but this produces an error. The hack that I currently use is to attach an invisible (phantom) node to the top (unlabelled) node, which works but needs a lot of tinkering to come out right, so I am wondering if there is a better way.
- Filling stereographically projected spherical tiles in LuaDrawby Jasper on November 28, 2026 at 6:47 am
Note: I had substantial help from AI to write the MWE of this question. I am stereographically projecting a tiled sphere onto its equatorial plane. Each projected tile is clipped against a rectangular prism before being filled. Due to the singularity of stereographic projection at the north pole, the tile containing that point maps to an unbounded region and is filled incorrectly. How can the projected tiles be filled correctly within the clipping region using luadraw? As I am still learning, I had substantial help from AI to write this script: \documentclass[ tikz, border=3.14mm ]{standalone} \usepackage[3d]{luadraw} \colorlet{tileblue}{blue!55} \colorlet{tileorange}{orange!65} \begin{document} \begin{luadraw*}{name=spherical-tiling} local ld = luadraw local M = ld.pt3d.M local sin, cos, pi = math.sin, math.cos, math.pi local r = 4.5 local frames = 48 local correct = false local axis = {M(0,0,0), M(1,1,0)} local equator = {M(0,0,0), M(0,0,1)} local prism = ld.parallelep( M(-r,-r,-1), M(2*r,0,0), M(0,2*r,0), M(0,0,2) ) local frame = { M(-r,-r,0), M(r,-r,0), M(r,r,0), M(-r,r,0) } local function stereo(p) return M(p.x,p.y,0)/(1-p.z) end local function boundary(f,a,b,c,d) local P = {} local function edge(u1,v1,u2,v2) for k = 0,59 do local t = k/60 local p = f(u1+t*(u2-u1),v1+t*(v2-v1)) if #P == 0 or ld.pt3d.abs(p-P[#P]) > 1e-10 then table.insert(P,p) end end end edge(a,c,b,c) edge(b,c,b,d) edge(b,d,a,d) edge(a,d,a,c) if ld.pt3d.abs(P[1]-P[#P]) < 1e-10 then table.remove(P) end return P end local function addtile(scene,facets,color) if #facets > 0 then table.insert(scene,facets) table.insert(scene,{ mode=5, color=color, contrast=.3, twoside=false }) end end for k = 0,frames-1 do local angle = 12-9*k/(frames-1) local g = ld.graph3d:new{ window3d={-r,r,-r,r,-1,1}, viewdir={35,55}, adjust2d=true, size={14,14} } local function sphere(u,v) return ld.rotate3d( M(sin(v),cos(v)*cos(u),cos(v)*sin(u)), angle,axis ) end local function projection(u,v) return stereo(sphere(u,v)) end local north = ld.rotate3d(M(0,0,1),-angle,axis) local uN = math.atan(north.z,north.y) if uN < 0 then uN = uN+2*pi end local vN = math.asin(north.x) local upper, lower, plane = {}, {}, {} local pole = nil for i = 0,11 do for j = 0,11 do local a,b = i*pi/6, (i+1)*pi/6 local c,d = -pi/2+j*pi/12, -pi/2+(j+1)*pi/12 local containsPole = a < uN and uN < b and c < vN and vN < d local color = (i+j)%2 == 0 and "tileblue" or "tileorange" if containsPole then color = "red" end -- Spherical tile, split at the equatorial plane. local F = ld.surface(sphere,a,b,c,d,{8,8}) local A,B = ld.cutfacet(F,equator) addtile(upper,A,color) addtile(lower,B,color) -- Project and clip the closed tile boundary. local P = boundary(projection,a,b,c,d) P = ld.clip3d({P},prism,false) if #P > 0 then if containsPole then pole = P else table.insert(plane,{polygon=P, color=color}) end end end end -- Draw in depth order: lower hemisphere, plane, upper hemisphere. g:Dmixfacet(table.unpack(lower)) g:Dpolyline3d(frame,true, "draw=black,thin,fill="..(correct and "red" or "white") ) for _,tile in ipairs(plane) do g:Dpolyline3d(tile.polygon,true,"draw=none,fill="..tile.color) end if pole and not correct then g:Dpolyline3d(pole,true,"draw=red,fill=red,fill opacity=.45") end g:Dpolyline3d(frame,true,"black,thin") g:Dmixfacet(table.unpack(upper)) g:Sendtotex() end \end{luadraw*} \end{document}
- How to acquire the `.cls`/`.sty` directly from CTAN on the url without manually compiling the `.dtx`?by Explorer on November 28, 2026 at 1:54 am
For the test and debug reason, I need a .cls/.sty quickly, but with the package which use literal programming, on CTAN, it only provides the original .dtx form. I know that by compiling the .dtx, the .cls/.sty form would be release, together with the manual. But if the package was quite large and complicated, or if some fonts issues, I don't think compile .dtx always works on my local machine, and that was time-consuming, I only need .cls for a quick test. So, I want to download the .cls/.sty directly from the website of CTAN. Let's take the example of westlakethesis package. No matter whether I click the "Sources" or "Download", I could only see the .dtx file: As you could see, there are only .dtx, for the quick test purpose, I need the westlakethesis.cls from the website. I could find that in my local directory: \texlive\2026\texmf-dist\tex\latex\westlakethesis\westlakethesis.cls But I can't find it anywhere on CTAN... Since there exist .cls in my local texmf-dist, I think CTAN or somewhere might probably have pre-compiled the .dtx, and transformed them to .cls, how could I get the .cls directly from the website? I have found similar links, but imho, none of them answer "How to download the .cls/.sty directly from the website": Where can I find which packages are available as tds.zip? Generate .sty file from CTAN zip Where to find the .sty file? Edit1 Since Gerd Neugebauer pointed out here: Since a few days we have added the respective link to the CTAN web site. Whenever a tds.zip file is present then a download link is provided on the package page and the tex-archive browse page. But not too many packages do so? The breqn does: But the colortbl not: I didn't conduct any statistics, but based on my personal experience, it's quite rare to see the "TDS archive" section in any package... Edit2 Since Paul Gessler has pointed out here: However, since this package was distributed to CTAN as a .dtx rather than a .sty, the simplest option is to download the .sty file from the TeX Live sources for the package How could I get the link of: http://www.tug.org/texlive//devsrc/Master/texmf-dist/tex/latex/aligned-overset/ for every packages on CTAN? Where should I click? And is that all the package with .dtx has similar links? Edit3 —— A (real) example case why I want to acquire .cls/.sty directly Let's consider the following case, it could be a preceeding to my previous one, we could see the listings example. Now let's see the version and release: listings-v1.11b 2025-11-14 listings-v1.11 2025-11-07 listings-v1.10c 2024-09-24 listings-v1.10a 2024-03-23 listings-v1.10(the frozen version on TL2024) Assuming that a user reported that a code behaves wrong with v1.10, but as my local test, the latest version v1.11b works fine. To find out which version exactly cause the difference, the most straightforward approach is to directly obtain all the .sty files and test them in the current temporary test folder. (Or, maybe svn could do something like git bisect, but that was not quite in-topic here) In the example of listings, I need to unpacked five .inss to get five .sty files. And in this case, a single listings.sty was enough for the debug use here. I want to disregard this example which spans across major TL25 and TL26 versions, here. In some cases where the releases are sufficiently frequent, it's quite possible that multiple versions of a year's release will occur. Therefore, the approach of using platforms like Overleaf to switch versions to narrow down the investigation scope is certainly feasible, but it has gone beyond the scope of this discussion. This example is merely intended to illustrate "why I want to quickly download multiple cls/sty files", and I find the existence of dtx/ins quite troublesome...
- Recent error with zref-vario (which isn't the culprit)by Denis Bitouzé on November 27, 2026 at 7:57 pm
The following MCE: \documentclass{article} \usepackage{zref-clever,zref-vario} \begin{document} \section{Section 1} \label{sec:section-1} \newpage A reference to \zcref{sec:section-1}. A reference to \zvref{sec:section-1}. \end{document} used to work nicely, e.g. with the TeX Live 2025 but, with an up to date TeX Live 2026, that's not the case anymore, \zvref being involved: ! LaTeX Error: The key 'zref-clever/reference/noabbrevfirst' is unknown and is (LaTeX) being ignored. For immediate help type H <return>. ... l.9 A reference to \zvref{sec:section-1} . ? Note that, if the compilation is forced, the resulting document is as expected. Also, note that zref-vario isn't the culprit since the diff of the list files between a working and a non working versions is: $ diff list-files-2025.txt list-files-2026.txt 2,3c2,3 < LaTeX2e <2025-06-01> patch level 1 < L3 programming layer <2025-10-24> --- > LaTeX2e <2026-11-01> > L3 programming layer <2026-11-16> 5a6 > 7,8c8,9 < article.cls 2025/01/22 v1.4n Standard LaTeX document class < size10.clo 2025/01/22 v1.4n Standard LaTeX file (size option) --- > article.cls 2026-06-04 v1.4n Standard LaTeX document class > size10.clo 2026-06-04 v1.4n Standard LaTeX file (size option) 11c12 < zref-base.sty 2025-06-08 v2.36 Module base for zref (HO) --- > zref-base.sty 2026-09-16 v2.38 Module base for zref (HO) 16,17c17,18 < pdftexcmds.sty 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO) < iftex.sty 2024/12/12 v1.0g TeX engine tests --- > pdftexcmds.sty 2026-10-28 v0.34 Utility functions of pdfTeX for LuaTeX (HO) > iftex.sty 2026/11/17 v1.0h TeX engine tests 20,21c21,22 < zref-user.sty 2025-06-08 v2.36 Module user for zref (HO) < zref-abspage.sty 2025-06-08 v2.36 Module abspage for zref (HO) --- > zref-user.sty 2026-09-16 v2.38 Module user for zref (HO) > zref-abspage.sty 2026-09-16 v2.38 Module abspage for zref (HO) 22a24 > latex-firstaid-pkg-zref-clever.ltx 25,26c27,28 < varioref.sty 2025/01/14 v1.6g package for extended references (FMi) < l3backend-pdftex.def 2025-10-09 L3 backend support: PDF output (pdfTeX) --- > varioref.sty 2026/06/06 v1.6j package for extended references (FMi) > l3backend-pdftex.def 2026-11-16 L3 backend support: PDF output (pdfTeX) Do you see what's going on and how to fix this problem?
- Coordinates in pgfplotsby Patricio on November 27, 2026 at 2:04 pm
I'm trying to label a figure created with pgfplots in a beamer document, but my labels do not appear where I expect them. I am guessing that the problem is that coordinates for labels are not the same than those of the figure itself, but I do not know how to address this. For example, in my MWE, I expected the label to be placed somewhere near the top right end of the ray, but I get this instead: My code is \documentclass{beamer} \usepackage{pgfplots} \begin{document} \begin{frame} \begin{figure} \begin{tikzpicture} \begin{axis}[ ticks=none, axis x line=bottom, axis y line=left, xmin=0,xmax=10, ymin=0,ymax=10] \addplot[samples=2,thin,black,dotted,domain=0:10] {x*(3/2)}; \path (7,9) node {$\mathit{MP}_x=\text{Undefined}$}; \end{axis} \end{tikzpicture} \end{figure} \end{frame} \end{document}
- Listings "Couldn't load requested language"by Frisket on November 26, 2026 at 3:22 pm
[NOT a duplicate of the old https://tex.stackexchange.com/questions/212069/listings-cannot-load-requested-language] I need to use many language variants with listings but I cannot find the syntax needed to load them. Here is an MWE of two of them (one adding new commands the LaTeX, the other to represent Word XML; in the live document there will be a dozen or more following the same pattern): \documentclass{article} \usepackage{listings} \lstdefinelanguage{[LaTeX]TeX}{morekeywords={% PassOptionsToPackage,RequirePackage}} \lstdefinelanguage{[OOXML]XML}{morekeywords={% w:p,w:pPr,w:pStyle,w:rPr,w:rFonts,w:r,w:t,w:lang}} \lstloadlanguages{LaTeX,OOXML} %\lstloadlanguages{[LaTeX]TeX,[OOXML]XML} %\lstloadlanguages{{[LaTeX]TeX},{[OOXML]XML}} \begin{document} test document \begin{lstlisting}[language={[OOXML]XML}] <w:p w:rsidR="08A306C6" w:rsidP="3E2C60CC" w:rsidRDefault="08A306C6" w14:paraId="0B6FAFDD" w14:textId="2DE30FBD"> ... </w:p> \end{lstlisting} \end{document} I have tried the three variants of the language naming syntax as shown commented out above, but all of them result in the same error: (/usr/share/texlive/texmf-dist/tex/latex/listings/lstlang3.sty) ! Package Listings Error: Couldn't load requested language. See the Listings package documentation for explanation. Type H <return> for immediate help. ... l.7 \lstloadlanguages{LaTeX,OOXML} I can see from the old discussion in Listings "cannot load requested language" that there have been bugs in the specification of supported languages, but in this case I am invoking new variants on them, building on the existing ones. What have I missed here?
- Beamer - No way to specify the font encoding for a single font?by Thibault de Villèle on November 25, 2026 at 12:22 pm
I have a presentation coming up, in which I'll attempt to follow the graphical chart of my university. It calls for the Oswald font to be used for all titles and title-like content, while the OpenSans font should be used for the rest of the document. I will be using Beamer for this presentation (I know ltx-talk exists, but I'm accustomed to beamer and at this point, I don't have time to change my habits). Beamer allows one to change things presentation-wide with the following command: \setbeamerfont{<beamer element name>}{<attributes>} There is a package for both fonts: the oswald and opensans packages. However, the oswald package uses the LaTeX font maps instead of the newer fontspec mechanism, and does not define a simple \oswald command I could use for switching to it when I want; it only redefines (unconditionally) the \sfdefault command at the end of its .sty file. Furthermore, since I have accents the only encoding of the Oswald fonts suitable for this presentation will be T1. However, I cannot seem to get the Oswald font to appear if I don't prepend all uses of the Beamer fonts {title} and {frametitle} with a manual font encoding switch, is this intended behaviour? Is there not a way to select a font encoding with \setbeamerfont? Here is a MWE, which shows what I've tried: \documentclass[10pt]{beamer} \usetheme{moloch}% \usefonttheme{professionalfonts}% \usepackage[T1]{fontenc} \usepackage{Oswald} \let\oswaldfamilyname=\sfdefault% Get the Oswald font name before it's overridden \usepackage[defaultsans]{opensans} \DeclareFixedFont{\oswald}{T1}{\oswaldfamilyname}{b}{n}{12}% Guessed \Large size: 12pt \DeclareFixedFont{\oswaldsmall}{T1}{\oswaldfamilyname}{b}{n}{11}% Guessed \large size: 11pt % Those don't work: % \setbeamerfont{title}{family*=\oswald,shape=\upshape,series=\bfseries} % \setbeamerfont{frametitle}{family*=\oswaldsmall,shape=\upshape,series=\bfseries} % Those don't work standalone, only with \fontencoding. Uses the "old" shape and series font selectors: \setbeamerfont{title}{family*={\oswaldfamilyname},shape*=n,series*=b} \setbeamerfont{frametitle}{family*={\oswaldfamilyname},shape=\upshape,series*=b} \begin{document} \begin{frame}{This is a title} \begin{itemize} \item Inline text: titles should look like {\oswald this} and frame titles like {\oswaldsmall this}. \item Beamer fonts: instead they look like {\usebeamerfont{title}this} and like {\usebeamerfont{frametitle}this}. \item Forced encodings: they could look like {\fontencoding{T1}\usebeamerfont{title}this} and like {\fontencoding{T1}\usebeamerfont{frametitle}this}. \end{itemize} \end{frame} \end{document} And here is the result of that MWE (lualatex version 1.24.0, dev. id 7724 TeXLive 2026):
- Error in TeXbook on page 43?by Igor Liferenko on November 25, 2026 at 2:29 am
This is the quote from TeXbook p.43: ...the plain format of Appendix B, which defines % to be a special kind of symbol so that you can use it for comments... In fact, the category code of 14 is assigned to % in TeX source. But this phrase suggests that \catcode`\%=14 is done in plain.tex Doesn't it?
- Formatting LaTeX before use in verbatim environmentby k4l1 on November 19, 2026 at 5:37 am
I'm typesetting a large document that has code examples with included Latex symbols. I don't actually write the text, so I can't edit the syntax, but I do control the definition of the environment it's rendered in (env in the example below): \begin{env} let main () = let a = int{\char95}of{\char95}string Sys.argv.(1) in let b = int{\char95}of{\char95}string Sys.argv.(2) in Printf.printf "\%d{\char92}n" (gcd a b); exit 0;; main ();; \end{env} I'd ideally like to highlight the code with minted, but since that's a verbatim environment it prints the \char95 as text instead of the requisite character. I've looked through minted/tcblistings docs with no real luck as far as I'm aware. What's my best option here? Of note: I do highlight using a custom Pygments lexer, so if adding something to that definition is easiest that would be possible on my end 🙂