• Fractions with the systeme package
    by mf67 on February 4, 2026 at 6:31 pm

    How do I get alignment in systeme when using fractions? \documentclass{book} \usepackage{amsmath} \usepackage{systeme} \begin{document} \[ \systeme{y+z=72,x+\tfrac{2}{3}y+\tfrac{1}{2}z=72} \] \end{document} I could not find an example with fractions in the French documentation of systeme. I tried brackets, but it did not help. \systeme{y+z=72,x+{\tfrac{2}{3}}y+{\tfrac{1}{2}}z=72}

  • Exceeded TeX capacity when running hilatex with scrartcl and pgfplots
    by Alexander Voigt on February 4, 2026 at 4:56 pm

    I want to generate a test.hnt file from the following test.tex file: \documentclass{scrartcl} % article works \usepackage{pgfplots} % removing this works \begin{document} Hello World! \end{document} When I run hilatex test.tex I get the following error message about exceeded TeX capacity: ! TeX capacity exceeded, sorry [hash size=45000]. \pgfkeyslet ...ter \let \csname pgfk@#1\endcsname #2 l.4831 } The test.log file contains the following information about the issue: ! TeX capacity exceeded, sorry [hash size=45000]. \pgfkeyslet ...ter \let \csname pgfk@#1\endcsname #2 l.4831 } If you really absolutely need more capacity, you can ask a wizard to enlarge me. Here is how much of TeX's memory you used: 22130 strings out of 475903 562725 string characters out of 5796992 1256262 words of memory out of 5000001 45000 multiletter control sequences out of 45000 559137 words of font info for 37 fonts, out of 8000000 for 255 475 hyphenation exceptions out of 8191 108i,7n,107p,10900b,609s stack positions out of 5000i,500n,10000p,2000000b,100000s This issue does not occur when I use article instead of scrartcl. It does also not occur when I remove pgfplots. (However, both are required in my project.) How can I avoid this issue?

  • Determine "optimal" paper size
    by M0M0 on February 4, 2026 at 4:21 pm

    Some LaTeX packages provide nice functionality to compute the optimal margins for a given page size, font and font size. I.e. KOMA-Script does offer the package option DIV=calc and \KOMAoptions{DIV=last}. This, however, leads to rather large margins, if A4 paper is used. I was hence wondering if we can even go one step further and let LaTex also compute the "optimal" paper size (if such a thing exists, but I'm certain that typographers have opinions on this) based on font/font size and the number of columns we use. Of course, this means that if we print the output, we need to cut/trim the paper accordingly.

  • Making the ends of double line invisible in Tikz
    by return true on February 4, 2026 at 3:36 pm

    When drawing a double line, an ugly thin connection between the ends is drawn, as you can see in the image. Is there a way to remove it without manually drawing white over it? Shortening the arrow does not do the job. I am new to Tikz. \documentclass[border=10pt]{standalone} \usepackage{tikz} \begin{document} % Source - https://tex.stackexchange.com/q/759221 % Posted by return true % Retrieved 2026-02-04, License - CC BY-SA 4.0 \begin{tikzpicture} \draw[line width = 2mm, double distance = 4mm, line cap=butt] (0,0) -- (10cm,10cm); \end{tikzpicture} \end{document}

  • Is it possible to sign and check for digital tampering of pdf made with lualatex?
    by Miloop on February 4, 2026 at 2:58 pm

    I am writing a document that can be read and shared freely, but not modified one bit. I want it to "break" once it's sha256 key differs or at least, indicate that it has been changed over time. I have come across this question: It is possible to lock up pdf? where it says it is a duplicate of: Digital signature, where the solution is this link: https://answers.onstartups.com/questions/41625/protecting-works-for-being-able-to-prove-later-ive-done-this-on-this-date that seems broken. I am also aware of digsig which seems more like adding the image of a signature rather than actually generating crytographic keys, etc. I see other stuff like using qpdf and secondary software solution. I wondered if it were possible to do this natively using lualatex? I am using Linux Mint and LuaHBTeX, Version 1.22.0 (TeX Live 2025) I am sorry I have no working example to offer because I'm not even sure where to start. I apologise in advance for my rule-breaking.

  • Review and improvement suggestions for a formal letter layout in LaTeX
    by Jasper on February 4, 2026 at 2:32 pm

    I’m dissatisfied with the formal letter templates on Overleaf and, frankly, with most of the tutorials I’ve found online. I genuinely enjoy written correspondence, and I want my formal letter format to look truly professional. I’ve created my own template for a confidential formal letter based on what I remember from past training, but it’s been a long time. I’d appreciate feedback to help ensure the format looks polished and professional. I did not know what tag to use, so I used layout. Feel free to correct that if you are more familiar this concept than I. \documentclass{article} \usepackage[margin = 1in]{geometry} \usepackage{fontspec,microtype,lipsum}\setmainfont{Carlito} \setlength{\parskip}{0pt} \setlength{\parindent}{0pt} \begin{document} My Name\\ My address\\ My city and postal code\par \vspace{\baselineskip} \today\par \vspace{2\baselineskip} \textbf{CONFIDENTIAL}\par \vspace{2\baselineskip} Name of recipient\\ Their title\\ Their company\\ Their address\\ Their city and postal code\par \vspace{\baselineskip} Dear Name of recipient,\par \vspace{\baselineskip} \lipsum[1]\par \vspace{\baselineskip} \lipsum[2]\par \vspace{\baselineskip} Sincerely,\\ My name \end{document}

  • Improving \widehat, \widetilde, \check etc. with lua code
    by Jinwen on February 4, 2026 at 11:30 am

    In my current (math) font configuration, symbols are taken from different fonts according to need, which usually looks nice but sometimes may produce terrible result due to mixture. For example, for \widehat, \widetilde and \check: It would seem that they are not properly centered for certain letters (B, C, E, F, G, H, K, M, N, etc.), and the width is also not quite uniform, compared with visual expectation. I know that there exists lua code that can edit the kerning of math characters, for example, space between letters, space between letter and subscripts/superscripts, etc. Could the same kind of code also modify/redefine the center, the baseline, the character width, etc.? Here is the lua code I adopted some time ago from this answer that can modify the kerning between letter and scripts. For modifying kerning between symbols, one could see, e.g., this answer. (Unfortunately I do not quite understand how these code work, for example if I change topright to top in wish to change the relative position for hats and tildes, it actually does nothing effective, so this is clearly not the right keyword/switch to use...) Also, I wonder if these lua code can be combined, for example, if I simply put the code for adjusting kerning between symbols/letters inside the code below (within local mathkerns = ...), then nothing effective happens... \directlua { local mathkerns = { ["Asana-Math"] = { [0x1D439] = {% F topright = { {height=0,kern=30}, }, }, [0x1D443] = {% P topright = { {height=0,kern=90}, }, }, [0x1D447] = {% T bottomright = { {height=0,kern=-120}, }, }, [0x1D449] = {% V bottomright = { {height=0,kern=-120}, }, }, [0x1D44A] = {% W bottomright = { {height=0,kern=-30}, }, }, [0x1D453] = {% f bottomright = { {height=0,kern=-135}, }, }, [0x1D44F] = {% b topright = { {height=0,kern=75}, }, }, }, } local function initmathkern(tfmdata) local values = mathkerns[tfmdata.properties.psname] if not values then return end for cp, value in next, values do local tcp = type(cp) if tcp == 'string' then cp = tfmdata.resources.unicodes[cp] end local char = tfmdata.characters[cp] if char then local mathkern = char.mathkerns if not mathkern then mathkern = {} char.mathkerns = mathkern end for corner, v in next, value do mathkern[corner] = v end end end end fonts.constructors.newfeatures'otf'.register{ name = 'mathkern', description = 'Overwrite mathkern values', initializers = { base = initmathkern, }, } } Here is a MWE. \documentclass{article} \usepackage{kpfonts-otf} \usepackage{unicode-math} \setmathfont{KpMath-Sans.otf}[range={\check}] \setmathfont[RawFeature=mathkern]{Asana-Math.otf}[range={it/{Latin,latin},bfit/{Latin,latin},up/num,bfup/num}] \begin{document} \[ \check{A} \check{B} \check{C} \check{D} \check{E} \check{F} \check{G} \check{H} \check{I} \check{J} \check{K} \check{L} \check{M} \check{N} \check{O} \check{P} \check{Q} \check{R} \check{S} \check{T} \check{U} \check{V} \check{W} \check{X} \check{Y} \check{Z} \] \[ \widehat{A} \widehat{B} \widehat{C} \widehat{D} \widehat{E} \widehat{F} \widehat{G} \widehat{H} \widehat{I} \widehat{J} \widehat{K} \widehat{L} \widehat{M} \widehat{N} \widehat{O} \widehat{P} \widehat{Q} \widehat{R} \widehat{S} \widehat{T} \widehat{U} \widehat{V} \widehat{W} \widehat{X} \widehat{Y} \widehat{Z} \] \[ \widetilde{A} \widetilde{B} \widetilde{C} \widetilde{D} \widetilde{E} \widetilde{F} \widetilde{G} \widetilde{H} \widetilde{I} \widetilde{J} \widetilde{K} \widetilde{L} \widetilde{M} \widetilde{N} \widetilde{O} \widetilde{P} \widetilde{Q} \widetilde{R} \widetilde{S} \widetilde{T} \widetilde{U} \widetilde{V} \widetilde{W} \widetilde{X} \widetilde{Y} \widetilde{Z} \] \end{document}

  • polytonicgreek in LaTeX document
    by Marek Stepanek on February 4, 2026 at 11:12 am

    I have problems, inserting citations in my LaTeX document. I studied texdoc babel, many forums - including this one. I am using XeLaTeX. Here a MWE with many commented out lines - to show my attempts: \documentclass{article} % \usepackage{polyglossia} % \setdefaultlanguage[variant=ancient]{greek} % \usepackage[ngerman, greek.ancient]{babel} % \usepackage[ngerman, greek.polutoniko]{babel} % \usepackage[ngerman, polytonicgreek]{babel} \usepackage[polytonicgreek,ngerman]{babel} % \babelprovide[import, main]{polytonicgreek} % \usepackage[ngerman, ancientgreek]{babel} % Found in texdoc babel: % \babelfont[*greek]{rm}{NewComputerModern10} % \babelfont[ancientgreek]{rm}{NewComputerModern10} % \setotherlanguage{ngerman} % \setmainfont{GFS Didot} % \setmainfont{gfsdidot} % \setmainfont{kerkis} \begin{document} % ὅπερ ἔδει δεῖξαι % \selectlanguage{ngerman}{Und hier ein Text auf Deutsch} Das griechische Wort \glqq{}panta rhei\grqq{} (\foreignlanguage{greek}{πάντα ῥεῖ}) ist zutreffend \glqq{}alles fließt\grqq{}. \end{document} Thx for your help marek

  • pgfplotstable: systematic add of new columns
    by cis on February 4, 2026 at 10:33 am

    I have to n and k with n=2 (k=0,1,2) and n=4 (k=0,1,2,3,4). Now I want to add two coulumns p1 and p2 (and some others), such that: So I thought I could use a list \def\pList{1,2} (with variable values!) and express the columns with create on use; but this does not work. What do I have to do? MWE: \documentclass[margin=5pt, varwidth]{standalone} \usepackage{pgfplotstable} \begin{document} \def\pList{1,2} \newcounter{pNum}% I DO NOT KNOW HOW TO DO WITHOUT COUNTER \pgfplotsforeachungrouped \n in {2,4}{%% Is 'pgfplotsforeachungrouped' \pgfmathtruncatemacro\nPost{\n+1} \pgfplotsforeachungrouped \p in {\pList}{% correct??? \stepcounter{pNum}% \pgfplotstableset{% NOT SURE WHETHER THIS IS GOOD INSIDE THE LOOPS create on use/p\thepNum/.style={% create col/expr=\thisrow{n}+\thisrow{k}%+\p/10 % DOES NOT WORK },% } \pgfplotstablenew[ create on use/n/.style={create col/expr=\n}, create on use/k/.style={create col/expr=\pgfplotstablerow}, columns={n,k,p1}, % columns={n,k,\pList},% DOES NOT WORK!! every last row/.style={after row=\hline},% no effect %%%%%%%% ]{\nPost}\temp }% \pgfplotstablevertcat{\table}{\temp}% }%% \pgfplotstabletypeset[]{\table} \end{document}

  • How to produce "Ȟ" by mimicking the caron accent, in math mode?
    by Jinwen on February 4, 2026 at 9:21 am

    I would like to produce a Ȟ ("H" with caron accent) in math mode, specifically, for \mathsf. (This is an uncommon notation used for Čech cohomology in a book.) Perhaps this would be easy for pdfLaTeX. However, when using LuaLaTeX, and when this character is not already provided in the font, I can only get very strange output: Is there some way to mimic this caron accent in this situation? More generally, how can one apply this accent to general math symbols? (In the same book, this accent seems to be used to represent the dual objects, e.g., V with caron accent instead of V^{\vee}, possibly to save some space...) (I tried \check, but it looks different and cannot be properly aligned...) \documentclass{article} \usepackage{kpfonts-otf} \usepackage{unicode-math} \begin{document} Ȟ % \v{H} \( \mathsf{Ȟ} \) \( \mathsf{\v{H}} \) \( \check{\mathsf{H}} \) \end{document}

  • Strange effect when nesting tblr tabe environments
    by user2609605 on February 4, 2026 at 8:44 am

    MWE: \documentclass[a4paper]{article} \overfullrule=10mm \usepackage{tabularray} %\usepackage{xltabular} \usepackage{geometry} \begin{document} %\maketitle This document is for experimenting around \texttt{tabularray}. \begin{tblr}{width=\linewidth, rowspec={h{5cm}}, colspec={ll}}%p{5cm}, \begin{tblr}{width=\linewidth, colspec={|p{2cm}|}}% long text to be \newline long text to be \newline long text to be \newline long text to be \newline long text to be \newline % \the\hsize % \the\linewidth % \the\textwidth long text to be \end{tblr} & %\begin{tblr}{width={\linewidth}, colspec={|X|}}% 22nd %\end{tblr}% \\ \end{tblr} \end{document} works fine. head alinged, no warnings. If I activeate 2nd inner tblr environment: the alignment becomes sth unexpected to me, like centered and in addition a huge overfull box occurs. What happened and how to resolve?

  • TiKZ: possibility of "average" blend mode?
    by putianyi888 on February 4, 2026 at 8:40 am

    I get that the screen mode basically adds the RGB values. Is it possible to take the average of the values instead, so that colors don't get lighter? Opacity trick doesn't seem to work because I want full opacity where the images don't overlap.

  • improve of solid effect of stack of unit cube legos: solid draw with hole, protruding elements
    by Epa on February 4, 2026 at 8:06 am

    How to make the solid effect view better, as shown in the photo attached? \documentclass[]{standalone} \usepackage{amsmath, amssymb, latexsym, amscd, amsthm} \usepackage{tikz} \newcommand{\drawboxa}[4]{ \pgfmathsetmacro \angle {30} \pgfmathsetmacro \xd {{2/3*cos(\angle)}} \pgfmathsetmacro \yd {{2/3*sin(\angle)}} \pgfmathsetmacro \x {{#1-1+(#2-1)*(\xd)}} \pgfmathsetmacro \y {{#3-1+(#2-1)*(\yd)}} \draw[fill=#4] (\x,\y) -- (\x+1,\y) -- (\x+1,\y+1) -- (\x,\y+1) -- cycle; \draw[fill=#4] (\x,\y+1) -- (\x+\xd,\y+1+\yd)coordinate[pos=.5](M) -- (\x+1+\xd,\y+1+\yd) -- (\x+1,\y+1) -- cycle; \draw[fill=#4] (\x+1,\y+1) -- (\x+1+\xd,\y+1+\yd) -- (\x+1+\xd,\y+\yd)coordinate[pos=.5](M2) -- (\x+1,\y)-- (\x+1,\y+1)coordinate[pos=.5](M3); \path(M2)--(M3)coordinate[pos=.5](M4); \draw[fill=#4] (M)++(.5,0)coordinate(T1)++(.15,0)arc(0:-180:.15cm and .06cm)--++(0,.1)arc(-180:0:.15cm and .06cm)coordinate(T2)--++(0,-.1) (T2)arc(0:180:.15cm and .06cm); \draw[fill=black,opacity=.1](M4)circle(.12cm and .15cm) (\x,\y)++(.5,.5)circle(.15); \draw(M4)circle(.12cm and .15cm) (\x,\y)++(.5,.5)circle(.15); } \newcommand{\drawboxb}[3]{ \pgfmathsetmacro \angle {30} \pgfmathsetmacro \xd {{2/3*cos(\angle)}} \pgfmathsetmacro \yd {{2/3*sin(\angle)}} \pgfmathsetmacro \x {{#1-1+(#2-1)*(\xd)}} \pgfmathsetmacro \y {{#3-1+(#2-1)*(\yd)}} \draw[fill=white] (\x,\y) -- (\x+1,\y) -- (\x+1,\y+1) -- (\x,\y+1) -- cycle; \draw[fill=white] (\x,\y+1) -- (\x+\xd,\y+1+\yd)coordinate[pos=.5](M) -- (\x+1+\xd,\y+1+\yd) -- (\x+1,\y+1) -- cycle; \draw[fill=white] (\x+1,\y+1) -- (\x+1+\xd,\y+1+\yd) -- (\x+1+\xd,\y+\yd)coordinate[pos=.5](M2) -- (\x+1,\y)-- (\x+1,\y+1)coordinate[pos=.5](M3); \path(M2)--(M3)coordinate[pos=.5](M4); \draw[fill=white] (M)++(.55,0)coordinate(T1)++(.15,0)arc(0:-180:.2cm and .07cm)--++(0,.1)arc(-180:0:.2cm and .07cm)coordinate(T2)--++(0,-.1) (T2)arc(0:180:.2cm and .07cm) (T2)++(-.2,0)circle(.16cm and .04cm); \draw(M4)circle(.15cm and .2cm)circle(.11cm and .16cm) (\x,\y)++(.5,.5)circle(.2)circle(.15); } \usepackage{tikzbricks} %\printanswers \newcommand{\drawboxc}[4]{ \pgfmathsetmacro \angle {30} \pgfmathsetmacro \xd {{2/3*cos(\angle)}} \pgfmathsetmacro \yd {{2/3*sin(\angle)}} \pgfmathsetmacro \x {{#1-1+(#2-1)*(\xd)}} \pgfmathsetmacro \y {{#3-1+(#2-1)*(\yd)}} \draw[fill=#4] (\x,\y) -- (\x+1,\y) -- (\x+1,\y+1) -- (\x,\y+1) -- cycle; \draw[fill=#4] (\x,\y+1) -- (\x+\xd,\y+1+\yd)coordinate[pos=.5](M) -- (\x+1+\xd,\y+1+\yd) -- (\x+1,\y+1) -- cycle; \draw[fill=#4] (\x+1,\y+1) -- (\x+1+\xd,\y+1+\yd) -- (\x+1+\xd,\y+\yd)coordinate[pos=.5](M2) -- (\x+1,\y)-- (\x+1,\y+1)coordinate[pos=.5](M3); \path(M2)--(M3)coordinate[pos=.5](M4)coordinate[pos=.4](M5); \draw[fill=#4](M4)circle(.12cm and .15cm)++(0,.15)coordinate(Y1)++(0,-.15)coordinate(Y2); \draw[fill=#4](M5)++(0,-.025)circle(.12cm and .15cm)++(0,.15)coordinate(Y3)++(0,-.3)coordinate(Y4) (Y3)--(Y1)arc(90:270:.12cm and .15cm)--(Y4)arc(270:90:.12cm and .15cm); \draw[fill=black,opacity=.1](\x,\y)++(.5,.5)circle(.15) (M)++(.5,0)coordinate(T1)circle(.15cm and .06cm); \draw(\x,\y)++(.5,.5)circle(.15) (T1)circle(.15cm and .06cm); } \begin{document} \begin{tikzpicture} \def\x{3} %so luong block \foreach\h in{1,...,\x}{ \drawboxa{1}{1}{\h}{blue!25} } \def\d{.3} \draw(1,-\d) node[scale=1.3]{3}; \draw(.8,\x+1.2*\d) node[scale=1.2, above]{three}; \begin{scope}[xshift=100] \def\x{2} %so luong block \foreach\h in{1,...,\x}{ \drawboxa{1}{1}{\h}{blue!25} } \draw(1,-\d) node[scale=1.3]{2}; \draw(.8,\x+1.2*\d) node[scale=1.2, above]{two}; \end{scope} \begin{scope}[xshift=200] \def\x{5} %so luong block \foreach\h in{1,...,\x}{ \drawboxa{1}{1}{\h}{blue!25} } \draw(1,-\d) node[scale=1.3]{5}; \draw(.8,\x+1.2*\d) node[scale=1.2, above]{five}; \end{scope} \end{tikzpicture} \vspace{1cm} \begin{tikzpicture} \def\x{5} %so luong block %drawbox{x}{z}{y} %x la toa do x %z la toa do lop tinh theo goc xien %y la toa do y \drawboxb{1}{0}{0} \end{tikzpicture} \begin{tikzpicture} \def\x{5} % so luong block xanh \def\v{2} % so luong block vang \def\b{1} % so luong block xanh duong \pgfmathtruncatemacro{\xx}{\x+1} \pgfmathtruncatemacro{\vv}{\x+\v} \pgfmathtruncatemacro{\vvv}{\vv+1} \pgfmathtruncatemacro{\bb}{\vv+\b} \ifnum\x>0 \foreach \h in {1,...,\x}{ \drawboxc{\h}{1}{1}{brown!35} } \fi \ifnum\v>0 \foreach \h in {\xx,...,\vv}{ \drawboxc{\h}{1}{1}{yellow!55} } \fi \ifnum\b>0 \foreach \h in {\vvv,...,\bb}{ \drawboxc{\h}{1}{1}{blue!25} } \fi \end{tikzpicture} \end{document} The code was from user 11232 How to draw stacked cubes of different sizes and colors?

  • Issue with latex code when writing algorithm statement [duplicate]
    by Destr on February 4, 2026 at 6:53 am

    I'm trying to write an algorithm. I don't understand what's wrong at the very last equation (line 4:), there is =0 in the end for some reason after [:,perm]. Below is the exact reproducible code along with what packages I use. I know there are some irrelevant packages I just have other stuff in the file as well. My question is how I get rid of that =0 in line 4:? Here is the picture of the result I get: \documentclass[12pt,a4paper]{report} \usepackage{xcolor} \usepackage{graphicx} \usepackage{tikz} \usetikzlibrary{shapes.geometric, arrows.meta, positioning,calc} \usepackage{amssymb} \usepackage[dvipsnames]{xcolor} \usetikzlibrary{shapes.geometric, arrows.meta, positioning,calc} \usepackage{algorithm} \usepackage{algorithmic} \usepackage{algpseudocode} \begin{document} \begin{algorithm}[ht] \caption{Channel mixup algorithm} \label{alg:exmp} \renewcommand{\algorithmicrequire}{\textbf{Input:}} \renewcommand{\algorithmicensure}{\textbf{Output:}} \begin{algorithmic}[1] \REQUIRE Training data $X \in \mathbb{R}^{L \times V}$, $Y \in \mathbb{R}^{T \times V}$; standard deviation $\sigma$; number of channels $V$ \ENSURE $(X', Y')$ \STATE $\text{perm} \leftarrow \text{randperm}(V)$ \Comment{$\text{perm} \in \mathbb{R}^V$} \STATE $\lambda \sim N(0, \sigma^2)$ \Comment{mean=0, std=$\sigma$, size=($V$,)} \STATE $X' \leftarrow X + \lambda \odot X[:, \text{perm}]$ \STATE $Y' \leftarrow Y + \lambda \odot Y[:, \text{perm}]$ \end{algorithmic} \end{algorithm} \end{document}

  • Custom Font and Bolding Not Compatible In Font Setup Commands [KOMA-Script]
    by nebulisx on February 4, 2026 at 3:40 am

    I am trying to use \setkomafont to set the font of titles and headings, but when I try to use a custom font with \fontspec or \fontfamily, it overrides \bfseries instead of applying them both. So, when I use the command below, it only applies Roboto and the font size: \setkomafont{title}{\fontspec{Roboto}\fontsize{20}{24}\bfseries\selectfont} Other similar commands that I have tried but didn't work: \setkomafont{title}{\fontfamily{Roboto}\fontsize{20}{24}\bfseries\selectfont} % \setkomafont{title}{\fontfamily{Helvetica}\fontsize{20}{24}\bfseries\selectfont} % \setkomafont{title}{\fontfamily{Montserrat}\fontsize{20}{24}\bfseries\selectfont} % etc, etc When I use each of these commands alone, it also works fine \setkomafont{title}{\fontsize{20}{24}\bfseries\selectfont} % and \setkomafont{title}{\fontspec{Roboto}\fontsize{20}{24}\selectfont} As expected, the first command applies the bold font and the second command applies the Roboto font. A non-exhaustive list of l tried trying to fix this problem (we're just going to use \fontspec{Roboto} in all of them for simplicities sake I've gone insane enough. Just know that I tried many fonts in both koma-script and fontspec): \setkomafont{title}{{\fontspec{Roboto}}\fontsize{20}{24}\bfseries\selectfont} \setkomafont{title}{{\fontspec{Roboto}}\fontsize{20}{24}\bfseries\selectfont} % \setkomafont{title}{\fontspec{Roboto}{\fontsize{20}{24}\bfseries\selectfont}} % \setkomafont{title}{\fontsize{20}{24}\bfseries\selectfont} \addtokomafont{title}{\fontspec{Roboto}} % \setkomafont{title}{\fontspec{Roboto}\fontsize{20}{24}\bfseries\selectfont} \addtokomafont{title}{\bfseries} % This one got rid of the font and made it bold instead XDDDDDDDDDDD I also went in Windows Shell to look at the luaotfload-tool package and force it to update after looking through the fontspec manual. I did not find anything being discussed in the KOMA-script manual or the The Not So Short Introduction to LaTeX, but I didn't do a thorough search.

  • Sockets and the use of token lists in names
    by enkorvaks on February 4, 2026 at 1:22 am

    I have been looking at Sockets recently, and have some questions on their behaviour. I have had a look at Practical guidelines for using sockets and Example of using plugs and sockets, as well as ltsockets-doc, and I have played with sockets in a document (mostly for testing). I would like to know if the behaviour I am seeing is expected (and will continue to work), or if it is a factor of how it is (currently) implemented, and I shouldn't rely on it. \documentclass{article} \NewSocket{enkorvaks/format-i}{1} \NewSocket{enkorvaks/format-ii}{1} \NewSocketPlug{enkorvaks/format-i}{formatibold}{Format 1: \textbf{#1}} \NewSocketPlug{enkorvaks/format-ii}{formatiitt}{Format 2: \texttt{#1}} \AssignSocketPlug{enkorvaks/format-i}{formatibold} \AssignSocketPlug{enkorvaks/format-ii}{formatiitt} \ExplSyntaxOn \tl_new:N \l_enkorvaks_formatchoice_tl \tl_set:Nn \l_enkorvaks_formatchoice_tl {format-i} \NewDocumentCommand{\sockettesting}{m}{ \UseSocket{enkorvaks/\l_enkorvaks_formatchoice_tl}{#1} } \NewDocumentCommand{\formatbold}{}{ \tl_set:Nn \l_enkorvaks_formatchoice_tl {format-i} } \NewDocumentCommand{\formattt}{}{ \tl_set:Nn \l_enkorvaks_formatchoice_tl {format-ii} } \ExplSyntaxOff \begin{document} Socket Test: \sockettesting{This should be bold (format 1)} \formattt{} Socket Test: \sockettesting{This should be tt (format 2)} \formatbold{} Socket Test: \sockettesting{This should be bold (format 1) again} \end{document} (yes, this is a trivial use, and doesn't need sockets, but this is an example only) In short, the question is: Can I use token lists (or \newcommands, I guess) as part of the \UseSocket and expect it to work into the future?

  • Different thickness of the sidebar ends In ConTeXt
    by filokalos on February 3, 2026 at 8:21 pm

    According to the https://wiki.contextgarden.net/Command/setupsidebar, sidebar works just excellent. Is there a possibility to make the different thickness of the ends of the one sidebar? For example the one is 3pt, and the other is 1pt.

  • Making math symbols using tikz which scale appropriately with superscripts and other mathematical conventions
    by Jasper on February 3, 2026 at 7:10 pm

    I want to have fun with custom symbols made in tikz. I use the package tikzsymbols, which was recommended to me a while ago. However, I do not like how they look in superscripts in math mode. How can I make symbols in tikz that work nicely with math mode and don't look like this? Notice how they don't scale like other symbols. \documentclass{article} \usepackage{tikzsymbols} \tikzsymbolsdefinesymbol {cow} {} {\begin{tikzpicture}[baseline=-1.5mm,scale=0.75,inner sep = 0pt, outer sep = 0pt] \node {\includegraphics[width = 0.7em]{cow}}; \end{tikzpicture}} \tikzsymbolsdefinesymbol {cowbrown} {} {\begin{tikzpicture}[baseline=-1.5mm,scale=0.75,inner sep = 0pt, outer sep = 0pt] \node {\includegraphics[width = 0.7em]{cow-brown}}; \end{tikzpicture}} \tikzsymbolsdefinesymbol {jasper} {} {\begin{tikzpicture}[baseline=-1.5mm,scale=0.75,inner sep = 0pt, outer sep = 0pt] \node {J}; \node {A}; \node {S}; \node {P}; \node {E}; \node {R}; \fill[fill opacity=0.3,blue] (0,0) circle[radius=0.7em]; \end{tikzpicture}} \begin{document} \[\cow^{\cowbrown_{\cow}}=\cowbrown^{\cow^{\jasper}}\] \end{document}

  • Using the apa7 class in student mode each table is given its own page even though there is plenty of space
    by Treachable on February 3, 2026 at 4:16 pm

    The APA 7 standard for student papers requires tables and figures to be moved to the end of the document. I have several small tables in my document and they each appear at the end of the document on a separate page. This seems silly as one page could easily fit all my tables. Is this intended behaviour to accommodate some APA requirement I am unaware of? If not how might I go about modifying my script so that tables and figures are compiled on the same page if they fit? Below is a minimal working example to show the issue. \documentclass[stu]{apa7} \usepackage{lipsum} \title{Assignment Title} \begin{document} \maketitle \lipsum \begin{table} \caption{first small table} \begin{tabular}{lcccc} \toprule &A1&A2&A3&A4\\ \midrule B1&25&159&27&11\\ B2&67&117&75&9\\ \bottomrule \end{tabular} \end{table} \begin{table} \caption{second small table} \begin{tabular}{lcccc} \toprule &A1&A2&A3&A4\\ \midrule B1&25&159&27&11\\ B2&67&117&75&9\\ \bottomrule \end{tabular} \end{table} \end{document}

  • How to define row or cell modification for tabularray when content is in a variable?
    by lukascbossert on February 3, 2026 at 2:10 pm

    In my document I collect data and process it in a macro. The macro has various sections of the table (here shown section staff and costs). Each section has a "header row" I want to specially highlight. The main part of the section is collected using a DTLforeach-run (here just some hard coded numbers, I omitted the part to sum up e.g. the costs, too). I would like to visually show the separation of the staff and costs section using a horizontal line. But \SetHline{-}{red,0.5pt} is not working and \SetCell{font=\footnotesize\bfseries,halign=l} breaks to whole document. \documentclass{scrartcl} \usepackage{xcolor} \usepackage{tabularray} \UseTblrLibrary{siunitx} \UseTblrLibrary{functional} \ExplSyntaxOn \tl_new:N \l__tmp_body_staff_tl \tl_new:N \l__tmp_body_costs_tl \NewDocumentCommand{\requestedFundingTable}{o}{ Table~ #1 :\par \tl_clear:N \l__tmp_body_staff_tl \tl_clear:N \l__tmp_body_costs_tl \tl_put_right:Ne \l__tmp_body_staff_tl { \SetRow{red!20} % not working % \SetCell{font=\footnotesize\bfseries,halign=l} % fatal error Staff & Qty & Sum \\ } \tl_put_right:Ne \l__tmp_body_costs_tl { \SetHline{-}{red,0.5pt} % not working \SetRow{red!20} % not working % \SetCell{font=\footnotesize\bfseries,halign=l} % fatal error Direct~ Costs & \SetCell[c=2]{c} Sum & \\ } % further processing in between \tl_put_right:Ne \l__tmp_body_staff_tl { category & 12 & 123 \\ } \tl_put_right:Ne \l__tmp_body_costs_tl { category & \SetCell[c=2]{c} 1234 & \\ } \begin{tblr}[ long, expand= \l__tmp_body_staff_tl \l__tmp_body_costs_tl, ]{ colspec = { *{1}{X[4,m]} *{2}{X[r, si={table-format=4}]} }, row{1,2} = {guard}, } CATEGORY & \SetCell[c=2]{c} year & \\ \tl_use:N \l__tmp_body_staff_tl % \SetHline{1-10}{red,1pt} % would work here \tl_use:N \l__tmp_body_costs_tl \end{tblr} } \ExplSyntaxOff \begin{document} \requestedFundingTable[A1] \requestedFundingTable[A2] \end{document}

  • How to use align-enivronment when there is a conflict [closed]
    by rensemil on February 3, 2026 at 1:42 pm

    I'm using the metre package which unfortunately makes it impossible to use amsmath because of some conflict. I don't really know where the incompatibility lies but this has never before been a problem because I never needed any of the amsmath commands while using metre in the same document. Now, however, I need an environment like \begin{align} ... \end{align}. Is there any way that I can use this in spite of the conflict? What I need is to be able to write sequences like these: where the vertical lines are aligned with each other. A minimal not-working example is below for how I would do it if there was no conflict. I know that the use of \text within the align-environment is a bit crude, but I don't really mind that. \documentclass{article} \usepackage[en]{metre} \usepackage{amsmath} \begin{document} \begin{align*} \text{\metra{\m\a\m\a\m\a\m\a\C}} &\text{\metra{\m\bb\C\m\a\m\b\bm}} \\ \text{\metra{\a\m\a\m\a\C}} & \text{\metra{\m\bb\C\m\a\m\b\bm}} \end{align*} \end{document} Here is an actual MWE for the symbols themselves but not aligned how I would want them to be aligned: \documentclass{article} \usepackage[en]{metre} \begin{document} \metra{\m\a\m\a\m\a\m\a\C\m\bb\C\m\a\m\b\bm} \\ \metra{\a\m\a\m\a\C\m\bb\C\m\a\m\b\bm} \end{document} I am aware that for this MWE it would be sufficient to just make everything flush right, but this is insufficient in other contexts like this one: Thanks in advance for any help!

  • How to add fermata symbol to metre package?
    by rensemil on February 3, 2026 at 11:10 am

    I am using the package metre. It has the environment \metra{} used for typesetting latin (and greek) metre notation. This environment has almost all the special characters I need, except one: I need a character that looks somewhat like a fermata 𝄐 but preferrably in the same style as the other metrical symbols. This could, I believe, be achieved by simply taking the character breve that is produced by \documentclass{article} \usepackage[en]{metre} \begin{document} \metra{\a\m\b\bm} \end{document} and have it flipped upside down and a dot put underneath. In a book, this is what it looks like: It's the last symbol of each of the lines in the box. Does anyone know how this could be achieved? I even tried contacting the package's creator but his email address does not seem to exist anymore. My MWE produces the symbols in this picture (the ones inside the brackets): Thanks in advance!

  • Issue with lstlisting with Wiley (NJD-v5) on Overleaf - appears "??" instead of the label
    by Fernando Escobar on February 3, 2026 at 10:55 am

    I am using Overleaf. I started a project with the Wiley (NJD-v5) template. The class is above, and I forced the package listing: (I also compiled twice) \documentclass[HARVARD,LATO2COL]{WileyNJDv5} \usepackage{listings} My code: The {\tt listings} package supports all the most common languages and it is highly customizable. If you just want to write code within your document, the package provides the {\tt lstlisting} environment; the output will be in Computer Modern typewriter font. Refer to the below example Listing~\ref{lst:DescriptiveLabel}: \begin{lstlisting}[caption={Descriptive caption text},label={lst:DescriptiveLabel},basicstyle=\fontsize{8}{10}\selectfont\ttfamily] for i:=maxint to 0 do begin { do nothing } end; Write('Case insensitive '); WritE('Pascal keywords.'); \end{lstlisting} {\small Debug: Listing number = \thelstlisting, ref = \ref{lst:DescriptiveLabel}.} The result is in the imagewhere appears ?? instead of reference label]: THE MVE CODE; FOR REPLICATION (need the class) \documentclass[HARVARD,LATO2COL]{WileyNJDv5} \usepackage{listings} \articletype{Article Type}% \received{Date Month Year} \revised{Date Month Year} \accepted{Date Month Year} \journal{Journal} \volume{00} \copyyear{2023} \startpage{1} \raggedbottom \begin{document} \title{The greatest article} \author[1]{John Doe} \authormark{xxx \textsc{et al.}} \titlemark{The greatest article} \abstract[Abstract]{xxx.} \keywords{xxx} \maketitle \section{First level head}\label{sec1} Please lay out your article using the section headings, and the given body text is dummy text for layout purposes. \appendix \bmsection{Program codes appear in Appendix\label{app1}} \vspace*{12pt} Using the package {\tt listings} you can add non-formatted text as you would do with \verb|\begin{verbatim}| but its main aim is to include the source code of any programming language within your document.\newline Use \verb|\begin{lstlisting}...\end{lstlisting}| for program codes without mathematics. The {\tt listings} package supports all the most common languages and it is highly customizable. If you just want to write code within your document, the package provides the {\tt lstlisting} environment; the output will be in Computer Modern typewriter font. Refer to the below example Listing~\ref{lst:DescriptiveLabel}: \begin{lstlisting}[caption={Descriptive caption text},label={lst:DescriptiveLabel},basicstyle=\fontsize{8}{10}\selectfont\ttfamily] for i:=maxint to 0 do begin { do nothing } end; Write('Case insensitive '); WritE('Pascal keywords.'); \end{lstlisting} {\small Debug: Listing number = \thelstlisting, ref = \ref{lst:DescriptiveLabel}.} \end{document}

  • How to get material top aligned within tabularx environment [duplicate]
    by user2609605 on February 3, 2026 at 10:27 am

    Example: \documentclass[a4paper]{article} \overfullrule=10mm \usepackage{tabularx} \begin{document} %\maketitle This document is for experimenting around \texttt{tabularx}. \begin{tabularx}{\linewidth}{|p{5cm}p{5cm}}%p{5cm} %\begin{minipage}{\linewidth} \begin{tabular*}{\linewidth}{|p{2cm}}% long text to be \newline long text to be \newline long text to be \newline long text to be \newline long text to be \newline % \the\hsize % \the\linewidth % \the\textwidth long text to be \end{tabular*} %\end{minipage} & %\begin{tabularx}{0.25\linewidth}{|X}% 2nd %\end{tabularx} \end{tabularx} \end{document} The resulting PD shows two columns but vertical alignment seems to be centered. Because of the p specification I expected top level. What is strange, if I remove the inner tabular environment, keeping the content, then the alignment is correct again. What happened and how to recover? You know, this is just a MWE; of course I need some inner tabular.

  • How to make nested tabularx work
    by user2609605 on February 3, 2026 at 10:00 am

    Example: \documentclass[a4paper]{article} \overfullrule=10mm \usepackage{tabularx} \begin{document} This document is for experimenting around \texttt{tabularx}. \begin{tabularx}{\linewidth}{|XX}%p{5cm} \begin{minipage}{\linewidth} \begin{tabularx}{\linewidth}{|X}% long text to be \newline long text to be \newline long text to be \newline long text to be \newline long text to be \newline % \the\hsize % \the\linewidth % \the\textwidth long text to be \end{tabularx} \end{minipage} & %\begin{tabularx}{0.25\linewidth}{|X}% 2nd %\end{tabularx} \end{tabularx} \end{document} results in: ! Extra }, or forgotten \endgroup. \TX@trial ...er \tabular \the \toks@ \endtabular } \TX@ckpt \TX@typeout@ {\@s... l.80 \end{tabularx} ! Extra }, or forgotten \endgroup. \TX@endtabularx ...\csname endtabular*\endcsname } \global \TX@ftn \expandaft... l.80 \end{tabularx} ! Extra }, or forgotten \endgroup. \TX@endtabularx ... }\the \TX@ftn \ifnum 0=`{\fi } \expandafter \expandafter ... l.80 \end{tabularx} ! Extra }, or forgotten \endgroup. \@endpbox ...trutbox \par \color@endgroup \egroup \hfil l.80 \end{tabularx} ! Missing \endgroup inserted. <inserted text> \endgroup l.80 \end{tabularx} ... If I replace the inner tabularx by tabular (dropping \linewidth and changing X) it works. I would even like to use without minipage, but that it does not work with minipage, it means that minipage encapsulation is not very strict. I will have a look I think I remember an example where nested tabularx worked.

  • Position of logo in a presentation
    by Dario on February 3, 2026 at 9:39 am

    I tried to adapt a sty file for my presentation: \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{beamerthemePanelDataExact}[2026/02/03 FINAL STABLE VERSION] % =========================== % FONT: LM Sans % =========================== \RequirePackage[T1]{fontenc} \RequirePackage{fix-cm} \renewcommand{\familydefault}{\sfdefault} \renewcommand{\sfdefault}{lmss} % =========================== % BASIC BEAMER SETUP % =========================== \mode<presentation>{% IMPORTANT: not HTML-escaped \usetheme{default} \usecolortheme{default} \setbeamertemplate{navigation symbols}{} } % Honor explicit font sizes \usefonttheme{professionalfonts} \RequirePackage{xcolor,graphicx,etoolbox} % =========================== % COLORS % =========================== \definecolor{rulegray}{RGB}{180,180,180} \definecolor{slidetitle}{RGB}{192,0,0} % #C00000 exact % =========================== % LEFT MARGIN CONSTANT (align with body text start) % =========================== \newlength{\leftA} \setlength{\leftA}{1cm} % initial; overridden to match Beamer body margin \makeatletter \setlength{\leftA}{\beamer@leftmargin} % header/footer start at same column as body \makeatother % =========================== % TYPOGRAPHY: FORCE BODY SIZES (cannot be overridden later) % =========================== \makeatletter \AtBeginDocument{% % Body text smaller than 14pt base: ~11.5/13.8 \renewcommand\normalsize{\fontsize{11.5pt}{13.8pt}\selectfont} % Keep \small consistent if Beamer uses it in lists \renewcommand\small{\fontsize{10.5pt}{12.6pt}\selectfont} } \makeatother % Ensure lists inherit the current body size \setbeamerfont{itemize/enumerate body}{size=\normalsize} \setbeamerfont{itemize/enumerate subbody}{size=\normalsize} \setbeamerfont{itemize/enumerate subsubbody}{size=\normalsize} % =========================== % RULE FILL % =========================== \newcommand*\rulefill{% \leaders\hrule height 0.35pt depth 0pt\hfill\kern0pt} % =========================== % SECTION + PER-SECTION FRAME COUNTER % =========================== \newcounter{secframe} \AtBeginSection{ \setcounter{secframe}{0}% \gdef\currsection{\secname}% } \gdef\currsection{} % Increment per non-plain frame \makeatletter \addtobeamertemplate{frametitle}{}{% \ifbeamer@plainframe\else\stepcounter{secframe}\fi } \makeatother % =========================== % HEADER % =========================== \makeatletter \setbeamertemplate{headline}{% \ifbeamer@plainframe\relax\else \vspace*{4.2mm}% {\hspace*{\leftA}% \currsection\quad{\color{rulegray}\rulefill}\quad \thesection-\arabic{secframe}\hspace*{\leftA}}% \vspace*{6.2mm}% \fi } \makeatother % =========================== % *** FRAME TITLE SUPPRESSION *** % =========================== \setbeamertemplate{frametitle}{} % =========================== % CUSTOM SLIDE TITLE (legacy) % =========================== % Title ~21/24: larger than body and close to your sample's feel \newcommand{\SlideTitle}[1]{% \vspace*{-2mm}% {\bfseries\color{slidetitle}\fontsize{15pt}{18pt}\selectfont #1}% \vspace*{5.6mm}% } % =========================== % NEW: TITLE + RIGHT LOGO MACRO (for title slide) % =========================== % Places the title and logo on the same baseline row. The logo is nudged % in ex-units to visually align with the "ta" of 'Stata' in the title. % Usage (in main.tex): % \TitleWithLogo[height=11.5mm,yshift=-0.3ex]{\inserttitle}{logob.png} % \newlength{\TitleLogoXSep} \setlength{\TitleLogoXSep}{1.6em} \newcommand{\TitleWithLogo}[3][]{% % #1 optional keys: height=<len>, yshift=<len> % #2 title text % #3 logo filename % defaults \def\tll@height{11.5mm}% a bit bigger than earlier 9mm \def\tll@yshift{-0.3ex}% align logo center to 'ta' in Stata % very small key parser (height=..., yshift=...) \begingroup \def\processKV##1{% \def\temp{##1}% \expandafter\ifx\temp\empty\else \expandafter\ifx\temp\relax\else \expandafter\processOne\temp=\relax \fi \fi} \def\processOne#1=#2\relax{% \def\key{#1}\def\val{#2}% \expandafter\ifx\key\string height\relax \def\tll@height{\val}\fi \expandafter\ifx\key\string yshift\relax \def\tll@yshift{\val}\fi } \processKV{#1}% \endgroup % Row: title on left, logo on right; share baseline \noindent \begin{minipage}[t]{0.78\linewidth} {\bfseries\color{slidetitle}\fontsize{15pt}{18pt}\selectfont #2}% \end{minipage}% \hfill \begin{minipage}[t]{0.16\linewidth} \raggedleft \raisebox{\tll@yshift}{\includegraphics[height=\tll@height]{#3}}% \end{minipage} \par\vspace*{5.6mm}% same bottom spacing as \SlideTitle } % =========================== % FOOTER % =========================== \newcommand{\panelbrand}{Panel Data} \newcommand{\panellogo}{university-logo} \makeatletter \setbeamertemplate{footline}{% \ifbeamer@plainframe\relax\else \vspace*{3mm}% \hbox to \paperwidth{% \hskip\leftA \panelbrand\quad{\color{rulegray}\rulefill}\quad \IfFileExists{\panellogo.pdf}{% \raisebox{-0.2ex}{\includegraphics[height=1.9ex]{\panellogo.pdf}}% }{% \IfFileExists{\panellogo.png}{% \raisebox{-0.2ex}{\includegraphics[height=1.9ex]{\panellogo.png}}% }{% \raisebox{-0.25ex}{\color{black!45}\rule{2cm}{1ex}}% }% }% \hskip\leftA }% \vspace*{2mm}% \fi } \makeatother % =========================== % LISTINGS % =========================== \RequirePackage{listings} \definecolor{codebg}{RGB}{244,244,244} \lstdefinestyle{panelstata}{ basicstyle=\ttfamily\small, backgroundcolor=\color{codebg}, frame=single, rulecolor=\color{black!20}, breaklines=true, keepspaces=true, columns=fullflexible, showstringspaces=false, literate={-}{{-}}1, upquote=true } \lstset{style=panelstata} % =========================== % DIAGNOSTIC: confirm theme loaded % =========================== \typeout{*** PanelDataExact theme loaded: sizes forced, alignment active; TitleWithLogo available ***} And this is my main.tex file: \documentclass[14pt]{beamer} \usetheme{PanelDataExact} \title{Panel Data Analysis Using Stata} \author{My Name} \institute{My University} \date{} \begin{document} % ===================================================== % TITLE PAGE (NO HEADER/FOOTER) % ===================================================== \begin{frame}[plain] \raggedright {\large\bfseries\color{slidetitle} \inserttitle\par} \vspace{0.8em} % Left: author/institution; Right: logo aligned to the author line \noindent \begin{minipage}[t]{0.74\linewidth} {\normalsize \insertauthor\par} % If you prefer \insertinstitute, define \institute{} above and use it here: {\normalsize \insertinstitute\par} \end{minipage}\hfill \begin{minipage}[t]{0.22\linewidth} \raggedleft \includegraphics[height=18mm]{logob.png} % adjust height if needed (e.g., 8–12mm) \end{minipage} \end{frame} % ===================================================== % SECTION 1 % ===================================================== \section{Course Outline} \begin{frame} \SlideTitle{Course Objectives} \begin{itemize} \item To provide a concise \textbf{introduction} to applied panel data analysis. \item To review core theoretical methods of panel data analysis. \item To learn how to analyze (microeconometric) panel data using Stata. \end{itemize} \end{frame} % ===================================================== % SECTION 2 % ===================================================== \section{Panel Data Management} \begin{frame} \SlideTitle{Getting Started} Install data in Stata: \end{frame} \end{document} But the logo is not in the position I would like. It should be horizontally aligned to My Name/My Institution and verticaly aligned with the word Stata (it should end at the end of that word).

  • Add a half-sphere and part of a sphere in a tikzpicture
    by Nicolas on February 3, 2026 at 9:33 am

    I would like to be able to add a half-sphere on the face of the top of the traced network and 1/8 of a sphere on one of the corners of the cube (as shown in the attached images) on my figure (currently, I have only drawn spheres to show where I want to place the half-sphere and the 1/8th sphere). \documentclass[border=2mm]{standalone} \usepackage{tikz,tikz-3dplot} \usepackage{xcolor} \begin{document} \tdplotsetmaincoords{75}{10} \begin{tikzpicture}[x={(0:1cm)},y={(30:0.5cm)},z={(90:1cm)},scale = 5] % ---- Tracé des traits du réseau ---- \draw (0,0,0) -- (1,0,0) -- (1,1,0) -- (0,1,0) -- (0,0,0); \draw (0,0,1) -- (1,0,1) -- (1,1,1) -- (0,1,1) -- (0,0,1); \draw[thin] (0,0,0) -- (0,0,1); \draw[thin] (1,0,0) -- (1,0,1); \draw[thin] (1,1,0) -- (1,1,1); \draw[thin] (0,1,0) -- (0,1,1); \draw[very thin, dashed] (0.5,0,0) -- (0.5,1,0) -- (0.5,1,1) -- (0.5,0,1) -- cycle; \draw[very thin, dashed] (0,0.5,0) -- (1,0.5,0) -- (1,0.5,1) -- (0,0.5,1) -- cycle; \draw[very thin, dashed] (0,0,0.5) -- (1,0,0.5) -- (1,1,0.5) -- (0,1,0.5) -- cycle; \tdplottransformmainscreen{0.66}{0.55}{0.55} \shadedraw[tdplot_screen_coords, ball color = blue] (\tdplotresx,\tdplotresy) circle (0.15); \end{tikzpicture} \hspace{1cm}; \begin{tikzpicture}[x={(0:1cm)},y={(30:0.5cm)},z={(90:1cm)},scale = 5] % ---- Tracé des traits du réseau ---- \draw (0,0,0) -- (1,0,0) -- (1,1,0) -- (0,1,0) -- (0,0,0); \draw (0,0,1) -- (1,0,1) -- (1,1,1) -- (0,1,1) -- (0,0,1); \draw[thin] (0,0,0) -- (0,0,1); \draw[thin] (1,0,0) -- (1,0,1); \draw[thin] (1,1,0) -- (1,1,1); \draw[thin] (0,1,0) -- (0,1,1); \draw[very thin, dashed] (0.5,0,0) -- (0.5,1,0) -- (0.5,1,1) -- (0.5,0,1) -- cycle; \draw[very thin, dashed] (0,0.5,0) -- (1,0.5,0) -- (1,0.5,1) -- (0,0.5,1) -- cycle; \draw[very thin, dashed] (0,0,0.5) -- (1,0,0.5) -- (1,1,0.5) -- (0,1,0.5) -- cycle; \tdplottransformmainscreen{0.6}{0.6}{1} \shadedraw[tdplot_screen_coords, ball color = blue] (\tdplotresx,\tdplotresy) circle (0.15); \end{tikzpicture} \hspace{1cm}; \begin{tikzpicture}[x={(0:1cm)},y={(30:0.5cm)},z={(90:1cm)},scale = 5] % ---- Tracé des traits du réseau ---- \draw (0,0,0) -- (1,0,0) -- (1,1,0) -- (0,1,0) -- (0,0,0); \draw (0,0,1) -- (1,0,1) -- (1,1,1) -- (0,1,1) -- (0,0,1); \draw[thin] (0,0,0) -- (0,0,1); \draw[thin] (1,0,0) -- (1,0,1); \draw[thin] (1,1,0) -- (1,1,1); \draw[thin] (0,1,0) -- (0,1,1); \draw[very thin, dashed] (0.5,0,0) -- (0.5,1,0) -- (0.5,1,1) -- (0.5,0,1) -- cycle; \draw[very thin, dashed] (0,0.5,0) -- (1,0.5,0) -- (1,0.5,1) -- (0,0.5,1) -- cycle; \draw[very thin, dashed] (0,0,0.5) -- (1,0,0.5) -- (1,1,0.5) -- (0,1,0.5) -- cycle; \tdplottransformmainscreen{0.}{0.}{1} \shadedraw[tdplot_screen_coords, ball color = blue] (\tdplotresx,\tdplotresy) circle (0.15); \end{tikzpicture} \end{document}

  • Scoping the value of a l3keys option to the place it is used (part 2)
    by Denis Bitouzé on February 3, 2026 at 8:32 am

    (Sorry again for the vague title of this question (which is a follow-up of another question of mine), I can't think of a more appropriate one.) Suppose I'd like to augment the key set of keytheorems with a Title key which isn't exactly an alias of its title (or its alias name) key but which makes uppercase the first character of its value before passing it to keytheorems' title (or name). In the following MCE, I rely for this on an auxiliary token list which, unfortunately, is not limited to the definition of each defined theorem: only the last value it took is used each time one of the defined theorems is used, so instead of: Abc 1. Foo. Xyz 1. Baz. I get: Xyz 1. Foo. Xyz 1. Baz. How can I work around this problem? \documentclass{article} \usepackage{keytheorems} \ExplSyntaxOn \keys_define:nn { keytheorems/thm } { Title .code:n = { \tl_set:Nn \l_tmpa_tl {\text_titlecase_first:n{#1}} \keys_set:nn { keytheorems/thm } { name=\l_tmpa_tl} } } \NewDocumentCommand{\mynewtheorem}{O{} m} { \newkeytheorem{#2}[#1] } \ExplSyntaxOff \mynewtheorem[Title=abc]{foo} \mynewtheorem[Title=xyz]{baz} \begin{document} \begin{foo} Foo. \end{foo} \begin{baz} Baz. \end{baz} \end{document}

  • pgfplotstable: hide 'leading zeros' and values '1.0000'
    by cis on February 3, 2026 at 7:11 am

    In a pgfplotstable I want (starting with the first column, here 'b') to hide all so-called leading zeros (That was the simplest method I could find. If there's an easier way, that would be great too.) to hide all values '1.0000' completely What's the best way to do that? I tried string replace (for the '1.0000') without success. \documentclass[margin=5pt, varwidth]{standalone} \usepackage{pgfplotstable} \pgfplotsset{compat=1.18} %% Hide Leading zeros ==================== % ---> https://tex.stackexchange.com/a/172672/46023 \ExplSyntaxOn \NewDocumentCommand\trimleadingzero{m}{%% \fp_compare:nTF { 0 < \fp_abs:n { #1 } < 1 } { \__trimleadingzero:n {#1} } { #1 } } \cs_new_protected:Npn \__trimleadingzero:n #1 { \seq_set_split:Nnn \l_ae_integer_decimal_parts_seq {.} {#1} \fp_compare:nF {#1>0} { - } .\seq_item:Nn \l_ae_integer_decimal_parts_seq {2} } \ExplSyntaxOff % ============================== \begin{document} \pgfplotstabletypeset[ string type, % do not know whether this is needed ............. col sep=comma, % works not¹: %%% problem here %%%%%%%% columns/1/.style={string type, string replace={1.0000}{555} }, display columns/1/.style={ postproc cell content/.style={@cell content=\trimleadingzero{##1}}, % works not²: ==== %string replace*={1.0000}{}, string type, }, ]{ a, b, c 1, 0.1100, 0.1200 2, 0.2100, 0.2200 3, 0.3100, 0.3200 4, 0.4100, 1.0000 5, 1.0000, 1.0000 } \end{document}

  • How to activate kashida in arabic poem (babel)
    by Salim Bou on February 2, 2026 at 8:41 pm

    I need to use kashida in an Arabic poem so I tested this example, and I did not get the desired result. what do I need to get kashida? (I have babel version 26.2 ) \documentclass{article} \usepackage[bidi=basic]{babel} \babelprovide[import=ar, main, justification = kashida, transforms = kashida.base] {arabic} \usepackage{bidipoem} \babelfont[arabic]{rm}{Scheherazade New} \begin{document} \begin{traditionalpoem*} هَلْ رَاعَدٌ بَيْنَ السُّحَابِ الْهَطِيلِ & أَمْ بَرْقُ لَاحَ فِي رُبَى الْجَبِيلِ إِنِّي لَأَحْمِي جَارِي وَأُكْرِمُهُ & وَأُدَافِعُ الْقَوْمَ إِذَا مَا أَزْمَلُوا وَلَقَدْ عَلِمْتُ بِأَنَّنِي أَنَا الْمَرْءُ & لَا يُرْهَبُ جَانِبِي وَلَا يُسْتَذَلُّ حَتَّى إِذَا مَا اسْتَكْفَتِ الْحَرْبُ وَطِيسُهَا & وَجَدَتْ قَتِيلًا بَيْنَ كُلِّ مُقَتَّلِ \end{traditionalpoem*} \end{document}