• How many expl3 code lines are in the LaTeX kernel?
    by TeXtnik on December 9, 2025 at 11:27 pm

    I was courious to know how many line of expl3 code is in the LaTeX kernel. I run a python script (code below) to count the number of lines in each dtx file in the base directory of the LaTeX2e repository. The result I got is taht around 17% of the code is written in expl3. The breaking of this number for each file is below. I guess there are some improvements to be done: Don't count documentation lines. Include files in other directories (requires, tools ...) Use the striped tex files instead the dtx files? Some other? Can someone improve this estimate? (Apologize the use of python for these; I am force today to use a Windows machine, and I can't use some awk and shell tools to this work easier. I did it in a dirty way 🙁 ) total_lines expl3lines % alltt.dtx 224 0 0 classes.dtx 4505 0 0 doc.dtx 6293 517 8.2 docstrip.dtx 4603 0 0 exscale.dtx 202 0 0 fix-cm.dtx 829 0 0 fontdef.dtx 1623 0 0 graphpap.dtx 195 0 0 ifthen.dtx 558 0 0 inputenc.dtx 3053 0 0 latex209.dtx 1152 4 0.3 latexrelease.dtx 1355 237 17.5 latexsym.dtx 203 0 0 letter.dtx 1950 0 0 ltalloc.dtx 176 0 0 ltbibl.dtx 481 0 0 ltboxes.dtx 1622 0 0 ltclass.dtx 4171 2 0 ltcmd.dtx 5867 5753 98.1 ltcmdhooks.dtx 1865 1672 89.7 ltcntrl.dtx 326 0 0 ltcounts.dtx 881 0 0 ltdefns.dtx 2837 0 0 ltdirchk.dtx 1031 0 0 lterror.dtx 915 0 0 ltexpl.dtx 602 81 13.5 ltfilehook.dtx 1840 408 22.2 ltfiles.dtx 1842 20 1.1 ltfinal.dtx 1554 143 9.2 ltfloat.dtx 1690 0 0 ltfntcmd.dtx 806 0 0 ltfssaxes.dtx 4544 0 0 ltfssbas.dtx 2550 5 0.2 ltfsscmp.dtx 378 0 0 ltfssdcl.dtx 2234 131 5.9 ltfssini.dtx 2459 0 0 ltfsstrc.dtx 2053 25 1.2 lthooks.dtx 8160 5775 70.8 lthyphen.dtx 143 0 0 ltidxglo.dtx 218 0 0 ltkeys.dtx 740 573 77.4 ltlength.dtx 184 0 0 ltlists.dtx 1227 0 0 ltlogos.dtx 124 0 0 ltluatex.dtx 2201 0 0 ltmarks.dtx 2406 1519 63.1 ltmath.dtx 1483 0 0 ltmeta.dtx 251 81 32.3 ltmiscen.dtx 1899 0 0 ltoutenc.dtx 3861 0 0 ltoutput.dtx 6682 0 0 ltpage.dtx 438 41 9.4 ltpageno.dtx 101 0 0 ltpar.dtx 189 0 0 ltpara.dtx 1353 670 49.5 ltpictur.dtx 2046 0 0 ltplain.dtx 1745 0 0 ltproperties.dtx 1018 531 52.2 ltsect.dtx 1101 0 0 ltshipout.dtx 2270 1305 57.5 ltsockets.dtx 1218 459 37.7 ltspace.dtx 1500 0 0 lttab.dtx 1675 0 0 lttagging.dtx 1661 954 57.4 lttemplates.dtx 2830 2066 73 lttextcomp.dtx 2778 0 0 ltthm.dtx 319 0 0 ltvers.dtx 448 0 0 ltxdoc.dtx 728 0 0 ltxref.dtx 668 0 0 makeindx.dtx 313 0 0 newlfont.dtx 204 0 0 nfssfont.dtx 499 0 0 oldlfont.dtx 252 0 0 preload.dtx 269 0 0 proc.dtx 449 0 0 slides.dtx 2740 0 0 syntonly.dtx 282 0 0 utf8ienc.dtx 2327 0 0 Total 130469 22972 17.6 We can see that new features like ltcmd or the hook mechanism (ltchooks.dtx) are close to pure expl3. Despite the great work of the LaTeX project tema (small bang is getting bigger with the tagging), most parts of the kernel are not use expl3 at this moemnt. Are we going to see a 100% expl3 usage? Does this question make any sense? 😀 The code: import re import glob import pandas as pd def count_lines(filename): num_lines = sum(1 for _ in open(filename, encoding="utf8")) return num_lines starttag = "ExplSyntaxOn" endtag = "ExplSyntaxOff" pattern = rf"{starttag}(.*?){endtag}" # make pattern def count_expl3(filename): # get input with open(filename, "r", encoding="utf8") as fp: data = fp.read() # read in all the data to a string results = re.findall(pattern, data, flags=re.DOTALL) # DOTALL finds over multiple lines # print out results (you could write it to a file instead) find_lines = [] for res in results: for item in res.strip().split("\n"): find_lines.append(item) return len(find_lines) line_data = {} for latexfile in glob.glob("*.dtx"): total_lines = count_lines(latexfile) expl3_lines = count_expl3(latexfile) line_data[latexfile] = {"total_lines": total_lines, "expl3lines": expl3_lines} df = pd.DataFrame(line_data) df = df.head().transpose() df.loc['Total'] = df.sum(numeric_only=True) df['%'] = ((df["expl3lines"] / df["total_lines"]) * 100).round(1) print(df.to_markdown())

  • Footnote within newkeytheorem [duplicate]
    by clueless on December 9, 2025 at 9:01 pm

    EDIT: When used within a keytheorem environment, footnote label counter is different ('a', 'b',...) than \documentclass[11pt]{book} \usepackage{amsmath,amssymb,amsthm,mathtools} \usepackage{keytheorems} \usepackage{tcolorbox} \tcbuselibrary{breakable} \usepackage{footnote} \BeforeBeginEnvironment{tcolorbox}{\savenotes} \AfterEndEnvironment{tcolorbox}{\spewnotes} \newkeytheoremstyle{tm} { noteseparator={: }, notebraces={}{}, notefont=\bfseries, headpunct={}, bodyfont=\normalfont, tcolorbox={breakable,colback = blue!10,colframe = blue!50!black,}, } \newkeytheorem{theorem}[style=tm,name=Teorem,parent=chapter] \begin{document} \begin{theorem} Some text\footnote{bla} \end{theorem} Some more text\footnote{bla bla}. \end{document}

  • Overlining with titlo Cyrillic text
    by Antonis on December 9, 2025 at 8:08 pm

    NewComputerModern is adding support for more diacritics including titlo (UFE2E+UFE2F). When titlo is placed above two consecutive letters of the same height then everything works as expected. For example в︎д︯ produces But if letters of unequal height are used, say вК, the titlo is broken: Similarly, when three letters are used, then the two titlo endings must be joined with a straight line: What is needed is a similar construction used in MathMode for \overparen where a starting and an ending glyph is used and joined with a line. But in text mode. Is there any way to achieve this? I can share an otf before release for testing.

  • Environment that conditionally collects its content
    by campa on December 9, 2025 at 8:05 pm

    Disclaimer: This is a bit a XY problem, or rather: I have a problem X and I have a solution Y which works but does not really make me happy. Background: I have an environment, say {foo}, which I use for school tests. In the environment I can have solutions, whose presence is controlled by a boolean \ifsolution. Sometimes I want to print the pupils' version: easy, set \solutionfalse. Sometimes I want to print my own version: also easy, use \solutiontrue. Sometimes, I want to have a pdf file which contains both versions, first without and and then with solution: also easy, just use the environ package or the b specifier to collect the content and print it twice. Problem: All three versions can be easily obtained by \NewDOcumentEnvironment{foo}{+b}{...}{...}. However, this breaks synctex, and that might be a bit annoying. My idea was therefore to define an environment that collects its argument only in the last case, when I need both versions. I've managed it like this: \documentclass{article} \newif\ifsolution \def\solution#1{\ifsolution#1\fi} \newtoks\mytoks \long\def\collectfoo#1\end#2{% \mytoks\expandafter{\the\mytoks#1}% \def\tempa{foo}% \def\tempb{#2}% \ifx\tempa\tempb \def\next{\end{foo}}% \else \def\next{\mytoks\expandafter{\the\mytoks\end{#2}}\collectfoo}% \fi \next } \newenvironment{foo}[1]{% \ifdefined\foox\errmessage{You cannot nest {foo}!}\else\let\foox\relax\fi \par \def\nextA{}% \def\nextB{}% \ifcase#1\relax\solutionfalse\or% 0 = without solution \solutiontrue\else% 1 = with solution \def\nextA{\mytoks{}\collectfoo}% else once with and once without \def\nextB{\solutionfalse\the\mytoks\par\solutiontrue\the\mytoks}\fi \nextA }{% \nextB \par } \begin{document} \begin{foo}{0} An environment to see if the scan works: \begin{itemize} \item bla \item bar \end{itemize} If I've done it right, there should be nothing here: \solution{foo bar baz} \end{foo} \vskip2ex\hrule\vskip2ex \begin{foo}{1} An environment to see if the scan works: \begin{itemize} \item bla \item bar \end{itemize} If I've done it right, there should be something here: \solution{foo bar baz} \end{foo} \vskip2ex\hrule\vskip2ex \begin{foo}{2} An environment to see if the scan works: \begin{itemize} \item bla \item bar \end{itemize} If I've done it right, this should appear twice, fist without and then with something here: \solution{foo bar baz} \end{foo} \end{document} The result is what I expect, but of course my way to collect the environment's content is very rough. (No environment stack like amsmath or environ.) The question is basically: can this be done better?

  • Adding a style to biblatex makes my beamer document crash
    by Hrach on December 9, 2025 at 6:52 pm

    I am using biblatex on Overleaf to cite in my Beamer document. When I don't specify any styles, \usepackage{biblatex} \addbibresource{references.bib} works just fine. But I want the citations to look like [Author,Year]. When I try to add [style=authoryear] to the usepackage command the file just crashes with no explanation given. I am using pdflatex to compile.

  • Tikz comma shape
    by Andrew on December 9, 2025 at 6:40 pm

    I am using tikz to make a PA Dutch hex sign-like image. How can I make the comma-like shape that is seen below? I will ultimately be replicating it and rotating it around a center point, but I don't know how to get the basic shape to begin with.

  • drawing arc using intersection with triangle
    by troy on December 9, 2025 at 5:26 pm

    I've been trying to adapt the answer https://tex.stackexchange.com/a/239471 to the drawing I've been attempting, but I'm getting a strange result. I want draw an arc that begins and ends where it intersects with a triangle and spanning the interior of the triangle. My attempt at this is below. What I'm getting is a small, almond-shaped loop near one of the intersections. \documentclass[tikz]{standalone} \usepackage{pgfplots} \usetikzlibrary{fillbetween} \usetikzlibrary{3d} \usetikzlibrary{calc} \usetikzlibrary{intersections} \usetikzlibrary{perspective} \begin{document} \begin{tikzpicture}[scale=1.25, font=\sffamily] \pgfmathsetmacro{\alphasma}{1.4} \coordinate (O) at (0,0,0); \node at (O) {O}; \begin{scope}[scale=4,purple,very thick] \coordinate (X) at (0,0,1); \coordinate (Y) at (1,0,0); \draw[->] (O) -- (Y) node[anchor=north east]{\Large Y}; \draw[->] (O) -- (X) node[anchor=south]{\Large X}; \end{scope} \begin{scope}[3d view={90}{0.1}] \begin{scope}[scale=5,orange] \begin{scope}[rotate around y=20,black] \begin{scope}[rotate around z=-10,cyan] \begin{scope}[ canvas is xy plane at z=0, very thick ] \path[name path=lambdaArc] (O) circle [x radius=.95,y radius=.45]; \draw[name path=O-X-Y,dashed] (O) -- ($(O)!2*\alphasma!(X)$) -- ($(O)!2*\alphasma!(Y)$) -- cycle; \draw[red,thin, intersection segments={of=lambdaArc and O-X-Y,sequence=L3}]; \draw[orange,dashed] (O) circle [x radius=.95,y radius=.45]; \end{scope} \end{scope} \end{scope} \end{scope} \end{scope} \end{tikzpicture} \end{document} This is part of a larger diagram I am making. Deleting the extraneous parts leaves some scopes and structure that look unnecessary, but I left them as-is.

  • Tracing command silently alters pdf
    by Erwann on December 9, 2025 at 4:38 pm

    The desired output is with an overlay; but \tl_show:N prevents inhibits it. Though I found a workaround for this, \tl_log:N, it has cost me time so I thought I'd post it for insights. The question is: is \tl_show:N's behavior to be expected? *.tex \documentclass{article} \usepackage{lipsum} \usepackage{tikz} \usepackage{xcolor} % Credits: % https://tex.stackexchange.com/questions/755937 % On the terminal: % source_file='debug-121.tex'; find . -type f -name "${source_file/tex/*}" | grep -v '.tex' | while read path; do rm "$path"; done; latexmk -pdf -interaction=nonstopmode "$source_file"; printf '~~~~~~~~~~~~\n%s contains the following errors:\n' "${source_file/tex/log}"; errors=$(grep -i -C4 'Error' "${source_file/tex/log}"); format_string='%s\n'; [[ -z "$errors" ]] && printf -- "$format_string" 'None' || printf -- "$format_string" "$errors"; \makeatletter \ExplSyntaxOn \tl_set:Nn\__erw_dummy_tl{foo,bar,baz} \tl_show:N\__erw_dummy_tl % problematic % \tl_log:N\__erw_dummy_tl % workaround \ProvideDocumentCommand{\OverlayTypeset}{ o m } { \AddToHook{shipout/background}{ \int_compare:nTF { \ReadonlyShipoutCounter < \PreviousTotalPages } {% % ---------------------------------------------------------% case | compile | pdf \begin{tikzpicture}[remember~picture,overlay,text=red] % A | ✔️ | ❌ \node[scale=6,opacity=0.5] at (current~page.center) {#2}; \end{tikzpicture} } { } } } \ExplSyntaxOff \makeatother \OverlayTypeset{DRAFT} \begin{document} \lipsum[1-10] %% \lipsum[1-20] \end{document} Terminal output: Problematic (/opt/texlive/2025/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikz librarytopaths.code.tex))) > \__erw_dummy_tl=foo,bar,baz. <recently read> } l.17 \tl_show:N\__erw_dummy_tl % problematic (./debug-121.aux) (/opt/texlive/2025/texmf-dist/tex/context/base/mkii/supp-pdf.mkii [Loading MPS to PDF converter (version 2006.09.02).] ) (/opt/texlive/2025/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty (/opt/texlive/2025/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg)) [1{/opt/texlive/2025/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] [2] (./debug-121.aux) ) (see the transcript file for additional information)</opt/texlive/2025/texmf-di st/fonts/type1/public/amsfonts/cm/cmr10.pfb> Output written on debug-121.pdf (2 pages, 24824 bytes). Transcript written on debug-121.log. Latexmk: Getting log file 'debug-121.log' Latexmk: Examining 'debug-121.fls' Latexmk: Examining 'debug-121.log' Latexmk: Log file says output to 'debug-121.pdf' Latexmk: Using bibtex to make bibliography file(s). Latexmk: Errors, so I did not complete making targets Collected error summary (may duplicate other messages): pdflatex: Command for 'pdflatex' gave return code 1 Refer to 'debug-121.log' and/or above output for details Latexmk: Sometimes, the -f option can be used to get latexmk to try to force complete processing. But normally, you will need to correct the file(s) that caused the error, and then rerun latexmk. In some cases, it is best to clean out generated files before rerunning latexmk after you've corrected the files. ~~~~~~~~~~~~ debug-121.log contains the following errors: None Workaround: Output written on debug-121.pdf (2 pages, 25464 bytes). Transcript written on debug-121.log. Latexmk: Getting log file 'debug-121.log' Latexmk: Examining 'debug-121.fls' Latexmk: Examining 'debug-121.log' Latexmk: Log file says output to 'debug-121.pdf' Latexmk: Using bibtex to make bibliography file(s). Latexmk: All targets (debug-121.pdf) are up-to-date ~~~~~~~~~~~~ debug-121.log contains the following errors: None log Problematic $ cat debug-121.log This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025) (preloaded format=pdflatex 2025.9.12) 9 DEC 2025 13:18 entering extended mode restricted \write18 enabled. %&-line parsing enabled. **debug-121.tex (./debug-121.tex LaTeX2e <2025-06-01> patch level 1 L3 programming layer <2025-08-13> (/opt/texlive/2025/texmf-dist/tex/latex/base/article.cls Document Class: article 2025/01/22 v1.4n Standard LaTeX document class (/opt/texlive/2025/texmf-dist/tex/latex/base/size10.clo File: size10.clo 2025/01/22 v1.4n Standard LaTeX file (size option) ) \c@part=\count275 \c@section=\count276 \c@subsection=\count277 \c@subsubsection=\count278 \c@paragraph=\count279 \c@subparagraph=\count280 \c@figure=\count281 \c@table=\count282 \abovecaptionskip=\skip49 \belowcaptionskip=\skip50 \bibindent=\dimen148 ) (/opt/texlive/2025/texmf-dist/tex/latex/lipsum/lipsum.sty (/opt/texlive/2025/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty (/opt/texlive/2025/texmf-dist/tex/latex/l3kernel/expl3.sty Package: expl3 2025-08-13 L3 programming layer (loader) (/opt/texlive/2025/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def File: l3backend-pdftex.def 2025-06-09 L3 backend support: PDF output (pdfTeX) \l__color_backend_stack_int=\count283 )) Package: l3keys2e 2024-08-16 LaTeX2e option processing using LaTeX3 keys ) Package: lipsum 2021-09-20 v2.7 150 paragraphs of Lorem Ipsum dummy text \g__lipsum_par_int=\count284 \l__lipsum_a_int=\count285 \l__lipsum_b_int=\count286 (/opt/texlive/2025/texmf-dist/tex/latex/lipsum/lipsum.ltd.tex)) (/opt/texlive/2025/texmf-dist/tex/latex/pgf/frontendlayer/tikz.sty (/opt/texlive/2025/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty (/opt/texlive/2025/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty (/opt/texlive/2025/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex \pgfutil@everybye=\toks17 \pgfutil@tempdima=\dimen149 \pgfutil@tempdimb=\dimen150 ) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def \pgfutil@abb=\box53 ) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex (/opt/texlive/2025/texmf-dist/tex/generic/pgf/pgf.revision.tex) Package: pgfrcs 2025-08-29 v3.1.11a (3.1.11a) )) Package: pgf 2025-08-29 v3.1.11a (3.1.11a) (/opt/texlive/2025/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty (/opt/texlive/2025/texmf-dist/tex/latex/graphics/graphicx.sty Package: graphicx 2024/12/31 v1.2e Enhanced LaTeX Graphics (DPC,SPQR) (/opt/texlive/2025/texmf-dist/tex/latex/graphics/keyval.sty Package: keyval 2022/05/29 v1.15 key=value parser (DPC) \KV@toks@=\toks18 ) (/opt/texlive/2025/texmf-dist/tex/latex/graphics/graphics.sty Package: graphics 2024/08/06 v1.4g Standard LaTeX Graphics (DPC,SPQR) (/opt/texlive/2025/texmf-dist/tex/latex/graphics/trig.sty Package: trig 2023/12/02 v1.11 sin cos tan (DPC) ) (/opt/texlive/2025/texmf-dist/tex/latex/graphics-cfg/graphics.cfg File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration ) Package graphics Info: Driver file: pdftex.def on input line 106. (/opt/texlive/2025/texmf-dist/tex/latex/graphics-def/pdftex.def File: pdftex.def 2024/04/13 v1.2c Graphics/color driver for pdftex )) \Gin@req@height=\dimen151 \Gin@req@width=\dimen152 ) (/opt/texlive/2025/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty (/opt/texlive/2025/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex Package: pgfsys 2025-08-29 v3.1.11a (3.1.11a) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex \pgfkeys@pathtoks=\toks19 \pgfkeys@temptoks=\toks20 (/opt/texlive/2025/texmf-dist/tex/generic/pgf/utilities/pgfkeyslibraryfiltered. code.tex \pgfkeys@tmptoks=\toks21 )) \pgf@x=\dimen153 \pgf@y=\dimen154 \pgf@xa=\dimen155 \pgf@ya=\dimen156 \pgf@xb=\dimen157 \pgf@yb=\dimen158 \pgf@xc=\dimen159 \pgf@yc=\dimen160 \pgf@xd=\dimen161 \pgf@yd=\dimen162 \w@pgf@writea=\write3 \r@pgf@reada=\read2 \c@pgf@counta=\count287 \c@pgf@countb=\count288 \c@pgf@countc=\count289 \c@pgf@countd=\count290 \t@pgf@toka=\toks22 \t@pgf@tokb=\toks23 \t@pgf@tokc=\toks24 \pgf@sys@id@count=\count291 (/opt/texlive/2025/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg File: pgf.cfg 2025-08-29 v3.1.11a (3.1.11a) ) Driver file for pgf: pgfsys-pdftex.def (/opt/texlive/2025/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def File: pgfsys-pdftex.def 2025-08-29 v3.1.11a (3.1.11a) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def File: pgfsys-common-pdf.def 2025-08-29 v3.1.11a (3.1.11a) ))) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.t ex File: pgfsyssoftpath.code.tex 2025-08-29 v3.1.11a (3.1.11a) \pgfsyssoftpath@smallbuffer@items=\count292 \pgfsyssoftpath@bigbuffer@items=\count293 ) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.t ex File: pgfsysprotocol.code.tex 2025-08-29 v3.1.11a (3.1.11a) )) (/opt/texlive/2025/texmf-dist/tex/latex/xcolor/xcolor.sty Package: xcolor 2024/09/29 v3.02 LaTeX color extensions (UK) (/opt/texlive/2025/texmf-dist/tex/latex/graphics-cfg/color.cfg File: color.cfg 2016/01/02 v1.6 sample color configuration ) Package xcolor Info: Driver file: pdftex.def on input line 274. (/opt/texlive/2025/texmf-dist/tex/latex/graphics/mathcolor.ltx) Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1349. Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1353. Package xcolor Info: Model `RGB' extended on input line 1365. Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1367. Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1368. Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1369. Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1370. Package xcolor Info: Model `Gray' substituted by `gray' on input line 1371. Package xcolor Info: Model `wave' substituted by `hsb' on input line 1372. ) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex Package: pgfcore 2025-08-29 v3.1.11a (3.1.11a) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex (/opt/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex \pgfmath@dimen=\dimen163 \pgfmath@count=\count294 \pgfmath@box=\box54 \pgfmath@toks=\toks25 \pgfmath@stack@operand=\toks26 \pgfmath@stack@operation=\toks27 ) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code.tex) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code. tex) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonometr ic.code.tex) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code .tex) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.comparison. code.tex) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base.code.t ex) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code. tex) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.t ex) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integerarit hmetics.code.tex) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex \c@pgfmathroundto@lastzeros=\count295 )) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfint.code.tex) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex File: pgfcorepoints.code.tex 2025-08-29 v3.1.11a (3.1.11a) \pgf@picminx=\dimen164 \pgf@picmaxx=\dimen165 \pgf@picminy=\dimen166 \pgf@picmaxy=\dimen167 \pgf@pathminx=\dimen168 \pgf@pathmaxx=\dimen169 \pgf@pathminy=\dimen170 \pgf@pathmaxy=\dimen171 \pgf@xx=\dimen172 \pgf@xy=\dimen173 \pgf@yx=\dimen174 \pgf@yy=\dimen175 \pgf@zx=\dimen176 \pgf@zy=\dimen177 ) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.c ode.tex File: pgfcorepathconstruct.code.tex 2025-08-29 v3.1.11a (3.1.11a) \pgf@path@lastx=\dimen178 \pgf@path@lasty=\dimen179 ) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code. tex File: pgfcorepathusage.code.tex 2025-08-29 v3.1.11a (3.1.11a) \pgf@shorten@end@additional=\dimen180 \pgf@shorten@start@additional=\dimen181 ) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex File: pgfcorescopes.code.tex 2025-08-29 v3.1.11a (3.1.11a) \pgfpic=\box55 \pgf@hbox=\box56 \pgf@layerbox@main=\box57 \pgf@picture@serial@count=\count296 ) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.co de.tex File: pgfcoregraphicstate.code.tex 2025-08-29 v3.1.11a (3.1.11a) \pgflinewidth=\dimen182 ) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations .code.tex File: pgfcoretransformations.code.tex 2025-08-29 v3.1.11a (3.1.11a) \pgf@pt@x=\dimen183 \pgf@pt@y=\dimen184 \pgf@pt@temp=\dimen185 ) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex File: pgfcorequick.code.tex 2025-08-29 v3.1.11a (3.1.11a) ) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.te x File: pgfcoreobjects.code.tex 2025-08-29 v3.1.11a (3.1.11a) ) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing. code.tex File: pgfcorepathprocessing.code.tex 2025-08-29 v3.1.11a (3.1.11a) ) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex File: pgfcorearrows.code.tex 2025-08-29 v3.1.11a (3.1.11a) \pgfarrowsep=\dimen186 ) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex File: pgfcoreshade.code.tex 2025-08-29 v3.1.11a (3.1.11a) \pgf@max=\dimen187 \pgf@sys@shading@range@num=\count297 \pgf@shadingcount=\count298 ) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.te x File: pgfcoreimage.code.tex 2025-08-29 v3.1.11a (3.1.11a) ) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code.t ex File: pgfcoreexternal.code.tex 2025-08-29 v3.1.11a (3.1.11a) \pgfexternal@startupbox=\box58 ) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex File: pgfcorelayers.code.tex 2025-08-29 v3.1.11a (3.1.11a) ) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.co de.tex File: pgfcoretransparency.code.tex 2025-08-29 v3.1.11a (3.1.11a) ) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.t ex File: pgfcorepatterns.code.tex 2025-08-29 v3.1.11a (3.1.11a) ) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorerdf.code.tex File: pgfcorerdf.code.tex 2025-08-29 v3.1.11a (3.1.11a) ))) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code. tex File: pgfmoduleshapes.code.tex 2025-08-29 v3.1.11a (3.1.11a) \pgfnodeparttextbox=\box59 ) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex File: pgfmoduleplot.code.tex 2025-08-29 v3.1.11a (3.1.11a) ) (/opt/texlive/2025/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65. sty Package: pgfcomp-version-0-65 2025-08-29 v3.1.11a (3.1.11a) \pgf@nodesepstart=\dimen188 \pgf@nodesepend=\dimen189 ) (/opt/texlive/2025/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18. sty Package: pgfcomp-version-1-18 2025-08-29 v3.1.11a (3.1.11a) )) (/opt/texlive/2025/texmf-dist/tex/latex/pgf/utilities/pgffor.sty (/opt/texlive/2025/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty (/opt/texlive/2025/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex)) (/opt/texlive/2025/texmf-dist/tex/latex/pgf/math/pgfmath.sty (/opt/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex)) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex Package: pgffor 2025-08-29 v3.1.11a (3.1.11a) \pgffor@iter=\dimen190 \pgffor@skip=\dimen191 \pgffor@stack=\toks28 \pgffor@toks=\toks29 )) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex Package: tikz 2025-08-29 v3.1.11a (3.1.11a) (/opt/texlive/2025/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers. code.tex File: pgflibraryplothandlers.code.tex 2025-08-29 v3.1.11a (3.1.11a) \pgf@plot@mark@count=\count299 \pgfplotmarksize=\dimen192 ) \tikz@lastx=\dimen193 \tikz@lasty=\dimen194 \tikz@lastxsaved=\dimen195 \tikz@lastysaved=\dimen196 \tikz@lastmovetox=\dimen197 \tikz@lastmovetoy=\dimen198 \tikzleveldistance=\dimen199 \tikzsiblingdistance=\dimen256 \tikz@figbox=\box60 \tikz@figbox@bg=\box61 \tikz@tempbox=\box62 \tikz@tempbox@bg=\box63 \tikztreelevel=\count300 \tikznumberofchildren=\count301 \tikznumberofcurrentchild=\count302 \tikz@fig@count=\count303 (/opt/texlive/2025/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex File: pgfmodulematrix.code.tex 2025-08-29 v3.1.11a (3.1.11a) \pgfmatrixcurrentrow=\count304 \pgfmatrixcurrentcolumn=\count305 \pgf@matrix@numberofcolumns=\count306 ) \tikz@expandcount=\count307 (/opt/texlive/2025/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikz librarytopaths.code.tex File: tikzlibrarytopaths.code.tex 2025-08-29 v3.1.11a (3.1.11a) ))) > \__erw_dummy_tl=foo,bar,baz. <recently read> } l.17 \tl_show:N\__erw_dummy_tl % problematic (./debug-121.aux) \openout1 = `debug-121.aux'. LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 42. LaTeX Font Info: ... okay on input line 42. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 42. LaTeX Font Info: ... okay on input line 42. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 42. LaTeX Font Info: ... okay on input line 42. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 42. LaTeX Font Info: ... okay on input line 42. LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 42. LaTeX Font Info: ... okay on input line 42. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 42. LaTeX Font Info: ... okay on input line 42. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 42. LaTeX Font Info: ... okay on input line 42. (/opt/texlive/2025/texmf-dist/tex/context/base/mkii/supp-pdf.mkii [Loading MPS to PDF converter (version 2006.09.02).] \scratchcounter=\count308 \scratchdimen=\dimen257 \scratchbox=\box64 \nofMPsegments=\count309 \nofMParguments=\count310 \everyMPshowfont=\toks30 \MPscratchCnt=\count311 \MPscratchDim=\dimen258 \MPnumerator=\count312 \makeMPintoPDFobject=\count313 \everyMPtoPDFconversion=\toks31 ) (/opt/texlive/2025/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty Package: epstopdf-base 2020-01-24 v2.11 Base part for package epstopdf Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4 85. (/opt/texlive/2025/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv e )) [1 {/opt/texlive/2025/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] [2] (./debug-121.aux) *********** LaTeX2e <2025-06-01> patch level 1 L3 programming layer <2025-08-13> *********** ) Here is how much of TeX's memory you used: 12132 strings out of 467800 255454 string characters out of 5403754 728623 words of memory out of 5000000 40594 multiletter control sequences out of 15000+600000 626825 words of font info for 40 fonts, out of 8000000 for 9000 1141 hyphenation exceptions out of 8191 102i,5n,107p,461b,119s stack positions out of 10000i,1000n,20000p,200000b,200000s </opt/texlive/2025/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb> Output written on debug-121.pdf (2 pages, 24824 bytes). PDF statistics: 19 PDF objects out of 1000 (max. 8388607) 12 compressed objects within 1 object stream 0 named destinations out of 1000 (max. 500000) 13 words of extra memory for PDF output out of 10000 (max. 10000000) P.S. Dismiss the assumed workaround.

  • Problem with Charssil Font on Fedora
    by Richard Kimberly Heck on December 9, 2025 at 4:37 pm

    A journal with which I'm associated is considering moving to CharisSIL for the font. So I've been trying to experiment with it. This is for a maths journal, so we're using Greek and small caps and various other things. After installing various packages, I'm now getting the following error: kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 charssil-tlf-sc-ot1--base mktexpk: don't know how to create bitmap font for charssil-tlf-sc-ot1--base. mktexpk: perhaps charssil-tlf-sc-ot1--base is missing from the map file. The file charssil.map is installed, however, and charssil-tlf-sc-ot1--base is listed there. What to do? I have also done: > kpsewhich charssil.map /usr/share/texlive/texmf-dist/fonts/map/dvips/charissil/charssil.map and sudo updmap-sys enable=charssil.map None of that helped.

  • Parnote repeating itself inside tabularray package
    by Fr3d on December 9, 2025 at 12:50 pm

    Good afternoon, so I found about parnotes which work quite good, till I was in the search of a little annoyance in vertical lines in my table to look as booktabs. As suggested I tried the tabularraypackage because I had some issue with vertical clearance using the suggested nicematrix's {NiceTabular} environment. So when using \parnote{} insidea {tblr} environment, whether using the command cell{myNumberOfRows}{} = {}{} in the table preamble, or the given \SetCell[r=myNumberOfRows]{....} inside {tblr}, when I call \parnotes I get the note repeated as many times as specified by myNumberOfRows but with an increasing marking number, the same that was given in the table, as the last one is usually visible. \documentclass[a4paper, % svgnames, dvipsnames, % landscape, 9pt ]{article} %\usepackage{fontspec} \usepackage{ifthen} \usepackage[dvipsnames,table]{xcolor} % già presente in GRAPHICX?? \usepackage{graphicx} % Required for inserting images \usepackage{tikz} \usepackage{geometry}%[a4paper, total={27cm, 18cm}]{geometry} % invertiti per il fatto che è di LARGO \geometry{ %%impostiamo i margini personalizzati per il CV a4paper, left=6mm, right=6mm, top=4mm, bottom=4mm, } \usepackage{ragged2e} % toglie il rientro anglosassone di inizio paragrafo \usepackage{adjustbox} % \usepackage{lscape} \usepackage[small,compact]{titlesec} %% Small Compact => che fa?? \usepackage{amssymb} \usepackage{amsmath} \usepackage{mathtools} %\usepackage[printwatermark,%disablegeometry %]{xwatermark} %\usepackage{draftwatermark} %scive solo BOZZA, poche personalizzazioni => § XWATERMARK § %% Aggiunta Watermark in stampa \usepackage{xparse} %% Creare comandi %\usepackage{pgf} % \usepackage{tabulary} \usepackage{booktabs, tabularx} \usepackage{nicematrix} \usepackage{tabularray} \UseTblrLibrary{booktabs} %% necessario o non funziona \usepackage{varwidth} %% Should have helped the "Ä" teal problem in NiceTabular ENV \usepackage{dcolumn} \usepackage[]{mdframed} \usepackage{multirow} \usepackage{multicol} \setlength{\columnsep}{9.5mm} \usepackage{makecell} \usepackage{pbox} \usepackage[most]{tcolorbox} \usepackage{footnote} \usepackage{tablefootnote} \usepackage[stable]{footmisc} %% Footnote nei titoletti \usepackage[narrower, %% Margine supplementare, ~ in linea con la tabella notessf %% Stile in Sans Serif ]{parnotes} \usepackage{enumerate} % in quest'ordine altrimenti non trova i vari parsep \usepackage{enumitem} \usepackage{array} % OPZ ma richiesto per LOGIX.pkg \usepackage{hyperref} %% Dopo tablefootnote o causa problemi %\usepackage{fdsymbol} % simbolini speciali % tolto per errore con "math$ definition" \usepackage{pifont} % permette di avere i simbolini del bridge % \usepackage{arev} % permette di avere i simbolini del bridge \usepackage{fontspec} \usepackage{anyfontsize} %\usepackage{fontawesome} \usepackage{fontawesome5} %\usepackage{MnSymbol} % tolto per errore con "math$ definition" % \usepackage[dvipsnames]{xcolor} % già presente in GRAPHICX?? %%%%%%%%%%%%%%%%%%%%%%%%%%% %%%% Math cursive bold \usepackage{mathptmx}% http://ctan.org/pkg/mathptmx \DeclareMathAlphabet{\mathbfit}{T1}{lmr}{b}{it} %\usepackage{unicode-math} %\setmathfont{rm} %%%%%%%%%%%%%%%%%%%%%%%%%%% %% Simboli per il bridge \def\picche{\textcolor{blue}{\ding{171}}$\,$} \def\cuori{\textcolor{Red}{\ding{170}}$\,$} \def\quadri{\textcolor{YellowOrange}{\ding{169}}$\,$} \def\fiori{\textcolor{OliveGreen}{\ding{168}}$\,$} % \def\SA{\large \textbf{SA}} %\newif\ifAlert %\newif\ifColore \newcommand{\cParnote}[2][black]{% %% Numerino del PARNOTES colorato {\color{#1}\parnote{#2}}% } %% Comando per avere le licite del contratto. \newcommand\biddingBox[3][]{% \ifthenelse{\equal{#1}{}} %% Condizione %% True statement { \Biddingbox{\textbf{#2}$\,${\textbf{#3}}} } %% False statement { % \ifthenelse{\equal{#1}{Alert}}%% Condizione % %% True statement % { \BiddingboxAlert{\textbf{#2}$\,${\textbf{#3}}} % } % %% False statement % { % \Biddingbox{\textbf{#2}$\,${\textcolor{#3}{\scriptsize\faAsterisk$\!$}}} % } } } \newcommand{\PASS}{ \ContreBox[OliveGreen]{OliveGreen}{yellow}{\textcolor{white}{\textbf{\fontsize{8pt}{8.5pt}\selectfont PASS}}} } \NewDocumentCommand{\Livello}{ O{Fuchsia} }{ \textcolor{#1}{\scriptsize\faAsterisk$\!$} } \newtcbox{\Biddingbox}[1][white]{on line, arc=1.6pt, colback=white, colframe=black, % before upper={\rule[-3pt]{0pt}{10pt}}, boxrule=.55pt, %right skip=-3.35pt, left skip=-1.35pt, right skip=-.55ex, left skip=-.09ex, boxsep=0pt, left=1.49pt, right=1.49pt, top=1.25pt, bottom=1.25pt }%\hspace{-6em} \newtcbox{\BiddingboxAlert}[1][white]{on line, enhanced, nobeforeafter,%tcbox raise base, boxrule=0.55pt,%top=0mm,bottom=0mm, top=1.25pt, bottom=1.25pt, %left=1.49pt, right=1.49pt, %right=0mm, left=2.8mm, arc=1.6pt, right skip=-.95ex, left skip=-.39ex, boxsep=0pt,%before upper={\vphantom{dlg}}, colframe=blue,%coltext=green!25!black, %font=\bfseries, colback=white, overlay={\begin{tcbclipinterior} \fill[blue!95!OliveGreen!67!black] (frame.south west) rectangle node[text=white!82!black,font=\sffamily\bfseries\scriptsize,%rotate=90 ] {A} ([xshift=2.73mm]frame.north west);\end{tcbclipinterior} } } \newtcbox{\ContreBox}[3][red]{on line, arc=1.6pt, colback=#1, colframe=#2, % before upper={\rule[-3pt]{0pt}{10pt}}, boxrule=.55pt, boxsep=0pt, left=1.79pt, right=1.79pt, top=1.85pt, bottom=1.75pt } \newcommand{\NOBile}{\textcolor{blue}{\ding{171}}$\,$/ \textcolor{Red}{\ding{170}} } \newcommand{\MINore}{\textcolor{YellowOrange}{\ding{169}}$\,$/ \textcolor{Green-4}{\ding{168}} } \newcommand{\nobILE}{\textcolor{red}{\ding{170}}$\,$/\textcolor{blue}{\ding{171}} } \newcommand{\minORE}{\textcolor{Green-4}{\ding{168}}$\,$/ \textcolor{YellowOrange}{\ding{169}} } %% Visto \newcommand{\OKay}{\textcolor{ForestGreen}{\ding{52}}$\,$} %% Croce \newcommand{\NotOk}{\textcolor{red}{\ding{55}}$\,$} \begin{document} \thispagestyle{empty} % togliamo il numero di pagina \setmainfont{Arial} %\SetWatermarkText{BOZZA} %\SetWatermarkScale{1} %\DraftwatermarkOptions{stamp=true,color=red!35} %\newwatermark[allpages,color=red!35,angle=45,scale=7,xpos=0,ypos=0]{BOZZA} \begin{multicols*}{2} %\vspace{-2.3mm} \section*{Conta Punti Onore} %\vspace{-1.7mm} \begin{center} \fontsize{8pt}{9pt}\selectfont \setlength{\tabcolsep}{2.5pt} \begin{tabular}{l|l} \toprule Conta PO & Possibili aperture \\ \midrule $\bullet$ 6-10 PO& \biddingBox[]{2}{\quadri}, \biddingBox[]{2}{\cuori}, \biddingBox[]{2}{\picche} \\ $\bullet$ 12-19 PO & \biddingBox{1}{\Livello} (Livello 1)\\ % \hspace{2mm} $\smallblacktriangleright$ 15-17 PO & \SA{1} \\ \hspace{2mm} $\blacktriangleright$ 15-17 PO & \biddingBox[]{1}{SA} \\ $\bullet$ 20-21 PO & \biddingBox[]{2}{SA} \\ $\bullet$ 22-23 PO & \biddingBox[]{2}{\fiori}, \biddingBox[]{2}{\quadri}\\ \bottomrule \end{tabular} \end{center} %\vspace{-1.6mm} \subsection{Steyman} \label{sec:Steyman} %\vspace{-2.3mm} Per invitare una ricerca ai nobili per una possibile \emph{Manche}. %\vspace{-3.2mm} \begin{center} \fontsize{8pt}{9pt}\selectfont \setlength{\tabcolsep}{2.5pt} \begin{tabular}{r|rl|rl|rl} \toprule Apertore & \multicolumn{2}{c|}{Appoggio} & \multicolumn{2}{c|}{Apertore} & \multicolumn{2}{c}{Compagno} \\ \midrule \multirow{8.5}{*}{\biddingBox{1}{SA}} & \multirow{8.5}{*}{\biddingBox{2}{\fiori} \cParnote[magenta]{Ora mai è diventata d'uso comune, e non si allerta più}} & \multirow{8.5}{*}{\makecell[l]{ 8+ PO \\con $\mathbfit{4}^{\circ}$\cuori\\ o \emph{$\mathbfit{4}^{\circ}$}\picche o\\ entramabi}} & \biddingBox{2}{\quadri} & \makecell[l]{\textcolor{teal}{Ä} no \emph{$\mathbfit{4}^{\circ}$}\\ nobili} & \biddingBox{3}{SA} & \\ \cmidrule{4-7} & & & \biddingBox{2}{\cuori} & \makecell[l]{\textcolor{teal}{Ä} appoggio\\ \cuori \emph{$\mathbfit{4}^{\circ}$}} & \biddingBox{3}{SA} & \makecell[l]{\biddingBox{4}{\cuori} se ha \\appoggio \emph{$\mathbfit{5}^{\circ}$}} \\ \cmidrule{4-7} & & & \biddingBox{2}{\picche} & \makecell[l]{\textcolor{teal}{Ä} appoggio\\ \picche \emph{$\mathbfit{4}^{\circ}$}} & \biddingBox{3}{SA} & \makecell[l]{\biddingBox{4}{\picche} se ha \\appoggio \emph{$\mathbfit{5}^{\circ}$}} \\ \cmidrule{4-7} & & & \biddingBox{2}{SA} & \makecell[l]{\textcolor{teal}{Ä} entrambi \\Nobili \emph{$\mathbfit{4}^{\circ}$}} & \multicolumn{2}{c}{\makecell[l]{Nobile (\biddingBox{3}{\picche} / \biddingBox{3}{\cuori}) \\assente o debole}} \\ \bottomrule \end{tabular} \end{center} \renewcommand{\parnoteintercmd}{\\} %% Per averle una sotto l'latra il "a capo" ossia "\\" \renewcommand{\parnotevskip}{1pt} %% Per metterle più in alto \vspace{-3.1mm} %% Done to cram more explanation tables into the coloumn \parnotes %\vspace{-5.9mm} %%%%%%%%---------------------------------------------------- %% %% All the other Bidding convetions as well as the "Contre" explaination %% %%%%%%%%____________________________________________________ \begin{center} \fontsize{8pt}{10pt}\selectfont \setlength{\tabcolsep}{2.5pt} \begin{NiceTabular}{crlrlrl} % \CodeBefore % \columncolor{white!88!black}{1,4-5} % \Body \toprule Apertore & \Block{1-2}{Appoggio} & & \Block{1-2}{Apertore} & & \Block{1-2}{Campagno} & \\ \midrule \Block{8-1}{\biddingBox{1}{SA}} & \Block{8-1}{\biddingBox{2}{\fiori} \cParnote[magenta]{Essendo oramai d'uso comune, non necessita di un alert!}} & \Block[l]{8-1}{8+ PO\\ con $\mathbfit{4^{\circ}}$ \cuori\\ o $\mathbfit{4^{\circ}}$ \picche o\\entramabi} & \Block{2-1}{\biddingBox{2}{\quadri}} & \Block{2-1}{\textcolor{teal}{Ä} no $\mathbfit{4^{\circ}}$\\ nobili} & \Block{2-1}{\biddingBox{3}{SA}} & \\ & & & & & & \\ \cline{4-7} & & & \Block{2-1}{\biddingBox{2}{\cuori}} &\Block{2-1}{\textcolor{teal}{Ä} appoggio\\ \cuori $\mathbfit{4^{\circ}}$} & \Block{2-1}{\biddingBox{3}{SA}} & \Block{2-1}{\biddingBox{4}{\cuori} se ha \\appoggio \emph{$\mathbfit{5}^{\circ}$}}\\ & & & & & & \\ \cline{4-7} & & &\Block{2-1}{\biddingBox{2}{\picche}} & \Block{2-1}{\textcolor{teal}{Ä} appoggio\\ \picche $\mathbfit{4^{\circ}}$} & \Block{2-1}{\biddingBox{3}{SA}} & \Block{2-1}{\biddingBox{4}{\picche} se ha \\appoggio \emph{$\mathbfit{5}^{\circ}$}}\\ & & & & & & \\ \cline{4-7} & & & \Block{2-1}{\biddingBox{2}{SA}} & \Block{2-1}{\textcolor{teal}{Ä} entrambi\\ Nobili $\mathbfit{4^{\circ}}$} & \Block[l]{2-2}{Nobile (\biddingBox{3}{\cuori} / \biddingBox{3}{\picche}) \\ assente o debole} & \\ & & & & & & \\ \bottomrule % \CodeAfter % \begin{tikzpicture} [shorten > = 2pt, shorten < = 2pt] % \draw (1-|2) -- (2-|2) ; %prima separazione % \draw (2-|2) -- (last-|2) ; % first vertical %% \draw (1-|4) -- (2-|4) ; %% \draw (2-|4) -- (3-|4) ; %% \draw (3-|4) -- (4-|4) ; %% \draw (4-|4) -- (5-|4) ; %% \draw (5-|4) -- (6-|4) ; %% \draw (1-|6) -- (2-|6) ; %% \draw (2-|6) -- (3-|6) ; %% \draw (3-|6) -- (4-|6) ; %% \draw (4-|6) -- (5-|6) ; %% \draw (5-|6) -- (6-|6) ; % \draw (1-|4) -- (2-|4) ; % \draw (2-|4) -- (4-|4) ; % \draw (4-|4) -- (6-|4) ; % \draw (6-|4) -- (8-|4) ; % \draw (8-|4) -- (10-|4) ; % \draw (1-|6) -- (2-|6) ; % \draw (2-|6) -- (4-|6) ; % \draw (4-|6) -- (6-|6) ; % \draw (6-|6) -- (8-|6) ; % \draw (8-|6) -- (10-|6) ; % \end{tikzpicture} \end{NiceTabular} \end{center} \renewcommand{\parnotevskip}{1.5pt} %% Per metterle più in alto \vspace{-2.1mm} \parnotes \begin{center} \fontsize{8pt}{9pt}\selectfont \begin{tblr}{colspec = {r|rl|rl|rl}, rows = {m}, colsep = 2.5pt, cell{1}{2,4,6} = {c=2}{c}, cell{2}{1-3} = {r=4}{}, %cell{1}{2,4} = {c=2}{}, vline{4,6} = {abovepos = -1, belowpos = -1}, vline{2} = {1,2}{abovepos = -1}, vline{2} = {1,5}{belowpos = -1}, } \hline[1pt] Apertore & Appoggio & & Apertore & & Compagno & \\ \hline[0.5pt] \biddingBox{1}{SA} & \biddingBox{2}{\fiori} %% The colored mark to gets attention % \protect \cParnote[magenta]{Essendo oramai d'uso comune, non necessita di un alert!} % testing without the colored mark % \parnote{Essendo oramai d'uso comune, non necessita di un alert!} & {8+ PO \\con $\mathbfit{4}^{\circ}$\cuori\\ o \emph{$\mathbfit{4}^{\circ}$}\picche o\\ entramabi} & \biddingBox{2}{\quadri} & {No \emph{$\mathbfit{4}^{\circ}$} \\ nobili} & \biddingBox{3}{SA} & \\ \cline{3-7} & & & \biddingBox{2}{\cuori} & {appoggio\\ \cuori \emph{$\mathbfit{4}^{\circ}$}} & \biddingBox{3}{SA} & {\biddingBox{4}{\cuori}se ha \\ appoggio \cuori \emph{$\mathbfit{5}^{\circ}$}} \\ \cline{3-7} & & & \biddingBox{2}{\picche} & {appoggio\\ \picche \emph{$\mathbfit{4}^{\circ}$}} & \biddingBox{3}{SA} & {\biddingBox{4}{\picche} se ha \\ appoggio \picche \emph{$\mathbfit{5}^{\circ}$}} \\ \cline{3-7} & & & \biddingBox{2}{SA} & {entrambi\\ Nobili \emph{$\mathbfit{5}^{\circ}$} } & {\biddingBox{3}{\picche}/\\\biddingBox{3}{\cuori}} & {Nobile (\picche / \cuori)\\ assente o debole} \\ \hline[1pt] \end{tblr} \end{center} \renewcommand{\parnotevskip}{1.5pt} %% Per metterle più in alto \vspace{-2.1mm} \parnotes \end{multicols*} \end{document} So the result is: Are there any easy fixes? EDIT So tahnks to samcarter_is_at_topanswers.xyz, I added the corresponding code line, getting a singular parnote, yet the mark goes under the intended text, not after.... \newcommand{\cParnote}[2][black]{% %% Numerino del PARNOTES colorato {\IfBooleanF{\lTblrMeasuringBool}{\color{#1}\parnote{#2}}% }% } As you can see in the picture below

  • Strange output using AMSmath's \operatorname and fontsetup
    by msx on December 9, 2025 at 12:04 pm

    I have the following document \documentclass{article} \usepackage{fontsetup} \usepackage{amsmath} \newcommand{\coordRng}{\operatorname{\Gamma}} \begin{document} \(\coordRng (X)\) \(\Gamma\) \end{document} and when built by LuaLatex it has the following output: and I get the warning: Missing character: There is no 𝛤 (U+1D6E4) in font [NewCM10-Book.otf]:mode= Note that the Gamma that was supposed to be typeset by \coordRng is missing. Without the \operatorname command it typesets. If instead one does not use fontsetup, \coordRng also typesets fine.

  • What is the proper way to demonstrate tagged PDFs
    by Namal on December 9, 2025 at 9:03 am

    What is the best way to demonstrate a tagged PDF vs untagged. I don't mean a verification mark. I am looking for a, preferably Linux, screen reader that can read a tagged pdf and its formulas correctly.

  • LaTeX: How to set different geometry margins for different pages based on PDF background images?
    by John Stone on December 9, 2025 at 8:25 am

    I'm creating example papers in LaTeX with different PDF backgrounds for different pages, and demo PDFs are given as follows: First page: example-image-a.pdf Odd pages (except first): example-image-b.pdf Even pages: example-image-c.pdf I need to set different geometry margins for each page type to align text content properly with these backgrounds. Here's my minimal example: \documentclass{article} \usepackage{lipsum} \def\iExam{1} \newif\ifexam \ifnum\iExam=1 \examtrue \else \examfalse \fi % ===== background ===== \usepackage{pdfpages} \ifexam % with PDF background \AddToShipoutPictureBG{ \ifnum\value{page}=1 % first page \put(0,0){\includegraphics[width=\paperwidth,height=\paperheight]{example-image-a.pdf}} \else \ifodd\value{page} % odd page (except first page) \put(0,0){\includegraphics[width=\paperwidth,height=\paperheight]{example-image-b.pdf}} \else % even page \put(0,0){\includegraphics[width=\paperwidth,height=\paperheight]{example-image-c.pdf}} \fi \fi } \fi % ===== geometry ===== \usepackage{geometry} \ifexam % special definitions (with PDF background) \ifnum\value{page}=1 % first page \geometry{top=58mm,bottom=32mm,left=52mm,right=14mm,includeheadfoot} \else \ifodd\value{page} % odd page (except first page) \geometry{top=18mm,bottom=32mm,left=52mm,right=14mm,includeheadfoot} \else % even page \geometry{top=18mm,bottom=32mm,left=32mm,right=14mm,includeheadfoot} \fi \fi \else % ordinary definitions \geometry{top=1cm,bottom=1.5cm,left=1cm,right=1cm} \fi \begin{document} \section{earth} \lipsum[1-11] \section{universe} \lipsum[1-11] \end{document} Problem: The geometry settings are evaluated only once at document initialization (when \value{page}=1), so all pages get the first page's margins. The conditional logic based on \value{page} doesn't work as intended for subsequent pages. What I need: (just ignore the same parts e.g. bottom=32mm,right=14mm,includeheadfoot) Page 1: top=58mm, left=52mm Odd pages (3,5,...): top=18mm, left=52mm Even pages (2,4,6,...): top=18mm, left=32mm Constraints: I need a solution that works with \AddToShipoutPictureBG for background images Should handle multi-page documents with different margin requirements per page Ideally minimal and elegant (avoiding complex packages if possible) Must work in both XeLaTeX and PDFLaTeX What I've tried: Using \AtBeginShipout hooks (various packages like atbegshi, everypage) The background package with \AddEverypageHook Redefining \geometry inside the background placement logic None of these approaches have successfully changed margins per page. The main challenge seems to be that geometry settings are global, while I need per-page adjustments. Is there a way to dynamically change page margins based on the current page number, or to set different margins for odd/even pages when using different background images?

  • Checking the current page against the last page in a shipout hook
    by Erwann on December 9, 2025 at 5:30 am

    I meant to restrict the overlay to all but the last page, but this setup fails due to \zref@extractdefault{abspage}{abspage}{0} stuck at 0. Is there a solution to this specific issue, and a better approach altogether? \documentclass{article} \usepackage{lipsum} \usepackage{atbegshi} \usepackage{tikz} \usepackage{xcolor} \usepackage{zref-abspage} \usepackage{zref-lastpage} \makeatletter \ExplSyntaxOn \ProvideDocumentCommand{\OverlayTypeset}{ o m } { % \AtBeginShipout \AddToHook{shipout/background}{ \int_compare:nTF { \zref@extractdefault{abspage}{abspage}{0} < \zref@extractdefault{LastPage}{abspage}{0} } {% \int_show:n{\zref@extractdefault{abspage}{abspage}{0}} \int_show:n{\zref@extractdefault{LastPage}{abspage}{0}} \begin{tikzpicture}[remember~picture,overlay,text=red] \node[scale=6,opacity=0.5] at (current~page.center) {#2}; \end{tikzpicture} } { } } } \ExplSyntaxOff \makeatother \OverlayTypeset{DRAFT} \begin{document} \lipsum[1-10] \end{document} log: %[Loading MPS to PDF converter (version 2006.09.02).] %) (/opt/texlive/2025/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty %(/opt/texlive/2025/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg)) %> \zref@extractdefault {abspage}{abspage}{0}=0. %<recently read> } % %l.39 \end % {document} %? %> \zref@extractdefault {LastPage}{abspage}{0}=2. %<recently read> } % %l.39 \end % {document} %? %[1{/opt/texlive/2025/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] %> \zref@extractdefault {abspage}{abspage}{0}=0. %<recently read> } % %l.39 \end{document} % %? %> \zref@extractdefault {LastPage}{abspage}{0}=2. %<recently read> } % %l.39 \end{document} % %? %[2] (./debug-119.aux) )</opt/texlive/2025/texmf-dist/fonts/type1/public/amsfont %s/cm/cmr10.pfb> %Output written on debug-119.pdf (2 pages, 25603 bytes). %Transcript written on debug-119.log. %Latexmk: Getting log file 'debug-119.log' %Latexmk: Examining 'debug-119.fls' %Latexmk: Examining 'debug-119.log' %Latexmk: Log file says output to 'debug-119.pdf' %Latexmk: Using bibtex to make bibliography file(s). %Latexmk: Errors, so I did not complete making targets %Collected error summary (may duplicate other messages): % pdflatex: Command for 'pdflatex' gave return code 1 % Refer to 'debug-119.log' and/or above output for details % %Latexmk: Sometimes, the -f option can be used to get latexmk % to try to force complete processing. % But normally, you will need to correct the file(s) that caused the % error, and then rerun latexmk. % In some cases, it is best to clean out generated files before rerunning % latexmk after you've corrected the files.

  • How to customize the quote environment?
    by Cham on December 9, 2025 at 1:32 am

    I'm trying to customize the quote environment for a novel (citations at the beginning of each chapter), and I'm having troubles in setting custom vertical line spacing, horizontal line length, the left/right horizontal spacing (quote margins), and the space above and below the quotes. How can I add the following parameters to the squote macro defined in the code below? Also, take note that the epigraph macro will probably by erased because currently it's clashing with the centered chapter number. I need to control the quote's left and right margins (say 1 inch on both sides), or the left marging and line length. Also, I need to control the vertical line spacing inside the quotes (say constant one half spacing between each line or something else that would be elegant. Any expert suggestion on this, for small size text?). And the vertical space above and below the quote text should be adjusted for elegance with a constant spacing (I'll have to experiment to find the proper value. Any suggestion would be appreciated). I believe the vertical spacing between the chapter title and the quote is currently too large. And since I'm currently experimenting with the macros to find the best configuration and disposition, I may have to place the quotes on the right side of the page, below the chapter title, as what the epigraph is currently doing. All my previous experiments failed. Here's a MWE with my current settings to play with: \documentclass[11pt,twoside]{book} \usepackage[T1]{fontenc} \usepackage[tt=false]{libertinus} \usepackage[french]{babel} \usepackage[stretch=50]{microtype} \usepackage[letterpaper,left=1.25in,right=1in,top=0.5in,bottom=0.5in,includeheadfoot,headheight=15pt,showframe]{geometry} \raggedbottom %\onehalfspacing %\setstretch{1.25} \setlength{\parindent}{1.5em} \linespread{1.1} \usepackage{titlesec} \usepackage{graphicx} \usepackage[dvipsnames]{xcolor} \titleformat{\chapter}[display] {\normalfont\huge\bfseries\centering} {\chaptertitlename\ \thechapter}{20pt}{\Huge} \usepackage{epigraph} \renewcommand{\textflush}{flushleft} \setlength{\epigraphrule}{0pt} %\setlength{\epigraphwidth}{0.5\textwidth} \newcommand{\epig}[2]{\epigraphhead[60]{\epigraph{\itshape{#1}}{\itshape{#2}}}} % a macro that will probably be erased. % THIS MACRO TO BE EDITED AND ADJUSTED: \newenvironment{squote}{ \begin{quote}\itshape\small}{\end{quote}} \begin{document} \chapter{A Nice chapter title here} \epig{ Some very funny quote text from nobody, and here's another line of text just to make you smile, but really, this quote environment isn't satisfaying yet, because it's too close to the chapter title. }{} \begin{squote} This is one fancy line of text to show a pretty medium long quote line, \\ this is the next line quote text to say anything wildly funny. This is another useless text of line just to show how smart I'm not. \end{squote} Some dummy text to show the paragraph spacing below the quoted text above. Oh well, another line of dumb text, and yes maybe I should use the lorem ipsum package to add something wild in there. But nevermind, I don't need it! \end{document} Here's a preview of what this MWE is doing:

  • TexStudio: Is there a way to make autocomplete suggestions less rigid
    by Aditya Ghosh on December 9, 2025 at 12:46 am

    I switched to TexStudio from Overleaf recently. I do miss the autocomplete suggestions in Overleaf where you don't have to get the cases or even the order of the words in the label right for the autocomplete to suggest it. For example, if the label is "Def cusp aut form", I would like to have it suggested to me if I type in "def aut" or "Aut". Is there a way to configure TexStudio to do this? Or a plugin perhaps?

  • One colored structure combining amsart, amsthm, mdframed and thmtools
    by Sebastiano on December 8, 2025 at 9:02 pm

    I am working with the amsart class and I would like to define two new environments to create a sort of structured dialogue with que (question), ris (answer). I would have with this MWE: \documentclass[12pt]{amsart} \usepackage{amssymb} \usepackage[svgnames]{xcolor} \RequirePackage[framemethod=default]{mdframed} \usepackage{thmtools} \newmdenv[ skipabove=7pt, skipbelow=7pt, rightline=false, leftline=true, topline=false, bottomline=false, linecolor=Green, backgroundcolor=Green!10, innerleftmargin=5pt, innerrightmargin=5pt, innertopmargin=2pt, innerbottommargin=5pt, leftmargin=0cm, rightmargin=0cm, linewidth=2.5pt ]{rBox} \newmdenv[ skipabove=7pt, skipbelow=7pt, rightline=false, leftline=true, topline=false, bottomline=false, linecolor=blue, backgroundcolor=blue!10, innerleftmargin=5pt, innerrightmargin=5pt, innertopmargin=2pt, innerbottommargin=5pt, leftmargin=0cm, rightmargin=0cm, linewidth=2.5pt ]{bBox} \declaretheoremstyle[ headfont=\normalfont\sc, bodyfont=\normalfont, notefont=\normalfont, headpunct={.} ]{col} \declaretheorem[name=Quesito,style=col]{queT} \declaretheorem[name=Risposta,style=col]{risT} \newenvironment{que}{\begin{rBox}\begin{queT}}{\end{queT}\end{rBox}} \newenvironment{ris}{\begin{bBox}\begin{risT}}{\end{risT}\end{bBox}} \newtheorem{teor}{\sc Teorema} \newtheorem*{prop}{\sc Proposizione} \newtheorem{cor}{\sc Corollario} \newtheorem*{lemma}{\sc Lemma} \newtheorem*{blankit}{} \allowdisplaybreaks \pagenumbering{arabic} \theoremstyle{definition} \newtheorem{defin}{\sc Definizione} \newtheorem{definn}{Definizioni} \theoremstyle{remark} \newtheorem{Es}{\sc Esercizio} \newtheorem{Dm}[Es]{\sc Domanda} \newtheorem{esp}[Es]{\sc Esempio} \newtheorem{Prob}[Es]{\sc Problem} \begin{document} \begin{que} Il limite di una funzione a due variabili richiede che il valore della funzione si avvicini allo stesso numero lungo qualsiasi percorso che punti verso il punto considerato. Per questo, a differenza del caso a una variabile, è spesso necessario confrontare diversi cammini o usare stime per verificare l’unicità del limite. \end{que} \begin{ris} Il limite di una funzione a due variabili esiste solo se la funzione tende allo stesso valore lungo tutti i possibili percorsi che si avvicinano al punto. \end{ris} \begin{defin} srhreheh \end{defin} \end{document} normal text only for the enviroments que and ris; for other enviroments the default \emph of amsthm; here I have not for definition a emph-style. Also the same color of the lateral bar for the text (green/blue).

  • tikz-cd: Put brackets/parentheses around one column of diagram?
    by Peter LeFanu Lumsdaine on December 8, 2025 at 3:25 pm

    I would like to put parentheses around one column of a tikz-cd diagram — something like the diagram in the example below, but with the second set of parens around just the left-hand vertical of the square, not the whole square as currently. I would like the diagram otherwise roughly unchanged from how it is without the parentheses, but it’s fine if they slightly affect the alignment/spacing, so long as they don’t change the essential layout. MWE source \documentclass[a5paper]{article} \usepackage{tikz,tikz-cd} \usepackage{amssymb} \begin{document} \[ f^* \left( \begin{tikzcd}[baseline={([yshift=-axis_height]\tikzcdmatrixname)}] % vertical alignment adjusted as in https://tex.stackexchange.com/a/678935/ Z \ar[d,"g"] \\ X \end{tikzcd} \right) = \left( \begin{tikzcd}[baseline={([yshift=-axis_height]\tikzcdmatrixname)}] \bullet \ar[d] \ar[r] \ar[dr,phantom,"\lrcorner", very near start] & Z \ar[d,"g"] \\ Y \ar[r,"f"] & X \end{tikzcd} \right) \] \end{document} One approach I have tried, but did not get satisfactory: using various combinations of \phantom and \mathrlap around a copy of the diagram consisting of just the column in question, as in the following snippet. However, I couldn’t get the horizontal alignment reasonable with any arrangement I tried. \mathrlap{\left( { \begin{tikzcd}[baseline={([yshift=-axis_height]\tikzcdmatrixname)}] \bullet \phantom{\mathclap{Z}} \ar[d] \\ Y \end{tikzcd} } \right)} \left( \begin{tikzcd}[baseline={([yshift=-axis_height]\tikzcdmatrixname)}] \bullet \ar[d] \ar[r] \ar[dr,phantom,"\lrcorner", very near start] & Z \ar[d,"g"] \\ Y \ar[r,"f"] & X \end{tikzcd} \right)

  • How to avoid `\phantom{}` and empty groups in this array, while maintaining the same alignment?
    by tmc on December 8, 2025 at 2:44 pm

    I'm working on creating a specific two-column table in \LaTeX. The second column, $f(n)$, contains expressions that are linear combinations of $\alpha$, $\beta$, and $\gamma$, but not all terms are present in every row. My goal is to achieve a consistent column alignment for the coefficients of $\alpha$, $\beta$, and $\gamma$ across all rows, with consistent spacing around the $+$ signs. The terms $\alpha$, $\beta$, $\gamma$ themselves should also align. To achieve this alignment, I currently rely heavily on \phantom{} and empty {} groups, which feels overly complicated. I suspect there is a much cleaner, more idiomatic approach that I am missing. Since I'm not very proficient, could you please critique my current approach and suggest a more robust method to achieve this specific alignment? Here is my current code snippet: \documentclass{article} \begin{document} \[ \begin{array}{@{}c|c@{}} n & f(n) \\ \hline 1 & \phantom{0}\alpha\phantom{{}+0\beta+0\gamma} \\ \hline 2 & 2\alpha+\phantom{0}\beta\phantom{{}+0\gamma} \\ 3 & 2\alpha\phantom{{}+0\beta}+\phantom{0}\gamma \\ \hline 4 & 4\alpha+3\beta\phantom{{}+0\gamma} \\ 5 & 4\alpha+2\beta+\phantom{0}\gamma \\ 6 & 4\alpha+\phantom{0}\beta+2\gamma \\ 7 & 4\alpha\phantom{{}+0\beta}+3\gamma \\ \hline 8 & 8\alpha+7\beta\phantom{{}+0\gamma} \\ 9 & 8\alpha+6\beta+\phantom{0}\gamma \end{array} \] \end{document}

  • wrapfig introducing whitespace when next to text divided by sections
    by Skilopsaros on December 8, 2025 at 2:13 pm

    I'm trying to have text wrap around other text or a figure as is supposed to be done with wrapfigure. However I'm encountering an issue where there is a lot of whitespace under the wrapfig when the text that's supposed to wraping around it includes section/subsection/paragraph headers, enumerations, or lists, as is seen in the attached picture. This happens regardless of what's in the wrapfig, be in a boxed minipage, just text, or an image. I cannot figure out how to remove this whitespace. Is there some other package I should be using, or some way to fix this? This was crossposted in Stack Overflow. Link: stackoverflow.com/q/79840990/2777074 The code used to generate the image: \documentclass{article} \usepackage{graphicx} % Required for inserting images \usepackage{wrapfig} \usepackage{xcolor} \title{test} \begin{document} \section{TITLE} Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean eu hendrerit sem. Morbi eget elit et nunc hendrerit mattis. Fusce viverra eleifend nibh et varius. Phasellus pellentesque tellus et arcu dignissim tempor. Proin justo dui, blandit at nisi eget \begin{wrapfigure}{r}{0.4\textwidth} OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO \end{wrapfigure} Fusce dictum cursus tellus, sed aliquam leo pharetra vel. Nam consectetur ligula a sem fermentum lobortis. Nam lorem ipsum, tincidunt nec orci ut, lacinia malesuada mauris \subsection{The problem is splitting this up} Maecenas dictum a arcu eu viverra. Proin tellus dolor, pulvinar et finibus quis, dictum in dui. Fusce eleifend, ligula sit amet vestibulum congue, eros dui aliquam arcu \subsection{and if we split it even more we get issues} Maecenas dictum a arcu eu viverra. Proin tellus dolor, pulvinar et finibus quis, dictum in dui. Fusce eleifend, ligula sit amet vestibulum congue, eros dui aliquam arcu \subsection{MY SUBSECTION} Nunc ultrices orci a libero cursus pretium. Donec venenatis semper libero, nec tempus quam volutpat congue. Proin nunc risus, gravida non nisl non, suscipit gravida mi. Pellentesque \subsection{MY SUBSECTION AGAIN} Nam rhoncus, nibh sit amet bibendum vehicula, lorem magna pulvinar nisi, et tempor erat orci ut odio. Sed egestas eu ligula in porttitor. Aenean \subsection{MY SUBSECTION electric boogaloo} Nam rhoncus, nibh sit amet bibendum vehicula, lorem magna pulvinar nisi, et tempor erat orci ut odio. Sed egestas eu ligula in porttitor. Aenean \section{And here for the time it works} Pellentesque hendrerit sem et sem ullamcorper dapibus at at ex. \begin{wrapfigure}{r}{0.4\textwidth} OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO \end{wrapfigure} Etiam lacus mauris, cursus sed arcu sed, auctor varius ex. Vestibulum eget lorem felis. Etiam suscipit purus risus, sed congue nisl elementum ut. Donec aliquam, turpis eu laoreet convallis, neque sem dictum lacus, nec feugiat enim tellus at ante. Vestibulum eget ullamcorper eros. Donec sem mi, maximus sit amet iaculis quis, semper vitae lacus. Donec tincidunt rhoncus lorem, vel scelerisque massa suscipit et. Pellentesque hendrerit sem et sem ullamcorper dapibus at at ex. Etiam lacus mauris, cursus sed arcu sed, auctor varius ex. Vestibulum eget lorem felis. Etiam suscipit purus risus, sed congue nisl elementum ut. Donec aliquam, turpis eu laoreet convallis, neque sem dictum lacus, nec feugiat enim tellus at ante. Vestibulum eget ullamcorper eros. Donec sem mi, maximus sit amet iaculis quis, semper vitae lacus. Donec tincidunt rhoncus lorem, vel scelerisque massa suscipit et. Morbi diam turpis, pellentesque et eleifend in, auctor at magna. Nunc mollis tortor vitae mauris egestas luctus. Ut ultricies sed neque iaculis sagittis. Morbi odio dui, consectetur vitae ligula id, euismod lobortis ex. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Maecenas ornare mauris nisl, id condimentum ante consequat varius. Interdum et malesuada fames ac ante ipsum primis in faucibus. Etiam sagittis, libero eget blandit rhoncus, metus ipsum luctus tortor, eu pellentesque metus erat nec nisl. Vestibulum ut tellus blandit erat scelerisque accumsan vitae ullamcorper lacus. Curabitur vel semper nisi. Nulla facilisi. Pellentesque condimentum, magna vitae accumsan viverra, felis libero tempor ligula, et eleifend odio tortor ut massa. Etiam hendrerit eget lacus non consequat. In est lorem, scelerisque quis enim sed, dignissim sodales ex. In pretium hendrerit egestas. Quisque est eros, semper sollicitudin metus nec, mollis pharetra sem. Suspendisse et ex sit amet tellus bibendum fermentum rhoncus non ligula. Fusce eros lectus, sollicitudin non tortor accumsan, posuere iaculis nisi. Morbi eleifend dui et arcu ullamcorper, id eleifend dolor lobortis. Nunc egestas purus non elit facilisis dictum. In tristique suscipit nisi, quis rhoncus odio facilisis at. Nullam tincidunt porttitor justo quis sagittis. \end{document}

  • NewDocumentCommand with keyword arguments: how to prevent evaluation of keyword default values?
    by wmnorth on December 8, 2025 at 12:03 pm

    Consider the following MWE: \documentclass{article} \DeclareKeys [ myKeys ]{ a .store = \whereA, b .store = \whereB, } \SetKeys [ myKeys ] { a = AAA, b = \pageref{#2}, } \NewDocumentCommand{\abref}{O{} m}{% \SetKeys [ myKeys ] {#1}% \whereA\ and \whereB% } \begin{document} \section{Some topic} Ref the other page \abref{newpage} % does NOT work \vspace{2em} Ref the other page \abref[b = \pageref{newpage}]{newpage} % works \newpage foobar \label{newpage} \end{document} It produces the following output: The problem lies in the fact the default value for parameter b, viz. \pageref{#2}, gets evaluated too early.(*) I have a workaround for this: use a placeholder instead (<pnum> shall we say), and replace it inside the command definition (requires xstring): \IfSubStr{\whereB}{<pnum>}% {\StrSubstitute{\whereB}{<pnum>}{\pageref{#2}}}% But my question is if there is some way to prevent that early evaluation, thus making the workaround redundant. I have tried, e.g., \noexpand and some such incantations, but with no luck. Thank you in advance for your help. (*) In fact it produces the following warning: LaTeX Warning: Reference `##2' on page 1 undefined on input line 24.

  • How to distribute items (cards) evenly on a A4 page in Latex?
    by user32017992 on December 8, 2025 at 12:02 pm

    I need to print cards (bussiness for example) on both sides of A4 paper so they must match exactly.I was trying to do some calculations and search for hidden margin, but none of those worked. code: https://github.com/moravechynek/latex_cards \documentclass[a4paper,12pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[english]{babel} \usepackage{graphicx} \graphicspath{{graphics/}} \usepackage{tikz} \usepackage{geometry} \geometry{margin=0mm} \setlength{\parindent}{0pt} % Card size (mm) \newcommand{\cardW}{63.5} \newcommand{\cardH}{88.9} % Gaps (mm): 4 gaps for 3 cards \newcommand{\gapX}{4.875} % (210 - 3*63.5) / 4 \newcommand{\gapY}{7.575} % (297 - 3*88.9) / 4 % A4 dimensions \newcommand{\Awidth}{210} \newcommand{\Aheight}{297} % Padding inside card \newcommand{\pad}{3} % FRONT CARD TEMPLATE \newcommand{\CardFront}[2]{% \begin{tikzpicture}[x=1mm, y=1mm] \useasboundingbox (0,0) rectangle (\cardW,\cardH); \draw[rounded corners=2mm, line width=0.3mm] (\pad,\pad) rectangle (\cardW-\pad,\cardH-\pad); \node[anchor=north,font=\LARGE] at (\cardW/2, \cardH-\pad-15) {#1}; \end{tikzpicture} } % BACK CARD TEMPLATE \newcommand{\CardBack}[1]{% \begin{tikzpicture}[x=1mm, y=1mm] \useasboundingbox (0,0) rectangle (\cardW,\cardH); \draw[rounded corners=2mm, line width=0.3mm] (\pad,\pad) rectangle (\cardW-\pad,\cardH-\pad); \node[anchor=north,font=\normalsize] at (\cardW/2, \cardH/1.4-\pad) {#1}; \end{tikzpicture} } \def\CardEntries{ 4 000, 4 800, 6 000, 8 000, 10 000, 12 000, 24 000, 16 000, 20 000 } \begin{document} \thispagestyle{empty} % FRONT SIDE (9 CARDS) \begin{tikzpicture}[x=1mm,y=1mm] \foreach [count=\idx from 0] \tl/\price in \CardEntries { \pgfmathtruncatemacro{\row}{floor(\idx/3)} \pgfmathtruncatemacro{\col}{\idx - 3*\row} \pgfmathsetmacro{\cx}{\gapX*(\col+1) + \cardW*\col + \cardW/2} \pgfmathsetmacro{\cy}{\Aheight - (\gapY*(\row+1) + \cardH*\row + \cardH/2)} \node at (\cx,\cy) {\CardFront{\tl}{\price}}; } \end{tikzpicture} \newpage \thispagestyle{empty} % BACK SIDE (9 CARDS) \begin{tikzpicture}[x=1mm,y=1mm] \foreach [count=\idx from 0] \tl/\price in \CardEntries { \pgfmathtruncatemacro{\row}{floor(\idx/3)} \pgfmathtruncatemacro{\col}{\idx - 3*\row} \pgfmathsetmacro{\cx}{\gapX*(\col+1) + \cardW*\col + \cardW/2} \pgfmathsetmacro{\cy}{\Aheight - (\gapY*(\row+1) + \cardH*\row + \cardH/2)} \node at (\cx,\cy) {\CardBack{Back}}; } \end{tikzpicture} \end{document}

  • Boxed text + figure on the left
    by Jacopo Remondina on December 8, 2025 at 11:11 am

    I would like to have a framed box that contains some (justified) text and, on the side, a figure with its label and caption, something like this: I think/I read on other threads that some starting points may be the "wrapfigure" package, parbox(es) and/or minipages, but I cannot find an example where these features are used the way I want, and I cannot understand it by myself (tried the whole morning). Anyone has any idea? Thanks in advance, Jacorem EDIT: what I tried so far: wrap text around a figure inside a floating box In this case, the float is the whole box and the caption/label is given to it + the image is at the left of the text. I would like to give the caption to only the image and place it under the image itself. I think that one can adapt a little bit the code of this example, but since I do not want the whole box to be treated as a figure (as I said, I want the caption to be put under the figure, not somewhere else), I changed the figure environment to a minipage one, and I put the figure environment inside the sbox0 ==> compilation error cannot really understand how to use the \hangafter/\hangindent command to switch left and right I'm not sure that simple moving the caption in the \sbox0 may work Floating "Tip" box using wrapfigure No figure Making a boxed minipage environment No figure tried mixing this and several other possibilities (including creating a single cell table) starting with code-less suggestions found online, resulting in error or very bad layout (like text overlapping itself and/or the reduced textwith perduring in the whole section)

  • How to layout the two-side notes using Latex
    by xuehao on December 8, 2025 at 4:49 am

    The following is an example from an English book. I'm planning to rewrite it in latex. The layout is with an itemize of points in the middle, and with "CONNECTIONS" notes along the two sides. I tried to solve it using TikZ, but the vertical align is hard to control. \documentclass{article} \usepackage{graphicx} % Required for inserting images \usepackage{tikz} \begin{document} \begin{center} \begin{tikzpicture} \node[draw,text width=3.1cm] at (0cm,0) {CONNECTIONS Because \\ \vspace{\baselineskip} It \\ and \\ Though \\ Since ... not \\ only \\ but also \vspace{\baselineskip} }; \node[draw,text width=6.3cm] at (5.1cm,0) {\begin{center} POINTS \end{center} 1. Brazil needs to be developed. \\ 2. New city, Brasilia, built 600 miles, Rio. \\ 3. Designed Lucio Costa. \\ 4. Became capital 1960. \\ 5. Planned for modern living. \\ 6. People at first reluctant to go. \\ 7. 1960 - population increasing. \\ 8. Established as capital. }; \node[draw,text width=3.1cm] at (10.2cm,0) {CONNECTIONS \vspace{\baselineskip} which was built \\ and which \\ \vspace{\baselineskip} It \\ but \\ However, with the increase }; \end{tikzpicture} \end{center} \end{document} Anyone could give me any clever solution for this task?

  • Drawing a sphere and ellipsoid together
    by Knudsen on December 8, 2025 at 4:00 am

    I would like to draw a sphere, of radius 3, and an ellipsoid of semi-axis 2, 3 and 4 together. They intersect at two great circles on the sphere (marked in red). I started out with the sphere and the great circles: \documentclass[border=2mm]{standalone} \usepackage{tikz} \usetikzlibrary{3dtools}% https://github.com/marmotghost/tikz-3dtools \begin{document} \begin{tikzpicture}[3d/install view={phi=120,theta=70},line cap=butt, line join=round,declare function={R=3;},c/.style={circle,fill,inner sep=1pt}] \path (0,0,0) coordinate (O) ; \draw[blue,3d/screen coords] (O) circle[radius=R]; \shade[ball color=white,3d/screen coords,opacity=0.7] (O) circle[radius=R]; % \shade[ball color=blue!30,3d/screen coords,opacity=0.7,xscale=2,yscale=3,zscale=4] (O) circle[radius=1]; \path pic[blue]{3d/circle on sphere={R=R,C={(O)}}}; \path pic[red]{3d/circle on sphere={R=R, n={(0.592,0,-1)}}}; % plane x = sqrt{7/10) z \path pic[red]{3d/circle on sphere={R=R, n={(0.592,0,1)}}}; % plane x = sqrt{7/10) z \draw[3d/hidden] (0,0,0) -- (0,0,R) (O)--(R,0,0) (O)--(0,R,0) (O)--(0,-R,0); \draw[3d/visible, -stealth] (R,0,0) -- (R + 4,0,0) node[below]{$x$}; \draw[3d/visible, -stealth] (0,R,0) -- (0,R + 1,0) node[right]{$y$}; \draw[3d/visible, -stealth] (0,0,R) -- (0,0,R + 1.5) node[above]{$z$}; \end{tikzpicture} \end{document} and everything is right so far: but when I remove the comment on the line that I would expect to draw the ellipsoid \shade[ball color=blue!30,3d/screen coords,opacity=0.7,xscale=2,yscale=3,zscale=4] (O) circle[radius=1]; I get something that is far from what I expected, including the fact that the zscale is not understood. How can one add the intersecting elipsoide to this image?

  • How to add a mirror like shadow effect to a title?
    by Cham on December 8, 2025 at 12:44 am

    I would like to add a reversed gray shadow under a title to mimmic a mirror effect. How can we do that with standard pdflatex (the live tex distribution)? Currtently, the code below only add a dull projected shadow under the title. Is there a way to vertically reverse the shadow? Here's a MWE to edit and play with: \documentclass[11pt,twoside]{book} \usepackage[T1]{fontenc} \usepackage[tt=false]{libertinus} \usepackage[french]{babel} \usepackage[stretch=50]{microtype} \usepackage[letterpaper,left=1.25in,right=1in,top=0.5in,bottom=0.5in,includeheadfoot,headheight=15pt]{geometry} \usepackage[dvipsnames]{xcolor} \usepackage{shadowtext} \begin{document} \begin{titlepage} \shadowoffsetx{2.5pt} \shadowoffsety{3.5pt} \shadowcolor{gray!40} \centering \vspace*{\baselineskip} \vfill {\textcolor{black}{\fontsize{26}{0}\selectfont\sffamily\textbf{\shadowtext{DOCUMENT TITLE}}}} \\[2.5\baselineskip] \vfill {\textcolor{black}{\huge\sffamily Author}} \vfill \end{titlepage} Text \end{document}

  • Center a table in a list
    by mf67 on December 7, 2025 at 10:29 pm

    How do I get the table to respect the “new” left margin/indent in a list so it centres correctly, rather than the full-page text width? \documentclass[10pt]{book} \usepackage{booktabs} \usepackage{tabularx} \usepackage{floatrow} \usepackage[singlelinecheck=false]{caption} \usepackage{lipsum} \begin{document} \begin{enumerate} \item \lipsum[1][1-5] \begin{table}[H] \ttabbox {\caption{Grupp 2}} {\begin{tabularx}{0.7\textwidth}{XX} \toprule \multicolumn{2}{c}{Maschile} \\ Singolare -o & Plurale -i\\ \midrule ragazzo & ragazzi\\ giardino & giardini\\ \bottomrule \end{tabularx}} \end{table} \lipsum[1][1-5] \end{enumerate} \begin{table}[H] \ttabbox {\caption{Grupp 2}} {\begin{tabularx}{0.7\textwidth}{XX} \toprule \multicolumn{2}{c}{Maschile} \\ Singolare -o & Plurale -i\\ \midrule ragazzo & ragazzi\\ giardino & giardini\\ \bottomrule \end{tabularx}} \end{table} \end{document} As shown in the image, the first table in the list is centred within the margins of the whole page.

  • How to use OT3 encoding? Does it redefine existing macros?
    by Grzegorz Brzczyszczykiewicz on December 7, 2025 at 11:54 am

    Please help. OT3 is a very old encoding and I want to use it for stylistic reasons to make my document look old. EDIT: I figured out how, but I have a new question: does OT3 and \usepackage{ipa} redefine existing macros from other encodings?

  • How to draw cone with infinitely many extremal rays
    by Fradns on December 6, 2025 at 10:21 am

    Suppose we are working in the three-dimensional real vector space V. A cone is a subset C of V such that if an element v of V lies in C, then all of its nonnegative multiples also lie in C. I would like to draw, using TikZ, a cone that simulates infinitely many extremal rays, all accumulating toward a fixed one. A section of the cone should therefore look like a “polygon with infinitely many sides”. For example, the cone here Tikz: cones with a wide base is a circular one. I would like mine to be "polyhedral" away from the accumulation ray. How would you do that?

  • \ifthenelse and modulo
    by Raffaele Santoro on December 6, 2025 at 4:07 am

    I have a list of numbers from 1 to 12. I want to print the numbers 3,6,9 and 12 in purple, the others in blue. With my code: \documentclass{standalone} \usepackage{tikz,ifthen} \begin{document} \begin{tikzpicture} \foreach \i in {1,...,12}{ \ifthenelse {\i/3=int(\i/3)} {\draw[purple] (.75*\i,0) node () {\i};}{\draw[blue] (.75*\i,0) node () {\i};} } \end{tikzpicture} \end{document} I have errors and all numbers in blue. Why?