Week
- 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}
- 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.
- 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.
- 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?
- 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!
- Typesetting a coffin at the start of a text lineby ysalmon on March 17, 2026 at 9:11 am
I am giving a try at coffins, and I joined two coffins to typeset material side by side on a line. However, \TypesetCoffin does not put the resulting coffin at the left hand side of the page, but introduces a small gap, as evidenced by the boxes below. Why is that, and how do I tell it not to ? \documentclass{article} \usepackage{showframe,xcoffins} \fboxsep 0pt \begin{document} \noindent \NewCoffin\CoffinExG \NewCoffin\CoffinExD \SetVerticalCoffin\CoffinExG{.72\textwidth}{material} \SetVerticalCoffin\CoffinExD{.28\textwidth}{\hfill material} \JoinCoffins\CoffinExG[b,r]\CoffinExD[b,l] \fbox{\TypesetCoffin\CoffinExG} \end{document}
- 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.
- How to align tabular on the left with the table is under another table? [duplicate]by user516076 on March 17, 2026 at 1:08 am
Why can't I use \newline? Even entering and giving it \vspace doesn't work. \documentclass[border=6pt]{standalone} \usepackage[table]{xcolor} \usepackage{array} \definecolor{headorange}{RGB}{255,127,0} \definecolor{creamlight}{RGB}{255, 242, 215} \definecolor{creamdark}{RGB}{255, 255, 143} \arrayrulecolor{white} \setlength{\arrayrulewidth}{1.6pt} \renewcommand{\arraystretch}{1.9} \setlength{\tabcolsep}{0pt} \newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}} \newcolumntype{H}{>{\columncolor{headorange}\color{white}\centering\arraybackslash\bfseries\itshape}m{1.25cm}} \newcolumntype{L}{>{\columncolor{creamlight}\centering\arraybackslash}m{1.8cm}} \newcolumntype{D}{>{\columncolor{creamdark}\centering\arraybackslash}m{1.8cm}} \begin{document} \begin{tabular}{|H|L|D|L|D|L|D|} \hline $x$ & $-1$ & $-0.8$ & $-0.4$ & $0$ & $0.4$ & $1$ \\ \hline $y$ & & $1.4$ & & $-1$ & $-0.6$ & \\ \hline \end{tabular} \newline \vspace{4mm} \begin{tabular}{|H|L|D|L|D|L|} \hline $x$ & $1.2$ & $1.6$ & $2$ & $2.4$ & $2.8$ \\ \hline $y$ & & $2.6$ & & & \\ \hline \end{tabular} \end{document} I want the second table on the right side is exactly under the first table and they are left aligned. Like this:
- Trimming causes compilation failureby BambOo on March 16, 2026 at 2:59 pm
I'm using https://tex.stackexchange.com/a/647838/141947 to operate over a list of image files to include them easily in a document. For some reason, adding a trim option to \includegraphics results in a compilation failure with File ended while scanning use of \Gread@parse@vp Why does it break ? MWE \documentclass{article} \usepackage{graphicx} \ExplSyntaxOn \NewDocumentCommand{\plotloop}{O{.}m} {% #1 = common prefix, default . for the current directory % #2 = list of file names \clist_map_inline:nn { #2 } { \begin{figure}[p] \centering \includegraphics[scale=1, angle=90]{example-image-##1} % Works % \includegraphics[scale=1, angle=90, trim={0cm 0cm 0cm 0cm},clip]{example-image-##1} % Fails \caption{Left~\protect\detokenize\expandafter{example-image-##1}} \end{figure} \begin{figure}[p] \centering \includegraphics[{scale=1, angle=90}]{example-image-##1} \caption{Right~\protect\detokenize\expandafter{example-image-##1}} \end{figure} } } \ExplSyntaxOff \begin{document} \plotloop{a,b,c} \end{document}
- How should (0,-1) -- +([turn]45:2) be interpreted?by D G on March 16, 2026 at 11:57 am
How should I interprete the case B? Case A \documentclass[tikz,border=12pt,12pt]{standalone} \begin{document} \begin{tikzpicture}[dot/.append style={circle,fill,inner sep=3pt}] \draw (-3,-3) grid (3,3); \draw[line width=3pt] (-3,-1) coordinate[dot] -- (0,-1) coordinate[dot] -- ([turn]45:{sqrt(2)}) coordinate[dot]% turn 45 degrees relative to the previous segment direction -- ([turn]90:3) coordinate[dot]; \path (0,0) coordinate[dot,red]; \end{tikzpicture} \end{document} Case B \documentclass[tikz,border=12pt,12pt]{standalone} \begin{document} \begin{tikzpicture}[dot/.append style={circle,fill,inner sep=3pt}] \draw (-3,-3) grid (3,3); \draw[line width=3pt] (-3,-1) coordinate[dot] -- (0,-1) coordinate[dot] -- +([turn]45:{sqrt(2)}) coordinate[dot]% how should this line be interpreted? -- ([turn]90:3) coordinate[dot]; \path (0,0) coordinate[dot,red]; \end{tikzpicture} \end{document}
- DocumentMetadata impeding the processing of otherwise normal fileby Knudsen on March 16, 2026 at 5:38 am
I have an MWE that when processed (lualatex) produces an error ! Argument of \__math_grab_dollar_delim:w has an extra }. which, as far as I know, is not true and impedes the processing of the file. When you comment the DocumentMetadata statement line, the file process fine and produces a PDF fine. \DocumentMetadata{pdfversion=1.7, pdfstandard=A-2b, lang=en-US} \documentclass{report} \usepackage{tikz-cd} % Enable modern LaTeX3 programming syntax \ExplSyntaxOn \NewDocumentCommand{\testinput}{ m } { \file_input:n { #1 } } \ExplSyntaxOff \begin{filecontents*}{diag.tex} \begin{tikzcd}[sep = .8 cm] S^2 \arrow[d, "\pi"] \arrow[r, "\pi"] & (P^2,d) \\ P^2 \arrow[ru, "{\overline{\pi}}"] \end{tikzcd} Since $P^2$ is compact... \end{filecontents*} \begin{document} \testinput{diag.tex} \end{document} I read the DocumentMetadata documentation and it mostly says that the command is a statement, and does not elaborate on the implications that it may have on the processing of the file. The numbers I choose for the example only implies that when you save a file as PDF/A-2b, you are creating a PDF 1.7 file that has been stripped of prohibited features (like JavaScript, encryption, and external references). How does one determine what allows the file to be processed and what not?
- Theorem citation style [duplicate]by Davide on March 15, 2026 at 12:23 pm
I would like to cite theorems in my manuscript by specifying the reference in the theorem title. I tried using the following code: \begin{theorem}[{\cite[Thm.~2.5]{reference_paper}}] Statement of the theorem \end{theorem} or \begin{theorem} \cite[Thm.~2.5]{reference_paper}. Statement of the theorem \end{theorem} These produce the first two results shown in the attached image, but I would prefer something similar to the third row. Being able to remove the space after '(' in the first example would also be fine. Do you have any suggestions? Thanks in advance! This question is similar to this, but I do not want to specify the number manually and was looking for a more LaTeX-style way of doing it.
- Automatically include -converted version of images in LaTeX if it existsby monty01 on March 14, 2026 at 1:11 pm
I'm working on a LaTeX document where I have multiple image files, some of which have a -converted version. For example, my files might look like this: a.png b.png b-converted.png c.png c-converted.png d.png I want to include the images in my document using a command like: \includegraphics{a.png} % includes a.png \includegraphics{b.png} % include b-converted.png \includegraphics{c.png} % include c-converted.png \includegraphics{d.png} % includes d.png That is, the logic should be: If basename-converted.ext exists, include that. Otherwise, include the original file: basename.ext. MWE \documentclass{article} \usepackage{graphicx} \begin{document} \includegraphics{a.png} \includegraphics{b-converted.png} \end{document} EDIT: I should work with multiple multiple file extension, like png, jpg, pdf, svg ...