• 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}

  • 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. 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}

  • diagbox pops error : "Package xcolor Error: Undefined color `diagbox'."
    by philippe on February 13, 2026 at 11:14 pm

    Here is the MWE of the code I am attempting to use: \documentclass{article} \usepackage{xcolor} \usepackage{tabularray} \UseTblrLibrary{diagbox} \definecolor{MyLightGray}{gray}{0.9} \begin{document} \begin{table}[h] \centering \begin{tblr}{ colspec={|m{3cm}|X|X|X|}, hlines, vlines, cells={c,m}, } \SetCell{bg=MyLightGray,diagbox={Expertise}{Connaissance}} & \SetCell{bg=MyLightGray} Colonne 1 & \SetCell{bg=MyLightGray} Colonne 2 & \SetCell{bg=MyLightGray} Colonne 3 \\ Aucun / Standard & 0 & 2 & 6 \\ Spécial / COTS & 0 & 2 & 6 \\ \end{tblr} \end{table} \end{document} Here is the error I am getting while compiling : Package xcolor Error: Undefined color `diagbox'. I have no clue where xcolor comes from while it comes to diagbox, I may have a typo or something somewhere, this is driving me crazy! Please feel free to ask for more information, I don't know what more I could provide.

  • 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).

  • Table of Contents disappears when compiling with LaTeX Workshop in VS Code
    by Anur Goradalov on February 13, 2026 at 12:12 pm

    I am writing a large LaTeX book in VS Code using the LaTeX Workshop extension and LuaLaTeX. My file structure looks like this: Desktop/ └── epsilon/ ├── main.tex ├── chapter1.tex ├── chapter2.tex └── ... In main.tex I have: \documentclass[12pt,a4paper]{book} \usepackage[utf8]{inputenc} \begin{document} \tableofcontents \include{chapter1} \include{chapter2} \end{document} I configured LaTeX Workshop with a recipe to compile LuaLaTeX twice to generate the table of contents, and I disabled auto-clean: "latex-workshop.latex.recipe.default": "lualatex twice" "latex-workshop.latex.autoBuild.run": "onSave" "latex-workshop.latex.autoClean.run": "never" "latex-workshop.view.pdf.viewer": "tab" The problem: On the first compile, the table of contents appears correctly. However, on subsequent saves/compiles, the table of contents disappears from the PDF, even though the .toc file still exists in the folder. Things I tried: Changing PDF viewer from "tab" to "external". Using manual terminal compile (lualatex main.tex twice). Using latexmk -lualatex -pdf main.tex. Disabling autoBuild completely. None of these fully fixed the problem in VS Code. Interestingly, when I upload the same project to Overleaf, the table of contents always works, but for large books it sometimes times out during compilation. My questions: Why does the table of contents disappear in VS Code with LaTeX Workshop even when .toc exists? Is there a reliable workflow in VS Code / LaTeX Workshop for large books to generate the table of contents automatically without it disappearing? Are there known limitations with LaTeX Workshop and \tableofcontents for large projects? Thank you for any guidance!

  • 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}

  • Table with pgfplots and title boxes across the entire textwidth
    by cis on February 13, 2026 at 10:16 am

    I want to use the entire \textwidth at a table, so I chose tabularx. The table contains plots (all the same size) and boxes with titles that contain varying amounts of text or lines. The "title boxes" should all be top-aligned, all have the same width and for each row (!) the same height. This means that the "title boxes" in row 1 have the same height, and those in row 3 also have the same height; but possibly a different height than in row 1. What's the best way to configure this? I've put the "title boxes" also into tabularx tables; but perhaps multirow would be more suitable here (?). I often have problems with overfull / underfull hbox warnings here. I don't know what the ideal solution for this. Note: I plan to disable the main table's rules later; I've set \setlength\arrayrulewidth{2pt} here to better visualize the dimensions. \documentclass[paper=a5]{scrarticle} \usepackage[margin=14mm, showframe]{geometry} \usepackage{tabularx} % \usepackage{multirow}% needed? \usepackage{pgfplots} \pgfplotsset{compat=1.18} \usepackage{lipsum}% dummy text \newcommand\mytitle[1]{% {\begin{tabularx}{\linewidth}{|X|} \hline #1 \\ \hline \end{tabularx}} } \newcommand\myplot[1]{% \begin{tikzpicture}[baseline] \begin{axis}[width=\linewidth, height=30mm] \addplot[#1, mark=*]{x^4}; \end{axis} \end{tikzpicture}} \newcolumntype{Y}{% hspaces should be as small as possible @{\hspace{1.5pt}}X@{\hspace{1.5pt}}} \setlength\arrayrulewidth{2pt}% to see the effects \begin{document} \noindent\begin{tabularx}{\textwidth}{| Y | Y |} % Title 1 (row 1, column 1) ================== \mytitle{Title 1: \lipsum[1][1-2]} % Title 2 (row 1, column 2) ================== & \mytitle{Title 2: \lipsum[1][1]} \\ % Plot 1 (row 2, column 1) ================== \myplot{brown} % Plot 2 (row 2, column 2) ================== & \myplot{red} \\ \hline % Title 3 (row 3, column 1) ================== \mytitle{Title 3: \lipsum[1][2]} % Title 4 (row 3, column 2) ================== & \mytitle{Title 4: \lipsum[1][1-4]} \\ % Plot 3 (row 4, column 1) ================== \myplot{blue} % Plot 4 (row 4, column 2) ================== & \myplot{orange} \\ \end{tabularx} \end{document}

  • TeXShop no longer using latexmk
    by jan on February 13, 2026 at 3:14 am

    For many years, I had no problem with using the latexmk directives like: % !TEX TS-program = lualatexmk in TeXShop. Recently, however, that doesn't work anymore - after some update, unfortunately I don't remember exactly when it no longer worked. But now, when I compile something like: % !TEX TS-program = lualatexmk \documentclass[10pt]{article} \begin{document} test \end{document} it always gives me This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025) (preloaded format=pdflatex) restricted \write18 enabled. (or whatever else is selected in TeXShop) My TeX Live is all up to date, and I've deleted TeXShop.plist and all the TeXShop folders to reset but to no avail. Does anyone have any clue about where I should be looking for the problem?

  • Match font size of Cyrillic to Lucida Bright with pdfLaTeX
    by murray on February 13, 2026 at 2:32 am

    Can the size of the Tempora-TLF font be changed to match that of Lucida Bright in a pdfLaTeX document such as the following? (It is a bit too small.) Or is there another Cyrillic font that would better match the size, while still matching well the weight, etc., and if so, exactly how does one use that? % !TEX program = pdflatex \NeedsTeXFormat{LaTeX2e}[2025-11-01] \documentclass{article}[10pt] \usepackage[T2A,T1]{fontenc} \usepackage[russian,english]{babel} \babeltags{russian=russian} \usepackage[expert,lucidascale,vargreek]{lucidabr} \DeclareFontFamilySubstitution{T2A}{\rmdefault}{Tempora-TLF} %\usepackage{fontsize} %\changefontsize[11.7]{9.5} \begin{document} We include work by \textrussian{Александров}, \textrussian{Тихонов}, \textrussian{Урысoн}, and others. \end{document}

  • Can I have individual bibliographystyle's for each chapter in a dissertation?
    by Kristin G on February 12, 2026 at 11:45 pm

    I am working on my dissertation, and am including 2 previously published papers as part of the document, as individual chapters. However, they are published with different citation styles. Chapter 2 needs to use [1] citation style, while Chapter 3 needs to be (Authors, year) style. I cannot seem to figure out how to get each of these chapters to be in the different styles. Any help would be appreciated! I am trying to add a MWE of my code, not entirely sure how to do that, this is my first post. \documentclass[12pt]{thesis} \usepackage{natbib} \usepackage[sectionbib]{natbib} \usepackage{chapterbib} \renewcommand*{\bibfont}{\raggedright} \usepackage{bibentry} \doctype{dissertation} \title{Title} \author{Author} \degree{Doctor of Philosophy} \defensedate{April 09, 2026} \gradyear{2026} \department{MEM} \signatureline{Major Professor } \begin{document} \maketitle \makecopyright \preliminaries \begin{abstract} Put overall dissertation abstract here. \end{abstract} \begin{acknow} I would like to acknowledge everyone who has supported me through my research process and writing of this dissertation. \end{acknow} \tableofcontents \begin{sloppypar} \body \pagenumbering{arabic} \setcitestyle{authoryear,round} \include{Chapter2} \include{Chapter3} \end{sloppypar} \end{document} Chapter 2: \chapter{Chapter 2} \label{Chapter2} \indent This is a previous published work, in which the citations need to be both in brackets as well as in order as they appear in the paper, not alphabetical \citep{hartman2002introductory}. This follows what was published \citep{stewart1999safety}. \\ \bibliographystyle{apa} \bibliography{MWE} Chapter 3: \chapter{Chapter 3} \label{Chapter3} \indent This is a previous published work, in which the citations need to be (author,year) \cite{hartman2002introductory} and in alphabetical order \citep{esmaieli2011selecting}. \\ \bibliographystyle{apa} \bibliography{MWE} Bib file: @book{hartman2002introductory, title={Introductory Mining Engineering}, author={Hartman, H.L. and Mutmansky, J.M.}, year={2002}, publisher={John Wiley}, address={New York}, pages={592}, edition={Second} } @article{esmaieli2011selecting, title={Selecting ore pass-finger raise configurations in underground mines}, author={Esmaieli, Kamran and Hadjigeorgiou, John}, journal={Rock Mechanics and Rock Engineering}, volume={44}, pages={291--303}, year={2011}, publisher={Springer} } @article{stewart1999safety, title={Safety considerations for transport of ore and waste in underground ore passes}, author={Stewart, B and Inverson, S and Beus, M}, year={1999}, volume={51}, number={3}, journal={Mining Engineering}, pages={55--60} }

  • Bold math with unicode-math and siunitx
    by pejsek on February 12, 2026 at 5:42 pm

    I am creating a table that needs a bold header. In the header I want to typeset units using siunitx. I want the units to be inside parentheses. I am also using the unicode-math package and compiling with LuaLaTeX. \documentclass{article} \usepackage{fontspec} \usepackage{unicode-math} \usepackage{booktabs} \usepackage{siunitx} \begin{document} \centering \setlength{\tabcolsep}{5mm} \renewcommand{\arraystretch}{1.1} \begin{tabular}{@{} l c @{}} \toprule \textbf{Material} & \textbf{Density} \(\symbf{ \left( \unit[per-mode=fraction]{\gram\per\centi\metre\cubed} \right) }\) \\ \midrule Air & \num{0.0012} \\ Water & \num{1} \\ \bottomrule \end{tabular} \end{document} The output looks like this: I want all of the header to be bold, including the scalable parentheses and all of the units. Like this: \documentclass{article} \usepackage{fontspec} %\usepackage{unicode-math} \usepackage{booktabs} \usepackage{siunitx} \begin{document} \centering \setlength{\tabcolsep}{5mm} \renewcommand{\arraystretch}{1.1} \begin{tabular}{@{} l c @{}} \toprule \textbf{Material} & \textbf{Density} \boldmath\( \left( \unit[reset-math-version=false,per-mode=fraction]{\gram\per\centi\metre\cubed} \right) \) \\ \midrule Air & \num{0.0012} \\ Water & \num{1} \\ \bottomrule \end{tabular} \end{document} I experimented with some variations of this question but without much success. Thank you for any help.

  • 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}

  • Bold small caps in Times New Roman
    by rensemil on February 12, 2026 at 2:27 pm

    I am using fontspec in order to write in Times New Roman. The authors of cited literature are always set in small caps. This initially made problems because the font has no small caps, but I solved those by googling and finding a solution on stackexchange. However, the small caps don't work when they are also bold, e.g. in a section heading. This is my MWE: \documentclass[12pt]{article} \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} \usepackage{fontspec} \setmainfont{Times New Roman}[ SmallCapsFont={TeX Gyre Termes}, SmallCapsFeatures={Letters=SmallCaps}, ] \begin{document} \section{Regel von \textsc{Ritschl}} Regel von \textsc{Ritschl} \end{document} Which produces: As you can see, the small caps in the text body work just fine. In the heading, however, the small caps are not set bold. When using the ebgaramond package, this issue does not occur and everything looks as it should and very pretty, but, of course, in Garamond: I actually prefer the looks of Garamond but unfortunately I have to write in Times New Roman. Does anyone know how this could be fixed? Thanks in advance! If relevant: I am using LaTeX with LaTeX workshop in VSCode on a MacBook Air.

  • reversed bracket in Awami font (Texlive 2024ff)
    by dietz on February 12, 2026 at 12:30 pm

    In an example like (کتاب 1:4) Awami is reversing the second bracket since Texlive 2024. Is this a bug, and can I get around it? In the following example, Lateef works fine but Awami does not. \documentclass[fontsize=12pt]{scrbook} \usepackage[a6paper]{geometry} \usepackage{fontspec} \usepackage[RTLdocument]{bidi} \setmainfont[Renderer=Graphite,RawFeature={Short forms=All}]{Awami Nastaliq} \newfontfamily\lateef[Script=Arabic]{Lateef-Regular} \TeXXeTstate=1 \begin{document} (کتاب 1:4) {\lateef (کتاب 4:1)} \end{document}

  • How can I geometrically translate a line segment on a line?
    by Jasper on February 12, 2026 at 4:17 am

    How can I geometrically translate a line segment on a line? I want to move the pink segment so that it starts at three and goes to four. I don't just want to teleport it. I want a geometric construction for this - Euclidean style. \documentclass[tikz,border=1cm]{standalone} \begin{document} \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=3pt] {\(0\)}; \fill (1,0) circle[radius = 3pt] node[below=3pt] {\(1\)}; \fill (3,0) circle[radius = 3pt] node[below=3pt] {\(3\)}; \end{tikzpicture} \end{document}

  • First row in table is too high, how to reduce the height automatically?Update by answer
    by MBE on February 11, 2026 at 10:30 pm

    How to employ values I have to derive later?(For skipping spaces in a table)The only way I can think of is to reflect the first column(x) of any row into a dummy column(0) to get the value before using it. But at which point of the code I may do this? ( This table is made of boxes. Crazy code it is,but I think you know me by now) \def\newcounts[#1]{% \csname newcount\expandafter\endcsname\csname start#1\endcsname \csname newcount\expandafter\endcsname\csname stop#1\endcsname} \newcounts[A] \newcounts[B] \newcounts[C] \newcounts[D] \def\newdimens[#1]{ \csname newdimen\expandafter\endcsname\csname #1\endcsname } \newdimens[colwidth]\newdimens[currdp]\newdimens[currht]\newdimens[filldepth]\newdimens[maxdepth] \def\newfonts[#1,#2]{\font#1=#2} \newfonts[\tinyfont,cmr5] \def\t{\par}%shortcut \def\colsep{\hskip20pt} \maxdepth=0.3\vsize %the maxsize of a tablerow \parindent=0pt \colwidth=50pt \raggedright \def\docol[#1]#2{% \setbox#1=\vtop{\vskip\baselineskip\hsize=\colwidth {\tinyfont (#1)}#2\vskip\baselineskip\hrule} \currdp=\dp#1\currht=\ht#1 \advance\currdp by \currht \filldepth=\maxdepth \advance\filldepth by -\currdp \setbox#1=\vtop{\vskip\baselineskip\hsize=\colwidth {\tinyfont (#1)}#2\vskip\filldepth \vskip2\baselineskip \hrule} }%enddoecol %filling boxes for testing \startA=10 \stopA=15 \loop \ifnum\startA<\stopA \docol[\the\startA]{Rund ein Drittel der Bundesrepublik ist bewaldet} %\maxdepth=\currdp%here is the question \advance\startA by 1 \repeat %filling boxes for testing %filling boxes for testing \startA=20 \stopA=25 \loop \ifnum\startA<\stopA %\maxdepth=\currdp%here is the question \docol[\the\startA]{Rund ein Drittel der Bundesrepublik ist bewaldet. Elf Millionen Hektar erstrecken sich von den Küsten im Norden bis zu den Alpen im Süden.} \advance\startA by 1 \repeat %filling boxes for testing %\docol[11]{fjt htjtf bgr bfdd}% this is how a column is built %\docol[12]{fjt htjtf bgr bfdd}% this is how a column is built \def\makerow[#1,#2]{ \hbox{%the maxsize of a tablerow \startA=#1 \stopA=#2 \loop \ifnum\startA<\stopA \colsep\copy\startA \ifvoid\startA[void cell] \startA=\stopA \fi %reporting void cell cancel the loop \advance \startA by 1 \repeat} } \makerow[10,20] \makerow[20,30] \makerow[30,40] \bye

  • Crop certain percent from each side of the figure
    by monty01 on February 11, 2026 at 8:20 pm

    I would like to crop x percent from each side from the img. \documentclass{article} \usepackage{graphicx} \begin{document} \begin{figure}[h] \centering \includegraphics[scale=0.3]{example-image-a} \caption{Caption} \label{fig:placeholder} \end{figure} \end{document} insted of using \includegraphics[scale=0.3]{example-image} I would like to call \cropimg{scale}{img}{crop percentage}

  • Another way to write powers?
    by Lara de Assumpcao Maffei Piero on February 10, 2026 at 10:43 pm

    My new keyboard writes ^ as ˆ, and overleaf doesn't recognize these the same way. Is there an alternative symbol in latex for writting powers and indexes or some way to make overleaf recognize ˆ as ^?