Week
- uneven commutative diagramby mappingmoe on February 18, 2026 at 11:33 am
I want to draw the following commutative diagram in LaTeX: I have tried tikzcd, but I think I won't work, since the rows have different size. Is there a clean way to do it? EDIT: my first approach was the following: \documentclass[a4paper]{article} \usepackage{tikz-cd} \begin{document} \begin{tikzcd} P \arrow{l}{pr} \arrow{d}{\pi} & TP \arrow{d}{T \pi}\\ I \arrow{ur}{\tilde{\gamma}} \arrow{r}{\dot{\gamma}} & M \arrow{l}{pr} & TM \end{tikzcd} \end{document}
- Issue attempting "fullwidth" image on documentby Atiroocky on February 18, 2026 at 10:22 am
I'm writting report in "Tufte-style" with scrreprt koma-script class. I'm quite happy with the result, but I cannot figure out how to put a figure in full width of the page. I want to keep using koma-script (instead of tufte-style class) because my document contains numerous formating options. To make the report looking like Tufte-style and avoid some conflicts in the margin section, I use : sidenotesplus (provides fullwidth environment with \begin{figure*}…\end{figure*}) marginfix (to avoid conflicts like overlapping, or shifting out of page in margin) Here is the MWE (I only keep 1/3 of all packages, but the misbehavior keep happening). First remark : Claude suggests me calling the addmarginenvironnement. It works, but that does not solve the root issue. Second remark: I thought of a conflict between koma-scriptand geometrypackages. I tried to disable geometryand setup the typearea and margin dimensions with koma options -> same result with the figure shifting on right. Thanks for your help 😉 \documentclass[% parskip=half, oneside, ]{scrreprt} \usepackage[% a4paper, top=10mm, right=15mm, left=90mm, bottom=10mm, headheight=15mm, includeheadfoot, marginparwidth=7cm, marginparsep=9mm, showframe, ]{geometry} \usepackage[T1]{fontenc} \usepackage{scrlayer-scrpage} \usepackage{marginfix} \usepackage[french]{babel} \usepackage{lipsum} \usepackage{xcolor} \usepackage{graphicx} \usepackage{sidecap} \usepackage{subcaption} \usepackage[% mark=arabic, size=footnote, font=sf, shape= up, per=section, ]{sidenotesplus} \pagestyle{scrheadings} \reversemarginpar \title{Report MWE} \author{Name} \date{February 2026} \begin{document} \newgeometry{ a4paper, top=10mm, right=30mm, left=30mm, bottom=10mm, headheight=15mm, includeheadfoot, } \maketitle \tableofcontents \restoregeometry %------------------------------------------------------------- \pagebreak \chapter{First chapter} \section{Introduction - figure in typearea} \lipsum[1] \begin{figure}[h!] \centering \includegraphics[width=\linewidth]{example-image-a} \caption{Figure in text} \end{figure} \newpage \section{First section - figure in margin} First paragragh with a sidenote.\sidenote{First sidenote of report}\\ \lipsum[1-2] \begin{marginfigure} \centering \includegraphics[width=\linewidth]{example-image-b} \caption{Figure in margin} \end{marginfigure} \begin{marginfigure} \centering \includegraphics[width=\linewidth]{example-image-b} \caption{Figure in margin} \end{marginfigure} \begin{marginfigure} \centering \includegraphics[width=\linewidth]{example-image-b} \caption{Figure in margin} \end{marginfigure} Last paragraph of section.\sidenote{second sidenote of report} \newpage \section{Second section - attempt full width} \lipsum[1] \begin{figure*} \centering \includegraphics[width=\linewidth]{example-image-c} \caption{Figure full width ?} \end{figure*} \newpage \section{Third section - work around with addmargin} \begin{figure}[h!] \centering \begin{addmargin*}[-\dimexpr\marginparwidth+\marginparsep\relax]{0pt} \centering \includegraphics[width=\linewidth]{example-image-c} \caption{Figure full width with workaround addmargin} \end{addmargin*} \end{figure} \end{document}
- What packages are useful for drawing topological surfaces? [closed]by Sean Wakasa on February 18, 2026 at 8:37 am
I'm writing a mathematical paper that studies the fundamental groups of surface bundles, hence I need to create images of surfaces of genus greater than 1 with loops drawn on surface. What packages can I use to make such images? See page 8 of this paper for an example of such a surface.
- Libertine font features missing when compiling with xelatex or lualatexby Alf on February 18, 2026 at 8:21 am
I want to use the libertine package in my fonts, as I prefer them over the standard font. Here is a MWE % list every file used to standard output \listfiles \documentclass[ 12pt, a4paper, twoside, chapterprefix=true, % write "Chapter X" in separate line followed by chapter title fleqn, % equations are left-aligned (instead of centered) bibliography=totocnumbered % give bibliography a chapter number and add to ToC ]{scrbook} % for hyphenation for languages with accented characters (should be before inputenc) \usepackage[T1]{fontenc} % load Libertine (Serif), Biolinum (Sans), and Libertine Mono % must be loaded AFTER fontenc \usepackage{libertine} % <---- CHECK THE COMPILATION WARNING!!!!!!!!!!!!!!!!!!!!!!! % allows you to write Umlaute directly \usepackage[utf8]{inputenc} % load the babel package for the english language \usepackage[english]{babel} \begin{document} bla bla bla \end{document} When I compile with pdflatex I get no error/warning. I prefer to use latexmk though, and when I compile with xelatex or lualatex, I get the following warnings: Package fontspec Warning: OpenType feature 'Numbers=Uppercase' (lnum) not available for font 'LinBiolinum_RB' with script 'CustomDefault' and language 'Default'. Package fontspec Warning: OpenType feature 'Numbers=Uppercase' (lnum) not available for font 'LinBiolinum_RB' with script 'CustomDefault' and language 'Default'. Package fontspec Warning: OpenType feature 'Numbers= Monospaced, Lining' (tnum) not available for font 'LinLibertine_RZI' with script 'CustomDefault' and language 'Default'. Package fontspec Warning: OpenType feature 'Numbers= Monospaced, Lining' (tnum) not available for font 'LinLibertine_RZI' with script 'CustomDefault' and language 'Default'. Package fontspec Warning: OpenType feature 'Numbers=Uppercase' (lnum) not available for font 'LinBiolinum_RB' with script 'CustomDefault' and language 'Default'. Package fontspec Warning: OpenType feature 'Numbers=Uppercase' (lnum) not available for font 'LinBiolinum_RB' with script 'CustomDefault' and language 'Default'. This is the output of *File List*: scrbook.cls 2023/07/07 v3.41 KOMA-Script document class (book) scrkbase.sty 2023/07/07 v3.41 KOMA-Script package (KOMA-Script-dependent basics and keyval usage) scrbase.sty 2023/07/07 v3.41 KOMA-Script package (KOMA-Script-independent b asics and keyval usage) scrlfile.sty 2023/07/07 v3.41 KOMA-Script package (file load hooks) scrlfile-hook.sty 2023/07/07 v3.41 KOMA-Script package (using LaTeX hooks) scrlogo.sty 2023/07/07 v3.41 KOMA-Script package (logo) keyval.sty 2022/05/29 v1.15 key=value parser (DPC) tocbasic.sty 2023/07/07 v3.41 KOMA-Script package (handling toc-files) fleqn.clo 2016/12/29 v1.2b Standard LaTeX option (flush left equations) scrsize12pt.clo 2023/07/07 v3.41 KOMA-Script font size class option (12pt) typearea.sty 2023/07/07 v3.41 KOMA-Script package (type area) fontenc.sty 2021/04/29 v2.0v Standard LaTeX package t1lmr.fd 2015/05/01 v1.6.1 Font defs for Latin Modern libertine.sty 2023/11/26 (Bob Tennent) Supports Libertine and Biolinum fonts for all LaTeX engines. ifxetex.sty 2019/10/25 v0.7 ifxetex legacy package. Use iftex instead. iftex.sty 2022/02/03 v1.0f TeX engine tests ifluatex.sty 2019/10/25 v1.5 ifluatex legacy package. Use iftex instead. xkeyval.sty 2022/06/16 v2.9 package option processing (HA) xkeyval.tex 2014/12/03 v2.7a key=value parser (HA) textcomp.sty 2020/02/02 v2.0n Standard LaTeX package fontspec.sty 2022/01/15 v2.8a Font selection for XeLaTeX and LuaLaTeX xparse.sty 2023-10-10 L3 Experimental document command parser expl3.sty 2024-01-22 L3 programming layer (loader) l3backend-luatex.def 2024-01-04 L3 backend support: PDF output (LuaTeX) fontspec-luatex.sty 2022/01/15 v2.8a Font selection for XeLaTeX and LuaLaTeX fontenc.sty 2021/04/29 v2.0v Standard LaTeX package fontspec.cfg LinLibertine_R.tex LinBiolinum_R.tex LinBiolinum_K.tex LinLibertine_I.tex LKey.tex inputenc.sty 2021/02/14 v1.3d Input encoding file babel.sty 2024/01/07 v24.1 The Babel package english.ldf 2017/06/06 v3.3r English support from the babel system babel-english.tex ts1cmr.fd 2023/04/13 v2.5m Standard LaTeX font definitions Any ideas how to get rid of that warnings, i.e. getting these missing features? Update: as requested, the output at the very end of the compilation, when using lualatex: </usr/share/texlive/texmf-dist/fonts/opentype/public/libertine/LinLibertine_R.otf> I installed the fonts by copying them into ~/.local/share/fonts/ and run fc-cache -f -v afterwards, which I thought should be sufficient - or did I miss a step?
- Making code less scattered when crossing a pagebreak in lstlistingby Danya Zh on February 18, 2026 at 4:11 am
I have a large section of code I want to embed in my pdf via lstlisting and it will not fit on a single page. I want to avoid readers having to jump from page to page when trying to understand a section of code. I believe it would be natural to either Force sections of code to be inseparable like with the samepage environment. I don't know how to implement this solution within lstlisting, and that solution seems awkward anyway (each section of code will have to be individually wrapped within a samepage). Duplicate lines of code that are being broken up. If, for example, the code pagebreaks on line 50, instead of going to line 51 on the next page, the code goes to line 45 again. This way the reader has the small section of code from the last page to hang on to. I believe I have seen this solution be implemented in some college course, but I am not sure if this is conventional or even acceptable. Feedback and implementation suggestions appreciated. Minimal example of a code being broken up by a pagebreak is provided below: \documentclass{article} \usepackage{listings} \usepackage{xcolor} \definecolor{codegreen}{rgb}{0,0.6,0} \definecolor{codegray}{rgb}{0.5,0.5,0.5} \definecolor{codepurple}{rgb}{0.58,0,0.82} \definecolor{backcolour}{rgb}{0.95,0.95,0.92} \lstdefinestyle{mystyle}{ backgroundcolor=\color{backcolour}, commentstyle=\color{codegreen}, keywordstyle=\color{magenta}, numberstyle=\tiny\color{codegray}, stringstyle=\color{codepurple}, basicstyle=\ttfamily\footnotesize, breakatwhitespace=false, breaklines=true, captionpos=t, keepspaces=true, numbers=left, numbersep=5pt, showspaces=false, showstringspaces=false, showtabs=false, tabsize=2 } \lstset{style=mystyle} \begin{document} \begin{lstlisting} [ language=C++, caption= {Code for the second part of BB84 problem. Eve eavesdrops on Alice and Bob.}, label=lst:bb84-pt2] #include <cstdlib> #include <cstdio> #include <ctime> #include <vector> using namespace std; const int SIGNAL_LENGTH = 100; int main(void) { srand(time(NULL)); // Initialize bits, bases, and keys bool alice_bits[SIGNAL_LENGTH]; bool alice_bases[SIGNAL_LENGTH]; bool bob_bits[SIGNAL_LENGTH]; bool bob_bases[SIGNAL_LENGTH]; bool eve_bits[SIGNAL_LENGTH]; bool eve_bases[SIGNAL_LENGTH]; vector<bool> alice_key; vector<bool> bob_key; int key_mismatch_count = 0; // Sending and Recieving Bits for (int i = 0; i < SIGNAL_LENGTH; i++) { alice_bases[i] = rand() % 2; bob_bases[i] = rand() % 2; eve_bases[i] = rand() % 2; alice_bits[i] = rand() % 2; eve_bits[i] = (alice_bases[i] == eve_bases[i]) ? alice_bits[i] : (rand() % 2); bob_bits[i] = (eve_bases[i] == bob_bases[i]) ? eve_bits[i] : (rand() % 2); } // Establishing keys for (int i = 0; i < SIGNAL_LENGTH; i++) { if (alice_bases[i] == bob_bases[i]) { alice_key.push_back(alice_bits[i]); bob_key.push_back(bob_bits[i]); key_mismatch_count += (bob_bits[i] != alice_bits[i]); } } // Comparing keys printf("Key length: %d\n", int(alice_key.size())); printf("\nBob's key: "); for (int i = 0; i < int(bob_key.size()); i++) { printf("%d", int(bob_key[i])); } printf("\nAlice's key: "); for (int i = 0; i < int(alice_key.size()); i++) { printf("%d", int(alice_key[i])); } if (key_mismatch_count == 0) { printf("\nThe keys are the same\n"); } else { float mismatch_percent = 100.0 * key_mismatch_count / int(alice_key.size()); printf("\nThe keys are different,\n"); printf("\nThere are %d mismatches, %.2f%% of the key,\n", key_mismatch_count, mismatch_percent); } return 0; }; \end{lstlisting} \end{document}
- Generate random, unique, nonzero integersby pwesterbaan on February 17, 2026 at 8:14 pm
I've been writing some commands that I use to randomize writing exam questions. I currently have the following code for generating "variables" containing (possibly non-zero) random integers: \newcommand{\randIntLower}{1} %Lower bound on rand ints \newcommand{\randIntUpper}{5} %Upper bound on rand ints \newcommand{\randIntTemp}{} %Used for defining values in randInts \newcommand{\randInts}[2][]{% % #1 = option (default: []; Use nz for nonzero) % #2 = list of variables % Uses \randIntLower and \randIntUpper as bounds (change with renewcommand if needed) \foreach \var in {#2}{% \ifstrequal{#1}{nz}{% % nonzero method: produces +/- nonzero random integers \pgfmathparse{int(ifthenelse(rand > 0, 1, -1)*random(\randIntLower,\randIntUpper))}% \expandafter\xdef\var{\pgfmathresult}% }{% \pgfmathrandominteger{\randIntTemp}{\randIntLower}{\randIntUpper}% \expandafter\xdef\var{\randIntTemp}% }% }% } This gives me something like this: \randInts[nz]{\randOne,\randTwo,\randThree} %\randOne -> 4 %\randTwo -> -2 %\randThree -> 4 This code works well enough, with the exception that I might get repeat random numbers. I've also been running into some of the limitations of pgfmath, so I'm now trying to rewrite the above using LaTeX3 syntax (hopefully fewer issues with calculations, and optional arguments aren't as positional). My hope is to have something that behaves as such: \randInts[nz]<1>(5){randOne, randTwo, randThree} %\randOne -> 4 %\randTwo -> -2 %\randThree -> 4 \randInts*[nz]<1>(5){randOne, randTwo, randThree} %\randOne -> 4 %\randTwo -> -2 %\randThree -> 6 It grieves me to say this, but I've been trying to write this with the help of Github's CoPilot. I have been reading whatever Latex3 documentation I could find (e.g. xparse, expl3, l3kernel), but for now, this is what I've got: \ExplSyntaxOn% % Flag: whether to generate ±nonzero \bool_new:N \l__randints_nonzero_bool % Parsed bounds \int_new:N \l__randints_min_int \int_new:N \l__randints_max_int \bool_new:N \l__randints_unique_bool \clist_new:N \l__randints_used_clist \int_new:N \l__randints_range_len_int \int_new:N \l__randints_slots_int % \randInts[nz?]<min>(max){name1,name2,...} % - [nz] or [nonzero]: produce ±(magnitude), where magnitude in [min,max] % - <min> and (max) are *separate* optional delimited args; defaults are 1 and 5 % - names are bare (no leading \); defines \name globally to the drawn integer \cs_new_protected:Npn \__randints_pick_unique:nn #1 #2 { \int_set:Nn \l_tmpa_int { \int_rand:nn { #1 } { #2 } } \prg_do_while:nn { \clist_if_in:NnTF \l__randints_used_clist { \int_to_arabic:n { \l_tmpa_int } } { \prg_return_true: }{ \prg_return_false: } } { \int_set:Nn \l_tmpa_int { \int_rand:nn { #1 } { #2 } } } } \cs_new_protected:Npn \__randints_pick_unique_signed:nn #1 #2 { % Loop until we find a nonzero signed value not yet used \int_zero:N \l_tmpa_int \prg_do_while:nn { % pick magnitude \int_set:Nn \l_tmpb_int { \int_rand:nn { #1 } { #2 } } % reject zero magnitude \int_compare:nNnTF { \l_tmpb_int } = { 0 } { \prg_return_true: } { % pick sign and form signed value \int_set:Nn \l_tmpc_int { \int_rand:nn { 0 } { 1 } } \int_set:Nn \l_tmpc_int { \int_eval:n { ( \l_tmpc_int * 2 - 1 ) * \l_tmpb_int } } \clist_if_in:NnTF \l__randints_used_clist { \int_to_arabic:n { \l_tmpc_int } } { \prg_return_true: } { \int_set:Nn \l_tmpa_int { \l_tmpc_int } \prg_return_false: } } } { } } \NewDocumentCommand \randInts { s o D<>{\randIntLower} D(){\randIntUpper} m } { % Determine nonzero mode from [ #2 ] \bool_set_false:N \l__randints_nonzero_bool \IfNoValueF{#2}{ \tl_if_eq:nnT {#2} {nz} { \bool_set_true:N \l__randints_nonzero_bool } } % starred variant -> unique values (no repeats): #1 is boolean from `s` \IfBooleanTF{#1} { \bool_set_true:N \l__randints_unique_bool } { \bool_set_false:N \l__randints_unique_bool } % Normalize order (so <7>(3) becomes [3,7]) \int_set:Nn \l_tmpa_int { \int_min:nn { \l__randints_min_int } { \l__randints_max_int } } \int_set:Nn \l_tmpb_int { \int_max:nn { \l__randints_min_int } { \l__randints_max_int } } \int_set_eq:NN \l__randints_min_int \l_tmpa_int \int_set_eq:NN \l__randints_max_int \l_tmpb_int % If unique requested, check availability and clear used list \int_set:Nn \l__randints_range_len_int { \int_eval:n { \l__randints_max_int - \l__randints_min_int + 1 } } % compute available slots for uniqueness \int_set:Nn \l__randints_slots_int { \l__randints_range_len_int } \bool_if:NTF \l__randints_unique_bool { \bool_if:NTF \l__randints_nonzero_bool { \int_set:Nn \l__randints_slots_int { \int_eval:n { 2 * \l__randints_range_len_int } } \int_compare:nNnT { \l__randints_min_int } <= { 0 } { \int_compare:nNnT { \l__randints_max_int } >= { 0 } { \int_set:Nn \l__randints_slots_int { \int_eval:n { \l__randints_slots_int - 2 } } } } } { \int_set:Nn \l__randints_slots_int { \l__randints_range_len_int } } \int_compare:nNnTF { \clist_count:n {#5} } > { \l__randints_slots_int } { \PackageError{exam}{Not~enough~unique~integers}{Requested~more~unique~integers~than~available~in~range.} } { \clist_clear:N \l__randints_used_clist } } { \clist_clear:N \l__randints_used_clist } % Generate for each bare name and define \name globally \clist_map_inline:nn { #5 } { \bool_if:NTF \l__randints_nonzero_bool { % \pm nonzero: sign * magnitude (support unique/starred) \bool_if:NTF \l__randints_unique_bool { \__randints_pick_unique_signed:nn { \l__randints_min_int } { \l__randints_max_int } \cs_gset:cpn { ##1 } { \int_to_arabic:n { \l_tmpa_int } } \tl_set:Nx \l_tmpa_tl { \int_to_arabic:n { \l_tmpa_int } } \clist_put_right:Nn \l__randints_used_clist { \l_tmpa_tl } } { \cs_gset:cpn { ##1 } { \int_eval:n { ( \int_rand:nn {0}{1} * 2 - 1 ) * \int_rand:nn { \l__randints_min_int } { \l__randints_max_int } } } } } { % Plain integer in [min,max] or unique selection if starred \bool_if:NTF \l__randints_unique_bool { % pick a unique random value via recursion \__randints_pick_unique:nn { \l__randints_min_int } { \l__randints_max_int } \cs_gset:cpn { ##1 } { \int_to_arabic:n { \l_tmpa_int } } \tl_set:Nx \l_tmpa_tl { \int_to_arabic:n { \l_tmpa_int } } \clist_put_right:Nn \l__randints_used_clist { \l_tmpa_tl } } { \cs_gset:cpn { ##1 } { \int_rand:nn { \l__randints_min_int } { \l__randints_max_int } } } } } } \ExplSyntaxOff% The issues I'm running into are that prg_do_while does not actually exist. The other recommendation that Co-Pilot had was to do a recursive call, but this seems like a worse idea. So, my questions are: What is the syntax for the while loop? How should I write this code? Am I over-complicating this whole problem?
- Spacing in Tikz Heatmapby itc on February 17, 2026 at 6:09 pm
I am struggling with the vertical space of my tikz heatmap. Specifically, my column labels are getting into the title of my diagram. The same is happening with the legend. I have put the MWE: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{matrix, positioning, backgrounds} \begin{document} \begin{tikzpicture}[ font=\sffamily, cell/.style={ rectangle, minimum width=2.5cm, minimum height=1cm, draw=white, line width=0.5mm, align=center }, label/.style={ anchor=east, font=\bfseries\small }, header/.style={ anchor=south, rotate=45, font=\bfseries\small, anchor=south west } ] % Define Colors representing the score (Low, Medium, High) \definecolor{scoreLow}{HTML}{F2F2F2} % Weak/Low \definecolor{scoreMed}{HTML}{84B7D6} % Medium/Partial \definecolor{scoreHigh}{HTML}{004C6D} % Strong/High % Legend formatting \matrix [draw=none, anchor=north west] at (-4, 2) { \node [fill=scoreHigh, text=white, minimum width=1cm] {High/Strong}; & \node [anchor=west] {Jddhdhshdhshss}; \\ \node [fill=scoreMed, text=black, minimum width=1cm] {Zprororo}; & \node [anchor=west] {Trump}; \\ \node [fill=scoreLow, text=black, minimum width=1cm] {Hhdueueu}; & \node [anchor=west] {Ghsshshshs}; \\ }; % --- THE DATA MATRIX --- % Row 1: H % High Behavioural Realism [cite: 29], Low Auditability [cite: 81], Low Probability [cite: 78], High Actionability [cite: 40] \node[cell, fill=scoreHigh, text=white] (c11) at (0,0) {High}; \node[cell, fill=scoreLow, text=black] (c12) at (2.5,0) {Low}; \node[cell, fill=scoreLow, text=black] (c13) at (5,0) {Low}; \node[cell, fill=scoreLow, text=black] (c14) at (7.5,0) {Risk}; \node[cell, fill=scoreHigh, text=white] (c15) at (10,0) {High}; % Row 2: A % Low Realism, High Auditability [cite: 82], Med Probability (Rankings) [cite: 109] \node[cell, fill=scoreLow, text=black] (c21) at (0,-1) {Low}; \node[cell, fill=scoreHigh, text=white] (c22) at (2.5,-1) {High}; \node[cell, fill=scoreMed, text=black] (c23) at (5,-1) {Med}; \node[cell, fill=scoreMed, text=black] (c24) at (7.5,-1) {Med}; \node[cell, fill=scoreMed, text=black] (c25) at (10,-1) {Med}; % Row 3: B % Input oriented [cite: 112], Low actionability alone [cite: 113] \node[cell, fill=scoreLow, text=black] (c31) at (0,-2) {Low}; \node[cell, fill=scoreMed, text=black] (c32) at (2.5,-2) {Med}; \node[cell, fill=scoreLow, text=black] (c33) at (5,-2) {Low}; \node[cell, fill=scoreHigh, text=white] (c34) at (7.5,-2) {High}; \node[cell, fill=scoreLow, text=black] (c35) at (10,-2) {Low}; % Row 4: C % Easier to document [cite: 94], Explore plausibility not prob [cite: 93] \node[cell, fill=scoreMed, text=black] (c41) at (0,-3) {Med}; \node[cell, fill=scoreHigh, text=white] (c42) at (2.5,-3) {High}; \node[cell, fill=scoreLow, text=black] (c43) at (5,-3) {Low}; \node[cell, fill=scoreMed, text=black] (c44) at (7.5,-3) {Med}; \node[cell, fill=scoreMed, text=black] (c45) at (10,-3) {Med}; % Row 5: D % Traceability/Coherence [cite: 96], Probabilistic [cite: 95] \node[cell, fill=scoreLow, text=black] (c51) at (0,-4) {Low}; \node[cell, fill=scoreHigh, text=white] (c52) at (2.5,-4) {High}; \node[cell, fill=scoreHigh, text=white] (c53) at (5,-4) {High}; \node[cell, fill=scoreLow, text=black] (c54) at (7.5,-4) {Low}; \node[cell, fill=scoreMed, text=black] (c55) at (10,-4) {Med}; % Row 6: E % Normative/Pathways[cite: 101], High Actionability \node[cell, fill=scoreLow, text=black] (c61) at (0,-5) {Low}; \node[cell, fill=scoreMed, text=black] (c62) at (2.5,-5) {Med}; \node[cell, fill=scoreLow, text=black] (c63) at (5,-5) {Low}; \node[cell, fill=scoreHigh, text=white] (c64) at (7.5,-5) {High}; \node[cell, fill=scoreHigh, text=white] (c65) at (10,-5) {High}; % Row 7: F % Calibration/Monitoring[cite: 133], High Probability, Low Realism \node[cell, fill=scoreLow, text=black] (c71) at (0,-6) {Low}; \node[cell, fill=scoreHigh, text=white] (c72) at (2.5,-6) {High}; \node[cell, fill=scoreHigh, text=white] (c73) at (5,-6) {High}; \node[cell, fill=scoreLow, text=black] (c74) at (7.5,-6) {Low}; \node[cell, fill=scoreMed, text=black] (c75) at (10,-6) {Med}; % Row 8: G % Adversarial[cite: 122], Low Auditability (often anecdotal) \node[cell, fill=scoreHigh, text=white] (c81) at (0,-7) {High}; \node[cell, fill=scoreLow, text=black] (c82) at (2.5,-7) {Low}; \node[cell, fill=scoreLow, text=black] (c83) at (5,-7) {Low}; \node[cell, fill=scoreLow, text=black] (c84) at (7.5,-7) {Low}; \node[cell, fill=scoreMed, text=black] (c85) at (10,-7) {Med}; % --- LABELS --- % Y-Axis Labels (Methods) \node[label] at (-1.5, 0) {H}; \node[label] at (-1.5, -1) {A}; \node[label] at (-1.5, -2) {B}; \node[label] at (-1.5, -3) {C}; \node[label] at (-1.5, -4) {D}; \node[label] at (-1.5, -5) {E}; \node[label] at (-1.5, -6) {F}; \node[label] at (-1.5, -7) {G}; % X-Axis Labels (Attributes) \node[header] at (0, 0.6) {Fuuueueueu djejejejjejejejejej}; \node[header] at (2.5, 0.6) {Ldhdhdhdd hdhdjddjdjdjdjeieeieiidjd}; \node[header] at (5, 0.6) {LLwhwuquahsajqjqjqjqjqqjssjsj}; \node[header] at (7.5, 0.6) {Kahhwuwuwuddeeicdjsjwjw}; \node[header] at (10, 0.6) {KKsiwiwiwiwyduweueeuee}; % Title \node[anchor=center, font=\bfseries\Large] at (3.5, 3.5) {Xfhfhhe jeeieiei nddjewoo djwiwoxdk msaaakkkwifjfjf}; \node[anchor=center, font=\small, text width=12cm, align=center] at (3.5, 2.8) {Xomtive fhfru dieieo difiwwi dkdfjdkwo ksksskskw.\\ \textit{Fsw7w8 ddijej doofoe cdirirfv iiroflvw dkoeowoxk dfeke.}}; \end{tikzpicture} \end{document} I have attached the screenshot as well:
- Listingsutf8 (plus a JSON preset) Accents moved at start of words (avéré => ééavr)by pikachuyann on February 17, 2026 at 4:15 pm
I am trying to represent a JSON in my document which for documentation purpose has french descriptions inside of strings (which I would like to keep here as the "placeholders" they are). But I don't exactly understand how the string coloring works in listings(utf8) and it seems to move all the accents to the beginning of their words, which isn't ideal. Here's a "minimal" "working" example \documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{xcolor} \usepackage{listingsutf8} \lstset{ inputencoding=utf8, extendedchars=\true, showstringspaces=false, } % The code for JSON is copied from https://gist.github.com/ed-cooper/1927af4ccac39b083440d436d018d253 % obviously I don't understand it fully, and the documentation of listings says absolutely nothing about how coloration of strings work (which is the problem here) \definecolor{jsondelim}{RGB}{20,105,176} \definecolor{jsonnumb}{RGB}{106, 109, 32} \definecolor{jsonstring}{rgb}{0.64,0.08,0.08} \lstdefinelanguage{json}{ numbers=left, numberstyle=\small, frame=single, rulecolor=\color{black}, showspaces=false, showtabs=false, breaklines=true, postbreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\color{gray}\hookrightarrow\space}}, breakatwhitespace=true, basicstyle=\ttfamily\small, upquote=true, morestring=[b]", stringstyle=\color{jsonstring}, literate= *{0}{{{\color{jsonnumb}0}}}{1} {1}{{{\color{jsonnumb}1}}}{1} {2}{{{\color{jsonnumb}2}}}{1} {3}{{{\color{jsonnumb}3}}}{1} {4}{{{\color{jsonnumb}4}}}{1} {5}{{{\color{jsonnumb}5}}}{1} {6}{{{\color{jsonnumb}6}}}{1} {7}{{{\color{jsonnumb}7}}}{1} {8}{{{\color{jsonnumb}8}}}{1} {9}{{{\color{jsonnumb}9}}}{1} {\{}{{{\color{jsondelim}{\{}}}}{1} {\}}{{{\color{jsondelim}{\}}}}}{1} {[}{{{\color{jsondelim}{[}}}}{1} {]}{{{\color{jsondelim}{]}}}}{1} } % --- end of copied json \begin{document} \begin{lstlisting}[language=JSON] "A string with accents - Du texte accentué - Note that accents move to the beginning of a word - Le déplacement des accents est avéré" \end{lstlisting} \end{document} It displays the string somewhat properly (in "red"), except the accents are (a) in front of their respective words (b) in black : Do any one have experienced this and has got ideas ?
- Head-aligning nested tblr tables in merged cells with middle-alignmentby Christopher Gerking on February 17, 2026 at 3:22 pm
I am using tabularray with nested tblr tables. My problem is a nested table being placed inside a "merged" cell of the outer table (spanning two rows using cell{1}{2} = {r=2}{}). In this case, it seems impossible to align the nested table itself to the head of the outer table and, at the same time, align the contents of the nested table to the middle of each cell: \documentclass{article} \usepackage{tabularray} \begin{document} \begin{tblr}{ colspec = {Q Q[h]}, hlines, vlines, cell{1}{2} = {r=2}{m} } {A \\ B \\ C \\ D} & {Head? \\ \begin{tblr}{ colspec={Q[m]}, hlines, vlines, rows = {1cm} } Middle \\ Middle \\ \end{tblr}} \\ {E \\ F \\ G \\ H} & ... \end{tblr} \end{document} Changing the nested table itself to Q[h] will in fact align it to the head, but then any of my attempts to align its cells to the middle failed. These are the two different results: I tried different baseline settings as well, but none of them seems to do the trick. Am I missing something? Thank you in advance.
- Baseline, sub- and superscripts and vertical centering in math-modeby Tapedeck Ghost on February 17, 2026 at 2:13 pm
See my edits below Subscripts are meant to be typeset below the baseline. However in math-mode LaTeX simply ignores this by default and supposes that a symbol like X_i should be centered vertically as a whole. Here is an example of what I mean: Evidently only the X should be centered and the subscript should be ignored when aligning. Why this isn't the default behaviour is beyond me (indeed, in text-mode writing $X_i$ does not raise the letter X above the baseline, because that would be equally nonsensical). Is there any way to make this a default behaviour without declaring new operators or using \raisebox every single time? Edit: As per request, here is the code: \documentclass{article} \begin{document} \[ \prod_{i\in I} X_i \quad \sum_{i\in I} X_i \] \end{document} Second Edit: In light of the fact that I was simply wrong to assume the behaviour I describe above, I've accepted @David Carlisle's answer. I add an example of what I wish to achieve: produced by the following code: \documentclass{article} \begin{document} \[ \textrm{this:}\quad \raisebox{-.07em}{$X=$}\prod_{i\in I} \raisebox{-.07em}{$X_i$} \quad \textrm{and not:} \quad X=\prod_{i\in I} X_i \] \end{document} The difference is subtle, but noticeable. Notice that the space above and below the X_i is roughly equal in the desired example. To the disbelief of @David Carlisle that any typographer of a published text would proceed in such a way , I add two examples, from Munkres, Topology, p. 38 and from Bourbaki, General Topology I p. 88, 🙂 It is not my intention to put the bottom of \sum and \prod on the baseline, but just to refute the claim that it is never done, here is an example from the french version of Bourbaki's Topologie Generale, Chapter I, page 73 🙂
- Introducing a vertical line in a quantikz circuitby Rob on February 17, 2026 at 10:44 am
I have the following circuit generated using quantikz: \documentclass{article} \usepackage{quantikz} \begin{document} \begin{center} \begin{quantikz}[row sep=.2cm, column sep=.5cm] \lstick{$|0\rangle$} & \gate{A} & \gate[2]{B} & \ghost{C} & \gate{D} & \\ \lstick{$|1\rangle$} & & & \gate[2]{C} & \gate{E} & \\ \lstick{$|1\rangle$} & & & & \gate{F} & \end{quantikz} \end{center} \end{document} How can I introduce some vertical lines as shown in the attached screenshot below
- Slope Field Uniform Plotby Nick B on February 16, 2026 at 11:36 am
I am trying to create slope fields based on several examples I have seen on here. My issue is that when I change my equation (the slope field I want to draw) my image does not appear to be square. I would like it uniform. The uniformity changes based on what function I plot. Is there a way to fix this? The image attached is from AP Classroom. Note the uniformity all the way around and how it is square, or flush. that is what I am looking for. \documentclass{standalone} \usepackage{pgfplots} \usetikzlibrary{arrows.meta} \pgfplotsset{compat=1.18} \begin{document} \centering \begin{tikzpicture} \begin{axis}[ view={0}{90}, axis lines=middle, axis equal image, width=10cm, xmin=-5.5, xmax=5.5, ymin=-5.5, ymax=5.5, xtick={-4,-2,2,4}, ytick={-4,-2,2,4}, xlabel=$x$, ylabel=$y$, axis line style={thick, -{Triangle[scale=1.2]}}, clip=false ] \addplot3[ thick, color=red, declare function={ f(\x,\y) = \x; norm(\x,\y) = sqrt(1 + (f(\x,\y))^2); }, quiver={ u={1/norm(x,y)}, v={f(x,y)/norm(x,y)}, scale arrows=0.4, every arrow/.append style={-} }, % -------------------------------- samples=15, domain=-4.2:4.2, domain y=-4.2:4.2 ] {0}; \end{axis} \end{tikzpicture} \end{document}
- Help with abrupt interuption of `tlmgr` with `First directive needs to be 'name'`?by Explorer on February 16, 2026 at 7:59 am
I found no similar answer on the site. Here below is my story. As cfr post the newest package forest-ext on CTAN last month, I need to run tlmgr update --all, and I was waiting for that to update. However, the power supply of personal computer was unexpectedly cut off! Then the tlmgr was broken! When I turn on again, and run with tlmgr update --all again, it complained that: tlmgr update --all First directive needs to be 'name', not at C:/texlive/2025/tlpkg/TeXLive/TLPOBJ.pm line 106, <TMP> line 1. I have no idea with my unlucky case... Any suggestions to relieve my tlmgr? Possible related: tlgmr error: First directive needs to be 'name'… Edited: The explorer.exe's infomration with C:/texlive/2025/tlpkg/TeXLive/TLPOBJ.pm: Information with C:\texlive\2025\tlpkg: Edited Again: Since kind Max Chernoff mentioned at here and here: The error located at my broken texlive.tlpdb. When I replace my texlive.tlpdb with Max's version at here, the error message gone, but maybe some resource's difference, tlmgr doesn't think I have any package to update.... $tlmgr update --all tlmgr.pl: package repositories main = https://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlnet (not verified: gpg unavailable) tlcontrib = https://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlcontrib (not verified: gpg unavailable) tlcritical = https://tug.org/texlive/tlcritical/ (not verified: gpg unavailable) For more about verification, see https://texlive.info/verification.html. tlmgr.pl: saving backups to C:/texlive/2025/tlpkg/backups tlmgr.pl: no updates available As Ulrike Fischer and cabohah's advice, I would give 2026-preset a try😋, which looks more efficient. Edited Finally: With Max's version, and --reinstall, it works: tlmgr install --reinstall forest-ext tlmgr.pl: package repositories main = https://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlnet (not verified: gpg unavailable) tlcontrib = https://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlcontrib (not verified: gpg unavailable) tlcritical = https://tug.org/texlive/tlcritical/ (not verified: gpg unavailable) For more about verification, see https://texlive.info/verification.html. [1/1, ??:??/??:??] reinstall: forest-ext @main [1267k] running mktexlsr ... done running mktexlsr. tlmgr.pl: package log updated: C:/texlive/2025/texmf-var/web2c/tlmgr.log tlmgr.pl: command log updated: C:/texlive/2025/texmf-var/web2c/tlmgr-commands.log However, since ctug.org didn't provide a windows-specific texlive.tlpdb, maybe that is not purely compatible, and maybe not a quite extensive solution to this case.
- \mathunderbar automatically gobbles the subscript following itby Jinwen on February 16, 2026 at 3:27 am
Consider the following example: \documentclass{article} \usepackage{unicode-math} \begin{document} \( \mathunderbar{s}_f \) \( \mathunderbar{s}{}_f \) \end{document} It seems \mathunderbar automatically interprets the subscript following it as part of its argument. Is this behavior by design? Should I thus always write an empty group after it to get the correct output, as in the example above?
- Latex Math bracket right that covers two rows of aligned'sby 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}
- 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?
- LaTeX zref-clever: automatically generate dash-separated figure ranges including non-consecutive labelsby 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 + typingby 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 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.
- breve and macron over several lettersby 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!
- Display a range of values with the associated unitby 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}
- 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).
- Bold math with unicode-math and siunitxby 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.
- Bold small caps in Times New Romanby 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.
- Formatting ToC and chapters in a tagged PDFby wsmith on February 12, 2026 at 4:54 am
I have been tasked with designing a template for creating a tagged PDF that meets certain formatting requirements. The only major obstacle I have encountered is in generating a Table of Contents that meets these (rather stringent) demands. Normally, I would use tocloft for this; however, as it has been pointed out in other posts, this is currently not an option. I have tried working around this, but I must admit that I am out of my depth. Between the default settings and some things I have found on this forum, I have been able to get the ToC to a place that I like. There are three things I still can't figure out: I would like to set the font (italic or boldface) for the chapters, sections, subsection, etc. I would like to force chapter titles to appear uppercase in the ToC. I need to add the word "Page" above the page numbers in the ToC, list of figures, and list of tables. I have a cheap workaround for (2) which is just to make a new command: \newcommand{\Chapter}[1]{\chapter[\MakeUppercase{#1}]{#1}} but this is quite stupid. To acheive (3), I write \makeatletter \newcommand{\pageheaderlabel}{ \hfill\makebox[\@pnumwidth][c]{Page}\par\smallskip } \let\old@starttoc\@starttoc \renewcommand{\@starttoc}[1]{ \pageheaderlabel \old@starttoc{#1} } \makeatother but this is quite hacky (and is slightly off-center). On a somewhat related note, I have been using titlesec as I normally would; e.g, \usepackage[rm, tiny, center, compact]{titlesec} \titleformat{\chapter} {\ifdefined\boldheadings\bfseries\fi\centering\normalsize} {\thechapter.}{1em}{\makeuppercase} \titlespacing*{\chapter} {0pt} {0pt} {20pt} and I have not encountered any issues, despite the fact it is currently marked as incompatible with tagging. If it is breaking something, I cannot tell what. If there are any known workarounds to achieve this without titlesec, that would be much appreciated. ADDENDUM: Here is a stripped down example: % !TeX program = lualatex \DocumentMetadata{uncompress,lang=en, tagging=on, pdfstandard=ua-2,pdfstandard=a-4f} \documentclass[12pt]{report} \usepackage{lipsum} \usepackage[hidelinks]{hyperref} \usepackage{etoolbox} \usepackage[doublespacing]{setspace} \usepackage[letterpaper]{geometry} \geometry{verbose, margin=1in} \usepackage[rm, tiny, center, compact]{titlesec} % FORMATTING OPTIONS: %\def\BoldHeadings{} % <- uncomment to make chapters boldface (Goal: toggle consistently with ToC) \titleformat{\chapter} {\ifdefined\BoldHeadings\bfseries\fi\centering\normalsize} {\thechapter.}{1em}{\MakeUppercase} \titlespacing*{\chapter} {0pt} {0pt} {20pt} % To make "Page" appear above page #'s in TOC \makeatletter \newcommand{\pageheaderlabel}{ \hfill\makebox[\@pnumwidth][c]{Page}\par\smallskip } \let\old@starttoc\@starttoc \renewcommand{\@starttoc}[1]{ \pageheaderlabel \old@starttoc{#1} } \makeatother % add dots, courtesy of linked post \AddToHookWithArguments{contentsline/text/after}{ \ifnum#1=0 \dotfill \fi } % stupid trick to force chapter titles to be uppercase in TOC \newcommand{\Chapter}[1]{\chapter[\MakeUppercase{#1}]{#1}} \begin{document} \chapter*{TABLE OF CONTENTS} \addcontentsline{toc}{chapter}{TABLE OF CONTENTS} \begin{singlespace} \renewcommand\contentsname{\normalfont} {} \begingroup \let\clearpage\relax \let\cleardoublepage\relax \tableofcontents \endgroup \end{singlespace} \newpage % similar for LoF, LoT \Chapter{Fake Chapter} \section{Fake Section} \subsection{Fake Subsection 1} \subsubsection{Fake Subsubsection} \lipsum[3] \subsection{Fake Subsection 2} \lipsum[1] \end{document}