Hot
- thin rule at breaking tcolorbox, but don't wantby 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 do I get the actual height available for text on a page with a chapter title? (\textheight includes the title height)by demented hedgehog on March 21, 2026 at 12:06 am
How can I get the actual height available for content on a chapter title page excluding the space for chapter title etc at the top? Some context, I have code that generates latex with an \adjustbox{max totalheight=\textheight} box on a page (so I don't know beforehand whether this will occur on a page with a title or not). \textheight does not factor out the height of the chapter title. Is there some reasonably robust and "correct" way of getting the actual text height available? Minimal example that demonstrates that \textheight is the same on pages with or without a chapter title: \documentclass[a4paper]{book} \usepackage{lipsum} \begin{document} \chapter{A Chapter Title} \lipsum[2] \textbf{Text Height \the\textheight} \\ \lipsum[2] \newpage \lipsum[2] \textbf{Text Height \the\textheight} \\ \lipsum[2] \end{document}
- How do I make it so that the orbs have the same relative position to their images?by Nico on March 20, 2026 at 11:10 pm
Idk how to really describe this, but notice how the 1 sits at the bottom of the first image and the 2 sits at the top. I've used an enumerate environment here and I also used columns, because I just don't want to waste all this empty space and make 2 half slides instead of 1 full one. Here's a minimal work example: \begin{frame} \begin{columns} \begin{column}{0.4 \textwidth} \begin{enumerate} \item \includegraphics[scale = 0.2]{picture 1} \item \includegraphics[scale = 0.2]{picture 2} \end{enumerate} \end{column} \hfill \begin{column}{0.4 \textwidth} Why does it work? \begin{itemize} \item \end{itemize} \end{column} \end{columns} \end{frame} Also here's picture 1 and picture 2:
- Disappearing labelsby John McHugh on March 20, 2026 at 10:30 pm
I am editing a paper with about 30 authors divided into groups, each responsible for one or two sections. I have a master file with header information (title, abstract, etc.) and trailer information, author list, acknowledgements, bibliography. In between, each section is incorporated with \Secin{<file>} directives (see below). In the header, before the \begin{document} is a \input{Include} statement. The file Include.tex contains a \includeonly{} line, and a \newcommand{} line that defines \Secin{} to use either \input{} or \include{}. This is necessary because the document is an article, not a book and has \sections{} rather than \chapters{} and when processing the whole paper, \inputs are needed to avoid page breaks. I have a shell script that takes as an argument a digit, N, 1 - 6 to process group N's section(s). It renames the existing output pdf file, copies the group's IncludeN.tex file to Include.tex, runs pdflatex on the primary file, renames the resulting pdf file adding an N before the .pdf and copies Include00.tex, the default (which uses \input{} and has no \includeonly{}) to Include.tex and renames the old pdf file back to its original name. At each iteration in the editing, I send the authors in each group, their section(s) as pdf and LaTeX. Some are LaTex users and can edit their source. For others, I make the changes based on their inputs. So far, so good, but when I added labels to each section to allow cross referencing, strange things happened. When I process the whole document using the default Input.tex, and the references stabilize, I find \newlabel{}s in the primary aux file for all labels in all sections. There are no aux files for the sections because these runs are being done with \input{}s. The first time, I ran my script to select a single group's section, I got a "labels may have changed, rerun" message. Fair enough, but when I rerun, I get an undefined label message for a label defined in another section, but referenced in one I am processing. At this point, the primary aux file has no \newlabel for the label I am referencing and there is no aux file for the other sections. My solution is to define the Include0.tex file (For the group of all authors) to set the input method to \include{} but to omit an \includeonly{} directive. When I run this, I get a pdf for the entire document with each section starting on a new page and the per section .aux files. The default Include.tex file is left with the \Secin{} command defined as \input{} so the pdf is in the publication form with no forced page breaks if I run pdflatex directly on the primary input file. I figured out what was going on while writing the question, and this works, but it seems that there ought to be a better way. When \includeonly is used on a chaptered document or any one in which each input file's output should start on a new page, the \input{} and \include{} results are the same. Is there any way to suppress the page break on \include{}?
- Manual specification of alt text for individual mathematical symbols or expressions within the (Lua)LaTeX Tagging Projectby Paul J Hurtado on March 20, 2026 at 7:40 pm
I have (finally!) been able to input custom alt text for a non-standard symbol, to be used as a mathematical operator, which is also actually read correctly by a screen reader (NVDA 2026.1beta6, I believe, with Adobe Acrobat). A working example (with some non-working attempts commented out) is below. I'm trying to incorporate this example into some guidelines for submitting accessible mathematics thesis documents based on the new (in progress!) LaTeX Tagging (PDF 2.0 UA/2) capabilities. My question: does anyone know if this way of manually giving a "new" symbol (or existing symbol) screen readable alt text is likely to persist, or are there other alternatives to doing this that (1) work, and (2) are more likely to become the standard approach in the next year or two? Thanks! \DocumentMetadata{ lang = en-US, tagging = on, testphase = {latest,math,firstaid}, tagging-setup = {math/setup={mathml-SE,mathml-AF}}, pdfstandard = ua-2, pdfstandard = a-4f, uncompress } \documentclass{article} \usepackage[hidelinks]{hyperref} %\usepackage{accsupp} % NEEDED FOR THE FIRST TWO ATTEMPTS BELOW, BUT NOT THE THIRD \usepackage{utfsym} % for an example symbol with no unicode alternative (see below) \usepackage{unicode-math} \setmathfont{Latin Modern Math} %% Goal: A \hammerwrench{} function (see the symbol) similar in usage to \sqrt{} % OPTION A: None of these four options give a readable symbol/function %\newcommand{\hammerwrench}[1]{% hammer-X-wrench symbol % \BeginAccSupp{ActualText={hammer wrench}}% %% \BeginAccSupp{method=pdfstringdef,ActualText={hammer wrench}}% % \usym{1F6E0}(#1)% %% \ensuremath{\usym{1F6E0}(#1)}% % \EndAccSupp{}% %} % OPTION B: did not give a readable symbol/function %\newcommand{\hammerwrenchop}{% % \mathop{% % \BeginAccSupp{method=pdfstringdef,ActualText={hammer wrench}}% % \text{\usym{1F6E0}}% % \EndAccSupp{}% % }\nolimits %} % %\newcommand{\hammerwrench}[1]{% % \BeginAccSupp{method=pdfstringdef,ActualText={hammer wrench of #1}}% % \hammerwrenchop\!\left(#1\right)% % \EndAccSupp{}% %} % OPTION C: Trying to use the new access to MathML intent attributes - IT WORKS!!! \newcommand{\hammerwrench}[1]{% \MathMLintent{hammer-wrench($x)}% {{\usym{1F6E0}\!\left(\MathMLarg{x}{#1}\right)}}% } % Now let's look at some symbols that WOULD have readable default MathML tags \newcommand{\Jac}{% \MathMLintent{Jacobian}% {\mathbf{J}}% } \newcommand{\J}{% \MathMLintent{Poisson-matrix}% {J}% } \begin{document} \noindent Here is an example use of the hammerwrench function: $\sin\big(\sqrt{\hammerwrench{x}}\big)$. \\ \noindent Now let's see if it will override MathML. If I write something similar but for calling \verb|$\mathbf{J}$| the Jacobian and \verb|$J$| the Poisson Matrix, I get that $$\Jac \neq \J \neq J.$$ \noindent If you don't have a good (MathML capable) screen reader handy, here is how the above is read using the latest beta version of the NVDA screen reader and Adobe Acrobat:\\[2em] \hrule ~\\ \noindent Here is an example use of the hammerwrench function: sine of, open paren, the square root of hammer-wrench of x, close paren, dot\\ \noindent Now let's see if it will override MathML. If I write something similar but for calling dollar mathbf [the "bf" is barely audible] J dollar, the Jay-cobian and dollar J dollar the Poisson Matrix, I get that Jay-cobian is not equal to Poisson Matrix not equal to Jay ~\\ \hrule ~\\[2em] \noindent Yay! Not only can we override MathML, we can even specify different text to be read for the same visual symbol if they're generated with different macros (not that one should ever do this, it was just for demonstration purposes). \end{document}
- How can Initials with special characters (e.g. German Umlaute) be designed?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?
- How to rotate the watermark text in a tcolorbox?by Mika Ike on March 20, 2026 at 6:48 pm
\documentclass[12pt]{article} \usepackage[spanish]{babel} \usepackage[dvipsnames,svgnames,x11names,table]{xcolor} \usepackage[most]{tcolorbox} \tcbset{ enhanced jigsaw, boxsep=0.1cm, colframe=red, colback=red!16, coltitle=red!16, colupper=blue, collower=blue, breakable, pad at break*=1mm } \usepackage{lipsum} \usepackage{graphicx} % \begin{document} Hello \rotatebox[origin=c]{45}{France} \begin{tcolorbox}[enhanced jigsaw, watermark color=purple!64!white,watermark text={My name will be here. My company will be here. Letters will be here.},remember as=one] %,watermark tikz={rotate=1, scale=1} \lipsum[1] \end{tcolorbox} % $x^2-x-1=0$ % \end{document} O tried with this option in the tcolorbox enviroment ,watermark tikz={rotate=1, scale=1} but no success.
- The \pushbutton disappears in the document when an animation from the `animate` package is usedby ThomasO on March 20, 2026 at 6:42 pm
In one particular case, I wanted to use an animation from the animate package and also include buttons from the Acrotex package aebpro, or eforms (from the tlcontrib repository with TeX Live). When I try this, the buttons are no longer visible. If you know where they are, you can click on them with the mouse in the PDF. To find their location, I placed the buttons in a \fbox. All actions (for example, JS code) are still executed, even if the buttons are not visible. I tried using JavaScript to trigger the buttons’ appearance. Interestingly, this only works on the first page. The buttons then become visible again. But not on the second and subsequent pages. If anyone knows how to make the buttons remain visible on subsequent pages, I would be very grateful for any advice. \documentclass{article} %% compile with LaTeX + dvips + ps2pdf %% or with LaTeX + dvips + distiller \usepackage[% driver=dvips, eforms={useui}, uselayers, ]{aeb_pro} \usepackage{animate} %============== comment this code ======================== \begin{insDLJS}{refreshButtons}{Refresh button appearances} function refreshButtonAppearances() { try { for (var i=0; i<this.numFields; i++) { var nm = this.getNthFieldName(i); var f = this.getField(nm); if (f && f.type === "button") { // Caption "neu setzen" triggert oft die Appearance-Erzeugung var cap = f.buttonGetCaption(); f.buttonSetCaption(cap); } } } catch (e) {} } refreshButtonAppearances(); \end{insDLJS} %========================================================== \begin{document} \fbox{\pushButton[\CA{A}\A{\JS{%app.alert("You chose A"); toggleSetThisLayer("l1");}}]{I}{8cm}{1cm}}% \xBld{l1} Text on layer l1 \eBld \begin{animateinline}[% controls, begin={\begin{minipage}[t]{10cm}}, end={\rule[-0.5cm]{0pt}{2cm}\end{minipage}}, ]{2}% 2 images/s \multiframe{5}{nA=0+1}{% \rule{\nA cm}{15pt}Text } \end{animateinline} \bigskip \fbox{\pushButton[\CA{B}\A{\JS{app.alert("You chose B");}}]{II}{8cm}{1cm}}% \newpage Text on side 2 \fbox{\pushButton[\CA{C}\A{\JS{app.alert("You chose C");}}]{III}{8cm}{1cm}}% end \newpage Text on side 3 \fbox{\pushButton[\CA{D}\A{\JS{app.alert("You chose D");}}]{IV}{8cm}{1cm}}% end \end{document}
- Accessible (LuaLaTeX) PDF, Table of Contents giving Lbl/LBody failures in Adobe Acrobat (still a checker issue?)by Paul J Hurtado on March 20, 2026 at 6:34 pm
I've seen assertions (some going back a few years) that the Adobe Acrobat accessibility checker falsely gives failures for some list tagging structures. The automatically generated Table of Contents is one particular example. Is this true for the following minimal example, compiled using the current lualatex, or is there actually something wrong with the tagging structure? If passing the Adobe checker were to be required by your institution, is there a way to somehow force a ToC tagging structure that would pass the Adobe accessibility checker? \DocumentMetadata{ lang=en, tagging=on, testphase={latest,firstaid}, pdfversion=2.0, pdfstandard={ua-2,a-4f}, uncompress } \title{Minimal Example} \documentclass{report} \usepackage[linktoc=none,pdfusetitle]{hyperref} %linktoc = section, page, both, or none \begin{document} \tableofcontents \chapter{One} \section{Two} \end{document}
- decision tree with irregular position [duplicate]by underflow on March 20, 2026 at 5:26 pm
I need to make a decision-tree that goes sideway, and if possible I do not want to use a diamond for the "decision" node because I need to fit a lot of text in the decision node. I have sent along a hacky sample to show you want I have mind. I wonder if there are existing latex package that could automate the making of such decision trees? i.e. I do not have to manually position each node/arrow. Bonus request: I would like to have rounded corners for the rectangular boxes. Thanks for your help.
- Cropping an image using a lookup tableby mf67 on March 20, 2026 at 2:36 pm
I have a large set of images that I reuse in a book. They all have different bottom crop and so far I have used the macro \image{21}{002} to show image 002.pdf with a 21 bottom crop. I would like to use a macro that, based on the image ID (e.g. 002), looks up the corresponding value (21) and applies the crop consistently. I have tried \documentclass[11pt]{book} \usepackage{graphicx} \usepackage{pgf,tikz,pgfplots} \pgfplotsset{compat=1.15} \def\image#1#2{ \medskip\par\nobreak \centerline{ \begin{tikzpicture} \draw[below right] (0, 0) node[inner sep=0] {\fbox{\includegraphics[trim={25 #1 25 10},clip]{graphics/chorales/#2.pdf}}}; \end{tikzpicture} } } \def\imageAuto#1{ \medskip\par\nobreak \def\cropvalue{10} \ifnum #1=002 \def\cropvalue{21} \fi \centerline{ \begin{tikzpicture} \draw[below right] (0, 0) node[inner sep=0] {\fbox{\includegraphics[trim={25 \cropvalue 25 10},clip]{graphics/chorales/#1.pdf}}};}; \end{tikzpicture} } \begin{document} \image{21}{002} \imageAuto{002} \end{document} with \imageAuto a ‘basic’ solution for a look-up-function (with the default 10), but it does not work. Is there a (better) solution to my problem? PS. The reason for using TikZ is that I need to place text objects on the image, but I have removed those lines for clarity in this post.
- 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}
- How can I customize the vertical space between list items when using a LaTeX preamble with pandoc on a github-flavored markdown source file?by Rich006 on March 20, 2026 at 12:59 pm
Based on this answer, I am using a latex preamble file to customize a bulleted list in a PDF created by pandoc from a github-flavored markdown source file. I would like to also customize the vertical space between list items. I would expect adding a line ,itemsep = 1cm would do that, but it has no effect. The preamble file is % Source - https://tex.stackexchange.com/a/760974 % Posted by jlab % Retrieved 2026-03-20, License - CC BY-SA 4.0 \usepackage{enumitem} \newcommand{\signatureline}{\rule[-2pt]{2cm}{1pt}} \setlist[itemize]{ ,label = \signatureline ,labelindent = \parindent ,labelsep = 2pt ,labelwidth = 2cm ,leftmargin = * }
- 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.
- LyX does not see styles in TEXMFHOME and will not render to PDFby bshane on March 20, 2026 at 2:23 am
I'm having trouble rendering pdf through LyX, even though command-line tools confirm that all necessary components are installed and functioning. What works I have a LyX document I'd like to render to PDF. LyX will generate LaTeX of the document via File -> Export -> LaTeX (pdflatex). The LaTeX will then render to pdf via command-line pdflatex my-paper.tex, and the output looks correct: all equations are properly rendered, and so on. What doesn't work File -> Export -> Export [PDF (pdflatex)] is grayed-out and unclickable. Relatedly (I suspect), Tools -> TeX information does not show any LaTeX styles or classes, even after rescanning. When I open my document, LyX complains that amsart.cls, xcolor.sty, and ulem.sty are all unavailable. System information I'm on Ubuntu 24.04.4 LTS. LyX is Version 2.5.0, recently installed from source. pdfTeX is v 3.141592653-2.6-1.40.29 (TeX Live 2026), with kpathsea version 6.4.2. amsart.cls, xcolor.sty, and ulem.sty are all recent versions from CTAN. They are all in TEXMFHOME, which is the default ~/texmf. xcolor has a .ins; I have run latex xcolor.ins (I have also run the .ins for all other .ins files that came with package amsart, xcolor, and ulem). What I have tried I have run texhash, LyX Tools -> reconfigure, and restarted LyX multiple times. texhash notes that it doesn't have write-permission to TEXMFLOCAL, but I think this is a red herring because texhash ~/texmf updates without comment and all styles and classes are in TEXMFHOME. I have updated LyX Tools -> Preferences -> Paths -> Document templates to ~/texmf/. I've re-run texhash and Tools -> reconfigure, and restarted LyX several times. Still no change.
- Colored rectangle box around title with text side by sideby Victoria Vega on March 19, 2026 at 9:41 pm
I want to place a rectangle box around by title and near I want to add some text to be aligned with the rectangle. I managed to do that with author \author{ $\vcenter{\hbox{ \begin{tcolorbox}[ colframe=red, colback=white, sharp corners, hbox, bottom=2mm ] Prenume Numescu, grupa 10LF421 \end{tcolorbox} }}$ $\rightarrow$ $\vcenter{\hbox{ \parbox[c]{7cm}{ aici înlocuiți textul din template cu nume, prenume, grupa și indicativul grupei } }}$ } but the same style is not applying correctly to the title. How can I fix that and make it to work for the title?
- Reversed logical character ordering in generated pdf [babel with LuaLaTeX]by TheBooker66 aka Ethan on March 19, 2026 at 7:48 pm
I've been using LaTeX (in LyX, usually, but that's besides the point) for a long time. Usually I write my documents in Hebrew, with a bit of English, and compile to a pdf via XeLaTeX. Recently, I wanted to start using LuaLaTeX, as it is apparently the recommended engine,1 and XeLaTeX is no longer supported (also, XeLaTeX is problematic with images, for some reason, and don't close brackets correctly when in a different language). However, I've encountered an a problem: while visually the text looks alright in the pdf (see example ahead), logically there are problems. In Chrome, which uses PDFium, the text is backwards, meaning I can't ctrl+f or copy text, and in FireFox, which uses PDF.js, when copying the spaces don't get copied. Here is a MNWE for LuaLaTex: \documentclass[english,hebrew]{article} \usepackage[provide=*, bidi=basic]{babel} \babelfont{rm}[Ligatures=TeX]{Times New Roman} \begin{document} \selectlanguage{hebrew} שלום, קוראים לי בוט. \end{document} And Here's a MWE for XeLaTeX: \documentclass[english,hebrew]{article} \usepackage[provide=*, bidi=default]{babel} \babelfont{rm}[Ligatures=TeX]{Times New Roman} \begin{document} \selectlanguage{hebrew} שלום, קוראים לי בוט. \end{document} The differences between them are only in the Babel config – bidi=basic vs bidi=default/bidi – according to Babel's manual, section 5.10. By the way, using Babel and not Polyglossia for the same reason I want to start using LuaLaTeX. Both product this output, visually: But logically, LuaLaTeX produces ".טובילםיארוק,םולש", and XeLaTeX produces "שלום, קוראים לי בוט." (both in Chrome). I'm using the latest versions of both engines: LuaHBTeX 1.24.0 XeTeX 3.141592653-2.6-0.999998 Both via TeX Live 2026 with TeX 3.141592653 on Arch Linux 6.19.8. I'd appreciate any help. Thank you. Footnotes: As evidenced here and recommended by everyone in this thread. Also, when compiling using XeLaTeX, I get this warning: "Package babel Error: [...] If possible, switch to luatex, as xetex is not recommend anymore."
- Unwanted horizontal shift of equation* on overlay when \label is present and equation ends with , or ;by João Alves Jr. on March 19, 2026 at 7:26 pm
Since sometime between August 2025 and March 2026, a \label inside equation* causes an unwanted horizontal shift of the displayed equation when advancing overlays, provided the equation ends with , or ;. (Text removed: ̶T̶h̶e̶ ̶s̶h̶i̶f̶t̶ ̶d̶o̶e̶s̶ ̶n̶o̶t̶ ̶o̶c̶c̶u̶r̶ ̶w̶h̶e̶n̶ ̶t̶h̶e̶ ̶e̶q̶u̶a̶t̶i̶o̶n̶ ̶e̶n̶d̶s̶ ̶w̶i̶t̶h̶ ̶̶.̶̶,̶ ̶n̶o̶r̶ ̶w̶h̶e̶n̶ ̶̶e̶q̶u̶a̶t̶i̶o̶n̶̶ ̶(̶n̶u̶m̶b̶e̶r̶e̶d̶)̶ ̶i̶s̶ ̶u̶s̶e̶d̶ ̶i̶n̶s̶t̶e̶a̶d̶ ̶o̶f̶ ̶̶e̶q̶u̶a̶t̶i̶o̶n̶*̶̶,̶ ̶n̶o̶r̶ ̶w̶h̶e̶n̶ ̶̶\̶l̶a̶b̶e̶l̶̶ ̶i̶s̶ ̶a̶b̶s̶e̶n̶t̶.̶ ) Update: Further testing shows that the conditions are more general than initially described. The shift does not occur when \label is absent (this seems to be a necessary condition in all cases identified so far). However, with \label present, the bug also occurs with equation (numbered), and can be triggered by other elements affecting horizontal spacing in math mode, such as an operator defined via \DeclareMathOperator — regardless of the final punctuation character. The conditions listed below reflect only the cases identified so far and may not be exhaustive. The following MWE reproduces the problem: \documentclass{beamer} \begin{document} \begin{frame}{Test} \begin{equation*}\label{E:Test} A, \end{equation*} \pause Text. \end{frame} \end{document} Observed behavior: On overlay 1, the equation appears at one horizontal position. After advancing to overlay 2 (via \pause), the equation shifts slightly to the right. Expected behavior: The equation should remain at the same horizontal position across all overlays. Conditions that trigger the bug (all three must hold simultaneously): (Text removed: ̶e̶q̶u̶a̶t̶i̶o̶n̶*̶̶ ̶(̶u̶n̶n̶u̶m̶b̶e̶r̶e̶d̶)̶;̶ ) equation* (unnumbered) or equation (numbered); \label{...} inside it; (Text removed: t̶h̶e̶ ̶e̶q̶u̶a̶t̶i̶o̶n̶ ̶e̶n̶d̶s̶ ̶w̶i̶t̶h̶ ̶̶,̶̶ ̶o̶r̶ ̶̶;̶̶ ̶(̶m̶a̶t̶h̶e̶m̶a̶t̶i̶c̶a̶l̶ ̶p̶u̶n̶c̶t̶u̶a̶t̶i̶o̶n̶,̶ ̶i̶.̶e̶.̶ ̶̶\̶m̶a̶t̶h̶p̶u̶n̶c̶t̶̶)̶.̶ ) the equation ends with , or ; (mathematical punctuation, i.e. \mathpunct), or contains certain elements that affect horizontal spacing in math mode, such as an operator defined via \DeclareMathOperator. Conditions under which the bug does not occur: \label removed from the equation environment; (Text removed:̶e̶q̶u̶a̶t̶i̶o̶n̶̶ ̶(̶n̶u̶m̶b̶e̶r̶e̶d̶)̶ ̶u̶s̶e̶d̶ ̶i̶n̶s̶t̶e̶a̶d̶ ̶o̶f̶ ̶̶e̶q̶u̶a̶t̶i̶o̶n̶*̶̶;̶ ) (Text removed: e̶q̶u̶a̶t̶i̶o̶n̶ ̶e̶n̶d̶s̶ ̶w̶i̶t̶h̶ ̶̶.̶̶ ̶i̶n̶s̶t̶e̶a̶d̶ ̶o̶f̶ ̶̶,̶̶ ̶o̶r̶ ̶̶;̶̶.̶ ) equation ends with . instead of , or ; in some cases. Suspected cause: During the overlay retypsetting pass, the \label inside the equation environment triggers a write to the .aux file. This side effect appears to disturb the internal state of display math mode at the moment the final content is processed. Since , and ; are \mathpunct and insert spacing via \mskip, they are sensitive to the math mode state at that point; . is not a \mathpunct in math mode. Similarly, \DeclareMathOperator also involves spacing adjustments that appear sensitive to the same disturbance. Workaround: Remove \label from equation environments, or place it at the very end of the equation, just before \end{equation*} (credit: greg). Note that a \label inside equation* is semantically questionable in any case, since an unnumbered equation cannot be meaningfully referenced; however, keeping labels in slides that share code with a book may be a legitimate reason to have them. Environment: MiKTeX (updated) with a recent Beamer version. The problem was not present in August 2025 and began occurring by March 2026 or before, suggesting it was introduced by an update to Beamer or one of its dependencies in that interval.
- xint / pgffor: Loop-wise calculation of the values of the cumulative binomial distribution - performanceby cis on March 19, 2026 at 3:53 pm
I have some code here that calculates the functions \bdceval{\n}{\p}{\k}, row by row, for fixed \n and \k values and values p from a list \def\pList{0.1, 1/6, 0.25, 0.3, 0.4, 0.5}. It works and is correct. But I'm wondering: Is this well-designed in terms of performance? I can only manage to implement \makePListRow{\n}{\k} with two commands. \documentclass{article} \usepackage{tikz} \usepackage{xintexpr} \def\pList{0.1, 1/6, 0.25, 0.3, 0.4, 0.5} % Function: \xintNewFloatExpr{\bdceval}[3]{add(binomial(#1,v)*#2^v*(1-#2)^(#1-v), v=0..#3)} % Commands for List: \newcommand{\myRowMapper}[1]{\xintRound{4}{\bdceval{\n}{#1}{\k}}} \NewExpandableDocumentCommand{\makePListRow}{mm}{% \xintListWithSep{, }{% \xintApply{\myRowMapper}{\xintCSVtoList{\pList}}% }% } \begin{document} \foreach \n in {2,3,7}{% \foreach \k in {0,...,\n}{% \n, \k, \makePListRow{\n}{\k} \par }% } \end{document}
- 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.
- Extra Part tags in accessible, tagged PDFby YamiOmar88 on March 19, 2026 at 9:10 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{lipsum} % General information \author[]{YamiOmar88} \title{Some Title} \date{} \begin{document} \maketitle \section*{Some Section} \lipsum[1-3] \begin{itemize} \item The first item \item Something here \item A final item \end{itemize} \end{document} When I check the PDF with the PDF Accessibility Checker a.k.a. PAC (or look at the tags in PDF-XChange Editor) I see that before each <p> or <L> tag there is a <Part> tag. The PAC complains that this tag is being misused. But I don't know how to tell LaTeX to not put it there. Is there anything I should be doing differently? The code is compiled with LuaLaTeX using MiKTeX 26.2. My LaTeX version is LaTeX2e <2025-11-01>, L3 programming layer <2026-01-19>. Note: I read your comments about minimizing my sample code. I'm trying to improve. Hope this was better.
- 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?
- 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.
- 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 ...