Hot
- Grey border artifacts appear around included PDF imagesby Jack on March 9, 2026 at 11:44 am
I am writing my master's thesis, and consistently come across the issue that inserted pdf images I have drawn in GoodNotes appear with little grey bars around the outside of them. This seems to somehow be a pdf rendering issue, as when I zoom in and out of the final compiled pdf, or view on different machines, the grey bars appear and disappear, though they are remarkably consistently always there somewhere. If I instead choose to insert .png images the issue goes away, but I would really rather have the .pdf images inserted. Here is a minimal working example that will produce the grey bars for me: \documentclass[12pt]{article} \usepackage{graphicx} \usepackage{subcaption} \begin{document} \section{Example} \begin{figure}[!ht] \centering \begin{subfigure}[t]{0.155\textwidth} \centering \includegraphics[width=\linewidth]{images_good/0.2.1.pdf} \end{subfigure} \caption{The unlink} \end{figure} \end{document} Here is a screenshot of the output with the little grey bar highlighted with a red arrow. The image I am inserting is shown below (as a .png because Stack Exchange doesn't let me post .pdf images). Here are some other examples of figures in the document where I use these pdf images and I get more of the little grey bars.
- How to use the \geometry macro to set paperwidth and paperheight? [duplicate]by vmonteco on March 9, 2026 at 10:26 am
I'm trying to use PyLaTeX to generate documents and I'm struggling a bit with the paper dimensions. When using the geometry package, this library generates tex files like this: \documentclass{minimal}% \usepackage{geometry}% \geometry{...}% \begin{document}% ... \end{document} And those tex files are then compiled into pdf files. I'd like to have custom document dimensions and since PyLaTeX uses it, I'm trying to use the \geometry macro the eponymous package provides. And since the paperwidth and paperheight options seem to be relevant ones, here's what I'm trying: \documentclass{minimal}% \usepackage{geometry}% \geometry{paperwidth=5in,paperheight=8in}% \begin{document}% ... \end{document} Yet, when trying to compile (with pdflatex) I'm getting a "Package geometry Error: \paperwidth (0.0pt) too short." error. As if those options weren't set. Why am I getting this error? What's the right way to use the \geometry macro to set those options?
- 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?
- Failed at creating Barcode using pst-barcodeby user516076 on March 9, 2026 at 3:56 am
I wish to have a barcode just like the example below I expect the written barcode would look "roughly" like this: but I changed the *0 1 2 3 4 5 6 7 8 9* to be 0580-02-UT26-001 and it is positioned to the left of the barcode just like the example. So, in short, I just need to add the barcode to my MWE. But it looks odd. The string is showing, but the barcode is missing. So my MWE will look like this: As clearly shown there, it only shows the string, no barcode. this is my MWE and "attempt" for the barcode: \documentclass[12pt,twoside]{article} \usepackage[ a4paper, hmargin=2cm, vmargin=1.8cm ]{geometry} \setlength{\headheight}{15pt} \usepackage{graphicx} \usepackage{tikz} \usepackage{enumitem} \usepackage{setspace} \usepackage[export]{adjustbox} \usepackage{fancyhdr} \usepackage{lipsum} \usepackage{array} \usepackage{amsmath} \usepackage{textcomp} \usepackage{pstricks} \usepackage{pst-barcode} % \usepackage{showframe} \pagestyle{empty} %==================== PAGE STYLE FROM PAGE 2 ONWARD ==================== \fancypagestyle{mypages}{ \fancyhf{} \fancyhead[C]{\thepage} \fancyfoot[L]{\small © Arrohmah Bogor 2026} \fancyfoot[C]{\small 0580/02/UT/26} \fancyfoot[RO]{\small \textbf{[Turn Over]}} \renewcommand{\headrulewidth}{0pt} } \newcolumntype{L}[1]{>{\raggedright\arraybackslash}m{#1}} \newcolumntype{R}[1]{>{\raggedleft\arraybackslash}m{#1}} %==================== STUDENT BARCODE DATA ==================== % visible code on paper \newcommand{\studentcode}{0580-02-UT26-001} % hidden data stored in barcode % start with a SHORT payload first, so placement/scanning is easier \newcommand{\studentpayload}{0580-02-UT26-001-ABIB} % if later you want longer payload, try this instead: % \newcommand{\studentpayload}{0580-02-UT26-001-ABIB-ZAHIR-ALGHANI-SAM} \begin{document} %==================== LOGOS ==================== \begingroup \setlength{\parindent}{0pt} \vspace*{-1.7cm} \vspace{1cm} {\LARGE \textbf{Cambridge IGCSE\texttrademark}} \vspace{10pt} Teacher : Mr. Shandy \vspace{0.6cm} %==================== CANDIDATE BOX ==================== \hspace*{-0.15cm}% \begin{tikzpicture} % Candidate name \node[anchor=west] at (0,0) {\small CANDIDATE}; \node[anchor=west] at (0,-0.5) {\small NAME}; \draw (3,-0.7) rectangle (16,0.3); % Centre number boxes \node[anchor=west] at (0,-1.5) {\small CENTRE}; \node[anchor=west] at (0,-2.0) {\small NUMBER}; \foreach \x in {3,4,5,6,7} \draw (\x,-2.2) rectangle (\x+1,-1.20); % Candidate number boxes \node[anchor=west] at (9,-1.5) {\small CANDIDATE}; \node[anchor=west] at (9,-2.0) {\small NUMBER}; \foreach \x in {12,13,14,15} \draw (\x,-2.2) rectangle (\x+1,-1.20); \end{tikzpicture} \vspace{10pt} %==================== LEFT VERTICAL BARCODE ==================== \noindent\makebox[0pt][l]{% \hspace*{-0.95cm}% \raisebox{-6.0cm}[0pt][0pt]{% \rotatebox{90}{% \begin{minipage}{6.5cm} \centering {\scriptsize\ttfamily \studentcode}\\[2mm] \psbarcode{\studentpayload}{height=0.9 width=0.03}{code128} \end{minipage}% }% }% } %==================== PAPER HEADER ==================== \hrule \begin{tabular}{@{}p{0.6\textwidth}@{}p{0.4\textwidth}@{}} \vspace{1pt} \textbf{MATHEMATICS} Paper 2 Non-calculator (Extended) \vspace{2pt} UNIT TEST PAPER \vspace{2pt} You must answer on the question paper. \vspace{2pt} You will need: Geometrical instruments & \raggedleft \vspace{1pt} 0580/02 October 2025 1 hour 20 minutes \end{tabular} \endgroup \vspace{1pt} \hrule \vspace{0.6cm} %==================== INSTRUCTIONS ==================== \noindent\textbf{INSTRUCTIONS} \begin{itemize}[leftmargin=*, itemsep=0pt] \item Answer \textbf{all} questions. \item Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs. \item Write your name, centre number and candidate number in the boxes at the top of the page. \item Write your answer to each question in the space provided. \item Do \textbf{not} use an erasable pen or correction fluid. \item You are not allowed to use a calculator. \item You may use tracing paper. \item You must show all necessary working clearly. \item Give non-exact numerical answers correct to 3 significant figures, or 1 decimal place for angles in degrees, unless a different level of accuracy is specified in the question. \item For $\pi$, use either your calculator value or 3.142. \end{itemize} \vspace{0.5cm} %==================== INFORMATION ==================== \noindent\textbf{INFORMATION} \begin{itemize}[leftmargin=*, itemsep=0pt] \item The total mark for this paper is 86. \item The number of marks for each question or part question is shown in brackets [ ]. \end{itemize} \vfill \hrule \vspace{0.2cm} \begin{center} This document has \textbf{10} pages. \end{center} \vspace{0.3cm} \noindent \begin{tabular}{@{}p{0.5\textwidth}@{}p{0.5\textwidth}@{}} {\small © Arrohmah Bogor 2026} & \raggedleft {\small \textbf{[Turn Over]}} \end{tabular} \newpage \pagestyle{mypages} % Dummy content for page 2 onward \section*{Formulas} \lipsum[1] \section*{Problems} \lipsum[2-4] \end{document} EDIT I have commented the logo and include. My current workflow: Latex -> Dvips -> ps2pdf -> internal pdf viewer I also need your honest reviews and suggestions also opinions to make my paper looks perfect. T.I.A.
- 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?
- tabularx: multicolumn with exact height of multiple table rows, including 'hline' above itby cis on March 8, 2026 at 7:12 pm
I'm not sure, but I think the dimensions of a table row are like this: What I need is a (breakable, horizontally and vertically centered) multicolumn with an exact height of (1,2,3,...) baselineskips including the \hline above it: How do I correctly dimension a rule for this? \newcommand{\DynamicRowRule}[1]{% #1 = number of rows \rule[ \dimexpr -#1\baselineskip/2 +\baselineskip/2 -0.3\baselineskip +0.5\arrayrulewidth\relax ]{1pt}{\dimexpr #1\baselineskip - \arrayrulewidth\relax}} Hints: a) The main table can have different widths, so I have defined a P-column with dynamic width. b) Nothing should be done with \arraystretch (since the original table contains hundreds of rows whose height is calculated, unimportant for the problem here) \documentclass{article} \usepackage{tabularx} % Input: \setlength\arrayrulewidth{3.45pt}% Test \makeatletter % i) Define 'P' column with dynamic width and breakable \newcolumntype{P}{>{\centering\arraybackslash}p{\dimexpr\TX@target-2\arrayrulewidth\relax}} \makeatother % ii) Define row strut for 1,2,3,... rows \newcommand{\DynamicRowRule}[1]{% #1 = number of rows \rule[ \dimexpr -#1\baselineskip/2 +\baselineskip/2 -0.3\baselineskip +0.5\arrayrulewidth\relax ]{1pt}{\dimexpr #1\baselineskip - \arrayrulewidth\relax}} \newcommand\TestRule{\rule[-0.3\baselineskip]{1pt}{\baselineskip}} \begin{document} \section{Table with Title with a Height of (1,2,\dots) baselineskips minus arrayrulewidth} \noindent \begin{tabularx}{88mm}{|X|c|c|} \hline \multicolumn{3}{|@{}P@{}|}{Centered Title pq\DynamicRowRule{3}} \\ \hline A & B & C \\ \hline Testrule for 1 row: \TestRule pq & Column 2 & Column 3\\ \hline \end{tabularx} \end{document}
- Model for exam. Table + a lot of graphics inside the table [closed]by popescu christian on March 8, 2026 at 4:07 pm
Can someone please help me to create an exam for my kids like this: https://drive.google.com/file/d/10i0dMkumSQJL27frkFaD5IQOf_7EhrkJ/view?usp=drivesdk I can't integrate figures or anything else in my text..... I have been trying...... for a lot.... \documentclass[a4paper,titlepage,12pt]{report} \usepackage[margin=15mm]{geometry} \usepackage{mathrsfs} \usepackage{fancyhdr} \usepackage{pst-eucl} \usepackage{amsmath} % aici introduc simbolul 1 pentru arc (de pe pagina http://tex.stackexchange.com/questions/96680/a-better-notation-to-denote-arcs-for-an-american-high-school-textbook) \makeatletter \DeclareFontFamily{U}{tipa}{} \DeclareFontShape{U}{tipa}{m}{n}{<->tipa10}{} \newcommand{\arc@char}{{\usefont{U}{tipa}{m}{n}\symbol{62}}}% \newcommand{\arc}[1]{\mathpalette\arc@arc{#1}} \newcommand{\arc@arc}[2]{% \sbox0{$\m@th#1#2$}% \vbox{ \hbox{\resizebox{\wd0}{\height}{\arc@char}} \nointerlineskip \box0 }% } \makeatother %%%%%%%%%%%%%%%%%%% iar aici, de pe aceeasi pagiuna, introduc simbolul 2 pentru arc (denumit, de-acum, wideparen) \DeclareFontFamily{OMX}{yhex}{} \DeclareFontShape{OMX}{yhex}{m}{n}{<->yhcmex10}{} \DeclareSymbolFont{yhlargesymbols}{OMX}{yhex}{m}{n} \DeclareMathAccent{\wideparen}{\mathord}{yhlargesymbols}{"F3} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %\usepackage{euler} \usepackage{txfonts} %\usepackage{fourier} \usepackage{amssymb} % l-am pus aici pe asta, adica dupa txfonts, pentru ca sa il redeseneze, mai frumos, pe sphericalangle \usepackage{wasysym} \renewcommand{\angle}{\varangle} \usepackage[colorlinks = true, urlcolor=blue, linkcolor=black]{hyperref} \usepackage{xcolor} \usepackage{wrapfig} \definecolor{dark_green}{rgb}{0.121,0.5,0.0000} \definecolor{ballblue}{rgb}{0.13,0.67,0.8} \definecolor{brightcerulean}{rgb}{0.11, 0.67, 0.84} \definecolor{unitednationsblue}{rgb}{0.36, 0.57, 0.9} \definecolor{grey}{rgb}{0.55,0.55,0.55} \definecolor{magenta}{rgb}{1,0,1} \usepackage{graphicx} \usepackage{tikz} \usetikzlibrary{plotmarks} \allowdisplaybreaks \usepackage{cancel} \usepackage[romanian]{babel} \usepackage{combelow} \usepackage{multicol} \DeclareRobustCommand{\divby}{% \mathrel{\vbox{\baselineskip.65ex\lineskiplimit0pt\hbox{.}\hbox{.}\hbox{.}}}% } \usepackage{lastpage} \pagestyle{fancy} \chead{{\small \color{grey}Modele de teste pentru simularea evaluării sumative la matematic\u{a} la clasa a VIII-a pe semestrul I}% \\ \vspace{5pt} Nume \cb{s}i prenume elev $_{\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots\dots}$ } \renewcommand{\headrulewidth}{0pt} \cfoot{Pagina \thepage\ din \pageref{LastPage}} \begin{document} \begin{titlepage} \LARGE{ \qquad \vfill \begin{center} \textbf{MODEL \#1 DE\\\qquad\\TEST DE EVALUARE SUMATIVĂ\\\qquad\\LA FINAL DE SEMESTRU I\\\qquad\\LA MATEMATICĂ\\ \qquad\\AN ŞCOLAR 2020-2021} \end{center} } \vfill\vfill \small{ \begin{itemize} \item Toate subiectele sunt obligatorii. \vspace{-6pt} \item Se acordă 10 puncte din of\hspace{0.1pt}iciu. \vspace{-6pt} \item Timpul de lucru efectiv este de 2 ore. One exemple but I need to do it like it in pictura. Another exemple What I tried: \documentclass{article}[a4] \usepackage{blindtext} \usepackage{geometry} \geometry{ a4paper, total={170mm,257mm}, left=10mm, right=10mm, top=10mm, bottom=10mm, } \usepackage[T1]{fontenc} \usepackage{titlesec} \usepackage{xcolor} \usepackage[utf8]{inputenc} \usepackage{tikz} \usepackage{amsmath} \usepackage{amssymb} \usepackage{mathtools} \usepackage{multirow} \usepackage{graphicx} \usepackage{amsthm} \usepackage[romanian]{babel} \usepackage{hyperref} \usepackage{enumerate} \usepackage{pdflscape} \usepackage{array} \usepackage{geometry} \usepackage{ragged2e} \usetikzlibrary{arrows} \usepackage[table]{xcolor} \begin{document} \raggedright \textbf{SUBIECTUL I}\\ \begin{flushleft} \textit{\textbf{\^ Incercuie\c ste litera corespunz\u atoare r\u aspunsului corect.}} \hfill \textbf{(30 de puncte)}\\ \end{flushleft} \begin{table}[htbp!] \begin{tabular}{|p{0.45cm}|p{17cm}|} \hline \textbf{5p} & \textbf{1.} \space Rezultatul calculului \(\left(\cfrac{1}{4}\right)^{-2}\cdot \cfrac{1}{2} + 2026^{0} - 10 \) este egal cu :\\ & a) 1 ;\\ & b) -1 ;\\ & c) 0 ;\\ & d) - 3 ;\\ \hline \textbf{5p} & \textbf{2.} \space \c Stiind c\u a \(\cfrac{x}{y} = 0,(4)\), atunci valoarea raportului \(\cfrac{3x}{5x - 2y}\) este egal\u a cu :\\ & a) \(\cfrac{1}{6}\);\\ & b) 6;\\ & c) 12 ;\\ & d) \(\cfrac{1}{9}\);\\ \hline \textbf{5p} & \textbf{3.} \space Luni, temperatura \^ inregistrat\u a la ora 9 la o sta\c tie meteo a fost de \(- 4^{\circ}C\), iar mar\c ti, la aceea\c si or\u a, au fost \^ inregistrate \(2^{\circ}C\).Valoarea absolut\u a a diferen\c tei dintre temperatura \^ inregistrat\u a luni \c si a temperaturii \^ inregistrate mar\c ti este de :\\ & a) \(2^{\circ}C\) ;\\ & b)\(6^{\circ}C\) ;\\ & c) \(-2^{\circ}C\) ;\\ & d)\(6^{\circ}C\) ;\\ \hline \textbf{5p} & \textbf{4.} \space Solu\c tia ecua\c tiei \((x - 1 ):\cfrac{3}{4} = - \cfrac{1}{6}\) este : \\ & a) \(- \cfrac{1}{8}\) ;\\ & b) \(- \cfrac{3}{8}\) ;\\ & c) \( \cfrac{7}{8}\) ;\\ & d) \(-\cfrac{5}{8}\) ;\\ \hline \textbf{5p} & \textbf{5.} \space Patru elevi, Andreea, Mihai, Luca \c si George calculeaz\u a media geometric\u a numerelor \\ & a = \(\sqrt{6}\left( \cfrac{3}{\sqrt{2}} + \cfrac{4}{\sqrt{3}} \right) - \sqrt{27}\) \c si b = \(\sqrt{24}\left(\cfrac{2}{\sqrt{3}} - \cfrac{1}{\sqrt{2}}\right) - (\sqrt{8} - \sqrt{12})\).\\ & Rezultatele calculelor f\u acute de cei patru elevi sunt eviden\c tiate \^ in tabelul de mai jos : \begin{tabular}[t]{ | >{\raggedright}p{2cm} | >{\raggedright}p{2cm} | >{\raggedright}p{2cm} | >{\sffamily}p{\dimexpr\textwidth-12\tabcolsep-5\fboxsep-13.5cm\relax} | } \hline Andreea & Mihai & Luca & George \\ \hline 2 & \(2\sqrt{2}\) & 4 & \(3\sqrt{2}\) \\ \hline \end{tabular} \\[12ex] & Dintre cei patru elevi, cel care a calculat corect media aritmetic\u a a numerelor a \c si b este :\\ & a) Andreea ;\\ & b) Luca ;\\ & c) George ;\\ & d) Mihai;\\ \hline \textbf{5p} & \textbf{6.} \space Un elev a participat la un concurs unde i s-au adresat 24 de \^ intreb\u ari. Pentru fiecare r\u aspuns corect elevul a primit 5 puncte iar pentru fiecare r\u aspuns gre\c sit i s-au sc\u azut 2 puncte. \c Stiind c\u a num\u arul de probleme rezolvate gre\c sit este un sfert din num\u arul total de probleme, atunci punctajul ob\c tinut de elev este de 65 de puncte. Afirma\c tia este :\\ & a) Adev\u arat\u a;\\ & b) Fals\u a ;\\
- An equation in the middle between several equations in cases or dcasesby Sebastiano on March 8, 2026 at 1:42 pm
Starting from \documentclass[a4paper,12pt]{article} \usepackage{mathtools} \begin{document} \[ \begin{cases} x=x(t) & t\in[a,b]\\ y=y(t) \end{cases} \begin{cases} x=x & x\in[0,\pi/3]\\ y=y(x) \end{cases} \] \end{document} I would have this: putting the parameter in the middle between the two equations of the system. And if I had n equations, what would be the way to put it in the middle?
- 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:
- AI confused about creating commands [closed]by user3796661 on March 8, 2026 at 12:36 pm
It's been decades that I did anything with (La)TeX and forgot all about it. So I asked an AI to generate it for me. The goal is to have ca. 96 individually customizable text boxes on a page. The AI generated a class file that does that and a very brief .tex . When I run pdflatex (on Ubuntu), it complains: ! LaTeX Error: Command \Box already defined. Or name \end... illegal, see p.192 of the manual. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.74 \newcommand{\Box01X}{1} \newcommand{\Box01Y}{13} ? H Your command was ignored. Type I <command> <return> to replace it with another command, or <return> to continue without it. What I see is that the AI tries to create special commands for each box, but LaTeX recognises Box01X etc. as the pre-existing Box command. Why is that and how are we supposed to define new commands? The error refers to p.192 of " the" manual but current manuals listed on: https://www.latex-project.org/help/documentation/#general-documentation don't even have that many pages. The 'H' command is ignored by pdflatex. Thanx for any guidance,
- 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?
- this user-defined tagging command breaks with `\labelcref` for `\documentclass{book}`by jonnybolton16 on March 7, 2026 at 11:01 am
This is a follow-up to this question. I have a user-defined command which allows numbering & referencing of a single line in a starred, multiline equation environment, replacing the need to use an un-starred environment with \nonumber at the end of every other line. My first-attempt definition caused problems around ordering when using \labelcref, which the original question sucessfully resolved. The solution was the following command: \makeatletter \newcommand*\my@make@df@tag@@[1]{% \cref@old@make@df@tag@@{#1}% \let\cref@old@df@tag\df@tag \expandafter\gdef\expandafter\df@tag\expandafter{% \cref@old@df@tag \def\cref@currentlabel{% [equation][\arabic{equation}][]#1% }% }% }% \newcommand*\my@make@df@tag@@@[1]{% \cref@old@make@df@tag@@@{#1}% \let\cref@old@df@tag\df@tag \expandafter\gdef\expandafter\df@tag\expandafter{% \cref@old@df@tag \toks@\@xp{\p@equation{#1}}% \edef\cref@currentlabel{[equation][\arabic{equation}][]\the\toks@}% }% }% \newcommand{\TAG}[1]{% \refstepcounter{equation}% \begingroup \let\make@df@tag@@\my@make@df@tag@@ \let\make@df@tag@@@\my@make@df@tag@@@ \tag{\theequation}% \endgroup \label{#1}% }% \makeatother (credit to @Ulrich Diez for the solution and @Ziv for the appendix patch). This command worked perfectly with the \documentclass{article} used in the original question's MWE. Unfortunatley, I have since found that with \documentclass{book} the previous bug returns. Is there a patch to the original solution, or a new solution, that will fix this?
- font size reduction is only being applied to text being lowered in fractionsby Nate on March 7, 2026 at 7:15 am
Since the following line: is going too close to the right margin of the page, I changed the text size of the four larger-text fractions from normal to footnotesize: $$\cos(\alpha) = \frac{\frac{1}{2\tan(36^\circ)}}{\frac{3+\sqrt{5}}{4}} = \begin{footnotesize}\frac{\raisebox{-2pt}{1}}{2\tan(36^\circ)}\bm{\cdot}\frac{\raisebox{-2pt}{4}}{3\!+\!\sqrt{5}} = \frac{\raisebox{-2pt}{4}}{2(3\!+\!\sqrt{5})\!\tan(36^\circ)}\end{footnotesize} \rightarrow m\angle\alpha = \arccos\!\raisebox{-3pt}{$\Bigl($}\!\begin{footnotesize}\frac{\raisebox{-2pt}{4}}{2(3\!+\!\sqrt{5})\!\tan(36^\circ)}\end{footnotesize}\!\raisebox{-3pt}{$\Bigr)$} \approx\!58.2825^\circ$$ But the only characters that were reduced were the numerators I lowered closer to the fraction bar. To shrink the text in the denominators, should I put them inside raisebox too and just "raise" them 0pt? Or is it better to just put the whole thing in single-$ math mode and just use \dfrac instead of \frac since it doesn't really need to be centered anyway (since it takes up the entire width)? Edit: Changing $$ $$ to \[ \] didn't help.
- 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.
- WCAG errors for latex document with equationby Kelly O. Homan on March 7, 2026 at 5:24 am
The following MWE is indicated to produce an accessible PDF, using lualatex in TeXLive-2026, however it produces 26 adaptable failures when checked on the axesCheck web tool. \DocumentMetadata{ lang=en-US, pdfstandard=ua-2, tagging=on, tagging-setup={math/setup={mathml-AF,mathml-SE}} } \documentclass{article} \usepackage{unicode-math} \begin{document} \title{Accessible \LaTeX} \author{I. M. Author} \date{\today} \section{Accessible Math Example} The quadratic formula is: \begin{equation} x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \end{equation} \end{document} I have tried the compilation with and without the unicode-math package and the result is the same. Removal of the equation produces a PDF that is WCAG-compliant, using the same web tool. A foo-luamml-mathml.html file is produced from the lualatex compilation of foo.tex and, when opened in a browser, appears to correctly render the equation. Nonetheless, the issue is to produce a WCAG-compliant PDF. The above MWE also follows the example shown on the LaTeX Tagging Project web page. The downloaded PDF from that example also fails the WCAG-compliance check. What am I missing or misunderstanding?
- 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!
- Use of `\minted@cachedir` has stopped to workby projetmbc on March 6, 2026 at 10:43 pm
This structural organization causes a failure in a previously working solution base on redefining \minted@cachedir. Here is what is happening on macOS with MacTeX 2026. 1st compilation: no issues, but no PDF output, which is normal when using the import package. 2nd compilation: it gets stuck and displays the following message. ERROR MESSAGE ------------- ./test/code.tex:18: Package minted Error: => ./test/code.tex:18: Cannot locate file "test/ main.listing" (kpsewhich faile d). See the minted package documentation for explanation. Type H <return> for immediate help. ... l.18 \end{tdoccode} ? H This error message was generated by an \errmessage command, so I can't give any explicit help. Pretend that you're Hercule Poirot: Examine all clues, and deduce the truth by order and method. ? Here are the codes used. * main.tex + test * code.tex % main.tex % !TEX TS-program = lualatex \documentclass{tutodoc} \usepackage{import} \usepackage{minted} \makeatletter \renewcommand{\minted@cachedir}{\detokenize{_minted-xtra-cache}} \makeatother \usepackage[subpreambles = true]{standalone} \begin{document} \subimport{test/}{code.tex} \end{document} % test/code.tex % !TEX TS-program = lualatex \documentclass{tutodoc} \begin{document} \begin{tdoccode}{lua} palAccent = { {0.4980392157, 0.7882352941, 0.4980392157}, {0.7450980392, 0.6823529412, 0.831372549}, {0.9921568627, 0.7529411765, 0.5254901961}, -- Other RBG colors. } \end{tdoccode} \end{document}
- 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{benezen} \replacecmpd{toluene} \includegraphics[scale=0.8]{aromatic.eps} \caption{Aromatic-compounds} \label{aromatic-compounds} \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} }
- Use a pattern in TikZ multipart nodeby Tobard on March 6, 2026 at 4:56 pm
I would like to apply a pattern decoration in one part of a split node, in TikZ. See the following code: \documentclass[tikz]{standalone} \usetikzlibrary{shapes.multipart, patterns.meta} \begin{document} \begin{tikzpicture}[text width=3cm, draw, rounded corners] \node[draw, fill=yellow, postaction={pattern color=orange, pattern={Lines[distance=10mm,angle=45,line width=5mm]}} ] at (0,0) {Example}; \node[draw, rectangle split, rectangle split parts=2, rectangle split part fill={yellow,white}] at (0,-1) {Title\nodepart{second}Element content}; \end{tikzpicture} \end{document} I would like the "Title" part to look like the "Example" node. I have tried to replace the yellow,white instruction by {yellow, postaction={pattern color=orange, pattern={Lines[distance=10mm,angle=45,line width=5mm]}} },white But it dosn't work. Can you help me? Thanks.
- TikZ: Projecting letter with a cm-matrix onto a 3D rectangular areaby cis on March 6, 2026 at 2:44 pm
I'm drawing a 3D rectangle (which should be a plane, represented by the letter "H"). At the top left corner, at 'C', I want to project a $H$ in mathematical font onto the plane. I've used a cm matrix for this. The position is correct, but I've noticed that the serifs of the 'H' are parallel, despite using $H$, so it doesn't look like mathematical font. What do I need to do? PS: I think, the $H$ should look something like this here: Unfortunately, I can't present it any better. \documentclass[margin=5pt, tikz]{standalone} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture}[ x={(-4.85mm,-4.85mm)}, y={(10mm,0mm)}, z={(0,10mm)}, font=\footnotesize, ] %\coordinate[label=below:$O$](O) at (0,0,0); \coordinate[label=right:A](A) at (0,2,0); \coordinate[label=B](B) at (0,2,2); \coordinate[label={[anchor=south west, inner sep=1pt]{C $H$ (as it should be)}}](C) at (-2.5,-1.5,2); \coordinate[label=left:D](D) at (-2.5,-1.5,0); \draw[] (A) -- (B) -- (C) -- (D) --cycle; \path let \p1 = ($(B)-(C)$), \p2 = ($(C)-(D)$), \n{len1} = {veclen(\x1,\y1)}, \n{len2} = {veclen(\x2,\y2)}, \n1 = {\x1/\n{len1}}, \n2 = {\y1/\n{len1}}, \n3 = {\x2/\n{len2}}, \n4 = {\y2/\n{len2}} in node[cm={\n1, \n2, \n3, \n4, (C)}, anchor=north west, inner sep=1pt, %transform shape, % no effect ]{H $H$ \mbox{$H$}}; % CoSy \begin{scope}[-latex, thick, shift={(0,-2,2)}] \foreach \P/\s/\Pos in {(1,0,0)/x/above, (0,1,0)/y/right, (0,0,1)/z/right} \draw[] (0,0,0) -- \P node[\Pos, pos=0.9,inner sep=3pt]{$\s$}; \end{scope} \end{tikzpicture} \end{document}
- 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}
- Trying to align two different logos using adjustbox, but failedby user516076 on March 6, 2026 at 2:11 am
I tried this solution, but it gives me this result: I wish to have those logos have the same height like this: MWE: \documentclass[12pt,a4paper]{article} \usepackage[a4paper,margin=2cm]{geometry} \usepackage{graphicx} \usepackage{tikz} \usepackage{enumitem} \usepackage{setspace} \usepackage[export]{adjustbox} \pagestyle{empty} \begin{document} %==================== LOGOS ==================== \begin{tabular}{@{}p{0.5\textwidth}@{}p{0.5\textwidth}@{}} \includegraphics[height=2.2cm,valign=t]{newarrohmah.png} & \hfill \includegraphics[height=4cm,valign=t]{cambridge.png} \end{tabular} \vspace{0.4cm} \textbf{Cambridge IGCSE\texttrademark} Teacher : Mr. Shandy \vspace{0.6cm} %==================== CANDIDATE BOX ==================== \begin{tikzpicture} % Candidate name \node[anchor=west] at (0,0) {\small CANDIDATE}; \node[anchor=west] at (0,-0.5) {\small NAME}; \draw (3,-0.7) rectangle (16,-0.1); % Centre number boxes \node[anchor=west] at (0,-2) {\small CENTRE}; \node[anchor=west] at (0,-2.5) {\small NUMBER}; \foreach \x in {3,4,5,6,7} \draw (\x,-2.7) rectangle (\x+1,-2.0); % Candidate number boxes \node[anchor=west] at (9,-2) {\small CANDIDATE}; \node[anchor=west] at (9,-2.5) {\small NUMBER}; \foreach \x in {12,13,14,15} \draw (\x,-2.7) rectangle (\x+1,-2.0); \end{tikzpicture} \vspace{0.8cm} %==================== PAPER HEADER ==================== \begin{tabular}{p{0.7\textwidth}p{0.3\textwidth}} \textbf{MATHEMATICS} Paper 1 Non-calculator & \raggedleft 0862/01 October 2025 1 hour 20 minutes \end{tabular} \vspace{0.4cm} \hrule \vspace{0.4cm} You must answer on the question paper. You will need: HB pencil or (black/dark blue) pen, and/or eraser \vspace{0.6cm} %==================== INSTRUCTIONS ==================== \textbf{INSTRUCTIONS} \begin{itemize}[leftmargin=1.5em, itemsep=2pt] \item Answer \textbf{all} questions. \item Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs. \item Write your name, centre number and candidate number in the boxes at the top of the page. \item Write your answer to each question in the space provided. \item Do \textbf{not} use an erasable pen or correction fluid. \item Do \textbf{not} write on any bar codes. \item You are not allowed to use a calculator. \item You may use tracing paper. \item You must show all necessary working clearly. \item Give non-exact numerical answers correct to 3 significant figures, or 1 decimal place for angles in degrees, unless a different level of accuracy is specified in the question. \item For $\pi$, use either your calculator value or 3.142. \end{itemize} \vspace{0.5cm} %==================== INFORMATION ==================== \textbf{INFORMATION} \begin{itemize}[leftmargin=1.5em] \item The total mark for this paper is 86. \item The number of marks for each question or part question is shown in brackets [ ]. \end{itemize} \vfill \hrule \vspace{0.2cm} \begin{center} This document has \textbf{10 pages} \end{center} \vspace{0.3cm} \begin{tabular}{p{0.5\textwidth}p{0.5\textwidth}} {\small © Arrohmah Bogor 2025} & \raggedleft {\small [Turn Over]} \end{tabular} \end{document} Currently, my paper looks like this: Could someone help me please? If it's done, it might look like both logos will look bigger. So pleasae tell me how to resize it, also. T.I.A. This is the folder that containes the files.