• Drawing pie-charts side by side
    by giofrida on March 9, 2026 at 5:19 pm

    I need to draw three pie-charts side by side e.g. using the pgf-pie package so that the centers of the charts lie on the same imaginary line and are the same distance from each other. Each chart should occupy roughly one third of the \textwidth, but slice labels may overflow the margins. I should also be able to caption each chart individually. So far I only managed to align the three charts but I don't know how to draw them relative to \textwidth and how to caption them: \begin{figure} \centering \begin{tikzpicture} \pie[pos={0,0},radius=2]{30/Label A, 40/Label B, 30/Label C} \pie[pos={5,0},radius=2]{20/Label A, 50/Label B, 30/Label C} \pie[pos={10,0},radius=2]{25/Label A, 25/Label B, 50/Label C} \end{tikzpicture} \caption{Whole figure caption} \end{figure} If I make three distinct tikzpictures, the charts end up misaligned probably due to the slice labels. Any help is appreciated.

  • Fail to produce an octagon by repeating -- ([turn]45:{sqrt(2)}) 8 times with foreach
    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?

  • How to vertically align a separator (comma) between two minipage environments containing equation blocks in LaTeX?
    by mingabua on March 9, 2026 at 3:48 pm

    I have the following problem. I want to have two labels for two constraints in a single math line. I achieved this with \minipage. I want to separate the two with just a comma. Unfortunately, in my output, the comma looks strange or "shifted" vertically. How can I align it with the summation sign at level 0? This is what it looks like currently. This is an MWE, but unfortunately I can't reproduce it 100% (probably due to the class used for the document). Maybe you have an alternative for the comma. \documentclass{article} \usepackage{amsmath} \usepackage{cleveref} \usepackage{acro} % Acronym definition \DeclareAcronym{sp}{short=SP, long=Subproblem} \begin{document} fully cover $\mathcal{P}(k)$ or avoid it entirely. We enforce \labelcref{eq:branch:sp_rest_a,eq:branch:sp_rest_b} in the left and right $\ac{sp}_k$, respectively:\\ \begin{subequations} \noindent \begin{minipage}{0.47\textwidth} \begin{equation} \sum_{(j,t) \in \mathcal{P}(k)} x_{kjt} \leq |\mathcal{P}(k)| - 1 \label{eq:branch:sp_rest_a} \end{equation} \end{minipage},% \begin{minipage}{0.47\textwidth} \begin{equation} \sum_{(j,t) \in \mathcal{P}(k)} x_{kjt} = |\mathcal{P}(k)| \cdot \omega^{\text{Full}}_{kl} \label{eq:branch:sp_rest_b} \end{equation} \end{minipage} \end{subequations} \vskip1em \noindent For the right branch, \end{document}

  • Map \[ and \] to the align* environment instead of equation* environment
    by David K. on March 9, 2026 at 3:32 pm

    I am lazy. I'm typing up a rather large handwritten script of notes by my Professor in Latex and I frequently have to type out multi-line equations interlaced with single lines of text. To save on time I would like to use the \[ and \] to begin and end the align* environment having to type out \begin{align*}\end{align*} every time. I tried \usepackage{amsmath} \usepackage{amssymb} %... more packages \renewcommand{\[}{\begin{align*}} \renewcommand{\]}{\end{align*}} However this throws an error at a place I did not expect. With this Code: Die Teilchenzahl ist dann \[ N = n N_A = \SI{16.65}{mol} \cdot 6.022 \cdot 10^{23} \unit{mol^{-1}} \] Jedes Molekül hat 6 Koordinaten: $q_x$, $q_y$, $q_z$, $p_x$, $p_y$, $p_z$. \begin{align*} \dot q_i = \frac{\partial \mathcal H}{\partial p_i}, && \dot p_i = -\frac{\partial \mathcal H}{\partial q_i} \end{align*} Als Konsequenz müssen $6\cdot 10^{25}$ Gleichungen gelöst werden. Wir müssen also anders vorgehen! I get this error: Runaway argument? Als Konsequenz müssen $6\cdot 10^{25}$ Gleichungen gelöst werden. \ETC. ! Paragraph ended before \align* was complete. <to be read again> \par l.20 ? ! Missing $ inserted. <inserted text> $ l.20 ? ! Missing \endgroup inserted. <inserted text> \endgroup l.20 ? ! Display math should end with $$. <to be read again> \tex_par:D l.20 ? The error disappears if you comment out the previous \[\] block. Switching to Tex-Primitives has the same result \makeatletter \def\[{\begin{align*}} \def\]{\end{align*}} \makeatother Minimal Reproducable Example \documentclass[a5paper]{book} \usepackage[ngerman]{babel} \usepackage{siunitx} \usepackage{amsmath} \usepackage{amssymb} \renewcommand{\[}{\begin{align*}} \renewcommand{\]}{\end{align*}} \title{Remapping Align*} \author{Stackoverflow} \date{\today} \begin{document} \maketitle \newpage This is an equation: \[ N = n N_A = \SI{16.65}{mol} \cdot 6.022 \cdot 10^{23} \unit{mol^{-1}} \] Here is an \verb|align*| environment \begin{align*} \dot q_i = \frac{\partial \mathcal H}{\partial p_i}, && \dot p_i = -\frac{\partial \mathcal H}{\partial q_i} \end{align*} This is an inline equation $6\cdot 10^{25}$ and some text after it. \end{document} Compile wit pdflatex main.tex

  • Equations get incorrectly numbered when labels are not used
    by Arya1050 on March 9, 2026 at 2:45 pm

    \documentclass{amsart} \usepackage{autonum} \begin{document} \begin{align} A_1 = B_1 \label{EQ1} \end{align} \begin{align} A_2 = B_2 \label{EQ2} \end{align} \begin{align} A_3 = B_3 \label{EQ3} \end{align} Using \eqref{EQ1}--\eqref{EQ3} \end{document} I want the last line to run as "Using (1)-(3)". Instead, I get "Using (1)-(2)", since the label for the second equation isn't referenced. Is there a way to fix this without writing tags separately for each equation? This would help since the solution would be flexible to adjust to more equations. (In this example, every equation is numbered. But for the document I am working on, some equations are not numbered as I don't want them to be. That's why I am using autonum.)

  • Why is \setbeamercolor not working?
    by UniCoder1966 on March 9, 2026 at 2:25 pm

    I try to use \setbeamercolor to change the color of titles and other things in my beamer LaTeX file, however it is not working. MWE: \documentclass{beamer} \usetheme{default} \usecolortheme{default} \definecolor{BlauI}{HTML}{00376c} \setbeamercolor{title}{fg=BlauI} \setbeamercolor{frametitle}{fg=BlauI} \usepackage[english]{babel} \usepackage{listings} \usepackage{hyperref} \usepackage{tikz} \usetikzlibrary{positioning, arrows.meta} \usepackage{xcolor} \usepackage{colordef} \usepackage{beamerdefs} \title[Document title]{Document title} \begin{document} \frame[plain]{% \titlepage{} } \frame{ \frametitle{Title of the frame}{} } \end{document} Both the title and frametitle do not change colors. Thanks in advance!

  • 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.) I tried for example \AddToHook{command/textbf/before} and \AddToHook{command/textcolor/before}, but they do not seem to be effective. 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}

  • What is the colordef package?
    by UniCoder1966 on March 9, 2026 at 1:24 pm

    The colordef package is installed in a template I'm using. Deleting it would screw over the entire document. There's no information on this package online or on CTAN. What is it?

  • Porting aligncolsatbottom.sty to TeX Live 2022+
    by ke. on March 9, 2026 at 1:22 pm

    I'm using this template to produce posters with columns that are aligned at the bottom. It seems to be based on this solution by Chris Le Sueur. My problem is that it works with Tex Live 2021, but not with 2022 and up. Here is a minimal example: simple-poster.tex \usepackage{letltxmacro} \usepackage{ifthen} \newif\ifmy@colalign \my@colalignfalse \DeclareOption{colalign}{ \my@colaligntrue } \ProcessOptions\relax \ifmy@colalign % Align the bottoms of columns % Declarations \newcounter{my@column} \newcounter{my@column@loop} \newcounter{my@block} \newdimen\my@columnextraspace \newdimen\my@maxcolheight \newdimen\my@colheight \newdimen\my@blocktopstart \newdimen\my@rounded % Store the natural height and number of blocks of the current column in the aux file \gdef\my@storecolheight{ \ifnum\value{my@column} > 0 % \expandafter\newdimen\csname my@colheight\alph{my@column}\endcsname \expandafter\setlength\csname my@colheight\alph{my@column}\endcsname{\my@colheight} \immediate\write\@auxout{\noexpand\newlabel{my@colheight\alph{my@column}}{{\the\my@colheight}{}}} \immediate\write\@auxout{\noexpand\newlabel{my@numblocks\alph{my@column}}{{\the\c@my@block}}} \fi } \LetLtxMacro{\orig@block}{\block} % Replace the \block command with a version that pads each block by \my@columnextraspace \renewcommand{\block}[3][]{% \ifTP@columnEnvironment \my@blocktopstart=0pt\relax \advance\my@blocktopstart-\TP@blocktop \fi \orig@block[{#1}]{#2}{\vspace*{-0.5\my@columnextraspace}#3\vspace*{-0.5\my@columnextraspace}} \ifTP@columnEnvironment % count number of blocks \stepcounter{my@block} % keep track of the height of the current column \advance\my@blocktopstart\TP@blocktop \advance\my@colheight\my@blocktopstart % don't add the padding to the height \advance\my@colheight-\my@columnextraspace \fi } % Store the maximum natural height of any column in the aux file \gdef\my@storemaxcolheight{ \ifnum\value{my@column} > 0 % \newdimen\my@maxcolheight \newdimen\my@colheight@loop \setcounter{my@column@loop}{0} \loop\ifnum\value{my@column@loop}<\value{my@column} \stepcounter{my@column@loop} \my@colheight@loop\csname my@colheight\alph{my@column@loop}\endcsname \ifnum\my@colheight@loop<\my@maxcolheight \my@maxcolheight\my@colheight@loop \fi \repeat \immediate\write\@auxout{\noexpand\newlabel{my@maxcolheight}{{\the\my@maxcolheight}{}}} \fi } % Read the column height information and calculate how much extra space the current column needs per block \gdef\my@calcextraspace{ \@ifundefined{r@my@maxcolheight}{% \my@columnextraspace=0pt\relax }{% \expandafter\my@maxcolheight\ref{my@maxcolheight} \expandafter\my@colheight\ref{my@colheight\alph{my@column}} \setcounter{my@block}{\ref{my@numblocks\alph{my@column}}} \my@columnextraspace\my@maxcolheight \advance\my@columnextraspace-\my@colheight \divide\my@columnextraspace by \value{my@block} } } % Replace \column command by a version which stores the height (of the previous column) and calls \my@calcextraspace \gdef\column#1{ % #1: relative width \ifTP@columnEnvironment %\my@storecolheight %\stepcounter{my@column} %\my@calcextraspace %\setcounter{my@block}{0} %\my@blocktopstart0pt %\my@colheight0pt % Now the normal \column command \normalsize \setlength{\TP@blocktop}{\TP@coltop} \setlength{\TP@colcenter}{\TP@colcenter+0.5\colwidth+\TP@colspace} \setlength{\colwidth}{#1\TP@visibletextwidth+#1\TP@colspace-\TP@colspace-\blocklinewidth} \setlength{\TP@colcenter}{\TP@colcenter+0.5\colwidth+\blocklinewidth} \fi } % Replace the columns environment with a version which stores the height of the final column and the max column \renewenvironment{columns}{ \TP@columnEnvironmenttrue \setlength{\TP@colcenter}{-0.5\TP@visibletextwidth-\TP@colspace-0.5\blocklinewidth} \global\TP@colcenter=\TP@colcenter \global\TP@coltop=\TP@blocktop \global\TP@colbottom=\TP@blocktop \colwidth=0pt }{ \my@storecolheight \my@storemaxcolheight \TP@columnEnvironmentfalse \global\TP@blocktop=\TP@colbottom } \fi aligncolsatbottom.sty \usepackage{letltxmacro} \usepackage{ifthen} \newif\ifmy@colalign \my@colalignfalse \DeclareOption{colalign}{ \my@colaligntrue } \ProcessOptions\relax \ifmy@colalign % Align the bottoms of columns % Declarations \newcounter{my@column} \newcounter{my@column@loop} \newcounter{my@block} \newdimen\my@columnextraspace \newdimen\my@maxcolheight \newdimen\my@colheight \newdimen\my@blocktopstart \newdimen\my@rounded % Store the natural height and number of blocks of the current column in the aux file \gdef\my@storecolheight{ \ifnum\value{my@column} > 0 % \expandafter\newdimen\csname my@colheight\alph{my@column}\endcsname \expandafter\setlength\csname my@colheight\alph{my@column}\endcsname{\my@colheight} \immediate\write\@auxout{\noexpand\newlabel{my@colheight\alph{my@column}}{{\the\my@colheight}{}}} \immediate\write\@auxout{\noexpand\newlabel{my@numblocks\alph{my@column}}{{\the\c@my@block}}} \fi } \LetLtxMacro{\orig@block}{\block} % Replace the \block command with a version that pads each block by \my@columnextraspace \renewcommand{\block}[3][]{% \ifTP@columnEnvironment \my@blocktopstart=0pt\relax \advance\my@blocktopstart-\TP@blocktop \fi \orig@block[{#1}]{#2}{\vspace*{-0.5\my@columnextraspace}#3\vspace*{-0.5\my@columnextraspace}} \ifTP@columnEnvironment % count number of blocks \stepcounter{my@block} % keep track of the height of the current column \advance\my@blocktopstart\TP@blocktop \advance\my@colheight\my@blocktopstart % don't add the padding to the height \advance\my@colheight-\my@columnextraspace \fi } % Store the maximum natural height of any column in the aux file \gdef\my@storemaxcolheight{ \ifnum\value{my@column} > 0 % \newdimen\my@maxcolheight \newdimen\my@colheight@loop \setcounter{my@column@loop}{0} \loop\ifnum\value{my@column@loop}<\value{my@column} \stepcounter{my@column@loop} \my@colheight@loop\csname my@colheight\alph{my@column@loop}\endcsname \ifnum\my@colheight@loop<\my@maxcolheight \my@maxcolheight\my@colheight@loop \fi \repeat \immediate\write\@auxout{\noexpand\newlabel{my@maxcolheight}{{\the\my@maxcolheight}{}}} \fi } % Read the column height information and calculate how much extra space the current column needs per block \gdef\my@calcextraspace{ \@ifundefined{r@my@maxcolheight}{% \my@columnextraspace=0pt\relax }{% \expandafter\my@maxcolheight\ref{my@maxcolheight} \expandafter\my@colheight\ref{my@colheight\alph{my@column}} \setcounter{my@block}{\ref{my@numblocks\alph{my@column}}} \my@columnextraspace\my@maxcolheight \advance\my@columnextraspace-\my@colheight \divide\my@columnextraspace by \value{my@block} } } % Replace \column command by a version which stores the height (of the previous column) and calls \my@calcextraspace \gdef\column#1{ % #1: relative width \ifTP@columnEnvironment \my@storecolheight \stepcounter{my@column} \my@calcextraspace \setcounter{my@block}{0} \my@blocktopstart0pt \my@colheight0pt % Now the normal \column command \normalsize \setlength{\TP@blocktop}{\TP@coltop} \setlength{\TP@colcenter}{\TP@colcenter+0.5\colwidth+\TP@colspace} \setlength{\colwidth}{#1\TP@visibletextwidth+#1\TP@colspace-\TP@colspace-\blocklinewidth} \setlength{\TP@colcenter}{\TP@colcenter+0.5\colwidth+\blocklinewidth} \fi } % Replace the columns environment with a version which stores the height of the final column and the max column \renewenvironment{columns}{ \TP@columnEnvironmenttrue \setlength{\TP@colcenter}{-0.5\TP@visibletextwidth-\TP@colspace-0.5\blocklinewidth} \global\TP@colcenter=\TP@colcenter \global\TP@coltop=\TP@blocktop \global\TP@colbottom=\TP@blocktop \colwidth=0pt }{ \my@storecolheight \my@storemaxcolheight \TP@columnEnvironmentfalse \global\TP@blocktop=\TP@colbottom } \fi With TeX Live 2021, this works and aligns the columns. With TeX Live 2022 and up, on the second run of pdflatex, I get this error: ! Missing number, treated as zero. <to be read again> \xparse function is not expandable l.29 \column{0.5} I don't understand what this means, but maybe something in the redefinition of \column in aligncolsatbottom.sty needs to be adjusted? I quote it here: % Replace \column command by a version which stores the height (of the previous column) and calls \my@calcextraspace \gdef\column#1{ % #1: relative width \ifTP@columnEnvironment \my@storecolheight \stepcounter{my@column} \my@calcextraspace \setcounter{my@block}{0} \my@blocktopstart0pt \my@colheight0pt % Now the normal \column command \normalsize \setlength{\TP@blocktop}{\TP@coltop} \setlength{\TP@colcenter}{\TP@colcenter+0.5\colwidth+\TP@colspace} \setlength{\colwidth}{#1\TP@visibletextwidth+#1\TP@colspace-\TP@colspace-\blocklinewidth} \setlength{\TP@colcenter}{\TP@colcenter+0.5\colwidth+\blocklinewidth} \fi } If I comment out this part: \my@storecolheight \stepcounter{my@column} \my@calcextraspace \setcounter{my@block}{0} \my@blocktopstart0pt \my@colheight0pt then it compiles - but doesn't align the columns, obviously.

  • Grey border artifacts appear around included PDF images [closed]
    by 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. EDIT: I am using MacTex, and here is a Google Drive containing both the pdf of the minimal example, and a few pages out of my thesis that highlight the issue (I post there because I can't seem to upload pdfs to Stack Exchange) (https://drive.google.com/drive/folders/1vq_bSHyk4xiCA5aD6mjKndzvodAcrLLK?usp=sharing). The issue persists when viewing in VS code's viewer, in Mac's preview, in the Google Drive editor, and on my friend's computer. The grey bars appear and disappear, but they are always there somewhere.

  • 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 chemfig
    by 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:

  • Creating a minimal LBX file for BibLaTeX
    by Knudsen on March 9, 2026 at 5:51 am

    I am trying to build a small (minimal) LBX file for a language that BibLaTeX does not support (Simplified Chinese). I built the small file and placed it in my document directory, to keep things simple. TeX does find the file there fine, but it does NOT use the token "bytranslator" as defined in the LBX file, or any other token one may define. What I get is: Bibliography Rudin, Walter (2006). 实分析与复分析. Trans. by 戴牧民 et al. 北京: 机械工业出版社. Can anyone shed some light on what is going on? Here is an MWE showing the problem: \documentclass{report} \begin{filecontents*}{chinese-tl.bib} @book{rudin:zh, author = {Walter Rudin}, title = {\textchinese{实分析与复分析}}, translator = {\textchinese{戴牧民} and \textchinese{张更容} and \textchinese{郑顶伟} and \textchinese{李世余}}, publisher = {\textchinese{机械工业出版社}}, address = {\textchinese{北京}}, year = {2006}, langid = {zh}, } \end{filecontents*} \begin{filecontents*}{chinese.lbx} % chinese.lbx — minimal biblatex localisation snippet \ProvidesFile{chinese.lbx}[2025/12/29 Chinese bibliography strings] \InheritBibliographyExtras{english} \DeclareBibliographyStrings{% translator = {{译者}{译}},% bytranslator = {{译}{译}},% page = {{页}{p。}},% pages = {{页面}{页数}},% } \end{filecontents*} \usepackage{polyglossia} \usepackage{csquotes} \setmainlanguage{english} \setotherlanguage{chinese} \newfontfamily\chinesefont[Script=CJK,Scale=0.74]{Noto Serif CJK JP} \usepackage[style=authoryear, language=auto, autolang=other, backend=biber]{biblatex} \addbibresource{chinese-tl.bib} \begin{document}

  • Failed at creating Barcode using pst-barcode
    by 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 Images
    by 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 it
    by 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 dcases
    by 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 three
    by 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 quiz
    by 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 numbers
    by 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?

  • How to customize a header on a nomenclature group
    by 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.0
    by 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 dots
    by 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}

  • 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} }

  • 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 kpfonts
    by 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 failed
    by 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.