Hot
- Text above horizontal arrow in longtblr / tblr with minimal vertical spacingby GJW on February 23, 2026 at 12:40 am
I would like text to be above a horizontal arrow in longtblr, with the following constraints longtblr package Define start and stop points of arrow relative to column borders - i.e. enable the table is dynamic if width of columns change Minimal space between arrow bar and the text Text in column A centred between rows 2 and 3 A screen grab of the desired outcome is attached. Here is a minimal example illustrating what I currently have: \documentclass{article} \usepackage{tabularray} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{longtblr}{ colspec={|c|c|c|}, vlines, hlines, row{3} = {ht=0pt}, % arrow row height } % --- First row --- A & B & C \\ % --- SECOND row: merge columns 2 and 3 --- 1 & \SetCell{c=2} 2 & \\ % --- Arrow row (thin) --- & \SetCell{cmd=\tikz[remember picture]\node (Bstart) {};} & \SetCell{cmd=\tikz[remember picture]\node (Cend) {};} \\ \end{longtblr} % --- Draw the arrow --- \begin{tikzpicture}[overlay, remember picture] \draw[red, thick, <->] ($(Bstart.west)+(-\pgflinewidth/2,0)$) -- ($(Cend.east)+(\pgflinewidth/2,0)$); \end{tikzpicture} \end{document}
- Vsplit : Why loses vsplit the eveness of columns?by MBE on February 23, 2026 at 12:06 am
I cannot build a real MWE. I post a working example. Just imagine, the rows were whole pages (\vsize) I have a file with ca. 100 pages, two columns. I vsplit one big single box into 200 and ship them out. All works well, so far. But, in some cases or on some pages,the top lines are not even, and the bottomlines aren't as well. I tried starting all the boxes with a \hbox, without success. Does someone have an idea? \parindent=0pt \hsize=150mm \setbox20=\vtop{\hsize0.4\hsize Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. Phasellus eu tellus sit amet tortor gravida placerat. Integer sapien est, iaculis in, pretium quis, viverra ac, nunc. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. Phasellus eu tellus sit amet tortor gravida placerat. Integer sapien est, iaculis in, pretium quis, viverra ac, nunc. .} \newdimen\splitheight \splitheight=0.12\vsize \newcount\start \newcount\stop \start=21 \stop=31 \loop \ifnum\start<\stop \setbox\the\start=\vsplit20 to \splitheight{} \advance\start by 1 \repeat \start=21 \stop=31 \loop \ifnum\start<\stop \hskip1pt \copy\the\start \hskip20pt\copy\the\start \break\hskip10pt%\hskip10pt \advance\start by 1 \repeat \bye
- texlive profile: how to specify the scheme?by user2609605 on February 22, 2026 at 9:53 pm
I tried to install texlive from a profile... I just adapted the profile written after some installation and this works quite well -- except two details: # Scheme # must be tied to $SCHEME #selected_scheme scheme-small # paths, recommended to set all of them # TBD: configure $ROOT/$YEAR TEXDIR /usr/local/texlive/2025 # TBD: configure ~/.texlive$YEAR/texmf-config, find a solution TEXMFCONFIG ~/.texlive2025/texmf-config # TBD: find a solution TEXMFHOME ~/texmf # TBD: configure $ROOT/$YEAR/texmf-local TEXMFLOCAL /usr/local/texlive/2025/texmf-local # TBD: configure $ROOT/$YEAR/texmf-config TEXMFSYSCONFIG /usr/local/texlive/2025/texmf-config # TBD: configure $ROOT/$YEAR/texmf-var TEXMFSYSVAR /usr/local/texlive/2025/texmf-var # TBD: configure ~/.texlive$YEAR/texmf-var, find a solution TEXMFVAR ~/.texlive2025/texmf-var # platforms TBD: configure with new setting based on instTexliverc and local plattform binary_aarch64-linux 0 binary_amd64-freebsd 0 binary_amd64-netbsd 0 binary_armhf-linux 0 ... The selected scheme is not recognized.. I tried some variants, but without success. So I substitued by an option as shown below. Likewise: in tlpkg/TeXLive/TLCOnfig.pm some settings are specified, quite nice, seems to be the repository url, but again it is not recognized: "location" => [ "u", "__MASTER__", "repository", "Default package repository" ], and again i substitute with an option for the installer. Now I install with a mixture between profile and other options: ./install-tl -repository "$repo" \ -scheme "$SCHEME" \ -profile "../texlive$YEAR.profile" This seems to work, but I think it is against the intention of the developers.
- Wrong links in \hyperrefby Alex Degtyarev on February 22, 2026 at 9:01 pm
Sorry everyone. I just did an update, which was probably a mistake, and encountered another problem with hyperref. For years I've been using a workaround which I borrowed from a journal, and it worked. Well, I understand that this is an undocumented feature, but there seems (seemed?) to be no other way to have everything numbered consecutively. Here's a minimal example: \documentclass{amsart} \usepackage{hyperref} \newtheorem{theorem}{Theorem}[section] \makeatletter \let\c@equation\c@theorem \let\theequation\thetheorem \makeatother \begin{document} \section{1} \begin{equation} a=b\label{1} \end{equation} \newpage \section{2} \begin{equation} c=d\label{2} \end{equation} \newpage \eqref1 \eqref2 \end{document} Both links lead to eqn. 1.1, and the log reports multiple anchors with the same name. What would the new hack be? Or is there a documented way now to have all theorems, lemmas, ... and equations numbered consecutively within sections and, at the same time, have \autoref work correctly?
- I don't get how to make vertical space between a \paragraph{} and a simple lineby Lucord on February 22, 2026 at 8:58 pm
this is my first LaTeX question and I'm really exited about it 😀 Jokes apart I'm just asking how to make vertical space between a paragraph and a simple new line. I tried to use "\\", but it doesn't work, it gives me "There's no line here to end." to the line where i m writing. 7) "/paragra{}" 8) \\ 9) x And at the line 9 gives me that error. Any idea?
- Multiple images stacked with a single caption, no extra vertical spaceby palloc on February 22, 2026 at 7:53 pm
I'm trying to create a LaTeX document where I have several images stacked vertically, with no extra vertical space between them, and only one caption for all images (appearing under the last image). The problem is that each \IMG creates a separate figure, so each image gets its own caption and there’s extra vertical space between images. What I want: Multiple images stacked vertically with no extra vertical space. Only one caption for all images (appearing under the last one). Allow overlays on the images (x, y, text). This is how it should look like: The code what I got from taiwan12 with little modification (link: https://tex.stackexchange.com/a/760076/287423) : \documentclass{report} \usepackage{graphicx} \usepackage{float} \usepackage{xcolor} \usepackage{xparse} \ExplSyntaxOn % variables \tl_new:N \l_taiwanxii_image_tl \tl_new:N \l_taiwanxii_caption_tl \tl_new:N \l_taiwanxii_shortcaption_tl \tl_new:N \l_taiwanxii_label_tl \tl_new:N \l_taiwanxii_pos_tl \fp_new:N \l_taiwanxii_scale_fp \fp_new:N \l_taiwanxii_overlayscale_fp \clist_new:N \l_taiwanxii_x_clist \clist_new:N \l_taiwanxii_y_clist \clist_new:N \l_taiwanxii_text_clist % keys \keys_define:nn { taiwanxii } { image .tl_set:N = \l_taiwanxii_image_tl, caption .tl_set:N = \l_taiwanxii_caption_tl, shortcaption .tl_set:N = \l_taiwanxii_shortcaption_tl, label .tl_set:N = \l_taiwanxii_label_tl, pos .tl_set:N = \l_taiwanxii_pos_tl, scale .fp_set:N = \l_taiwanxii_scale_fp, overlayscale .fp_set:N = \l_taiwanxii_overlayscale_fp, x .clist_set:N = \l_taiwanxii_x_clist, y .clist_set:N = \l_taiwanxii_y_clist, text .clist_set:N = \l_taiwanxii_text_clist, } \NewDocumentCommand{\IMG}{m} { % reset \tl_clear:N \l_taiwanxii_image_tl \tl_clear:N \l_taiwanxii_caption_tl \tl_clear:N \l_taiwanxii_shortcaption_tl \tl_clear:N \l_taiwanxii_label_tl \tl_clear:N \l_taiwanxii_pos_tl \tl_clear:N \l_taiwanxii_pos_tl \clist_clear:N \l_taiwanxii_x_clist \clist_clear:N \l_taiwanxii_y_clist \clist_clear:N \l_taiwanxii_text_clist \tl_set:Nn \l_taiwanxii_pos_tl {H} \fp_set:Nn \l_taiwanxii_scale_fp {1} \fp_set:Nn \l_taiwanxii_overlayscale_fp {1} \keys_set:nn { taiwanxii } { #1 } % shortcaption \tl_if_empty:NT \l_taiwanxii_shortcaption_tl { \tl_set_eq:NN \l_taiwanxii_shortcaption_tl \l_taiwanxii_caption_tl } \use:e { \exp_not:N \begin{figure}[\l_taiwanxii_pos_tl] } \centering \sbox0{\includegraphics[scale=\fp_use:N \l_taiwanxii_scale_fp]{\l_taiwanxii_image_tl}} \usebox0 \int_zero:N \l_tmpa_int \clist_map_inline:Nn \l_taiwanxii_x_clist { \int_incr:N \l_tmpa_int \tl_set:Nn \l_tmpa_tl {##1} \tl_set:Nx \l_tmpb_tl { \clist_item:Nn \l_taiwanxii_y_clist { \int_use:N \l_tmpa_int } } \tl_set:Nx \l_tmpc_tl { \clist_item:Nn \l_taiwanxii_text_clist { \int_use:N \l_tmpa_int } } \rlap{ \hspace{\dimexpr \l_tmpa_tl\wd0-\wd0\relax} \raisebox{\dimexpr \ht0-\l_tmpb_tl\ht0\relax}{ \makebox[0pt][l]{ \raisebox{-\height}{ \scalebox{\fp_use:N \l_taiwanxii_overlayscale_fp}{ \fcolorbox{black}{white}{ \shortstack[c]{\l_tmpc_tl} } } } } } } } \caption[\l_taiwanxii_shortcaption_tl]{\l_taiwanxii_caption_tl} \label{fig:\l_taiwanxii_label_tl} \end{figure} } \ExplSyntaxOff \begin{document} \listoffigures \IMG{ image = example-image, caption = Caption I, shortcaption = Caption, label = figA, pos = H, scale = 0.6, x = {0.0,0.5,0.2,0.7,0.8}, y = {0.0,0.2,0.3,0.65,0.9}, text = {AA\\BB,AABB,A,B,C}, overlayscale = 0.75, } \IMG{ image = example-image, caption = Caption II, shortcaption = Caption, label = figB, pos = H, scale = 0.6, x = {0.2,0.5}, y = {0.2,0.3}, text = {AABB,A}, overlayscale = 1, } \end{document}
- glossaries: No error or warning for undefined user-entriesby Wolfi on February 22, 2026 at 6:40 pm
On using the glossaries package, I am also making use of the user... entries. When referencing one of these user... entries there is no error or warning generated, even when a user entry is referenced which wasn't defined. Such references simply and quietly expand to nothing. Is there any possibility to get an error or warning when an undefined user... entry is referenced in the document? Here is a MWE: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{glossaries} \makeglossaries \newglossaryentry{symb:one} { name={\ensuremath{a}}, user1={\ensuremath{b}}, description={Description of symbol one} } \begin{document} Reference to \verb|\gls{symb:one}|: -\gls{symb:one}-\\ Reference to \verb|\glsuseri{symb:one}|: -\glsuseri{symb:one}-\\ Reference to \verb|\glsuserii{symb:one}|: -\glsuserii{symb:one}- % no error or warning generated here, % although user2 is not defined \printglossaries \end{document}
- verse environment that checks if the verse is numbered and has a titleby user1850133 on February 22, 2026 at 5:11 pm
I need a verse environment that for each verse, checks if there is a heading line and a number at the end and puts them with a special formatting if it finds. Of course not forgetting to dump that verse too. And if the verse does not have either the header or the number or both, skip this task. In the past I once asked for a verse environment that automatically numbers the verses. (Environment honouring newlines and add stuff before empty lines). I want that your solution is based on that one there that i validated. Don't use fontsize as it is creating a problem (though subtle). Here a header is starting with > and takes the entire line as the header. This header must be put bold in the document. The number at the end of the verse is always the last character in its line and preceded by "||" and any white-spaces. Latex must dump the verse up to the "||" and" puts the number this way 1 || 2 || 3 || after the verse's "||". \documentclass[a4paper]{article} \usepackage{fancyhdr} \setlength{\parindent}{0pt} \fancyhead[C]{lipsum text (dummy text)} \begin{document} lipsum text \\ (dummy text) \begin{myenv} Laborum molestias nam possimus omnis. Libero sit maiores quas asperiores nobis est nulla. Culpa sequi iste deserunt. ||1 Adipisci fuga et quis dicta est et odit. Illo aut nulla qui incidunt necessitatibus nulla qui. Sunt cumque voluptatem quasi quam ||2 >the peacock says ... % this is the "heading line" commodi culpa quaerat sunt. Debitis accusantium et porro et libero nulla ut est. Asperiores sed exercitationem aut. Ex sapiente ||3 >the elephant says Debitis nobis fugiat doloremque voluptates enim ratione. Unde || % not numbered, this one magni beatae magni. Unde voluptatum qui odio corporis quia. ||4 \end{myenv} \end{document}
- Image with multiple white boxes and text/lettersby palloc on February 22, 2026 at 4:56 pm
I have found the following question: Extend custom \IMG macro: add percentage-based overlay label (white box + letter) at (x%, y%) with separate scale I want exactly the same, but with more options: Multiple text boxes, so having two different text boxes should be feasible Multi-line support, so not just single-line, e.g., A\\B should work I also want to use \keys_define Previous question: I have a basic macro that inserts a figure with \includegraphics, caption, and label: \documentclass{report} \usepackage{graphicx} \usepackage{float} \newcommand{\IMG}[4]{ \begin{figure}[H] \centering \includegraphics[scale=#1]{#2} \caption{#3} \label{fig:#4} \end{figure} } \begin{document} \IMG{0.5}{example-image}{Caption}{figA} \IMG{0.6}{example-image}{Caption}{figB} \end{document} I want to extend it so I can overlay a letter inside a white square with a black border on top of the image, with the position given in percentages of the image size, and with a separate scale that affects only the overlay (box + letter), not the image. Desired call syntax: \IMG{imgscale}{filename}{caption}{label}{y}{x}{letter}{overlayscale} Where: imgscale is passed to \includegraphics[scale=...] (scales the image) y and x are relative coordinates inside the image (fractions / percentages of the image size): (y=0, x=0) corresponds to the top-left corner of the image y increases downward (south) x increases to the right (east) e.g. y=0.10 means 10% from the top, x=0.05 means 5% from the left letter is something like A, B, etc. (only one letter) overlayscale scales only the overlay (white square + letter), not the image the letter should be centered inside the square Example usage I want: \IMG{0.5}{example-image}{Caption}{figA}{0.10}{0.05}{A}{1.2} This should place a small white square (black border) near the top-left, at 5% from the left and 10% from the top, and put the letter A inside it. I’m open to tikz, overpic, etc., as long as the coordinates are relative to the image (not the page). Ideally the overlay moves correctly when the image scale changes. It should look like this: Maybe the best answer: \documentclass{report} \usepackage{graphicx} \usepackage{float} \usepackage{color} \newcommand{\IMG}[7]{% don't forget % at EOL \begin{figure}[H] \centering \sbox0{\includegraphics[scale=#1]{#2}}% \usebox{0}% \rlap{\hspace{-#5\wd0}{\raisebox{#6\ht0}{\llap{\fcolorbox{black}{white}{#7}}}}}% \caption{#3} \label{fig:#4} \end{figure}% } \begin{document} \IMG{0.5}{example-image}{Caption}{figA}{.1}{.2}{A} \IMG{0.6}{example-image}{Caption}{figB}{.3}{.3}{B} \end{document} just measures the scaled image, then uses \hspace and \raisebox to move the box.
- Different citation styles using \begin{thebibliography} [duplicate]by Teun on February 22, 2026 at 11:48 am
How do I use citation style alpha with thebibliography? (I don't want to work with biblatex, as separate files destroy my workflow and compiling is a small pain every time.)
- Usage of the `\lastskip` as a flagby forrest on February 22, 2026 at 10:48 am
I would like to modify the value of \lastskip inside the macro that serves for putting asterisk between two consecutive parts of text. This \lastskip value should be detected, if present, by the other macro - one intended for typesetting quotes. To check if an asterisk separator is directly above the quote, it seems necessary to use \lastskip as a "flag" containing this information. If the "flag" is set to some chosen unique value, the macro creating the quote adjusts the space above it (the space separating the quote from the asterisk) to match the default space between the asterisk separator and the plain text below. In other words the distances marked by v in the picture should be the same. In the code below the line to be fixed is marked. It is inspired by @David Carlisle answer. \documentclass[11pt,twoside]{memoir} \usepackage[T1]{fontenc} % output data in log-file \showoutput \showboxdepth=3 \newtoks\realoutput \realoutput\output \output{% \batchmode \showboxbreadth\maxdimen \showboxdepth\maxdimen \showbox255 \the\realoutput } % page setup \setstocksize{115mm}{120mm} \settrimmedsize{115mm}{120mm}{*} \settypeblocksize{95mm}{100mm}{*} \setlrmargins{10mm}{*}{*} \setulmargins{10mm}{*}{*} \setheadfoot{0pt}{0pt} \settypeoutlayoutunit{mm} \checkandfixthelayout \raggedbottom \newlength{\myfancybreakbeforelength} \newlength{\myfancybreakafterlength} \setlength{\myfancybreakbeforelength}{1.25\baselineskip} \setlength{\myfancybreakafterlength}{.5\baselineskip} \newdimen\uniquedim \uniquedim=10000pt \newenvironment{myquotation}{% \list{}{% {\setlength\leftmargin{\the\leftmargin}% \setlength\rightmargin{0mm}}% \listparindent=\parindent% \parsep=0cm% }% \item\relax\slshape% \ifdim\lastskip=\uniquedim % check if immediately above is asterisk-separator \addvspace{\glueexpr-\topsep-\parskip-\partopsep\relax}% eliminating vskip before the current list environment if the fancy break is just preceding \fi }{% \endlist%\par\nointerlineskip% } \makeatletter \def\@xaddvskipreversed{% based on the standard definition of \@xaddvskip \ifdim\lastskip<\@tempskipb \vskip-\lastskip \vskip\@tempskipb \else \ifdim\@tempskipb<\z@ \ifdim\lastskip<\z@ \else % \advance\@tempskipb\lastskip \vskip-\lastskip \vskip\@tempskipb \fi \else \vskip-\lastskip % added \vskip\@tempskipb % added \fi \fi } \def\addvspacereversed#1{% based on the standard definition of \addvspace, just changed \@xaddvskip -> \@xaddvskipreversed \ifvmode \if@minipage\else \ifdim \lastskip =\z@ \begingroup\setlength\skip@{#1}\vskip\skip@\endgroup% \else \setlength\@tempskipb{#1}% \@xaddvskipreversed \fi \fi \else \@noitemerr \fi } \makeatother % macro generating asterisk-separator %\newskip\lastskip \newcommand{\myfancybreak}[1]{% {\par\nointerlineskip\addvspacereversed{\myfancybreakbeforelength}\centering #1\par}% distance above the asterisk-separator and the separator itself \addvspace{\myfancybreakafterlength}% distance below the separator \vskip 0pt% \leavevmode\lastskip=\uniquedim% FIXME - setting the "flag" to be recognized by myquotation environment \par\nointerlineskip% } \begin{document} \pagestyle{empty} \section{Distance between fancy anonymous breaks and plain text paragraphs} Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. \myfancybreak{$\ast$Aa}% Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. \newpage \section{Distance between fancy anonymous breaks and quotations/lists} \begin{myquotation}% Some own-defined or standard quotation.% \end{myquotation}% \myfancybreak{$\ast$Aa}% \begin{myquotation}% Some own-defined or standard quotation.% \end{myquotation}% \begin{myquotation}% Some own-defined or standard quotation.% \end{myquotation} \end{document}
- Opinions on \renewcommand\[{\begin{equation}}by M0M0 on February 22, 2026 at 10:36 am
Let's assume we are writing a report in a field where commonly all equations are numbered. So far I always used \begin{equation}...\end{equation} which, of course, works fine. I now noted that LyX (which I don't use myself) suggests \renewcommand\[{\begin{equation}} \renewcommand\]{\end{equation}} as a workaround to number all equations. In the case of LyX this seems to be done since it automatically inserts \[ and \] to typeset display math. However, this kept me wondering, if this is actually ... a good thing? One of the key ideas of LaTeX is to separate content from formatting. I would now argue that consequently numbering all equations is a (debatable) formatting choice. Wouldn't it then be the LaTeX-y way to use the build in display math \[ for all non-referenced equations and a only use \begin{equation} for referenced/labeld equations? This way one can decide in the preamble/class which style is used. \documentclass{article} \renewcommand\[{\begin{equation}} \renewcommand\]{\end{equation}} \begin{document} A less important equation (that we also do not refer to), if numbered or not is a stylistic choice: \[ f(x) = x^2 \] To the explicitly numbered equation~\ref{eq:1} we will refer to in the document \begin{equation} a^2 + b^2 = c^2 \label{eq:1} \end{equation} \end{document}
- Getting memory error with lualatex when trying to make a knock-out masking with indic textsby Miloop on February 22, 2026 at 9:21 am
I am trying to make a small decorative badge / logo for a friend. The plan is the have a background image (of grass and flowers), then a white mask. I want to "punch" a tamil word in there and two decorative rings (might modify that later). This is the work I have done so far: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{fadings, decorations.text} \usepackage{graphicx} \usepackage{ebgaramond} \usepackage{fontspec} \usepackage{polyglossia} \setdefaultlanguage{english} \setotherlanguage{tamil} \newfontfamily\tamilfont[Script=Tamil]{Lohit Tamil} \begin{document} \begin{tikzpicture} % ------------------------------------------------ % 1) Background image % ------------------------------------------------ \node (img) {\includegraphics[width=8cm]{example-image}}; % ------------------------------------------------ % 2) Define knockout mask (TEXT + CIRCLES) % Black = fully transparent % White = fully opaque % ------------------------------------------------ \begin{tikzfadingfrompicture}[name=knockoutmask] % Everything starts white (opaque) \fill[white] (-5,-5) rectangle (5,5); % Knockout shapes are black \begin{scope}[shift={(0,0)}] % Text \node[ text=black, ] {\texttamil{தமிழ்}}; %<- replacing this with normal English font seems to work, say "Test text". % Deco circles \draw[line width=5pt, black] (0,0) circle (0.9cm); \draw[line width=5pt, black] (0,0) circle (1.5cm); \end{scope} \end{tikzfadingfrompicture} % ------------------------------------------------ % 3) White overlay with inverted fading % ------------------------------------------------ \fill[ white, path fading=knockoutmask, fit fading=false ] (img.south west) rectangle (img.north east); \end{tikzpicture} \end{document} Using English-only text, the output looks like this (which is fine, I just want tamil text): Edit: I forgot the add the error message! ! TeX capacity exceeded, sorry [input stack size=10000]. \pgf@selectfontorig ->\pgf@selectfontorig \nullfont l.36 ] {\texttamil{தமிழ்} }; %<- replacing this with normal eng... If you really absolutely need more capacity, you can ask a wizard to enlarge me. Here is how much of LuaTeX's memory you used: 17190 strings out of 476081 100000,953878 words of node,token memory allocated 1552 words of node memory still in use: 31 hlist, 10 rule, 8 dir, 17 glue, 4 kern, 1 glyph, 105 attribute, 52 glue_sp ec, 105 attribute_list, 7 temp, 2 write, 46 pdf_literal, 21 pdf_colorstack, 1 pd f_setmatrix, 1 pdf_save, 1 pdf_restore nodes avail lists: 2:5 39160 multiletter control sequences out of 65536+600000 29 fonts using 4680087 bytes 10000i,7n,109p,428b,875s stack positions out of 10000i,1000n,20000p,200000b,200000s ! ==> Fatal error occurred, no output PDF file produced!
- Setting an OpenType MATH kern for a particular stylistic set glyphby Apoorv Potnis on February 22, 2026 at 9:14 am
How do I add a math kern for a particular glyph belonging to a particular stylistic set in an OpenType MATH font? As shown here, one adds the kern to a particular Unicode slot---[0x211D] in this case. If one chooses a particular stylistic set though, it does not work. The kern gets added to only the default glyph in the Unicode slot, and it does not carry over to the stylistic set glyph. I found that uni211D.bb is the glyph name of NewCM bb R using FontForge. Also, is it possible to define different kerns for distinct glyphs belonging to different stylistic sets, but the same Unicode point? \documentclass{article} \directlua{ local kerns = { ["NewCMMath-Book"] = { [0x211D] = { topright = { { kern = -100 } } } } } local function addkerns(tfmdata) if tfmdata.mathparameters then local kerns = kerns[tfmdata.properties.fontname] if kerns then local characters = tfmdata.characters for unicode, specification in pairs(kerns) do local character = characters[unicode] if character and not character.mathkerns then character.mathkerns = specification end end end end end fonts.handlers.otf.features.register { name = "mathkerns", description = "additional math kerns", initializers = { position = 1, base = addkerns, node = addkerns, } } } \usepackage{unicode-math} \setmainfont{NewCM10-Book.otf} \setmathfont[ StylisticSet={3}, BoldFont = NewCMMath-Bold.otf, RawFeature=+mathkerns ]{NewCMMath-Book.otf} \usepackage{lua-visual-debug} \lvdset{glyph={show=true}} \begin{document} \(\symbb{R}^n\) \end{document}
- \refstepcounter in hyperref does not work with \offinterlineskipby Alex Degtyarev on February 22, 2026 at 12:34 am
I have discovered a weirdest behavior of \refstepcounter in hyperref: it does not work with \offinterlineskip. Here is a minimal example: %Format: latex \documentclass{amsart} \usepackage{hyperref} \begin{document} text \newpage \begingroup \offinterlineskip \ialign{\strut\refstepcounter{section}\thesection#\hss\cr \label1\cr \label2\cr \label3\cr \label4\cr \crcr} \endgroup \ref1 \ref2 \ref3 \ref4 \newpage refs will lead here \end{document} All links lead to random places in the text. Can this be fixed? My current workaround is spelling out \offinterlaneskip with the baselineskip part removed.
- What is the best way to draw a potato (like found in vector analysis/continuum mechanics courses)by Dimitrios ANAGNOSTOU on February 21, 2026 at 11:34 pm
I apologized if this is a duplicate. What is the best way to draw such figures with tikz (or other packages)? For the time being just the potato like figure. I do not care for the vectors and the infinitesimal mass element. I do not want someone to do the work for me. Just some advice or suggestions.
- Top right math kern value not being used with \directlua code (bug?)by Apoorv Potnis on February 21, 2026 at 7:30 pm
I want to add a topright math kern (aka cut-in or staircase kerning) to DOUBLE-STRUCK CAPITAL R (Hex value: 0x211D, Code point: U+211D). I tried the method as shown in this answer of mickep, but it does not seem to work here. \documentclass{article} \usepackage{fontsetup} \directlua{ local kerns = { ["NewCMMath-Book"] = { [0x211D] = { topright = { { kern = -500 } } }, } } local function addkerns(tfmdata) if tfmdata.mathparameters then local kerns = kerns[tfmdata.properties.fontname] if kerns then local characters = tfmdata.characters for unicode, specification in pairs(kerns) do local character = characters[unicode] if character and not character.mathkerns then character.mathkerns = specification end end end end end fonts.handlers.otf.features.register { name = "mathkerns", description = "additional math kerns", default = true, initializers = { position = 1, base = addkerns, node = addkerns, } } } \usepackage{lua-visual-debug} % The absence of a red rectangle between the doublestruck R and the superscript n seems to indicate that math kerning is not being used, if I understand correctly. \begin{document} \(\symbb{R}^n\) \end{document} While I am using LuaLaTeX with unicode-math, answers for other engines such as ConTeXt and OpTeX are also welcome, if the resulting code is different. Edit: I have tried loading the fonts manually, but that also does not seem to work. \documentclass{article} \directlua{ local kerns = { ["NewCMMath-Book"] = { [0x211D] = { topright = { { kern = -100 } } } } } local function addkerns(tfmdata) if tfmdata.mathparameters then local kerns = kerns[tfmdata.properties.fontname] if kerns then local characters = tfmdata.characters for unicode, specification in pairs(kerns) do local character = characters[unicode] if character and not character.mathkerns then character.mathkerns = specification end end end end end fonts.handlers.otf.features.register { name = "mathkerns", description = "additional math kerns", initializers = { position = 1, base = addkerns, node = addkerns, } } } \usepackage{unicode-math} \setmainfont{NewCM10-Book.otf} \setmathfont[ StylisticSet={3}, BoldFont = NewCMMath-Bold.otf, RawFeature=+mathkerns ]{NewCMMath-Book.otf} \usepackage{lua-visual-debug} \lvdset{glyph={show=true}} \begin{document} \(\symbb{R}^n\) \end{document}
- How to manually install packages in a standard texmf directory structure?by Explorer on February 21, 2026 at 6:13 pm
I want to install mtpro2 fonts into my texmf-local directory, here below are two directory files: texmf-local: $ tree -L 3 . |-- bibtex | |-- bib | | `-- local | `-- bst | `-- local |-- doc | |-- local | `-- lualatex | `-- luadraw |-- dvips | `-- local |-- fonts | |-- source | | `-- local | |-- tfm | | `-- local | |-- type1 | | `-- local | `-- vf | `-- local |-- ls-R |-- metapost | `-- local |-- tex | |-- latex | | `-- local | |-- lualatex | | `-- luadraw | `-- plain | `-- local |-- tlpkg `-- web2c And what I get, the mtpro2-fonts directory: $ tree . |-- doc | `-- fonts | `-- mtpro2 | |-- EULA.txt | |-- Test_latex.pdf | |-- Test_latex.tex | |-- guide2.pdf | `-- mtpro2.pdf |-- dvips | `-- mtpro2 | `-- mtpro2.map |-- fonts | |-- map | | `-- dvips | | `-- mtpro2 | | `-- mtpro2.map | |-- tfm | | `-- pctex | | `-- mtpro2 | | |-- mt2bbdf.tfm | | |-- mt2bbds.tfm | | |-- mt2bbdt.tfm | | |-- mt2bbf.tfm | | |-- mt2bbif.tfm | | |-- mt2bbis.tfm | | |-- mt2bbit.tfm | | |-- mt2bbs.tfm | | |-- mt2bbt.tfm | | |-- mt2bexa.tfm | | |-- mt2bmff.tfm | | |-- mt2bmfs.tfm | | |-- mt2bmft.tfm | | |-- mt2bmif.tfm | | |-- mt2bmis.tfm | | |-- mt2bmit.tfm | | |-- mt2bmsf.tfm | | |-- mt2bmss.tfm | | |-- mt2bmst.tfm | | |-- mt2bsyaf.tfm | | |-- mt2bsyas.tfm | | |-- mt2bsyat.tfm | | |-- mt2bsyf.tfm | | |-- mt2bsys.tfm | | |-- mt2bsyt.tfm | | |-- mt2exa.tfm | | |-- mt2exe.tfm | | |-- mt2exf.tfm | | |-- mt2exg.tfm | | |-- mt2hbif.tfm | | |-- mt2hbis.tfm | | |-- mt2hbit.tfm | | |-- mt2hexa.tfm | | |-- mt2hrbdf.tfm | | |-- mt2hrbds.tfm | | |-- mt2hrbdt.tfm | | |-- mt2hrbf.tfm | | |-- mt2hrbs.tfm | | |-- mt2hrbt.tfm | | |-- mt2hsyaf.tfm | | |-- mt2hsyas.tfm | | |-- mt2hsyat.tfm | | |-- mt2hsyf.tfm | | |-- mt2hsys.tfm | | |-- mt2hsyt.tfm | | |-- mt2mbf.tfm | | |-- mt2mbs.tfm | | |-- mt2mbt.tfm | | |-- mt2mcf.tfm | | |-- mt2mcs.tfm | | |-- mt2mct.tfm | | |-- mt2mff.tfm | | |-- mt2mfs.tfm | | |-- mt2mft.tfm | | |-- mt2mif.tfm | | |-- mt2mis.tfm | | |-- mt2mit.tfm | | |-- mt2msf.tfm | | |-- mt2mss.tfm | | |-- mt2mst.tfm | | |-- mt2syaf.tfm | | |-- mt2syas.tfm | | |-- mt2syat.tfm | | |-- mt2syf.tfm | | |-- mt2sys.tfm | | |-- mt2syt.tfm | | |-- mt2xl.tfm | | `-- mt2xxxl.tfm | `-- type1 | `-- pctex | `-- mtpro2 | |-- mt2bbdf.pfb | |-- mt2bbdf.pfm | |-- mt2bbds.pfb | |-- mt2bbds.pfm | |-- mt2bbdt.pfb | |-- mt2bbdt.pfm | |-- mt2bbf.pfb | |-- mt2bbf.pfm | |-- mt2bbif.pfb | |-- mt2bbif.pfm | |-- mt2bbis.pfb | |-- mt2bbis.pfm | |-- mt2bbit.pfb | |-- mt2bbit.pfm | |-- mt2bbs.pfb | |-- mt2bbs.pfm | |-- mt2bbt.pfb | |-- mt2bbt.pfm | |-- mt2bexa.pfb | |-- mt2bexa.pfm | |-- mt2bmff.pfb | |-- mt2bmff.pfm | |-- mt2bmfs.pfb | |-- mt2bmfs.pfm | |-- mt2bmft.pfb | |-- mt2bmft.pfm | |-- mt2bmif.pfb | |-- mt2bmif.pfm | |-- mt2bmis.pfb | |-- mt2bmis.pfm | |-- mt2bmit.pfb | |-- mt2bmit.pfm | |-- mt2bmsf.pfb | |-- mt2bmsf.pfm | |-- mt2bmss.pfb | |-- mt2bmss.pfm | |-- mt2bmst.pfb | |-- mt2bmst.pfm | |-- mt2bsyaf.pfb | |-- mt2bsyaf.pfm | |-- mt2bsyas.pfb | |-- mt2bsyas.pfm | |-- mt2bsyat.pfb | |-- mt2bsyat.pfm | |-- mt2bsyf.pfb | |-- mt2bsyf.pfm | |-- mt2bsys.pfb | |-- mt2bsys.pfm | |-- mt2bsyt.pfb | |-- mt2bsyt.pfm | |-- mt2exa.pfb | |-- mt2exa.pfm | |-- mt2exe.pfb | |-- mt2exe.pfm | |-- mt2exf.pfb | |-- mt2exf.pfm | |-- mt2exg.pfb | |-- mt2exg.pfm | |-- mt2hbif.pfb | |-- mt2hbif.pfm | |-- mt2hbis.pfb | |-- mt2hbis.pfm | |-- mt2hbit.pfb | |-- mt2hbit.pfm | |-- mt2hexa.pfb | |-- mt2hexa.pfm | |-- mt2hrbdf.pfb | |-- mt2hrbdf.pfm | |-- mt2hrbds.pfb | |-- mt2hrbds.pfm | |-- mt2hrbdt.pfb | |-- mt2hrbdt.pfm | |-- mt2hrbf.pfb | |-- mt2hrbf.pfm | |-- mt2hrbs.pfb | |-- mt2hrbs.pfm | |-- mt2hrbt.pfb | |-- mt2hrbt.pfm | |-- mt2hsyaf.pfb | |-- mt2hsyaf.pfm | |-- mt2hsyas.pfb | |-- mt2hsyas.pfm | |-- mt2hsyat.pfb | |-- mt2hsyat.pfm | |-- mt2hsyf.pfb | |-- mt2hsyf.pfm | |-- mt2hsys.pfb | |-- mt2hsys.pfm | |-- mt2hsyt.pfb | |-- mt2hsyt.pfm | |-- mt2mbf.pfb | |-- mt2mbf.pfm | |-- mt2mbs.pfb | |-- mt2mbs.pfm | |-- mt2mbt.pfb | |-- mt2mbt.pfm | |-- mt2mcf.pfb | |-- mt2mcf.pfm | |-- mt2mcs.pfb | |-- mt2mcs.pfm | |-- mt2mct.pfb | |-- mt2mct.pfm | |-- mt2mff.pfb | |-- mt2mff.pfm | |-- mt2mfs.pfb | |-- mt2mfs.pfm | |-- mt2mft.pfb | |-- mt2mft.pfm | |-- mt2mif.pfb | |-- mt2mif.pfm | |-- mt2mis.pfb | |-- mt2mis.pfm | |-- mt2mit.pfb | |-- mt2mit.pfm | |-- mt2msf.pfb | |-- mt2msf.pfm | |-- mt2mss.pfb | |-- mt2mss.pfm | |-- mt2mst.pfb | |-- mt2mst.pfm | |-- mt2syaf.pfb | |-- mt2syaf.pfm | |-- mt2syas.pfb | |-- mt2syas.pfm | |-- mt2syat.pfb | |-- mt2syat.pfm | |-- mt2syf.pfb | |-- mt2syf.pfm | |-- mt2sys.pfb | |-- mt2sys.pfm | |-- mt2syt.pfb | |-- mt2syt.pfm | |-- mt2xl.pfb | |-- mt2xl.pfm | |-- mt2xxxl.pfb | `-- mt2xxxl.pfm |-- source | `-- latex | `-- mtpro2 | |-- mtpro2.dtx | `-- mtpro2.ins |-- tex | |-- latex | | `-- mtpro2 | | |-- mtpro2.sty | | |-- omslbm.fd | | |-- umt2bb.fd | | |-- umt2hrb.fd | | |-- umt2mf.fd | | `-- umt2ms.fd | `-- plain | `-- mtpro2 | `-- mtp2.tex `-- tpm `-- package `-- mtp2fonts.tpm What I need to do, is moving these files into texmf-local with proper file-system hierarchy. Now I have the following folder to move: tree -L 1 . |-- doc |-- dvips |-- fonts |-- source |-- tex `-- tpm while texmf-local, that is: $ tree -L 1 . |-- bibtex |-- doc |-- dvips |-- fonts |-- ls-R |-- metapost |-- tex |-- tlpkg `-- web2c Now turns to my first-step question: There is no source and tpm folder in my texmf-local, to install, should I just add these two folders to ./texmf-local? And the other fours folders, is my remaining second question: For example, take doc into consideration, I have: $ tree . |-- doc | `-- fonts | `-- mtpro2 | |-- EULA.txt | |-- Test_latex.pdf | |-- Test_latex.tex | |-- guide2.pdf | `-- mtpro2.pdf ... while the targeted texmf-local/doc: $ tree . |-- doc | |-- local | `-- lualatex | `-- luadraw Should I just copy /doc/fonts into /texmf-local/doc? or inside /texmf-local/doc/local? What is the folder local here for(Accroding to texdoc tds, section2.3, that is for local add packages, but lualatex/luadraw which installed by l3build install do something looks not very standard)? Or in a word, how could I copy the mtpro2-fonts files into my texmf-local with the proper directory location properly according to related TDS standard?
- Restricting the area in which text is typeset in lettersby Stefan Müller on February 21, 2026 at 4:07 pm
I want to write a letter template. The code below works but has the disadvantage that one has to state how many lines a paragraph has, so that it does not spill over into the margin where the details about the university are. This is done by \pshape. The second page is supposed to use all the available space. So no \pshape is necessary here. I think there is a conceptual mistake in this code. LaTeX should know about the region it can use. Is there a way to do this with paper size or something so that \pshapeis not necessary any longer? \documentclass[% a4paper, foldmarks=true, foldmarks=blmTP, fromlogo=true, locfield=wide, refline=nodate, firstfoot=false, pagenumber=headright ]{scrlttr2} \setlength{\textwidth}{160mm}% \addtolength{\textheight}{5\baselineskip} \addtoplength{toaddrvpos}{-16mm} \setplength{refvpos}{9,5cm} %\addtoplength{refhpos}{15mm} \setplength{locvpos}{50mm} \setplength{locwidth}{50mm} %\setplength{refhpos}{6mm} % it doesn't work for left margin \setplength{lochpos}{4mm} % right margin \setplength{locheight}{22,2cm} \usepackage{libertine} % XeLaTeX + libertine + MnSymbol (math symbols) create problems \renewcommand\ttdefault{lmtt} % change typewriter font to lmodern (smaller than tt in libertine)mtt} \usepackage{lipsum} %%%%%%%%%%%%%%%%%%%%%%% %%% Author's Metadata \newcommand*\sender{Stefan Müller} % sender's name \newcommand*\degree{Prof. Dr.} % sender's degree \newcommand*\authortitle{\degree\ \sender } % sender: degree + name \newcommand*\mail{St.Mueller@hu-berlin.de} % sender's e-mail \newcommand*\website{https://hpsg.hu-berlin.de/\~{}stefan/} % sender's website \newcommand*\officehour{Montag, 14:00–15:00} % office hours \newcommand*\telf{$+$49\,30\,2093-9631} \newcommand*\addressee{Prüfungsbüro\\ -- im Hause --} \def\pshape#1{% \parshape #1 \pshapexiicm{#1} 0pt 16cm } \def\pshapexiicm#1{% \ifnum#1>1 0pt 12,5cm \expandafter \pshapexiicm\expandafter{\the\numexpr#1-1\expandafter\relax\expandafter}\fi} \setkomavar{location}{\begin{tabular}[t]{l@{}} % Faculty {\footnotesize \textbf{Sprach- und}}\\[-1mm] {\footnotesize \textbf{literaturwissenschaftliche}}\\[-1mm] {\footnotesize \textbf{Fakultät}}\\[3mm] % Institute {\footnotesize Institut für deutsche Sprache}\\[-1mm] {\footnotesize und Linguistik}\\[3mm] {\scriptsize Sprachwissenschaft des Deutschen,}\\[-1mm] % Area {\scriptsize Syntax}\\[3mm] % Author {\scriptsize \textbf{\authortitle}}\\[-1mm] {\scriptsize \mail }\\[-1mm] {\scriptsize \website }\\[8mm] % Date {\scriptsize \textbf{Datum:}}\\[-1mm] {\scriptsize \usekomavar{date}}\\[37mm] % Address post {\scriptsize \textbf{Postanschrift:}}\\[-1mm] {\scriptsize Humboldt-Universität zu Berlin }\\[-1mm] {\scriptsize Unter den Linden 6 }\\[-1mm] {\scriptsize 10099 Berlin }\\[-1mm] {\scriptsize Telefon 030 54321 }\\[20mm] % Address office {\scriptsize \textbf{Sitz:}}\\[-1mm] {\scriptsize Seminargebäude am Hegelplatz }\\[-1mm] {\scriptsize hegelplatz 1 }\\[-1mm] {\scriptsize 1115 Berlin }\\[-1mm] {\scriptsize Raum R1411}\\[44,5mm] % Consultation hours {\scriptsize \textbf{Sprechzeiten:}}\\[-1mm] {\scriptsize Mo: 23:00--23:15}\\[-1mm] %% Bank account % {\scriptsize \textbf{Bankverbindung:}}\\[-1mm] % {\scriptsize Deutsche Bank PGK AG}\\[-1mm] % {\scriptsize BIC/SWIFT: DEUTDED110}\\[-1mm] % {\scriptsize IBAN: DE 95 1007 0848 0512 620601} \end{tabular} } \begin{document} \begin{letter}{ %% ADDRESS (see texfiles/localmetadata for the commands) \tiny{ HU | Sprach- und literaturwissenschaftliche Fakultät,\\ Institut für deutsche Sprache und Linguistik | 10099 Berlin}% % \\ \vspace{1cm} % %%ADDRESSEE (specify above) \footnotesize{ \addressee} } \setkomavar{subject}{Some subject/Betreff} %% OPENING \opening{Sehr geehrte Damen und Herren,} %\opening{To whom it may concern,} %% CONTENT OF LETTER \pshape{24} \lipsum[1] \pshape{18} Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. Phasellus eu tellus sit amet tortor gravida placerat. Integer sapien est, iaculis in, pretium quis, viverra ac, nunc. Praesent eget sem vel leo ultrices bibendum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Curabitur auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim rutrum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Curabitur auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim rutrum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Curabitur auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim rutrum. Donec varius orci eget risus. Duis nibh mi, congue eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim rutrum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Curabitur auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim rutrum. \closing{Best wishes} \end{letter} \end{document}
- Latex: Tikz - rectangle to inherit the width of another rectangleby GJW on February 21, 2026 at 1:44 pm
I would like node B to have exactly the same width as node A, without explicitly specifying a fixed dimension, with the following constraints: The two nodes are not adjacent in the source code. I do not want to hard-code a width (e.g., minimum width=3cm). Node A will always be at least as wide as node B. I would prefer a solution that does not rely on manually computing dimensions via \path let unless necessary. Here is a minimal example illustrating what I currently have: \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \node [draw] (A) {Some text}; \path let \p1 = (A.south west), \p2 = (A.north east) in node [draw, minimum width=\x2-\x1-\pgflinewidth, minimum height=\y2-\y1-\pgflinewidth, below right] at ([yshift={\pgflinewidth}]A.south west) {more}; \end{tikzpicture} \end{document}
- How to set anchor for chemove in the right place?by Solarflares on February 21, 2026 at 12:55 pm
I want to draw an arrow with chemmove to represent the movement of an electron pair. \documentclass{article} \usepackage{chemfig} \begin{document} \setchemfig{atom sep=7mm} \setchemfig{ arrow style={,,,thick} } \schemestart[][] \chemfig{\charge{90=\|,180=\|,270=\|}{Br}-@{end}H} \+ \arrow{0}[,0] \chemfig{H-[:52]@{start}\charge{45=\|,135=\|}{O}-[:-52]H} \arrow \chemfig{\chemabove[0pt]{\charge{45=\|}{O}}{\hspace{-4mm}\scriptstyle\oplus}(-[:-30]H)(-[:90]H)(-[:-150]H)} \+ \chemabove[2pt]{\chemfig{\charge{0=\|,90=\|,180=\|,270=\|}{Br}}}{\hspace{7mm}\scriptstyle\ominus} % \chemmove{ \draw[thick, ->,shorten <=2pt, shorten >=2pt] (start).. controls +(north west:1.5cm) and +(north:1cm).. (end); } \schemestop \end{document} The output is not as expected (expected: red arrow): What is the problem? Do I set the anchors (@start / @end ) in the wrong place? Edit: As already wrote in a comment. This was not an issue of using anchor or chemmove. It is an issue of the used engine. With pdfTeX and LuaTeX my MWE works as expected. With XeTeX it does not work as expected.
- Directlua can not add options to tikz nodeby Norodix on February 21, 2026 at 12:37 pm
I'm trying to set up some parameters of nodes from lua code. I don't understand why the first version works but not the second. \documentclass[border=10pt]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node [ color=\directlua{ tex.print("red") } ] {A}; \node [ \directlua{ tex.print("color=red") } ] {B}; \end{tikzpicture} \end{document} To me it looks like that these two directlua sections should produce the exact same output, but B fails with the following error message: ! Package pgfkeys Error: I do not know the key '/tikz/color=red' and I am going to ignore it. Perhaps you misspelled it.
- QED symbol at end of align blocks final equation numberby Niles on February 21, 2026 at 9:56 am
I'm trying to use \qedhere with the ams classes to set a proof endmark at the end of an align environment. But doing so removes the number from that equation! This problem doesn't happen with a single numbered equation. Here are some examples. In the last one, I have a sort of hack from this question that adds a paragraph break and then a negative \vspace. But, the spacing isn't quite right and I wouldn't want to manually adjust it for each different environment. I've also seen a similar suggestion for a multi-line display. Is there not a better way? \documentclass{amsart} \begin{document} \begin{proof} Numbered equation, qedhere at right. \begin{equation} x+y\qedhere \end{equation} \end{proof} \begin{proof} Align environment; qed on newline \begin{align} x & = 2\\ y & = 3 \end{align} \end{proof} \begin{proof} Align environment; using qedhere blocks the final equation number \begin{align} x & = 2\\ y & = 3\qedhere % <---- want a number here too \end{align} \end{proof} \begin{proof} Align environment; paragraph break and negative vspace \begin{align} x & = 2\\ y & = 3 \end{align} \par\nopagebreak\vspace{-\baselineskip}\mbox{} \end{proof} \end{document} Note: Several related questions, like this one for the cases environment, have comments suggesting that it's just bad style to end a proof with a displayed equation. Leaving that aside, I'm really interested in different endmarks for different environments. The proof environment is just the simplest way to display the issue with \qedhere and align. Note 2: I also see suggestions that ntheorem handles endmarks better. I've used ntheorem for many years, but it hasn't been updated since 2011. I'm looking for a better solution using the new begin/end environment hooks. I had hoped \qedhere in the appropriate hook could do the job.
- Strange intersection glitch of knots package?by Explorer on February 21, 2026 at 9:20 am
This question based on the previous question: % Source - https://tex.stackexchange.com/a/759998 % Posted by Andrew Stacey % Retrieved 2026-02-21, License - CC BY-SA 4.0 \documentclass[tikz, border=1cm]{standalone} \usetikzlibrary{decorations.pathreplacing,knots} %\url{https://tex.stackexchange.com/q/759978/86} \begin{document} \begin{tikzpicture}[ basic strand/.style={ black, double=gray!10, double distance=1pt, line cap=round, thick, }, crossing strand/.style={ line width=2pt, only when rendering/.style={% draw=gray!10,% line width=1pt, double=none, } }, rounded corners=1pt, ] \begin{knot}[ consider self intersections=true, ignore endpoint intersections=false, background colour=black, every intersection/.style={ crossing strand }, only when rendering/.style={ basic strand }, clip width=1, flip crossing=1, ] \strand (7.5,7.5)--(6.5,5.5)--(7.5,3.5)--(6.5,1.5)--(4.5,0.5)--(2.5,1.5)--(0.5,0.5)--(1.5,2.5)--(0.5,4.5)--(1.5,6.5)--(3.5,7.5)--(5.5,6.5)--(7.5,5.5)--(6.5,3.5)--(7.5,1.5)--(5.5,0.5)--(3.5,1.5)--(1.5,0.5)--(0.5,2.5)--(1.5,4.5)--(0.5,6.5)--(2.5,7.5)--(4.5,6.5)--(6.5,7.5)--(5.5,5.5)--(7.5,4.5)--(6.5,2.5)--(7.5,0.5)--(5.5,1.5) --(3.5,0.5)--(1.5,1.5)--(0.5,3.5)--(1.5,5.5) --(0.5,7.5)--(2.5,6.5)--(4.5,7.5)--(6.5,6.5) --(4.5,5.5)--(5.5,3.5) % --(7.5,2.5) ; \end{knot} \end{tikzpicture} \end{document} With --(7.5,2.5) commented, it behaves good: However, if I uncommented that line, thing changed: Is that a bug or feature? Any possibility to improve this?
- Using tikz's backgrounds library to draw something behind textby Werner on February 21, 2026 at 7:20 am
Consider the following minimal example where I want to draw a rectangle behind a sequence of numbers (to highlight them): \documentclass{article} \usepackage{tikz} \usetikzlibrary{backgrounds,calc} \NewDocumentCommand{\tikzmark}{ m }{\tikz[overlay, remember picture] \node (#1) {};} \newcounter{seq} \NewDocumentCommand{\seqstart}{}{% \stepcounter{seq}% Start a new sequence \tikzmark{seq-start-\theseq}}% Set start marker \NewDocumentCommand{\seqend}{}{% \tikzmark{seq-end-\theseq}% Set end marker \tikz[remember picture, overlay] \scoped [on background layer] \fill [fill=blue!10!white] ($(seq-start-\theseq.south west) + (-0.5pt,1pt)$) rectangle ($(seq-end-\theseq.south east) + (0.5pt,1.1\normalbaselineskip)$);% } \begin{document} \[ 12, 15, 8, 11, 4, 7, 0, 3, 16, 19, 12, 15, 8, 11, 4, 7, 0, 3, \ldots \] \[ \seqstart{}12, 15, 8, 11, 4, 7, 0, 3, 16, 19\seqend{}, 12, 15, 8, 11, 4, 7, 0, 3, \ldots \] \end{document} The idea is that \seqstart would set a (counter-driven) \tikzmark representing the start of the sequence to be marked. Then \seqend would set a \tikzmark at the end and highlight it using the background layer. The counter allows for multiple such sequence marking within a larger document. However, the output shows that the rectangle highlighting a part of the sequence is not being drawn on background layer as requested. Why is that? How can I ensure the rectangle is drawn on the background layer behind document/text elements? The backgrounds library documentation (in the tikz documentation, section 45) mentions that on background layer can only be used inside a {scope} or \scoped, which is done above.
- How to include list of abbreviations of journal titlesby rensemil on February 20, 2026 at 10:47 pm
I am using Zotero with better BibLaTeX to make my bibliography. I have the names of journals abbreviated. Is there any way to make LaTeX print a list of these abbreviations? So just before the bibliography, I would like a list that basically says something like: ALL = Archiv für Lateinische Lexikographie DLZ = Deutsche Literaturzeitung and so on. Thanks in advance!
- How to draw self-overlapped path with double line style?by Explorer on February 20, 2026 at 4:52 pm
The question is similar to this solution, but not the same: \documentclass[tikz, border=1cm]{standalone} \usetikzlibrary{decorations.pathreplacing} % https://tex.stackexchange.com/a/572738/322482 \begin{document} \begin{tikzpicture}[ rounded corners=1pt, path decomposition/.style={% postaction={decoration={show path construction, lineto code={ \draw[#1] (\tikzinputsegmentfirst) -- (\tikzinputsegmentlast); }, curveto code={ \draw[#1] (\tikzinputsegmentfirst) .. controls (\tikzinputsegmentsupporta) and (\tikzinputsegmentsupportb) ..(\tikzinputsegmentlast) ; }, closepath code={ \draw[#1] (\tikzinputsegmentfirst) -- (\tikzinputsegmentlast) {closepath};} } ,decorate}}] \draw[line cap=round, black, double=gray!10, thick, path decomposition={black, double=gray!10,thick}] (3,3) -- (1,1) -- (3,1) -- (1,3); % here below is what I want with only one path \begin{scope}[xshift=3cm] \draw[black, double=gray!10, thick, line cap=round] (3,3) -- (1,1) -- (1.5,1); \draw[black, double=gray!10, thick, line cap=round] (2.5,1) -- (3,1) -- (1,3); \draw[black, double=gray!10, thick] (1.3,1) -- (2.7,1); \end{scope} \end{tikzpicture} \end{document}
- Does (Lua)TeX use .notdef or U+FFFD?by rallg on February 20, 2026 at 3:57 pm
Simple (I hope) question. Does not need MWE. I use LuaLaTeX, although I expect that this question is generally applicable. If a font does not have a requested Unicode character, does (Lua)LaTeX insert a .notdef glyph there, or does it insert U+FFFD (if the font has U+FFFD) ? Does this depend on circumstances (such as math/text mode, etc.) ? I am not worried about intentionally contrived situations that would never occur in a real document. Reason I ask: I design and use my own fonts, which have U+FFFD. Since this is a valid Unicode location, I can do font-related tricks with it, such as using OpenType features to show different glyphs, depending on the problem. But I cannot do them with .notdef, because it is not a valid Unicode location. I dimly recall reading (here at SE) that U+FFFD is used, if found, but I cannot find that thread. Search returns XeTeX-specific info, and I do not use that. EDIT: I should have created a font that used different glyphs for .notdef and U+FFFD. Then I would have known the answer, simply by looking at the PDF. But I didn't think of it, earlier. Reason for edit: file luaotfload-notdef.lua makes interesting reading. If possible, the .notdef character is mapped to U+F0000 in the extended private area, where no well-behaved fonts would have a character. That allows Lua to find and manipulate the .notdef character, by calling its (decimal) Lua character code. If U+F0000 is already taken, then the fontloader has Plan B and Plan C. Without that kind of mapping, .notdef would be very hard to manipulate, because it has no Unicode location (rather, it is -1, which is not a real location).
- Thinspace with babel french?by nowox on February 20, 2026 at 12:47 pm
I love LaTeX, but I also love french typography and I noticed that babel does not really add a thin space before the colon/semicolon: \documentclass{article} \usepackage[french]{babel} \addto\extrasfrench{% \renewcommand{\FBcolonspace}{\nobreak\thinspace}% } \begin{document} \large Le canard: un animal avec deux pattes. \end{document} Built with: latexmk -lualatex test.tex If I manually do it, the result is visually much better. \begin{document} \large Le canard\nobreak\thinspace: un animal avec deux pattes. \end{document} Is there a way to tweak babel to do it right?
- Create a directed graphby Dimitrios ANAGNOSTOU on February 19, 2026 at 4:15 pm
I want to create the following figure. Using the following code, I managed to get something close. But I cannot figure out how to get properly the diagonal vectors without too much trial and error. Any ideas? Thanks a lot! \documentclass[a4paper,11pt]{article} \usepackage[T1]{fontenc} \usepackage[french]{babel} \usepackage{tikz} \usetikzlibrary{positioning,arrows.meta} \begin{document} \begin{figure}[!htpb] \centering \begin{tikzpicture}[ node distance=3cm, box/.style={draw, rectangle, minimum size=1.2cm, font=\large}, arr/.style={->, >=Stealth, thick} ] % Nodes \node[box] (1) {1}; \node[box, below=of 1] (2) {2}; \node[box, right=of 1] (3) {3}; \node[box, below=of 3] (4) {4}; % Labels n_i \node[above=3mm of 1] {$n_1=3$}; \node[above=3mm of 3] {$n_3=1$}; \node[below=3mm of 2] {$n_2=2$}; \node[below=3mm of 4] {$n_4=2$}; % Horizontal 1 <-> 3 (two parallel arrows) \draw[arr] ([yshift=4pt]1.east) -- ([yshift=4pt]3.west); \draw[arr] ([yshift=-4pt]3.west) -- ([yshift=-4pt]1.east); % Vertical left \draw[arr] (1) -- (2); % Vertical right \draw[arr] (4) -- (3); % Bottom horizontal \draw[arr] (2) -- (4); % Diagonals \draw[arr] (2) -- (3); \draw[arr] ([xshift=-4pt]4.north) -- ([xshift=4pt]1.south); \draw[arr] ([xshift=-4pt]1.south) -- ([xshift=4pt]4.north); \end{tikzpicture} \end{figure} \end{document}