Week
- Drawing a Manifold in tikzby Hassium on March 12, 2026 at 8:21 pm
I am trying to draw a manifold using tikz. The best way I can think of is to give several points and generates smooth lines connecting those points. Here is my draft: \documentclass{article} \usepackage{amsmath,amssymb,amsthm} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[thick] plot [smooth cycle, tension=1] coordinates { (-2.5,0) (-1.6,1) (0,0.55) (1.6,1) (2.5,0) (1.6,-1) (0,-0.55) (-1.6,-1) }; \draw[thick] (-1.85, -0.05) to[out=-30, in=210] (-0.95, -0.05); \draw[thick] (-1.7, -0.1) to[out=45, in=135] (-1.1, -0.1); \end{tikzpicture} \end{document} The lines are not very smooth. Is there a way to make the lines more smooth? Or is there a better strategy to draw this? Thanks in advance.
- Count spaces in LaTeXby Vincent on March 12, 2026 at 7:11 pm
I would like to create a fast/optimized fully expandable function that counts the number of spaces in an argument: \documentclass{article} \begin{document} \countspaces{ A B } % Should return 3 (1 is ok too if leading and trailing spaces are removed) \countspaces{A \mycommand B} % Should return 2 (\mycommand is not expanded) \countspaces{A {a b c} B} % Should return 2 (spaces inside groups are not counted) \end{document} Explicit spaces should be counted too. How to achieve that?
- Problem with multicols in tcolorboxby CasperYC on March 12, 2026 at 11:10 am
\documentclass[a4paper,12pt, scheme = plain]{ctexart} \usepackage{amsmath,enumerate} \usepackage[export]{adjustbox} % uses graphicx \usepackage{graphicx} \usepackage{xcolor} \usepackage[margin = 1.5cm]{geometry} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage{tcolorbox} \tcbuselibrary{skins,xparse,breakable,listings} \tcbset{% colback = white, colframe = black, title filled = false, colbacktitle = white, % 框的背景 enhanced, breakable }%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NewTColorBox[ auto counter, number freestyle = {Example \,\noexpand\arabic{\tcbcounter} }, ]{question}{ O{}mo }{ fonttitle = \bfseries, title = \thetcbcounter: #2, % 显示source coltitle = black, % 标题的颜色 (默认白色背景!!!!!) before lower = {\textbf{Solution:} \par}, #1 }%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage{multicol} % cover page multicol \setlength{\columnsep}{3cm} \setlength{\columnseprule}{1pt} \def\columnseprulecolor{\color{blue}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def\d{{\rm d}} \newcommand{\qaq}{\quad \text{and} \quad} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} \begin{question}{Integrating $\sin^2(x)$ and $\cos^2(x)$} Find \[ \int \sin^2(x) \, \d x \qaq \int \cos^2(x) \, \d x \] \tcblower%% \phantom{aaa} \begin{multicols}{2} \begin{align*} \int \sin^2(x) \, \d x &= \int \frac{1}{2} - \frac{1}{2} \cos(2x) \, \d x \\ &= \frac{1}{2}x - \frac{1}{4} \sin(2x) + \text{constant} \end{align*} \begin{align*} \int \cos^2(x) \, \d x &= \int \frac{1}{2} + \frac{1}{2} \cos(2x) \, \d x \\ &= \frac{1}{2}x + \frac{1}{4} \sin(2x) + \text{constant} \end{align*} \end{multicols} \end{question} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{enumerate} \item \phantom{aaa} \begin{question}{Integrating $\sin^2(x)$ and $\cos^2(x)$} Find \[ \int \sin^2(x) \, \d x \qaq \int \cos^2(x) \, \d x \] \tcblower%% \begin{multicols}{2} \begin{align*} \int \sin^2(x) \, \d x &= \int \frac{1}{2} - \frac{1}{2} \cos(2x) \, \d x \\ &= \frac{1}{2}x - \frac{1}{4} \sin(2x) + \text{constant} \end{align*} \begin{align*} \int \cos^2(x) \, \d x &= \int \frac{1}{2} + \frac{1}{2} \cos(2x) \, \d x \\ &= \frac{1}{2}x + \frac{1}{4} \sin(2x) + \text{constant} \end{align*} \end{multicols} \end{question} \end{enumerate} \end{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% The normal case is okish, except that the margin is a bit over. And in the enumerate environment, it gets even worse. In both cases, the horizontal baselines do not seem to agree either...
- How to create lines perfectly lie on a circle shape with TikZ?by user516076 on March 12, 2026 at 6:49 am
It's very difficult to make a perfect line that lies on exact circle. This is my full work: \documentclass[tikz,border=1pt]{standalone} \usepackage{tikz} \usepackage{calligra} \usepackage[T1]{fontenc} \begin{document} \begin{tikzpicture}[line width=1pt] \path[use as bounding box] (-5.6,-1.2) rectangle (6.4,7.2); % Circle \draw (2.6,3.0) circle (3.1); % Secant line P-T-U \draw (-5.0,0.1) -- (4.7,5.6); % Chords \draw (2.6,2.3) -- (1.2,1.7); % short chord near S \draw (1.2,1.7) -- (4.0,1.4); % S to V \draw (4.0,1.4) -- (4.7,5.6); % V to U % Angle at S \draw (1.2,1.7) ++(0.55,0) arc[start angle=0,end angle=123,radius=0.55]; % Angle at V \draw (4.0,1.4) ++(-0.55,0) arc[start angle=180,end angle=95,radius=0.55]; % Labels \node[font=\fontsize{34}{34}\selectfont] at (-5.0,-0.4) {$P$}; \node[font=\fontsize{34}{34}\selectfont] at (0.2,2.9) {$T$}; \node[font=\fontsize{34}{34}\selectfont] at (5.2,5.9) {$U$}; \node[font=\fontsize{34}{34}\selectfont] at (4.3,0.4) {$V$}; \node[font=\fontsize{34}{34}\selectfont] at (0.9,0.7) {$S$}; % Angle labels \node[font=\fontsize{28}{28}\selectfont] at (2.0,2.5) {$123^\circ$}; \node[font=\fontsize{28}{28}\selectfont] at (3.6,2.0) {$85^\circ$}; \end{tikzpicture} \end{document} and this is the result: What I want: Please along with full MWE ready to copy paste, could you explain, what the trick is and what to add and where to add, so that I can also learn? T.I.A.
- Counting total award pointsby user516076 on March 12, 2026 at 12:31 am
As a teacher, you might find this question relatable should you be bothered by making sure that the sum of marks is a certain number when you make an exam. Since I believe LaTeX has control flow, I think it would be great to have a feature to count how many marks I have made so far. So, in this particular document, if it is possible, could I have a mini program that would print a number of sum of the marks? If I exceed the number of max marks, it will give a warning that been printed out below the instruction. just like if else condition. To ilustrate it, Suppose my first problem gives [3] marks, second problem has [4] marks, third problem has [1] mark and the last problem has [6] marks. I want a command to print the sum of them in a sentence like this: The total mark for this paper is \mark. Is this doable? How to? I'll just provide this MWE and let you geniuses take care of it please. T.I.A. \documentclass[12pt]{article} \usepackage[a4paper,margin=1in]{geometry} \usepackage{enumitem} \usepackage{amsmath} \begin{document} %======================== % First page %======================== \begin{center} {\Large \textbf{Sample Examination Paper}}\\[1em] {\large Mathematics}\\[2em] \end{center} \noindent \textbf{Candidate Name:} \rule{10cm}{0.4pt} \vspace{2em} \noindent \textbf{Instructions} \begin{enumerate}[leftmargin=2em] \item Write your name clearly in the space provided above. \item Answer \textbf{all five questions}. \item Write your answers in the spaces provided in this question paper. \item If you need additional space, use lined paper and attach it securely to this paper. \item You may use an HB pencil for graphs and diagrams. \item You should show all necessary working clearly. \item The total mark for this paper is \textbf{19}. \end{enumerate} \vfill \begin{center} \textit{Turn over for the first question} \end{center} \newpage %======================== % Questions %======================== \noindent \textbf{1.} Solve the equation \[ 3x - 7 = 11. \] \begin{flushright} [3] \end{flushright} \vspace{5cm} \noindent \textbf{2.} Expand and simplify \[ (x+2)(x-5). \] \begin{flushright} [4] \end{flushright} \vspace{5cm} \noindent \textbf{3.} A triangle has base $8$ cm and height $5$ cm. Calculate its area. \begin{flushright} [1] \end{flushright} \vspace{5cm} \noindent \textbf{4.} Differentiate \[ y = 4x^3 - 2x + 6. \] \begin{flushright} [5] \end{flushright} \vspace{5cm} \noindent \textbf{5.} The first three terms of a sequence are \[ 2,\ 5,\ 8,\ \dots \] Find the 10th term of the sequence. \begin{flushright} [6] \end{flushright} \vspace{5cm} \end{document} As you can see there. It is still a manual writing "19". so there, perhaps how to create command such as \mark. so it would print 19 by itself, because the LaTeX does the maths automatically. And if it exceeds 19, then print WARNING: TOTAL MARKS EXCEED 19.
- how to compile Chinese in ltx-talk by Luatex?the Chinese characters can not be shown in Slideby WPP on March 11, 2026 at 12:54 pm
how to compile Chinese in ltx-talk by Luatex? \DocumentMetadata{} \documentclass{ltx-talk} % --- FONT SETTINGS --- % No need to load fontspec or unicode-math; ltx-talk already did. \setmainfont{Times New Roman} % Use STIX Two Math to match the "Times" look for your equations \setmathfont{STIX Two Math} \usepackage{luatexja-fontspec} \setmainjfont{times new roman} \begin{document} \begin{frame}{Sparse Recovery} 李白李白李白李白李白李白 \begin{itemize} \item \textbf{Riemannian Gradient:} $\nabla_{\mathcal{M}} f(x)$. \item \textbf{Sparsity:} Utilizing the $\ell^1$ norm for signal recovery. \end{itemize} \end{frame} \end{document}
- make4ht: mwe with align fails in texlive 2026by cmhughes on March 11, 2026 at 8:24 am
The following mwe does not compile using make4ht in texlive 2026 mwe \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} 1 & 2\\ 3 & 4 \end{align*} \end{document} call make4ht mwe question What configuration options do I need to adjust to make this compile?
- How do I make all my tabular cells be vertically centered?by Draconis on March 11, 2026 at 4:08 am
I'm working on a document that contains quite a lot of tables. In many of these tables, some columns have normal text, while other columns have other things (e.g. inline images, math formulae, etc) that are taller than a normal line of text. With a normal tabular environment, the text ends up on the same baseline as the larger things, which doesn't look good. I would prefer it be vertically centered, so that the midline of the text lines up with the midline of the larger things. I've seen the tabularray package suggested, but it looks like that uses a very different syntax from a normal tabular, and I have many tables to update and a deadline in two days. I'm open to switching if there's a straightforward way to convert tabulars into tabularrays without changing anything about the default appearance or behavior, but otherwise, I'm worried about the dimensions changing. So: is there some way to change the behavior of a tabular (a certain table, a certain column, even a certain cell if necessary) so that text in cells is vertically centered, without changing anything else about its dimensions and layout? MWE: \documentclass[12pt,letterpaper]{book} \usepackage{booktabs} \begin{document} \begin{table}[h] \centering \begin{tabular}{ccc} \toprule Normal & Bigger & Normal \\ \midrule Lorem & {\Huge XYZ} & Ipsum \\ \midrule Dolor & {\Huge ABC} & Sit \\ \midrule Consec & {\Huge JKL} & Tetur \\ \bottomrule \end{tabular} \end{table} \end{document} I would like the midline of the smaller text to line up with the midline of the huge text, while keeping everything else about the table the same. I've seen many questions about vertically centering text in table columns, but none of the answers I've seen allow keeping the rest of the table the same (they tend to involve switching to a different environment with different behavior). I've seen that a single-cell multicolumn will center things vertically, but adding those to every single cell in many separate tables is going to be a nightmare, so I'd prefer something I can use once per table instead of once per cell if possible.
- Inline formula baseline issues of `a` with TeX Gyre Pagella Math?by Explorer on March 11, 2026 at 3:33 am
Here below is the example code: \documentclass{article} \usepackage{unicode-math} \setmathfont{TeX Gyre Pagella Math} \begin{document} Inline $(\frac{1}{b} , \frac{1}{a})$ \[ (\frac{1}{b} , \frac{1}{a})\] \end{document} Noted that the baseline of a is abnormal when inline, but normal in display. Is that a bug or feature of TeX Gyre Pagella Math? That is also quite confusing for me that why inline and display behave quite different, is not the same a glyph was used? Any hot-fix to change the baseline in inline math for a here? Any tricks(maybe luatex?) are all welcome!
- luadraw in footerby PHL on March 10, 2026 at 12:01 pm
When trying to put a luadraw environment in a footer I obtain the following error Argument of \luacode@grab@lines has an extra }. Is there any workaround? If needed, I can consider using \AddToHookNext{shipout/background} (but this is not working either). This is really related to luadraw, as replacing the luadraw code by the TikZ code compiles without problems. %!TEX TS-program = lualatex \documentclass{article} \usepackage{luadraw} \usepackage{fancyhdr} \pagestyle{fancy} % This does not work %\cfoot{% % \begin{luadraw}{} % local g = graph:new{window={0,1,0,1},margin={0,0,0,0}, bbox = false} % local L = { Z(0,0), Z(1,1) } % g:Dpolyline(L,true) % g:Show() % \end{luadraw} %} % But this works % This is the TikZ code produced by the above luadraw picture \cfoot{% \begin{tikzpicture}[line join=round]% \begin{scope}% \draw[] (0,0) -- (1,1)--cycle;% \end{scope}% \end{tikzpicture}% } \begin{document} bla blo bli \end{document} Edit. If possible I would like a solution where the luadraw environment is really executed at each page and can use \thepage as a parameter.
- Access TeX counter inside luadrawby PHL on March 10, 2026 at 11:39 am
I am toying with luadraw and would like to have my graphic depending on \thepage for the number of iterations. I tried \\thepage, "\\thepage" or to use g:Writeln or tex.sprint but none of them worked. Minimal non-working example (inspired by the luadraw manual): %!TEX TS-program = lualatex \documentclass{article} \usepackage{luadraw} \begin{document} bla blo bli \begin{luadraw}{name=Sierpinski} local iteration = g:Writeln("\\thepage") %num? tex.sprint? local g = graph:new{window={-5,5,-5,5},margin={0,0,0,0},size={1,1}} local i = cpx.I local rand = math.random local A, B, C = 5*i, -5-5*i, 5-5*i -- triangle initial local T, niv = {{A,B,C}}, iteration for k = 1, niv do T = concat( hom(T,0.5,A), hom(T,0.5,B), hom(T,0.5,C) ) end for _,cp in ipairs(T) do g:Filloptions("full", rgb(rand(),rand(),rand())) g:Dpolyline(cp,true, "line width=0pt") end g:Show() \end{luadraw} \end{document}
- Why do none of these do anything? end document hooks and table of contentsby Bob on March 10, 2026 at 4:13 am
I cannot seem to figure out why the \clearpage (or anything for that matter) causes the \AtEndDocument hooks to not work. The other two dont seem to ever do anything which likely means I am using them wrong. \documentclass{article} \usepackage{atveryend} \AtEndDocument{\addtocontents{toc}{\protect bla?}} \AfterLastShipout{\addtocontents{toc}{\protect bla??}} \AtVeryEndDocument{\addtocontents{toc}{\protect bla???}} \begin{document} \tableofcontents \section{blub} \clearpage \LogHook{enddocument} \end{document} The output from the log is the same regardless of the \clearpage > Document-level (top-level) code (executed last): > -> \addtocontents {toc}{\protect bla?} Edit: Added photo demonstrating how none of the hooks function as expected.
- Fail to produce an octagon by repeating -- ([turn]45:{sqrt(2)}) 8 times with foreach [duplicate]by D G on March 9, 2026 at 3:58 pm
The expected output is shown in the first two. \documentclass[tikz,border=1cm]{standalone} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \draw (0,0) foreach \a in {0,1,...,6}{-- ++({45*\a}:{sqrt(2)})} -- cycle; \end{tikzpicture} \begin{tikzpicture} \draw (0,0) -- ([turn]45:{sqrt(2)}) -- ([turn]45:{sqrt(2)}) -- ([turn]45:{sqrt(2)}) -- ([turn]45:{sqrt(2)}) -- ([turn]45:{sqrt(2)}) -- ([turn]45:{sqrt(2)}) -- ([turn]45:{sqrt(2)}) -- cycle; \end{tikzpicture} \begin{tikzpicture} \draw (0,0) foreach \i in {0,...,6} {-- ([turn]45:{sqrt(2)})} -- cycle; \end{tikzpicture} \end{document} Why doesn't the last one produce the expected output?
- Is there some hooks when text style and color change?by Jinwen on March 9, 2026 at 1:54 pm
In this solution, Max Chernoff proposed a LuaTeX approach for customizing the hyphen character. However, it does so by replacing the hyphen char with the content given inside some predefined boxes. The content is thus fixed, not sensitive to changes in font, text style or text color. With the hook selectfont, one may reset these boxes each time the font got changed, as Max did in his answer. Is there some similar tricks that work for text style (such as \textbf, \emph) and text color (produced by \color or \textcolor)? (For instance, in the example below, it is expected to have green, italic shaped dashes.) Below is a MWE. \documentclass[landscape]{article} \usepackage{xcolor} %%%%%%%%%%%%%%%%%%%%%% %%% Implementation %%% %%%%%%%%%%%%%%%%%%%%%% %% Define the box to hold the hyphen replacement \makeatletter \newbox\example@tex@hyphen@box \newbox\example@manual@hyphen@box \AddToHook{selectfont}[auto-hyphen-box]{% %% Hyphen inserted by TeX \sbox{\example@tex@hyphen@box}{\textcolor{red}{-}}% %% Hyphen inserted manually \sbox{\example@manual@hyphen@box}{-}% }% \makeatother %% Define the Lua callback to replace hyphens with coloured versions \usepackage{luacode} \begin{luacode*} local disc_subtypes = table.swapped(node.subtypes("disc")) -- Get the box register numbers local pre_box = luatexbase.registernumber("example@tex@hyphen@box") local replace_box = luatexbase.registernumber("example@manual@hyphen@box") -- Replace the inserted hyphen nodes. luatexbase.add_to_callback("hyphenate", function(head, tail) node.hyphenating(head, tail) for n in node.traverse_id(node.id("disc"), head) do if (n.prev or {}).char == utf8.codepoint("-") then -- Probably an em- or en-dash, skip it goto continue end if n.subtype == disc_subtypes.automatic then n.pre = node.copy(tex.box[replace_box]) n.replace = node.copy(tex.box[replace_box]) else n.pre = node.copy(tex.box[pre_box]) end ::continue:: end end, "colour_hyphens") \end{luacode*} %%%%%%%%%%%%%%%%%%%%% %%% Demonstration %%% %%%%%%%%%%%%%%%%%%%%% \usepackage{fontspec} \setmainfont{TeX Gyre Pagella} \setsansfont{TeX Gyre Chorus} \newcommand{\SampleText}{% This is some-text with a-lot of hyphenated words-to demonstrate how-the discretionary hyphens-are coloured. En--dash em---dash.% } \newcommand{\SampleBox}[2]{% \parbox[t]{#1}{% #2\textcolor{green}{\emph{\SampleText}} }% } \pagestyle{empty} \setlength{\parindent}{0pt} \begin{document} \begin{tabular}{*5c} \SampleBox{5cm}{\rmfamily} & \SampleBox{5cm}{\sffamily} & \SampleBox{2cm}{\rmfamily} & \SampleBox{2cm}{\sffamily} & \SampleBox{1cm}{\rmfamily} \end{tabular} \end{document} NEWLY ADDED MWE: \documentclass{article} \usepackage{newpxtext} \usepackage{xcolor} % https://tex.stackexchange.com/a/759212 \makeatletter \newbox\example@tex@hyphen@box \newbox\example@manual@hyphen@box \AddToHook{selectfont}[auto-hyphen-box]{% %% Hyphen inserted by TeX \sbox{\example@tex@hyphen@box}{\textcolor{.!39}{-}}% %% Hyphen inserted manually \setbox\example@manual@hyphen@box=\hbox{-}% }% \makeatother \RequirePackage { luacode } \begin{luacode*} local disc_subtypes = table.swapped(node.subtypes("disc")) -- Get the box register numbers local pre_box = luatexbase.registernumber("example@tex@hyphen@box") local replace_box = luatexbase.registernumber("example@manual@hyphen@box") -- Replace the inserted hyphen nodes. luatexbase.add_to_callback("hyphenate", function(head, tail) node.hyphenating(head, tail) for n in node.traverse_id(node.id("disc"), head) do if (n.prev or {}).char == utf8.codepoint("-") then -- Probably an em- or en-dash, skip it goto continue end if n.subtype == disc_subtypes.automatic then n.pre = node.copy(tex.box[replace_box]) n.replace = node.copy(tex.box[replace_box]) else n.pre = node.copy(tex.box[pre_box]) end ::continue:: end end, "colour_hyphens") \end{luacode*} \begin{document} \textcolor{.!50}{word-with-hyphen} {\color{.!50} word-with-hyphen} \textbf{word-with-hyphen} \emph{word-with-hyphen} \end{document}
- How to depict an organic salt in chemfigby Chemguy on March 9, 2026 at 7:00 am
I'm trying to display a reaction with chemfig including salt of a a very complex organic anion. So far, I managed to create the structure of the anion and put it into a \figure enviroment, just to have it displayed. edit: Now with compiling code \documentclass[oneside]{scrreprt} \usepackage{graphicx} \usepackage{amsmath} \usepackage[subdued]{mathastext} \Mathastext[chem] \usepackage{chemfig} \let\chmf\chemfig \renewcommand*{\chemfig}[1]{{\MTVersion{chem}\tiny \chmf{#1}}} \setchemfig{atom sep=1.9em} %\UseTblrLibrary{booktabs} \usepackage[style=chem-angew]{biblatex} \begin{document} \newcommand{\mcfminus}{\scriptstyle{-}} \newcommand{\mcfright}[2]{#1^{#2}} \begin{figure} \chemfig{3 K^{+}} \chemleft{[} \chemfig{N ~[:270] -[:270]\mcfright{N} -[:270] =_[:330]N -[:270] -[:210]N -[:270] ( -[:330]N =^[:30] ( -[:330]\mcfright{N} -[:330] ~[:330]N ) -[:90]N =^[:150] ) =_[:210]N -[:150] ( -[:210]\mcfright{N} -[:210] ~[:210]N ) =_[:90]N -[:30] ( -[:330]\phantom{N} ) =_[:90]N ( -[:30] )} \chemright{]^{\text{3-}}} \end{figure} \end{document} I want to add the cation (3 K^{+}) before the brackets, at the height of the middle of the Anion, as it is usual with salts in chemistry (and further use is between \schemestart ans \schemestop) Can anyone help me how to do this? Current result:
- Producing an Elliptical Ring of Imagesby DDS on March 8, 2026 at 8:34 pm
Consider the code: \documentclass{book} \usepackage{graphicx} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \thispagestyle{empty} \begin{center} \begin{tikzpicture} \fill[red] rectangle (8,6); \foreach \k in {0,30,...,360} \node at ($(4,3)+(\k:2)$) {\includegraphics[width=1.7em]{example-image-a}}; \end{tikzpicture} \end{center} \end{document} which produces: QUESTION: How may I modify this code in order produce an ellipse (instead of circle) of images? Thank you.
- How to correct for LaTeX and/or package changes affecting parsing of text in TikZ decoration for TL2020 vs TL2021 vs TL2022/3 vs TL2024 vs TL2025/6?by cfr on March 8, 2026 at 7:31 pm
Consider the following code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{% decorations.text,% mindmap,% } \begin{document} \begin{tikzpicture} \path[ adddecrev/.style={% postaction={decorate, decoration={text along path, text={##1}, raise=3pt, }}}, small mindmap, ] node (norm) [root concept, concept, adddecrev={AAA AAA|\hskip 7.5pt| ||AAAAA AAA{\kern10ptA}A AA AA}] {AAAAAAAAA} [counterclockwise from=120] % removing this child eliminates the warnings child { node [concept, adddecrev={X{\kern-2ptX}{\kern-1ptX}{\kern4ptX}{\kern0ptX}X|\hskip8pt| ||X{\kern-2ptX}X{\kern-1ptX}{\kern-1ptX} X{\kern-3ptX}{\kern-1ptX}l{\kern-1ptX}|\hskip-2pt|X||{\kern-1ptX}|\hskip4pt|X||{\kern-2ptX}|\hskip-2pt|X|| }] {MMMMMMMM} } ; \end{tikzpicture} \end{document} In TL2020, this compiles without complaint for either pdfLaTeX or LuaLaTeX. In TL2025 or 2026, it complains Missing character: There is no A in font nullfont! In TL2024, the complaint is Missing character: There is no @ in font nullfont! In TL2022 and TL2023, the complaint is Missing character: There is no ? in font nullfont! In TL2021, the complaint is Missing character: There is no > in font nullfont! What causes these differences? Usually the nullfont warnings relate directly to problematic characters in the source. The A suggests that might be the case, except that removing the X line makes the problem disappear. Moreover, for earlier installations, the characters complained of bear no obvious relation to the input and I'm not sure where they are coming from or what the problem is. I also can't see anything obviously wrong with the code specifying the text for the decoration, despite rereading the relevant part of the manual. What is happening here? Is my code erroneous? If so, how can I correct it? In any case, is there a way to avoid the problem with a current TeX Live?
- Drawing a topological surface of genus threeby InsideOut on March 8, 2026 at 12:56 pm
I would need your help to draw a surface of genus three like in the picture I attached. More specifically, I aim to draw a torus (surface of genus one) and below the surface of genus three realised by mean of some surgeries on the surface. I already drawn the torus by myself and I need help with the genus 3 surface. As you can see, the torus I drew is not exactly as on paper. Could help me? I also added some notes about colours of curves. Moreover, I'd like the surface is filled with the pattern [pattern=north west lines, pattern color=pallido], where pallido is just a colour I defined in RGB (it's already in the code). In the picture I do not need the names of colours, that's only for you. Thank you in advance! \documentclass[11pt,a4wide]{article} \usepackage[latin1]{inputenc} \usepackage{fancyhdr} \usepackage{indentfirst} \usepackage{graphicx} \usepackage{newlfont} \usepackage{amssymb} \usepackage{amsmath} \usepackage{latexsym} \usepackage{lscape} \usepackage{booktabs} \usepackage{amsthm} \usepackage{lscape} \usepackage{tikz} \usetikzlibrary{patterns,hobby} \usepackage{pgfplots} \pgfplotsset{compat=1.6} \usepackage{faktor} %\faktor{A}{B} %\usepackage{pictexwd,dcpic} \usepackage{pgf,tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \usetikzlibrary{arrows.meta} \usetikzlibrary{decorations.markings} \usetikzlibrary{bending} \usetikzlibrary{patterns} \usetikzlibrary{intersections, calc} \usetikzlibrary{decorations.pathmorphing} \usepackage{soul} \usepackage{rotating} \usepackage[margin=3cm]{geometry} \usepackage{enumitem} \usepackage{color} \usepackage{hyperref} \definecolor{smoked}{RGB}{216, 212, 204} \definecolor{mauve}{RGB}{200, 55, 171} \definecolor{apricot}{RGB}{250, 144, 4} \definecolor{sky}{RGB}{66, 169, 244} \definecolor{plum}{RGB}{76, 0, 102} \definecolor{forest}{RGB}{90,145,120} \definecolor{sand}{RGB}{180,160,120} \begin{document} \begin{figure}[h!] \centering \begin{tikzpicture}[scale=2, every node/.style={scale=0.875}] \definecolor{pallido}{RGB}{221,227,227} \pattern [pattern=north west lines, pattern color=pallido] (0,0) ellipse (3cm and 2cm); \fill [white] (0,0) ellipse (1cm and 0.66cm); \draw[thin, black] (0,0) ellipse (3cm and 2cm) (0,0) ellipse (1cm and 0.66cm); \draw[orange] (0,0) ellipse (2cm and 1.25cm); %\draw[blue] (0,0) arc (030:060:2.5cm and 1.5cm); \draw[blue] (0,0) +(30:2.4 and 1.6) arc [start angle=30, end angle=60, x radius=2.4, y radius=1.6]; \draw[blue] (0,0) +(210:2.4 and 1.6) arc [start angle=210, end angle=240, x radius=2.4, y radius=1.6]; \draw[violet] (0,0) +(120:1.2 and 0.8) arc [start angle=120, end angle=150, x radius=1.2, y radius=0.8]; \draw[violet] (0,0) +(300:1.2 and 0.8) arc [start angle=300, end angle=330, x radius=1.2, y radius=0.8]; \draw[red ] (0 ,-0.66) to[bend left ] (0,-2); \draw[sky ] (0 , 0.66) to[bend left ] (0, 2); \draw[thin, red, dashed] (0 ,-0.66) to[bend right] (0,-2); \draw[thin, sky, dashed] (0 , 0.66) to[bend right] (0, 2); \fill ( 0.2,-1.25) circle (1pt); \fill (-0.2, 1.25) circle (1pt); \fill[violet] (0,0) +(120:1.2 and 0.8) circle (0.5pt); \fill[violet] (0,0) +(150:1.2 and 0.8) circle (0.5pt); \fill[violet] (0,0) +(300:1.2 and 0.8) circle (0.5pt); \fill[violet] (0,0) +(330:1.2 and 0.8) circle (0.5pt); \fill[blue] (0,0) +(030:2.4 and 1.6) circle (0.5pt); \fill[blue] (0,0) +(060:2.4 and 1.6) circle (0.5pt); \fill[blue] (0,0) +(210:2.4 and 1.6) circle (0.5pt); \fill[blue] (0,0) +(240:2.4 and 1.6) circle (0.5pt); \draw[black, thin] (0,0) +(030:2.4 and 1.6) circle (1pt); \draw[black, thin] (0,0) +(060:2.4 and 1.6) circle (1pt); \draw[black, thin] (0,0) +(210:2.4 and 1.6) circle (1pt); \draw[black, thin] (0,0) +(240:2.4 and 1.6) circle (1pt); \draw[violet] (0,0) +(120:1.2 and 0.8) circle (1pt); \draw[violet] (0,0) +(150:1.2 and 0.8) circle (1pt); \draw[violet] (0,0) +(300:1.2 and 0.8) circle (1pt); \draw[violet] (0,0) +(330:1.2 and 0.8) circle (1pt); \node at ( 1.75 , 1.25 ) {\(e_{1,1}\)}; \node at (-1.75 ,-1.25 ) {\(e_{1,2}\)}; \node at (-1.0625, 0.625) {\(e_{2,1}\)}; \node at ( 1.0625,-0.625) {\(e_{2,2}\)}; \end{tikzpicture} \caption{} \label{fig:hypermin} \end{figure} \end{document} My current result The picture I wish to draw:
- How to save x,y,w,h of answer boxes on a quizby Dov on March 7, 2026 at 5:17 pm
I am trying to generate a quiz where I can generate a file answers.txt containing the id of each question, the x,y location on the page, the width,height and the answer. The macro side effects are brutal and I have no idea what is going on. The following minimal non-working example shows the error. I can try to save out the location of each one, but if I try to also print out width,height that give an error. \documentclass{article} \usepackage{xparse} \usepackage{tikz} \usepackage{zref-savepos} \newwrite\ansfile % Answer box size \newlength{\answ} \newlength{\ansh} \setlength{\answ}{36pt} \setlength{\ansh}{18pt} \newcounter{question} \newcounter{ansbox} % Parallel arrays stored as token lists \newtoks\AnsIDs \newtoks\AnsX \newtoks\AnsY \newtoks\AnsW \newtoks\AnsH \newtoks\AnsText \NewDocumentCommand{\question}{mm}{% \stepcounter{question}% \par\noindent\textbf{Q\thequestion\ (#1 pts)} #2\quad } \NewDocumentCommand{\ans}{m}{% \stepcounter{ansbox}% \edef\labelname{Q\thequestion-A\theansbox}% \zsavepos{\labelname}% \tikz[baseline]{\draw (0,0) rectangle (\answ,\ansh);}% % store in arrays \AnsIDs=\expandafter{\the\AnsIDs \labelname,}% \AnsX=\expandafter{\the\AnsX \zposx{\labelname},}% \AnsY=\expandafter{\the\AnsY \zposy{\labelname},}% \AnsW=\expandafter{\the\AnsW \strip@pt\answ,}% \AnsH=\expandafter{\the\AnsH \strip@pt\ansh,}% \AnsText=\expandafter{\the\AnsText #1,}% } \AtBeginDocument{% \immediate\openout\ansfile=answers.txt } \AtEndDocument{% % write arrays to file \def\IDList{\the\AnsIDs}% \def\XList{\the\AnsX}% \def\YList{\the\AnsY}% \def\WList{\the\AnsW}% \def\HList{\the\AnsH}% \def\TList{\the\AnsText}% \newcount\i \i=0 \loop \ifnum\i<\value{ansbox} % extract first item from each comma list \edef\currID{\expandafter\@firstofone\expandafter{\expandafter\@car\IDList\@nil}}% \edef\IDList{\expandafter\@gobble\IDList}% \edef\currX{\expandafter\@firstofone\expandafter{\expandafter\@car\XList\@nil}}% \edef\XList{\expandafter\@gobble\XList}% \edef\currY{\expandafter\@firstofone\expandafter{\expandafter\@car\YList\@nil}}% \edef\YList{\expandafter\@gobble\YList}% \edef\currW{\expandafter\@firstofone\expandafter{\expandafter\@car\WList\@nil}}% \edef\WList{\expandafter\@gobble\WList}% \edef\currH{\expandafter\@firstofone\expandafter{\expandafter\@car\HList\@nil}}% \edef\HList{\expandafter\@gobble\HList}% \edef\currA{\expandafter\@firstofone\expandafter{\expandafter\@car\TList\@nil}}% \edef\TList{\expandafter\@gobble\TList}% % write to file \immediate\write\ansfile{\currID\space \currX\space \currY\space \currW\space \currH\space \currA}% \advance\i by 1 \repeat \immediate\closeout\ansfile } \begin{document} \question{10}{What is $2+2$?} \ans{4} \question{5}{What is $3+5$?} \ans{8} \end{document} The log file is: This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2022/dev/ Debian) (preloaded format=pdflatex 2026.2.22) 7 MAR 2026 14:37 entering extended mode restricted \write18 enabled. %&-line parsing enabled. **mintest5.tex (./mintest5.tex LaTeX2e <2021-11-15> patch level 1 L3 programming layer <2022-01-21> (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls Document Class: article 2021/10/04 v1.4n Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo File: size10.clo 2021/10/04 v1.4n Standard LaTeX file (size option) ) \c@part=\count185 \c@section=\count186 \c@subsection=\count187 \c@subsubsection=\count188 \c@paragraph=\count189 \c@subparagraph=\count190 \c@figure=\count191 \c@table=\count192 \abovecaptionskip=\skip47 \belowcaptionskip=\skip48 \bibindent=\dimen138 ) (/usr/share/texlive/texmf-dist/tex/latex/l3packages/xparse/xparse.sty (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty Package: expl3 2022-01-21 L3 programming layer (loader) (/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def File: l3backend-pdftex.def 2022-01-12 L3 backend support: PDF output (pdfTeX) \l__color_backend_stack_int=\count193 \l__pdf_internal_box=\box50 )) Package: xparse 2022-01-12 L3 Experimental document command parser ) (/usr/share/texlive/texmf-dist/tex/latex/pgf/frontendlayer/tikz.sty (/usr/share/texlive/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty (/usr/share/texlive/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty (/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex \pgfutil@everybye=\toks16 \pgfutil@tempdima=\dimen139 \pgfutil@tempdimb=\dimen140 (/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfutil-common-lists.t ex)) (/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def \pgfutil@abb=\box51 ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex (/usr/share/texlive/texmf-dist/tex/generic/pgf/pgf.revision.tex) Package: pgfrcs 2021/05/15 v3.1.9a (3.1.9a) )) Package: pgf 2021/05/15 v3.1.9a (3.1.9a) (/usr/share/texlive/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty Package: graphicx 2021/09/16 v1.2d Enhanced LaTeX Graphics (DPC,SPQR) (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty Package: keyval 2014/10/28 v1.15 key=value parser (DPC) \KV@toks@=\toks17 ) (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty Package: graphics 2021/03/04 v1.4d Standard LaTeX Graphics (DPC,SPQR) (/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty Package: trig 2021/08/11 v1.11 sin cos tan (DPC) ) (/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration ) Package graphics Info: Driver file: pdftex.def on input line 107. (/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def File: pdftex.def 2020/10/05 v1.2a Graphics/color driver for pdftex )) \Gin@req@height=\dimen141 \Gin@req@width=\dimen142 ) (/usr/share/texlive/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty (/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex Package: pgfsys 2021/05/15 v3.1.9a (3.1.9a) (/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex \pgfkeys@pathtoks=\toks18 \pgfkeys@temptoks=\toks19 (/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.t ex \pgfkeys@tmptoks=\toks20 )) \pgf@x=\dimen143 \pgf@y=\dimen144 \pgf@xa=\dimen145 \pgf@ya=\dimen146 \pgf@xb=\dimen147 \pgf@yb=\dimen148 \pgf@xc=\dimen149 \pgf@yc=\dimen150 \pgf@xd=\dimen151 \pgf@yd=\dimen152 \w@pgf@writea=\write3 \r@pgf@reada=\read2 \c@pgf@counta=\count194 \c@pgf@countb=\count195 \c@pgf@countc=\count196 \c@pgf@countd=\count197 \t@pgf@toka=\toks21 \t@pgf@tokb=\toks22 \t@pgf@tokc=\toks23 \pgf@sys@id@count=\count198 (/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg File: pgf.cfg 2021/05/15 v3.1.9a (3.1.9a) ) Driver file for pgf: pgfsys-pdftex.def (/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def File: pgfsys-pdftex.def 2021/05/15 v3.1.9a (3.1.9a) (/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.de f File: pgfsys-common-pdf.def 2021/05/15 v3.1.9a (3.1.9a) ))) (/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code. tex File: pgfsyssoftpath.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgfsyssoftpath@smallbuffer@items=\count199 \pgfsyssoftpath@bigbuffer@items=\count266 ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code. tex File: pgfsysprotocol.code.tex 2021/05/15 v3.1.9a (3.1.9a) )) (/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty Package: xcolor 2021/10/31 v2.13 LaTeX color extensions (UK) (/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg File: color.cfg 2016/01/02 v1.6 sample color configuration ) Package xcolor Info: Driver file: pdftex.def on input line 227. Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1352. Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1356. Package xcolor Info: Model `RGB' extended on input line 1368. Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1370. Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1371. Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1372. Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1373. Package xcolor Info: Model `Gray' substituted by `gray' on input line 1374. Package xcolor Info: Model `wave' substituted by `hsb' on input line 1375. ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex Package: pgfcore 2021/05/15 v3.1.9a (3.1.9a) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex \pgfmath@dimen=\dimen153 \pgfmath@count=\count267 \pgfmath@box=\box52 \pgfmath@toks=\toks24 \pgfmath@stack@operand=\toks25 \pgfmath@stack@operation=\toks26 ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code.tex (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code .tex) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonomet ric.code.tex) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.cod e.tex) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.comparison .code.tex) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base.code. tex) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code .tex) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code. tex) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integerari thmetics.code.tex))) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex \c@pgfmathroundto@lastzeros=\count268 )) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfint.code.tex) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.te x File: pgfcorepoints.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgf@picminx=\dimen154 \pgf@picmaxx=\dimen155 \pgf@picminy=\dimen156 \pgf@picmaxy=\dimen157 \pgf@pathminx=\dimen158 \pgf@pathmaxx=\dimen159 \pgf@pathminy=\dimen160 \pgf@pathmaxy=\dimen161 \pgf@xx=\dimen162 \pgf@xy=\dimen163 \pgf@yx=\dimen164 \pgf@yy=\dimen165 \pgf@zx=\dimen166 \pgf@zy=\dimen167 ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct. code.tex File: pgfcorepathconstruct.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgf@path@lastx=\dimen168 \pgf@path@lasty=\dimen169 ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code .tex File: pgfcorepathusage.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgf@shorten@end@additional=\dimen170 \pgf@shorten@start@additional=\dimen171 ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.te x File: pgfcorescopes.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgfpic=\box53 \pgf@hbox=\box54 \pgf@layerbox@main=\box55 \pgf@picture@serial@count=\count269 ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.c ode.tex File: pgfcoregraphicstate.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgflinewidth=\dimen172 ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformation s.code.tex File: pgfcoretransformations.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgf@pt@x=\dimen173 \pgf@pt@y=\dimen174 \pgf@pt@temp=\dimen175 ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex File: pgfcorequick.code.tex 2021/05/15 v3.1.9a (3.1.9a) ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.t ex File: pgfcoreobjects.code.tex 2021/05/15 v3.1.9a (3.1.9a) ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing .code.tex File: pgfcorepathprocessing.code.tex 2021/05/15 v3.1.9a (3.1.9a) ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.te x File: pgfcorearrows.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgfarrowsep=\dimen176 ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex File: pgfcoreshade.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgf@max=\dimen177 \pgf@sys@shading@range@num=\count270 \pgf@shadingcount=\count271 ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex File: pgfcoreimage.code.tex 2021/05/15 v3.1.9a (3.1.9a) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code. tex File: pgfcoreexternal.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgfexternal@startupbox=\box56 )) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.te x File: pgfcorelayers.code.tex 2021/05/15 v3.1.9a (3.1.9a) ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.c ode.tex File: pgfcoretransparency.code.tex 2021/05/15 v3.1.9a (3.1.9a) ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code. tex File: pgfcorepatterns.code.tex 2021/05/15 v3.1.9a (3.1.9a) ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorerdf.code.tex File: pgfcorerdf.code.tex 2021/05/15 v3.1.9a (3.1.9a) ))) (/usr/share/texlive/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex File: pgfmoduleshapes.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgfnodeparttextbox=\box57 ) (/usr/share/texlive/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex File: pgfmoduleplot.code.tex 2021/05/15 v3.1.9a (3.1.9a) ) (/usr/share/texlive/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65 .sty Package: pgfcomp-version-0-65 2021/05/15 v3.1.9a (3.1.9a) \pgf@nodesepstart=\dimen178 \pgf@nodesepend=\dimen179 ) (/usr/share/texlive/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18 .sty Package: pgfcomp-version-1-18 2021/05/15 v3.1.9a (3.1.9a) )) (/usr/share/texlive/texmf-dist/tex/latex/pgf/utilities/pgffor.sty (/usr/share/texlive/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty (/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex)) (/usr/share/texlive/texmf-dist/tex/latex/pgf/math/pgfmath.sty (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex)) (/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex Package: pgffor 2021/05/15 v3.1.9a (3.1.9a) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex) \pgffor@iter=\dimen180 \pgffor@skip=\dimen181 \pgffor@stack=\toks27 \pgffor@toks=\toks28 )) (/usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex Package: tikz 2021/05/15 v3.1.9a (3.1.9a) (/usr/share/texlive/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers .code.tex File: pgflibraryplothandlers.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgf@plot@mark@count=\count272 \pgfplotmarksize=\dimen182 ) \tikz@lastx=\dimen183 \tikz@lasty=\dimen184 \tikz@lastxsaved=\dimen185 \tikz@lastysaved=\dimen186 \tikz@lastmovetox=\dimen187 \tikz@lastmovetoy=\dimen188 \tikzleveldistance=\dimen189 \tikzsiblingdistance=\dimen190 \tikz@figbox=\box58 \tikz@figbox@bg=\box59 \tikz@tempbox=\box60 \tikz@tempbox@bg=\box61 \tikztreelevel=\count273 \tikznumberofchildren=\count274 \tikznumberofcurrentchild=\count275 \tikz@fig@count=\count276 (/usr/share/texlive/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex File: pgfmodulematrix.code.tex 2021/05/15 v3.1.9a (3.1.9a) \pgfmatrixcurrentrow=\count277 \pgfmatrixcurrentcolumn=\count278 \pgf@matrix@numberofcolumns=\count279 ) \tikz@expandcount=\count280 (/usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tik zlibrarytopaths.code.tex File: tikzlibrarytopaths.code.tex 2021/05/15 v3.1.9a (3.1.9a) ))) (/usr/share/texlive/texmf-dist/tex/latex/zref/zref-savepos.sty Package: zref-savepos 2020-07-03 v2.32 Module savepos for zref (HO) (/usr/share/texlive/texmf-dist/tex/latex/zref/zref-base.sty Package: zref-base 2020-07-03 v2.32 Module base for zref (HO) (/usr/share/texlive/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty Package: ltxcmds 2020-05-10 v1.25 LaTeX kernel commands for general use (HO) ) (/usr/share/texlive/texmf-dist/tex/generic/infwarerr/infwarerr.sty Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO) ) (/usr/share/texlive/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty Package: kvsetkeys 2019/12/15 v1.18 Key value parser (HO) ) (/usr/share/texlive/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty Package: kvdefinekeys 2019-12-19 v1.6 Define keys (HO) ) (/usr/share/texlive/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty Package: pdftexcmds 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO ) (/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty Package: iftex 2020/03/06 v1.0d TeX engine tests ) Package pdftexcmds Info: \pdf@primitive is available. Package pdftexcmds Info: \pdf@ifprimitive is available. Package pdftexcmds Info: \pdfdraftmode found. ) (/usr/share/texlive/texmf-dist/tex/generic/etexcmds/etexcmds.sty Package: etexcmds 2019/12/15 v1.7 Avoid name clashes with e-TeX commands (HO) ) (/usr/share/texlive/texmf-dist/tex/latex/auxhook/auxhook.sty Package: auxhook 2019-12-17 v1.6 Hooks for auxiliary files (HO) ) Package zref Info: New property list: main on input line 764. Package zref Info: New property: default on input line 765. Package zref Info: New property: page on input line 766. ) Package zref Info: New property list: savepos on input line 80. Package zref Info: New property: posx on input line 82. Package zref Info: New property: posy on input line 83. ) \ansfile=\write4 \answ=\skip49 \ansh=\skip50 \c@question=\count281 \c@ansbox=\count282 \AnsIDs=\toks29 \AnsX=\toks30 \AnsY=\toks31 \AnsW=\toks32 \AnsH=\toks33 \AnsText=\toks34 (./mintest5.aux) \openout1 = `mintest5.aux'. LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 85. LaTeX Font Info: ... okay on input line 85. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 85. LaTeX Font Info: ... okay on input line 85. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 85. LaTeX Font Info: ... okay on input line 85. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 85. LaTeX Font Info: ... okay on input line 85. LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 85. LaTeX Font Info: ... okay on input line 85. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 85. LaTeX Font Info: ... okay on input line 85. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 85. LaTeX Font Info: ... okay on input line 85. (/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii [Loading MPS to PDF converter (version 2006.09.02).] \scratchcounter=\count283 \scratchdimen=\dimen191 \scratchbox=\box62 \nofMPsegments=\count284 \nofMParguments=\count285 \everyMPshowfont=\toks35 \MPscratchCnt=\count286 \MPscratchDim=\dimen192 \MPnumerator=\count287 \makeMPintoPDFobject=\count288 \everyMPtoPDFconversion=\toks36 ) (/usr/share/texlive/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty Package: epstopdf-base 2020-01-24 v2.11 Base part for package epstopdf Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4 85. (/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv e )) \openout4 = `answers.txt'. LaTeX Font Info: External font `cmex10' loaded for size (Font) <7> on input line 87. LaTeX Font Info: External font `cmex10' loaded for size (Font) <5> on input line 87. \i=\count289 ! Undefined control sequence. \currW ...firstofone{\spacefactor \@m {}car\strip @pt\answ ,\strip @pt\answ ... l.93 \end{document} ? ! Emergency stop. \currW ...firstofone{\spacefactor \@m {}car\strip @pt\answ ,\strip @pt\answ ... l.93 \end{document} End of file on the terminal! Here is how much of TeX's memory you used: 12504 strings out of 478287 261794 string characters out of 5849289 513433 words of memory out of 5000000 30492 multiletter control sequences out of 15000+600000 469567 words of font info for 29 fonts, out of 8000000 for 9000 1141 hyphenation exceptions out of 8191 100i,2n,104p,414b,398s stack positions out of 5000i,500n,10000p,200000b,80000s ! ==> Fatal error occurred, no output PDF file produced!
- Change English parenthesis for Chinese parenthesis in equation numbersby M. Logic on March 7, 2026 at 1:51 pm
An MWS is as follows. \documentclass{ctexart} \usepackage{amsmath} \makeatletter %change English parenthesis for Chinese parenthesis \def\tagform@#1{\maketag@@@{(\ignorespaces#1\unskip\@@italiccorr)}} %\newcommand{\eqref}[1]{\textup{\tagform@{\ref{#1}}}} \makeatother \begin{document} 测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字。我们有如下结论: \begin{equation} y=x^2+7x+9\text{。} \end{equation} 测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字。 \end{document} To change English parenthesis for Chinese parenthesis in equation numbers, I revised the definition of \tagform@ is amsmath. While since there are some spaces after the Chinese parenthesis, the Chinese parenthesis are not aligned to the right side. So is there anyway to fix this?
- Number of slide at the beginning (OpTeX slides)by juanuni on March 7, 2026 at 6:47 am
I am working with optex 1.17, which comes with TeXLive 2023. I am creating slides, but I am having a problem with the counter at the beginning, on the cover slide. The slide number appears near the lower right corner. How can I make it disappear? Am I doing something wrong? How can I customize the slide number design for the following slides? \fontfam[Fira] \slides \wideformat \load[colors] \def\author#1{\def\theauthor{#1}} \author{Titor} % Redefinimos \tit y \subtit para que solo guarden el texto % pero NO generen una página extra. \def\tit #1{\def\thetit{#1}} \def\subtit #1{\def\thesubtit{#1}} \tit{My slide} \subtit{first intent} \def\azul{\pdfliteral{0.408 0.824 0.875 rg}} \def\gris{\pdfliteral{0.4706 0.5098 0.5412 rg}} \def\negro{\pdfliteral{0 g 0 G Q}} % 2. CARÁTULA MANUAL (Sin margen) \puttext -150mm 0mm {% \vbox to 0pt{ \offinterlineskip \vskip -50mm \vbox{ {\azul\hrule height 90mm width 500mm} {\gris\hrule height 185mm width 500mm} } \vss }% } % 3. CONTENIDO USANDO LAS MACROS NEUTRALIZADAS \null \vskip -1cm %\centerline{ {\setfontsize{at45pt}\caps\rm \pdfliteral{1 1 1 rg} \thetit}%} \vskip 1.5cm %\centerline{ {\setfontsize{at19pt}\caps\it \pdfliteral{0 g} \theauthor}%} \vskip 1cm %\centerline{ {\setfontsize{at20pt}\caps\rm \pdfliteral{0.408 0.824 0.875 rg} \thesubtit}%} \vskip 2cm % {\setfontsize{at15pt}\caps\rm \pdfliteral{0 g}Presented by} \vskip 0cm {\setfontsize{at19pt}\caps\rm \pdfliteral{0 g}Me} \vfill \pg+ % 4. REGISTRO Y CONFIGURACIÓN PARA EL RESTO DE SLIDES \negro \pgbackground={} \def\HeadColor{\pdfliteral{0 g}} \pg; %%%%%%%%%%%%%%%%%%%%%%%%%5 %%%%%%%%%%%%%%%%sec title bar \newdimen\framebarheight \framebarheight=1.2cm \let\oldprintsec=\_printsec \def\_printsec#1{% % barra superior absoluta \puttext -20mm 0mm {% \vbox to0pt{ \offinterlineskip \vskip -16mm \vbox{ {\gris\hrule height 17.5mm width 500mm} %{\gris\hrule height 185mm width 500mm} } \vss } } % acercar el título a la barra \vskip-1.4cm %%%%%%%%%%%%%%%%%%%%custom sec \hbox to\hsize{ \hskip -2.5mm {\azul\setfontsize{at25pt}\caps\rm #1} \hfil \vbox to10mm{ \vfil \hbox{\picw=10mm \inspic{logo.png}} \vfil } \hskip 2.5mm } \par \vskip 6mm } %%%%%%%%%%%%%%%%%%%%%%% %\bigskip %%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%custom bullets \def\BulletColor{0.408 0.824 0.875} \_sdef{_item:X}{% {\pdfliteral{\BulletColor\space rg}\_raise.2ex\_fullrectangle{.8ex}}% \pdfliteral{0 0 0 rg}% \kern.5em } \_sdef{_item:x}{% {\pdfliteral{\BulletColor\space rg}\_raise.3ex\_fullrectangle{.6ex}}% \pdfliteral{0 0 0 rg}% \kern.4em } %%%%%%%%%%%%%%%%%%%%%%%%%% %\pageno=1 %\def\pgfoot{\hfil\the\pageno} \sec Useful links * Wikipedia: \url{https://wikipedia.org} * DuckDuckGo: \url{https://duckduckgo.org} \pg.
- How to customize a header on a nomenclature groupby Knudsen on March 7, 2026 at 4:46 am
I have a set of entries on a nomenclature package that I would like to right-adjust the header of the group. I am able to change the font, color, etc ... but have not succeeded in moving it down to the right, even though it looks possible. In this example here, the word Sets accepts a command \textcolor{gray}{\textbf{Sets}} but NOT the command \hfill\textcolor{gray}{\textbf{Sets}}. My MWE is: \documentclass{report} \usepackage{xcolor} % With notocbasic because of: %https://tex.stackexchange.com/questions/724740/clash-between-package-ntexindy -L english -C utf8 duo-eb.idxomencl-and-possibly-polyglossia/ \usepackage[refpage,intoc,notocbasic]{nomencl} \makenomenclature \renewcommand{\nomname}{List of Symbols} \usepackage{ifthen} \setlength{\nomitemsep}{1pt} % --- REDEFINE \nomgroup TO ADD HEADERS --- \renewcommand{\nomgroup}[1]{% % Adds extra space between groups \item[\vspace{10pt}] % Check the letter assigned to the group and print the header \ifthenelse{\equal{#1}{A}}{\item[{\textcolor{gray}{\textbf{Sets}}}]}{% \ifthenelse{\equal{#1}{B}}{\item[{\textcolor{gray}{\textbf{Sequences}}}]}{% \ifthenelse{\equal{#1}{D}}{\item[{\textcolor{gray}{\textbf{O-notation}}}]}{% } } } } \begin{document} \nomenclature[A-set]{$\max X$}{maximum of a set} \nomenclature[A-set]{$\min X$}{minimum of a set} \nomenclature[A-ysup-inf]{$\liminf_{x\to a}$}{lower limit} \nomenclature[A-ysup-inf]{$\limsup_{x\to a}$}{upper limit} \nomenclature[A-ysup-inf]{$\lim_{t \to a}$}{limit when $t$ approaches $a$} \nomenclature[A-ysup-inf]{$\inf X$}{infimum of the set X} \nomenclature[A-ysup-inf]{$\sup X$}{supremum of the set X} \nomenclature[B-sequence]{$\{f_n\}$}{sequence of functions} \nomenclature[B-sequence]{$(x_n)$}{sequence of numbers} \nomenclature[B-sequence-z]{$\ell^2(N)$}{space of square summable sequences}% \nomenclature[D-o-not]{$f(x)\sim g(x)$}{assymptotically equal} \nomenclature[D-o-not]{$o(g(x))$}{Landau o-notation} \nomenclature[D-o-not]{$O(g(x))$}{Landau O-notation} \printnomenclature[3.5cm] \end{document} to be processed with: xelatex t makeindex t.nlo -s nomencl.ist -o t.nls xelatex t
- Confusions with the new babel-german v3.0by Jinwen on March 7, 2026 at 4:12 am
I am a little bit confused with the new babel-german v3.0, where the naming convention has a breaking change: post-1996 convention is now the default one. Is it OK to still use ngerman in current documents? Would it be different with using the new german option? Should the replacement of ngerman be german or german-de/german-germany? The documentation suggests that "it is always advisable to use a more precise option such as german-de". Thus perhaps it should be safer and more stable to use german-de instead of german. For package authors passing/detecting language options, should there be any caution with this new change? (For example, shall one need to detect the version and apply different rules separately?) Thanks so much!
- Italian Parliament: semicircle and colored dotsby Sebastiano on March 6, 2026 at 8:39 pm
I am preparing a project that involves representing the Italian Parliament using a semicircle made of colored dots, as shown in the following image: I have tried to create something using the wheelchart package (page 19 of the manual), which allows generating similar charts. However, I am unable to automatically increase the number of dots per row. For example, in the figure there are 12 dots per row, but I would like a more customizable (for example 7 balls for every radius) and automatic solution to control this. I prefer big dots and not balls. \documentclass{article} \usepackage{tikz} \usepackage{wheelchart} \begin{document} \begin{tikzpicture} \pgfkeys{ /wheelchart, discrete, discrete pic={\shade[ball color=\WCvarB] (0,0) circle[radius=2pt];}, discrete sort=angle, discrete space at borders=false, start angle=180, total angle=180, value=\WCvarA } \wheelchart{ 120/blue/, 45/green/, 40/red/, 25/orange/, 10/purple/, 5/teal/ } \end{tikzpicture} \end{document}
- Best way to get an extensible arrow with no arrowheads?by Dylan Thurston on March 6, 2026 at 6:42 pm
There are various packages that will conveniently give extensible arrows with sub/superscripts. I'm aware of: amsmath (only for basic arrows) mathtools extarrows chemarrow You can of course do the same thing with TikZ or similar. I want something similar, but with no arrowheads at all. What's the best way to achieve that? I can do it with TikZ, but the mildly annoying part would be matching the standard arrow height and width. Should I figure out how to use the internal \arrowfill@ command in amsmath? My application is essentially marking a chain of edges connected in a graph, with various labels on the edges. Here's one attempt using a text em-dash. You can see that the em-dash isn't the same as the math-mode arrow. \documentclass[12pt]{amsart} \begin{document} \[ x \overset{\mathcal{U}}{\mathbin{\text{---}}} y \overset{\mathcal{U}}{\longrightarrow} z\] \end{document}
- VS Code LaTeX Workshop: latexmk -pdfps fixes chemnum issue but breaks PNG graphics (Cannot determine size of graphic)by palloc on March 6, 2026 at 5:29 pm
I am compiling a LaTeX document in VS Code using the LaTeX Workshop extension on Windows 11. My document uses: chemnum / chemstyle nomencl biblatex mhchem Originally my latexmk tool was configured with: -pdf However, this produced incorrect compound labels when using chemnum with a scheme environment (temporary labels such as TMP1, TMP2 were not replaced). Following advice from a previous question, I changed the compilation pipeline to: -pdfps, (see my previous question: VS Code LaTeX Workshop: how to configure settings.json when using both chemnum and nomencl?) This indeed fixes the chemnum labeling issue. However, now I cannot include PNG graphics. For example: \begin{figure} \centering \includegraphics[scale=0.8]{random.png} \caption{random} \label{fig:random} \end{figure} produces the error: Cannot determine size of graphic (no BoundingBox) (This also does not work with [width=0.5\textwidth] or when using a .pdf image instead of .png.). In the real document there are several PNG graphics. I would also like all PNG images to be included with a fixed scale=0.8. I found the following related question, but it is quite old, so perhaps there is a more up-to-date solution: Cannot determine size of graphic settings.json { "latex-workshop.latex.tools": [ { "name": "latexmk", "command": "latexmk", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "-pdfps", "%DOC%" ] }, { "name": "makenomenclature", "command": "makeindex", "args": [ "%DOCFILE%.nlo", "-s", "nomencl.ist", "-o", "%DOCFILE%.nls" ] } ], "latex-workshop.latex.recipes": [ { "name": "latexmk → nomencl → latexmk", "tools": [ "latexmk", "makenomenclature", "latexmk" ] } ], "latex-workshop.latex.recipe.default": "latexmk → nomencl → latexmk", "latex-workshop.latex.autoBuild.run": "never", } aromatic-compounds.eps https://drive.google.com/file/d/1faCOOvd5xcVAF_KZqhx7vAI0Mqh7pmF6/view?usp=sharing main.tex \documentclass{article} \usepackage{geometry} \usepackage{graphicx} \usepackage[version=4]{mhchem} \usepackage{chemstyle} \usepackage{chemnum} \usepackage[backend=biber]{biblatex} \addbibresource{bib.bib} \usepackage{nomencl} \makenomenclature \begin{document} \nomenclature{A}{a} \printnomenclature \section{First} \cite{knuth1984texbook} \begin{scheme} \replacecmpd{benezen1} \replacecmpd{toluene1} \includegraphics[scale=0.8]{aromatic.eps} \caption{Aromatic-compounds-1} \label{aromatic-compounds-1} \end{scheme} \begin{scheme} \replacecmpd{benezen2} \replacecmpd{toluene2} \includegraphics[scale=0.8]{aromatic.eps} \caption{Aromatic-compounds-2} \label{aromatic-compounds-2} \end{scheme} \begin{figure} \centering \includegraphics[width=0.5\textwidth]{random.png} \caption{random} \label{fig:random} \end{figure} \refcmpd{benezen, toluene} \printbibliography \end{document} bib.bib @book{knuth1984texbook, title={The texbook}, author={Knuth, Donald Ervin and Bibby, Duane}, volume={15}, year={1984}, publisher={Addison-Wesley Reading} }
- Ignore case sensitivity in Indexby GowriSaro on March 6, 2026 at 10:29 am
I'm using: \documentclass{book} \usepackage{makeidx} \makeindex \begin{document} Test\index{Test} \newpage test\index{test} \end{document} after running makeindex, output generated as: \begin{theindex} \item Test, 1 \item test, 2 \end{theindex} Is this possible to ignore the case sensitivity and generate the output as \item Test 1, 2?
- What would be the expl3 equivalent of \setbox0... + (Lua) box[0]by Denis Bitouzé on March 6, 2026 at 10:01 am
This question is a followup of a previous question of mine that David kindly answered with the following example: \documentclass{article} \usepackage{csquotes} \def\test#1{% \setbox0\hbox{#1}% \usebox{0}% \directlua{ local nn=0 for n in node.traverse_glyph(tex.box[0].head) do nn=n.char end if nn==8221 then tex.print("\string~yes") else tex.print("\string~no") end }} \begin{document} \begin{enumerate} \item \test{“Foo”} \item \test{\enquote{Bar}} \item \test{xyz} \end{enumerate} \ExplSyntaxOff \end{document} I'd like to expl3-ify this MCE and here is the first step which works nicely: \begin{filecontents*}[overwrite]{myfile.lua} function closing_double_quote(glyph) local nn=0 for n in node.traverse_glyph(glyph) do nn=n.char end if nn==8221 then tex.print("yes") else tex.print("~no") end end \end{filecontents*} \documentclass{article} \usepackage{csquotes} \ExplSyntaxOn \lua_now:n{ require('myfile') } \cs_new_protected:Nn \__mymodule_closing_double_quote:n { \setbox0\hbox{#1} \usebox{0} : \c_space_tl \lua_now:n{ tex.write(closing_double_quote(tex.box[0].head)) } } \begin{document} \begin{enumerate} \item \__mymodule_closing_double_quote:n {“Foo”} \item \__mymodule_closing_double_quote:n {\enquote{Bar}} \item \__mymodule_closing_double_quote:n {xyz} \end{enumerate} \end{document} What remains is: \setbox0\hbox{#1} \usebox{0} that could be expl3-ified as follows: \hbox_set:Nn \l_tmpa_box { #1 } \box_use:N \l_tmpa_box But what would be the equivalent of box[0] in the Lua code: tex.write(closing_double_quote(tex.box[0].head))
- How to set the vertical space between subtables?by CarLaTeX on March 6, 2026 at 8:51 am
Is it possible to set the vertical space between two subtables as in Table 2 in the following MWE, but using something more "automatic" than setting a \vspace manually? \documentclass{book} \usepackage{subcaption} \subcaptionsetup[table]{position=top} \begin{document} \begin{table}[ht]\centering \caption{Table caption} \begin{subtable}{\linewidth}\centering \caption{First subtable caption} \begin{tabular}{cc} \hline a & b \\ c & d \\ \hline \end{tabular} \end{subtable} \begin{subtable}{\linewidth}\centering \caption{Second subtable caption} \begin{tabular}{cc} \hline e & f \\ g & h \\ \hline \end{tabular} \end{subtable} \end{table} \begin{table}[ht]\centering \caption{Table caption} \begin{subtable}{\linewidth}\centering \caption{First subtable caption} \begin{tabular}{cc} \hline a & b \\ c & d \\ \hline \end{tabular} \end{subtable}\vspace{10pt} \begin{subtable}{\linewidth}\centering \caption{Second subtable caption} \begin{tabular}{cc} \hline e & f \\ g & h \\ \hline \end{tabular} \end{subtable} \end{table} \end{document} Maybe this is a trivial question, but I found only the \vspace (or similar) answers.
- \not\supseteq with kpfontsby Jinwen on March 6, 2026 at 4:21 am
With kpfonts, \not\supseteq becomes \supsetneq, which is not desirable: Expected result should look like: This appears to be a bug, because \not\subseteq looks fine. However, before the package gets fixed, is there any temporary way to fix this behavior? \documentclass{article} % \usepackage{kpfonts} % \usepackage{unicode-math} \usepackage{kpfonts-otf} \begin{document} \( \not\supseteq \) \end{document}