• Use `foreach` with the `tcolorbox` library `raster`
    by projetmbc on July 11, 2025 at 10:22 am

    Is there a proper way to make the flowing M(not)WE compile? \documentclass{article} \usepackage{tcolorbox} \tcbuselibrary{raster} \usepackage{mwe} \begin{document} \begin{tcbitemize} \foreach \nb in {a,b,c,a,b,c} { \tcbitem \includegraphics[width=\textwidth]{example-image-\nb} } % \tcbitem \includegraphics[width=\textwidth]{example-image-a} % \tcbitem \includegraphics[width=\textwidth]{example-image-b} % \tcbitem \includegraphics[width=\textwidth]{example-image-c} % \tcbitem \includegraphics[width=\textwidth]{example-image-a} % \tcbitem \includegraphics[width=\textwidth]{example-image-b} % \tcbitem \includegraphics[width=\textwidth]{example-image-c} \end{tcbitemize} \end{document}

  • Decimals and Fractions on a Number line
    by SandyM on July 11, 2025 at 7:08 am

    Question: See the attached figure. I also provided MWE. Can anyone help me to achieve the desirable figure? MWE \documentclass[a4paper,landscape]{article} \usepackage[margin=1in]{geometry} \usepackage{tikz} \begin{document} \large \begin{center} \begin{tikzpicture}[scale=2,>=stealth, every node/.style={align=center,scale=.8}] \draw[black,line width=1pt] (-5,0)--(5,0); \foreach \i in {-5,...,5} \draw[teal] (\i,.1)--(\i,-.1) node[below]{\i}; \end{tikzpicture} \end{center} \end{document}

  • Decoding the mystery calligraphic “I” in Pugh’s Real Mathematical Analysis
    by Sebastiano on July 10, 2025 at 9:22 pm

    Regarding this link with the user's question and comments, I have not understood how to find the way the calligraphic letter I appearing in the text is represented. Other calligraphic fonts are eulervm (or affine). Could someone explain how it is possible to find it? In the PDF "Charles C. Pugh Real Mathematical Analysis Second Edition", the actually used fonts are the following (extracted from the .pdf file on page 443 of Appendix C Borel versus Lebesgue): RmqyxtBqtllcCMTI10 KcdtssWcpjxjCMBX12 RfwtcxGcnxkbMSBM10 JhgbpyShymrhCMMI10 PsknyfYsbdsyCMBX10 BstmcdKkrxmyCMR8 QystycRrkcwkCMSY10 QmxxlkDrkxjrCMSY8 MxrqrnWxqxycCsc PpvjqsGxxmhdCMMI8 NwrxcxSfqsqgCMEX10 XdlxbkFclrycCMR10 should be: CMR = Computer Modern Roman CMBX = Computer Modern Bold Extended CMMI = Computer Modern Math Italic CMSY = Computer Modern Symbol CMTI = Computer Modern Text Italic CMEX = Computer Modern Extension (large math symbols) MSBM = AMS Math Symbol B CMR8 = Computer Modern Roman (8pt size). I have researched all possible sites to identify the font, even pasting the character into a Word document. It doesn’t appear in the PDF metadata, but from the unknown source, it seems that the font might be MxrqrnWxqxycCsc. I think that an XeLaTeX/LuaLaTeX engine is used for this special "I".

  • How to vertically glue two tcolorboxes?
    by Colas on July 10, 2025 at 8:12 pm

    I would like to have two tcolorboxes exactly one above the other, without any vertical space between them. How can I achieve that? Here is a MWE. \documentclass{article} \usepackage[most]{tcolorbox} \newtcolorbox{box1}{colback = red, center} \newtcolorbox{box2}{colback = blue, center} \begin{document} \begin{box1} First box \end{box1} \begin{box2} Second box \end{box2} \end{document}

  • How to vertically center a rotated cell across two rows in a LaTeX table?
    by Andy R on July 10, 2025 at 1:19 pm

    I’m trying to format a table in LaTeX where one of the headers, "Header B", spans two rows and is rotated vertically using \rotatebox. I’d like this label to be centered vertically across the two rows, but I can’t get it to align properly. Here’s a minimal example of my table: \documentclass{article} \usepackage{multirow} \usepackage{tcolorbox} \begin{document} \begin{table}[h] \caption{Some caption\label{tab:sample}} \scalebox{1}{\centering \begin{tabular}{|l|l|l|l|l|} \cline{3-5} \multicolumn{2}{c|}{} & \multicolumn{3}{c|}{Header A} \\ \cline{3-5} \multicolumn{2}{c|}{} & Type A & Type B & Type C \\ \hline \multirow{2}{*}{\rotatebox[origin=c]{90}{Header B}} & \rotatebox[origin=c]{90}{Option 1} & \begin{tabular}[c]{@{}l@{}}\vspace{2mm}\\- Item 1 \\ - Item 2 \\ - Item 3 \\\vspace{2mm}\end{tabular} & \begin{tabular}[c]{@{}l@{}}\vspace{2mm}\\- Item 4 \\ - Item 5 \\ - Item 6 \\\vspace{2mm}\end{tabular} & \begin{tabular}[c]{@{}l@{}}\vspace{2mm}\\- Item 7 \\ - Item 8 \\ - Item 9 \\\vspace{2mm}\end{tabular} \\ \cline{2-5} & \rotatebox[origin=c]{90}{Option 2} & \begin{tabular}[c]{@{}l@{}}\vspace{2mm}\\- Item 10 \\ - Item 11 \\\vspace{2mm}\end{tabular} & \begin{tabular}[c]{@{}l@{}}\vspace{2mm}\\- Item 12 \\\vspace{2mm}\end{tabular} & \begin{tabular}[c]{@{}l@{}}\vspace{2mm}\\- Item 13 \\ - Item 14 \\ - Item 15 \\\vspace{2mm} \end{tabular} \\ \hline \end{tabular}} \end{table} \end{document} Does anyone know how I can properly center the rotated "Header B" text across the two rows? Thanks in advance!

  • Draw illustration (cylindric)
    by Alex on July 10, 2025 at 1:08 pm

    I have a such image And I try to draw this in Tikz, and have some troubles: how to set the correct viewing angle (as in the picture) for set the correct position of the plane at an angle of $2pi/3$? \documentclass[tikz,border=3.14mm]{standalone} \usepackage{amssymb} \usepackage{amsmath,amsthm} %\pdfpkresolution=2400 %\pdfpkmode={supre} %\usepackage[exscale]{ccfonts} \usepackage{tempora} \usepackage{newtxmath} \usepackage{tikz} \usepackage{pgfplots} \usepackage{tikz} \usepackage{tikz-cd} \usetikzlibrary{ arrows, matrix, arrows.meta, backgrounds, fit, matrix, positioning, calc, patterns, arrows.meta, graphs, shapes.misc, shadows.blur, shapes.geometric, decorations.pathmorphing } \newcommand{\myunit}{1 cm} \tikzset{ node style sp/.style={draw,circle,minimum size=\myunit}, node style ge/.style={circle,minimum size=\myunit}, arrow style mul/.style={draw,sloped,midway,fill=white}, arrow style plus/.style={midway,sloped,fill=white}, } \pgfplotsset{compat=1.18} \usepackage{tikz,tikz-3dplot} \begin{document} \tdplotsetmaincoords{70}{110} \begin{tikzpicture}[tdplot_main_coords,scale=0.8] \tikzstyle{every node}=[font=\small] % Define parameters \def\R{2.5} \def\zheight{4} \def\zbottom{-2.5} \def\phiangle{60} % Draw the complete cylinder (from bottom to top) % Bottom circle (hidden, at z = zbottom) \draw[thick,dashed] (0,0,\zbottom) circle (\R); % Circle at z = 0 \draw[thick] (0,0,0) circle (\R); % Top circle at z = z₀ \draw[thick] (0,0,\zheight) circle (\R); % Cylinder sides (visible parts) \draw[thick] (\R,0,\zbottom) -- (\R,0,\zheight); \draw[thick] (-\R,0,\zbottom) -- (-\R,0,\zheight); % Dashed lines for hidden parts \draw[thick,dashed] (0,\R,\zbottom) -- (0,\R,\zheight); \draw[thick,dashed] (0,-\R,\zbottom) -- (0,-\R,\zheight); % Draw coordinate planes % z = 0 plane (gray, transparent) \filldraw[fill=gray!20, draw=gray, opacity=0.3] (-4,-4,0) -- (4,-4,0) -- (4,4,0) -- (-4,4,0) -- cycle; % z = z₀ plane (gray, transparent) \filldraw[fill=gray!20, draw=gray, opacity=0.3] (-4,-4,\zheight) -- (4,-4,\zheight) -- (4,4,\zheight) -- (-4,4,\zheight) -- cycle; % φ = 2π/3 plane \tdplotsetrotatedcoords{0}{0}{\phiangle} \begin{scope}[tdplot_rotated_coords] \filldraw[fill=gray!10, draw=gray, opacity=0.4] (0,0,0) -- (4,0,0) -- (4,0,\zheight) -- (0,0,\zheight) -- cycle; \end{scope} % Mark important points and labels \node at (0,0,0) [below left] {$O$}; \node at (3.5,0,0) [below] {$\varphi_0$}; \node at (0,0,\zheight) [left] {$z = z_0$}; \node at (0,0,-0.3) [below] {$z = 0$}; \node at (\R,0,2) [right] {$r = R$}; % Draw angle arc for φ₀ = 2π/3 \tdplotdrawarc[thick,->]{(0,0,0)}{1.5}{0}{\phiangle}{anchor=north}{$\varphi_0 = \varphi = \frac{2\pi}{3}$} % Draw radial line \draw[thick] (0,0,0) -- ({\R*cos(\phiangle)},{\R*sin(\phiangle)},0); % Add "2" label inside cylinder \node at (0,0,2) [font=\large] {$2$}; % Add dimensional indicators \draw[<->] (\R+0.5,0,0) -- (\R+0.5,0,\zheight) node[midway,right] {$z_0$}; \draw[<->] (0,0,-0.7) -- (\R,0,-0.7) node[midway,below] {$R$}; % Mark the cylinder boundary at z = z₀ \draw[thick] (0,0,\zheight) circle (\R); % Draw dashed construction lines \draw[dashed] (0,0,\zbottom) -- ({\R*cos(\phiangle)},{\R*sin(\phiangle)},\zbottom); \draw[dashed] (0,0,0) -- ({\R*cos(\phiangle)},{\R*sin(\phiangle)},0); \draw[dashed] (0,0,\zheight) -- ({\R*cos(\phiangle)},{\R*sin(\phiangle)},\zheight); \draw[dashed] ({\R*cos(\phiangle)},{\R*sin(\phiangle)},\zbottom) -- ({\R*cos(\phiangle)},{\R*sin(\phiangle)},\zheight); % Draw coordinate axes (on top, black) \draw[thick,-latex] (0,0,0) -- (5,0,0) node[anchor=north east]{$x$}; \draw[thick,-latex] (0,0,0) -- (0,5,0) node[anchor=north west]{$y$}; \draw[thick,-latex] (0,0,\zbottom-0.5) -- (0,0,5) node[anchor=south]{$z$}; \end{tikzpicture} \end{document} Current result:

  • I can't find this symbol (looks like a T)
    by user314271 on July 10, 2025 at 3:13 am

    I wanted to write the following equation: However, I wasn't able to find the symbol just after the = sign (shown inside the red rectangle in the figure below). I've searched through Detexify and the Comprehensive LaTeX symbols list.

  • \enlargethispage and memoir
    by Victor on July 9, 2025 at 9:50 pm

    I noticed that my memoir class documents containing \enlargethispage began to roduce an error. Few months ago it was not the case. Minimal example \documentclass{memoir} \begin{document} test \enlargethispage{\baselineskip} test \end{document} I have TeXLive 2025 fully updated. From log ./Untitled-2.tex:10: Undefined control sequence. \m@m@makecoltext ...kludgeins \@makespecialcolbox \else \setbox \@outputbox ... l.10 \end{document}

  • Bad subscript typesetting with IBM Plex
    by Karol Szumiło on July 9, 2025 at 2:23 pm

    The code \documentclass{article} \usepackage{unicode-math} \setmathfont{IBM Plex Math} \begin{document} $F_0$, $P_0$, $V_0$ \end{document} produces output with the subscripts much too close to the characters. This happens to various extents with some glyphs, but F, P and V stand out as quite bad. Is this a problem with LuaTeX or with the font itself? How could this be fixed?

  • How to reduce colorbox height?
    by Bart on July 9, 2025 at 12:04 pm

    I would like to reduce both the width and height of the colorbox around e.g. the number 0 in $0$ to a minimal size, that is, such that it is just large enough to contain the symbol 0. This I would want to work inside math environments. The same I would like to be able to do with other numbers. Using Martin Scharrer's answer I managed to reduce the width. A similar reduction I would like to achieve for the height. How would I do this? I've seen plenty of solutions to increase or outline the colorbox height, but none to reduce it. Here is a minimal working example: \documentclass{article} \usepackage{color} \usepackage{adjustbox} \begin{document} The box around $\colorbox{yellow}{0}$ is rather wide and long. % Reduction of the width using Martin Scharrer's solution: \newcommand{\mycolorbox}[2][0pt]{\adjustbox{margin=#1 {\fboxsep},bgcolor=#2}} The box around $\mycolorbox{yellow}{0}$ is no longer too wide but still rather long. \end{document}

  • LaTeX jumps to the wrong definition in the wrong chapter
    by msrd0 on July 9, 2025 at 6:41 am

    I'm using XeLaTeX and have an amsthm-environment called definition which uses a per-chapter counter. It seems that LaTeX forgets to include the chapter counter when generating xdv files, as xdvipdfmx complains about Object @definition.1 already defined. This is a minimal example: \documentclass[a6paper, landscape, 12pt, hidelinks]{report} \usepackage[british]{babel} \usepackage{amsthm, thmtools} \usepackage[pdfusetitle]{hyperref} \newtheorem{theorem}{Theorem}[chapter] \newtheorem{definition}[theorem]{Definition} \begin{document} \chapter{First Chapter} \begin{definition} \label{def:first} First Definition \end{definition} \chapter{Second Chapter} \begin{definition} \label{def:second} Second Definition \end{definition} \chapter{Third Chapter} See \autoref{def:second}. \end{document} When you click the link on the 3rd page, it jumps to the definition in chapter 1, eventhough it is supposed to jump to the definition in chapter 2. This is likely due to xdvipdfmx ignoring the redefinition of @definition.1. Even if it didn't, reusing the same label seems like a bad idea. How do I tell XeLaTeX to not do that?

  • How to invert a mask in a drawing
    by crayman9 on July 9, 2025 at 3:44 am

    Here is an example latex tikzpicture axis plot where I've clipped the upper right quadrant of a circle. How can I invert this? That is, rather than display only the upper right quadrant, display everything but the upper right quadrant. \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} \begin{axis}[ axis equal, xmin=-1.5, xmax=1.5, ymin=-1.5, ymax=1.5, grid=both, minor tick num=2, ] \pgfplotsextra{% \clip (axis cs:0,0) rectangle (axis cs:1.5,1.5); } \fill [red] (0,0) circle (1); \end{axis} \end{tikzpicture} \end{document}

  • How to correct column widths: 50% 25% 25% in tabular & tabularray
    by Youra_P on July 8, 2025 at 2:52 pm

    I looked at the examples. There are links to them in MWE. If you measure with a ruler, only the first example is correct! How to fix the other examples. MWE: % !TeX program = pdflatex % !TeX encoding = utf-8 %========================== % source link % https://tex.stackexchange.com/questions/84400/table-layout-with-tabularx-column-widths-502525 % https://tex.stackexchange.com/questions/350621/tabularx-using-x-aligment-with-varying-sizes?noredirect=1&lq=1 % https://tex.stackexchange.com/questions/350621/tabularx-using-x-aligment-with-varying-sizes?noredirect=1&lq=1 %========================== \documentclass{article} \usepackage[showframe]{geometry} \usepackage{array} %-------------------------- \newdimen\NetTableWidth %-------------------------- \usepackage{tabularray} %-------------------------- % The available space is \textwidth % minus twice the number of columns \tabcolsep spaces % minus one more than the number of columns \arrayrulewidth % % The first two arguments to P are numerator and denominator % and the third argument is the number of columns % In this case the fractions are 4/6, 1/6 and 1/6 \newcolumntype{P}[3]{% p{#1\dimexpr( \textwidth- \tabcolsep*\numexpr2*#3\relax- \arrayrulewidth*\numexpr#3+1\relax )/#2% }% } %-------------------------- \begin{document} %-------------------------- \centerline{\bf tabular v.1 (correct)} \noindent \begin{tabular}{ |p{\dimexpr.5\linewidth-2\tabcolsep-1.3333\arrayrulewidth}|% column 50% p{\dimexpr.25\linewidth-2\tabcolsep-1.3333\arrayrulewidth}|% column 25% p{\dimexpr.25\linewidth-2\tabcolsep-1.3333\arrayrulewidth}|% column 25% } \hline \centering Alpha & \centering Beta & \centering\arraybackslash Gamma \\ \hline 0 & 2 & 4 \\ \hline 1 & 3 & 5 \\ \hline \end{tabular} %-------------------------- \centerline{\bf tabular v.2 (not correct)} %-------------------------- \noindent \NetTableWidth=\dimexpr \linewidth - 6\tabcolsep - 4\arrayrulewidth % if package array is loaded \relax \begin{tabular}{% |p{.5\NetTableWidth}|% p{.25\NetTableWidth}|% p{.25\NetTableWidth}|% } \hline Alpha & Beta & Gamma \\ \hline 0 & 2 & 4 \\ \hline 1 & 3 & 5 \\ \hline \end{tabular} %-------------------------- \centerline{\bf tabular v.3 (not correct)} %-------------------------- \noindent \begin{tabular}{|P{1}{2}{3}|P{1}{4}{3}|P{1}{4}{3}|} \hline Alpha & Beta & Gamma \\ \hline 0 & 2 & 4 \\ \hline 1 & 3 & 5 \\ \hline \end{tabular} %-------------------------- \centerline{\bf tabularray (not correct)} %-------------------------- \noindent \begin{tblr}{ colspec={|X[2]|X|X|}, row{1} = {c}, hlines} Alpha & Beta & Gamma \\ 0 & 2 & 4 \\ 1 & 3 & 5 \\ \end{tblr} \end{document}

  • Slightly customized appendix numbering
    by Hauke Reddmann on July 8, 2025 at 12:52 pm

    \documentclass[10pt,a4paper,envcountsect]{llncs} \begin{document} \section{Introduction} BLA \subsection{sub} SUB \appendix \section{Appendix} BLA \section{Asec} ASEC \subsection{Asub} ASUB \end{document} This surely was asked before, but I couldn't find it. Standard setup for an appendix with letter numbering. There is only one slight nuisance: The A,B,C numbered thingies are sections, and logic (and collapse button in my PDF reader) would prefer that Appendix itself is a section (nr.2 here) and the thingies are subsections. Some \renewcommand should do the trick, but \renewcommand{\thesubsection}{\Alph{section}} after \appendix is a close miss. Can you debug the code? The output should look like... 1. Intro 1.1 bla 2. Appendix A foo B bar with Intro/Appendix being a section and bla/foo/bar subsections?

  • Adding annotations to polynomial long division using tikz
    by Damitr on July 8, 2025 at 12:26 pm

    I am typesetting a polynomial long division using polynom. I would like to add text annotations as shown in the figure. Right now I have manually adjusted the tikz nodes to approximately align where I want them after a bit of trial and error for each node. But is there a way to automagically to do this. As for other divisions I would have to manually adjust all 4 of them. MWE \documentclass{article} \usepackage{polynom} \usepackage{tikz} \begin{document} \begin{tikzpicture}[remember picture,overlay] \node at (0,0) { \polylongdiv[vars=a]{8a^3 + 16a^2 - 2a + 4}{4a^2 -2a +1} }; \node[anchor=west] at (-2,1.25) {Divisor}; \node[anchor=west] at (3.7,0.7) {Dividend}; \node[anchor=west] at (2,1.8) {Quotient}; \node[anchor=west] at (3.7,-1.2) {Remainder}; \end{tikzpicture} \end{document}

  • Updating KOMA-Script options in LaTeX template
    by Kendall on July 8, 2025 at 9:36 am

    Manuel Kuehner made a really great thesis template which can be found here which uses scrbook, scrlayer-scrpage, scrhack etc. However, since the template was provided a lot of the commands have become depreciated. For example \clearscrheadfoot \setheadwidth[0pt]{textwithmarginpar} \setheadsepline{0.4pt} \setfootwidth[0pt]{text} \setfootsepline[text]{0pt} Which I believe must now be included in KOMAoptions? So after reading through the documentation I thought the correct route to follow would be to do the follows \KOMAoptions{ headwidth=textwithmarginpar, footwidth=text, headsepline=true, footsepline=false } \renewcommand{\headsepline}{\rule{\textwidth}{0.4pt}} But this appears to generate even more errors. Now Dr. Kuehner has split the pagelayout and KOMA settings over multiple .tex files which makes adding a MWE to this page a bit difficult to replicate the problem. I have a feeling the errors are caused by the order in which the commands are called. My question is, does anyone have a guide on how to update the depreciated version of KOMA to run with the new version? Following the current documentation appears to be a bit tricky. Any advice would be appreciated. EDIT: MWE as suggested by @cfr %From documentclass.tex \documentclass[% paper=a4, fontsize=11pt, % common are 10, 11 or 12 headings=big, appendixprefix=true, % Adds letter in front of appendix sections etc and automatically adds 'Appenix A' as chapter heading numbers=noendperiod, % 2.3.1 vs 2.3.1. (no dot after the last chapter number) twoside=true, toc=bibliography, % Bibliography appears in Table of Contents (without a number) toc=listof, % List of Figures and List of Tables appear in Table of Contents parskip=half % No indentation of paragraphs with a space between ]{scrbook} % From KOMA-Script-Packages.tex \usepackage{scrhack} \usepackage{marginnote} \usepackage[% automark ,ilines ,headsepline ,footsepline ]{scrlayer-scrpage} % From PageLayout.tex \usepackage{geometry} \geometry{% siehe geometry.pdf (Figure 1) bottom=30mm, showframe=false, % For debugging: try true and see the layout frames margin=30mm, marginparsep=3mm, marginparwidth=20mm } % from CommonPackages.tex \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage[ngerman,american]{babel} \usepackage{calc} \usepackage{graphicx} \usepackage{float} \usepackage[dvipsnames]{xcolor} \usepackage{amsmath} \usepackage{booktabs} \usepackage{lipsum} \usepackage{ragged2e} \usepackage{pgfplots} \pgfplotsset{compat=1.11} \usepackage[backend=biber, %% using "biber" to compile references (instead of "biblatex") style=numeric, %% see biblatex documentation %style=alphabetic, %% see biblatex documentation %dashed=\mybiblatexdashed, %% do *not* replace recurring reference authors with a dash %backref=\mybiblatexbackref, %% create backlings from references to citations natbib=true, %% offering natbib-compatible commands hyperref=true, %% using hyperref-package references ]{biblatex} %% remove, if using BibTeX instead of biblatex \addbibresource{references.bib} %% remove, if using BibTeX instead of biblatex \usepackage{physics} \usepackage{tikz} \usetikzlibrary{patterns,decorations.pathmorphing,calligraphy} \usetikzlibrary{decorations.markings} \usetikzlibrary{arrows.meta} \usetikzlibrary{calc} \tikzset{>=latex} \tikzstyle{vvec}=[->,very thick,black,line cap=round] \usepackage{environ} \makeatletter \newsavebox{\measure@tikzpicture} \NewEnviron{scaletikzpicturetowidth}[1]{% \def\tikz@width{#1}% \def\tikzscale{1}\begin{lrbox}{\measure@tikzpicture}% \BODY \end{lrbox}% \pgfmathparse{#1/\wd\measure@tikzpicture}% \edef\tikzscale{\pgfmathresult}% \BODY } \makeatother % From Floating-AND-TOC....tex \setcounter{secnumdepth}{5} \setcounter{tocdepth}{5} \makeatletter \addtokomafont{chapterentrypagenumber}{\color{myColorMainA}} \addtokomafont{chapterentry}{\color{myColorMainA}} \makeatother \usepackage[% font={small}, labelfont={bf,sf}, format=hang, % try plain or hang margin=5pt, ]{caption} \addtokomafont{chapter}{\color{myColorMainA}} \addtokomafont{section}{\color{myColorMainA}} \addtokomafont{subsection}{\color{myColorMainA}} \addtokomafont{subsubsection}{\color{myColorMainA}} \addtokomafont{paragraph}{\color{myColorMainA}} \addtokomafont{subparagraph}{\color{myColorMainA}} % From HeaderFooterMarginnote.tex \newcommand{\myMarginnote}[1]{% \marginnote{% needs marginnote package \ifthispageodd{\RaggedRight}{\RaggedLeft}% needs ragged2e package \color{myColorMainB}% \lineskiplimit=-\maxdimen% \normalfont\sffamily\scriptsize% #1}% } \setkomafont{pageheadfoot}{% \normalfont\sffamily\bfseries } \setkomafont{pagefoot}{% \normalfont\sffamily } \setkomafont{pagenumber}{% \normalfont\rmfamily } % % Define width of header % \setheadwidth[0pt]{textwithmarginpar} % % Define with of header line % \setheadsepline{0.4pt} % % Define width of footer % \setfootwidth[0pt]{text} % % Define with of footer line (here: no line) % \setfootsepline[text]{0pt} %%%% --- my attempt at fix \KOMAoptions{ headwidth=textwithmarginpar, footwidth=text, headsepline=true, footsepline=false } \renewcommand{\headsepline}{\rule{\textwidth}{0.4pt}} \newlength{\myLenghthFootAbstand} \setlength{\myLenghthFootAbstand}{\paperheight-1in-\topmargin- \headheight-\headsep-\textheight-\footskip} \newlength{\myLenghthTemp} \setlength{\myLenghthTemp}{\myLenghthFootAbstand+\baselineskip} \clearpairofpagestyles % Header \ohead{% \textcolor{myColorMainA}{\headmark} } % Left (even page numbers) footer \lefoot% [% scrplain style (begin) \setlength{\unitlength}{\myLenghthFootAbstand}% \begin{picture}(0,0)% \put(0,-1)% {% \makebox(0,0)[lb]% {% \rule{0.4pt}{\myLenghthTemp}% }% }% \end{picture}\llap{\pagemark~}% ]% scrplain style (end) % {% scrheadings style (begin) \setlength{\unitlength}{\myLenghthFootAbstand}% \begin{picture}(0,0)% \put(0,-1)% {% \makebox(0,0)[lb]% {% \rule{0.4pt}{\myLenghthTemp}% }% }% \end{picture}\llap{\pagemark~}% }% scrheadings style (end) % Right (odd page numbers) footer \rofoot% [% scrplain style (begin) \rlap{~\pagemark}%% \setlength{\unitlength}{\myLenghthFootAbstand}% \begin{picture}(0,0)% \put(0,-1)% {% \makebox(0,0)[lb]% {% \rule{0.4pt}{\myLenghthTemp}% }% }% \end{picture}% ]% scrplain style (end) % {% scrplain style (begin) \rlap{~\pagemark}%% \setlength{\unitlength}{\myLenghthFootAbstand}% \begin{picture}(0,0)% \put(0,-1)% {% \makebox(0,0)[lb]% {% \rule{0.4pt}{\myLenghthTemp}% }% }% \end{picture}% }% scrplain style (end) % From ParagraphOptimisation.tex \tolerance 1414 \hbadness 1414 \emergencystretch 1.5em \hfuzz 0.3pt \widowpenalty=10000 \vfuzz \hfuzz \raggedbottom % From PDF-Related.tex \usepackage[% bookmarks, % Create bookmarks bookmarksopen=true, % Unfold bookmatk tree in PDF viewer when document is opened bookmarksopenlevel=1, % Level of unfolding bookmarksnumbered=true, % Number bookmarks hidelinks, % do not highlight hyperlinks -- looks ugly % Ansicht beim Öffnen pdfpagelabels=true, % See manual... plainpages=false, % See manual... hyperfootnotes=true, % Hyperlinks for footnotes hyperindex=true, % Indexeinträage verweisen auf Text ]{hyperref} % Smart referencing of equations, must be loaded after hyperref \usepackage{cleveref} % From RandomTextPackage.tex \usepackage[]{blindtext} \renewcommand{\blindmarkup}[1]{\myMarginnote{#1}} % From MainFile.tex I commented out the inputs as I have explicitly pasted them above % \input{01_Preamble/documentclass.tex} % \input{01_Preamble/KOMA-Script-Packages.tex} % \input{01_Preamble/PageLayout.tex} % \input{01_Preamble/CommonPackages.tex} \definecolor[named]{myColorMainA}{RGB}{0,26,153} \definecolor[named]{myColorMainB}{RGB}{218,165,32} % \input{01_Preamble/Floating-AND-TOC-AND-ListOf-AND-Headings.tex} % \input{01_Preamble/HeaderFooterMarginnote.tex} % \input{01_Preamble/ParagraphOptimisation.tex} % \input{01_Preamble/PDF-Related.tex} % \input{01_Preamble/RandomTextPackage.tex} \newcommand*\varhrulefill[1][0.4pt]{\leavevmode\leaders\hrule height#1\hfill\kern0pt} % \newenvironment{nscenter} {\parskip=5pt\par\nopagebreak\centering} {\par\noindent\ignorespacesafterend} \begin{document} %\input{02_Chapters/TitlePage.tex} \cleardoublepage \pagestyle{scrheadings} \pagenumbering{roman} \setcounter{page}{1} \pagenumbering{arabic} % input other chapters as well as handle bibliography \end{document}

  • I need to make a very large diagram smaller [duplicate]
    by the topological beast on July 7, 2025 at 11:06 pm

    I am trying to create this diagram in LaTeX, but when I compile it, it doesn’t fit on the page. I don’t know how to make it smaller. I tried using scalebox, but it didn’t compile. I’m not sure what to do. \documentclass{article} \usepackage{amsmath} \usepackage{tikz-cd} \usepackage{graphicx} \newcommand{\nd}[1]{\begin{smallmatrix}#1\end{smallmatrix}} \begin{document} $$ \begin{tikzcd}[sep={1.1em}] % Nivel 1 (15 columnas) & \nd{P_{4}} \arrow[rd] & & \nd{\tau^{-1}(P_4)} \arrow[rd] & & \nd{\tau^{-2}(P_4)} \arrow[rd] & & \nd{M_2} \arrow[rd] & & \nd{\tau^{2}(I_4)} \arrow[rd] & & \nd{\tau(I_4)} \arrow[rd] & & \nd{I_4} & \\ % Nivel 2 \nd{P_3} \arrow[ru] \arrow[rd] \arrow[r] & \nd{P_2} \arrow[r] & \nd{\tau^{-1}(P_3)} \arrow[ru] \arrow[rd] \arrow[r] & \nd{\tau^{-1}(P_2)} \arrow[r] & \nd{\tau^{-2}(P_3)} \arrow[ru] \arrow[rd] \arrow[r] & \nd{\tau^{-2}(P_2)} \arrow[r] & \nd{\tau^{-3}(P_3)} \arrow[ru] \arrow[rd] \arrow[r] & \nd{\tau^{-3}(P_2)} \arrow[r] & \nd{\tau^{-4}(P_3)} \arrow[ru] \arrow[rd] \arrow[r] & \nd{\tau^{-4}(P_2)} \arrow[r] & \nd{\tau^{-5}(P_3)} \arrow[ru] \arrow[rd] \arrow[r] & \nd{\tau^{-5}(P_2)} \arrow[r] & \nd{\tau^{-6}(P_3)} \arrow[ru] \arrow[rd] \arrow[r] & \nd{\tau^{-6}(P_2)} \arrow[r] & \nd{I_3} \\ % Nivel 3 & \nd{P_6} \arrow[ru] & & \nd{\tau^{-1}(P_6)} \arrow[ru] & & \nd{\tau^{-2}(P_6)} \arrow[ru] & & \nd{\tau^{-3}(P_6)} \arrow[ru] & & \nd{\tau^{-4}(P_6)} \arrow[ru] & & \nd{\tau^{-5}(P_6)} \arrow[ru] & & \nd{I_5} & \end{tikzcd} $$ \end{document} This is my text:

  • Create string expansion in a single command
    by Æzor Æhai -him- on July 7, 2025 at 7:20 pm

    I am uncertain of what terms to search for to ask this question, but my goal is something along these lines: \documentclass{article} [\mycommand definition] \begin{document} 1: \mycommand{a,b} 2: \mycommand{b} 3: \mycommand{c,a} \end{document} produces: 1: Alpha, beta 2: Beta 3: Alpha, gamma Preferably, the expanded strings are generated in a defined order, e.g. a always precedes b, etc., as in #3, but not a strict requirement if the complexity trade-offs are too high. (Also, the would be nice if the first character was capitalized.)

  • Draw variable curves in Tikz
    by liuzp on July 7, 2025 at 6:18 pm

    I'm trying to build a sample code that is able to reproduce the same curve multiple times, since I want to use it a few times but don't want to rewrite the full code every time. So, what I would like to define is a new square/.style curve that accepts two parameters #1 and #2, where #1 is a color and #2 is a number. From that it then draws a square colored #1 and with size #2, with black lines and grid on every unit interval up to #2. I tried the code bellow, but obviously it's missing the color part, and the grid part, while also not rendering the desired square. \tikzset{ square/.style args={1}{insert path={ (#1,0) -- (0,0) -- (0,#1) -- (#1,#1) -- cycle }} } Can you please, help me with this line of code? In a following matter, I would also like to define some cubes, is this possible in the same fashion way? Edit: I'm sorry if the question was unclear, I was lacking the proper vocabulary on the time, and could not explain in details what I wanted to do, but after your comments I think I can be. What I want to build is a tikz macro that can reproduce the drawing bellow passed the size and color As one can see, we have 3 progressive examples of grided and shaded squares, a 1x1 light blue square, a 2x2 light yellow square, and 3x3 light red square, that can be extended to an $$n \cross n$$ square of any color. As for the M (not) WE, what I can provide is this similar context of the whole document that spams dozens of other packages and features, and personal information. \documentclass[margin=5mm, varwidth]{standalone} \usepackage{tikz} \usepackage{multicol} \usetikzlibrary{ 3d, perspective, positioning, calc, arrows.meta, shapes } \tikzset{>={Stealth}} \tikzset{ square/.style args={1}{insert path={ (#1,0) -- (0,0) -- (0,#1) -- (#1,#1) -- cycle }} } \begin{document} \begin{enumerate} \item Item 1 \item Item 2 \begin{multicols}{3} \begin{enumerate} \item \tikz{\draw[style/.expanded=square 2]} \item Square 2 \item Square 3 \end{enumerate} \end{multicols} \item Item 3 \end{enumerate} \end{document} As for the cube case, I think that @cfr response should be sufficient for my purposes. Thanks in advance for all of your help.

  • Tcolorbox with boundary box with shaded
    by Rajesh TeXnicians on July 7, 2025 at 3:55 pm

    I'm looking to create a specific box structure in LaTeX using tcolorbox: I need an inner boundary box to be enclosed by an outer, shaded box. I have attached images (or can attach them) that illustrate the desired nested box structure. Any help with the LaTeX code would be greatly appreciated! Please find MWE file: \documentclass{article} \usepackage{blindtext} \usepackage[most]{tcolorbox} \usetikzlibrary{shapes.geometric,calc,backgrounds} \newlength{\internalshift} \setlength{\internalshift}{10pt} \pgfdeclarelayer{background rounded rect} \pgfsetlayers{background rounded rect,main} \tcbset{% innerboxcolback/.colorlet=tcbcol@innerback, outerboxcolback/.colorlet=tcbcol@outerback, outerboxcolframe/.colorlet=tcbcol@outerboxframe, innerboxcolback=gray!40, outerboxcolback=gray!20, outerboxcolframe=blue, } \makeatletter \newtcolorbox{curvedbox}[1][]{% enhanced, breakable, colback=black!20, colframe=green, innerboxcolback=gray!90, arc=\internalshift, auto outer arc, interior hidden, frame hidden, attach boxed title to top center, boxed title style={colback=tcbcol@outerback,enhanced,frame hidden}, coltitle=black, title={Title}, underlay={% Drawing the blue \begin{pgfonlayer}{background rounded rect} \draw[tcbcol@outerboxfrmame, line width=0.5pt, fill=tcbcol@outerback,rounded corners=1.5\internalshift] ($(frame.north west) + (0pt,1\internalshift)$) rectangle ($(frame.south east) - (0pt,\internalshift)$); \draw[tcbcol@outerboxframe, line width=0.5pt,fill=tcbcol@outerback,rounded corners=1.5\internalshift] ($(frame.north west) - (0.5\internalshift,0.5\internalshift)$) rectangle ($(frame.south east) + (0.5\internalshift,0.5\internalshift)$); \end{pgfonlayer} },% End of underlay % Now the yellow box underlay if the box is unbroken underlay unbroken={\draw[line width=1.5pt, fill=tcbcol@innerback,rounded corners=\kvtcb@arc] (frame.north west) rectangle (frame.south east);}, % Now the yellow box underlay if the box is broken, provide rounded rectangles for the first at the bottom and for the middle and last on the top. underlay first={\draw[line width=1.5pt, fill=tcbcol@innerback,rounded corners=\kvtcb@arc] (frame.north west) rectangle (frame.south east);}, underlay middle and last={\draw[line width=1.5pt, fill=tcbcol@innerback,rounded corners=\kvtcb@arc] (frame.north west) rectangle (frame.south east);}, #1 } \makeatother \begin{document} \begin{curvedbox} \blindtext[10] \end{curvedbox} \end{document}

  • Wrap mdframed *inside* floats
    by Jellby on July 7, 2025 at 8:59 am

    Is there some easy way to automatically wrap and mdframed environment inside all floats? Something like \surroundwithmdframed but the other way around. Sample document: \documentclass{article} \usepackage[demo]{graphicx} \usepackage{mdframed} \begin{document} \begin{figure} \begin{mdframed} % I'd like to skip this \includegraphics{foo} \caption{Lorem ipsum} \end{mdframed} % and this \end{figure} \end{document} Edit: Ultimately, I want to set a background color for figures and tables, including their caption. And I'd like it to work with the achemso package, that sets the table captions above the float. So this is a better test document: \documentclass[demo]{achemso} \usepackage{mdframed} \title{Test} \begin{document} Ipsum lorem \begin{figure}[h] \begin{mdframed} % I'd like to skip this \includegraphics[]{foo} \caption{Lorem ipsum} \end{mdframed} % and this \end{figure} \begin{table}[b] \begin{mdframed} % I'd like to skip this \begin{tabular}{cc} A & 1\\ B & 2\\ \end{tabular} \caption{Lorem ipsum bis} \end{mdframed} % and this % ... and put the caption inside the frame too \end{table} \end{document}

  • How to show the equation label at the end of long equation line?
    by raf on July 7, 2025 at 1:32 am

    I'm typesetting a long equation that spans multiple lines using align, and I want the equation number (label) to appear at the end of the equation line. I'm using \begin{aligned}[t] inside align for better formatting. Here's my current MWE: \documentclass{article} \usepackage[margin=0.8in]{geometry} \usepackage{amsmath} \begin{document} \begin{align} & \epsilon\left[(1-v\beta_i)\frac{\partial h_i \gamma_i \beta_i}{\partial \tau}- \frac{v}{\gamma_i}k_i \alpha n_{i}^{\alpha-2} \frac{\partial n_i}{\partial \tau}+qv\frac{\partial \phi}{\partial\tau} \right] +X_i +c(\beta_i -v)\frac{\partial h_i \gamma_i \beta_i}{\partial \xi} +\frac{c}{\gamma_i}k_i \alpha n_{i}^{\alpha-2} \frac{\partial n_i}{\partial \xi} -qc\frac{\partial\phi}{\partial\xi}=0, \\ & \epsilon\left[(1-v\beta_e)\frac{\partial h_e \gamma_e \beta_e}{\partial \tau}- \frac{v}{\gamma_e}k_e \alpha n_{e}^{\alpha-2} \frac{\partial n_e}{\partial \tau}+qv\frac{\partial \phi}{\partial\tau}-V_{x1}\right] +X_e+c(\beta_e -v)\frac{\partial h_e \gamma_e \beta_e}{\partial \xi} \begin{aligned}[t] &+\frac{c}{\gamma_e}k_e \alpha n_{e}^{\alpha-2} \frac{\partial n_e}{\partial \xi} \\ &-qc\frac{\partial\phi}{\partial\xi}-V_{x2}=0, % prefer to get the label becide this line \end{aligned} \label{eq:long-eq-1} \end{align} \end{document} I want to make sure to get the correct and cleanest way to align such long expressions (possibly mixing align and aligned) and ensure the equation number appears at the end of a long multiline equation. Also, a relevant concern if there is a proper way for automatic line breaks on such sets of long equations so that switching from one-column to two-column document becomes flexible.

  • Was there ever a ConTeXt Mark III or Context Mark V?
    by John on July 7, 2025 at 12:31 am

    According to the Wikipedia article on ConTeXt, there are ConTeXt Marks I, II, IV, and LMTX. Occasionally, I also see LMTX referred to as MkXL, as in the filename cont-new.mkxl. According to the ConTeXtGarden Wiki page, Mark VI is just Mark IV with named parameters, all of which leaves me the question: Have there ever been ConTeXt marks 3 (III), 5 (V), or any of 7--39 (VII -- XXXIX)? EDIT if not, why are those versions skipped?

  • \appendix changing Figure counting style
    by standi98 on July 6, 2025 at 8:37 pm

    Whenever I have the \appendix command in my document, it adds an unwanted dot to my figure numbering, such that Figure 1:Text becomes Figure 1.:Text. I have no idea why this happens. Here is my Main.tex \documentclass[11pt,english,a4paper,parskip=half]{scrreprt} \begin{document} \chapter{test} asdf \section{test1} asdf \subsection{test2} asdf \begin{figure}[htbp] \centering \caption{Testcaption} \end{figure} \appendix \chapter{appendix} \end{document}

  • Is there a way to access the "current width" of a cell in a tabular/array?
    by F. Pitt on July 6, 2025 at 8:31 pm

    I'm exploring different ways to typeset the nested structure of recursive calls. One of my attempts uses a 3-column array environment and produces a decent-looking result, as shown in the first MWE below. \documentclass[preview, border=1pt, convert={outext=.png}]{standalone} \usepackage{array} \newenvironment{trace} {\begin{array}{@{}>{$}r<{$}@{}c@{}>{$}l<{$}@{}}} {\end{array}} \def\beginrecurse#1{#1 & \left\{\begin{array}{@{}>{$}r<{$}@{}c@{}>{$}l<{$}@{}}} \def\endrecurse#1{\end{array}\right\} & #1} \newcommand*\basecase[2]{#1 & \,\mapsto\, & #2} \begin{document} Basic version, using a fixed-length arrow for base cases: \[\begin{trace} \beginrecurse{factor(30)} \basecase{factor(5)}{(5,)} \\ \beginrecurse{factor(6)} \basecase{factor(2)}{(2,)} \\ \basecase{factor(3)}{(3,)} \endrecurse{(2,3)} \endrecurse{(5,2,3)} \end{trace}\] \end{document} What I would like is to have an extensible arrow used for the base cases that appear in columns that contain wider cells. This is not too difficult to implement by hand, as shown in the second MWE below. \documentclass[preview, border=1pt, convert={outext=.png}]{standalone} \usepackage{array} \usepackage{mathtools} % ADDED! \newenvironment{trace} {\begin{array}{@{}>{$}r<{$}@{}c@{}>{$}l<{$}@{}}} {\end{array}} \def\beginrecurse#1{#1 & \left\{\begin{array}{@{}>{$}r<{$}@{}c@{}>{$}l<{$}@{}}} \def\endrecurse#1{\end{array}\right\} & #1} \newcommand*\basecase[3][.5em]{#2 & \,\xmapsto{\hspace{#1}}\, & #3} % CHANGED! \begin{document} Desired output, but \emph{without} all the manual calculations: \newlength\longarrowlen \settowidth\longarrowlen {$\!\!\left\{\begin{array}{@{}>{$}r<{$}@{}c@{}>{$}l<{$}@{}} factor(3) & \,\xmapsto{\hspace{.5em}}\, & (3,) \end{array}\right\}\!\!$} \[\begin{trace} \beginrecurse{factor(30)} \basecase[\longarrowlen]{factor(5)}{(5,)} \\ \beginrecurse{factor(6)} \basecase{factor(2)}{(2,)} \\ \basecase{factor(3)}{(3,)} \endrecurse{(2,3)} \endrecurse{(5,2,3)} \end{trace}\] \end{document} I have been unable to find a way to refer to the natural width of the current cell/column from within an array. Obviously, there is some point in the typesetting during which LaTeX knows this width, to be able to set the cell's content with the appropriate alignment. Is there any way to access whatever internal length/dimension register is used to store this value? Is there some package that provides a mechanism for saving this value for later use? Any pointers (or suggestions for alternatives) would be welcome! (Edit. Posted my follow-up question separately.)

  • Custom command for creating grids of arbitrary sizes with filled discs as entries
    by ultralegend5385 on July 6, 2025 at 3:38 pm

    What I am doing involves a game which is played with stones on a rectangular grid that look like this: Just a rectangular grids with black stones as pieces. In the interface that I used to create this image, I just need to enter a command with "x.xxxx|.xx.x.|xx..xx" as input, and that would create the grid. (Here, x represents a stone, and . an empty space, and | indicates end of the row.) I want to recreate these with a command that takes a similar input and outputs the corresponding TikZ diagram. I can create a grid and fill it with circles manually, but I don't know how to make a custom command that can create any-sized grid with any configuration. Could someone give some ideas on how to do so? (If someone can edit the title and make the wording better, please do so.)

  • How to set bera font after a certain point in a tex file?
    by Akira on July 5, 2025 at 8:00 pm

    I have a tex file: \documentclass{article} %\usepackage{bera} \newcommand*{\myfont}{\fontfamily{fve}\selectfont} \begin{document} \section{Introduction} We will give a literature review here. \selectfont \section{Preliminary} We will collect related techniques here. \end{document} I would like to use bera font starting from \section{Preliminary}. Following this answer, I use the command \newcommand*{\myfont}{\fontfamily{fve}\selectfont}, but to no avail. Could you explain how to obtain my desired result? From the documentation,

  • Using `evaluate` and `using` in nested Tikz-loop
    by Gerhard on July 5, 2025 at 7:40 pm

    How can I use \evaluate and using within a nested loop, where several loop indices are used? The following code does not work. \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \foreach \x in {0,1,...,9} \foreach \y [evaluate=\y as \p using {\x+\y*10}] in {0,1,...,9} \node [fill=red!\p!yellow, minimum size=0.65cm] at (\x,\y) {\p}; \end{tikzpicture} \end{document}

  • How do I add a second top element to my forest in latex
    by Zilore Mumba on July 5, 2025 at 7:34 pm

    In drawing of my directory structure, I am able to do what I want in tikz. However I would like to do the same using the forest package. As in the attached image, the forest output is ok, except I am not able to include the Build directory at the top. My code below. \documentclass[12pt,twoside,fleqn]{report} \usepackage{tikz} \usetikzlibrary{tikzmark} \usepackage{tikz-3dplot} \usepackage{tikz-3dplot} \usetikzlibrary{shapes.geometric, decorations.pathreplacing, matrix, angles, quotes, arrows, arrows.meta, datavisualization,cd} \usetikzlibrary{through,calc,intersections} \usepackage{forest} \begin{document} \begin{tikzpicture}[node distance=2cm, scale=0.5] \tikzstyle{process} = [rectangle, minimum width=2.0cm, minimum height=1cm, text centered, text width=2.0cm, draw=black, fill=orange!30] \node (proc0) [process, xshift=-8cm] {Build}; \node (proc1) [process, right of=proc0, xshift=1.0cm] {DA}; \node (proc2) [process, below of=proc1, yshift=-0.5cm] {WRF}; \node (proc3) [process, below of=proc2, xshift=-2.0cm,yshift=-1.0cm] {run}; \node (proc4) [process, right of=proc3, xshift=2.0cm] {test}; \node (proc5) [process, below of=proc3, xshift=4cm] {em\_real}; \node (proc6) [process, right of=proc2, xshift=1.0cm] {WPS}; \node (proc7) [process, right of=proc6, xshift=1.0cm] {WRFPLUS}; \node (proc8) [process, right of=proc7, xshift=1.0cm] {3DVAR}; \node (proc9) [process, right of=proc8, xshift=1.0cm] {4DVAR}; \draw [black,thick] (proc0) -- (proc1); \draw [black] (proc1) -- (proc2); \draw [black] (proc2) -- (-10,-11); \draw [black] (proc4) -- (proc5); \draw [black] (proc3) -- (proc4); \draw [black] (proc2) -- (proc6); \draw [black] (proc6) -- (proc7); \draw [black] (proc7) -- (proc8); \draw [black] (proc8) -- (proc9); \end{tikzpicture}\par \bigskip \begin{forest} for tree={ draw, font=\sffamily\bfseries, edge path={ \noexpand\path[draw, \forestoption{edge}] (!u.parent anchor) -- +(0,-5mm) -| (.child anchor)\forestoption{edge label}; }, parent anchor=south, child anchor=north, l sep=10mm, tier/.wrap pgfmath arg={tier #1}{level()}, edge={ultra thick, rounded corners=2pt}, ultra thick, inner color=blue, outer color=gray!20, rounded corners=2pt, s sep=1.0cm, minimum width=1.8cm, minimum height=0.6cm, } [DA [WPS] [WRF [\color{green}run] [\color{orange}test [\color{green}em\_real] ] ] [WRFPLUS] [3DVAR] [4DVAR] ] \end{forest} \end{document} Is it possible to include "Build" in the forest version? Help please.

  • In Lua, is there a way to require a file and drop the prefixes?
    by Jasper on July 5, 2025 at 3:02 pm

    I have made a lua module with a prefix (i.e., a file which returns a localized table). I can require this file from other file, and use the commands. However, I'd like not to use the prefix. Is there a way to require a file and drop the prefixes? I would like for the commands to remain local to the documents they are loaded in, and not make them global. -- test.lua local test = {} function test.func() print(7) end return test -- test_2.lua local test = require "test" test.func() -- I want to just call func() The reason for me asking is because I'm trying to get the user to input lua functions from tex, without using globals. In this way, the syntax will be similar enough to pgfmath that the user wont feel too unfamiliar.