Week
- TikZ externalization fails with precompiled header (.fmt) and "Incomplete \iffalse" errorby dp21 on March 23, 2026 at 12:26 pm
I am trying to speed up the compilation of a complex project using a format file and tikz externalize. In particular I tried a setup like shown in the follwing MWE: preamble-min.tex \documentclass[a4paper,12pt]{article} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \usetikzlibrary{external} \dump main-min.tex: \tikzset{ external/system call={% pdflatex -shell-escape -fmt=preamble-min \ -interaction=nonstopmode -jobname "\image" "\def\tikzexternalrealjob{\texsource}\input{\texsource}"% } } \tikzexternalize[prefix=tikz-cache/] \begin{document} \begin{tikzpicture} \begin{axis} \addplot+[raw gnuplot, mark=none] gnuplot { plot [-5:5] sin(x); }; \end{axis} \end{tikzpicture} \end{document} Compilation Steps: mkdir -p tikz-cache pdflatex -ini -shell-escape -jobname=preamble-min "&pdflatex preamble-min.tex" pdflatex -shell-escape -fmt=preamble-min main-min.tex The compilation stops with: ! Incomplete \iffalse; all text was ignored after line 19. <inserted text> \fi <*> main-min.tex Any ideas how to make this work well and robust? I am using texlive-2025.
- Tikz-cd arrow labels conflict with background colourby Amitai on March 22, 2026 at 6:11 pm
I'm using q.uiver.app to make commutative diagrams for a project. There is a feature that allows for the label of an arrow to be displayed directly above it. This creates a white background for the label, which clashes visually with the background box. Here is an example of what it looks like: Here is an example of the code for the commutative diagram, using {description} to overlay the text above the arrow: \[\begin{tikzcd} Q &&& \\ & P && X \\ \\ & {X'} && Y \arrow["{\exists!h}"{description}, dashed, from=1-1, to=2-2] \arrow["p"{description}, from=1-1, to=2-4] \arrow["q"{description}, from=1-1, to=4-2] \arrow["a"{description}, from=2-2, to=2-4] \arrow["b"{description}, from=2-2, to=4-2] \arrow["f"{description}, from=2-4, to=4-4] \arrow["g"{description}, from=4-2, to=4-4] \end{tikzcd}\] I'm using a template for the project; here is what the stylesheet uses to define the lemma/proof boxes: % proofs: proof \definecolor{prooflinecolor}{RGB}{103, 103, 103} % rgba(40, 40, 40, 180) %FORMAT \definecolor{proofbgcolor}{RGB}{247, 247, 247} % rgba(40, 40, 40, 10) %FORMAT \linedbox{@proof}{Proof}{proof}{proofbgcolor}{prooflinecolor} % this numbers the proofs, so we renew the environment to prevent that; but we still allow a title, so you can do e.g. "Proof (of Theorem 1.2.3)" \def\qed{\null\nobreak\hfill\ensuremath{\blacksquare}} % qed square %FORMAT switch \blacksquare to \square for the not-filled-in version \renewenvironment{proof}[1][]{\csname @proof*\endcsname{#1}{}}{\qed\csname end@proof*\endcsname} \def\flushproof{\vspace{-\parskip}} % put this before a proof to make it flush with the result it's proving How do I make this white background transparent? Or, if necessary, how do I set it to a certain colour (so that I can just choose the backdrop colour)?
- I am trying to make a really cool animation using Koch snowflakes, but don't know howby Jasper on March 22, 2026 at 3:28 pm
I was scrolling through reels earlier and came across a really cool animation: https://www.youtube.com/shorts/aQbq_Fpyyb4. Note: You can analyze the gif frame by frame using the method suggested by MS-SPO in the comments, or by using the website ez-gif, or by using custom python scripts. I interchangeably use ez-gif and python for these sorts of things, and in this instance used ez-gif. I did some digging and found this old post, which I modified slightly. % Source - https://tex.stackexchange.com/a/205608 % Posted by Mark Wibrow % Retrieved 2026-03-22, License - CC BY-SA 3.0 \documentclass[tikz, border=5]{standalone} \usetikzlibrary{lindenmayersystems} \tikzset{koch snowflake/.style={insert path={% l-system [l-system={rule set={F -> F-F++F-F}, axiom=F++F++F, step=0.75cm/3^#1, angle=60, order=#1,anchor=center}] -- cycle}}} \begin{document} \begin{tikzpicture} \path[fill=orange,koch snowflake=4]; \end{tikzpicture} \end{document} I am however without a clue as to how to go about producing this gif I found. I am seeking assistance in creating this gif.
- fonts: strange representation for capital deltaby fft on March 22, 2026 at 1:55 pm
I'm trying to generate texfonts.h from mimetex package. According to documentation I execute next TeX/METAFONT commands: mf "\mode=eighthre; input cmr10" # produces cmr10.83gf gftype -i cmr10.83gf > typeout Most of chars looks as expected (latin letters, capital Gamma and Theta), but capital Delta looks strange. See fragment of typeout file: 1561: beginning of char 0 .<--This pixel's lower left corner is at (0,8) in METAFONT coordinates ****** * * * * * * * * *** .<--This pixel's upper left corner is at (0,0) in METAFONT coordinates 1588: beginning of char 1 .<--This pixel's lower left corner is at (0,8) in METAFONT coordinates * * * * * ** ** * * * * * * .<--This pixel's upper left corner is at (0,0) in METAFONT coordinates 1623: beginning of char 2 .<--This pixel's lower left corner is at (1,8) in METAFONT coordinates ** * * * * * ** * * * * * * * ** .<--This pixel's upper left corner is at (1,0) in METAFONT coordinates If I repeat the same, but use mode=preview, Delta looks ok also. Whether this is sort of bug? If yes, and if I understand correctly, cmr10.mf includes roman.mf, which includes greeku.mf, where description of how to draw Δ is placed. But I can't understand syntax and unable even to determine, whether first step (mf) or second (gftype) cause error. Anyway, seems this files weren't updated recently. I have almost no knowledge about TeX fonts, just want to repeat abovementioned header file. Most of letters for cmr10.83 converted successfully (i.e. I got same hex representation), but not this Delta.
- evenly-padded horizontal line separator in a table with rows with graphicsby Mampac on March 22, 2026 at 10:35 am
when defining a figure that holds a table of images, how do i ensure even and symmetric padding when using \hline in it? by default, there's no padding before the row that was \hlined. i have the following MRE: \documentclass{article} \usepackage{array} \usepackage{graphicx} \newcolumntype{I}{>{\centering\arraybackslash}m{0.18\linewidth}} % simulate images \newcommand{\fakeimg}{\rule{\linewidth}{2.5cm}} \begin{document} \begin{tabular}{c I I I} & A & B & C \\ row1 & \fakeimg & \fakeimg & \fakeimg \\ \hline row2 & \fakeimg & \fakeimg & \fakeimg \\ \end{tabular} \end{document} this produces the following image, where the rule is stuck tightly to the images on the second row: how do i define the padding in a controlled (tunable) manner so that the optional rule perfectly divides it in half (i want to add the divider only between specific pairs of rows)? i've tried interjecting a bunch of artifical spaces and padding in the rows before/after, but they all break apart when i wish for a small-scale padding of, say, 0.3ex: my attemps yield assymetrical padding where the padding before second row is smaller than padding after the first row.
- Abnormal Blank Space at the Bottom of Footnotes in cas-dc Templatesby Clara on March 22, 2026 at 8:06 am
While writing paper, I found that abnormal vertical blank space appears at the bottom of footnotes in the first column of the cas-dc template. Even after replacing the original paper content with other characters, the issue still persists, and the reproducible code provided below is just an example rather than the only scenario that triggers this problem. I am using TeX Live 2026 on the Windows system and compiling documents with pdflatex, and I aim to identify the root cause of this abnormal blank space and find corresponding methods to avoid it. \documentclass[a4paper,fleqn]{cas-dc} \begin{document} \shorttitle{} \title[mode=title]{consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in} \tnotemark[1] \tnotetext[1]{ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse} \author[1]{alice bob} \ead{123456789@abc.com} \author[1]{alice bob} \ead{123456789@abc.com} \author[1]{alice bob} \ead{123456789@abc.com} \author[2]{alice bob} \cormark[1] \ead{123456789@abc.com} \author[1]{alice bob} \ead{123456789@abc.com} \cortext[cor1]{Corresponding author} \affiliation[1]{organization={consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse}} \affiliation[2]{organization={consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse}} \begin{abstract} consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse \end{abstract} \maketitle \section{consequat} consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse \par consequat consequat consequat consequat consequat consequat consequat, consequat consequat consequat consequat consequat consequat consequat consequat quat (consequat) XX and consequat consequat consequat consequat consequat (consequat) XX consequat consequat consequat, consequat consequat consequat consequat xxx sds-consequat sdsdsdff. consequatsd, yuiyuiy-consequat conseq consequ consequat sdsd consequat, consequat consequat consequat XX, consequat consequat Regression consequat, consequat-VVV-XXOXXX-XXXXXX (XXXX) XX, and xxxxx Gradient xxxxxxx xxxxxxx (xxxxxxx) XX xxxxxxxx the modeling xx hjkshdsjkhd sdsdsdss by reprehender reprehenderit reprehenderit reprehenderit reprehenderit \end{document}
- Using spy to zoom in on a curveby Nicolas on March 22, 2026 at 7:31 am
I want to show a zoom on a part of my curve with ``'spy```. The compilation of the code returns several errors to me : ! Missing \endcsname inserted. ; ! Extra \endcsname ; ! Illegal unit of measure (pt inserted) ... When I compile without the line of the spy, it works its problem. I don't understand where the problem is. If someone has an idea? \documentclass[12pt]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \usepackage{xcolor} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usetikzlibrary{spy} \usepackage{siunitx} \sisetup{ output-decimal-marker={,}, inter-unit-product = \ensuremath{{}\cdot{}} } \definecolor{bleu}{RGB}{25, 90, 185} % Paramètres \pgfmathsetmacro{\Cb}{0.10} % mol/L (NaOH) \pgfmathsetmacro{\Va}{10} % mL \pgfmathsetmacro{\Vdil}{100} % mL \pgfmathsetmacro{\Vzero}{\Va+\Vdil} \pgfmathsetmacro{\na}{0.0008} % mol CH3COOH \pgfmathsetmacro{\Veq}{8} % mL \pgfmathsetmacro{\Ka}{1.8e-5} \pgfmathsetmacro{\lH}{349.6} \pgfmathsetmacro{\lNa}{50.1} \pgfmathsetmacro{\lOH}{198.0} \pgfmathsetmacro{\lAc}{40.9} % Ionisation initiale \pgfmathsetmacro{\Ca}{\na/(\Vzero/1000)} \pgfmathsetmacro{\Hinit}{sqrt(\Ka*\Ca)} \pgfmathsetmacro{\nHinit}{\Hinit*(\Vzero/1000)} \pgfmathsetmacro{\Vneutr}{\nHinit/\Cb*1000} % mL \begin{document} \begin{tikzpicture}[spy using outlines={circle, magnification=4, size=2cm, connect spies}] \begin{axis}[ width=15cm, height=10cm, xlabel={$V_b$ (\si{mL})}, ylabel={$\sigma$ (\si{\milli\siemens\per\centi\meter})}, xmin=0, xmax=26, ymin=0, ymax=4, grid=both, axis lines=left ] % -------------------------- % Neutralisation des H+ initiaux % -------------------------- \addplot[magenta, line width=1.7pt, smooth] coordinates { (0, 0.126) (0.398,0.018) }; % Avant Veq \addplot[magenta, domain=0.398:\Veq, samples=200,line width=1.7pt, smooth] { ( (\lNa*(\Cb*x/1000) + \lAc*(\Cb*x/1000) + \lH*sqrt(\Ka*((\na - \Cb*x/1000)/((\Vzero + x)/1000))) * ((\Vzero + x)/1000) ) / ((\Vzero + x)/1000) ) }; \addlegendentry{avant Veq} % Après Veq \addplot[magenta, domain=\Veq:25, samples=200, smooth, line width=1.7pt, forget plot] { (\lNa*(\Cb*x/1000) + \lAc*\na + \lOH*(\Cb*x/1000 - \na))/((\Vzero+x)/1000) }; % Volume équivalent \draw[black, line width=1.4pt, densely dotted] (axis cs:\Veq,0) -- (axis cs:\Veq,0.6); \node at (axis cs:\Veq,0.2) [ right, font=\small\bfseries] {$V_{\text{eq}}$}; % Zoom spy \spy [red] on (axis cs:0.4,0.05) in node[left] at (axis cs:1,2); \end{axis} \end{tikzpicture} \end{document}
- luadraw - Why is one of my points out of frame?by Matthew Leingang on March 21, 2026 at 9:35 pm
I'm new to luadraw and I'm trying to recreate the diagram below: Here is my code so far, and the result: % !TEX TS-program = LuaLaTeX \documentclass{standalone} \usepackage[3d]{luadraw} \begin{document} \begin{luadraw}{name=wedge} local a, b, c = 8, 6, 4 local xmax, ymax, zmax = a+1, b+1, c+1 local g = graph3d:new{ window3d = {0,xmax,0,ymax,0,zmax}, viewdir = {30,60}, size={10,10,0} } local xIntcpt, yIntcpt, zIntcpt = M(a,0,0), M(0,b,0), M(0,0,c) local P = M(4,0,0) local Q = interDD({P,vecJ},{xIntcpt,yIntcpt-xIntcpt}) local R = interDD({P,vecK},{xIntcpt,zIntcpt-xIntcpt}) g:Dscene3d( g:addPolyline({ {Origin,xmax*vecI}, {Origin,ymax*vecJ}, {Origin,zmax*vecK}, }), g:addPolyline( {xIntcpt,yIntcpt,zIntcpt}, {close=true,color="cyan"}), g:addFacet( {P,Q,R}, {color="cyan",opacity=0.5} ), g:addPolyline( {P,Q,R}, {close=true,color="cyan",style="dashed"} ), g:addLabel( "\\(x\\)",P,{pos="NW",dist=0.1}, a,xIntcpt,{pos="NW",dist=0.1}, b,yIntcpt,{pos="N",dist=0.1}, c,zIntcpt,{pos="NW",dist=0.1} ) ) g:Show() \end{luadraw} \end{document} The issue, as you can see, is that the point (0,6,0) is out of frame. I tried increasing ymax, that seems to have no effect. I tried changing the width in the size option, but that only stretches the diagram horizontally. I have tried different viewdir options, but they all cut the diagram off at one edge. I'm sure it's something basic that I'm missing, but I'm too much of a novice to notice. Any clues?
- Signature disapears when renewing closing command of the letter classby s.k on March 21, 2026 at 12:34 pm
I need to align the \closing{} of the letter package with the body of the letter, on the left, while keeping the \signature{} but this code is actually removing the \signature{} from the rendered document: \documentclass[a4paper]{letter} \signature{Your Name} \address{Your Address} \date{\today} % I renew the closing command here, before beginning the document: \renewcommand{\closing}[1]{\par\noindent#1\par} \begin{document} \begin{letter}{Recipient Name \\ Recipient Address} \opening{Dear Sir or Madam,} This is the body of the letter. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin gravida augue at eleifend vestibulum. Nullam mollis molestie mi eget viverra. Interdum et malesuada fames ac ante ipsum primis in faucibus. Ut scelerisque dui in eros imperdiet consectetur. Cras venenatis elit nec orci elementum pellentesque. \closing{Sincerely,} \vspace{1cm} \hspace*{0.6\textwidth} \signature{} \end{letter} \end{document} Here's the corresponding result using Texmaker 5.0.3 on Ubuntu 22.04.5:
- thin rule at breaking tcolorbox, but don't want [duplicate]by GowriSaro on March 21, 2026 at 4:49 am
\documentclass{article} \usepackage[]{xcolor} \usepackage{lipsum} \usepackage[most,skins,breakable]{tcolorbox}% \tcbuselibrary{skins,breakable}% \tcbset{enhanced,breakable}% \usetikzlibrary{patterns}% %\usepackage{tikz}% \begin{document} \begin{tcolorbox}[enhanced,arc=9pt,colback=white,colframe=red,boxrule=3pt]% \lipsum[1-10] \end{tcolorbox} \end{document} Above code works fine, but a thin colored rule comes at the bottom of the page, and the top of next page, if the box continues page to page, how can I fix it?
- Vertical spacing in \polylongdiv from the polynom packageby ThomasO on March 21, 2026 at 3:51 am
When using fractions in \polylongdiv, the vertical spacing turns out rather awkward. If no fractions are used for the coefficients, the spacing is fine. I have tried to adjust the vertical spacing using arrayrowsep=..., but without any visible change. Is it possible to adjust this vertical spacing for fractions? \documentclass{article} \usepackage{polynom} \polyset{style=C,div=:,arrayrowsep=1cm} \begin{document} \polylongdiv[arrayrowsep=1cm]{(1/5)x^2-(3/7)x+4/9}{x-1/2} \polylongdiv[arrayrowsep=1cm]{5x^2-5x+6}{x-3} \end{document}
- Can I make a numbered tcolorbox have a number from a previous section?by LaTeXereXeTaL on March 21, 2026 at 12:42 am
I have a working exercise/solution engine based on that from the tcolorbox documentation and it works perfectly. There is one thing I would like to change if possible. In my MWE, I create three exercises and their corresponding solutions and I also create new autorefnames for their respective counters. The exercises are in two different sections but all the solutions are in a new section and that causes the solution numbers typeset when I cite them with \autoref to reflect the new section, not the sections of the corresponding exercises. In other words, the names of the solutions to Exercise 1.1 and Exercise 2.1 typeset as Solution 3.1 and Solution 3.2 whereas I would like them to be Solution 1.1 and Solution 2.1 respectively even if they are in the third section. I think my question is: can I make a solution's number retain the value of the number of its corresponding exercise even when the solution is in a different section of the document? I have experimented and nothing I have tried works. This is for a larger book project and I can live with the situation but I want to know if my question has a relatively simple answer. MWE: % !TEX program = lualatexmk % !TEX encoding = UTF-8 Unicode \documentclass{article} \usepackage[language=english]{lipsum} \usepackage{tcolorbox} \usepackage{hyperref} \hypersetup{colorlinks} \tcbuselibrary{skins,theorems} \newcounter{exercisecounter} \newcounter{solutioncounter} \newcommand{\exercisecounterautorefname}{Exercise} \newcommand{\solutioncounterautorefname}{Solution} \NewTColorBox[use counter=exercisecounter,number within=section]{exercise}{m +!O{}} {% coltitle=black,% title={Exercise~\thetcbcounter:},% label={exer:#1},% attach title to upper=\quad,% after upper={\par\hfill {Solution on page~\pageref{soln:#1}}},% lowerbox=ignored,% savelowerto=exercise-\thetcbcounter.tex,% record={\string\solution{#1}{exercise-\thetcbcounter.tex}},% #2 }% \NewTotalTColorBox[use counter=solutioncounter,number within=section]{\solution}{m m}{% coltitle=black,% title={Solution of Exercise~\ref{exer:#1} on page~\pageref{exer:#1}:},% label={soln:#1},% attach title to upper=\par,% }{\input{#2}} \tcbset{no solution/.style={no recording,after upper=}} \begin{document} \section{Exercises} \lipsum[1] \tcbstartrecording\relax \begin{exercise}{one} This is the first exercise. \tcblower This is the first solution. \end{exercise} I can cite \autoref{exer:one} on page~\pageref{exer:one} and solution \autoref{soln:one} on page~\pageref{soln:one}. \section{Another Section} \lipsum[1] \begin{exercise}{two} This is the second exercise. \tcblower This is the second solution. \end{exercise} \begin{exercise}{three} This is the third exercise. \tcblower This is the third solution. \end{exercise} \tcbstoprecording I can cite \autoref{exer:two} on page~\pageref{exer:two} and solution \autoref{soln:two} on page~\pageref{soln:two}. I can cite \autoref{exer:three} on page~\pageref{exer:three} and solution \autoref{soln:three} on page~\pageref{soln:three}. \newpage \section{Solutions} \tcbinputrecords \end{document}
- How can Initials with special characters (e.g. German Umlaute) be designed? [duplicate]by Thomkrates on March 20, 2026 at 6:56 pm
I would like to use Initials in a nice poetry book and need for German Umlaute (Ä Ö Ü) those designs. And the general question is: Why are Initials always without special characters, also for other languages other than German? And for now: How is it possible to produce Ä Ü Ö manually? \documentclass[a4paper]{article} \input Zallman.fd \pagestyle{empty} \begin{document} \begin{center} \fontsize{60pt}{72pt}\usefont{U}{Zallman}{xl}{n} ABCDE \\ FGHIJK \\ LMNOP \\ QRSTU \\ VWXYZ \\ ÄÖÜ \\%<-- Special characters Umlaute Initials?! \end{center} \vfill \begin{center} Font name: ``Zallman'' (ZallmanCaps) \end{center} \end{document} Is there a trick to get them nice?
- xint: calc array with binomial coefficients only one timeby cis on March 20, 2026 at 2:12 pm
I need all binomial coefficients for n=1..100 and k=1..100 several times, so I wrote a code with xint: \xintdefvar BinomialArray = ndseq(binomial(n,k), n=1..100; k=1..100); \xintdeffunc abinomial(n,k):=BinomialArray[n-1,k-1]; I measured out for that: ******************************************** *** TOTAL COMPILATION TIME REPORT: *** (l3benchmark) + TOC: 2.27 s ******************************************** This is OK, but I asked myself: Is there any way I can store the array (in a file?) so that it doesn't have to be recalculated on every new run? \documentclass[paper=a5, paper=landscape]{scrarticle} \usepackage[margin=10mm]{geometry} \usepackage{xintexpr} \usepackage{amsmath} \begin{document} \xintdefvar BinomialArray = ndseq(binomial(n,k), n=1..100; k=1..100); \xintdeffunc abinomial(n,k):=BinomialArray[n-1,k-1]; %Test: \xinteval{BinomialArray[100-1,50-1]} works Test: $\dbinom{100}{50}=\xinteval{abinomial(100, 50)}$ % Show complete array - on your own risk :() %\newpage %\begingroup %\tiny %BinomialArray = \xintthealign\xintexpr BinomialArray\relax %\endgroup \end{document}
- Creating a triangle using intersection and automatically clipping the exceeding lineby user516076 on March 20, 2026 at 3:18 am
As what my knowledge could tell, It's possible to create a triangle with only 2 coordinates to make real angles to be exact, and using path to create long rays and naming the intersection of those rays and finally connect them with \draw. MWE: \documentclass[tikz, border=10pt]{standalone} \usepackage{siunitx} \usetikzlibrary{intersections} \begin{document} \begin{tikzpicture}[scale=2] \clip (0,0) rectangle (5,2.1); \coordinate (A) at (0,0); \coordinate (C) at (5,0); \path[name path=AB] (A) -- ++(37:4); \path[name path=BC] (C) -- ++(137:4); \path[name intersections={of=AB and BC, by=B}]; \draw[thick] (A) -- (B) -- (C) -- cycle; \end{tikzpicture} \end{document} There is a noticable difference if I comment \clip in the 6th line. Without it, it's going to be a white space... It's impractical to calculate the height of the object if I make another drawing with more complicated shape. So, is it possible to autocrop the exceeding lines? What I meant by exceeding lines is like the cyan lines in the figure below. It's because they contribute to white space if I change \draw to \path: So, if possible, I want TikZ to automate cropping the intersection, in other words, getting rid of those exceeding lines without estimating like how much the height is (would consume loads of time if I make other complicated figures with intersections). To illustrate what I actually want, roughly I want something like this: Yes, I deliberately cropped it poorly to give an example as to what it shows if I gave them an incorrect clipping, which I wish I didn't need to clip it, but instead, I wish TikZ only read the intersection point and two given coordinates to draw.
- Accessible PDF, include pdf with pdfpages and add alt textby YamiOmar88 on March 19, 2026 at 10:44 am
I am creating an accessible PDF using tagpdf as follows: \DocumentMetadata{ lang = fr-FR, pdfversion = 2.0, pdfstandard = ua-2, pdfstandard = a-4f, %or a-4 tagging = on, tagging-setup={math/setup=mathml-SE} } \documentclass[a4paper,11pt]{article} % Page layout \usepackage[margin=2.5cm]{geometry} \usepackage{pdfpages} % General information \author[]{YamiOmar88} \title{Some Title} \date{} % remove semantic paragraphs: \AssignTaggingSocketPlug{para/semantic/begin}{noop} \AssignTaggingSocketPlug{para/semantic/end}{noop} \begin{document} % --- Poster pages (NOT accessible, marked as artifacts) --- \tagstructbegin{tag=Artifact, alt={Tableau de bord non accessible}} \includepdf[pages=1, fitpaper=true, artifact]{example-image.pdf} \includepdf[pages=1, fitpaper=true, artifact]{example-image.pdf} \tagstructend \end{document} I include pages from another PDF file using the pdfpages package and the command \includepdf. Here, for this example I'm always including the same page #1 and using a sample image to be able to compile it. When I look at my tags I see this: <Document> <Private> <Figure> <p> <Figure> <p> As I declared the artifact, the <Private> tag shows the appropriate alt-text. However, the <Figure> tags contain the path to the image as alt text. How can I change that? I do not want that path to be made public. And what are the <p> tags? Where did they come from? Note: The code is compiled with LuaLaTeX using MiKTeX 26.2. My LaTeX version is LaTeX2e <2025-11-01>, L3 programming layer <2026-01-19>.
- Accessible PDF, declaring an artifact for included pdf pagesby YamiOmar88 on March 19, 2026 at 10:34 am
I am building an accessible PDF using tagpdf as follows: \DocumentMetadata{ lang = fr-FR, pdfversion = 2.0, pdfstandard = ua-2, pdfstandard = a-4f, %or a-4 tagging = on, tagging-setup={math/setup=mathml-SE} } \documentclass[a4paper,11pt]{article} % Page layout \usepackage[margin=2.5cm]{geometry} \usepackage{lipsum} \usepackage{pdfpages} % General information \author[]{YamiOmar88} \title{Some Title} \date{} % remove semantic paragraphs: \AssignTaggingSocketPlug{para/semantic/begin}{noop} \AssignTaggingSocketPlug{para/semantic/end}{noop} \begin{document} \maketitle \section*{Some Section} \lipsum[1] \clearpage % --- Poster pages (NOT accessible, marked as artifacts) --- \tagstructbegin{tag=Artifact, alt={Tableau de bord non accessible}} \includepdf[pages=1, fitpaper=true, artifact]{example-image.pdf} \includepdf[pages=1, fitpaper=true, artifact]{example-image.pdf} \tagstructend \end{document} As it can be seen, I add pages using \includepdf. For this example purpose, I'm adding the example-image.pdf as a page so the code can be compiled without external files. The <Artifact> I declare shows as a <Private> tag inside the <Sect> tag. But in this particular file I'm working, it would make more sense for it to be at the same level as the <Sect> tag instead of inside it. Is this possible? In other words, I want this: <Document> <p> <p> <Sect> <H1> <p> <Private> instead of this: <Document> <p> <p> <Sect> <H1> <p> <Private> Note: The code is compiled with LuaLaTeX using MiKTeX 26.2. My LaTeX version is LaTeX2e <2025-11-01>, L3 programming layer <2026-01-19>.
- Drawing a parallel line that is perpendicular to another line and connecting the end linesby user516076 on March 19, 2026 at 9:39 am
I wish to draw something like this: I can draw the two lines, though it is difficult to be precise. However I don't know what to do next as for the dashed line and the arrow line. The dashed lines are perpendicular to MK and JL, but the arrow line are parallel to those lines. And the difficult part is connecting the dashed line with the arrow line. I failed to draw the 90 degree sign, it looks too big and ugly. My attempt: \documentclass[tikz,border=3pt]{standalone} \usepackage{amsmath} \usetikzlibrary{calc,intersections,angles,quotes,arrows.meta} \begin{document} \begin{tikzpicture}[line cap=round,line join=round,>=Stealth] % ---------- circle ---------- \def\r{3.0} \coordinate (O) at (0,0); % points on the circle chosen by polar coordinates % (this is the important part) \coordinate (J) at (86:\r); \coordinate (M) at (142:\r); \coordinate (L) at (232:\r); \coordinate (K) at (332:\r); % circle \draw[black,line width=0.9pt] (O) circle (\r); % ---------- cyan lines ---------- \colorlet{mycyan}{cyan!70!blue} % main solid chords \path[name path=JL] (J) -- (L); \path[name path=MK] (M) -- (K); \draw[mycyan,line width=1.1pt] (J) -- (L); \draw[mycyan,line width=1.1pt] (M) -- (K); % intersection N \path[name intersections={of=JL and MK, by=N}]; % ---------- right-angle mark at N ---------- \coordinate (Nu) at ($(N)!0.42!(M)$); \coordinate (Nv) at ($(N)!0.42!(J)$); \coordinate (Nw) at ($(Nu)+(Nv)-(N)$); \draw[black,line width=0.8pt] (Nu) -- (Nw) -- (Nv); % ---------- center ---------- \fill (O) circle (2.2pt); % ---------- labels ---------- \node[font=\fontsize{21}{21}\selectfont] at ($(J)+(0.02,0.35)$) {$J$}; \node[font=\fontsize{21}{21}\selectfont] at ($(M)+(-0.45,0.08)$) {$M$}; \node[font=\fontsize{21}{21}\selectfont] at ($(L)+(-0.28,-0.18)$) {$L$}; \node[font=\fontsize{21}{21}\selectfont] at ($(K)+(0.5,-0.02)$) {$K$}; \node[font=\fontsize{21}{21}\selectfont] at ($(N)+(0.38,0.02)$) {$N$}; \node[font=\fontsize{25}{25}\selectfont] at ($(O)+(0,-0.55)$) {$O$}; \end{tikzpicture} \end{document} Also, explain to me what the trick is, so that I can implement it in other cases.
- Chronos: Fully disable year labelsby Anoduck - The Anonymous Duck on March 19, 2026 at 8:25 am
Working on a timeline for a legal case in which all events occurred over five months. So far, I have twelve events and two time periods, and I still need to add more. I need to disable the output of years on all labels, since it is not necessary and is cluttering up the timeline. \documentclass[12pt]{standalone} \usepackage[utf8]{inputenc} \usepackage{chronos} \usepackage{amsmath} \usepackage{csquotes} \begin{document} \begin{chronos} [ %debug, event splitter, no color rotation, colour scheme=default, frame=true, %levels=3:5, event/colour rotation=false, period/colour rotation=false, every text tags+={font=\normalfont\footnotesize}, timeline={% timeline font=\normalfont\footnotesize, dates={2020-05-01}:{2020-09-30}, every date format={!d/!m}, timeline show years=false } ] \chronosmaintitle{% name=Timeline of Events, at=current bounding box.north, yshift=120pt } \chronosevent{% date={2020-05-10}, name=event1 } \chronosperiod{ dates={2020-05-01}:{2020-06-01}, name=period1, yshift=80pt } \chronosevent{ date={2020-06-10}, name=event2 } \chronosevent{% date={2020-06-20}, name=event3, yshift=15pt } \chronosevent{% date={2020-07-01}, name=event4, yshift=25pt } \chronosevent{% date={2020-07-15}, name=event5, yshift=10pt, xshift=-10pt } \chronosperiod{ dates={2020-06-20}:{2020-07-20}, name=period2, yshift=80pt } \chronosevent{% date={2020-07-20}, name=event6, yshift=20pt, xshift=20pt } \chronosevent{% date={2020-07-25}, name=event7, yshift=40pt, xshift=20pt } \chronosevent{% date={2020-07-30}, name=event8, yshift=60pt, xshift=20pt } \chronosevent{% date={2020-08-05}, name=event9 } \chronosevent{% date={2020-08-15}, name=event10, yshift=12pt } \chronosevent{% date={2020-09-10}, name=event11 } \chronosevent{% date={2020-09-25}, name=event12, yshift=15pt } \end{chronos} \end{document}
- What are the meaningful differences between cloud LaTeX editors in 2026, especially for AI-assisted writing?by Nilofer on March 19, 2026 at 5:28 am
I'm a PhD student evaluating cloud LaTeX editors for writing my dissertation. I've used Overleaf for years but I'm noticing a new wave of editors claiming AI-powered features. I've looked at: Overleaf — familiar, but not reliable, and compilation is slow on large documents OpenAI Prism — new, AI-native, backed by OpenAI (I don't trust OpenAI) Papeeria — free tier, minimal AI Bibby AI (trybibby.com) — seems focused on bibliography error detection specifically with a good AI benchmark they published outperforming OpenAI and Overleaf. My question is: for someone writing a 200-page dissertation with 300+ citations, what are the meaningful technical differences between these editors, particularly: How does real-time bibliography validation differ across platforms? Do any of them integrate with arXiv directly? Is AI autocomplete in LaTeX actually useful or is it mostly marketing?
- TexLive 2026 package installation problemby Horas on March 18, 2026 at 4:06 pm
I am installing TexLive 2026. And I got this message. Regrettably, I don't find a way to run the solution: tlmgr update --all --reinstall-forcibly-removed Can someone help me please? Thank you in advance. *** PLEASE READ THIS WARNING *********************************** The following (inessential) packages failed to install properly: aboensis adigraph adrconv alertmessage alpha-persian answers apprendre-a-programmer-en-tex arsclassica avremu babel-basque babel-catalan babel-croatian babel-czech babel-interlingua babel-irish babel-kurmanji babel-piedmontese babel-romansh babel-slovak babel-thai barracuda beamercolorthemeowl beamertheme-cleaneasy beamertheme-cuerna beamertheme-focus beamertheme-pure-minimalistic beamertheme-saintpetersburg beamerthemenord beautybook beautynote biber biber-ms bibleref bjfuthesis bmstu bookcover bophook burmese businesscard-qrcode c90 ccicons chappg chapterfolder chktex cjk classicthesis cleanthesis cluttex cmbright confproc context-notes-zh-cn context-simpleslides conv-xkv cora-macs cqubeamer dashbox decimal dlrg-templates doclicense drac dynblocks ebezier elegantbook elegantpaper elmath els-cas-templates elteiktdk elteikthesis emo endnotes-hy epiolmec etdipa europasscv europecv exam-lite exam-n exam-zh fancymag fancytooltips faq-fr-gutenberg fascicules fast-diagram fcltxdoc featpost feupphdteses fithesis foliono fontinst formation-latex-ul ftc-notebook fundus-calligra fundus-sueterlin gentium-sil graphicxbox gridslides ha-prosper hebdomon hfutthesis histogr hithesis hitreport hitszbeamer hitszthesis hpsdiss hu-berlin-bundle hypdvips hyph-utf8 hyphen-hungarian imtekda inline-images iodhbwm is-bst jeuxcartes jourcl jourrr kastrup ketcindy keyfloat knuth-pdf koma-script-examples kotex-utf ktbox ku-template l3experimental l3packages latex-course latex-for-undergraduates lcg lengthconvert letgut lilyglyphs lisp-on-tex listbib mahjong makecookbook manfnt margbib mathcomp mcmthesis mdsymbol minitoc multibbl multicap musixtex mycv navydocs ndsu-thesis-2022 novel nwafuthesis nwejm nxuthesis ogham oldstyle opbible panneauxroute papertex patch pbsheet pdfscreen pdfslide permute pgf-periodictable plantslabels powerdot-tuliplab proflycee pst-barcode pst-shell pst-solides3d pst-spinner pstricks q-and-a quantumcubemodel qyxf-book rcs-multi realhats rebuttal recipebook revtex4-1 runtexfile savefnmark sduthesis sectsty semantic seuthesis seuthesix sitem sjtutex skb spelatex sseq stellenbosch stellenbosch-2 stex svn-multi svn-prov tabularborder tcolorbox tex-virtual-academy-pl texlive-ja texlive-sr texproposal texworks.windows thesis-gwu tiet-question-paper tikz-network tile-graphic tlc-article tlcockpit tlmgr-intro-zh-cn todonotes tudscr uafthesis ualberta uantwerpendocs udesoftec udiss uestcthesis uiucredborder unamth-template unbtex underlin vgrid visualfaq-fr vlna vmargin wallcalendar wintools.windows xcookybooky xebaposter xepersian xtuthesis yathesis yazd-thesis zbmath-review-template You can fix this by running this command: tlmgr update --all --reinstall-forcibly-removed to complete the installation. Blockquote
- Is there currently a way to use custom lists in slides with ltx-talk class?by ChristopherE on March 18, 2026 at 2:13 pm
The ltx-talk class for slides defines its own basic lists, so that they can be used with overlays. I am interested in using custom lists, for example ones that pre-format dialogue. Doing this in the usual way with enumitem currently fails. A brief example follows. Is there a way to insulate custom lists from the class's baked-in list definitions, so that this will work, by putting them in something like a minipage environment? Failure case \DocumentMetadata{tagging = on, lang = en-us} \documentclass[aspect-ratio=4:3]{ltx-talk} \usepackage{enumitem} \newlist{dialist}{description}{1} \setlist[dialist]{font=\textsc, leftmargin=2cm, style=nextline} \begin{document} \begin{frame} \frametitle{Dialogue} \begin{dialist} \item[Socrates] And your opinion is right, as you can prove in this way: if some one asked you “Is there, Gorgias, a false and a true belief?” you would say, Yes, I imagine. \item[Gorgias] I should. \item[Socrates] But now, is there a false and a true knowledge? \end{dialist} \end{frame} \end{document} error: ! Package enumitem Error: Non standard \item.
- plain TeX to LaTeX conversionby GowriSaro on March 18, 2026 at 10:22 am
I'm having bunch of Plain TeX equations, few examples given below: $$ a+b=c $$ $$ - {\pi \over 2} < \theta < {\pi \over 2}.\eqno{(1)} $$ $$ \left\{ \matrix{ \dot{\varphi}_1 = \varphi_2 \cr \dot{\varphi}_2 = M^{-1} ( \varphi_1) \cr } \right. , $$ \bye Is there any possibility to convert those to LaTeX format, please advise.
- Space between top of text area and chapter heading using \EditInstance formating (ruled headformat)by polaren on March 18, 2026 at 9:34 am
A follow up question to How to modify the chapter headings using \EditInstance. The accepted answer solved the basic layout, but how can I eliminate the vertical space between the top of the text area and the top rule of the chapter heading when using the ruled headformat? The code written by cfr in the linked question produces The current output has unwanted space above the top rule (see image above), while I want the rule to align with the top of the text area (see image below). MWE 1 (based on cfr’s answer; shows the problem) % Source - https://tex.stackexchange.com/a/760937 % Posted by cfr (edited by polaren) % Retrieved 2026-03-17, License - CC BY-SA 4.0 \DocumentMetadata{% lang=en-GB, pdfstandard=ua-2, pdfversion=2.0, tagging=on, } %%\documentclass{book} \documentclass[11pt,a4paper,twoside,final]{report} \usepackage[margin=25mm,top=24mm,bottom=24mm,nomarginpar,nohead,footskip=11mm]{geometry} \usepackage{showframe}\renewcommand\ShowFrameLinethickness{0.05mm} \usepackage{hyperref} % Needed to pass VeraPDF. \hypersetup{ pdftitle={MWE}, pdfauthor={cfr}, pdfsubject={Answer to First question to LaTeX Stack Exchange.}, } \ExplSyntaxOn \makeatletter \dim_new:N \l__heading_indent_dim \skip_new:N \l__heading_rule_ht_skip \skip_new:N \l__heading_rule_dp_skip \skip_new:N \l__heading_rule_wd_skip \skip_new:N \l__heading_before_rule_skip \skip_new:N \l__heading_after_rule_skip \tl_new:N \l__heading_after_code_tl \tl_new:N \l__heading_before_code_tl \tl_new:N \l__heading_number_title_sep_tl \cs_new_protected_nopar:Npn \__heading_rule: { \tag_mc_end_push: \tag_mc_begin:n {artifact} \hrule height \l__heading_rule_ht_skip width \l__heading_rule_wd_skip depth \l__heading_rule_dp_skip \tag_mc_end: \tag_mc_begin_pop:n {} } \DeclareTemplateInterface{headformat}{ruled}{5} { indent : length = 0pt , before-code : tokenlist = , after-code : tokenlist = , number-title-sep : tokenlist = 20pt , % WWW-HHHH-YYYY ?????????????????? rule-depth : skip = 0.2pt , rule-height : skip = 0.2pt , rule-width : skip = \linewidth , before-rule-sep : skip = 5pt , after-rule-sep : skip = 5pt , } \DeclareTemplateCode{headformat}{ruled}{5} { after-code = \l__heading_after_code_tl , before-code = \l__heading_before_code_tl , indent = \l__heading_indent_dim , number-title-sep = \l__heading_number_title_sep_tl , rule-depth = \l__heading_rule_dp_skip , rule-height = \l__heading_rule_ht_skip , rule-width = \l__heading_rule_wd_skip , before-rule-sep = \l__heading_before_rule_skip , after-rule-sep = \l__heading_after_rule_skip , } { \__head_show_arguments:nnnnn {#1}{#2}{#3}{#4}{#5} \tl_if_empty:oF {#1} { \SetTemplateKeys{headformat}{ruled}{#1} } \group_begin: \UseTaggingSocket{sec/title/begin}{{\int_use:N\l__head_level_int}{#3}} \__heading_rule: \skip_vertical:N \l__heading_after_rule_skip \par \normalfont \normalcolor \interlinepenalty \@M \l__head_decls_tl{} \bool_if:NTF \l__head_unnumbered_bool { \dim_compare:nNnTF \l__heading_indent_dim < \c_zero_skip { \skip_horizontal:N \l__heading_indent_dim \MakeLinkTarget[\l__head_name_tl]{} } { \MakeLinkTarget[\l__head_name_tl]{}\skip_horizontal:N \l__heading_indent_dim } } { \dim_compare:nNnTF \l__heading_indent_dim < \c_zero_skip { \skip_horizontal:N \l__heading_indent_dim \MakeLinkTarget{\l__head_name_tl} } { \MakeLinkTarget{\l__head_name_tl}\skip_horizontal:N \l__heading_indent_dim } \l__head_number_decls_tl #2 \skip_horizontal:n { \l__heading_number_title_sep_tl } } \l__head_title_decls_tl \l__heading_before_code_tl {#3} \l__heading_after_code_tl \par \skip_vertical:N \l__heading_before_rule_skip \__heading_rule: \UseTaggingSocket{sec/title/end} \group_end: } \DeclareInstance{headformat}{ruled}{ruled} { indent = 0pt , before-code = , after-code = , } \makeatother \ExplSyntaxOff \EditInstance{heading}{chapter}{ number-format=\makebox[12mm][l]{\theheading.}, number-decls=\sffamily\fontsize{14pt}{16pt}\selectfont, title-decls=\sffamily\fontsize{14pt}{16pt}\selectfont, after-sep=4mm, %before-sep=0mm, headformat-instance=ruled, decls=\raggedright\parindent 0pt\rmfamily } \EditInstance{headformat}{ruled}{ rule-depth=0.05mm, rule-height=0.05mm, } \usepackage{kantlipsum} \begin{document} \chapter*{Unnumbered Chapter} abc \chapter{Title of Chapter} \kant[1] \end{document} MWE 2 (fragile workaround; desired appearance) \DocumentMetadata{ lang = sv, pdfversion = 2.0, pdfstandard = ua-2, tagging = on, } \documentclass[11pt,a4paper,twoside,final]{report} \usepackage[margin=25mm,top=24mm,bottom=24mm,nomarginpar,nohead,footskip=11mm]{geometry} \usepackage{showframe}\renewcommand\ShowFrameLinethickness{0.05mm} \usepackage[document]{ragged2e} % Needed for compilation. \usepackage{hyperref} % Needed to pass VeraPDF. \hypersetup{ pdftitle={MWE}, pdfauthor={polaren}, pdfsubject={First question to LaTeX Stack Exchange.}, } \EditInstance{heading}{chapter}{ number-format=\makebox[12mm][l]{\theheading.}, number-decls=\sffamily\fontsize{14pt}{16pt}\selectfont, title-decls=\sffamily\fontsize{14pt}{16pt}\selectfont, after-sep=0mm, before-sep=0mm, start-code=\clearpage\vspace*{-10.75mm}\rule{\textwidth}{0.1mm}\newline\vspace*{-18mm}, final-code=\vspace*{-5mm}\rule{\textwidth}{0.1mm}\newline\vspace*{0mm}, headformat-instance=hang, decls=\raggedright\parindent 0pt\rmfamily } \setlength{\parskip}{6pt plus 1pt minus 1pt} %\setlength{\parskip}{0pt} \usepackage{kantlipsum} \begin{document} \chapter*{Unnumbered Chapter} Test. \chapter{Title of Chapter} \kant[1] \end{document} Any suggestions on how to achieve the desired layout using the ruled headformat (rather than manual spacing adjustments) would be greatly appreciated.
- Commutative diagram in xy-picby Olga on March 18, 2026 at 8:08 am
I want to draw a commutative diagram like the figure below using xy-pic package. But I don't know how to draw a vertical arrow \mapsto in xy-pic. Edit: \documentclass{article} \usepackage[all,cmtip]{xy} \newcommand{\tuple}[1]{\langle #1 \rangle} \begin{document} \[\begin{xy} {\ar@{|->}(0,0)*{};(10,0)*{}}; \end{xy}\] \end{document} I know how to draw commutative diagrams in the \begin{CD} ... \end{CD} environment. But I have a big problem understanding the order of commands in xy-pic
- Projective limit spanish acute accentby Esteban Saldarriaga-Marin on March 17, 2026 at 7:24 pm
I am using babel package with Spanish style (in amsart class), which puts acute accents in math symbols such as \lim, \max, \inf, etc. It is actually nice, because it keeps all the formatting in the same language and style. However, it doesn't put the accent in \varprojlim, which doesn't go with the general layout. Is it possible to make \varprojlim have the accent as everything else? MWE: \documentclass{amsart} \usepackage[spanish]{babel} \usepackage{amssymb,amsfonts,amsmath} \begin{document} \[ \lim \; \inf \; \max \] \[ \varprojlim \] \end{document} Result:
- tikz, scaling widths of linesby Zarko on March 17, 2026 at 2:39 pm
It seems (or is apparently) that thickness of lines is hard coded. Consequently when drawing a line, the use for example of scale=2 only makes the line longer and its thickness is not changed, see MWE below: \documentclass[margin=3mm, varwidth]{standalone} \usepackage{tikz} \usetikzlibrary{arrows.meta} \tikzset{LA/.style = {-Straight Barb, line width=1mm}} \begin{document} \begin{tikzpicture} \draw[LA] (0,0) -- ++ (2,0); \end{tikzpicture} \begin{tikzpicture}[scale=2] \draw[LA] (0,0) -- ++ (2,0); \end{tikzpicture} \end{document} Is there some trick by which the thickness of the line will also be scaled? The best way would be as option of the line style, which will have effect just on this particular line. My quick search on this site so far didn't give me any suggestion ...
- TikZ / xint: break a loop at the second term, which is 1.0000by cis on March 17, 2026 at 11:34 am
The following loop is an example of a loop that, starting from a certain sequence member, is rounded to 1.0000. How can I break the loop at the second term, which is 1.0000 (in this example, that's the 13th)? Note: I'm using TikZ and xint; both are possible options. \documentclass[margin=5pt, varwidth]{standalone} \usepackage{tikz} \usepackage{xintexpr} \begin{document} \foreach \x in {1,...,15}{%% \x: \xintround{4}{\xinteval{1-exp(-\x/1.2)}}\par }%% \end{document}
- Setting Up Margins for a Landscape A5 Book with Top Bindingby Thomas on March 17, 2026 at 10:24 am
I'm creating a landscape booklet with top ring binding, and I want it to be read across both pages when opened. I've been trying to set up inner and outer margins, but the information I find mostly covers how to do this when the book is bound on the left edge. What I need is to have different top and bottom margins for odd and even pages, like: Odd pages: 25mm top margin, 10mm bottom margin Even pages: 10mm top margin, 25mm bottom margin I’ve tried using the memoir and book classes, along with geometry, but I’m open to other suggestions as well. Could someone explain the recommended setup for this kind of book format? Any help would be greatly appreciated! A (blurry, will update..) picture of the layout I am thinking of. Thanks!
- How to correctly place a label on a bent arrow using to[bend] in TikZby Bubble Man on March 17, 2026 at 5:40 am
I draw an arrow with a label like this. \documentclass[dvipdfmx]{article} \usepackage{tikz} \usetikzlibrary{arrows.meta} \begin{document} \begin{tikzpicture}[auto=left] \node[name=A] at (0,0) {$A$}; \node[name=B] at (1,0) {$B$}; \draw[->] (A) -- (B) node[pos=0.5]{$f$}; \end{tikzpicture} \end{document} I like this notation because the order is “a coordinate, a coordinate, and a label.” This is more readable than “a coordinate, a label, and a coordinate.” I want to bend the arrow while keeping this order. I tried the following: \documentclass[dvipdfmx]{article} \usepackage{tikz} \usetikzlibrary{arrows.meta} \begin{document} \begin{tikzpicture}[auto=left] \node[name=A] at (0,0) {$A$}; \node[name=B] at (1,0) {$B$}; \draw[->] (A) to[bend left=30] (B) node[pos=0.5]{$f$}; \end{tikzpicture} \end{document} However, this does not work properly—the label appears at coordinate A. I know I can achieve this with a \newcommand, but is there another way? Thank you.