• How can I draw a chess piece in another color (e.g. red)?
    by Kyle on December 6, 2026 at 4:05 am

    I'd like to draw a chessboard with Red and Blue pieces. Is there any way to do this? I've been using xskak for my other chess diagrams. Edit, added MWE: \documentclass[border=14pt, 10pt]{standalone} \usepackage[utf8]{inputenc} \usepackage{xskak} %opening \begin{document} \chessboard[whitepiececolor=red, blackpiececolor=blue, showmover=false, maxfield=b1, addpieces={Ra1,rb1}] \end{document}

  • Why a strange output instead of a syntax error when I omit a macro argument
    by katang on December 5, 2026 at 8:02 pm

    \documentclass{article} \usepackage{siunitx} \newcommand{\Length}[1]{(#1)} \newcommand{\MyRadius}[1]{\Length{#1}} \def\MyRadiusValue{1234} \begin{document} \noindent \MyRadius\\ \MyRadiusValue\\ \Length{\MyRadiusValue}\\ \MyRadius{\MyRadiusValue}\\ \end{document} I am trying to make embedded/nested macros. It seems to be mostly OK, except that when I (by mistake) omit the macro argument, I receive a strange form of syntax error: the argument is not printed, in its place a new line appears, and a space is added instead of a new line. Of course, it is best to avoid typos, but this missing syntax error leads to confusing output and late debugging. Just out of curiosity: What happens here? ( ) 1234 (1234) (1234)

  • biblatex-chicago: Removing unnecessary commas?
    by user1362373 on December 5, 2026 at 2:19 pm

    Consider this MWE: \documentclass{article} \usepackage{filecontents} \usepackage[authordate,backend=biber]{biblatex-chicago} \addbibresource{refs-mwe.bib} \begin{filecontents}{refs-mwe.bib} @article{Other2021, author={A. N. Other and B. O. Extra}, title={Some title}, journal={Nature}, volume={2}, pages={4-5}, year={2021} } @article{Bloggs2022, author={J. Bloggs}, title={Some title}, journal={Science}, volume={3}, pages={5-6}, year={2022} } @article{Extra2023, author={B. O. Extra and A. N. Other and J. Bloggs}, title={Some title}, journal={Nature}, volume={4}, pages={6-7}, year={2023} } \end{filecontents} \begin{document} \textcite{Other2021,Bloggs2022,Extra2023} \printbibliography \end{document} which produces In the References, in the interests of brevity, two types of commas appear unnecessary to me: The comma after the last name of the first author (applies to all entries). The comma before the "and" if there are two authors (applies to the last entry). How can I get rid of them?

  • \left and \right not working for curly brackets in Overleaf
    by Richard ZHOU on December 5, 2026 at 10:55 am

    How do I produce curly brackets { and } that automatically fit to text size? (I tried \left{ and \right} but they don’t work.)

  • Does kaobook no longer work in TeX Live 2016? [closed]
    by 조문수 on December 4, 2026 at 11:53 pm

    Does kaobook no longer work in TeX Live 2016? Could you provide specific instructions on how to use kaobook with TeX Live 2016? (I am a beginner with LaTeX.)

  • Error since I inserted a .bib file
    by clipper-raccoon on December 4, 2026 at 11:26 pm

    I'm new to latex, so I hope my question is not stupid. My file was working well until I add a bib resource and references in the text and I don't understand what's the problem. Here is my preamble: \documentclass[12pt]{article} \usepackage[french]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[backend=biber,style=apa,sorting=nyt]{biblatex} \AtEveryCite{\restorecommand\mkbibnamefamily} \addbibresource{barthes.bib} \usepackage{csquotes} \usepackage{tabularx} \usepackage{array} \usepackage[skip=10pt plus1pt,indent=40pt]{parskip} \usepackage{setspace} \onehalfspacing \newcommand{\citerlong}[2]{\begin{center}\small\singlespacing\smallskip#2\end{center}\par\begin{flushright}\small\parencite{#1}\end{flushright}} \renewcommand{\tabularxcolumn}[1]{m{#1}} \renewcommand{\quotation}[2]{\singlespace{#1,#2}\small {#1,2}} And here is the message error I get (I don't copy the whole message, just the part where the error seems indicated): This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/Debian) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode (./barthes.tex LaTeX2e <2023-11-01> patch level 1 L3 programming layer <2024-01-22> [...] No file barthes.bbl. LaTeX Warning: Citation 'samoyault2015' on page 1 undefined on input line 25. LaTeX Warning: Citation 'samoyault2015' on page 1 undefined on input line 25. LaTeX Warning: Citation 'samoyault2015' on page 1 undefined on input line 27. [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]) Runaway argument? {Le Degré zéro de l'écriture] et en 1959 un article dans \textit {\ETC. ! File ended while scanning use of \textit . <inserted text> \par <*> barthes.tex ? Processus arrêté par l'utilisateur I understand the problem is that barthes.bbl is missing, but Texworks asks me to delete some auxiliary files after this message error. is it because I deleted it? How could I solve this problem? I also get an error message when I run bibtex or biber related to the missing of auxiliary files. I hope I'm asking an appropriate question for this forum. Have a good evening.

  • Fully expanding a macro with optional keys inside another macro (in expl3)
    by modallyFragile on December 4, 2026 at 9:31 pm

    (TL;DR: why does the expected output not match the actual output in the MWE?) Motivation/explanation: I'm writing a package for querying SQL in LaTeX. As part of this I have: a \colvalue macro which prints the value of a particular column, within a query. a system where @{<key>} templates within a query string can be replaced with values from a <key>=<val> list specified in the query command. The query command is set up so that the user can specify nested queries. In principle (and in practice), these could be constructed using templates which expand column values from earlier queries. Here is an example: \begin{itemize} \sqlquery[ name = people, % code to execute for each row each = { \begin{itemize} % Nested query \sqlquery[ name = clients, each = {\item \colvalue[query=clients]{name}} % |---------- note this ----------| ]{select * from client where account_manager = @{id}}[id=\colvalue[query=people]{personid}] \begin{itemize} } ]{select * from people} \end{itemize} This prints a list of people, and for each person, a list underneath them of the clients to whom they are assigned. Notice the labelled use of \colvalue, which in the inner query, but references the outer query, in order to include in the query string information from the outer query's results. This use of \colvalue must be completely expandable because of how the query string is expanded and used. Problem. So, I want to write a \colvalue macro which is completely expandable, inside another command (\sqlquery above) which substitutes values for @{<key>} templates inside a string. In the MWE below I've used a simpler command as the thing in \colvalue has to be embedded -- its just called \replace. \colvalue takes an optional key/value list (with a limited number of possible keys), and a mandatory column name. My question: how can I write a macro which completely expandably parses a small key/value list, and then does something with the values and its mandatory argument, all while inside the argument to another macro? My exact requirements are that: \colvalue only recognise certain keys in the optional argument (below I specify just one) and throws an error for any others. (There might in principle be further keys though, which is why I can't just use a single optional argument.) \colvalue can somehow store, and then do something with, the values of the optional keys. \colvalue is fully expandable inside \replace. I have tried to do this and nearly succeeded. In my MWE \colvalue only recognises the key query in its optional key/value list, and should expand to [<value of query key>]<mandatory arg>. It does this when used outside of \replace. Inside \replace, it doesn't seem to handle the query argument properly. Why not? \documentclass{article} \ExplSyntaxOn % * Colvalue \msg_new:nnn { mwe / colvalue } { unknown-key } { Key ~ `#1' ~ not ~ defined. } \msg_new:nnn { mwe / colvalue } { no-value } { All ~ keys ~ must ~ have ~ a ~ value. } % <key> <val> \cs_new:Nn \__mwe_colvalue_parse_key_val:nn { \str_case:nnF { #1 } { { query } { \lua_now:e { colvalue_query = "#2" } } } { \msg_expandable_error:nnn { mwe / colvalue } { unknown-key } { #1 } } } \cs_new:Nn \__mwe_colvalue_parse_key:n { \msg_expandable_error:nn { mwe / colvalue } { no-value } } \NewExpandableDocumentCommand{\colvalue}{ O{} m }{ \keyval_parse:nnn { \__mwe_colvalue_parse_key:n } { \__mwe_colvalue_parse_key_val:nn } { #1 } \lua_now:e { tex.print("[" .. colvalue_query .. "]") } \lua_now:e { tex.print("#2") } } % * replace \msg_new:nnn { mwe / replace } { no-value } { All ~ keys ~ must ~ have ~ a ~ value. } % 1: string variable to replace in % 2: key % 3: value \cs_new:Nn \__mwe_replace_key_val:Nnn { \exp_args:Nnne \str_replace_all:Nnn #1 { @{#2} } { #3 } } \cs_new:Nn \__mwe_replace_key:n { \msg_expandable_error:nn { mwe / replace } { no-value } } \NewDocumentCommand{\replace}{ +m +O{} }{ \tl_set:Nn \l_tmpa_str { #1 } \keyval_parse:nnn { \__mwe_replace_key:n } { \exp_args:Nnne \__mwe_replace_key_val:Nnn \l_tmpa_str } { #2 } % Print result \l_tmpa_str } \ExplSyntaxOff \begin{document} % Prints "[foo]bar" as expected \colvalue[query=foo]{bar} % Desire output: "one [qux]two three" % Actual output: "one [foo]two three" \replace{one @{baz} three}[baz={\colvalue[query=qux]{two}}] \end{document} TIA.

  • TikZ diagram for Fick's first law (anisotropic diffusion)
    by Sebastiano on December 4, 2026 at 9:10 pm

    I am trying to create a TikZ figure illustrating the geometric interpretation of Fick's first law in an anisotropic medium: \bar{q}(\bar{x},t) = -\bm{\mathsf{D}}\,\nabla c(\bar{x},t) Specifically, the diagram should clearly convey that: The concentration gradient $\nabla c(\bar{x},t)$ is orthogonal to the isoconcentration surfaces ($c = c_1, c_2, c_3$). The diffusive flux $\bar{q}(\bar{x},t)$ points towards lower concentrations (opposite to $\nabla c$) and is deflected away from $-\nabla c(\bar{x},t)$ due to the anisotropy of the diffusion tensor $\bm{\mathsf{D}}$. Here is my current MWE: \documentclass[a4paper,11pt]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{tikz} \usepackage{pgfplots,bm} \pgfplotsset{compat=1.18} \usetikzlibrary{arrows.meta, decorations.pathmorphing, positioning, angles, quotes} \begin{document} \begin{figure}[htbp] \centering \begin{tikzpicture}[ font=\sffamily, >=Stealth ] \definecolor{epiFronte}{RGB}{246,232,206} \definecolor{dermaSup}{RGB}{244,198,194} \definecolor{dermaInf}{RGB}{238,178,173} \definecolor{dermaPunto}{RGB}{218,152,148} \definecolor{dermaScuro}{RGB}{188,118,114} \definecolor{rossoCapillare}{RGB}{185,10,10} \pgfmathdeclarefunction{surfZ}{2}{% \pgfmathparse{0.22*exp(-1.2*(#1+0.35)^2 - 0.8*(#2)^2) - 0.25*#1}% } \pgfmathdeclarefunction{dZdx}{2}{% \pgfmathparse{0.22*(-2.4*(#1+0.35))*exp(-1.2*(#1+0.35)^2 - 0.8*(#2)^2) - 0.25}% } \pgfmathdeclarefunction{dZdy}{2}{% \pgfmathparse{0.22*(-1.6*(#2))*exp(-1.2*(#1+0.35)^2 - 0.8*(#2)^2)}% } \begin{axis}[ width=13cm, height=10.5cm, hide axis, view={13}{20}, xmin=-1.1, xmax=1.35, ymin=-0.9, ymax=0.9, zmin=-2.1, zmax=1.6, samples=22, samples y=16, domain=-1:1.25, y domain=-0.85:0.85, clip=false, colormap={dermaRossoMap}{ color(0cm)=(epiFronte); color(1cm)=(dermaSup); color(2cm)=(dermaInf); color(3cm)=(dermaPunto); color(4cm)=(dermaScuro!75!rossoCapillare) } ] \pgfmathsetmacro{\stepZ}{0.75} \pgfmathsetmacro{\xZero}{-0.15} \pgfmathsetmacro{\yZero}{0.0} \pgfmathsetmacro{\zZero}{surfZ(\xZero,\yZero) - \stepZ} \pgfmathsetmacro{\nx}{-dZdx(\xZero,\yZero)} \pgfmathsetmacro{\ny}{-dZdy(\xZero,\yZero)} \pgfmathsetmacro{\nz}{1.0} \pgfmathsetmacro{\normN}{sqrt(\nx*\nx + \ny*\ny + \nz*\nz)} \pgfmathsetmacro{\ux}{\nx/\normN} \pgfmathsetmacro{\uy}{\ny/\normN} \pgfmathsetmacro{\uz}{\nz/\normN} \pgfmathsetmacro{\tx}{1.0} \pgfmathsetmacro{\ty}{0.0} \pgfmathsetmacro{\tz}{dZdx(\xZero,\yZero)} \pgfmathsetmacro{\normT}{sqrt(\tx*\tx + \tz*\tz)} \pgfmathsetmacro{\utx}{\tx/\normT} \pgfmathsetmacro{\utz}{\tz/\normT} \pgfmathsetmacro{\lenGrad}{1.45} \pgfmathsetmacro{\lenNegGrad}{1.35} \pgfmathsetmacro{\qx}{\lenNegGrad*(-\ux + 0.45*\utx)} \pgfmathsetmacro{\qy}{0.0} \pgfmathsetmacro{\qz}{\lenNegGrad*(-\uz + 0.45*\utz)} \coordinate (P) at (axis cs:\xZero, \yZero, \zZero); \coordinate (Gtip) at (axis cs:{\xZero + \lenGrad*\ux}, 0, {\zZero + \lenGrad*\uz}); \coordinate (NegGtip) at (axis cs:{\xZero - \lenNegGrad*\ux}, 0, {\zZero - \lenNegGrad*\uz}); \coordinate (Qtip) at (axis cs:{\xZero + \qx}, 0, {\zZero + \qz}); \coordinate (Tleft) at (axis cs:{\xZero - 0.55*\utx}, 0, {\zZero - 0.55*\utz}); \coordinate (Tright) at (axis cs:{\xZero + 0.65*\utx}, 0, {\zZero + 0.65*\utz}); \addplot3[ surf, shader=faceted interp, faceted color=dermaPunto!60, line width=0.2pt, opacity=0.35, point meta={surfZ(x,y) - 2*\stepZ} ] {surfZ(x,y) - 2*\stepZ}; \draw[->, dashed, line width=1.3pt, color=blue!75!black!75] (P) -- (NegGtip) node[below=3pt, color=blue!75!black] {$-\nabla c(\bar{x},t)$}; \draw[->, line width=1.5pt, color=rossoCapillare] (P) -- (Qtip) node[right=4pt, pos=0.92, color=rossoCapillare] {$\bar{q}(\bar{x},t)$}; \pic [draw=rossoCapillare, ->, line width=1pt, angle radius=1.25cm, "$\bm{\mathsf{D}}$"{below, shift={(1pt,-1pt)}, text=rossoCapillare, font=\bfseries}] {angle = NegGtip--P--Qtip}; \addplot3[ surf, shader=faceted interp, faceted color=dermaScuro!65, line width=0.2pt, opacity=0.38, point meta={surfZ(x,y) - \stepZ} ] {surfZ(x,y) - \stepZ}; \draw[dotted, line width=1pt, color=black!85] (Tleft) -- (Tright); \pic [draw=black!80, line width=0.6pt, angle radius=6pt] {right angle = Tright--P--Gtip}; \fill[black!90] (P) circle (2.3pt) node[above left=2pt and 3pt, color=black!90] {$\bar{x}$}; \addplot3[ surf, shader=faceted interp, faceted color=rossoCapillare!60!black, line width=0.25pt, opacity=0.40, point meta={surfZ(x,y)} ] {surfZ(x,y)}; \draw[->, line width=1.5pt, color=blue!75!black] (P) -- (Gtip) node[below right=1pt and -1pt, color=blue!75!black] {$\nabla c(\bar{x},t)$}; \pgfmathsetmacro{\xLab}{1.25} \node[right=6pt, color=black!85] at (axis cs:\xLab, 0, {surfZ(\xLab,0)}) {$c = c_1$}; \node[right=6pt, color=black!85] at (axis cs:\xLab, 0, {surfZ(\xLab,0) - \stepZ}) {$c = c_2$}; \node[right=6pt, color=black!85] at (axis cs:\xLab, 0, {surfZ(\xLab,0) - 2*\stepZ}) {$c = c_3$}; \node[align=left, anchor=west, font=\normalfont, color=black!85] at (axis cs:-1.05, 0, 1.15) {Alta~concentrazione $(c_1 > c_2 > c_3)$}; \node[align=left, anchor=west, font=\normalfont, color=black!85] at (axis cs:0.75, 0, -2.35) {Bassa concentrazione}; \end{axis} \end{tikzpicture} \caption{% Rappresentazione geometrica della prima legge di Fick: il gradiente $\protect\nabla{c}$ è ortogonale alle superfici isoconcentrazione, mentre il flusso $\bar{q}$ ha verso opposto ed è deviato dal tensore di diffusione $\bm{\mathsf{D}}$ nei mezzi anisotropi.% } \label{fig:fick_tikz} \end{figure} \end{document} How can I improve the design, visual hierarchy, or TikZ techniques (e.g., background shading/gradients for concentration levels, 3D perspective for isoconcentration surfaces, principal axes of anisotropy, or better label placement) to make this figure much cleaner and easier to read?

  • Re-defining ~ to be narrow nobreak space
    by rallg on December 4, 2026 at 6:54 pm

    A few days ago, someone asked a question (closed, due to lack of detail) concerning re-definition of ~. I posted a poor answer, quickly spanked in comments, which I removed. My poor answer was copy-paste from my own working code, but I failed to copy-paste other code that was necessary. Character ~ is a standard-width nonbreaking space, which can stretch or shrink like any other space. I wish to re-define it, so that it is a narrow-width nonbreaking space. Hopefully it will stretch and shrink like any other space, but I can live with limitations. Understand that I am not using any packages, or writing equations, that rely on on ~ being full-width. My code, MWE: \documentclass{article} \AddToHook{begindocument/end}{%% \def\,{\leavevmode\nobreak\hspace{.16em plus .06em minus .1em}} \protected\edef~{%% \noexpand%% \ifincsname%% \noexpand\expandafter\string~\noexpand%% \else%% \noexpand\expandafter\noexpand\,\noexpand%% \fi%% }%% }%% \begin{document} Hello World.\par Hello~World. \end{document} That works with lualatex. The second line has less space width. My question: Should I worry about possible infinite loops, or other problems? Other than itself, I am unaware of any csname that has ~ in it. EDIT: As noted in comments, my above re-definition of \, is secondary. It is simply that, in my own case, I wanted \, to be nonbreaking.

  • Synctex.gz is not recognized by Sumatra in Windows 11
    by Timo Kuronen on December 4, 2026 at 6:27 pm

    TeX Live 2026 + pdfLaTeX generates a .synctex.gz file without errors. The log shows “SyncTeX written on ...”. However, SumatraPDF 3.6.1 does not recognize the compressed SyncTeX file, but it does recognize the uncompressed .synctex file (-synctex=-1) normally. I'd prefer compressed files. Any suggestions?

  • What's the final consensus on AI-generated LaTeX tools? Which one should I use? [migrated]
    by remarkabletablet on December 4, 2026 at 10:13 am

    Just today there's been two new posts with clearly AI-generated tools even on r/latex and here. Over the past weeks (or months?) it seems like there's a new post every week. It's annoying for several reasons, and these types of posts should not be permitted. Let me explain: I'm not a fan of AI-generated stuff, at all, but my biggest gripe with these is not that the authors used AI to build something, but rather that they completely lack an understanding and knowledge of what the community uses and needs, as well as the current LaTeX / TeX ecosystem. So, they propose preposterous tools that add nothing at all to the community. Again, while I'm not a fan of AI-generated stuff, the tokens these people spend could be put to better use if these people took the time to understand the ecosystem, and identify actual gaps that exists, regarding tools, packages, etc.. I know some of you feel the same as I do, but I'm not sure we've ever discussed this issue with the mods. I'd very much like to see some moderation regarding this type of content. My opinion is that these types of post don't explicitly violate rule 2, in the sense that no AI generated images, explanations or bodies of text are being posted. I feel we should come to a consensus without the heavy marketing of Overleaf and Jenni who owns some of the community moderators on reddit and here to keep posting about it but also every week an AI latex editor comes which is not reliable with your personal data. Even big companies like OpenAI prism shut down, so I think even the smaller ones will keep shutting down, we need more awareness on which tools are the final tools and no need to use any other tools and ban any other marketing! Let's highlight the number 1 tools. Overleaf Jenni Zotero Bibby PaperPal Scite Endnote JabRef Mendeley add more if you like but I also want to hear your opinion.. I was also confused, I use a mix of all the above.

  • How do I change what the document automatically puts for my preamble?
    by Rainofrisk on December 3, 2026 at 9:42 pm

    I’m using Overleaf to learn LaTeX while taking notes, and whenever I create a new “blank” document it automatically includes a title, author name, and introduction section header. I have no use for these, so i simply delete them and add my preamble — so, my question is how can I change what it automatically inserts when I create a new document? It’s a little inconvenient.

  • How can I use the fraktura font from kpfonts without changing other fonts?
    by kaba on December 3, 2026 at 12:19 pm

    The following code \documentclass[a4paper,12pt]{article} \usepackage[T1]{fontenc} \usepackage{amssymb} \begin{document} $\mathfrak{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ $\mathfrak{abcdefghijklmnopqrstuvwxyz}$ \end{document} results in I have trouble reading many of these characters, among them A, G, O, Q, S, V, Y, k, x, y, z. In addition, k and t look almost the same: I would like to use the fraktura font from the kpfonts package: \documentclass[a4paper,12pt]{article} \usepackage[T1]{fontenc} \usepackage{kpfonts} \begin{document} $\mathfrak{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ $\mathfrak{abcdefghijklmnopqrstuvwxyz}$ \end{document} which produces All of these symbols are very clear. However, I don't want to change any other symbols apart from the fraktura symbols. How can I use the fraktura font from kpfonts without changing any other fonts?

  • How to solve the error \__dim_eval_end: tabularray [duplicate]
    by GowriSaro on December 3, 2026 at 7:46 am

    Based on my previous post Not sure what is the error, I'm using "tabularray" and now facing another error, which not able to fix as I have little bit knowledge in the package tabularray \documentclass[twocolumn]{article} \usepackage{amsmath} \usepackage{array} \usepackage{xcolor} \usepackage{tabularray} \UseTblrLibrary{booktabs} \begin{document} \begin{table} \caption{Comparison of Results. \label{table4-02601079261512425}} \centering \begin{tblr}{@{} l l l l l l l @{}} \toprule {Study} & {} & \SetCell[c=4]{l} Previous studies \\ {} & {Present\break study ({\%})} & {Rosengart\break et al. ({\%})} & {Haucap and\break Just ({\%})} & {Cipriani\break et al. ({\%})} & \SetCell[c=2]{l} Frey\break 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***\break (\textit{p} {<} .001)} & {−12.68***\break (\textit{p} {<} .001)} & {−18.22***\break (\textit{p} {<} .001)} & \SetCell[c=2]{l} −19.25***\break (\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***\break (\textit{p} {<} .001)} & {−14.34***\break (\textit{p} {<} .001)} & {−15.62***\break (\textit{p} {<} .001)} & \SetCell[c=2]{l} −16.79***\break (\textit{p} {<} .001)\\ \bottomrule \end{tblr} \end{table} \end{document} And the error is: ! Missing number, treated as zero. __dim_eval_end Need your advise please, I'm using xeLaTeX engine

  • Why is \iftrue not working inside a beamer tikzpicture around a scope environment? [duplicate]
    by Jasper on December 3, 2026 at 6:15 am

    Why is \iftrue not working inside a beamer tikzpicture around a scope environment? \documentclass{beamer} \usepackage{tikz} \begin{document} \begin{frame} \begin{tikzpicture} \iftrue \begin{scope} \draw (0,0) circle[radius=1]; \end{scope} \fi \end{tikzpicture} \end{frame} \end{document} ! Incomplete \ifx; all text was ignored after line 9. <inserted text> \fi

  • TikZ errors when defining a drawing inside a LaTeX .sty file
    by MossyParadox on December 2, 2026 at 11:45 pm

    I am trying to modify the package mahjonggame by making the tiles look different. I have been designing the new tiles in a separate LaTeX document using TikZ, then copying the drawing commands into the package's .sty file. I then load the modified .sty file into another LaTeX document to test how the new tile looks. However, I keep encounter errors. For example, I have defined a new tile as follows: \cs_new_protected:cpn { __mhj_face_5z: }{ \draw[rounded corners=8pt, mahnavyblue, line width=2.5mm] (1,1.5) rectangle (0,0); \node at (0,0) {}; \draw[mahnavyblue, line width=1.5mm] (0.15,1.1875) -- (0.3125,1.35); % Top-left \draw[mahnavyblue, line width=1.5mm] (0.85,1.1875) -- (0.6875,1.35); % Top-right \draw[mahnavyblue, line width=1.5mm] (0.15,0.3125) -- (0.3125,0.15); % Bottom-left \draw[mahnavyblue, line width=1.5mm] (0.85,0.3125) -- (0.6875,0.15); % Bottom-right \draw[rounded corners=8pt, mahnavyblue, line width=2.5mm] (0.85,1.35) rectangle (0.15,0.15); \node at (0,0) {}; \draw[mahnavyblue, line width=2.5mm] (0.15,1.10) -- (0.40,1.35); % Top-left \draw[mahnavyblue, line width=2.5mm] (0.85,1.10) -- (0.60,1.35); % Top-right \draw[mahnavyblue, line width=2.5mm] (0.15,0.40) -- (0.40,0.15); % Bottom-left \draw[mahnavyblue, line width=2.5mm] (0.85,0.40) -- (0.60,0.15); % Bottom-right } The drawing looks like this when compiled in the separate LaTeX document. However, when I load the modified .sty file into my test document and compile it, I get errors such as: Package pgfkeys Error: I do not know the key '/tikz/roundedcorners', to which you passed '8pt', and I am going to ignore it. Perhaps you misspelled it. Package pgfkeys Error: I do not know the key '/tikz/linewidth', to which you passed '2.5mm', and I am going to ignore it. Perhaps you misspelled it I have never modified something like this before and cannot figure out what went wrong. My questions are: Why do the spaces in TikZ option names such as rounded corners and line width cause errors when the drawing commands? How can I fix this? Is there a straightforward way to scale the entire drawing down while preserving the relative proportions and positions of all its elements? The current drawing is slightly too large for the tile. Thank you for your kind help. EDIT: add MWE (@jlab) \documentclass{article} \usepackage{mahjonggame} \ExplSyntaxOn \cs_set_protected:cpn { __mhj_face_5z: } { \draw[rounded corners=8pt, mahnavyblue, line width=2.5mm] (1,1.5) rectangle (0,0); \node at (0,0) {}; \draw[mahnavyblue, line width=1.5mm] (0.15,1.1875) -- (0.3125,1.35); % Top-left \draw[mahnavyblue, line width=1.5mm] (0.85,1.1875) -- (0.6875,1.35); % Top-right \draw[mahnavyblue, line width=1.5mm] (0.15,0.3125) -- (0.3125,0.15); % Bottom-left \draw[mahnavyblue, line width=1.5mm] (0.85,0.3125) -- (0.6875,0.15); % Bottom-right \draw[rounded corners=8pt, mahnavyblue, line width=2.5mm] (0.85,1.35) rectangle (0.15,0.15); \node at (0,0) {}; \draw[mahnavyblue, line width=2.5mm] (0.15,1.10) -- (0.40,1.35); % Top-left \draw[mahnavyblue, line width=2.5mm] (0.85,1.10) -- (0.60,1.35); % Top-right \draw[mahnavyblue, line width=2.5mm] (0.15,0.40) -- (0.40,0.15); % Bottom-left \draw[mahnavyblue, line width=2.5mm] (0.85,0.40) -- (0.60,0.15); % Bottom-right } \exp_args:NNc \NewCommandCopy \test { __mhj_face_5z: } \ExplSyntaxOff \begin{document} \begin{tikzpicture} \test \end{tikzpicture} \end{document}

  • luaotfload "font...defines no feature" error message
    by Frisket on December 2, 2026 at 9:20 pm

    I am getting thousands of these messages in my log file (running lualatex): luaotfload | aux : font no 124 (nil) defines no feature for script latn with language eng The font number changes, but it doesn't identify the font by name. How do I find out which font it is referring to, and why a font used for the English language is considered not to have a Latin script? Or perhaps the message has a different meaning. I am using fontspec and loading these fonts (but it happens with anything else I use except omitting them and using CM): \documentclass{article} \usepackage{fontspec} \setmainfont{Alegreya} \setsansfont{Montserrat} \setmonofont{zcoN} \begin{document} x \end{document} Can the messages safely be ignored? Or should I be doing something else?

  • Extracting hyperlink-targets of footnotemarks when using \DocumentMetadata [closed]
    by Stephen on December 2, 2026 at 6:57 pm

    \DocumentMetadata{} \documentclass{article} \usepackage{hyperref} \begin{document} Text.\footnote{first} More text.\footnote[99]{second} Still more text.\footnotemark \footnotetext{third} \end{document} The footnote-links go to footnote*.1, footnote*.3, and footnote*.5. How can I extract those link targets? Background: In a situation \footnotetext{third} does not set any link-anchor, so I need to set it manually to the "footnote*.5". (And compiling, manually looking at the numbers in the pdf-file and then setting the anchors accordingly, is no option for a changing, longer document with recompiles.)

  • Prevent piton to split when using tcolorbox
    by cacamailg on December 2, 2026 at 2:48 pm

    The following code generates a warning Package tcolorbox Warning: The upper box part has become overfull. It seems page/column break is not correctly detected. \documentclass[twocolumn]{article} \usepackage{newtx} % https://tex.stackexchange.com/questions/769104 % https://tex.stackexchange.com/questions/770117 \usepackage{piton} \usepackage{tcolorbox} \tcbuselibrary{breakable} \PitonOptions{% begin-escape=@,end-escape=@, begin-escape-math=$,end-escape-math=$, } \NewPitonEnvironment{algorithm}{O{}} {% \PitonOptions{% tcolorbox, splittable=2, % added option after edit 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} 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 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 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 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 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 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 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 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 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 \begin{figure}[!htpb] \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 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 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 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 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 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 dummy text dummy text dummy text dummy text dummy text dummy text dummy text \end{algorithm} \caption{alg1} \end{figure} 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 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 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 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 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 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 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 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 \pagebreak 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 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 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 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 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 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 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 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 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 \begin{figure}[!htpb] \hbox{% \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 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 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 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 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 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 dummy text dummy text dummy text dummy text dummy text dummy text dummy text \end{algorithm} } \caption{alg2} \end{figure} 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 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 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 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 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 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 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 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{document} I do not need the piton environment to be breakable. So In the second example I added \hbox{} and now it seems to work properly. But a spurious vertical space (\baselineskip ?) is added. If the option splittable=2 is added to piton options in the first example, it also seems to work. But now a break is added where it is not needed. Is the a way to prevent piton environment to split, as in the second example, but without the supirous space? [EDIT] With option splittable=2, it works. I still need to remove the line frame at split, though. But here a question rises... What shall be the proper splittable value? The documentation mentions 4 as a good value.

  • Apply formatting within Piton and still represent line break
    by 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 model
    by 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 dashes
    by 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 \marginnote
    by 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.