Hot
- 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 labelby 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]:
- How to make nested tabularx workby user2609605 on February 3, 2026 at 10:00 am
Example: \documentclass[a4paper]{article} \overfullrule=10mm \usepackage{tabularx} \begin{document} \maketitle 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 presentationby 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 tikzpictureby 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 tikzby 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} % --- Place one of the attempted rules here, e.g.: --- \babelposthyphenation{arabic}{% () [ﻻﻷﻹﻵ] () [بتثجحخدذرزسشصضطظعغفقكلمنهويىئء] }{ kashida = 0 } % \babelposthyphenation{arabic}{% % () [ﻻﻷﻹﻵ] () {a} % }{ kashida = 0 } % ---------------------------------------------------- \begin{document} \begin{traditionalpoem*} هَلْ رَاعَدٌ بَيْنَ السُّحَابِ الْهَطِيلِ & أَمْ بَرْقُ لَاحَ فِي رُبَى الْجَبِيلِ إِنِّي لَأَحْمِي جَارِي وَأُكْرِمُهُ & وَأُدَافِعُ الْقَوْمَ إِذَا مَا أَزْمَلُوا وَلَقَدْ عَلِمْتُ بِأَنَّنِي أَنَا الْمَرْءُ & لَا يُرْهَبُ جَانِبِي وَلَا يُسْتَذَلُّ حَتَّى إِذَا مَا اسْتَكْفَتِ الْحَرْبُ وَطِيسُهَا & وَجَدَتْ قَتِيلًا بَيْنَ كُلِّ مُقَتَّلِ \end{traditionalpoem*} \end{document}
- Incorrect polar coordinate positions and changing color of marksby 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}
- File does not get saved as updated file, reverting to previous versionby Ruma Dutta on February 2, 2026 at 6:18 pm
Reinstalled texlive distribution again on windows 11 64 bit. Open .tex file using texworks. Chcked texworks preferences to give permission to all useres read, write, execution. Stiil the problem of saving as update file persists. How to solve this problem, I simply do not know. Need serious help. I upgraded texlive using tlmgr.
- tcolorbox: linebreaks missing at a very long number inside tcolorboxby 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 levelby 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}
- Scoping the value of a l3keys option to the place it is usedby Denis Bitouzé on February 2, 2026 at 2:45 pm
(Sorry for the vague title of this question, I can't think of a more appropriate one.) Suppose I want to define a wrapper for the command keytheorems's \newkeytheorem that allows me to provide custom both: a command name, (l3keys) keys options. For example, for French users, I might want to provide localized command name and keys options (this use case is only an example and does not correspond to the real motivation): in the MCE below, \nouveautheoreme and titre are the French translations of \newtheorem and title. The following attempt fails because the token list \l__mymodule_nouveautheoreme_titre_tl, used to store the value of the titre key, 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: Foo 1. Foo. Baz 1. Baz. I get: Baz 1. Foo. Baz 1. Baz. How can I work around this problem? \documentclass{article} \usepackage{keytheorems} \ExplSyntaxOn \keys_define:nn { mymodule / nouveautheoreme } { titre .tl_set:N = \l__mymodule_nouveautheoreme_titre_tl } \cs_new_protected:Nn \__mymodule_nouveautheoreme:nn { \keys_set:nn { mymodule / nouveautheoreme } { #1 } \newkeytheorem{#2}[title=\l__mymodule_nouveautheoreme_titre_tl] } \RenewDocumentCommand{\nouveautheoreme}{O{} m}{ \__mymodule_nouveautheoreme:nn {#1} {#2} } \ExplSyntaxOff \nouveautheoreme[titre=Foo]{foo} \nouveautheoreme[titre=Baz]{baz} \begin{document} \begin{foo} Foo. \end{foo} \begin{baz} Baz. \end{baz} \end{document}
- Mutliple plots using raw gnuplot within pgfplotsby 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 secondby 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 workby 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} \GlsXtrLoadResources[ src={animals},% bib files 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}] \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 ? Interesting: if I endow with position specifier begin{tabularx}[l]{\linewidth}{lX} the error changes: ! Missing number, treated as zero. <to be read again> [ l.72 \printunsrtglossary[style={xxlong}] ? ! Illegal unit of measure (pt inserted). <to be read again> [ l.72 \printunsrtglossary[style={xxlong}] ? ) Runaway argument? ! File ended while scanning use of \TX@get@body. <inserted text> \par <*> test2 ? Who can explain or even better: help.
- Texmaker crashes every time a file dialog is openedby Dimitrios ANAGNOSTOU on February 2, 2026 at 11:11 am
I suddenly (completely out of the blue) started experiencing this problem. Every time I go to: File → Open File → Save As File → New by copying an existing file —that is, essentially anything that would open a file dialog—the program crashes. I’ve tried uninstalling and reinstalling Texmaker, but the problem persists. Does anyone have any ideas on how to fix this? I am using Windows 11. May be this question is relevant to my problem. https://www.reddit.com/r/LaTeX/comments/1qq92nh/texmaker_crashes_whenever_a_file_dialogue_is/
- Font settings for lualatex and pdflatexby Thomas F. Sturm on February 2, 2026 at 9:44 am
I am a pdflatex user, but I would like to have the option to use lualatex as well. This worked for me for documents without font settings, but I run in problems as soon as font settings are involved, especially for mathematics. The following test document contains settings I use with pdflatex, namely (X)Charter for rmfamily SourceSansPro for sffamily LatinModernMono for ttfamily with light for normal text Times (something) for mathematics Further settings for mathematics for bb, frac, cal, scr My goal is to have the same output (or nearly the same) for the following test document for lualatex and pdflatex: % !TeX encoding=UTF-8 % !TeX spellcheck=de_DE_frami % !TeX program=arara % !arara: pdflatex % arara: lualatex \documentclass[a4paper,12pt]{article} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \RequirePackage[ngerman]{babel} \RequirePackage{array,microtype} \PassOptionsToPackage{intlimits}{amsmath} \RequirePackage{iftex} \iftutex% lualatex \RequirePackage{fontspec} \setmainfont{XCharter}[Scale=0.98,sups] \setmonofont{Latin Modern Mono}[Scale=1.05] \setsansfont{SourceSansPro} %\usepackage[otfmath,vvarbb,mathscale=1.05]{newtx} %\usepackage{unicode-math} %\setmathfont{TeX Gyre Termes Math}[Scale=1.05] \else% pdflatex \RequirePackage[T1]{fontenc} \RequirePackage[scaled=.98,sups]{XCharter} \RequirePackage[scaled=1.05,light]{zlmtt} \RequirePackage[type1]{sourcesanspro} \RequirePackage[vvarbb,scaled=1.05]{newtxmath} \fi \RequirePackage[ cal=cm,calscaled=.94, bb=ncmbbk, frak=euler,frakscaled=.97, scr=boondox ]{mathalpha} \RequirePackage{empheq} \RequirePackage{pifont} \RequirePackage{geometry} \RequirePackage{fancyhdr} \RequirePackage{parskip} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \makeatletter \ExplSyntaxOn \NewDocumentCommand \familyname {} { \str_set:NV \l_tmpa_str \f@family \texttt{ \str_use:N \l_tmpa_str } } \ExplSyntaxOff \makeatother %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} Dies ist ein Testtext, der über jedes Maß hinaus höflich ähnliches Verhalten wünscht. \begin{equation} f(x) = \lim\limits_{t\to\infty} \int_0^t \frac{\sin(\alpha\cdot x)}{\gamma\cdot x^2} dr, \quad x\in \mathbb{R}^+,\quad z\in \mathbb{C}, \quad f\in\mathcal{C}^{\infty}(\mathbb{R}). \end{equation} \textit{f}$f$ Test \ifdefined\textfrac \textfrac{1}{2} \fi Test {\ttfamily Typewriter: light(ß) {\fontseries{m}\selectfont medium(ß)} \textbf{bold(ß)} } \begin{tabular}{|p{2cm}p{5cm}p{4cm}|}\firsthline rmfamily & \rmfamily\familyname & \rmfamily Test äöüÄÖÜ߀\\ sffamily & \sffamily\familyname & \sffamily Test äöüÄÖÜ߀\\ ttfamily & \ttfamily\familyname & \ttfamily Test äöüÄÖÜ߀\\\hline \end{tabular} \end{document} With pdflatex, this gives: With lualatex, I have so far: light, medium, and bold settings for typewriter do not work (all is medium) font settings for mathematics do not work at all. I figured out no working settings using newtxmath, newtx, unicode-math, etc. I would like to keep addons like \textfrac etc. coming from newtx(math). I hope, some lualatex expert can help me with correcting my probably dumb settings to get all fonts working for lualatex.
- How to define a \tcbhighmath type command that works both for inline and display math?by Jinwen on February 2, 2026 at 7:37 am
Consider the following example: Here I separately defined a style (with different spacing around) for inline and display math. Is it possible to define an automatic version, so as to use the inline style in inline equation, and the display style in displayed equation? \documentclass{article} \usepackage[many]{tcolorbox} \begin{document} \tcbset{highlight math style={empty,sharp corners,borderline={.4pt}{0pt}{black!16.67},left=0pt,right=0pt,top=0pt,bottom=0pt,extrude left by=-1pt,extrude right by=-1pt,extrude top by=0pt,extrude bottom by=0pt,boxsep=\fboxsep}} Some text \( \tcbhighmath{x^2 + y^2 = 1} \). \tcbset{highlight math style={empty,sharp corners,borderline={.4pt}{0pt}{black!16.67},left=0pt,right=0pt,top=0pt,bottom=0pt,extrude left by=3pt,extrude right by=3pt,extrude top by=3pt,extrude bottom by=3pt,boxsep=\fboxsep}} \[ \tcbhighmath{ x^2 + y^2 = 1. } \] \end{document}
- Spacing with mathematical symbols in braketsby 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 systemby 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.
- Redefine `\item` so its first "argument" is a full wordby mathbekunkus on February 1, 2026 at 5:37 am
I defined a Tikz macro and I want to use it so the item of an inline itemize is passed as its argument. So far, my solution is this: \documentclass{article} \usepackage[inline]{enumitem} \usepackage{tikz} \newcommand\itemvalue[1]{ \tikz[baseline=(o.base)] { \node[ inner xsep=0pt, inner ysep = 1pt, outer xsep=2pt, outer ysep=2pt ] (o) at (0,0) {\textcolor{blue!80!black}{\fontsize{10}{16}\textbf{#1}}}; \draw[color=gray!50, thick] ([xshift=(-1.3)]o.south west) -- ([xshift=(1.3)]o.south east); } } \begin{document} \let\olditem\item \renewcommand\item[1]{\olditem\itemvalue{#1}} \begin{itemize*}[label={}, labelsep=2em, parsep=2ex] \item {First} \item {Second} \item {Third} \end{itemize*} \end{document} The output looks like this: This is what I want but I was wondering if there was a way of redefining \item so it reads the full word (not only its first letter). If I remove the braces on each item, the output looks like this: This makes sense as far as I can tell how \item works, but I'd like a workaround that doesn't use braces on each item. Thanks!
- Wrapping a circle on a torusby 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}
- The choice between pdflatex and xelatex, and the use of newcomputermodernby Ho Man-Ho on January 31, 2026 at 9:07 am
Let me provide some background for my question: I am compiling a latex project, which involves a main tex file and more than 100 other tex files with no figures (except for a few simple diagrams) or pictures. The resulting pdf file has more than 600 pages. Initially, I was using pdflatex and newtxtext for font. However, recently I am more inclined to use NewComputerModern, in particular I like the slightly thicker font. As we know, to use NewComputerModern, we must either use xelatex or luatex. I chose xelatex because it seems to be slightly faster than using luatex, but it is slower than pdflatex. So I ended up spending more time for compilation, especially when I am editing the tex files for the pages of the end of the pdf file. The packages I am using are: amsfonts, amsmath, amscd, amssymb, euscript, amsthm, fancyhdr, pgf, tikz, pgfplots, caption, subcaption, enumitem, thmtools, color, centernot, mathtools, afterpage, amsbsy, systeme, sectsty, multirow, float, tikz-cd, etoolbox, microtype, mathrsfs, fontspec, fncychap, xy, appendix My question is: is there any way to use NewComputerModern and get faster compilation? I want to minimize the time for compilation while keep looking at NewComputerModern rather than newtxtext. I considered using pdflatex and newtxtext during editing, and xelatex and NewComputerModern right before finish editing. But I think we should be able to do better than this.