• Adding color to \writetolist line in the TOC
    by Gary on February 15, 2026 at 9:29 pm

    I don't know what I'm doing wrong, here, but I'd like to style the \writetolist item in the TOC to be a different color than black. I realize I can add the color to the text content itself but that does not change the color of the page number and dots/periods. The \writetolist reads that it inherits from \setuplist; and I think I've tried all the color options in \setuplist without success; and it appears the color option is supposed to apply to the entire entry. If the color=MyBlue line in the \setuplist of the entire TOC is uncommented, then everything in the TOC is color MyBlue. But that doesn't work in just the \writetolist declaration. What am I doing wrong or failing to do? Thank you. \setupcombinedlist[content][list={chapter},criterium=all,alternative=c,] \setuplist[chapter][ stopper={.}, distance=5mm, numberalign=flushright, numbercommand={\sc}, textcommand={\sc}, % color=MyBlue, style={\setupinterlinespace[2.5ex]\sc}] \definecolor[MyBlue][r=.2,g=.2,b=.7] \starttext \completecontent[criterium=all] \writetolist[chapter][ location=here, color=MyBlue, textcolor=MyBlue, numbercolor=MyBlue, pagecolor=MyBlue]{}{% {Write to List Line}% } \startchapter[title={Something significant}] Paragraph \stopchapter \stoptext

  • Help in generating a quantikz circuit
    by Rob on February 15, 2026 at 7:14 pm

    I have just started using the package quantikz and created my first "quantum circuit" diagram \begin{equation} \begin{quantikz} \lstick{$\ket{\psi}$} & \gate{A} & \gate{B} &\gate{C} & \qw \end{quantikz} \end{equation} However, I am now struggling to produce the following circuit: I tried the following code but it doesn't seem to work \begin{quantikz} \lstick{|0\rangle} & \gate{A} & \multigate{1}{B} & \qw & \gate{D} & \qw \\ \lstick{|1\rangle} & \qw & \ghost{B} & \multigate{1}{C} & \gate{E} & \qw \\ \lstick{|1\rangle} & \qw & \qw & \ghost{C} & \gate{F} & \qw \end{quantikz} Any help in generating that diagram would be greatly appreciated.

  • Latex Math bracket right that covers two rows of aligned's
    by Christopher Ettling on February 15, 2026 at 6:56 pm

    Is it possible to make such a nice bracket like in the picture? \documentclass{article} \usepackage{amsmath,amssymb} \newcommand{\Z}{\mathbb{Z}} \begin{document} \begin{align*} a\!\in\!\Z\mid b\!\in\!\Z &\left\{ \begin{aligned} &\Leftrightarrow\left\{ \begin{aligned} \pm a &\mid \mp b\\ ac &\mid bc:\forall c\in\Z \end{aligned}\right.\\ &\Rightarrow\left\{ \begin{aligned} a\mid bc:\forall c\in\Z\\ |a|\le |b|\lor b=0 \end{aligned}\right.\\ &\land\left\{ \begin{matrix} a=0 &\Rightarrow& b=0\\ b\mid a &\Rightarrow& a=\pm b\\ b\mid c &\Rightarrow& a\mid c \end{matrix}\right. \end{aligned}\right. \end{align*} \end{document}

  • Adapting width of tcolorbox to the content, except that the box contains math instead of text
    by Your neighbor Todorovich on February 15, 2026 at 6:26 pm

    My question is almost completely identical to the extremely popular question How to restrict width of tcolorbox according to the length of the text it contains Except that the top answer does not solve my problem in that my tcolorbox contains math, e.g., $\begin{align*} f & = ma \\ & = x^2 - x^3 \end{align*}$ As such, when using the hbox solution as provided in the answer, and using a box that looks like this: \usepackage[breakable, most, skins]{tcolorbox} \newtcolorbox{mybox}{ enhanced, colframe=black, boxrule=0.5pt, arc=2mm, left=6pt,right=6pt,top=4pt,bottom=4pt, boxsep=3pt, hbox (<---- hbox from linked question) } I receive the following error: Error Package amsmath Error: \begin{aligned} allowed only in math mode. \end{frame} What is the workaround to this problem?

  • Wrong printed value when using pythontex and text from amsmath
    by Mumblee on February 15, 2026 at 4:47 pm

    In a recent LaTeX document, I've had a weird behavior with pythontex : the value I get with \py{variable_name} wasn't correct. After some research, the problem seems to be related to the \text{} amsmath command. Below is a short example illustrating this. I can avoid the problem by not using \py{} inside \text{} but I wonder if this could be considered as a bug. Thanks for your answers. \documentclass[12pt,french,fleqn]{article}% \usepackage[utf8]{inputenc}% \usepackage[T1]{fontenc}% \usepackage{babel} \usepackage{amsmath} \usepackage{pythontex} \begin{pycode} a=2 b=5 \end{pycode} \begin{document} % \py{b} outside \text{} : OK $a=\py{a} \text{\quad{} et \quad{}} b=\py{b}$ $a : \py{a}$ $b : \py{b}$ % \py{b} inside \text{} : not OK $a=\py{a} \text{\quad{} et $b=\py{b}$}$ $a : \py{a}$ % here one gets the value of 'b' instead of 'a' $b : \py{b}$ \end{document}

  • How to adjust the width of each section/subsection of a document? [duplicate]
    by Deslouis on February 15, 2026 at 3:30 pm

    I am trying to add some space at the left of each subsection of my document as shown in the code below. Is there a way to obtain the same result without manually adjusting the width each time I create a subsection? I tried with \renewcommand{subsection} but I can only change the title doing so. Minimalist example: \documentclass{article} \usepackage{changepage} \parindent=0pt \begin{document} \section{This is a section} It should be at the left margin of the page. \begin{adjustwidth}{1cm}{2cm} \subsection{This is a subsection} There should be some space between the text and the margin. \end{adjustwidth} \section{This is another section} I want the spacing to be automatic for each subsection of the document without having to write \textit{begin/end adjustwidth} around each subsection. \end{document} Compiled minimalist example:

  • TeX expansion with \number has mysterious error when followed by space, why?
    by Dan Levin on February 15, 2026 at 3:07 pm

    This code produces the table I'm expecting with fully expandable copying: % same as \ltx@\ReturnAfterFi \long\def\ReturnAfterFi#1\fi{\fi#1} % expandable copies % #1=number, #2=text \def\xcopies#1#2{% \ifnum#1>0 #2% \ReturnAfterFi{\expandafter\xcopies\expandafter{\the\numexpr#1-1}{#2}}% \fi} \def\hundredtable{% \vtop{\offinterlineskip \global\count255=1 \everycr{\noalign{\hrule}}\tabskip0pt \halign{\strut \vrule ##&& \global\advance\count255 by 1 \hbox to 2.5em{\hss##\hss}\vrule\cr \xcopies{10}{\xcopies{10}{& \number\count255}\cr}\crcr}}} \hundredtable But an error occurs if I put a space after the \number command in the code block above, as shown here: ... \xcopies{10}{\xcopies{10}{& \number\count255 }\cr}\crcr}}} I thought the space would be optional. I've tried \relax and it, too, produces an error, with TeX saying the \ifnum doesn't complete. I suspect the \number command with the register is checking if it should multiply what follows and is therefore expanding the \ReturnAfterFi. But the space would seem to solve this, not cause it. Can someone explain the expansion error here?

  • How to change templates default font family to Latin Modern Serif?
    by cody.tex on February 15, 2026 at 1:46 pm

    I am using a template based on the document class scrbook to write my thesis. The default font family is sans-serif (?) and I wanted to change it to Latin Modern Serif: \usepackage[T1]{fontenc} \usepackage{lmodern} \renewcommand{\familydefault}{\rmdefault} This does not change anything. Inside \begin{document} I put \rmfamily. Does not change anything. Then I tried using a makro: \newcommand{\changefont}[3]{ \fontfamily{#1} \fontseries{#2} \fontshape{#3} \selectfont} and call it with \changefont{\rmdefault}{m}{n}. Does not change anything. So the last thing I did: \renewcommand{\sfdefault}{\rmdefault} And this did the trick. Is this supposed to work like this? I am using pdftex coming with Miktex 25.12 on Windows. Thanks in advance for reply and insights! EDIT: The template I am using is this one provided by a prof at my university: https://github.com/valentin-schwind/frauas-thesis-template/blob/master/latex/Thesis.tex

  • LaTeX zref-clever: automatically generate dash-separated figure ranges including non-consecutive labels
    by taiwan12 on February 15, 2026 at 1:21 pm

    I'm trying to use the zref-clever package in LaTeX to reference multiple figures in a compact, readable way. I want the output to: Merge consecutive figure numbers with a dash (-) Separate non-consecutive numbers with commas Never use "and" Work for any order of figure labels MWE \documentclass{article} \usepackage{graphicx} \usepackage{float} \usepackage[colorlinks]{hyperref} \usepackage{zref-clever} \begin{document} % Example of referencing figures \zcref{fig:figA, fig:figB, fig:figC, fig:figE, fig:figF} % figures 1-3, 5-6 \zcref{fig:figB, fig:figA} % figures 1-2 \zcref{fig:figD, fig:figA} % figures 1, 4 \zcref{fig:figA, fig:figB, fig:figC, fig:figE, fig:figG} % figures 1-3, 5, 7 \begin{figure}[H] \caption{Caption} \label{fig:figA} \end{figure} \begin{figure}[H] \caption{Caption} \label{fig:figB} \end{figure} \begin{figure}[H] \caption{Caption} \label{fig:figC} \end{figure} \begin{figure}[H] \caption{Caption} \label{fig:figD} \end{figure} \begin{figure}[H] \caption{Caption} \label{fig:figE} \end{figure} \begin{figure}[H] \caption{Caption} \label{fig:figF} \end{figure} \begin{figure}[H] \caption{Caption} \label{fig:figG} \end{figure} \end{document}

  • cleveref \cref fails when there is a space after comma in multiple labels [duplicate]
    by taiwan12 on February 15, 2026 at 12:23 pm

    I am using LaTeX with the cleveref package and I want to reference multiple figures like this: \cref{fig:figA, fig:figB}. However, it only works if there is no space after the comma: \cref{fig:figA,fig:figB}. Is there a clean way to make \cref handle spaces after commas in multiple labels automatically? I only came up with one idea: \crefspace which removes the every space. \documentclass{article} \usepackage{graphicx} \usepackage{float} \usepackage[colorlinks]{hyperref} \usepackage{cleveref} \begin{document} \begin{figure}[H] \caption{Caption} \label{fig:figA} \end{figure} \begin{figure}[H] \caption{Caption} \label{fig:figB} \end{figure} \begin{figure}[H] \caption{Caption} \label{fig:figC} \end{figure} \cref{fig:figA,fig:figB} % works \cref{fig:figA, fig:figB} % does NOT work \end{document}

  • LaTeX macro for typesetting AVMs and distance between AVM and text + typing
    by Stefan Müller on February 15, 2026 at 11:37 am

    Decades ago a colleague wrote a macro for type setting Attribute Value Matrices (AVMs) for me. It is simple and can be used for AVMs with a type (italics at the left top bracket) and AVMs without type. The problem is that sometimes the AVMs are very close to preceding text and I do not see why. The distance between "Perfekt" and AVM is perfect, but the distance between "Passive" and the AVM is not. Of course this could be fixed by inserting a newline with 2pts extra space, but I would like to understand the problem and have a solution for it. Apart from this the whole AVM should be some points further to the left, so that it aligns with the text. I guess this is due to the array package, which probably adds some space for nesting brackets. This is of course welcome but should not happen at teh outermost bracket. This is my code: \documentclass{scrartcl} \usepackage{langsci-gb4e} \usepackage{array} \newcommand{\nliste}[1]{% \mbox{$\langle$\upshape\normalfont#1$\rangle$}% } \newcommand{\eliste}{% \mbox{% $\left\langle\right\rangle$}% } \newcommand{\ms}[2][]{% \mbox{% \delimiterfactor=1000 \delimitershortfall=0pt\tabcolsep=0pt% $\left[% \begin{tabular}{>{\upshape\scshape}l@{}>{\hspace*{5pt}\normalfont\itshape}l} \if\relax\detokenize{#1}\relax\else \multicolumn{2}{>{\normalfont\itshape}l}{#1}% \\% \fi% #2% \end{tabular}% \right]$% }% \vspace{1mm}% } \newcommand{\onems}[2][]{% \mbox{% \delimiterfactor=1000 \delimitershortfall=0pt \tabcolsep=0pt $\left[% \begin{tabular}{>{\upshape\scshape}l} \if\relax\detokenize{#1}\relax\else {\normalfont\itshape #1}% \\ \fi #2% \end{tabular}% \right]$% }% \vspace{1mm}% } \newcommand{\menge}[1]{% \mbox{% $% \left\{% \begin{tabular}{@{}l@{}}\ignorespaces#1\end{tabular}% \right\}% $% }% } \newcommand{\str}{{\normalfont\textit{str}}}% xspace does not work with NP[\str] \begin{document} The second AVM is too close to the `P'. There seems to be too much space before the AVM. \eal \ex Perfekt:\\ \ms{ spr & \nliste{ NP[\str]$_i$ }\\ comps & \nliste{ NP[\str]$_j$ }\\ arg-st & \nliste{ NP[\str]$_i$, NP[\str]$_j$ } } \ex Passiv:\\ \ms{ spr & \nliste{ NP[\str]$_j$ }\\ comps & \eliste\\ arg-st & \nliste{ NP[\str]$_j$ } } \zl \eal \label{linking-konstruktionen} \ex\label{transitiv-Konstruktion} die \emph{Transitive Construction}:\\ \ms{ syn & \ms{ cat & v\\ voice & active\\ }\\ val & \menge{ \onems{ role \ms{ gf & obj \\ %$\theta$ & \textsc{da}$-$\\ \textsc{da} & $-$\\ }\\ }}\\ } \ex die \emph{Subject Construction}:\\ \ms{ syn & \ms{ cat & v\\ }\\ val & \menge{ \onems{ role \onems{ gf \textit{subj} } }}\\ } \ex die \emph{Passive Construction}:\\ \ms{ syn & \ms{ cat & v\\ form & PastPart\\ }\\ val & \menge{ \ms{ role & \ms{ gf & obl\\ da & $+$\\ }\\ syn & \textrm{P[von]/}zero\\ }}\\ } \zl \ms[test]{ feature1 & value\\ feature2 & value} \ms[word]{ feature1 & value\\ feature2 & value} \ms[passive]{ feature1 & value\\ feature2 & value} \end{document} Another problem is the type in the last three AVMs. It seems to take all the space that would be needed if there were letters like `t' that stick out towards the top. But this is not the case for words like "passive". Could such types be raised by some points (according to font properties)? Sorry, for asking two questions in one. I can split them up, but since it is the same code, I thought it might be better this way.

  • How to vertically center the forked edge in forest?
    by Explorer on February 15, 2026 at 8:23 am

    This question is similar to this link, but I don't know why y-process operation doesn't work with forked edge. \documentclass[border=5pt]{standalone} \usepackage[edges]{forest} \usetikzlibrary{arrows.meta,shapes,shadows,trees} \tikzset{ basic/.style = { draw, drop shadow, rectangle, text width=2cm, font=\sffamily }, root/.style = { basic, thin, rounded corners=2pt, align=center, fill=green!30, }, onode/.style = { basic, thin, rounded corners=2pt, align=center, fill=green!60,text width=3cm, }, tnode/.style = { basic, thin, align=left, fill=pink!60, text width=6.5em, }, xnode/.style = { basic, thin, rounded corners=2pt, align=center, fill=blue!20,text width=5cm, }, wnode/.style = { basic, thin, fill=pink!10!blue!80!red!10, align=left, text width=6.5em, }, } \begin{document} \begin{forest} for tree={ grow'=east, forked edge, }, % https://tex.stackexchange.com/a/759585/322482 before drawing tree={ for tree children-first={ if n children=0{}{ y/.process={ OOOOw4+P {!1.y} {!1.max y} {!l.y} {!l.min y} {(#1+#2+#3+#4)/2} }, } } } [Networked Game Work BreakDown, root [Software Engineering Report, xnode [Setting shape, tnode] [Choosing color, tnode] [Adding shading, tnode] ] [Game Demo Preparation, onode, xshift=-1.25cm [Using a Matrix, tnode] [Relatively, tnode] [Absolutely, tnode] [Using overlays, wnode] ] [Project Proposal and Game Logic, onode, xshift=-1.25cm [Default arrows, tnode] [Arrow library, tnode] [Resizing tips, tnode] [Shortening, tnode] [Bending, tnode] ] ] \end{forest} \end{document} What I want, is the "red"-vertical aligned,that is, shift these four intersections to be vertically aligned: Any suggestions are welcome!

  • Illustrating a general projective transformation in R1
    by Jasper on February 15, 2026 at 6:07 am

    The question is contained in the image/code: \documentclass{article} \usepackage{tikz,mathtools} \DeclareMathOperator{\projectivestep}{Projective~Step} \begin{document} \section{The facts} The transformation \[ \begin{bmatrix} b & t \\ 0 & 1 \end{bmatrix} \begin{bmatrix} a \\ 1 \end{bmatrix} = \begin{bmatrix} t+ab \\ 1 \end{bmatrix} \] can be visualized as a composition of a scaling \begin{center} \begin{tikzpicture}[scale=0.7] \draw[thick,->] (-1,0) -- (7,0) node[below right] {\(x\)}; \draw[thick,->] (0,-1) -- (0,3) node[above left] {\(y\)}; \fill (0,0) circle[radius = 3pt] node[below left=3pt] {\(0\)}; \fill (1,0) circle[radius = 3pt] node[below=3pt] {\(1\)}; \fill (0,1) circle[radius = 3pt] node[left=3pt] {\(1\)}; \fill (2,0) circle[radius = 3pt] node[below=3pt] {\(a\)}; \draw (2,0) arc[start angle=0,end angle=90,radius=2]; \fill (3,0) circle[radius = 3pt] node[below=3pt] {\(b\)}; \fill (6,0) circle[radius = 3pt] node[below=3pt] {\(ab\)}; \draw (0,1) -- (3,0); \draw (0,2) -- (6,0); \end{tikzpicture} \end{center} and a translation \begin{center} \begin{tikzpicture} \draw[thick,->] (-1,0) -- (5,0) node[below left] {\(x\)}; \draw[ preaction = { draw = black, line width = 4pt }, postaction = { draw = pink, line width = 2pt } ] (0,0) -- (1,0); \fill (0,0) circle[radius = 3pt] node[below left=3pt] {\(0\)}; \fill (1,0) circle[radius = 3pt] node[below right=3pt] {\(ab\)}; \fill (3,0) circle[radius = 3pt] node[below left=3pt] {\(t\)}; % solution: \draw (0,0) circle[radius=1]; \draw (0,0) arc[start angle=180,end angle=60,radius=3]; \draw (0,0) arc[start angle=180,end angle=300,radius=3]; \draw (3,0) arc[start angle=0,end angle=90,radius=3]; \draw (3,0) arc[start angle=0,end angle=-90,radius=3]; \fill (1.5,{3*sin(60)}) circle[radius = 3pt]; \fill (1.5,{-3*sin(60)}) circle[radius = 3pt]; \draw[domain=30:150] plot({1.5+3*cos(\x)},{-3*sin(60)+3*sin(\x)}); \fill (0.936,0.348) circle[radius = 3pt]; % solve the circle intersections \pgfmathsetmacro{\LENGTH}{sqrt((1.5-0.936)^2+(3*sin(60)-0.348)^2)} \draw[domain=-30:-150] plot({1.5+\LENGTH*cos(\x)},{3*sin(60)+\LENGTH*sin(\x)}); \fill (3-0.936,0.348) circle[radius = 3pt]; \draw[ preaction = { draw = black, line width = 4pt }, postaction = { draw = pink, line width = 2pt } ] (3,0) -- (4,0); \fill (3,0) circle[radius = 3pt]; % cleanup \draw (3,0) circle[radius=1]; \fill (4,0) circle[radius = 3pt] node[above right=3pt] {\(t+ab\)}; \end{tikzpicture} \end{center} \section{My question} Suppose that the 0 in the transformation matrix weren't zero. This would cause the 1 in the vector to become a non-1 value. To restore it to 1, \textbf{we divide every component, including itself, by it}. How could I illustrate the last step, if that number were some number $n$? \[ \begin{bmatrix} b & t \\ n & 1 \end{bmatrix} \begin{bmatrix} a \\ 1 \end{bmatrix} = \projectivestep \begin{bmatrix} t+ab \\ na+1 \end{bmatrix} = \begin{bmatrix} \frac{t+ab}{na+1} \\ 1 \end{bmatrix} \] The answer should be the exact same as above, but with one more illustration, showing how the projective step transforms the line. The reason I am having difficulty is because it maps every point differently. That is, points in one direction become closer together, and they become further apart in the other direction. \end{document}

  • Is it possible to define an additional description in \newacronym that is printed in the glossary?
    by Marco Moldenhauer on February 15, 2026 at 5:39 am

    I am using the glossaries package with acronym support and defining acronyms via \newacronym. My minimal example is: %% TeXstudio: Options → Configure TeXstudio → Build → User Commands %% Add: %% user1: Make Glossaries-Lite "C:/Users/molde/AppData/Local/Programs/MiKTeX/miktex/bin/x64/makeglossaries-lite.exe" % %% %% Compile order: %% 1) pdflatex %% 2) makeglossaries-lite %% 3) pdflatex \documentclass{article} \usepackage[acronym]{glossaries} \makeglossaries \newacronym{ai}{AI}{Artificial Intelligence} \newacronym{ml}{ML}{Machine Learning} \begin{document} First use: \gls{ai} and \gls{ml}. Second use: \gls{ai} and \gls{ml}. \printglossary[type=\acronymtype] \end{document} This works as expected. However, I would like to add an additional description field when defining an acronym, such that this description appears in the glossary section when using \printglossary. Conceptually, I am looking for something like: \newacronym{ai}{AI}{Artificial Intelligence}{<additional description>} so that the glossary would include both the long form and the additional explanatory text. What is the correct way to define such an additional description field so that it appears in the glossary? Current Output Desired Output

  • How to change the name "Publications " to "references" and how to make them colored?
    by Intuition on February 15, 2026 at 3:50 am

    Here is a template of overleaf that I am using to write my research statement: \documentclass[11pt,a4paper,sans]{moderncv} \moderncvstyle{casual} \moderncvcolor{red} \usepackage{lipsum} \usepackage[scale=0.75]{geometry} \firstname{} % Your first name \familyname{} % Your last name %\addbibresource{mybibliography.bib} %\bibliography{references} \title{ Research Statement} \address{W. Ethan Eagle}{} \mobile{(302) 584 3464} \email{ethan.eagle@gmail.com} %\addbibresource{mybibliography.bib} %\bibliography{references} \begin{document} \makecvtitle % Print the CV title %---------------------------------------------------------------------------------------- % EDUCATION SECTION %---------------------------------------------------------------------------------------- %\newpage %\addbibresource{references.bib} %\bibliography{references} \section{Previous Research Experience} 'Turbulence/Chemistry Interaction' and 'Thermo-fluids research.' ~\cite{MR1122302} {\hskip 2em}Details of my previous research work are available in my CV, but I would like to highlight my interests in diagnostic development for infrared imaging detection. The measurement capabilities of this diagnostic are just beginning to be understood, and I will continue to eagerly pursue and develop this measurement technique. I am also interested in continuing to make advanced measurements in combustion that can assess the impact of scalar dissipation on the ignition and inflammation of a mixture.\\ %---------------------------------------------------------------------------------------- \section{Research Goals} {\hskip 2em}I aim to develop a reputation as world-class expert in turbulence/chemistry interaction as applied to the areas of energy, health, and the environment. {\hskip 2em}To be successful as a starting faculty, I plan to start from simple 'unit' problems where I can explore the influence of boundary conditions in simple flow problems while developing diagnostic capability (e.g. infrared measurements of hydrocarbon distribution in atmospheric jet flames). {\hskip 2em}I have contacts to funding sponsors at the DOE, with NSF program managers in the turbulence and combustion sub-areas, and at DOD including AFRL and NRL, and will seek the support of these agencies through responses to FOAs regularly put out by these venues. \section{Teaching} My teaching interests span experiments in fluids, theoretical fluid dynamics, thermodynamics, and combustion. $\bullet{}$ Undergraduate: Thermodynamics, In/compressible Flows, Instrumentation (Lab), Combustion\\ $\bullet{}$ Graduate: Turbulent-Compressible-Viscous Flows, Combustion, Optical and Laser Diagnostics {\hskip 2em}I believe that a comprehensive set of courses on fundamental viscous and turbulent flows would be a worthwhile addition to a core competency at the undergraduate level. {\hskip 2em}I cultivate the following attitudes in students who complete course work or research with me: $\bullet{}$ demonstrate understanding of rigorous mathematical tools for design/analysis, (Teach others) $\bullet{}$ exhibit audience driven communication strategies, (Justify and explain the importance of research) $\bullet{}$ establish sound environmental/ethical/social reasoning. (Think long term, not just short term) %\section{References} %~\cite{MR1122302} %\addbibresource{references.bib} %\printbibliography [title={REFERENCES }, heading=bibintoc] \bibliographystyle{alpha} \bibliography{references} % Gunakan judul LITERATURE \end{document} I was wondering how to change the name "Publications " to "references" and how to make them colored? Notice that I created a file named references.bib that contains my citations from mathscinet Any help will be appreciated.

  • TikZ forest: custom vdots keys overrides custom l sep and s sep keyvals
    by Grass on February 15, 2026 at 3:12 am

    The Problem From cfr's answer to my previous question, I managed to draw nice vdots in my forest tree. But now for tree={ s sep=1cm, % example of 1cm for illustrative purposes; you probably wouldn't want it to be so big l sep=1cm }, fails to be applied across the entire tree: Attempt(s) To Fix Said Problem I tried messing with before computing xy={% l'=0pt, s'=-15pt, % length of vdots }, but it didn't really work. What Help I need I've only had very modest experience with forest so I'm having trouble deducing how to modifiy cfr's code, such that the keyvals s sep and l sep work correctly. Thus, it would be nice if someone was able to help me out with this. MWE: % Source - https://tex.stackexchange.com/a/755401 % Posted by cfr, modified by community. See post 'Timeline' for change history % Retrieved 2026-02-14, License - CC BY-SA 4.0 \documentclass[border=10pt,multi,tikz]{standalone} % ateb: https://tex.stackexchange.com/a/754955/ % ateb: https://tex.stackexchange.com/a/755401/ \usepackage[edges]{forest} \usetikzlibrary{calc} \definecolor{folderbg}{RGB}{124,166,198} \definecolor{folderborder}{RGB}{110,144,169} \newlength\Size \setlength\Size{4pt} \tikzset{% folder/.pic={% \draw [draw=folderborder, sharp corners, top color=folderbg!50, bottom color=folderbg ] (-1.05*\Size,0.2\Size+5pt) rectangle ++(.75*\Size,-0.2\Size-5pt); \draw [draw=folderborder, sharp corners, top color=folderbg!50, bottom color=folderbg ] (-1.15*\Size,-\Size) rectangle (1.15*\Size,\Size); }, file/.pic={% \filldraw [draw=folderborder, sharp corners, top color=folderbg!5, bottom color=folderbg!10] (-\Size,.4*\Size+5pt) coordinate (a) |- (\Size,-1.2*\Size) coordinate (b) -- ++(0,1.6*\Size) coordinate (c) -- ++(-5pt,5pt) coordinate (d) -- cycle (d) |- (c) ; }, } \forestset{% declare autowrapped toks={pic me}{}, declare boolean register={pic root}, pic root=0, declare keylist={additional edge options}{}, pic dir tree/.style={% for tree={% folder, font=\ttfamily, grow'=0, }, before typesetting nodes={% for tree={% edge label+/.option={pic me}, }, if pic root={ tikz+={ \pic at ([xshift=\Size].west) {folder}; }, align={l} }{}, }, }, pic me set/.code n args=2{% \forestset{% #1/.style={% inner xsep=2\Size, pic me={pic {#2}}, } } }, pic me set={directory}{folder}, pic me set={file}{file}, } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %===========================================% \makeatletter \def\dirtree@dot@radius{0.5pt} \def\dirtree@vdots@length{5pt} \forestset{% declare toks={real siblings}{}, continue/.style={% delay={% if n children=0{% before computing xy={% for current and following siblings={% s'+=-10pt, }, }, if n=1{% edge path'={% (!u.parent anchor) ++(\foresteregister{folder indent},0pt) coordinate (a) -- ($(!u.parent anchor -| a)!1/3!(.child anchor -| a)$) edge [dotted] ($(!u.parent anchor -| a)!2/3!(.child anchor -| a)$) ($(!u.parent anchor -| a)!2/3!(.child anchor -| a)$) |- (.child anchor) }, }{% edge path'={% (!u.parent anchor |- !p.child anchor) ++(\foresteregister{folder indent},0pt) coordinate (a) -- ($(!p.child anchor -| a)!1/3!(.child anchor -| a)$) edge [dotted] ($(!p.child anchor -| a)!2/3!(.child anchor -| a)$) ($(!p.child anchor -| a)!2/3!(.child anchor -| a)$) |- (.child anchor) }, }, for following siblings={% edge path'={% (!u.parent anchor |- !p.child anchor) ++(\foresteregister{folder indent},0pt) |- (.child anchor) }, }, }{% prepend={[\strut, delay={% do dynamics, temptoksa=, for following siblings={% if temptoksa={}{}{% temptoksa+={,}, }, temptoksa+/.option=name, }, real siblings/.register=temptoksa, folder, grow'=0, before computing xy={% l'=0pt, s'=-\dirtree@vdots@length, % length of vdots }, delay n=2{% split option={real siblings}{,}{append}, }, before typesetting nodes={% temptoksa/.option=name, delay={ do dynamics, for children={ if n=1{ edge path'={% (!uu.parent anchor) ++(\foresteregister{folder indent},0pt) coordinate (a) -- ($($(a)!1/2!(.child anchor -| a)$)+0.5*(0,\dirtree@vdots@length)$) coordinate (A\foresteoption{id}) % ($($(a)!1/2!(.child anchor -| a)$)-0.5*(0,\dirtree@vdots@length)$) coordinate (B\foresteoption{id}) |- (.child anchor)% }, tikz+={ \coordinate (A') at ($(A\foresteoption{id})+(0,\dirtree@dot@radius)$); \coordinate (B') at ($(B\foresteoption{id})-(0,\dirtree@dot@radius)$); \coordinate (C) at ($0.25*($(B')-(A')$)$); \fill ($(A')+(C)$) circle (\dirtree@dot@radius); \fill ($(A')+2*(C)$) circle (\dirtree@dot@radius); \fill ($(A')+3*(C)$) circle (\dirtree@dot@radius); }, }{ edge path'={% (!uu.parent anchor) ++(\foresteregister{folder indent},0pt) coordinate (a) (a |- !p.child anchor) |- (.child anchor) }, }, }, }, }, }, no edge, ]}, }, }, }, to be continued/.style={% delay={% append={[\strut, folder, grow'=0, before computing xy={% l'=0pt, s'=0pt, }, if n children=0{% before drawing tree={% delay={% y/.min={>O{y}}{parent,descendants}, }, }, }{}, edge path'={% (!uu.parent anchor |- !u.child anchor) ++(\foresteregister{folder indent},0pt) coordinate (a) -- (.parent anchor -| a) coordinate (A\foresteoption{id}) % ([yshift=-\dirtree@vdots@length]% length of vdots A\foresteoption{id}) coordinate (B\foresteoption{id}) }, tikz+={ \coordinate (A') at ($(A\foresteoption{id})+(0,\dirtree@dot@radius)$); \coordinate (B') at ($(B\foresteoption{id})-(0,\dirtree@dot@radius)$); \coordinate (C) at ($0.25*($(B')-(A')$)$); \fill ($(A')+(C)$) circle (\dirtree@dot@radius); \fill ($(A')+2*(C)$) circle (\dirtree@dot@radius); \fill ($(A')+3*(C)$) circle (\dirtree@dot@radius); }, ]}, }, }, } \makeatother %===========================================% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} \begin{forest} pic dir tree, pic root, for tree={% folder icons by default; override using file for file icons directory, s sep=1cm, l sep=1cm }, [system [config ] [lib [file.txt, file ] ] ] \end{forest} \begin{forest} pic dir tree, pic root, for tree={% folder icons by default; override using file for file icons directory, s sep=1cm, l sep=1cm }, [system, continue [config ] [lib, to be continued [file.txt, file, to be continued ] ] ] \end{forest} \end{document}

  • How to get the position of a box relative to vsize and hsize?
    by MBE on February 14, 2026 at 8:21 pm

    Is there a way to get the position of box TestB without measuring? \parindent=0pt \newbox\testA \newbox\testB \newbox\testC \newdimen\tskip \tskip=0.5\hsize \newdimen\kskip \kskip=0.1\vsize \setbox\testA=\vbox{\hsize=3cm (TestboxA)} \setbox\testB=\vbox{\hsize=3cm (TestboxB)} \setbox\testC=\vbox{\hsize=3cm (hor:\the\tskip \vskip0.1\baselineskip ver:\the\kskip \vskip0.1\baselineskip TestboxC)} Hsize=\the\hsize Vsize= \the\vsize \hbox{\copy\testA}\vskip\kskip \hskip\tskip\hbox{\copy\testC} x x x x x x x x x \hbox{\copy\testB} \bye

  • expex gloss does not center inside center environment
    by Thomas on February 14, 2026 at 4:27 pm

    This is my first question here; please let me know if anything is missing. I am trying to center an interlinear gloss produced with the expex package. The center environment works correctly for normal text, but it has no effect on the gloss created with \begingl … \endgl. Here is a minimal working example: %!TEX program = xelatex \documentclass[12pt]{article} \usepackage{expex} \begin{document} \begin{center} vṛndāyai tulasī-devyai priyāyai keśavasya ca viṣṇu-bhakti-prade devī satyavatyai namo namaḥ \begingl \gla keśavasya ca // \glb {to Lord Keśava} and // \endgl \end{center} \end{document} I compile this using latexmk with the xelatex engine. The first two lines are centered correctly, but the gloss remains left-aligned. I would like the gloss to be centered in the same way as the text above it. How can I center an expex gloss so it looks similar to the lines above it? Here is the resulting output:

  • Add a Transparent Effect to an Oval Image
    by DDS on February 14, 2026 at 3:14 pm

    Consider the code: \documentclass{book} \usepackage{xcolor,graphicx,comment} \usepackage[abs]{overpic} \usepackage{tikz} \definecolor{cadmiumgreen}{rgb}{0.0, 0.42, 0.235} % 0, 107, 60 \definecolor{Gold}{RGB}{228,168,73} \usepackage{transparent} \begin{document} \thispagestyle{empty} \begin{center} \begin{tikzpicture} \clip (0,0) ellipse (4.25cm and 5.5cm); \draw[line width=5pt,Gold,fill=cadmiumgreen] ellipse (4.25cm and 5.5cm); \node at (0,0) {\includegraphics[scale=.37,clip, trim = 0 0 0 0]{example-image-a}}; \draw[line width=12pt,Gold!70!black] ellipse (4.25cm and 5.5cm); \end{tikzpicture} \end{center} \begin{comment} \begin{center} \begin{tikzpicture} \clip (0,0) ellipse (4.25cm and 5.5cm); \draw[line width=5pt,Gold,fill=cadmiumgreen] ellipse (4.25cm and 5.5cm); \node at (0,0) {\includegraphics[scale=.37,clip, trim = 0 0 0 0]{example-image-a}\llap{\texttransparent{0.5}{\color{blue!35}}}}; \draw[line width=12pt,Gold!70!black] ellipse (4.25cm and 5.5cm); \end{tikzpicture} \end{center} \end{comment} \begin{figure} [!htb] \centering \includegraphics[width=8em,height=11em]{example-image}\llap{\texttransparent{0.5}{\color{blue!35}\rule{8em}{11em}}} \end{figure} \end{document} which produces the output: Now, I would like to add a visible (bluish) transparent effect to the first (green oval) image. However, when I try to incorporate the effect shown in the second image into the first, nothing seems to happen; that is, when I run the MWE with the \begin{comment}, \end{comment} taken out---nothing seems to happen. QUESTION: How may I add a transparent (blueish in this case) effect to the first (oval) image? Thank you.

  • TikZ forest: evenly spaced vertical dots in directory tree
    by Grass on February 14, 2026 at 3:10 pm

    I modified cfr's previous answer to draw three evenly spaced vertical dots. A sketch of the desired look is as follows, where the blue line is imaginary (only there for illustrative purposes) and should not be actually drawn by TikZ. But, only one set of my custom vdots are drawn by TikZ. Any idea how to fix this? I tried appending the node names (e.g. (A)) with a counter ((A \the<counter_name>)) that is incremented with each invocation of vdots. But that didn't seem to work at all. MWE: % Source - https://tex.stackexchange.com/a/755401 % Posted by cfr, modified by community. See post 'Timeline' for change history % Retrieved 2026-02-14, License - CC BY-SA 4.0 \documentclass[border=10pt,multi,tikz]{standalone} % ateb: https://tex.stackexchange.com/a/754955/ % ateb: https://tex.stackexchange.com/a/755401/ \usepackage[edges]{forest} \usetikzlibrary{calc} \definecolor{folderbg}{RGB}{124,166,198} \definecolor{folderborder}{RGB}{110,144,169} \newlength\Size \setlength\Size{4pt} \tikzset{% folder/.pic={% \draw [draw=folderborder, sharp corners, top color=folderbg!50, bottom color=folderbg ] (-1.05*\Size,0.2\Size+5pt) rectangle ++(.75*\Size,-0.2\Size-5pt); \draw [draw=folderborder, sharp corners, top color=folderbg!50, bottom color=folderbg ] (-1.15*\Size,-\Size) rectangle (1.15*\Size,\Size); }, file/.pic={% \filldraw [draw=folderborder, sharp corners, top color=folderbg!5, bottom color=folderbg!10] (-\Size,.4*\Size+5pt) coordinate (a) |- (\Size,-1.2*\Size) coordinate (b) -- ++(0,1.6*\Size) coordinate (c) -- ++(-5pt,5pt) coordinate (d) -- cycle (d) |- (c) ; }, } \forestset{% declare autowrapped toks={pic me}{}, declare boolean register={pic root}, pic root=0, declare keylist={additional edge options}{}, pic dir tree/.style={% for tree={% folder, font=\ttfamily, grow'=0, }, before typesetting nodes={% for tree={% edge label+/.option={pic me}, }, if pic root={ tikz+={ \pic at ([xshift=\Size].west) {folder}; }, align={l} }{}, }, }, pic me set/.code n args=2{% \forestset{% #1/.style={% inner xsep=2\Size, pic me={pic {#2}}, } } }, pic me set={directory}{folder}, pic me set={file}{file}, } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %===========================================% \makeatletter \def\dirtree@dot@radius{1pt} \forestset{% declare toks={real siblings}{}, vdots@root/.style={% delay={% if n children=0{% before computing xy={% for current and following siblings={% s'+=-10pt, }, }, if n=1{% edge path'={% (!u.parent anchor) ++(\foresteregister{folder indent},0pt) coordinate (a) -- ($(!u.parent anchor -| a)!1/3!(.child anchor -| a)$) edge [dotted] ($(!u.parent anchor -| a)!2/3!(.child anchor -| a)$) ($(!u.parent anchor -| a)!2/3!(.child anchor -| a)$) |- (.child anchor) }, }{% edge path'={% (!u.parent anchor |- !p.child anchor) ++(\foresteregister{folder indent},0pt) coordinate (a) -- ($(!p.child anchor -| a)!1/3!(.child anchor -| a)$) edge [dotted] ($(!p.child anchor -| a)!2/3!(.child anchor -| a)$) ($(!p.child anchor -| a)!2/3!(.child anchor -| a)$) |- (.child anchor) }, }, for following siblings={% edge path'={% (!u.parent anchor |- !p.child anchor) ++(\foresteregister{folder indent},0pt) |- (.child anchor) }, }, }{% prepend={[\strut, delay={% do dynamics, temptoksa=, for following siblings={% if temptoksa={}{}{% temptoksa+={,}, }, temptoksa+/.option=name, }, real siblings/.register=temptoksa, folder, grow'=0, before computing xy={% l'=0pt, s'=-15pt, }, delay n=2{% split option={real siblings}{,}{append}, }, before typesetting nodes={% temptoksa/.option=name, delay={ do dynamics, for children={ if n=1{ edge path'={% (!uu.parent anchor) ++(\foresteregister{folder indent},0pt) coordinate (a) -- ($(a)!1/3!(.child anchor -| a)$) coordinate (A) % ($(a)!2/3!(.child anchor -| a)$) coordinate (B) % ($(a)!2/3!(.child anchor -| a)$) |- (.child anchor)% }, tikz+={ \coordinate (A') at ($(A)+(0,\dirtree@dot@radius)$); \coordinate (B') at ($(B)-(0,\dirtree@dot@radius)$); \coordinate (C) at ($0.25*($(B')-(A')$)$); % Debugging % \draw[blue] ($(A')-(5pt,0)$) -- ($(A')+(5pt,0)$); % \draw[red] ($(A')+(C)-(5pt,0)$) -- ($(A')+(C)+(5pt,0)$); % \draw[red] ($(A')+2*(C)-(5pt,0)$) -- ($(A')+2*(C)+(5pt,0)$); % \draw[red] ($(A')+3*(C)-(5pt,0)$) -- ($(A')+3*(C)+(5pt,0)$); % \draw[red] ($(A')+4*(C)-(5pt,0)$) -- ($(A')+4*(C)+(5pt,0)$); % \draw[blue] ($(B')-(5pt,0)$) -- ($(B')+(5pt,0)$); \fill ($(A')+(C)$) circle (\dirtree@dot@radius); \fill ($(A')+2*(C)$) circle (\dirtree@dot@radius); \fill ($(A')+3*(C)$) circle (\dirtree@dot@radius); }, }{ edge path'={% (!uu.parent anchor) ++(\foresteregister{folder indent},0pt) coordinate (a) (a |- !p.child anchor) |- (.child anchor) }, }, }, }, }, }, no edge, ]}, }, }, }, vdots@others/.style={% delay={% append={[\strut, folder, grow'=0, before computing xy={% l'=0pt, s'=-15pt, }, if n children=0{% before drawing tree={% delay={% y/.min={>O{y}}{parent,descendants}, }, }, }{}, edge path'={% ([xshift=\forestregister{folder indent}]!uu.parent anchor) coordinate (a) -- ([yshift=9pt].parent anchor -| a) coordinate (A) % (.parent anchor -| a) coordinate (B) }, tikz+={ \coordinate (A') at ($(A)+(0,\dirtree@dot@radius)$); \coordinate (B') at ($(B)-(0,\dirtree@dot@radius)$); \coordinate (C) at ($0.25*($(B')-(A')$)$); \fill ($(A')+(C)$) circle (\dirtree@dot@radius); \fill ($(A')+2*(C)$) circle (\dirtree@dot@radius); \fill ($(A')+3*(C)$) circle (\dirtree@dot@radius); }, ]}, }, }, vdots/.style={ if level = 0{vdots@root}{vdots@others} } } \makeatother %===========================================% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} \begin{forest} pic dir tree, pic root, for tree={% folder icons by default; override using file for file icons directory, }, [system,vdots [config ] [lib,vdots [Access, vdots ] [Plugin, vdots ] [file.txt, file,vdots ] ] ] \end{forest} \end{document}

  • breve and macron over several letters
    by rensemil on February 14, 2026 at 2:57 pm

    I am using the metre package for metrical notation of Latin text. Here is my MWE: \documentclass[12pt]{article} \usepackage{metre} \begin{document} \begin{metrica} \=a \={ae} \-a \-{ae} \end{metrica} \end{document} This produces: The ā and ă are fine, but as you can see, with both of the "ae"s, the diacritics don't stretch to fill the whole width of the letters. Is it possible to change this so that the symbol matches the width of however many letters are under it? I would like it to work for not just 2 letters, but ideally as many as possible, e.g. I want to be able to draw a macron or even a breve over "huius" when I mark it as being one single syllable and the diacritic should then stretch to be as wide as it has to be to cover the whole word. This is what it should look like (note the macron in the first line on "praebeo" and the brevia on "aut" and "improbae". Thanks in advance!

  • prime symbol sometimes in the wrong position with kpfonts-otf, how to replace it from another font?
    by Jinwen on February 14, 2026 at 10:30 am

    Consider the following example: \documentclass{article} % \usepackage{kpfonts-otf} \usepackage{unicode-math} \setmathfont{KpMath-Regular.otf} % \setmathfont{texgyrepagella-math.otf}[range={\prime}] \begin{document} \( E^{E'}_{E'} \) \( E' \) \end{document} The prime symbol in the subscript is clearly in the wrong position: I tried to replace this symbol by, say, \setmathfont{texgyrepagella-math.otf}[range={\prime}], but instead of replacing the symbol from another font, it makes the situation worse: Is there any way to fix this behavior, or at least be able to replace this symbol from another font for which the display is correct? (Perhaps other than contacting the author of kpfonts-otf, as he is quite busy recently...)

  • Display a range of values with the associated unit
    by Nicolas on February 14, 2026 at 9:24 am

    I would like to be able to display in my text a range of values with the associated unit, for example 50-200 μm: I found well how to write"50 to 200 µm" (\qtyrange[range-units = single]{50}{200}{\micro\m}) or "50-200" (\numrange[range-phrase = --]{5}{200}) but nothing to make a mix of 2. Does anyone have any idea? \documentclass{article} \usepackage[T1]{fontenc} \usepackage[french]{babel} \usepackage{siunitx} \begin{document} \qtyrange[range-units = single]{50}{200}{\micro\m} \numrange[range-phrase = --]{5}{200} \end{document}

  • Strange geometric calculation error of ellipse with `arc` in tikz?
    by Explorer on February 14, 2026 at 7:33 am

    I want to plot something as below in an elegant appraoch, with a handy control of the angle and eccentricity: (the pattern is not important here) Here below, I make some calculations: \documentclass[tikz,border=5pt]{standalone} \begin{document} \begin{tikzpicture}[line join=round] \def\R{5} \def\ell{0.9} \def\startAngle{40} \def\endAngle{90-\startAngle} \def\rhoo{\fpeval{\R*sind(45-\startAngle)/cosd(\startAngle)}} \def\Rx{\fpeval{\rhoo*(sqrt(1-(\ell^2*cosd(\startAngle)^2)))/(sqrt(1-\ell^2))}} \def\Ry{\fpeval{\Rx*(sqrt(1-\ell^2))}} \def\ellstartAngle{\fpeval{atand(\Rx/\Ry*tand(\startAngle))}} \filldraw[ fill=cyan!30, draw=cyan, very thick ] (\R,0) arc[start angle=0, end angle=\startAngle, radius=\R] { [rotate=-\startAngle] arc[start angle=-\ellstartAngle,end angle=180+\ellstartAngle,x radius=\Rx,y radius=\Ry] } arc[start angle=\endAngle, end angle=90, radius=\R] -- (0,\R) -- (\R,\R) -- cycle; \end{tikzpicture} \end{document} But it gives some drawbacks of the ellipse's ending tip: With the following sketch: My calculation thoughts is as below: noted that \StartAngle is \theta, and \ell is the ellipse's eccentricity with \def\rhoo{\fpeval{\R*sind(45-\startAngle)/cosd(\startAngle)}}, I want to derive the radius from origin of the ellipse, that is the \rho's distance in the sketch with the formula of the radius length from origin of the ellipse, that is: I want to derive the x-radius of ellipse, that is a(\Rx) via \def\Rx{\fpeval{\rhoo*(sqrt(1-(\ell^2*cosd(\startAngle)^2)))/(sqrt(1-\ell^2))}} Then I calaulated the y-radius with \Rx and \ell via \def\Ry{\fpeval{\Rx*(sqrt(1-\ell^2))}} Finally, I calculate the geometric angle of sub-path rotation learning from this answer via \def\ellstartAngle{\fpeval{atand(\Rx/\Ry*tand(\startAngle))}} I really have no idea of any mathematical calculation issues or just my tikz's parameter misunderstandings. Could somebosy give me a hand? (Any approach with neat syntax are all welcome! My calculation above is just to draw this in one \path)

  • tabularx: more horizontal distance between {|X| |X|}
    by cis on February 14, 2026 at 7:05 am

    How do I get more horizontal distance ? \documentclass[paper=a5]{scrarticle} \usepackage[margin=14mm, showframe=true]{geometry} \usepackage{tabularx,hhline,booktabs} \begin{document} \setlength{\arrayrulewidth}{3pt}% to see the rules clearly %\setlength{\tabcolsep}{5mm}% ungood \noindent% \begin{tabularx}{\textwidth}{|X| |X|} \hhline{|-||-|} Content Column 1 & Content Column 2 \\ \hhline{|-||-|} \end{tabularx} \end{document}

  • Multiple independent compound numbering series in `chemnum` (generalizing two-series solution)
    by monty01 on February 13, 2026 at 9:48 pm

    I am using the chemnum package together with chemstyle to label compounds in reaction schemes. By default, chemnum only provides a single global counter (cmpdmain), so compounds are numbered like: 1, 2, 3a, 3b, 4 … However, I need multiple independent numbering series, for example: literature compounds -> 1, 2, 3… target compounds -> T1, T2… intermediates -> INT1, INT2… supplementary information -> S1, S2… So effectively I want arbitrary named numbering series: \seriesBegin{EG} \replacecmpd{a} \seriesEnd \seriesBegin{INT} \replacecmpd{b} \seriesEnd and each series should continue later in the document without resetting. What I already found This answer provides a clever workaround for two parallel numbering series by saving and restoring cmpdmain: https://tex.stackexchange.com/a/759086/433835 code \documentclass{article} \usepackage{graphicx} \usepackage{chemstyle} % Provides the 'scheme' float environment (and general chem document styling) \usepackage{chemnum} % Provides compound numbering + psfrag-like replacement via \replacecmpd / \cmpd % --- Two "parallel" compound series trick ------------------------------------ % chemnum internally uses ONE main counter: cmpdmain. % To emulate two independent series (literature vs EG), we: % 1) save the current main counter value % 2) swap in the saved EG counter state % 3) turn on the "EG" prefix % 4) after the EG block, save the updated EG state and restore the main counter \newcounter{cmpdMainSaved} % temp storage: saves the current literature/main cmpd counter \newcounter{cmpdEGstate} % persistent storage: remembers where the EG series left off \newcommand{\EGseriesBegin}{% % Save the current "main" (literature) compound counter: \setcounter{cmpdMainSaved}{\value{cmpdmain}}% % Switch cmpdmain to the last saved EG state (so EG numbering continues): \setcounter{cmpdmain}{\value{cmpdEGstate}}% % Turn on a bold "EG" prefix for printing compound labels (EG1, EG2, ...): \setchemnum{pre-label-code=\textbf{EG}}% } \newcommand{\EGseriesEnd}{% % Save the updated EG state (so the next EG block continues where we stopped): \setcounter{cmpdEGstate}{\value{cmpdmain}}% % Turn off the EG prefix (back to plain numbers): \setchemnum{pre-label-code=}% % Restore the literature/main counter exactly where it was before EG mode: \setcounter{cmpdmain}{\value{cmpdMainSaved}}% } \begin{document} % --- Literature compounds: should print as 1,2 -------------------------------- \begin{scheme}[H] \replacecmpd{lit:a.1} % Register/replace the placeholder in the graphic with compound "1a" \replacecmpd{lit:b} % Register/replace the placeholder in the graphic with compound "2" \includegraphics[width=.5\linewidth]{PhH-and-PhMe} \caption{Normal numbering} \end{scheme} % --- Your target compounds: should print as EG1, EG2 --------------------------- \EGseriesBegin % Switch into EG-series mode (prefix + separate counter state) \begin{scheme}[H] \replacecmpd{eg:a.1} % Register/replace placeholder with "EG1a" \replacecmpd{eg:b} % Register/replace placeholder with "EG2" \includegraphics[width=.5\linewidth]{PhH-and-PhMe} \caption{EG numbering} \end{scheme} \EGseriesEnd % Leave EG mode and restore literature numbering \cmpd{eg:a.1}, \cmpd{eg:b} \cmpd{lit:a.1}, \cmpd{lit:b} % --- Continue EG series: should now print as EG3, EG4 -------------------------- \EGseriesBegin \begin{scheme}[H] \replacecmpd{eg:d} % Expected: EG3 \replacecmpd{eg:e} % Expected: EG4 \includegraphics[width=.5\linewidth]{PhH-and-PhMe} \end{scheme} \EGseriesEnd \cmpd{eg:e} % --- Back to literature series: continues as 3,4 ------------------------------- \begin{scheme}[H] \replacecmpd{lit:c} % Expected: 3 \replacecmpd{lit:d} % Expected: 4 \includegraphics[width=.5\linewidth]{PhH-and-PhMe} \caption{Normal numbering} \end{scheme} \cmpd{lit:c} % --- Later EG block: continues again (no reset) -------------------------------- % NOTE: If you ever want to restart the EG series at EG1, you can reset the state: % \setcounter{cmpdEGstate}{0} \EGseriesBegin \begin{scheme}[H] \replacecmpd{eg:f} \replacecmpd{eg:g} \includegraphics[width=.5\linewidth]{PhH-and-PhMe} \end{scheme} \EGseriesEnd \end{document}

  • Independent pages and subpages
    by Mockingbird on February 13, 2026 at 2:15 pm

    I am working on a typographical project that consists in an English translation from a foreign language text with a commentary. I would like to organise the material as follows: on the left page (i.e., on even-numbered pages) the original text on the right page (i.e., on odd-numbered pages) the English translation The two texts should run independently of each other. In other words, the original text should scroll along the left pages and the English text along the right. Moreover I would like to have the commentary at the bottom of each page and this should also run independently of the rest, following, contrarily to the two previous points, the flow of each page, without distinction of even or oddness. I would like also an horizontal line separating the commentary from the rest, although at the moment I do not care whether the line on the left page is aligned with the one on the right. What packages should I use? Are there any templates already available with similar characteristics? Suggestions from the experts? Thank you in advance for your help. Later edit: with the help of the packages reledpar and reledmac I managed to address 1. and 2. Here is a minimal example with a solution I am satisfied with. \documentclass[12pt,twoside]{book} \usepackage[english]{babel} \usepackage[T1{fontenc} \usepackage[series{},nocritical,noend,noeledsec,nofamiliar,noledgroup]{reledmac} \usepackage{reledpar} \usepackage{blindtext} \usepackage{geometry} \title{Test} \author{Cardinal Puff} \date{\today} \begin{document} \frontmatter \maketitle \mainmatter \begin{pages} \begin{Leftside} \selectlanguage{latin} \beginnumbering \pstart \blindtext[12] \pend \endnumbering \end{Leftside} \begin{Rightside} \beginnumbering \pstart \blindtext[12] \pend \endnumbering \end{Rightside} \end{pages} \Pages \end{document} However, in those packages I did not find an option to have a running bottom text independent of the upper part. In conclusion, 3. has still to be solved.

  • Any better suggestions with the pos of arrow on arc with tikz?
    by Explorer on February 13, 2026 at 12:25 pm

    This question is similar to this link, but not exactly the same focues. What I want, is something like: But I want a better looking and better syntax of the arrow: The figure above is produced by: \documentclass[tikz,border=5pt]{standalone} \usetikzlibrary{bending,decorations.markings,arrows.meta,calc,spath3} \usepackage{amsmath} \begin{document} \begin{tikzpicture}[ >={Kite[inset=0pt,length=.32cm,bend]}, baz/.style={spath/save=curve}, foo/.style={ draw,tips=true,->, spath/remove empty components={curve}, spath/split at keep start={curve}{#1}, spath/use=curve }, foo/.default=0.5, ] \filldraw[thick,fill=gray!40] (4,0) node[below]{$R$} arc (0:180:4) node[below]{$-R$} -- (-3,0) arc(180:0:1) -- (1,0) arc(180:0:1) -- cycle; \path[baz] (4,0) arc (0:90:4);\path[foo=.4]; \path[baz] (0,4) arc (90:180:4);\path[foo]; \path[baz] (-3,0) arc (180:0:1);\path[foo=.55]; \path[baz] (1,0) arc (180:0:1);\path[foo=.55]; \draw[-Stealth] (-5,0) -- (5,0) node[below]{$\Re$}; \draw[-Stealth] (0,0) -- (0,5) node[right]{$\Im$}; \path node[below] {$O$} (60:4) node[above=3pt] {$C_{R}$}; \end{tikzpicture} \end{document} which learning from Andrew Stacey's elegant solution. However, the code above is manually seperated, my \foreach version didn't get expected result: \documentclass[tikz,border=5pt]{standalone} % https://tex.stackexchange.com/a/656167/322482 \usetikzlibrary{bending,decorations.markings,arrows.meta,calc,spath3} \usepackage{amsmath} \begin{document} \begin{tikzpicture}[>={Kite[inset=0pt,length=.32cm,bend]}] \filldraw[ thick,fill=gray!40, spath/save=curve, ] (4,0) node[below]{$R$} arc (0:180:4) node[below]{$-R$} -- (-3,0) arc(180:0:1) -- (1,0) arc(180:0:1) -- cycle; \foreach \pos in {.1,.4,.675,.9}{% \path[ draw=blue,tips=true,->, spath/clone={tmp}{curve}, spath/remove empty components={tmp}, spath/split at keep start={tmp}{\pos}, spath/use=tmp, ]; } \draw[-Stealth] (-5,0) -- (5,0) node[below]{$\Re$}; \draw[-Stealth] (0,0) -- (0,5) node[right]{$\Im$}; \path node[below] {$O$} (60:4) node[above=3pt] {$C_{R}$}; \end{tikzpicture} \end{document} Edited: (I seemed to find some out-of-my-intuition features with spath3 and also reported at here, but actually turn out to be my fault of understanding the pos parameter of curve).

  • Find the intersections of circles using pgfmath
    by Jasper on February 13, 2026 at 11:45 am

    Find the intersections of circles automatically using pgfmath: \documentclass[tikz,border=1cm]{standalone} \begin{document} \begin{tikzpicture} \pgfmathsetmacro{\circleonex}{0} \pgfmathsetmacro{\circleoney}{0} \pgfmathsetmacro{\circleoner}{2} \draw (\circleonex,\circleoney) circle[radius=\circleoner]; \pgfmathsetmacro{\circletwox}{1} \pgfmathsetmacro{\circletwoy}{1} \pgfmathsetmacro{\circletwor}{1.5} \draw (\circletwox,\circletwoy) circle[radius=\circletwor]; % Goal: use a sequence of \pgfmathsetmacro to find both % intersections automatically, if they exist. % It should cleanly degenerate when they no longer coincide. \end{tikzpicture} \end{document}

  • Character variant applied only to initial
    by Apothikon on February 12, 2026 at 5:14 pm

    I am trying to achieve exactly the same result as this question butwith LuaLaTex (so,possibly using Lua OTF handler): Can one set a specific character variant in xelatex for the word first letter only? EDIT: Another approach may be to use a Babel transformation, even though this would make the feature language-related. Any advice? I give here a (very) minimal working example: \documentclass{article} \usepackage{fontspec} \setmainfont{EBGaramond12-Italic.otf} % I want to add: [CharacterVariant=5:0] only to initial v % probably using \directlua {fonts.handlers.otf.addfeature \begin{document} Ha visto un valvassore vivere come un valvassino invidioso che gridava evviva! \end{document}