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

  • Is that possible to apply transformation matrix just for coordinates, but not the canvas in `l3draw`?
    by Explorer on February 3, 2026 at 1:47 pm

    Similar to this post and this post, the question focused on \draw_transform_matrix:nnnn What I want to get the as below: Noted that each point is a circle, but not an ellipse. Here below is my code: \documentclass[border=5pt]{standalone} \usepackage{l3draw} \usepackage{xcolor} \begin{document} \ExplSyntaxOn \draw_begin: \draw_set_linewidth:n { .03cm } %%%%%%%%%%%%%%%% \draw_path_moveto:n {-3cm , 0cm} \draw_path_lineto:n {3cm , 0cm} \draw_path_use_clear:n {stroke} \draw_path_moveto:n { 3cm - 2.5pt , 0cm - 5pt } \draw_path_lineto:n { 3cm + 7.5pt , 0cm + 0pt } \draw_path_lineto:n { 3cm - 2.5pt , 0cm + 5pt } \draw_path_lineto:n { 3cm , 0cm + 0pt } \draw_path_use_clear:n { fill } %%%%%%%%%%%%%%%% \draw_path_moveto:n { 0cm , -3cm } \draw_path_lineto:n { 0cm , 3cm } \draw_path_use_clear:n {stroke} \draw_path_moveto:n { 0cm - 5pt , 3cm - 2.55pt } \draw_path_lineto:n { 0cm + 0pt , 3cm + 7.5pt } \draw_path_lineto:n { 0cm + 5pt , 3cm - 2.5pt } \draw_path_lineto:n { 0cm + 0pt , 3cm + 0pt } \draw_path_use_clear:n { fill } %%%%%%%%%%%%%%%% \cs_generate_variant:Nn \color_set:nn { ne } \int_step_inline:nn { 10 } { \draw_scope_begin: % \draw_transform_matrix:nnnn { 1 }{ 0 }{ 0 }{ 1 } \draw_transform_xscale:n { 2 } %<----here \int_step_inline:nn { 10 } { \color_set:ne {tmp} { yellow!\int_eval:n {##1*10}!blue } \color_fill:n {tmp} \draw_path_circle:nn { (#1 -5.5) * 0.25cm ,(##1 -5.5) * 0.25cm } { 2pt } \draw_path_use_clear:n { fill } } \draw_scope_end: } \draw_end: \ExplSyntaxOff \end{document} It gives the following, where xscale the point's shape at the same time: Is that possible to apply transformation matrix just for coordinate, but not the path in l3draw?

  • How to use align-enivronment when there is a conflict
    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
    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}

  • tcolorbox : How to create a key with default value , and use this value inside another key?
    by YCH817 on February 3, 2026 at 12:58 am

    I want to create some key for tcolorbox to display codefences . Here is part of my code : \usepackage{minted} % code highlighting \usepackage[ all ]{tcolorbox} % tcolorbox \usepackage{relsize} % control the font size relative to the context \setmonofont[ % set font for codeblocks Contextuals={Alternate} ]{Fira Code} \usemintedstyle{material} % set code highlight style (see https://pygments.org/styles/) \tikzset{ % used for the "finish" key below codeforce/header/.style={ line width=.4pt, font=\ttfamily\relscale{.7}, text=colorCodefenceTitlText, text opacity=1, text height=0.7*height("/()FGfg"), text depth =0.7* depth("/()FGfg"), outer xsep=0pt, outer ysep=0pt, inner ysep=1pt } } \tcbset{ mycode/base/.style={ fontupper=\relscale{.7}, breakable, enhanced, skin first=enhanced, skin middle=enhanced, skin last=enhanced, % bicolor, % this is another skin colframe=Gray, colback=red, colbacklower=red, boxrule=.4pt, arc=5pt, top=2.5mm, bottom=2mm, center lower, }, } \setminted{ breaklines=true, breakanywhere=true, escapeinside= ่„Žๅก,% encoding=utf8, tabsize=2, } I want to use the following settings for key /mycode/betweenline and it has 3 parameters : \tcbset{ mycode/betweenline/.style={ mycode/base/.style, finish={ \node(syntax) [anchor=north east, codeforce/header] at ([xshift=-5pt]interior.north east) {#2}; \begin{tcbclipframe} \node(header) [anchor=north west, codeforce/header] at ([xshift=+5pt]interior.north west) {#1}; \end{tcbclipframe} }, listing engine=minted, minted language = #1, minted options = { % minted settings tabsize=2, linenos=true, numbersep=5pt, % highlightlines={#3}, highlightcolor=colorCodefenceBodyFillHL, xleftmargin=+10pt, }, } } I want to create 3 keys /mycode/betweenline/syntax with default value latex , and /mycode/betweenline/filename , which is not mandatory , and /mycode/betweenline/highlightlines , which is not mandatory . and put their value inside my settings for mycode/betweenline , here is an example of usage : \begin{tcblisting}{ /mycode/betweenline/syntax=python, /mycode/betweenline/filename={hello.py}, /mycode/betweenline/highlightlines={1-2}, /mycode/betweenline } print("Hello World!") # comment 1 # comment 2 \end{tcblisting} or something like this : \begin{tcblisting}{ /mycode/betweenline/syntax=python, /mycode/betweenline } print("Hello World!") # comment 1 # comment 2 \end{tcblisting} You can provide other syntax if you think this plan is not good as you think . a little update : Here is my idea , I create some keys that overwrite / append the key minted options and finish . The MWE shown below has some issues : the code inside the codefence cannot display propriately , i cannot figure out the reason but this idea works well in another LaTeX project of mine . % !TEX program = XeLaTeX \documentclass[10pt,a4paper]{article} \usepackage[ all ]{tcolorbox} \usepackage{fontspec} \usepackage{minted} \usepackage{relsize} % control the font size relative to the context \usepackage[ svgnames, dvipsnames, table ]{xcolor} \setmonofont[ % set font for codeblocks Contextuals={Alternate} ]{Fira Code} \usemintedstyle{material} % set code highlight style (see https://pygments.org/styles/) \tikzset{ % used for the "finish" key below codeforce/header/.style={ line width=.4pt, font=\ttfamily\relscale{.7}, text=white!25!LightSteelBlue, text opacity=1, text height=0.7*height("/()FGfg"), text depth =0.7* depth("/()FGfg"), outer xsep=0pt, outer ysep=0pt, inner ysep=1pt } } \tcbset{ mycode/base/.style={ fontupper=\relscale{.7}, breakable, enhanced, skin first=enhanced, skin middle=enhanced, skin last=enhanced, % bicolor, colframe=Gray, colback=Black!80!DarkBlue, colbacklower=LightGray!50, boxrule=.4pt, arc=5pt, top=2.5mm, bottom=2mm, center lower, }, mycode/betweenline/.style={ mycode/base, code={\linespread{1.3}}, boxsep=2pt, right=-2pt, % ๅฏนๅบ” boxsep finish={ \begin{tcbclipframe} \node(header) [anchor=north west, codeforce/header] at ([xshift=+5pt]interior.north west) {#1}; \end{tcbclipframe} }, listing engine=minted, minted options = { % minted settings tabsize=2, linenos=true, numbersep=5pt, highlightcolor=Black!60!Periwinkle, xleftmargin=+10pt, }, }, mycode/betweenline/syntax/.append style={ minted language = #1, finish={ \node(syntax) [anchor=north east, codeforce/header] at ([xshift=-5pt]interior.north east) {#1}; } }, mycode/betweenline/highlightlines/.style={ minted options ={ highlightlines={#1}, tabsize=2, linenos=true, numbersep=5pt, highlightcolor=Black!60!Periwinkle, xleftmargin=+10pt, } }, } \setminted{ breaklines=true, breakanywhere=true, escapeinside= ่„Žๅก,% encoding=utf8, tabsize=2, } \begin{document} \begin{tcblisting}{ mycode/betweenline={test.tex}, mycode/betweenline/syntax={latex}, mycode/betweenline/highlightlines={5-7}, listing only, listing above text } % comment 1 % comment 2 % comment 3 % comment 4 \begin{tikzpicture} \path[fill=yellow!50!white] (0,0) circle (11mm); \path[fill=white] (0,0) circle (9mm); \foreach \w/\c in {90/red,210/green,330/blue} {\path[shading=ball,ball color=\c] (\w:1cm) circle (7mm);} \end{tikzpicture} \end{tcblisting} \end{document}

  • Tikz feature `scope fading` only work for PDF but not the PNG format from screenshot tools on windows11?
    by Explorer on February 3, 2026 at 12:49 am

    This post originated from cfr's elegant solution here with scope fading: However, I found that it doesn't work with my bg.png, but work with bg.pdf: with bg.png: \documentclass[landscape]{article} \usepackage{tikz} \usetikzlibrary{fadings} \usepackage{kantlipsum} \begin{document} \AddToHook{shipout/background}{% \put (0pt,-\paperheight) {% \begin{tikzpicture}[baseline=(a.south),every node/.style={inner sep=0pt},] \node [anchor=south west] (a) {\includegraphics[width=.5\paperwidth]{bg.png}}; \node [anchor=west,scope fading=north] at (a.east) {\includegraphics[width=.5\paperwidth]{bg.png}}; \end{tikzpicture}% }% } \kant[1-2] \end{document} However, when I convert bg.png to bg.pdf, it works! with bg.pdf: \documentclass[landscape]{article} \usepackage{tikz} \usetikzlibrary{fadings} \usepackage{kantlipsum} \begin{document} \AddToHook{shipout/background}{% \put (0pt,-\paperheight) {% \begin{tikzpicture}[baseline=(a.south),every node/.style={inner sep=0pt},] \node [anchor=south west] (a) {\includegraphics[width=.5\paperwidth]{bg.pdf}}; \node [anchor=west,scope fading=north] at (a.east) {\includegraphics[width=.5\paperwidth]{bg.pdf}}; \end{tikzpicture}% }% } \kant[1-2] \end{document} In cfr's answer, it looks like .eps also works, I wonder why my bg.png failed, is that add .png can't work well with scope fadings, or just my specific bg.png that has something bad features inside? Edited The file information of my bg.png is as below: wsl file bg.png bg.png: PNG image data, 1534 x 1380, 8-bit/color RGBA, non-interlaced with Alpha Channel! Which the bg.png file could be downloaded from here(Thanks quark67's comment), which is accessed just a screenshot create by the default screenshot tool on my windows11 machine๐Ÿค”...

  • Drawing a crystal latice with tikz
    by Nicolas on February 2, 2026 at 9:27 pm

    I'd like to draw crystal structures using TikZ-3Dplot'''. I saw that solutions exist with Asymptote, but for some reason, I can't install it (and I admit I had trouble understanding how the package works). I started with TikZ 3D Plot, which seems to work. I just have one question: I can't keep some lines horizontal, which I find unsightly (I've tried several angle values โ€‹โ€‹in the command \tdplotsetmaincoords, but without success). \documentclass{standalone} \usepackage{tikz,tikz-3dplot} \usepackage{xcolor} \begin{document} \tdplotsetmaincoords{75}{10} \begin{tikzpicture}[tdplot_main_coords, scale = 5] % ---- Tracรฉ des traits du rรฉseau ---- \draw[thin] (0,0,0) -- (1,0,0) -- (1,1,0) -- (0,1,0) -- (0,0,0); \draw[thin] (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); \tdplottransformmainscreen{0}{0}{0} \shadedraw[tdplot_screen_coords, ball color = blue] (\tdplotresx,\tdplotresy) circle (0.10); \end{tikzpicture} \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}

  • Incorrect polar coordinate positions and changing color of marks
    by humanoferth on February 2, 2026 at 7:02 pm

    I've been trying to plot coordinates using the polar library of PGFplots, but the plot is just... wrong? Like the points are just not at the right position, and I'm not too sure what I'm missing. I'm pretty sure it may have something to do with using radians instead of degrees, but when I use radians to graph, they turn out fine. I would really prefer not to use degrees, but if it's the only solution, then I'll do the conversions. I'm also struggling to figure out how to change the actual infill color of the nodes. I've been referencing section 4.7.1, and in the code below I use fill, draw, and color, but the infill remains the same. Any help would be greatly appreciated. ๐Ÿ™‚ \documentclass{report} \usepackage{amsmath} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \usepgfplotslibrary{polar} \begin{document} \[ \begin{array}{c|c} \text{Name}&(r,\theta)\\\hline A&(1,\dfrac{\pi}{3})\\ B&(2,\dfrac{3\pi}{4})\\ C&(3,\dfrac{7\pi}{6})\\ D&(-1,\dfrac{2\pi}{3})\\ \end{array}\implies\begin{tikzpicture}[baseline=(current bounding box.center)] \begin{polaraxis}[xticklabels={,0,$\frac{\pi}{6}$,$\frac{\pi}{3}$,$\frac{\pi}{2}$,$\frac{2\pi}{3}$,$\frac{5\pi}{6}$,$\pi$,$\frac{7\pi}{6}$,$\frac{4\pi}{3}$,$\frac{3\pi}{2}$,$\frac{5\pi}{3}$,$\frac{11\pi}{6}$}] \addplot+ [trig format plots=rad, data cs=polarrad,only marks,color=black, mark color=black,draw=black,fill=black,] coordinates {(1,pi/3)(2,3*pi/4)(3,7*pi/6)(-1,2*pi/3)}; \end{polaraxis} \end{tikzpicture} \] \end{document}

  • tcolorbox: linebreaks missing at a very long number inside tcolorbox
    by cis on February 2, 2026 at 6:11 pm

    I saw a very long number here and a solution with seqsplit.sty (from 2006) for its linebreaks. But I asked myself is there maybe a solution with the settings of tcolorbox? (Hint: It is clear, that I could use seqsplit inside the tcolorbox too, but I wonder, whether tcolorbox has own methods for that.) \documentclass[margin=5pt, varwidth]{standalone} \usepackage{amsmath} \usepackage{xintexpr} \usepackage{seqsplit} \usepackage[most]{tcolorbox} \begin{document} \paragraph{Test (bad):} $2^{1000}=$ \xinteval{2**1000} \bigskip \paragraph{Test (seqsplit, good):} $2^{1000}=$ \expanded{\noexpand\seqsplit{\xinteval{2**1000}}} \bigskip \begin{tcolorbox}[title={Test (tcolobox, bad too)}] $2^{1000}=$ \xinteval{2**1000} \end{tcolorbox} \end{document}

  • How to fade the background image with multiple opacity?
    by Explorer on February 2, 2026 at 5:58 pm

    I have the following code to add background for the document: \documentclass{article} \usepackage{lipsum} \usepackage{geometry} \usepackage{graphicx} \usepackage{tikz,tikzpagenodes} \usetikzlibrary{calc,fadings} \AddToHook{shipout/background}{ \begin{tikzpicture}[remember picture,overlay] \node[ % path fading=north, inner sep=0pt,outer sep=0pt, anchor=south,opacity=.3, ] at (current page.south) {\includegraphics[width=\paperwidth]{bg.png}}; % \path[path picture={ % \node[inner sep=0pt,outer sep=0pt,anchor=south,scope fading=south] at (current page.south) {\includegraphics[width=\paperwidth]{bg.png}}; % }]; \coordinate (L) at ($(current page.north west)!.5! (current page text area.north west)$); \coordinate (R) at ($(current page.south east)!.5! (current page text area.south east)$); \fill[white,opacity=.5] (L) rectangle (R); \end{tikzpicture} } \begin{document} \lipsum[1-6] \end{document} It produced: However, the intersection border's color transformation is too sharp! I want the image could smoothly fade to white, with multiple opacity, I have consulted this link, but it doesn't work. The bg.png could be accessed as below(maybe example-image is okay, but its background is pure gray, I would prefer to show that on bg.png):

  • How to list a work under the translator's name using biblatex-chicago?
    by PaulTanenbaum on February 2, 2026 at 5:03 pm

    Para 14.6 of The Chicago Manual of Style (18th ed.), bearing the heading "Editor or translator in addition to author," reads in part, Occasionally, when an editor or a translator is more important to a discussion than the original author, a book may be listed under the editor's name. (I presume that although that sentence isn't 100% explicit about it, its guidance applies to the translator's name too.) That guidance is then followed by this example: Eliot, T.S., ed. Literary Essays. By Ezra Pouund. New Directions, 1954. I am dealing with such a situation and I haven't found a way to get biblatex-chicago to produce its output accordingly. I know that biblatex-chicago has not kept up with the evolution of CMOS itself, and it's not really reasonable to expect it to. Nor, though, do I know if the guidance in question is new to the 18th ed. Anyway, out of the box, this LaTeX code \documentclass[11pt]{article} \usepackage[authordate,doi=only,backend=biber]{biblatex-chicago} \addbibresource{mwe1.bib} \begin{document} Nor is Matthew~13:57 the only source to make this point. In his celebrated book {\em Naturalis Historia} (Natural History), Pliny the Elder expresses essentially the same idea~% \autocite[fn. 2012]{Pliny:nh:1857}. \printbibliography \end{document} together with this biblatex entry @book{Pliny:nh:1857, shortauthor = {Pliny}, author = {{Pliny the Elder}}, title = {Natural History}, volume = {6}, translator = {Bostock, John AND Riley, Henry Thomas}, publisher = {Henry G. Bohn}, date = {1857}, } produces this output: I know I can force the entry to be listed under the translators by deleting the author and shortauthor fields from the biblatex entry. The output from that, which is does give me the desired citation, but its corresponding entry in the references doesn't mention the author (and can't since that's the very information that was deleted). Any good ideas on how to hack biblatex-chicago (or my biblatex entry, or anything else) to get the desired output? To be unambiguous, I read CMOS 18 to advise that what I want is

  • How to resume an enumitem list at lower level
    by mm96 on February 2, 2026 at 4:52 pm

    Similar to this question: similar question I don't know, why the 'resume*=series' approach does not work here. \documentclass{scrartcl} \usepackage{enumitem} \begin{document} text text text texttext text text text\\ text text text texttext text text text \begin{enumerate}[leftmargin=*] \item asdfg \item afhaf \begin{enumerate}[series=_test] \item adslfa \item adsfadsf \end{enumerate} \end{enumerate} text text text texttext text text text\\ text text text texttext text text text \begin{enumerate}[resume*=_test] \item adfa \end{enumerate} \end{document}

  • Mutliple plots using raw gnuplot within pgfplots
    by jak123 on February 2, 2026 at 1:36 pm

    Why does this produce a broken .gnuplot code when compiled? I'm trying to plot the gamma function as segments. \documentclass[tikz]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ xlabel={$x$}, ylabel={$\Gamma(x)$}, axis lines={ middle, }, every axis x label/.append style={ font=\footnotesize, at={(axis cs: 0,1)} }, every axis y label/.append style={ font=\footnotesize, at={(ticklabel cs: 1.05, 0)} }, xmin=-4, xmax=4, ymin=-15, ymax=15, restrict y to domain=-15:15, ] \addplot gnuplot [ raw gnuplot, samples=555, smooth, id=myplot ] { plot \ [-4:-3] gamma(x) notitle, \ [-3:-2] gamma(x) notitle, \ [-2:-1] gamma(x) notitle, \ [-1: 0] gamma(x) notitle, \ [ 0: 4] gamma(x) notitle }; \end{axis} \end{tikzpicture} \end{document} Output: set format "%.7e";; plot \ [-4:-3] gamma(x) notitle, \ [-3:-2] gamma(x) notitle, \ [-2:-1] gamma(x) notitle, \ [-1: 0] gamma(x) notitle, \ [ 0: 4] gamma(x) notitle

  • Bug or feature: unexpected behavior of \bar with subscript first and superscript second
    by user470904 on February 2, 2026 at 1:28 pm

    As a physicist, I often need to typeset tensor indices where it matters whether the subscript is to the left or to the right of the superscript. My usual solution is to use {t_A}^B, which puts the superscript B to the right of the subscript A, compared to t_A^B which puts the superscript B vertically aligned with the subscript A. However, I recently noticed that if I use \bar{t} or \tilde{t} instead of t above, the output no longer differs whether I enclose the (xxx)_A part with braces or not. But, \overline{t} still behaves as I expect. Then I tried \widetilde{t}, which still ignores the braces. Is this a bug or a feature? If it's a feature, how should I classify which commands ignore the braces and which do not? In particular, is there a "tilde" command that behaves like \overline that can put the superscript to the right of the subscript? Minimal working example: \documentclass{article} \begin{document} \begin{equation} \begin{array}{lllll} t_A^B & \tilde{t}_A^B & \widetilde{t}_A^B & \bar{t}_A^B & \overline{t}_A^B \\ {t_A}^B & {\tilde{t}_A}^B & {\widetilde{t}_A}^B & {\bar{t}_A}^B & {\overline{t}_A}^B \end{array} \end{equation} \end{document} Output:

  • new glossary style based on tabularx does not work
    by user2609605 on February 2, 2026 at 1:09 pm

    Following MnWE: documentclass[a4paper]{article} \overfullrule=10mm \usepackage{xltabular} \usepackage{geometry} \usepackage[record]{glossaries-extra} \usepackage{glossary-long} \newglossary*{animals}{Definitions} \GlsXtrLoadResources[ src={animals},% bib files type={animals}, selection={all}% select all entries ] \title{Glossaries are difficult} \author{E. Gloss} \date{\today} \newglossarystyle{xxlong}{% \setglossarystyle{long}% \renewenvironment{theglossary}% {\begin{tabularx}{\linewidth}{lX}}%[l] {\end{tabularx}}% % \renewcommand*{\glossaryheader}{}% % \renewcommand*{\glsgroupheading}[1]{}% % \renewcommand{\glossentry}[2]{% % \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & % \glossentrydesc{##1}\glspostdescription\space ##2\tabularnewline % }% % \renewcommand{\subglossentry}[3]{% % & % \glssubentryitem{##2}% % \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription\space % ##3\tabularnewline % }% % \ifglsnogroupskip % \renewcommand*{\glsgroupskip}{}% % \else % \renewcommand*{\glsgroupskip}{ & \tabularnewline}% % \fi } \begin{document} \maketitle This document is experimental to find a new glossary style adapted to the needs of a customer. \begin{xltabular}{\linewidth}{lX} abbrev & Here come typically very long explanations. \\ AFD & organization of criminals telling that they save Germany and that they are an alternative to established parties. \\ \end{xltabular} %\chapter{Introduction}\label{chap:intro} The \gls{cat} loves the \gls{mouse} and hates the \gls{dog}. \printunsrtglossary[% style={xxlong}] type={animals}, \end{document} with animals.bib: @entry{cat, name={cat}, description={Animal that loves mouse and hates dog. Animal that loves mouse and hates dog. Animal that loves mouse and hates dog. Animal that loves mouse and hates dog. Animal that loves mouse and hates dog. } } @entry{mouse, name={mouse}, description={Beloved playmate for cat. Beloved playmate for cat. Beloved playmate for cat. Beloved playmate for cat. Beloved playmate for cat. Beloved playmate for cat. } } @entry{dog, name={dog}, description={Most superfluous animal. Most superfluous animal. Most superfluous animal. Most superfluous animal. Most superfluous animal. Most superfluous animal. } } Maybe you see that I wanted to adapt the glossarystyle long replacing longtable by xltabular. I tried out as a table first without using it to format a glossary, i.e. \printunsrtglossary[style={xxlong}] commented out. This seems to work fine. Means no errors and the output as expected: using the whole linewidth, table column for term fitting the need description takes up the rest of the space Perfect. (well, almost, later I want term bold face) Then I tried to compile with glossary. First lualatex run works fine still, clear because no glossary is printed only the headline. But second run of lualatex after bib2gls fails: Runaway argument? ! File ended while scanning use of \TX@get@body. <inserted text> \par <*> test2 ? Who can explain or even better: help.

  • Spacing with mathematical symbols in brakets
    by Danya Zh on February 1, 2026 at 9:38 pm

    In the braket package I have noticed a spacing issue with mathematical operators; plus and minus symbols after | will be treated as binary operators, even if they represent an ordinary operator. For example $\braket{+45|+45}$ will have no spacing for the first + symbol (treated as class 0), but will have the operator spacing for the second + symbol (treated as class 2). \documentclass{article} \usepackage{braket} \begin{document} How can we fix spacing in $\braket{+45|+45}$ without invoking \verb+\!+ \end{document} I would like to have a solution that does not involve inline spacing fixes. I am confident that the command can be redefined in a way that would resolve this issue.

  • In 2026, what kind of plot requirement is suitable with `l3draw`(such as "arrow")?
    by Explorer on February 1, 2026 at 3:38 pm

    I want to mimic the following figure with l3draw, the \draw_transform_matrix:nnnn feature to apply transformation matrix. Here below is my attempt: \documentclass[border=5pt]{standalone} \usepackage{l3draw} \usepackage{amsmath} \begin{document} \ExplSyntaxOn \draw_begin: \color_set:nnn { orange } {RGB} {255, 128, 0} \draw_scope_begin: \draw_transform_matrix:nnnn { 2.5 } { 0.5 } { 0.5 } { 3 } \draw_set_cap_round: \draw_path_rectangle_corners:nn { -5mm , -5mm } { 35mm , 35mm } \color_fill:n { orange!15 } \draw_path_use_clear:n { fill } \draw_path_grid:nnnn { 1cm } { 1cm } { -5mm , -5mm } { 35mm , 35mm } \color_stroke:n { orange } \draw_path_use_clear:n { stroke, fill } \draw_set_linewidth:n { .1cm } \draw_path_moveto:n { 0cm, 0cm } \draw_path_lineto:n { 0cm, 1cm } \draw_path_use_clear:n { stroke } \draw_path_moveto:n { 0cm, 0cm } \draw_path_lineto:n { 1cm, 0cm } \draw_path_use_clear:n { stroke } \color_stroke:n { black } \draw_path_moveto:n { 0cm, 0cm } \draw_path_lineto:n { 2cm, 2cm } \draw_path_use_clear:n { stroke } \draw_scope_end: \draw_end: \ExplSyntaxOff \end{document} My question is: Is that possible to plot the image of "arrow" in l3draw's code framework? In 2026, when to choose l3draw? (I found that there are only 17 posts on this site was tagged l3draw since now) By reading the post on this site, l3draw is more used to constuct symbols(without arrow), or apply some transformations with l3box.... (Notes: I don't think my second question is a quite different one, in my state now, it's quite natural to ask if some features didn't provide by l3draw, while I have written the code shown above) Edited: Since Joseph has commented that: Currently arrows are not implemented, partly as I've not had a need to do it - the priority is really to get the code stable ATM I still wonder what kind of plotting requirement is suitable to play with l3draw in the current state(2026.02)?

  • Drawing a pulley system
    by Fatai Bakare on February 1, 2026 at 8:32 am

    I need to draw a pulley system as in the figure. How can I do that? Specific information about the figure: A block of mass Mo is on a horizontal surface and attached by a string to a hanging block, also of mass Mo , as shown in the figure. Friction between the block and the horizontal surface is negligible. The masses of the string and pulley are negligible, and the pulley can rotate with negligible friction around its axle.

  • Wrapping a circle on a torus
    by M. Al Jumaily on February 1, 2026 at 4:19 am

    I have used the sample code from latexdraw that draws a torus. I am trying to draw a filled circle and a dashed circle where they should be wrap around the torus instead of being drawn uniformly at z=0. I am looking for a TikZ solution. The closest I have seen is this solution but it is too difficult for me to decipher. Any help would be appreciated! \documentclass[margin=4pt]{standalone} \usepackage{tikz} \usepackage{pgfplots} \usepackage{tikz-3dplot} \usepgfplotslibrary{colormaps} \pgfplotsset{ compat=newest, colormap={manifoldmap}{color=(lightgray) color=(white) color=(lightgray)} } \begin{document} \begin{tikzpicture} \def\R{2.75} % Major radius (distance from torus centre to tube centre) \def\offset{0.5} % Radial displacement from the torus centre circle \def\thetaB{2.5} % Angular position (in radians) for highlighted point \begin{axis}[ width=12cm, axis equal image, hide axis, z buffer=sort, view={125}{35}, clip=false ] % Parametric torus equations: % x = (R + cos(x)) cos(y) % y = (R + cos(x)) sin(y) % z = sin(x) \addplot3[ surf, shader = faceted interp, samples = 30, samples y = 40, domain = 0:2*pi, domain y = 0:2*pi, colormap name = manifoldmap, thin, opacity=0.75 ] ( {(\R + cos(deg(x))) * cos(deg(y))}, {(\R + cos(deg(x))) * sin(deg(y))}, {sin(deg(x))} ); \begin{scope}[canvas is xy plane at z=0, transform shape] \coordinate (p) at ({(\R + \offset) * cos(deg(\thetaB))}, {(\R + \offset) * sin(deg(\thetaB))}); \draw[fill=red, draw=none] (p) circle (4pt); \draw[blue, dashed, thick] (p) circle (16pt); \end{scope} \end{axis} \end{tikzpicture} \end{document}