Week
- How to get spaced dots in unicode-mathby dedded on December 31, 2025 at 3:10 pm
The unicode-math package re-defines ellipsis to be the ellipsis character in whatever font you're using, instead of spaced dots. This looks bad in my opinion, and violates the guidance on ellipses in every style guide I own. A solution for \ldots is provided here: variations-in-ldots. But that solution does not fix \cdots, \vdots, or \ddots. I managed to find a solution for \cdots that works in this MWE, but seems to fail in other instances that I haven't figured out a reliable way to reproduce. And I can't figure out a solution for \vdots or \ddots at all. \documentclass{article} \usepackage{unicode-math} \AtBeginDocument{ % From https://tex.stackexchange.com/questions/120627/variations-in-ldots \renewcommand\mathellipsis{\mathinner{\ldotp\ldotp\ldotp}} \renewcommand\cdots{\mathinner{\cdotp\cdotp\cdotp}} % sometimes works %\renewcommand\vdots{\mathinner{\vdotp\vdotp\vdotp}} % doesn't work %\renewcommand\ddots{\mathinner{\ddotp\ddotp\ddotp}} % doesn't work } \begin{document} $\dots, \ldots, \cdots, \vdots, \ddots$ \end{document} Found an example of where my solution for \cdots didn't work. It's when \dots is used instead of \cdots explicitly to centrally place dots: \documentclass{article} \usepackage{unicode-math} \AtBeginDocument{ \renewcommand\mathellipsis{\mathinner{\ldotp\ldotp\ldotp}} \renewcommand\cdots{\mathinner{\cdotp\cdotp\cdotp}} % sometimes works } \begin{document} $x+\dots+ y$ % Do not get spaced dots $x+\cdots+ y$ % Do get spaced dots \end{document}
- Pic or Shape for collection of ready to use objects?by Sammy on December 31, 2025 at 2:25 pm
For the graphics I use on my physics exercise sheets made with TikZ I often use the same objects (hooks, masses, carts, pulleys, force gauges,...). So instead of copy-pasting and modifying the code of these objects I think it makes sense to make them into a ready to use object. There are three ways I know of to make that happen: TeX macros, pics and shapes. There are some features I wish the implementation of these objects to have and need some advice on how to implement it in order to have those features: An object should have multiple anchors so I can easily use certain points for further construction and choose which anchor to use for the placement (so there is no need to calculate that stuff manually). The hook for example could be placed at it's base or the actual hook and either one should be available afterwards for further placement of objects or paths. A default style should be set, i.e. the fill color or shading of the mass body, that can be overwritten. If placed inside a scope that changes shift, rotation, scale, line width,... these changes should automatically also apply to the object as a whole. I want to be able to construct new objects from already existing objects, i.e. I want to be able to use the hook as part of the mass, force gauge and cart. Right now I'm leaning towards defining new shapes, even tho I haven't used low level pgf before. As far as I can see 1 and 3 are no problem with shapes. I feel like 2 could also be achieved (any hints are appreciated - maybe defining a new style that uses that shape?). I however have no Idea if or how to make 4 work in defining a new shape. Pics on the other hand would make 2 and 4 easy as far as I can imagine. But they don't respond to the settings of a scope (3). Also anchors (1) are not natively supported but using tikzmark one answer to this question Anchoring TiKZ pics suggests this could be achieved as well (although I imagine it to be not quite as powerful as a new shape and takes two compilation runs if I understood correctly). Any thoughts, hints or pieces of advice are very welcome. I hope I described the setting clear enough. Edit The following Example is not meant to be beautiful but hopefully helps to illustrate the issue: \documentclass[tikz]{standalone} \usetikzlibrary{calc} \usetikzlibrary{tikzmark} \begin{document} \tikzset{ hook/.pic={ \draw[double=gray!80, double distance=1.4pt] (0,0) .. controls (0,-1.5) and (0,{1/sin(45)-2.5}) .. ($(45:1)+(0,-2.5)$) arc(405:140:1); \node[inner sep=2mm] (-hole) at (0,-2.5) {}; } } \tikzset{ cart/.pic={ \shadedraw[left color=blue, right color=blue!50] (-3,0) rectangle (3,2); \shadedraw[left color=black, right color=gray] (2,-.8) circle (.8); \shadedraw[left color=black, right color=gray] (-2,-.8) circle (.8); \pic[transform shape,rotate=90,scale=.5] (h) at (3,1) {hook}; \coordinate (-front-wheel) at (2,-1.6); \coordinate (-back-wheel) at (-2,-1.6); \node[inner sep=2mm] (-hook) at (h-hole) {}; } } \begin{tikzpicture} \draw (0,0) -- (8,0) -- (8,2); \pic[pic anchor=(-back-wheel),scale=.5] (cart) at (.5,0) {cart}; \pic[rotate=270,xscale=-1,scale=.25] (hook) at (8,0|-cart-hook) {hook}; \draw[ultra thick, line cap=round] (cart-hook) -- (hook-hole); \end{tikzpicture} \end{document} So using a pic with tikzmark (and transform shape as I've discovered) seems to check all the requirements. Can this also be achieved with a custom shape? As in this solution I dislike a few things: tikzmark needs two compilation runs no border anchors can be defined (at least I don't know how) It seems to me all anchors are defined every time a pic is inserted and not calculated when needed as with shapes. I'm not sure about the impacts on compilation time.
- The table is not centering in the itemby M. Logic on December 31, 2025 at 12:18 pm
A MWS is as following. \documentclass{article} \renewcommand{\labelenumi}{(\theenumi)} \usepackage{enumitem} \setenumerate[1,2,3]{itemsep=0pt,partopsep=0.3\baselineskip plus 0.2ex minus 0.1ex,parsep=0pt,topsep=0pt} \setitemize[1,2,3]{itemsep=0pt,partopsep=0.3\baselineskip plus 0.2ex minus 0.1ex,parsep=0pt,topsep=0pt,align=left} \setdescription[1,2,3]{itemsep=0pt,partopsep=0.3\baselineskip plus 0.2ex minus 0.1ex,parsep=0pt,topsep=0pt,align=left} \setlist[enumerate]{leftmargin=2em,align=left,labelwidth=2em,labelsep=0em}%\parindent=2em \setlist[itemize]{leftmargin=1em,align=left,labelwidth=1em,labelsep=0em} \setlist[description]{leftmargin=2em,align=left,labelwidth=1em,labelsep=1em} \usepackage{amsthm} \theoremstyle{theorem} \newtheorem{theorem}{Theorem}[section] \theoremstyle{definition} \newtheorem{definition}[theorem]{Definition} \newtheorem{remark}[theorem]{Remark} \usepackage{longtable, makecell, booktabs, multicol, multirow} \usepackage{lipsum} \begin{document} \section{Test} \begin{remark} \begin{enumerate} \item \lipsum[1] \begingroup %\setlength{\LTleft}{0pt}\setlength{\LTright}{0pt} \begin{longtable}{p{1cm}<{\centering}p{1cm}<{\centering}p{1.5cm}<{\centering}p{1.5cm}<{\centering}p{2.5cm}<{\centering}} \caption{On Implications} \\\toprule $\phi$&$\psi$&$\phi\to\psi$&$\phi\wedge\psi$&$\phi\wedge\psi\to\phi$\\ \midrule\endfirsthead% \midrule $\phi$&$\psi$&$\phi\to\psi$&$\phi\wedge\psi$&$\phi\wedge\psi\to\phi$\\ \midrule\endhead \midrule\endfoot \bottomrule\endlastfoot 1&1&1&1&1\\ 1&0&0&0&1\\ 0&1&$x$&0&1\\ 0&0&$y$&0&1\\ \end{longtable} \endgroup \lipsum[2] \item \lipsum[3] \end{enumerate} \end{remark} \end{document} As you see, the table is centering on the page in in horizontal direction but not centering in the item of the enumerate environment. Is there any way to make the table be centering in the item of the enumerate environment?
- How to properly generate nested pgfkeys procedurally?by dsacre on December 31, 2025 at 10:57 am
Task Consider the following: One needs to store a over time varying amount of pgfkeys entries with a nested data structure. All the entries have the same structure, but the content may vary. So one defines a macro to handle the pgfkeys structure initialization automatically when the user sets the data. Artificial Example: Inventory (MWE) \documentclass[parskip=full]{scrreprt} \usepackage{pgffor} \usepackage{pgfkeys} % DESCRIPTION: Set up inventory entries manually \pgfkeys{ /handlers/.is setter/.code=\pgfkeysedef{\pgfkeyscurrentpath}{% \noexpand\pgfqkeys{\pgfkeyscurrentpath}{##1}% },% /inventory/.cd, Manual 5 Speed/.is setter, Manual 5 Speed/inventory id/.initial = XXXXXXXXXX, Manual 5 Speed/product/.is setter,% Manual 5 Speed/product/manufacturer/.initial = EMPTY, Manual 5 Speed/product/product id/.initial = EMPTY, Manual 6 Speed/.is setter, Manual 6 Speed/inventory id/.initial = YYYYYYYYYY, Manual 6 Speed/product/.is setter,% Manual 6 Speed/product/manufacturer/.initial = EMPTY, Manual 6 Speed/product/product id/.initial = EMPTY } % DESCRIPTION: Logic for creating pgfkey "database" entry automatically and setting them to user specified data % ARGUMENTS: #1 = entry product, #2 = entry data \newcommand{\generateEntry}[2]{ % DESCRIPTION: Creating the pgfkeys "family" and intialize with default values \pgfkeys{ /handlers/.is setter/.code=\pgfkeysedef{\pgfkeyscurrentpath}{% \noexpand\pgfqkeys{\pgfkeyscurrentpath}{##1}% },% /inventory/#1/.cd, inventory id/.initial = ZZZZZZZZZZ, product/.is setter,% product/manufacturer/.initial = EMPTY, product/product id/.initial = EMPTY } % DESCRIPTION: Setting the data to the one specified by the user \pgfqkeys{/inventory/#1}{#2} } % DESCRIPTION: Macro for testing whether it is a problem with wrapping \pgfqkeys in an additional macro \newcommand{\setEntryData}[2]{ \pgfqkeys{/inventory/#1}{#2} } \begin{document} % DESCRIPTION: Setting the data of the manually added entry % with \pgfqkeys and "{}" notation % STATUS: WORKS AS EXPECTED \pgfqkeys{/inventory/Manual 5 Speed}{ inventory id = 6, product = { manufacturer = Herbert Motors, product id = 433M5 } } % DESCRIPTION: Setting the data of the manually added entry % with \pgfqkeys wrapped in macro and "{}" notation % STATUS: WORKS AS EXPECTED \setEntryData{Manual 6 Speed}{ inventory id = 11, product = { manufacturer = Herbert Motors, product id = 433M6 } } % DESCRIPTION: Generate and set data for automatic entry % with "/" notation % STATUS: WORKS AS EXPECTED \generateEntry{Automatic 4 Speed}{ inventory id = 21, product/manufacturer = Jane's Speedshop, product/product id = JS4A } % DESCRIPTION: Generate and set data for automatic entry % with "{}" notation % STATUS: FAILS FOR NESTED KEYS \generateEntry{Automatic 5 Speed}{ inventory id = 42, product = { manufacturer = Jane's Speedshop, product id = JS5A } } % DESCRIPTION: Visualize the data stored in the pgfkeys \section*{Inventory} \foreach \entry in {Manual 5 Speed, Manual 6 Speed, Automatic 4 Speed, Automatic 5 Speed}{ \textbf{\entry}:\\ inventory id: \pgfkeysvalueof{/inventory/\entry/inventory id}\\ manufacturer: \pgfkeysvalueof{/inventory/\entry/product/manufacturer}\\ product id: \pgfkeysvalueof{/inventory/\entry/product/product id} \\[0.25cm] } \end{document} This produces the following output: Issue When using the {...} notation to set the data of automatically generated entries, the data is not stored (see Automatic 5 Speed in MWE). The / notation seems to work. What was tried so far The problem seems to be related to the .is setter pgfkeys handler. It seems like the nested structure is not created, but a single key with e. g. product/manufacturer as id (with the / being interpreted as a letter, not a separator). So far, the following has been tried: Changing .code to .ecode Modifying the expansion from \noexpand to other possibilities Those experiments always resulted in errors and the compilation failing. Question Is there a simple way to achieve the desired behavior with pgfkeys (e.g. via .is family)? Suggestions of other methods are also welcome. However, solutions with pgfkeys would be preferred, since the rest of the data handling in the real project is already based upon pgfkeys.
- Bizarre interaction between `microtype` package and \eqref macroby John Pardon on December 30, 2025 at 11:14 pm
I would have thought that if I declare \let\stdeqref\eqref, then the \stdeqref macro and the \eqref macro would be interchangeable. But here is an example where it fails! Moreover, this failure is (somehow) caused by the microtype package?! What is going on, and how to fix it? \documentclass{article} \usepackage{microtype} \usepackage{amsmath} \let\stdeqref\eqref \begin{document} \begin{equation}\label{a} A \end{equation} This is good spacing: \eqref{a}\allowbreak\eqref{a} This is bad spacing: \stdeqref{a}\allowbreak\stdeqref{a} But the bad spacing becomes good if we remove microtype! \end{document} The reason I'm asking is that I would like to redefine the \eqref macro in a way which uses the usual \eqref macro as a subcomponent, via the usual strategy I've seen time and time again on this site: \let\stdeqref\eqref \renewcommand\eqref[1]{Something fancy containing \stdeqref{#1} etc.} but that doesn't work anymore if \let isn't behaving as expected . . .
- Drawing Only a Portion of an Oval Frameby DDS on December 30, 2025 at 10:39 pm
Consider the following code which I compile with xelatex: \documentclass{book} \usepackage{graphicx} \usepackage[abs]{overpic} \usepackage{tikz} \definecolor{cadmiumgreen}{rgb}{0.0, 0.42, 0.235} % 0, 107, 60 \definecolor{Gold}{RGB}{228,168,73} \begin{document} \thispagestyle{empty} \begin{center} \begin{tikzpicture} \clip (0,0) ellipse (4.25cm and 5.5cm); \draw[line width=5pt,Gold,fill=cadmiumgreen] ellipse (4.25cm and 5.5cm); \node at (0,0) {\includegraphics[scale=.37,clip, trim = 0 0 0 0]{example-image-a}}; \draw[line width=12pt,Gold!70!black] ellipse (4.25cm and 5.5cm); \end{tikzpicture} \end{center} \end{document} with the output: QUESTION: How may I draw only a part of the 12pt-thick oval frame; in particular, relative to the node (0,0), draw the frame from only -45 degrees to 225 degrees in a clockwise fashion (instead of from -90 degrees to 270 degrees which gives the entire oval)? Thank you.
- Increase vertical spacing for the boxed choice in enumextby Sebastiano on December 30, 2025 at 9:24 pm
I'm using the enumext package to create multiple-choice questions. In my case, the answer labels are boxed letters, produced using the wrap-label key. The issue is that the boxed letters appear too close to each other vertically. I would like to know the correct way to increase the vertical spacing between the boxed labels, without unnecessarily changing the text spacing or breaking the column alignment. Here a MWE: \documentclass[a4paper,12pt]{article} \usepackage{amsmath, amssymb} \usepackage{graphicx} \usepackage{enumext} \begin{document} \begin{enumext}[label=\textbf{Domanda} \arabic*.,wrap-label=\textbf{#1},list-indent=0pt, save-ans=test] \item Lion \setenumext[keyans]{label=\Alph*,font=\small,nosep,wrap-label={\fbox{\makebox[\height]{##1}}}} \begin{keyans}[columns=2,nosep,mini-env={0.4\linewidth}] \item \item \item \item \miniright \includegraphics[scale=.4]{example-image.png} \end{keyans} \end{enumext} \end{document}
- Undesired bold text in Bibliography with BibLatexby DaVarPhi on December 30, 2025 at 1:44 pm
I'm using a template in Overleaf to make a mock article for practice, but it used natbib instead of biblatex so I attempted to replace the package and did all of the suitable replacements (like \citep to \parencite) But, it produced this "ugly" bibliography like below. Notice the bold texts Here is my bib file @book{sutton1998, title = {Reinforcement Learning: An Introduction}, author = {Sutton, Richard S. and Barto, Andrew G.}, year = {1998}, publisher = {MIT Press}, } @inproceedings{togelius2015, title = {AI Researchers, Video Games Are Your Friends!}, author = {Togelius, Julian}, booktitle = {Proceedings of the International Joint Conference on Computational Intelligence}, pages = {3--18}, year = {2015}, publisher = {Springer} } @incollection{johnson2016, author = {Johnson, Mark}, title = {Bullet Hell: The Globalized Growth of Danmaku Games and the Digital Culture of High Scores and World Records}, booktitle = {Transnational Contexts of Culture, Gender, Class, and Colonialism in Play: Video Games in East Asia}, pages = {17--42}, publisher = {Springer}, year = {2016} } @book{koziel2019, title = {Speedrun Science: A Long Guide to Short Playthroughs}, author = {Koziel, Eric}, year = {2019}, publisher = {Fangamer} } @inproceedings{li2019, author = {Li, Raymond C. and Ahn, Jun Min and Esteron, Zachary Tyler and Hong, Qiyin}, title = {Collision Avoidance with Deep Reinforcement Learning}, booktitle = {Proceedings of the 2019 Purdue Undergraduate Research Conference}, year = {2019} } @online{chen2025, author = {Chen, Jackson}, title = {Summer Games Done Quick 2025 Raises \$2.4 Million for Doctors Without Borders}, year = {2025}, organization = {Engadget}, url = {https://www.engadget.com/gaming/summer-games-done-quick-2025-raises-24-million-for-doctors-without-borders-182314037.html}, urldate = {2025-12-31} } And some MWE \input{preamble} \begin{document} LOREM IPSUM DOLOT SIT AMET \parencite{chen2025} LOREM IPSUM DOLOT SIT AMET \parencite{johnson2016} LOREM IPSUM DOLOT SIT AMET \parencite{koziel2019} LOREM IPSUM DOLOT SIT AMET \parencite{li2019} LOREM IPSUM DOLOT SIT AMET \parencite{sutton1998} LOREM IPSUM DOLOT SIT AMET \parencite{togelius2015} \newpage \input{bibliography} \end{document} that produces also an ugly citation Here are the content of preamble.tex that I think directly contributed to the bibliography and also the template for bibliography.tex %preamble.tex \documentclass[12pt,a4,american]{extreport} \usepackage[utf8]{inputenc} \usepackage[indonesian]{babel} \usepackage[T1]{fontenc} \usepackage{relsize} \usepackage{times} \usepackage{amsmath, amsthm, amssymb, amsfonts} \usepackage{actuarialsymbol} \usepackage{lipsum} \usepackage{geometry} \usepackage[onehalfspacing]{setspace} \usepackage{parskip} \usepackage{microtype} \usepackage{fancyhdr} \usepackage[ pdftex, bookmarks=true, unicode=true, pdfusetitle, bookmarksnumbered=true, bookmarksopen=true, breaklinks=true, pdfborder={0 0 1}, backref=page, colorlinks=false ]{hyperref} \usepackage[noabbrev, capitalise]{cleveref} \usepackage{xcolor} \usepackage[style=authoryear, backend=biber]{biblatex} \DeclareDelimFormat{nameyeardelim}{\addcomma\space} \addbibresource{citation.bib} \usepackage{xurl} \usepackage[nottoc,numbib]{tocbibind} % bibliography.tex \clearpage \phantomsection \addcontentsline{toc}{chapter}{BIBLIOGRAPHY} \nocite{*} \printbibliography[heading=bibintoc, title={BIBLIOGRAPHY}] I don't know what I did wrong here. I have checked the custom settings file of the template and there are no other command that modify the bibliography and I've done the suitable replacements. Any help? EDIT : Added MWE and all the relevant files content.
- circuitikz: How to use circuitikz inside a TikZ-matrixby cis on December 30, 2025 at 11:27 am
Is it possible to use circuitikz-shapes as cells inside a TikZ-matrix? (I mean, as cells <*> & <*> & <*> ... \\, how to place nodes afterwards is already clear.) If I put in |[tgenericshape]|{} I get an error ! Package PGF Math Error: Unknown function base (in 'base'). \documentclass[margin=5pt, multi=circuitikz]{standalone} \usepackage{circuitikz} \usetikzlibrary{matrix} \begin{document} \begin{circuitikz}[] \node[tgenericshape, label=center:GS0](G0){}; \matrix[matrix of nodes, nodes in empty cells, draw, column sep=11mm, ] at (0,-2) (m){ 1 & 2 & 3 \\ %|[tgenericshape, label=center:GS1]|{} & |[fill=pink]|{Test} & \\ does not work }; \end{circuitikz} \end{document}
- circuitikz: How to read out the value of bipoles/lengthby cis on December 30, 2025 at 8:55 am
According to the manual, section 3.1.4.1 "Components size", bipoles/length (default 1.4cm) is the central parameter; "which can be interpreted as the length of a resistor (including reasonable connections): all other lengths are relative to this value." How can I read out bipoles/length? I tried \pgfmathsetlengthmacro\Rlength{ %\ctikzvalueof{bipoles/length}% does not work %\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}% does not work 5mm% works } without success. What do I have to do? \documentclass[margin=5pt, multi=circuitikz]{standalone} \usepackage{circuitikz} \begin{document} \pgfmathsetlengthmacro\Rlength{ %\ctikzvalueof{bipoles/length}% does not work %\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}% does not work 5mm% works } \begin{circuitikz}[european resistors] \draw[] (0,0) to[R, name=R0] (2,0); \draw[red] (R0.west) -- +(\Rlength,0) node[below=3mm]{\Rlength}; \end{circuitikz} \ctikzset{bipoles/length=22.5mm,}% test for value change \begin{circuitikz}[european resistors] \draw[] (0,0) to[R, name=R0] (2,0); \draw[red] (R0.west) -- +(\Rlength,0) node[below=3mm]{\Rlength}; \end{circuitikz} \end{document}
- How to reproduce `listings` style features (right-side numbers, stepnumber) in `piton`?by d7ek on December 30, 2025 at 5:21 am
In the listings package, \lstset{numbers=right,stepnumber=3,numberfirstline} gives right-aligned line numbers and numbering every third line. I would like to achieve the same behavior using the piton package instead of listings, but I can’t find equivalent options in the documentation. \documentclass{article} \usepackage{piton,xcolor} \PitonOptions{line-numbers,} %\usepackage{listings} %\lstset{ % numbers=right, % stepnumber=3, % numberfirstline %} \begin{document} %\begin{lstlisting}%[firstnumber=2] \begin{Piton} print("Hello world") x = 1 + 1 print(x) x = 1 + 2 print(x) x = 2 + 2 print(x) \end{Piton} %\end{lstlisting} \end{document}
- Is it possible to create a circular document?by Brendan Langfield on December 30, 2025 at 3:11 am
I recently learned that it's possible to set fully custom page dimensions using geometry. However as far as I can tell, you can only do rectangular document shapes. Is it possible to use the geometry package or some other method to make the document itself circular?
- List with one item in an enviroment issueby murray on December 30, 2025 at 2:40 am
The following code produces the output shown. It uses an enviroment inside which there is a description list with just one item. Note the blank line before \item. With that, or with instead, {} or \mbox{}, the code compiles as expected. However, removing that blank line before \item causes error "Something's wrong--perhaps a missing \item when compilation reaches the line \end{oneproperty}. Why does this happen, and how can the definition of oneproplis or oneproperty be modfied so as to avoid the error? \documentclass{article} \usepackage{enumitem} \newlength{\oneproplabelwd} % NB: default is parentheized 2-char sf \settowidth{\oneproplabelwd}{\textsf{(SN)}} % NB: Enclose actual item name in parens, \label[...] in optional arg! \newlist{oneproplis}{description}{1} \newenvironment{oneproperty}[1]{% \setlist[oneproplis,1]{% font=\normalfont\textsf, wide, leftmargin=\dimexpr\parindent+\oneproplabelwd+\labelsep, itemsep=0pt, topsep=2pt, format={\normalfont\textsf}, }\begin{oneproplis}% \upshape} {\end{oneproplis}} \begin{document} \noindent A relation $\leq$ in a set $X$ is said to \emph{well-order} $X$ if it partially orders $X$ and: % \settowidth{\oneproplabelwd}{\textsf{(WO)}} \begin{oneproperty} \item[(WO)\label{property:wo}] Each nonempty subset of $X$ has a least element. \end{oneproperty} \end{document}
- Use some characters from the text font instead of the corresponding ones from mtpro2by ncant on December 29, 2025 at 2:10 pm
I'm typesetting my math document in Times New Roman using XeLaTeX and the fontspec package. I'm using mtpro2 as the math font, but I've noticed that certain letters, such as u, v and w, look quite different from their TNR italic counterparts (maybe because it's advertised as a Times-compatible font). Considering I'm already using the fontspec package, I tried ditching mtpro2 entirely and using other math fonts. I consulted the LaTeX Stack Exchange master list of maths fonts and tried XITS Math, TeX Gyre Termes Math and STIX Two Math. However, these fonts lack some features that I really like about mtpro2, such as round brackets (especially for matrices) and the letter z identical to the letter z in TNR. mtpro2 is here to stay. Next, I found the 'mathastext' package, which enables alphanumeric glyphs from the text font to be used in maths environments. For example, \usepackage[basic, italic]{mathastext} replaces all the alphanumeric characters in the maths font with the corresponding characters in the text font. However, this approach led me to another issue: the spacing between letters is awful, especially the subscripted ones. Since my only issue is with the letters u, v, and w, is there a way to just replace those three and use the rest of the mtpro2 glyphs? The code I'm using for my document is really bog standard: \documentclass{memoir} % Throw an error if this is not XeLaTeX. \usepackage{ifxetex} \RequireXeTeX \usepackage[lite]{mtpro2} \usepackage[no-math]{fontspec} \setmainfont{Times New Roman} \begin{document} \end{document} Any help would be appreciated.
- circuitikz: European Amplifier (en amp) without pins or with absolut valued pin lengthby cis on December 29, 2025 at 12:10 pm
I want to create an en amp with a pin length of 0 - alternatively: a pin length with a clearly defined value, for example 5mm. I tried to transfer the "trick" \ctikzset{tripoles/en amp/port width=1, tripoles/en amp/width=1.19, % = 1.7*0.7 } from 4.20.2.2 "Input and output pins symbols"; but this only works with op amp. What do I have to do? \documentclass[margin=5pt, multi=circuitikz]{standalone} \usepackage{circuitikz} \begin{document} \begin{circuitikz}[] \ctikzset{tripoles/en amp/port width=1, tripoles/en amp/width=1.19, % = 1.7*0.7 } \node[en amp, en amp text={No pins}, label={[yshift=-12mm]below:works not} ] (A){please!}; %% --> Trick from 4.20.2.2 "Input and output pins symbols" \ctikzset{tripoles/op amp/port width=1, tripoles/op amp/width=1.19, % 1.7*0.7 } \draw (3,0) node[op amp, color=blue, label={[yshift=-12mm]below:works} ]{}; \end{circuitikz} \end{document}
- Three fonts supports for polyglossia package?by Explorer on December 28, 2025 at 5:32 pm
The code is partially taken from egreg's this answer. I want to typeset the following three languages with three fonts: English: EB Garamond Chinese: FandolSong Greek: Old Standard Noted that I want to write an "English and Chinese" mixed article(which means that it need to switch frequently) to introduced the third language——Greek. As below: \documentclass{book} \usepackage{fontspec} \usepackage{polyglossia} \setmainlanguage{english} \setmainfont{EB Garamond}% English \newfontfamily{\chinesefont}{FandolSong}% Chinese \setotherlanguage{greek} \newfontfamily{\greekfont}{Old Standard}% Greek \begin{document} I want to typeset an article, whose main text is the combination of English, Chinese, which is used to introduced the Greek letters. I want three fonts for them. So, I want to use English and Chinese, switching frequently. And use Greek fonts in whole paragraph. \bigskip English: English Saṃskṛtāvāk Chinese: {\chinesefont 英语、中文 01234 这是一个测试} Greek: {\greekfont τὸν πόλεμον τῶν Ἀθηναῖος} It works well. However, what I want in the real case, is as follows: \bigskip An paragraph of English and Chinese, which shifts frequently. 我是英语 English 和中文 Chinese 混排。我是英语 English 和中文 Chinese 混排。我是英语 English 和中文 Chinese 混排。我是英语 English 和中文 Chinese 混排。我是英语 English 和中文 Chinese 混排。我是英语 English 和中文 Chinese 混排。 {\chinesefont 我是英语} English {\chinesefont 和中文} Chinese {\chinesefont 混排。} is okay, but extremely difficult to switch... Then a paragraph of Greek letters. \textgreek{Θουκυδίδης Ἀθηναῖος ξυνέγραψε τὸν πόλεμον τῶν Πελοποννησίων καὶ Ἀθηναίων, ὡς ἐπολέμησαν πρὸς ἀλλήλους, ἀρξάμενος εὐθὺς καθισταμένου καὶ ἐλπίσας μέγαν τε ἔσεσθαι καὶ ἀξιολογώτατον τῶν προγεγενημένων, τεκμαιρόμενος ὅτι ἀκμάζοντές τε ᾖσαν ἐς αὐτὸν ἀμφότεροι παρασκευῇ τῇ πάσῃ καὶ τὸ ἄλλο Ἑλληνικὸν ὁρῶν ξυνιστάμενον πρὸς ἑκατέρους, τὸ μὲν εὐθύς, τὸ δὲ καὶ διανοούμενον.} It's hard for \texttt{polyglossia} to support an English font together another Chinese font. Is that any ideas? \end{document} I can't set Chinese and English fonts seperately, so frequently switch is quite difficult. I have also tried Fallback, but it doesn't work: \setmainfont[Fallback=FandolSong]{EB Garamond} If somebody get familiar with ctex-bundle, to set Chinese fonts and English fonts seperately, we could use: \usepackage{ctex} \setmainfont{EB Garamond} \setCJKmainfont{FandolSong} However, polyglossia is a little bit conflict with ctex(That maybe my another question or issues). So, this post, I was only after for a ployglossia(or babel) solution.
- With mini frames, beamer content too far downby scottkosty on December 28, 2025 at 5:11 pm
The content in some of my frames extends too far down, even when there is vertical space above that could be used. Here is an example. I would prefer for it to use the vertical space at the top before extending off the page. Is there a clean way to accomplish (at least part) this without doing a manual negative vspace? \documentclass{beamer} \useoutertheme{smoothbars} \begin{document} \section{Summation operator and the mean} \begin{frame} \begin{theorem} Is the following equality necessarily true? \[ \sum^{n}_{i=1}\left(ax_{i}+by_{i}\right)=a\sum^{n}_{i=1}x_{i}+b\sum^{n}_{i=1}y_{i} \] \end{theorem} % \begin{theorem} Yes, it is true. But what's the intuition for it? \end{theorem} \begin{itemize} \item Whenever you're stuck proving a general statement, it's often useful to try a special case. For example, what if $n$ equals 2? \begin{block}{} Then the question reduces to the following: \begin{align} \left(ax_{1}+by_{1}\right)+\left(ax_{2}+by_{2}\right) & \,\,\,=\,\,\,a(x_{1}+x_{2})+b(y_{1}+y_{2})\\ & \Longleftrightarrow\\ \left(ax_{1}+ax_{2}\right)+\left(by_{1}+by_{2}\right) & \,\,\,=\,\,\,a(x_{1}+x_{2})+b(y_{1}+y_{2}) \end{align} \end{block} \item We're summing the same numbers, just in a different order! \end{itemize} \end{frame} \end{document} Here is the result that I get: I understand there is no so much vertical space at the top, but I would still rather have the "Theorem" text start just after the mini frames, rather than content go off the page. Maybe what I'm asking for is "vfill" behavior, where it stretches or squeezes depending on the situation?
- How to make a command "eat" a space? [duplicate]by user424920 on December 28, 2025 at 11:03 am
I searched for something similar, but I didn't find anything. \documentclass{report} \usepackage{amsmath} \usepackage{mathtools} \DeclareMathOperator{\diff}{d} \begin{document} \[\int x\diff x\] \end{document} I want to get "dx" and not "d x". I was looking at ways to eat spaces after the command, but nothing, I would like to avoid adding the "x" as a parameter to the \diff operator. I would like you know if there is a way.
- Why does \textstyle not work in \smashoperator?by John Lee on December 28, 2025 at 3:23 am
In the following code, the \sum in \smashoperator appears too big. But if I put \textstyle\sum in \smashoperator, then it gives the error "*.tex: error: 290: Limit controls must follow a math operator. ...extstyle\sum_{\alpha\in D_{1}\cup D_{2}}}". I don't know what to do and need help. The MWE LaTeX code is as below: \documentclass[11pt,twoside]{article}% \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{mathtools} \usepackage[title,titletoc,header]{appendix} \usepackage{geometry} \usepackage{graphicx} \usepackage{indentfirst} \usepackage{mathrsfs} \usepackage{nopageno} \usepackage{setspace} \usepackage{remreset} \newtheorem{theorem}{Theorem}[section] \newtheorem{definition}[theorem]{Definition} \begin{document} \begin{enumerate} \item $\smashoperator{\sum_{\alpha\in D_{1}\cup D_{2}}}\,x_{\alpha}\,=\underset{\alpha\in D_{1}}{\textstyle\sum}x_{\alpha} \,+\underset{\alpha\in D_{2}}{\textstyle\sum}x_{\alpha}$ \end{enumerate} \end{document}
- Weird Overleaf errorby DavidIsDumb on December 28, 2025 at 2:31 am
I'm writing some math stuff using overleaf but it broke mysteriously. I wrote: \documentclass[11pt]{scrartcl} \usepackage[dvipsnames,svgnames]{xcolor} \usepackage[shortlabels]{enumitem} \usepackage[framemethod=TikZ]{mdframed} \usepackage{amsmath,amssymb,amsthm} \usepackage{epigraph} \usepackage[colorlinks]{hyperref} \usepackage{microtype} \usepackage{mathtools} \usepackage[headsepline]{scrlayer-scrpage} \usepackage{thmtools} \usepackage{listings} \usepackage{derivative} \renewcommand{\epigraphsize}{\scriptsize} \renewcommand{\epigraphwidth}{60ex} \ihead{\footnotesize\textbf{Some text here}} \ohead{\footnotesize Some text here} \providecommand{\re}{\text{Re}} \providecommand{\im}{\text{Im}} \providecommand{\ol}{\overline} \providecommand{\eps}{\varepsilon} \providecommand{\half}{\frac{1}{2}} \providecommand{\dang}{\measuredangle} \providecommand{\CC}{\mathbb C} \providecommand{\FF}{\mathbb F} \providecommand{\NN}{\mathbb N} \providecommand{\QQ}{\mathbb Q} \providecommand{\RR}{\mathbb R} \providecommand{\ZZ}{\mathbb Z} \providecommand{\dg}{^\circ} \providecommand{\ii}{\item} \providecommand{\alert}{\textbf} \providecommand{\opname}{\operatorname} \providecommand{\ts}{\textsuperscript} \DeclareMathOperator{\sign}{sign} \providecommand{\tarc}{\mbox{\large$\frown$}} \providecommand{\arc}[1]{\stackrel{\tarc}{#1}} \reversemarginpar \providecommand{\printpuid}[1]{\marginpar{\href{https://otis.evanchen.cc/arch/#1}{\ttfamily\footnotesize\color{green!40!black}#1}}} \mdfdefinestyle{mdgreenbox}{linecolor=ForestGreen,backgroundcolor=ForestGreen!5, linewidth=2pt,rightline=false,leftline=true,topline=false,bottomline=false,} \declaretheoremstyle[headfont=\bfseries\sffamily\color{ForestGreen!70!black}, mdframed={style=mdgreenbox},headpunct={.},]{thmgreenbox} \mdfdefinestyle{mdredbox}{frametitlefont=\bfseries,innerbottommargin=8pt, nobreak=true,backgroundcolor=Salmon!5,linecolor=RawSienna,} \declaretheoremstyle[headfont=\bfseries\color{RawSienna}, mdframed={style=mdredbox},headpunct={\\[3pt]},postheadspace=0pt,]{thmredbox} \mdfdefinestyle{mdblackbox}{linecolor=black,backgroundcolor=RedViolet!5!gray!5, linewidth=3pt,nobreak=true,rightline=false,leftline=true,topline=false,bottomline=false,} \declaretheoremstyle[mdframed={style=mdblackbox}]{thmblackbox} \declaretheorem[style=thmredbox,name=Problem]{problem} \declaretheorem[style=thmblackbox,name=Outline,numbered=no]{sol} \declaretheorem[style=thmgreenbox,name=Claim,numbered=no]{claim*} \usepackage{asymptote} \begin{asydef} size(8cm); // set a reasonable default usepackage("amsmath"); usepackage("amssymb"); settings.tex="pdflatex"; settings.outformat="pdf"; import geometry; void filldraw(picture pic = currentpicture, conic g, pen fillpen=defaultpen, pen drawpen=defaultpen) { filldraw(pic, (path) g, fillpen, drawpen); } void fill(picture pic = currentpicture, conic g, pen p=defaultpen) { filldraw(pic, (path) g, p); } pair foot(pair P, pair A, pair B) { return foot(triangle(A,B,P).VC); } pair centroid(pair A, pair B, pair C) { return (A+B+C)/3; } \end{asydef} \begin{document} \title{Some text here} \subtitle{Some text here} \author{Some text here} \date{\today} \maketitle \begin{problem}[some text here] Fix an integer $n \ge 1$. Tom has a scientific calculator. Unfortunately, all keys are broken except for one row: \verb$1$, \verb$2$, \verb$3$, \verb$+$ and \verb$-$. Tom presses a sequence of $n$ random keystrokes; at each stroke, each key is equally likely to be pressed. The calculator then evaluates the entire expression, yielding a result of $E$. Find the expected value of $E$, in terms of $n$. (Negative numbers are permitted, so \verb$13-22$ gives $E = -9$. Any excess operators are parsed as signs, so \verb$-2-+3$ gives $E=-5$ and \verb$-+-31$ gives $E = 31$. Trailing operators are discarded, so \verb$2++-+$ gives $E=2$. A string consisting only of operators, such as \verb$-++-+$, gives $E=0$.) \end{problem} \end{document} When I compile there is no error message, but the last line has a red circle saying "unexpected \end{problem} after $" and the line before that says "unclosed $ found at \end{problem}". All the other probs with this format didn't break, so there's probably no problem with the \end. However, I found that if I type \begin{problem}[some text here] Tom presses a sequence of $n$ random keystrokes; at each stroke, each key is equally likely to be pressed. The calculator then evaluates the entire expression, yielding a result of $E$. Find the expected value of $E$, in terms of $n$. (Negative numbers are permitted, so \verb$13-22$ gives $E = -9$. Any excess operators are parsed as signs, so \verb$-2-+3$ gives $E=-5$ and \verb$-+-31$ gives $E = 31$. Trailing operators are discarded, so \verb$2++-+$ gives $E=2$. A string consisting only of operators, such as \verb$-++-+$, gives $E=0$.) \end{problem} instead for the problem part nothing happens! No error if I delete like half a paragraph. Can somebody explain what is happening? Edit: Also in the first case autocompile doesn't work, saying that my code has errors that must be fixed first before that can run, but for the second case autocompile works. I also found out that autocompile works when I type: \begin{problem}[some text here] Fix an integer $n \ge 1$. Tom has a scientific calculator. Unfortunately, all keys are broken except for one row: \verb$1$, \verb$2$, \verb$3$, \verb$+$ and \verb$-$. Tom presses a sequence of $n$ random keystrokes; at each stroke, each key is equally likely to be pressed. The calculator then evaluates the entire expression, yielding a result of $E$. Find the expected value of $E$, in terms of $n$. (Negative numbers are permitted, so \verb$13-22$ gives $E = -9$. Any excess operators are parsed as signs, so \verb$-2-+3$ gives $E=-5$ and \verb$-+-31$ gives $E = 31$. Trailing operators are discarded, so \verb$2++-+$ gives $E=2$. A string consisting only of operators, such as \verb$-++-+$, gives $E=0.) \end{problem} for the problem, but the last line has the following error message: LaTeX Error: Command \end{mdframed} invalid in math mode. \ (button saying suggest fix using AI) \ Missing $ inserted. \ Missing } inserted. \ Extra }, or forgotten \endgroup.
- Using \ProcessList and \SplitArgument with \IfBooleanby sgmoye on December 27, 2025 at 7:30 pm
I need to use \ProcessList and \SplitArgument with \IfBoolean. Using only \ProcessList does work, but I need to get at the arguments before and after the / -- thus the need for \SplitArgument. The asterisk seems inextricably attached to the second argument in \fooauxai and I cannot seem to pry it loose. As indicated, I've tried some \expandafter experiments. Suggestions? \documentclass{article} \usepackage[papersize={5.5in,8.5in},margin=0.6in]{geometry} \usepackage{xparse}%% for <u> %% |=====8><-----| %% %% This works \NewDocumentCommand{\test}{ >{\SplitList{;}}m }{\ProcessList{#1}{\fooaux}} \NewDocumentCommand{\fooaux}{ m }{\fooauxa#1|} \NewDocumentCommand{\fooauxa}{ s u{|} }{% \def not possible due to need for boolean \IfBooleanTF{#1}{\textcolor{red}{#2}}{#2} } %% |=====8><-----| %% %% This does not work \NewDocumentCommand{\testi}{>{ \SplitList{;}}m } {\ProcessList{#1}{\fooauxi}} %% Tried this but to no avail: %% \NewDocumentCommand{\fooauxi}{ >{\SplitArgument{1}{/}}m } {\expandafter\fooauxai#1|} \NewDocumentCommand{\fooauxi}{ >{\SplitArgument{1}{/}}m } {\fooauxai#1} \NewDocumentCommand{\fooauxai}{ s m m }{% \IfBooleanTF{#1}{\textcolor{red}{(#2)}}{(#2)}-(#3) } %% |=====8><-----| %% \begin{document} \thispagestyle{empty} \begin{tabular}{lll} 1& From \verb+\test+& \test{a/1;*b/2;c/3}\\ 2& From \verb+\testi+& \testi{a/1;*b/2;c/3}\\ 3& Desired& (a)-(1) \textcolor{red}{(b)}-(2) (c)-(3) \end{tabular} \end{document}
- How to call an expl3 function within Lua codeby wehro on December 27, 2025 at 6:55 pm
In an expl3 package a Lua module shall be used because Lua simplifies programming some functions. The Lua module shall call some expl3 functions from the package. But this does not work in all cases. In the following example only \MyDocumentCommandA works, not \MyDocumendCommandB. \begin{filecontents*}{mypackage.sty} \ProvidesExplPackage{mypackage}{2025-12-27}{1.0}{My package} \directlua { myluamodule = require ('myluamodule') } \cs_new:Npn \mypackage_command:n #1 { \int_to_Roman:n {#1} } \NewDocumentCommand \MyDocumentCommandA {m} { \directlua { myluamodule.functionA ( #1 ) } } \NewDocumentCommand \MyDocumentCommandB {m} { \directlua { myluamodule.functionB ( #1 ) } } \end{filecontents*} \begin{filecontents*}{myluamodule.lua} local myluamodule = {} myluamodule.functionA = function (nr) tex.sprint("bla blub ") tex.sprint("\\ExplSyntaxOn") tex.sprint("\\mypackage_command:n{"..nr.."}") tex.sprint("\\ExplSyntaxOff") end myluamodule.functionB = function (nr) tex.sprint("\\section{") myluamodule.functionA(nr) tex.sprint("}") end return myluamodule \end{filecontents*} \documentclass{article} \usepackage{mypackage} \begin{document} \MyDocumentCommandA{75} \MyDocumentCommandB{85} \end{document} The error message is: ! Undefined control sequence. <argument> bla blub \ExplSyntaxOn \mypackage _command:n{85}\ExplSyntaxOff l.43 \MyDocumentCommandB{85}
- Glitch of \overrightarrow with `NewCMMath-Book.otf` font?by Explorer on December 27, 2025 at 10:17 am
I have the following code: \documentclass{article} \usepackage{unicode-math} % \setmathfont{NewCMMath-Regular.otf} % normal \setmathfont{NewCMMath-Book.otf} % abnormal \begin{document} \[ \overrightarrow{e} \quad \overrightarrow{\pi} \quad \overrightarrow{\Pi} \] \end{document} Which gives: We noticed that if the arguments is too wide, the glitch appeared. While it's normal with NewCMMath-Regular.otf:
- aligned inside tikz-cdby Jinwen on December 27, 2025 at 9:11 am
I would like to reproduce the following diagram in Yves André's book: However, it is unclear to me how to produce the multi-line node inside the diagram. Currently, what I could achieve is this: However, the alignment inside aligned is not working the way I expected. May I ask what is the correct way to do this? Thanks! Below is a MWE. \documentclass{article} \usepackage{mathtools,amssymb} \usepackage{tikz-cd} \begin{document} \[ \begin{tikzcd} {\{\,{\text{\( k \)-schémas étales finis}}\,\}} & {\begin{aligned} &\{\, \text{ensembles finis munis}\\ &\quad\text{d'une action continue de \( \mathrm{Gal}(\overline{k}/k) \)}\,\} \end{aligned}} \\ {AM(k)_{\mathbb{Q}}} & {\begin{aligned} &\{\, \text{\( \mathbb{Q} \)‑espaces vectoriels de dimension finie munis}\\ &\quad\text{d'une action linéaire continue de \( \mathrm{Gal}(\overline{k}/k) \)}\,\} \end{aligned}} \arrow["\sim", from=1-1, to=1-2] \arrow["{\mathfrak{h}}"', from=1-1, to=2-1] \arrow["{\mathfrak{l}}", from=1-2, to=2-2] \arrow["\sim", from=2-1, to=2-2] \end{tikzcd} \] \end{document}
- Ligature of 'ff' turns to 'fb' in mathit mode with BaskervilleFby Xilef11 on December 26, 2025 at 4:11 pm
Using the BaskervilleF font with instructions from here, \mathit{ff} produces fb instead of ff. Normal text, \textit and normal math modes are unaffected. MWE (commented lines are from the BaskervilleF instructions but don't seem to affect the issue): \documentclass[letterpaper,12pt]{book} \usepackage[utf8]{inputenc} % for baskerville font \usepackage[T1]{fontenc} \usepackage{baskervillef} %\usepackage[varqu,varl,var0]{inconsolata} %\usepackage[scale=.95,type1]{cabin} \usepackage[baskerville, varbb]{newtxmath} %\usepackage[cal=boondoxo]{mathalfa} \begin{document} normal: diff math: $diff$ it: \textit{diff} mathit: $\mathit{diff}$ \end{document} I'm not sure if that's an intended feature of the font, but either way it makes for confusing equations. Removing newtxmath solves it but changes the style of math too much. Is there a way to fix that while keeping the math font style and the normal ligatures of 'ff' in the text?
- Interleave blank pages at specific locationsby MysteryGuy on December 26, 2025 at 2:55 pm
All is in the title: I have a current document with (plain) numbered pages and I would like to interleave blank pages but only after current page 3, that is, put one blank page between every plain page, starting from page 3 (so keep my current pages 1, 2, 3 unchanged, then start interleaving blank pages). These blank pages should be either numbered or not numbered but keeping the numbering of the plain pages coherent (i.e., I don't want to go from plain page 4 to 6). I can not use newpage since of course, I don't exactly know where the page breaks might occur regarding the content. Thanks in advance for help !
- Epicycle and deferent of the Ptolemaic modelby Sebastiano on December 26, 2025 at 2:22 pm
About 15 years ago, I had created a drawing using GeoGebra that looks similar to the attached image. The source .ggb file from GeoGebra is available here, and I'm happy to share it with anyone interested. I was wondering if it's possible to replicate this drawing exactly using TikZ-PGF. I have the .ggb file and I'm wondering if there's a way to convert it or if TikZ can reproduce the same graphic. Additionally, I found a more recent package, named pst-sphericaltrochoid, which might be useful for generating spherical trochoid curves, and the package is documented in the PDF manual from December 25, 2025. Moreover, I would like to have this drawing animated in LaTeX. When export in tikz-pgf using Geogebra the output is not the expected result like the image (with animations). I never done a drawing with animate package or similar. \documentclass[10pt]{article} \usepackage{pgfplots} \pgfplotsset{compat=1.15} \usepackage{mathrsfs} \usetikzlibrary{arrows} \pagestyle{empty} \begin{document} \definecolor{ffwwqq}{rgb}{1,0.4,0} \definecolor{zzttqq}{rgb}{0.6,0.2,0} \definecolor{xdxdff}{rgb}{0.49019607843137253,0.49019607843137253,1} \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1cm,y=1cm] \begin{axis}[ x=1cm,y=1cm, axis lines=middle, grid style=dashed, xmin=-24.649425971185988, xmax=51.05123247996474, ymin=-17.77843276444837, ymax=20.90166759086156, xtick={-20,-15,...,50}, ytick={-15,-10,...,20},] \clip(-24.649425971185988,-17.77843276444837) rectangle (51.05123247996474,20.90166759086156); \draw [line width=0.8pt] (0,0) circle (8cm); \draw [line width=0.8pt] (4.690951292494638,6.480353074597315) circle (2cm); \draw[line width=4pt] (-22.73456951795283,17.710240168806287) -- (-9.968859829731798,17.710240168806287); \draw[line width=4pt] (-22.73456951795283,15.157098231162069) -- (-9.968859829731798,15.157098231162069); \begin{scriptsize} \draw [fill=xdxdff] (4.690951292494638,6.480353074597315) circle (0.5pt); \draw[color=xdxdff] (4.137249375752443,7.338101047126645) node {$A$}; \draw [fill=black] (-17.202761986390385,17.710240168806287) circle (2.5pt); \draw[color=black] (-16.096400480077897,19.40169670249558) node {$k = 1.3$}; \draw [fill=zzttqq] (2.345168103332513,5.359058630909856) circle (1pt); \draw[color=zzttqq] (4.392563569516864,6.316844272068956) node {$Pianeta$}; \draw [fill=black] (-17.06092076763237,15.157098231162069) circle (2.5pt); \draw[color=black] (-16.479371770724526,16.848554764851364) node {$v = 5$}; \draw [color=ffwwqq] (0,0) circle (4.5pt); \draw[color=ffwwqq] (1.264964695902711,1.4658745905449386) node {$Sole$}; \end{scriptsize} \end{axis} \end{tikzpicture} \end{document} My idea is to animate the drawing using the animate package for my students of an high school, with the ability to modify parameters and see how the drawing changes in real time. Could I add interactive buttons to allow users to modify the parameters of the animation? If anyone has experience animating drawings in LaTeX, I'd be happy to receive suggestions on how to implement it. Also, how can I animate package this drawing and add interactive buttons to control the parameters?
- natbib option "super" not working properly with make4htby MadyYuvi on December 26, 2025 at 11:13 am
I'm trying with: \documentclass[]{article} \usepackage[numbers,super,sort&compress,comma]{natbib} \begin{document} Test\cite{ref1,ref2,ref3,ref4,ref5,ref6,ref7,ref8,ref9,ref10} \begin{thebibliography}{99} \bibitem{ref1} Entry 1 \bibitem{ref2} Entry 2 \bibitem{ref3} Entry 3 \bibitem{ref4} Entry 4 \bibitem{ref5} Entry 5 \bibitem{ref6} Entry 6 \bibitem{ref7} Entry 7 \bibitem{ref8} Entry 8 \bibitem{ref9} Entry 9 \bibitem{ref10} Entry 10 \end{thebibliography} \end{document} For HTML conversion, I'm trying with make4ht filename and the output was: If I remove the option super, then it works correctly: But I'm in need to use options numbers,super,sort&compress,comma, how can I meet this? Please advise.
- zref-clever: Use noname by default for equations?by user1362373 on December 26, 2025 at 10:44 am
I'm thinking about migrating several large documents from cleveref to zref-clever. I have read Migration from cleveref to zref-clever as well as the manual, but several questions remain. One of them is: How I can control whether references to equations include "equation" or "equations" before the label(s), independently of whether references to figures and tables include "figure" and "table"? (The reasoning is that equations are numbered with parentheses whereas figures and tables are numbered without parentheses. Thus, it is clear that "see (1)" means equation (1) whereas "see 1" would be ambiguous because it could mean either Figure 1 or Table 1.) My understanding is that I need to use the option noname when referring to each equation. To avoid having to type the option in each reference, I could define a new command: \documentclass{article} \usepackage{zref-clever} \newcommand{\zcrefeq}[1]{\zcref[noname]{#1}} \begin{document} \begin{equation}\label{eq:1} a = b \end{equation} \begin{figure}[h] \caption{Some figure.} \label{fig:1} \end{figure} We have \zcrefeq{eq:1} and \zcref{fig:1}. \zcref[S]{eq:1} is the first equation. \end{document} Is there a more elegant way of doing this by setting an overall option or a reference format option?
- Don't get decimal output with luacasby Fa-Mat on December 26, 2025 at 10:38 am
First of all "Merry Christmas" to everyone. I'm trying to get decimal output with luacas and don't get it. \documentclass[paper=a4,fontsize=12pt]{scrartcl} \usepackage{luacas} \begin{document} \directlua{ a=3 b=8 c=a/b tex.print('$',c,'$') } \end{document} The code above gives the expectet 0.375. Changing to \documentclass[paper=a4,fontsize=12pt]{scrartcl} \usepackage{luacas} \begin{document} \begin{CAS} a=3 b=8 c=Rational(a,b) \end{CAS} $\print{a}$ $\print{b}$ $\print{c}$ $\print{c.numerator}$ $\print{c.denominator}$ \end{document} gives 3, 8, the fraction 3 over 8, 3 and 8. In the manual there is the funtion :asnumber() given but \documentclass[paper=a4,fontsize=12pt]{scrartcl} \usepackage{luacas} \begin{document} \begin{CAS} a=3 b=8 c=Rational(a,b) d=c:asnumber() \end{CAS} $\print{a}$ $\print{b}$ $\print{c}$ $\print{c.numerator}$ $\print{c.denominator}$ $\print{d}$ \end{document} gives Lua-Error and the $\print{d}$ is ignored. I also tried something like d=Rational:asnumber(c) or used the funktions ZZ(), QQ() and RR() but without any success. Also $\print{c:asnumber()}$ fails. Trying to print the decimal with $\directlua{tex.print(string.format("\csstring\%.3f",c))}$ gives also a Lua error ('c' is a table but a number is expected by 'string.format()'). I'm not having any ideas how to solve it any more. Thank you for your help.