• expl3 e vs x function variants
    by karlh on April 20, 2026 at 8:06 pm

    In the LaTeX3 kernel documentation (interface3), it used to state, "The e specifier is in many respects identical to x, but with a very different implementation. Functions which feature an e-type argument may be expandable. The drawback is that e is extremely slow (often more than 200 times slower) in older engines, more precisely in non-LuaTeX engines older than 2019." I say "used to" because the current version changed the wording somewhat: "The e specifier is in many respects identical to x, but uses [the] \expanded primitive. [The] parameter character (usually #) in the argument need not be doubled. Functions which feature an e-type argument may be expandable." My question: other than the argument being allowed to be expandable in the e-form, is there a reason to prefer e over x or vice-versa, or do they do essentially the same thing? In particular, some functions (e.g., \iow_now:Nn) had x-variants in TeXLIVE 2023 but have e-variants now (the implication being that e is preferred, I would guess?), and I am wondering whether it makes any difference in terms of backward or forward compatibility of code I might write in the future.

  • Using `annotate-equations` library to annotate matrix row and column labels
    by Tianjian Qin on April 20, 2026 at 7:20 pm

    The annotate-equations library looks nice. I wanted to use the library to annotate matrix row and column labels, but it didn't work out. Below is a minimal standalone example where the first tikzpicture is simply the matrix with row and column labels. The second tikzpicture is my attempt to add annotations: \documentclass[tikz,border=6pt]{standalone} \usepackage{amsmath} \usepackage{tikz} \usepackage{annotate-equations} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \node[ anchor=center, inner sep=0pt, outer sep=0pt ] (nodematrix) at (0,0) {% {\scriptsize \renewcommand{\arraystretch}{0.88}% $\left[ \begin{array}{@{}c|ccc@{}} & \mathbf{X} & \mathbf{Y} & \mathbf{Z} \\ \mathbf{A} & 1 & 0 & 0 \\ \mathbf{B} & 0 & 1 & 0 \\ \mathbf{C} & 0 & 1 & 0 \\ \mathbf{D} & 0 & 1 & 1 \\ \mathbf{E} & 1 & 0 & 0 \\ \mathbf{F} & 0 & 0 & 1 \end{array} \right]$}% }; \end{tikzpicture} \begin{tikzpicture}[remember picture] \node[ anchor=center, inner sep=0pt, outer sep=0pt ] (nodematrix) at (0,0) {% {\scriptsize \renewcommand{\arraystretch}{0.88}% $\left[ \begin{array}{@{}c|ccc@{}} & \tikzmarknode{md-colX}{\mathbf{X}} & \tikzmarknode{md-colY}{\mathbf{Y}} & \tikzmarknode{md-colZ}{\mathbf{Z}} \\ \tikzmarknode{md-rowA}{\mathbf{A}} & 1 & 0 & 0 \\ \tikzmarknode{md-rowB}{\mathbf{B}} & 0 & 1 & 0 \\ \tikzmarknode{md-rowC}{\mathbf{C}} & 0 & 1 & 0 \\ \tikzmarknode{md-rowD}{\mathbf{D}} & 0 & 1 & 1 \\ \tikzmarknode{md-rowE}{\mathbf{E}} & 1 & 0 & 0 \\ \tikzmarknode{md-rowF}{\mathbf{F}} & 0 & 0 & 1 \end{array} \right]$}% }; \end{tikzpicture} \annotate[ xshift=-2.8em, yshift=-4.5ex ]{below}{md-rowF}{data nodes $V$} \annotate[ xshift=1.2em, yshift=1.0em ]{above}{md-colX,md-colY,md-colZ}{metadata nodes $U$} \end{document} Here is the compile pdf output: The original matrix: The annotated matrix (where I see two additional empty patches, and no annotation showed up): I cannot figure out what happened here.

  • Why my tikz draws a wrong diagram in snake lemma?
    by Nicolas Keng on April 20, 2026 at 1:43 pm

    I used q.uiver.app to draw tikz-cd diagrams. The package is \RequirePackage{tikz-cd} \usetikzlibrary{calc} \usetikzlibrary{decorations.pathmorphing} \tikzset{curve/.style={settings={#1},to path={(\tikztostart) .. controls ($(\tikztostart)!\pv{pos}!(\tikztotarget)!\pv{height}!270:(\tikztotarget)$) and ($(\tikztostart)!1-\pv{pos}!(\tikztotarget)!\pv{height}!270:(\tikztotarget)$) .. (\tikztotarget)\tikztonodes}}, settings/.code={\tikzset{quiver/.cd,#1} \def\pv##1{\pgfkeysvalueof{/tikz/quiver/##1}}}, quiver/.cd,pos/.initial=0.35,height/.initial=0} \tikzset{tail reversed/.code={\pgfsetarrowsstart{tikzcd to}}} \tikzset{2tail/.code={\pgfsetarrowsstart{Implies[reversed]}}} \tikzset{2tail reversed/.code={\pgfsetarrowsstart{Implies}}} \tikzset{no body/.style={/tikz/dash pattern=on 0 off 1mm}} but my code in Snake Lemma \documentclass{article} \usepackage{amsmath,quiver} \DeclareMathOperator\coker{coker} \begin{document} \[ \begin{tikzcd} & {\ker\alpha} & {\ker\beta} & {\ker\gamma} & \\ & A & B & C & 0 \\ 0 & {A'} & {B'} & {C'} \\ & {\coker\alpha} & {\coker\beta} & {\coker\gamma} \arrow[from=1-2, to=1-3] \arrow[from=1-2, to=2-2] \arrow[from=1-3, to=1-4] \arrow[from=1-3, to=2-3] \arrow[from=1-4, to=2-4] \arrow[from=2-2, to=2-3] \arrow[from=2-2, to=3-2] \arrow[from=2-3, to=2-4] \arrow[from=2-3, to=3-3] \arrow[from=2-4, to=2-5] \arrow[from=2-4, to=3-4, ""{coordinate, name=P1}] \arrow[from=3-1, to=3-2] \arrow[from=3-2, to=3-3] \arrow[from=3-2, to=4-2] \arrow[from=3-3, to=3-4] \arrow[from=3-3, to=4-3] \arrow[from=3-4, to=4-4] \arrow[from=4-2, to=4-3] \arrow[from=4-3, to=4-4] \arrow["\delta" description, dashed, from=1-4, to=4-2, crossing over, rounded corners, to path={(\tikztostart) -- ([xshift=2ex]\tikztostart.east) |- (P1) [midway]\tikztonodes -| ([xshift=-2ex]\tikztotarget.west) -- (\tikztotarget)}] \end{tikzcd} \] \end{document} draw a wrong picture, like this: How can I change the package or my LaTeX code to make my diagram correct?

  • Eforms signature field not working because of JavaScript
    by UniCoder1966 on April 20, 2026 at 11:29 am

    I'm creating a LaTeX pdf document that uses JavaScript and is supposed to be signable with a digital id. However, when I want to add the signature, I get the following warning: "This document contains embedded functions. [...] To ensure long-term compatibility, we recommend requesting a version without embedded actions from the document author." Once I add the signature, it warns me: "This document contains elements that may affect its appearance. Please review it before proceeding." Reviewing it tells me that "Rich Content" can't be surpressed and the error codes 1000, 1001, 1002, 1008, 1012, 1014 and 2013. I'm compiling with LuaLaTeX. MWE: \documentclass[ a4paper, fontsize=10pt headsepline=0.4pt ]{scrartcl} \usepackage[ unicode, colorlinks=true, pdfencoding=auto, pdftitle={PDF Document}, pdfauthor={User}, pdfpagemode=UseNone, pdfstartview=FitH, pagebackref, pdfhighlight={/N}, pdftoolbar=false, linkcolor=black ]{hyperref} \usepackage{eforms} \begin{document} \newcommand{\textfield}[5]{ \edef\Titel{#2} \TextField[name=#1, width=#3, charsize=10pt, height=1em, format = { var f = this.getField('#1'); f.textFont = 'ArialMT';}, #4]{}#5 } \newcommand{\textfieldnew}[5]{% \edef\Titel{#2}% \TextField[name=#1, width=#3, charsize=10pt, height=1em, format = { var f = this.getField('#1'); f.textFont = 'ArialMT';}, #4]{}% #5% } \textfieldnew{GER}{}{7.5cm}{default={German}, onblur={this.getField('EN').value = event.value;}}{} \textfieldnew{EN}{}{7.5cm}{default={English}, onblur={this.getField('GER').value = event.value;}}{} \sigField{Signature1}{7.5cm}{1.2cm} \end{document}

  • Natbib and beamer suddenly producing erroneous citations
    by noob on April 20, 2026 at 11:13 am

    EDIT 24 April 2026, 5:49 pm CEST I am using beamer with natbib, but all the sudden, references are not displayed correctly anymore. I have used both toghether for a long time and never had this particluar problem. (It also does not seem to be the same problem as this one, as no error message appears in the log.) Here is the minimal working example: \documentclass{beamer} \usepackage{natbib} \begin{document} Test \citep{rudin}. \bibliographystyle{apalike} \bibliography{SCP} \end{document} The result is this: Here is the bib-file: @article{rudin, title={Stop explaining black box machine learning models for high stakes decisions and use interpretable models instead}, author={Rudin, Cynthia}, journal={Nature Machine Intelligence}, volume={1}, number={5}, pages={206--215}, year={2019} } If I compile without natbib and use the '\cite'-command instead, the output is correct: If I then switch back to natbib and \citep, I get the following: Here is the blg-file: This is BibTeX, Version 0.99e Capacity: max_strings=200000, hash_size=200000, hash_prime=170003 The top-level auxiliary file: test.aux Reallocating 'name_of_file' (item size: 1) to 8 items. The style file: apalike.bst Reallocating 'name_of_file' (item size: 1) to 5 items. Database file #1: test.bib You've used 1 entry, 1935 wiz_defined-function locations, 477 strings with 3831 characters, and the built_in function-call counts, 380 in all, are: = -- 38 > -- 7 < -- 1 + -- 2 - -- 2 * -- 31 := -- 69 add.period$ -- 3 call.type$ -- 1 change.case$ -- 6 chr.to.int$ -- 1 cite$ -- 1 duplicate$ -- 14 empty$ -- 31 format.name$ -- 3 if$ -- 72 int.to.chr$ -- 1 int.to.str$ -- 0 missing$ -- 1 newline$ -- 8 num.names$ -- 3 pop$ -- 3 preamble$ -- 1 purify$ -- 6 quote$ -- 0 skip$ -- 12 stack$ -- 0 substring$ -- 37 swap$ -- 1 text.length$ -- 0 text.prefix$ -- 0 top$ -- 0 type$ -- 6 warning$ -- 0 while$ -- 4 width$ -- 0 write$ -- 15 aux-file: \relax \providecommand\hyper@newdestlabel[2]{} \providecommand*\HyPL@Entry[1]{} \citation{rudin} \bibstyle{apalike} \bibdata{SCP} \bibcite{rudin}{{1}{2019}{{Rudin}}{{}}} \HyPL@Entry{0<</S/D>>} \@writefile{nav}{\headcommand {\beamer@sectionpages {1}{0}}} \@writefile{nav}{\headcommand {\beamer@subsectionpages {1}{0}}} \@writefile{nav}{\headcommand {\sectionentry {1}{\translate {References}}{1}{\translate {References}}{0}}} \@writefile{nav}{\headcommand {\beamer@partpages {1}{1}}} \@writefile{nav}{\headcommand {\beamer@subsectionpages {1}{1}}} \@writefile{nav}{\headcommand {\beamer@sectionpages {1}{1}}} \@writefile{nav}{\headcommand {\beamer@documentpages {1}}} \@writefile{nav}{\headcommand {\gdef \inserttotalframenumber {0}}} \gdef \@abspage@last{1} bbl-file: \begin{thebibliography}{} \bibitem[Rudin, 2019]{rudin} Rudin, C. (2019). \newblock Stop explaining black box machine learning models for high stakes decisions and use interpretable models instead. \newblock {\em Nature Machine Intelligence}, 1(5):206--215. \end{thebibliography} Any thoughts? Many thanks in advance!

  • Longtable interprets internal cell linebreaks as new rows in csvsimple and datatool
    by JamesI on April 20, 2026 at 10:37 am

    In both csvsimple and datatool, any longtable environment with a cell that contains linebreaks (within the cell) seems to treat those line breaks as an indicator of a new row. An MWE is below \documentclass[12pt]{report} \usepackage{csvsimple} \usepackage{array} % Required for p{} columns \usepackage{tabularx} % Optional: for auto-width columns \usepackage{booktabs} % better tables \usepackage{longtable} % tables breaking across pages \usepackage{filecontents} \begin{filecontents*}{test.csv} heading,data Thing1,"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur? At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat." Thing2,"Lorem ipsum dolor" \end{filecontents*} \begin{document} \csvreader[ longtable=p{3cm} p{9cm}, late after line=\\, before reading={\catcode`"=9} %remove double-quotes ]{test.csv}{1=\heading,2=\data}{\heading & \data} \end{document} If the text is short everything works, if the text is long with linebreaks, rows and columns get messed up. I've tried putting the cell in a \parbox, using tabularx 'X' instread or array's p{}, and plain columns. Nothing seems to stop this behaviour.

  • Guitar chord, free string wrong alignment
    by Phantom on April 20, 2026 at 7:23 am

    I'm writing a piece of music for guitar on which I add chord schemas. The problem is that the 'x' and 'o' to indicate if a string as to be played free or not are not well aligned, they all smashed at the left. Here is a MWE: \documentclass{report} \usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm]{geometry} \usepackage{musixtex} \usepackage{musixguit} \begin{document} \begin{music}% \instrumentnumber{2}% \nobarnumbers% \setclef20% % \setlines16\setclefsymbol1\tabclef% % \raiseguitar{20}% % \interinstrument=2\internote% % \startextract% \notes% \tab53\tab42\tab30\tab21\tab10&% \guitar{Do~M}{}x--o-o\gdot23\gdot32\gdot51% \qu{cegjl}\en% \endextract% \end{music} \end{document} The compilation command: xelatex test.tex && musixflx test.mx1 && xelatex test.tex && rm test.mx2 Here is the result: As we can see, at the top there is xoo , while it should be x o o. How can I make it well aligned?

  • Vertical spacing in moderncv
    by Akira on April 20, 2026 at 6:35 am

    I have a tex file \PassOptionsToPackage{expansion=false}{microtype} \documentclass[11pt,a4paper,sans]{moderncv} \usepackage{csquotes} \moderncvcolor{blue} \moderncvstyle{classic} \usepackage[scale=0.75]{geometry} \setlength{\footskip}{136.00005pt} \ifxetexorluatex \usepackage{fontspec} \usepackage{unicode-math} \defaultfontfeatures{Ligatures=TeX} \setmainfont{Latin Modern Roman} \setsansfont{Latin Modern Sans} \setmonofont{Latin Modern Mono} \setmathfont{Latin Modern Math} \else \usepackage[T1]{fontenc} \usepackage{lmodern} \fi \usepackage[english]{babel} \name{abc}{LE} \email{abc@gmail.com} \usepackage{ragged2e} \begin{document} \recipient{Company A}{} \date{\today} \opening{Madame, Monsieur} \closing{Cordialement,} \makelettertitle \justifying \setlength{\parskip}{1em} Job seekers frequently send a cover letter along with their curriculum vitae or applications for employment as a way of introducing themselves to potential employers and explaining their suitability for the desired positions.[2] It is a pitch describing one's interest in the position, skills and relevant experience for the advertised job. Employers may look for individualized and thoughtfully written cover letters as one method of screening out applicants who are not sufficiently interested in their positions and/or lack the necessary basic skills. Students are often asked to submit a cover letter for an internship application. Such cover letters should include examples of extracurricular and academic experiences. Despite this specific information, cover letters for internships should have a standard business letter format. \makeletterclosing \end{document} Above, I use \setlength{\parskip}{1em} to increase vertical space between paragraphs. How to make the vertical spaces 1 and 2 1em? They are the spaces controlled by \opening{Madame, Monsieur} \closing{Cordialement,} Thank you for your elaboration.

  • Problem in using \noalign with enumerate from enumitem package
    by S. Venkataraman on April 20, 2026 at 2:22 am

    There is alignment problem with enumerate environment from enumitem package if I use \begin{align*}..\end{align*} and use \noalign. Here is a mwe: \documentclass{article} \usepackage{amsmath} \usepackage{enumitem} \newcommand{\Z}{\mathbf{Z}} \begin{document} \begin{enumerate} \item Definition of strong pseudoprime:\\ Let $n$ be an odd composite number and $b \in (\Z /n\Z)^*$. Write $n-1 = 2^st$ where $t$ is odd. If $b$ and $n$ satisfy the condition that either \begin{align*} b^t &\equiv 1 \bmod n, \\ \noalign{or there exists $r$, $0 \leq r <s$, such that} b^{2^rt}&\equiv -1 \bmod n, \end{align*} then $n$ is called a \emph{strong pseudoprime to the base $b$}. \end{enumerate} \end{document} As one can see in the output, the text within \noalign is not properly aligned.

  • Is it possible to make \tl_if_eq:nnTF expandable?
    by MiguelFrasson on April 19, 2026 at 11:45 pm

    From interface3.pdf \tl_if_eq:NNTF is expandable (note: NN); \str_if_eq:nnTF is expandable but \tl_if_eq:nnTF isn't (note: nn); \if_charcode:w and \if_catcode:w are expandable. Could it be done an implementation for \tl_if_eq:nnTF that would be expandable? I couldn't provide a MWE. With seqs, there is \seq_map_pairwise_function:NNN but there is no equivalent to token lists, so both charcode and catcode could be compared. I see that there is a difficulty with \tl_item:Nn: \ExplSyntaxOn \edef\bbb{ \tl_item:nn { a{b}c } { 2 } } \show\bbb % log: \bbb=macro: ->b. so the { is now shown with \tl_item:Nn as I naively would suppose it returns. I realized that I don't know enough about token lists. If one could map through the token list and output the catcodes as one token (like hexadecimal code for the catcode) this "catcode-string" could be compared. I don't know how to do that.

  • historical texlive server down [closed]
    by user2609605 on April 19, 2026 at 11:44 pm

    I used https://ftp.math.utah.edu/pub/tex/historic/systems/texlive for a long time to download above all historical versions of texlive. But this server does not respond any more. It is very hard to find an alternative. I don't trust a Chinese server. I know that on https://tug.org/historic/ several servers are listed but this list seems quite outdated. Maybe someone knows more what happens or has some contact?!?

  • Document metadata with PDF/A4-f
    by wsmith on April 19, 2026 at 9:17 pm

    I have noticed that if I set up my \DocumentMetadata according to the PDF/A-4f standard and fill some of the entries using hyperref, the resulting PDF shows nothing in the document info whenever I inspect it using any one of my PDF readers (viz, Skim, Preview, and Zathura). Despite this, this metadata can be seen if I run, for instance, exiftool on the resulting PDF. I also notice that this is not the case when I set it to use only the UA-2 standard-- my PDF readers all detect this info as-expected in this case. I figure this has something to do with how this data is encoded that I do not quite understand. Here is a short example: % !TeX program = lualatex \DocumentMetadata{ uncompress, lang=en, pdfstandard=UA-2, pdfstandard=A-4f } \documentclass[12pt]{report} \usepackage{hyperref} \hypersetup{ pdftitle={An example}, pdfauthor={John Doe}, pdfsubject={Nonsense}, pdfcopyright={Copyright (C) John Doe}, pdfpubtype={Thesis}, pdflang={en}, pdfmetalang={en}, } \begin{document} abc \end{document} If I try to "Get Info" in Skim, for instance: If I comment out the pdfstandard=A-4f, I get the (desired?) output:

  • how to keep all installed packages in local repo?
    by abgup on April 19, 2026 at 7:57 pm

    I use multiple computers and was wondering if there was a way to keep all the installed packages in the local repo and reference those? Basically how python uses package managers, like venv, pipenv, poetry, uv, etc I saw some discussion about using texmf in a local folder, but those discussions date 15 years back and unsure if thats the best approach (obviously deploying a docker system is another option but would love to avoid that!)

  • Is italic correction used in text mode with OpenType fonts?
    by Antonis on April 19, 2026 at 6:42 pm

    Some characters in NewCM have italic correction in the text fonts. This forces fontforge to emit a MATH table. I was informed that unicode TeX engines do not use italic correction in text mode so I have to remove this information, and with this the MATH table too. But if I write f| and f\/| the output is not the same. So what is true? I am confused. \begin{document} \usepackage{fontsetup} \begin{document} X\textsubscript{2} \textit{X}\textsubscript{2} \textit{X\nocorr}\textsubscript{2} f| f\/| \end{document}

  • add a grid background only inside a tabular column
    by Christopher Madec on April 19, 2026 at 5:19 pm

    I am trying to create a worksheet layout in LaTeX where one column of a table contains a writing area with a grid (like squared paper), while the other column contains several questions (Here is an example with just one question). \documentclass{article} \usepackage{array} \usepackage{xcolor} \usepackage{geometry} % \usepackage{arydshln} \usepackage{lipsum} \geometry{a4paper, left=0.35in, right=-0.1in, top=0.6in, bottom=0.4in} \definecolor{burgundy}{HTML}{8B2252} \usepackage{scrlayer-scrpage} \usepackage{tikz} \newcommand*\Circled[1]{\tikz[baseline=(char.base)]{\textcolor{burgundy}{\node[shape=circle,draw,inner sep=2pt] (char) {#1};}}} \usepackage{tikzducks} \usetikzlibrary{calc} \newcommand{\pageframe}{% \begin{tikzpicture}[remember picture, overlay] \fill [burgundy!80!white] (current page.north west) rectangle (current page.south east); \fill [white, rounded corners=1cm] ($(current page.north west)+(0.5cm,-1cm)$) rectangle ($(current page.south east)+(-0.5cm,1cm)$); \node [align=center] at ($(current page.north)+(0,-0.6cm)$) {$\color{white}\mathrm{Chapitre \ 2 - Diffusion \ thermique}$}; \node [align=center] at ($(current page.south)+(0,1.9cm)$) {\centering\begin{tikzpicture}[scale=0.5] \shuffleducks \duck[\randomhead,\randomaccessories, /tikz/nodes={scale/.evaluated={\value{page}>99?0.4:0.6},font=\bfseries}, signpost=\scalebox{1.6}{ \parbox{6cm}{\hspace{-0.4em}\color{black} \centering\thepage}}, signback =white] \end{tikzpicture}}; %%% Background grid \draw[step=5mm, gray!30, very thin] ($(current page.north west)+(7cm,-1.5cm)$) grid ($(current page.south east)+(-1cm,5cm)$); \end{tikzpicture} } \cehead[\pageframe]{\pageframe} \cohead[\pageframe]{\pageframe} \pagestyle{scrheadings} % Another try \usepackage{makecell} \newcommand{\gridcell}[1][4cm]{% \begin{tikzpicture} \draw[step=5mm, gray!40, very thin] (0,-0.2) grid (\linewidth, #1); \end{tikzpicture}% } \begin{document} \renewcommand{\arraystretch}{6} \begin{tabular}{>{\centering\raggedright}m{0.25\textwidth}||>{\centering\arraybackslash}m{0.60\textwidth}} \Circled{1} \'Enoncer le théorème de Green-Ostrograski & \\ \hline \end{tabular} \end{document} Goal I would like the second column of the table to contain a grid background (like graph paper) so that students can write their answers. I want to find the best way to create a grid (squared background) that is confined to a specific table column, and that does not overflow outside the table. What I tried so far Using a page-wide background grid, but it overflows outside the table and does not align with the table structure \draw[step=5mm, gray!30, very thin] ($(current page.north west)+(7cm,-1.5cm)$) grid ($(current page.south east)+(-1cm,5cm)$); \end{tikzpicture} The code looks like this: Drawing a grid with TikZ inside a cell → does not scale correctly with row height \newcommand{\gridcell}[1][4cm]{% \begin{tikzpicture} \draw[step=5mm, gray!40, very thin] (0,-0.2) grid (\linewidth, #1); \end{tikzpicture}% }

  • TikZ nodes within a scope are not projected
    by Tianjian Qin on April 19, 2026 at 4:55 pm

    I'm trying to draw a 3D panel, within each panel there are dashed panel frame, some circles, lines connecting the circles, text, and maybe other objects. I tried to draw all these within a scope, then apply a projection so that all of these drawings can be 3D-rotated, but this trick only works on the panel frame, not properly on the other objects, see the screenshot: And here is the standalone tex code: \documentclass[tikz,border=6pt]{standalone} \usepackage{xcolor} \usetikzlibrary{arrows.meta,calc} % Example colors \definecolor{Accent}{RGB}{60,90,150} \definecolor{PersistCol}{RGB}{70,130,90} \definecolor{ReactCol}{RGB}{180,110,60} \definecolor{NewCol}{RGB}{180,70,80} \begin{document} \begin{tikzpicture}[ font=\small, >=Latex, side layer projection/.style={x={(0.46cm,0.25cm)}, y={(0cm,0.75cm)}}, frame/.style={ draw=black!78, dashed, line width=.72pt, dash pattern=on 5pt off 4pt, line cap=round }, v/.style={ circle, draw=gray!55, fill=gray!22, minimum size=4pt, inner sep=0pt }, pe/.style={draw=PersistCol, line width=1.0pt}, re/.style={draw=ReactCol, line width=1.0pt}, ne/.style={draw=NewCol, line width=1.0pt} ] \def\P{1.10} \newcommand{\PlaneFrame}{% \draw[frame] (-\P,-\P)--(\P,-\P)--(\P,\P)--(-\P,\P)--cycle; } \newcommand{\PlaneLabel}[1]{% \path (-.86,-\P)--(.86,-\P) node[midway, below=2pt, sloped, transform shape, font=\scriptsize] {#1}; } \newcommand{\PoolNodes}{% \node[v] (a) at (-.75,.55) {}; \node[v] (b) at (-.10,.88) {}; \node[v] (c) at (.68,.42) {}; \node[v] (d) at (-.70,-.55) {}; \node[v] (e) at (.65,-.55) {}; } % One projected layer only \begin{scope}[side layer projection] \PlaneFrame \PlaneLabel{selected \(E_t^\star\)} \PoolNodes \draw[pe] (a)--(b); \draw[re] (d)--(e); \draw[ne] (c)--(e); \end{scope} \end{tikzpicture} \end{document} What I did wrong here? UPDATE: Just tried to add \usetikzlibrary{3d} and use something like \begin{scope}[canvas is zy plane at x=0, every node/.style={transform shape}]. This only solve the issue in text and circles, not the edges (straight lines):

  • IEEE Access: Adding an ORCID ID icon [duplicate]
    by Amina Umar on April 19, 2026 at 4:31 pm

    I am trying to add an ORCID ID icon just after authors' name in a manuscript intended for the IEEE Access journal, using the orcidlink package. However, this package seems to mess with everything right after import. To reproduce: \documentclass{ieeeaccess} \usepackage{cite} \usepackage{amsmath,amssymb,amsfonts} \usepackage{algorithmic} \usepackage{graphicx} \usepackage{textcomp} \usepackage{orcidlink} \def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}} \begin{document} \history{Date of publication xxxx 00, 0000, date of current version xxxx 00, 0000.} \doi{10.1109/ACCESS.2017.DOI} \title{Preparation of Papers for IEEE ACCESS} \author{\uppercase{First A. Author}\authorrefmark{1}, \IEEEmembership{Fellow, IEEE}, \uppercase{Second B. Author\authorrefmark{2}, and Third C. Author, Jr}.\authorrefmark{3}, \IEEEmembership{Member, IEEE}} \address[1]{National Institute PQR)} \address[2]{Department of ABD)} \address[3]{XYSZ} \tfootnote{This paragraph of the first footnote will contain support information, including sponsor and financial support acknowledgment. For example, ``This work was supported in part by the U.S. Department of Commerce under Grant BS123456.''} \markboth {Author \headeretal: Preparation of Papers for IEEE TRANSACTIONS and JOURNALS} {Author \headeretal: Preparation of Papers for IEEE TRANSACTIONS and JOURNALS} \corresp{Corresponding author: First A. Author (e-mail: author@ boulder.nist.gov).} \begin{abstract} \end{abstract} \begin{keywords} \end{keywords} \titlepgskip=-15pt \maketitle \section{Introduction} \label{sec:introduction} \PARstart{T}{his} document is a template for \LaTeX. If you are reading a paper or PDF version of this document, please download the electronic file, trans\_jour.tex, from the IEEE Web site. \section{Conclusion} A conclusion section is not required. \subsection{References} \EOD \end{document} Even the title disappeared. When \usepackage{orcidlink} is commented out, everything works fine. How do I safely add ORCID ID to the authors name?

  • Arrow tips look wrong at the end of a plot
    by Muhannad Al Ayoubi on April 19, 2026 at 4:31 pm

    I have a weird problem with arrow heads at the end of plots, where they look wrong, as you can see in the picture (look below left; the line seems to exceed the arrow tip). Removing colour or changing thickness did not solve the problem. Interestingly, making the arrow longer does fix the issue, but is not a plausible fix. Also increasing the scale seems to hide the issue, but I would not like to do that, as diagrams would get too big. This issue does not appear with the longer parabola or the blue line which I drew normally. Here is an MWE. \documentclass[10pt]{book} \usepackage{tikz} \usetikzlibrary{arrows.meta} % Tikz libraries \tikzset{>={Stealth}} \begin{document} \begin{tikzpicture}[scale=0.4] \draw[->, thick, red, domain=-1:3.5, variable=\t, smooth, samples=75] plot ({\t,2-0.5*\t*\t}); \draw[<-, thick, red, domain=-2:-0.5, variable=\t, smooth, samples=75] plot (2*\t,\t-1); \draw[draw=red, fill=white] (-1,-1.5) circle (4pt); \draw[thick, blue,<->] (0,-3) -- (1,-2); \draw[red, fill] (-1,1.5) circle (4pt); \end{tikzpicture} \end{document} Any idea what is going wrong? And how to fix it? Zoomed in picture on the issue:

  • How do I properly space this quantified expression?
    by Jasper on April 19, 2026 at 8:08 am

    I want to learn to typeset logical statements properly. Specifically, I am interested in horizontal spacing. These symbols look way too close together. Also, are there potentially better symbols I could be using? I know it took me years before I learned \lvert. \documentclass[letterpaper]{book} \usepackage{microtype} \usepackage{mathtools} \usepackage{unicode-math} \begin{document} How do I horizontally space this properly? \[ \forall\varepsilon>0 \exists n\in\mathbb{N} \mid \frac{1}{n}<\varepsilon \] \end{document}

  • How can I use fonttable to typeset a table for the T5 encoding using the vietnam package and still use ể afterwards?
    by cfr on April 19, 2026 at 7:58 am

    This is a copy of the second version of Grzegorz Brzęczyszczykiewicz's question, which is quite different from the first. The first already had an answer. The second is a response to that answer. I cannot answer there without making a mess, so I am asking here in order to keep things tidy. Everything below this line is copied verbatim. My custom T5 font (VIETNAMESE language) doesn't work the tone diacritic for hook (dấu hỏi) does not render properly, it shows up as "F" It only renders correctly when I force it with \char. Even if I try \h{e} etc. it still gives me the letter "F" How do I make it work correctly? I don't want to litter the LaTeX code UPDATE: Even in a normal font it doesn't work \documentclass{article} \usepackage[T5, T1]{fontenc} \usepackage[utf8]{vietnam} \usepackage{fonttable} \font\dict=dict at 10pt \font\dictv=dictv at 10pt \newcommand{\writefont}[4]{{% \fontsize{10pt}{10pt}\usefont{#1}{#2}{#3}{#4}\selectfont \newcount\myloopcount \myloopcount=0 \loop \char\the\myloopcount\space\ \advance\myloopcount by 1 \ifnum\myloopcount<256 \repeat }} \newcommand{\fleafonttable}[4] { {\dict Font: {#2}\{#3\}\{#4\} (encoding: {#1})} \xfonttable{#1}{#2}{#3}{#4} } \newcommand{\vietnamesefonttable}[4] { {\dict Font: {#2}\{#3\}\{#4\} (encoding: {#1})} \xfonttable{#1}{#2}{#3}{#4} } \begin{document} \fleafonttable{T1}{dict}{m}{n} \fleafonttable{T1}{dict}{m}{it} \vietnamesefonttable{T5}{dictv}{m}{n} \writefont{T1}{dict}{m}{n} \writefont{T1}{dict}{m}{it} \writefont{T5}{dictv}{m}{n} Bà Ba béo bán bánh bò, bán bòn bon, bán bong bóng, bên bờ biển, bả bị bộ binh bắt ba bốn bận. \dictv Bà Ba béo bán bánh bò, bán bòn bon, bán bong bóng, bên bờ biển, bả bị bộ binh bắt ba bốn bận. \end{document} Funnily enough, it works without the tables \documentclass{article} \usepackage[T5, T1]{fontenc} \usepackage[utf8]{vietnam} \usepackage{fonttable} \font\dict=dict at 10pt \font\dictv=dictv at 10pt \begin{document} Bà Ba béo bán bánh bò, bán bòn bon, bán bong bóng, bên bờ biển, bả bị bộ binh bắt ba bốn bận. \dictv Bà Ba béo bán bánh bò, bán bòn bon, bán bong bóng, bên bờ biển, bả bị bộ binh bắt ba bốn bận. \end{document} returns this: I want it to work with the font table as well. Is there a way or... am I stuck "ỏrever"?

  • Writing in Hindi while using ArsClassica
    by SCTU on April 19, 2026 at 5:38 am

    I am using ArsClassica for writing a document. The document will be all in English, except that I need to include a Hindi poem in the document. I used Polyglossia but it doesn't work with pdfTeX. If I use XeTeX instead of pdfTeX, I can now write in Hindi, but my section headings, etc., which were in Iwona font, change to normal font. I want to have both text in Hindi and headings in Iwona font. How can I do that? Before including Polyglossia: documentclass[a4paper,openright,titlepage,headinclude,footinclude,BCOR5mm,numbers=noenddot, tablecaptionabove]{scrreprt} \usepackage{amsmath,amsfonts,amsthm} \usepackage{subfig} \usepackage[eulerchapternumbers,subfig,beramono,eulermath,pdfspacing]{classicthesis} \usepackage{arsclassica} \usepackage{shapepar} \begin{document} \begin{titlepage} \begin{center} xxxxxxx \end{center} \end{titlepage} \tableofcontents \chapter{Naive Set Theory} \section{Sets} \section{Relations} \section{Functions} \begin{itemize} \item My name is bad. \end{itemize} \chapter{A Poem} \end{document} After including Polyglossia: \documentclass[a4paper,openright,titlepage,headinclude,footinclude,BCOR5mm,numbers=noenddot, tablecaptionabove]{scrreprt} \usepackage{amsmath,amsfonts,amsthm} \usepackage{fontspec} \usepackage{verse} \usepackage{subfig} \usepackage[eulerchapternumbers,subfig,beramono,eulermath,pdfspacing]{classicthesis} \usepackage{arsclassica} \usepackage{shapepar} \usepackage{polyglossia} \setmainlanguage{english} \setotherlanguage{hindi} \newfontfamily\hindifont{Noto Sans Devanagari} \begin{document} \begin{titlepage} \begin{center} xxxxxxx \end{center} \end{titlepage} \tableofcontents \chapter{Naive Set Theory} \section{Sets} \section{Relations} \section{Functions} \begin{itemize} \item This is an item. \end{itemize} \chapter{A Poem} \begin{hindi} \begin{verse} पुल पार करने से\\ पुल पार होता है\\ \end{verse} \end{hindi} \end{document}

  • Box alignment issue
    by Erwann on April 19, 2026 at 3:14 am

    This is an attempt at LaTeX3-fying this solution addressing a margin-note issue. It fails to align the baselines (the box seems titled down). Any suggestion to remedy this? \documentclass{article} \usepackage[showframe]{geometry} \usepackage{lipsum} \ExplSyntaxOn \cs_new_protected:Nn \erw_content_width_set:n { \dim_set:Nn \hsize { #1 } } \cs_new_protected:Nn \erw_parbox_top:Nnn { \vbox_set_top:Nn #1 { \erw_content_width_set:n { #2 } #3 } } \ExplSyntaxOff \begin{document} \ExplSyntaxOn \erw_parbox_top:Nnn \l_tmpa_box { 1in } { \begin{flushleft} \lipsum[1][1] \end{flushleft} } % \box_frame:Nnn\l_tmpa_box{1pt}{1pt} % \smash-like \box_set_ht:Nn \l_tmpa_box { 0pt } \box_set_dp:Nn \l_tmpa_box { 0pt } \box_move_left:nn{ 1in } {% \box_use:N\l_tmpa_box } \lipsum[2][1-4] \ExplSyntaxOff \end{document} Subsidiary question: optionally frame the box. Addendum: \def\@iiparbox#1[#2]{% \@ifnextchar[%] {\@iiiparbox{#1}{#2}}% {\@iiiparbox{#1}{#2}[#1]}} \long\def\@iiiparbox#1#2[#3]#4#5{% \leavevmode \@pboxswfalse \setlength\@tempdima{#4}% width \@begin@tempboxa\vbox{% \hsize\@tempdima \@parboxrestore #5\@@par }% \ifx\relax#2\else \setlength\@tempdimb{#2}% \edef\@parboxto{to\the\@tempdimb}% \fi \if#1b\vbox \else\if#1t\vtop \else\ifmmode\vcenter \else\@pboxswtrue $\vcenter \fi\fi\fi \@parboxto{% \let\hss\vss \let\unhbox\unvbox \expandafter\ifx\csname bm@#3\endcsname\relax \bm@c \@latex@warning{Unexpected alignment #3}% \else \csname bm@#3\endcsname \fi }% }

  • Letter "F" in Vietnamese [closed]
    by Grzegorz Brzęczyszczykiewicz on April 18, 2026 at 10:05 pm

    My custom T5 font (VIETNAMESE language) doesn't work the tone diacritic for hook (dấu hỏi) does not render properly, it shows up as "F" It only renders correctly when I force it with \char. Even if I try \h{e} etc. it still gives me the letter "F" How do I make it work correctly? I don't want to litter the LaTeX code UPDATE: Even in a normal font it doesn't work \documentclass{article} \usepackage[T5, T1]{fontenc} \usepackage[utf8]{vietnam} \usepackage{fonttable} \font\dict=dict at 10pt \font\dictv=dictv at 10pt \newcommand{\writefont}[4]{{% \fontsize{10pt}{10pt}\usefont{#1}{#2}{#3}{#4}\selectfont \newcount\myloopcount \myloopcount=0 \loop \char\the\myloopcount\space\ \advance\myloopcount by 1 \ifnum\myloopcount<256 \repeat }} \newcommand{\fleafonttable}[4] { {\dict Font: {#2}\{#3\}\{#4\} (encoding: {#1})} \xfonttable{#1}{#2}{#3}{#4} } \newcommand{\vietnamesefonttable}[4] { {\dict Font: {#2}\{#3\}\{#4\} (encoding: {#1})} \xfonttable{#1}{#2}{#3}{#4} } \begin{document} \fleafonttable{T1}{dict}{m}{n} \fleafonttable{T1}{dict}{m}{it} \vietnamesefonttable{T5}{dictv}{m}{n} \writefont{T1}{dict}{m}{n} \writefont{T1}{dict}{m}{it} \writefont{T5}{dictv}{m}{n} Bà Ba béo bán bánh bò, bán bòn bon, bán bong bóng, bên bờ biển, bả bị bộ binh bắt ba bốn bận. \dictv Bà Ba béo bán bánh bò, bán bòn bon, bán bong bóng, bên bờ biển, bả bị bộ binh bắt ba bốn bận. \end{document} Funnily enough, it works without the tables \documentclass{article} \usepackage[T5, T1]{fontenc} \usepackage[utf8]{vietnam} \usepackage{fonttable} \font\dict=dict at 10pt \font\dictv=dictv at 10pt \begin{document} Bà Ba béo bán bánh bò, bán bòn bon, bán bong bóng, bên bờ biển, bả bị bộ binh bắt ba bốn bận. \dictv Bà Ba béo bán bánh bò, bán bòn bon, bán bong bóng, bên bờ biển, bả bị bộ binh bắt ba bốn bận. \end{document} returns this: I want it to work with the font table as well. Is there a way or... am I stuck "ỏrever"?

  • Why does `\robotoslab\fontseries{...}\selectfont` not work in LuaLaTeX?
    by Roel on April 18, 2026 at 8:37 pm

    I would like to use the light and normal/medium variant of Roboto Slab from the package roboto. Compiling with pdfLaTeX this works as expected: \documentclass{minimal} \usepackage{roboto} \begin{document} \robotoslab \fontseries{n}\selectfont Roboto Slab normal \fontseries{l}\selectfont Roboto Slab light \end{document} However, compiling the same with LuaLaTeX I only get the normal/medium variant instead: The light variant is available in LuaLaTeX; when I use the option \usepackage[light]{roboto}, I get only light: Looking at the package code I thought \usepackage[type1]{roboto} would work (this looks like it would use the pdfLaTeX functionality, even when using LuaLaTeX), but instead I don't get Roboto Slab at all: So how can I switch between these fonts when I use LuaLaTeX? Adding \fontencoding{T1} as suggested here does not seem to change a thing...

  • Eyelet character in LaTeX
    by Grzegorz Brzęczyszczykiewicz on April 18, 2026 at 5:16 pm

    How do I write the eyelet character (T1 code 24) in LaTeX? Is there a dedicated command or is \char24 the only option? If there is no dedicated command, I am using \char24 and it works but if the font isn't T1 it spits out a different mark as \char is a generic command and does not look at encoding. If you don't know what this character is, it's used after % to make ‰ and ‱. Here is this character in my own font I designed using METAFONT: and here it is in the T1 version of Computer Modern The question is: is there a dedicated command, or is \char24 all there is?

  • providing a mathchancery alphabet
    by Antonis on April 18, 2026 at 4:48 pm

    unicode-math provides for two calligraphic sets. These are \mathcal/\symcal and \mathscr/\symscr. By default they produce the same output but one can separate them using something like \setmathfont[rang={\mathscr,\mathbfscr},StylisticSet=1]{NewCM10-Regular.otf} Then \mathscr will give different results than \mathcal. Unicode supports three variants accessed with Variation Selectors U+FE00 and U+FE01. The former switches to chancery and the latter to roundhand. However, TeX engines do not support Variation Selectors. So it seems proper to introduce a third alphabet variant called for example \mathchancery or \symchancery. NewComputerModern will provide three calligraphic alphabets in next release after restoring Knuthian Calligraphics as default (mathcal). The Euler style calligraphic is now the chancery variant and the roundhand remains as \mathscr. My question is if it is easy to introduce this extra \mathchancery alphabet with newcomputermodern.sty until unicode-math incorporates such an addition, and how to do it?

  • Make dynamical solutions for a problem sheet
    by Rassine Orange on April 18, 2026 at 1:09 pm

    I am writing a problem sheet for my students (I'm a math teacher) and I would like a way for my code to compute dynamically the solutions: The numerical variables are stored in a \def, so then I can change them anytime and the solution are automatically adapted. I need a way to create a "dynamical list" to print the solution at the end of the document. For example, the questions would be something like this \begin{enumerate} \def\a{5} \def\b{3} \edef\MYsum{\fpeval{a+b}} \edef\MYproduct{\fpeval{a*b}} \item Compute the sum $a+b$. %What to write here to store the answer "somewhere"? \item Compute the product $ab$. %What to write here to store the answer "somewhere"? \end{enumerate} %Here goes other questions, some text, etc. %And here, at the very end, I want the solutions: %The command below should print something like \MYsum ; \MYproduct %It will display, in my example, 8 ; 15 but if then I change the values of \a and \b, the results are also modified. \printthesolutiosn

  • Composing two pages with an upside down part [closed]
    by Colas on April 18, 2026 at 12:54 pm

    I am typesetting a worksheet in landscape A4, two columns, where each spread (two pages) contains: several exercises (\begin{enonce}) occupying at least two columns (possibly spilling onto the next page), and their solutions (\begin{solution}) occupying at most two columns, printed upside down at the bottom of the page so that the reader must flip the sheet to read it. See the diagram below for the intended layout. The document must support several such spreads in sequence. Constraints The total content of one spread never exceeds two landscape pages. I take responsibility for avoiding overlap between the exercise and the solution; the code does not need to handle it automatically. What the code must guarantee is that the solution columns are exactly superimposed on the exercise columns (same \textwidth, same \columnsep, same horizontal offsets). Question What is the cleanest way to make this pattern repeatable for an arbitrary number of spreads, while keeping the column alignment guarantee? I am open to approaches based on atbegshi, everypage, pgfpages, scrlayer, or anything else that fits. Remarks Here is what my document looks like so far, without having handled this "upside down" feature. I have dealt with columning with multicol.

  • How to construct the "double dotted"-framed box?
    by Explorer on April 18, 2026 at 3:04 am

    What I tried to replicate is something as below: Noted that the double-dotted is aligned as the red line denoted, and the "rotated box" is NOT what I want(just because the image I get rotated itself), I just want something the same as \dashbox or \doublebox, the normal horizonal box. The post here, I think, just want to focus the dots alignment. Now I have the following code: \documentclass{article} \usepackage[most]{tcolorbox} \usepackage{tikz} \usepackage{lipsum} \usepackage{dashbox} \usepackage{fancybox} % https://tex.stackexchange.com/a/101263/322482 \makeatletter \tikzset{ dot diameter/.store in=\dot@diameter, dot diameter=3pt, dot spacing/.store in=\dot@spacing, dot spacing=10pt, dots/.style={ line width=\dot@diameter, line cap=round, dash pattern=on 0pt off \dot@spacing }, } \tcbset{ doubledotted/.style={ empty, sharp corners, frame engine=path, frame empty, frame code={ \draw[dots](frame.south west) rectangle (frame.north east); \draw[dots]([xshift=-\dot@spacing,yshift=-\dot@spacing]frame.south west) rectangle ([xshift=\dot@spacing,yshift=\dot@spacing]frame.north east); }, } } \makeatother \begin{document} AAA \qquad\tcbox[doubledotted,nobeforeafter,box align=center]{This is a tcolorbox.}\qquad BBB \vspace{1cm} \begin{tcolorbox}[doubledotted] \lipsum[2] \end{tcolorbox} \bigskip \fbox{This is a framebox.} \dashbox{This is a dashed framebox.} \doublebox{This is a doublebox.} \end{document} which gives: The disturbing point is that the dotted in a \path is hard to control the alignment precisely. I have to cliam that, I think that would be two different approach to achieved this: One with tcolorbox and tikz Another with some "plain" approaches for example dashedbox and fancybox: fancybox.sty: % fancybox.sty % Line 143 \def\doublebox{\VerbBox\@doublebox} \def\@doublebox#1{% \begingroup \setbox\@fancybox\hbox{{#1}}% \fboxrule=.75\fboxrule \setbox\@fancybox\hbox{\fbox{\box\@fancybox}}% \fboxrule=2\fboxrule \fboxsep=\fboxrule \advance\fboxsep .5pt \fbox{\box\@fancybox}% \endgroup} dashbox.sty: %% %% This is file `dashbox.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% dashbox.dtx (with options: `package') %% Dashed and layered boxes. %% %% File `dashbox.dtx'. %% Copyright (C) 1997-2001 Reuben Thomas (rrt@sc3d.org) %% This file is distributed under the LaTeX Project Public License, %% and comes with no warranty. %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{dashbox} [2001/12/11 v1.14 Dashed and layered boxes] \RequirePackage{calc} \RequirePackage{ifthen} \newlength{\dashlength} \setlength{\dashlength}{6pt} \newlength{\dashdash} \setlength{\dashdash}{3pt} \newlength{\layersize} \setlength{\layersize}{\dashdash} \newcommand{\hd@shrule}[1]{% \hbox to #1% {\vrule height \fboxrule width \dashdash% \cleaders\hbox to \dashlength% {\hfill\rule{\dashdash}{\fboxrule}\hfill}\hfill% \ifthenelse{\lengthtest{#1 > 2\dashdash}}% {\vrule height \fboxrule width \dashdash}{}% }} \newcommand{\vd@shrule}[1]{% \vbox to #1% {\hrule height \dashdash width \fboxrule% \cleaders\vbox to \dashlength% {\vfill\rule{\fboxrule}{\dashdash}\vfill}\vfill% \ifthenelse{\lengthtest{#1 > 2\dashdash}}% {\hrule height \dashdash width \fboxrule}{}% }} \newsavebox{\d@shedsavebox} \newlength{\d@shedboxwidth} \newlength{\d@shedboxtotalheight} \newcommand{\m@kedashbox}{% \setlength{\d@shedboxtotalheight}% {\dp\d@shedsavebox+\ht\d@shedsavebox+\fboxsep*2+\fboxrule*2}% \raisebox{-\fboxrule-\fboxsep-\dp\d@shedsavebox}{% \parbox[b]{\d@shedboxwidth}{% \offinterlineskip% \parskip=0pt% \hd@shrule{\d@shedboxwidth}% \kern-\fboxrule% \par% \parbox{\fboxrule}{\vd@shrule{\d@shedboxtotalheight}}% \kern\fboxsep% \parbox{\wd\d@shedsavebox}% {\vspace{\fboxsep}\usebox{\d@shedsavebox}\vspace{\fboxsep}}% \kern\fboxsep% \parbox{\fboxrule}{\vd@shrule{\d@shedboxtotalheight}}% \par% \kern-\fboxrule% \hd@shrule{\d@shedboxwidth}}% }} \newcommand{\dbox}[1]{% \sbox{\d@shedsavebox}{#1}% \setlength{\d@shedboxwidth}{\wd\d@shedsavebox+\fboxsep*2+\fboxrule*2}% \m@kedashbox} \def\dashbox{\@ifnextchar[\@dashbox\dbox} \def\@dashbox[#1]{\@ifnextchar[{\@idashbox[#1]}{\@idashbox[#1][c]}} \long\def\@idashbox[#1][#2]#3% {\setlength{\d@shedboxwidth}{#1}% \savebox{\d@shedsavebox}[#1-\fboxsep*2-\fboxrule*2][#2]{#3}% \m@kedashbox} \newsavebox{\l@yersavebox} \newlength{\l@yerwidth} \newlength{\l@yerboxwidth} \newlength{\l@yertotalheight} \newlength{\l@yerlineheight} \newlength{\l@yervoffset} \newcommand{\m@kelayer}[1]{% \setlength{\l@yertotalheight}% {\dp\l@yersavebox+\ht\l@yersavebox+\layersize-#1\layersize}% \setlength{\l@yerlineheight}% {\ht\l@yersavebox-#1\layersize-\fboxrule}% \setlength{\l@yervoffset}% {-\layersize-\dp\l@yersavebox}% \setlength{\l@yerboxwidth}% {\wd\l@yersavebox+\layersize-#1\layersize}% \parbox{\l@yerwidth}{% \offinterlineskip% \parskip=0pt% \usebox{\l@yersavebox}% \rule[\l@yerlineheight]{\layersize}{\fboxrule}% \kern-\fboxrule% \rule[\l@yervoffset]{\fboxrule}{\l@yertotalheight}% \kern-\wd\l@yersavebox\kern-\layersize\kern#1\layersize \rule[\l@yervoffset]{\fboxrule}{\layersize}% \kern-\fboxrule \rule[\l@yervoffset]{\l@yerboxwidth}{\fboxrule}% }} \newcommand{\l@yer}[2]{% \sbox{\l@yersavebox}{#2}% \setlength{\l@yerwidth}{\wd\l@yersavebox+\layersize}% \m@kelayer{#1}} \newcommand{\m@kedashlayer}[1]{% \setlength{\l@yertotalheight}% {\dp\l@yersavebox+\ht\l@yersavebox+\layersize-#1\layersize}% \setlength{\l@yerlineheight}{\ht\l@yersavebox-#1\layersize-\fboxrule}% \setlength{\l@yervoffset}{-\layersize-\dp\l@yersavebox}% \setlength{\l@yerboxwidth}% {\wd\l@yersavebox+\layersize-#1\layersize}% \parbox{\l@yerwidth}{% \offinterlineskip% \parskip=0pt% \usebox{\l@yersavebox}% \raisebox{\l@yerlineheight}{\hd@shrule{\layersize}}% \kern-\fboxrule% \raisebox{\l@yervoffset}% {\parbox[b]{\fboxrule}{\vd@shrule{\l@yertotalheight}}}% \kern-\wd\l@yersavebox\kern-\layersize\kern#1\layersize \raisebox{\l@yervoffset}% {\parbox[b]{\fboxrule}{\vd@shrule{\layersize}}}% \kern-\fboxrule \raisebox{\l@yervoffset}% {\hd@shrule{\l@yerboxwidth}}% }} \newcommand{\dl@yer}[2] {\sbox{\l@yersavebox}{#2}% \setlength{\l@yerwidth}{\wd\l@yersavebox+\layersize}% \m@kedashlayer{#1}} \newcounter{l@yercount} \newcommand{\l@yers}[3] {\setcounter{l@yercount}{1}% \sbox{\l@yersavebox}{#2}% \whiledo{\not\(\value{l@yercount} > #1\)}% {\sbox{\l@yersavebox}% {#3{\value{l@yercount}}{\usebox{\l@yersavebox}}}% \stepcounter{l@yercount}}% \usebox{\l@yersavebox}% } \newcommand{\lbox}[2][2]{% \l@yers{#1}{#2}{\l@yer}} \newcommand{\dlbox}[2][2]{% \l@yers{#1}{#2}{\dl@yer}} \endinput %% %% End of file `dashbox.sty'. I was not sure which one is more elegant/easy, any solution are all welcome!

  • LuaLaTeX problems with Greek, Devanagari, and a table of contents
    by Jason Wright on April 17, 2026 at 8:08 pm

    I have a very long book written primarily in English that includes snippets of text (just a few words here and there) in many languages. For accessibility reasons I need to switch compilers to LuaLaTeX and it's breaking things (understandably). I'm struggling to understand the best way to render these words. I've gotten almost everything to work very nicely by using babel and fontspec and careful selection of fonts for the various languages. My only final problem is I'm having a strange interaction among the table of contents, devanagari package, and Greek letters. Removing any one of those seems to make the warning go away. Here's my MWE: \documentclass{book} \usepackage{fontspec} \usepackage{devanagari} \usepackage[greek,english]{babel} \newcommand{\greek}[1]{{\begin{otherlanguage}{greek}{\fontspec{CMU Serif}#1}\end{otherlanguage}}} \begin{document} \tableofcontents {\dn : mEZ p\394w\? \8{h}\1} %<- This line is just to illustrate the devanagari package and does not cause an error \greek{α} \end{document} This code generates for me the warnings: Some font shapes were not available, defaults substituted. Font shape `TU/cmr/m/n' undefined My guess is that this can be resolved with appropriate calls to something about fontspec but any help is appreciated. Update: I've found another conflict, which is that my table of contents headers switch from bold to ordinary typeface in every chapter after I use Greek characters! I'm working on an MWE but clearly there are multiple bugs at work here.