Hot
- Migrate pdflatex/OT1(CM) with METAFONT/modes.mf *beautifully* to lualatex(LM)?by Alain Stalder on May 3, 2026 at 6:26 pm
Context With the original TeX/LaTeX and also with pdflatex you could make fonts heavier depending on output device via METAFONT. This, and that most printers would “bleed” more than typically today, imply that the Computer Modern fonts that are used in these setups by default (if OT1 font encoding) are generally designed “too thin” (in fact, they had to be for METAFONT to do its thing), their outlines are thinner than what would have been desired as final output… This has never been changed in subsequent successors to the original Computer Modern fonts over decades (except partially recently in the New Computer Modern Roman book font at the limited set of sizes it supports compared to Latin Modern). If you are not using METAFONT to make fonts heavier, then the results with lualatex using Latin Modern by default are very similar, and you can stop reading here. If, however, you miss the unique beauty of Computer Modern, but have to migrate to lualatex (for accessible tagged pdfs or any other features), here is first a concrete example as the question and then an answer by me. It took me half a year to find something reasonably useful that did not involve changing TeX-related source code or TeX fonts, a process that included several questions here (thanks for all the answers!) and also recently quite a few sessions with Google's Gemini AI, who proved to be very helpful in the end due to its broad knowhow and openness to share that. Concrete Example I am using pdflatex with OT1 font encoding which implies that it uses the Computer Modern (CM) font family by default, in my case I am specifically using Computer Modern Sans (plus is implicitly using some symbol fonts from Computer Modern). My basic setup is that I added the following mode to modes.mf (which is the same as the standard lexmarkr with just the blacker value slightly changed): mode_def xphi = mode_param (pixels_per_inch, 1200); mode_param (blacker, 1.9); % only difference to 'lexmarkr' (2 there) mode_param (fillin, 0); mode_param (o_correction, 1); mode_common_setup_; enddef; And in my latex sources I am using these settings: % !TEX TS-program = pdflatex \pdfpkresolution=1200 \pdfpkmode={xphi} \pdfmapfile{} \textwidth=85.5mm % OT1 is the default unless you are creating a tagged pdf % (which is not well supported on pdflatex anyway) %\usepackage[OT1]{fontenc} Actually, I use two text widths, one for rendered images on my website (the one above) and a larger one for US Letter sized articles. For completeness: I am rendering the images with GraphicsMagick (similar to ImageMagick, but outperformed it in my use cases): gm convert -density 600 "$NAME.pdf" \ -flatten -trim -blur 2.6 -resize 50% +repage -density 72 \ -strip -quality 50% $NAME.jpg For the full source code of my website see https://github.com/exactphilosophy-net/exactphilosophy.net (and there maybe first the source/def*.tex files). And this is a sample result, the look and feel I want to achieve also with lualatex… I will answer what I managed to do in a sec, but, of course, better solutions are always welcome—now and later!
- How do I convert it to PDF?by Emilio Enriquez Cari on May 3, 2026 at 3:37 pm
\documentclass[11pt, a4paper]{article} % --- UNIVERSAL PREAMBLE BLOCK --- \usepackage[a4paper, top=2.5cm, bottom=2.5cm, left=2cm, right=2cm]{geometry} \usepackage{fontspec} \usepackage[spanish, bidi=basic, provide=*]{babel} \babelprovide[import, onchar=ids fonts]{spanish} \babelprovide[import, onchar=ids fonts]{english} % Set default font to Sans Serif (Noto Sans) for a modern look \babelfont{rm}{Noto Sans} \usepackage{enumitem} \setlist[itemize]{label=--} % --- END UNIVERSAL PREAMBLE BLOCK --- \usepackage{xcolor} \definecolor{michelinred}{RGB}{218, 41, 28} \usepackage{titlesec} \usepackage{tcolorbox} % Personalización de títulos \titleformat{\section}{\color{michelinred}\normalfont\Large\bfseries}{\thesection}{1em}{} \titleformat{\subsection}{\color{black}\normalfont\large\bfseries}{\thesubsection}{1em}{} \title{ \vspace{-2cm} \color{michelinred}\Huge \textbf{La Guía Michelin} \\ \large \textit{El máximo galardón de la gastronomía mundial} } \author{Dossier Informativo} \date{\today} \begin{document} \maketitle \begin{tcolorbox}[colback=michelinred!5!white,colframe=michelinred,title=Introducción] La Guía Michelin es mucho más que una lista de restaurantes; es un referente histórico que ha definido la excelencia culinaria durante más de un siglo. Lo que comenzó como una estrategia de marketing para vender neumáticos se convirtió en la "Biblia" de los gourmets. \end{tcolorbox} \section{Historia: De Neumáticos a Estrellas} Fundada en 1900 por los hermanos \textbf{André y Édouard Michelin} en Francia, la guía nació con un propósito práctico: proporcionar información útil a los pocos automovilistas de la época (mapas, mecánicos y gasolineras). \begin{itemize} \item \textbf{1900-1920:} Gratuita y centrada en servicios mecánicos. \item \textbf{1926:} Comienza la adjudicación de "Estrellas de buena mesa". \item \textbf{1931:} Se establece la jerarquía actual de una, dos y tres estrellas. \end{itemize} \section{El Significado de las Estrellas} La escala de Michelin se basa en la experiencia del viaje: \begin{description} \item[\color{michelinred}★] \textbf{Una Estrella:} Una cocina de gran finura. Compensar hacer un alto en el camino. \item[\color{michelinred}★★] \textbf{Dos Estrellas:} Una cocina excepcional. Merece la pena desviarse. \item[\color{michelinred}★★★] \textbf{Tres Estrellas:} Una cocina única. Justifica el viaje por sí solo. \end{description} \section{Los 5 Criterios de Evaluación} Los inspectores de Michelin son estrictamente anónimos y evalúan exclusivamente la comida basándose en: \begin{enumerate} \item \textbf{Calidad de los productos:} Frescura y selección de la materia prima. \item \textbf{Dominio de la técnica:} Puntos de cocción y texturas. \item \textbf{Armonía de sabores:} El equilibrio en el paladar. \item \textbf{Personalidad del Chef:} La huella creativa en el plato. \item \textbf{Regularidad:} Que la experiencia sea excelente en cada visita. \end{enumerate} \section{Otros Reconocimientos} \begin{itemize} \item \textbf{Bib Gourmand:} Reconoce la mejor relación calidad-precio (comida de alta calidad a precios moderados). \item \textbf{Estrella Verde:} Introducida en 2020 para premiar la sostenibilidad y el respeto al medio ambiente. \end{itemize} \section{Figuras Legendarias} \begin{table}[h] \centering \begin{tabular}{ll} \hline \textbf{Chef} & \textbf{Hito principal} \\ \hline Joël Robuchon & El chef con más estrellas de la historia (32 en total). \\ Alain Ducasse & Famoso por ostentar 3 estrellas en múltiples ciudades. \\ Paul Bocuse & Mantuvo las 3 estrellas por más de 50 años ininterrumpidos. \\ \hline \end{tabular} \end{table} \begin{figure}[htbp] \centering \framebox{\parbox{0.8\textwidth}{\centering \vspace{2cm} \textbf{Espacio para Infografía} \\ \small\textit{Aquí se sugiere incluir un mapa de calor con los países más premiados: Francia, Japón e Italia.} \vspace{2cm} }} \caption{Distribución global de la excelencia Michelin.} \end{figure} \end{document}
- How to make error messages that count in luatexbase.module_XXXby Jasper on May 3, 2026 at 2:09 pm
I have a Lua based package. I want to make error messages that count. I can make obvious ones which are dependent on common sense, such as type checking in some places, but I want to know what broader considerations I should make before going in with error reporting. \documentclass{article} \ExplSyntaxOn \lua_load_module:n { main } \NewDocumentCommand { \myfunction } {} { \__jasper_myfunction: } \ExplSyntaxOff \begin{document} \myfunction \end{document} local function register_tex_cmd(name, func, args, protected) name = "__jasper_" .. name .. ":" .. ("n"):rep(#args) local scanners = {} for _, arg in ipairs(args) do scanners[#scanners+1] = token['scan_' .. arg] end local scanning_func = function() local values = {} for _, scanner in ipairs(scanners) do values[#values+1] = scanner() end func(table.unpack(values)) end local index = luatexbase.new_luafunction(name) lua.get_functions_table()[index] = scanning_func if protected then token.set_lua(name, index, "protected") else token.set_lua(name, index) end end local myfunction = function() luatexbase.module_info('mypackage', "For your information") end register_tex_cmd("myfunction", function() myfunction() end, { })
- Is it possible to embed a slider-controlled interactive TikZ graph inside a PDF?by Abdellah Kahlaoui on May 3, 2026 at 11:30 am
I am currently writing a report on the Traveling Salesman Problem (TSP), and I would like to include an interactive visualization directly in my final PDF. My goal is to have a slider (or a set of buttons) that allows the reader to change the number of vertices $n$ (e.g., from 3 to 6). When the slider is moved, I want the PDF to dynamically update: A TikZ drawing of a complete graph $K_n$. A text node displaying the calculated number of edges: $|E| = \frac{n(n-1)}{2}$. I have looked into packages like animate, media9, and the possibility of embedding JavaScript via insdljs, but I am unsure which approach is the most modern, robust, and compatible with standard PDF readers (like Adobe Acrobat or web-based viewers). Here is a static Minimum Working Example (MWE) of the graph I am trying to make dynamic: \documentclass{article} \usepackage{tikz} \begin{document} % I want 'n' to be controlled by a slider in the PDF \def\n{5} \begin{center} \begin{tikzpicture}[scale=0.8] % Draw edges \foreach \i in {1,...,\n} { \foreach \j in {1,...,\n} { \ifnum\i<\j \draw[blue!40, line width=0.5pt] ({90+(\i-1)*360/\n}:1.5cm) -- ({90+(\j-1)*360/\n}:1.5cm); \fi } } % Draw vertices \foreach \i in {1,...,\n} { \node[circle, fill=blue, draw=white, inner sep=2pt, label={[font=\tiny, color=blue]{90+(\i-1)*360/\n}:$v_{\i}$}] at ({90+(\i-1)*360/\n}:1.5cm) {}; } \end{tikzpicture} \vspace{0.5cm} % I want this text to update when the slider moves Number of vertices: $n = \n$ \\ Number of edges: $|E| = \pgfmathparse{\n*(\n-1)/2}\pgfmathprintnumber{\pgfmathresult}$ \end{center} \end{document} Is there a pure LaTeX/TikZ way (perhaps with animate) to step through these values using interactive buttons?
- TikZ mark line end with xby Viesturs on May 3, 2026 at 11:26 am
The task is to draw a line with an end marker x: The code \documentclass[tikz,border=5pt]{standalone} \begin{document} \begin{tikzpicture} \draw (0,0)--(2,3) node[pos=1] {$\times$}; \end{tikzpicture} \end{document} produces the output How to draw an end marker x that is rotated relative to the line?
- (Hopf fibration) I want to know how I can obtain the stereographic projection of a spherical circle in R4 to R3, based on a point on a 2sphere in R3by Jasper on May 3, 2026 at 10:43 am
I want to draw the Hopf fibration. In the Hopf fibration, each point on a sphere is mapped to a 4D spherical circle. We can elliptically (Mobiusly) transform the points on the 2sphere to produce beautiful geometric transformations when we stereographically project the 3sphere into R3. I think I could get it if I already had the map from the point to the circle on the 3sphere in R4. So that's my question. I want to know how I can obtain the stereographic projection of a spherical circle in R4 to R3, based on a point on a 2sphere in R3. Here is an MWE of a sphere: % Source - https://tex.stackexchange.com/a/735942 % Posted by Jasper Habicht, modified by community. See post 'Timeline' for change history % Retrieved 2026-05-03, License - CC BY-SA 4.0 \documentclass[border=10pt]{standalone} \usepackage{tikz, tikz-3dplot} \begin{document} \def\myr{3} \tdplotsetmaincoords{65}{125} \begin{tikzpicture} \coordinate (O) (0,0); \draw[thick, ball color=cyan!50!blue, opacity=0.5, draw opacity=1] (O) circle[radius={\myr}]; \node[right] at (O) {$O$}; \begin{scope}[tdplot_main_coords, rotate=-10] \begin{scope}[canvas is xy plane at z=0] % Back half circle (dashed) \draw[dashed] (\tdplotmainphi:\myr) arc[start angle={\tdplotmainphi}, end angle={\tdplotmainphi+180}, radius={\myr}] coordinate (R); % Front half circle (solid) + BL \draw[thick] (\tdplotmainphi:\myr) arc[start angle={\tdplotmainphi}, end angle={\tdplotmainphi-180}, radius={\myr}] coordinate (L); \fill (O) circle[radius={2pt}]; \end{scope} \begin{scope}[canvas is xy plane at z={\myr+0.75}] \draw[-stealth] (\tdplotmainphi:0.5) arc[start angle={\tdplotmainphi}, end angle={\tdplotmainphi+300}, radius={0.5}]; \end{scope} \begin{scope}[canvas is xy plane at z={\myr}] \fill (0,0) circle[radius={2pt}]; \end{scope} \begin{scope}[canvas is xy plane at z={-\myr}] \fill (0,0) circle[radius={2pt}]; \end{scope} \begin{scope}[canvas is yz plane at x=0] \draw[dashed] (\tdplotmainphi:\myr) arc[start angle={\tdplotmainphi}, end angle={\tdplotmainphi+180}, radius={\myr}]; \draw[thick] (\tdplotmainphi:\myr) arc[start angle={\tdplotmainphi}, end angle={\tdplotmainphi-180}, radius={\myr}]; \end{scope} \begin{scope}[canvas is xz plane at y=0] \draw[dashed] (\tdplotmainphi:\myr) arc[start angle={\tdplotmainphi}, end angle={\tdplotmainphi+180}, radius={\myr}]; \draw[thick] (\tdplotmainphi:\myr) arc[start angle={\tdplotmainphi}, end angle={\tdplotmainphi-180}, radius={\myr}]; % Axis \draw[dashed] (0,{\myr}) -- (0,{-\myr}); \draw (0,{\myr}) -- (0,{\myr+1.25}) (0,{-\myr}) -- (0,{-\myr-1.25}); \end{scope} \end{scope} \draw (O) -- (R) node[pos=0.25, above] {$r$}; \end{tikzpicture} \end{document} https://philogb.github.io/page/hopf/# https://en.wikipedia.org/wiki/Hopf_fibration
- Identifying and reproducing fonts in a book [duplicate]by Daniele Avitabile on May 3, 2026 at 9:15 am
I'm trying to reproduce the look and feel of this book https://www.cambridge.org/core/books/classical-numerical-analysis/5C54FEBDB5C638756691E04BD4C7D2D0 of which I report here a small screenshot It seems to me that the authors are using fonts similar to computer modern roman sans serif. I would like to ask what are, in your opinion, the fonts used here, and what is the quickest way to load them up globally, for a book I'm editing.
- How to plot a curved line a cross the thickness of the beamsby Tldi You on May 3, 2026 at 7:36 am
Deformed and undeformed configurations of the beam Hello everyone, I am trying to reproduce this image using LaTeX TikZ. I have written the code below, but I am encountering difficulties when drawing the curved line through the thickness (the yellow line). Any suggestions would be greatly appreciated. \documentclass[tikz,border=5mm]{standalone} \usepackage{tikz} \usetikzlibrary{arrows.meta, decorations.pathmorphing, positioning, calc} \begin{document} \begin{tikzpicture}[>=Stealth, scale=1.5] % Styles \tikzset{ zigzag/.style={decoration={zigzag, segment length=2mm, amplitude=1mm}, decorate}, break/.style={decoration={zigzag, segment length=4mm, amplitude=2mm}, decorate}, dot/.style={circle, fill=black, inner sep=1.2pt}, hollowdot/.style={circle, draw=black, fill=white, inner sep=1.2pt} } % --- Undeformed Beam (Top Part) --- \begin{scope}[shift={(0,2.5)}] % Beam edges \draw (-1.5, 0.4) -- (2, 0.4); \draw (-1.5, -0.4) -- (2, -0.4); \draw [zigzag] (-1.5, -0.4) -- (-1.5, 0.4); \draw [zigzag] (2, -0.4) -- (2, 0.4); % Neutral axis \draw [dotted, thick] (-1.5, 0) -- (2.5, 0) node[right] {$x, u$}; \draw [->] (2.3, 0) -- (2.7, 0); % Center vertical line and z-axis indicator \draw (0, 0.4) -- (0, -0.4); \node [hollowdot] at (0,0) {}; \draw [->] (0.2, 0) -- (0.2, -0.3); \node [right, font=\small] at (0.2, -0.15) {$z$}; % Left coordinate system and x-dimension \draw (-2.8, 0) -- (-2.3, 0); \draw [break] (-2.3, 0) -- (-1.9, 0); \draw (-1.9, 0) -- (-1.5, 0); \draw (-2.8, 0) -- (-2.8, -0.8) node[below, font=\small] {$z, w$}; \draw [->] (-2.8, -0.6) -- (-2.8, -1); \draw [->] (-2.8, -0.6) -- (0, -0.6); \node [fill=white, inner sep=1pt, font=\small] at (-1.4, -0.6) {$x$}; % Vertical reference line extending down \draw [thin, gray!60] (0, -0.4) -- (0, -3.5); \end{scope} % --- Deformed Beam (Bottom Part) --- \begin{scope}[shift={(0,1)}] % Curved beam boundaries \draw (-1.5, 0.4) to[bend right=15] (2, 0.4); \draw (-1.5, -0.4) to[bend right=15] (2, -0.4); \draw [zigzag] (-1.5, -0.4) -- (-1.5, 0.4); \draw [zigzag] (2, -0.4) -- (2, 0.4); \draw [dashed] (-1.8, 0) to[bend right=15] (2.3, 0); % Reference point (u0, w0) on the neutral axis \coordinate (P0) at (0.8, -0.30); \node [hollowdot] at (P0) {}; \node [below right, xshift=50pt, yshift=-20pt, font=\small] (L0) {$(u_0, w_0)$}; \draw [->, shorten >=2pt] (L0.west) -- (P0); % Vertical dashed reference line through P0 %\draw [red,dashed] ($(P0) + (0, 1.2)$) -- ($(P0) + (0, -0.5)$); \draw [red,dashed] (P0) -- ($(P0) + (115:1.0)$); % Deformed cross-section line \draw [yellow,thick] ($(P0) + (-0.3, 0.6)$) to[bend left=25] ($(P0) + (0.1, -0.6)$); % Point (u, w) on the cross-section \coordinate (P) at ($(P0) + (-0.01, -0.25)$); \node [dot] at (P) {}; \node [left, xshift=-2pt, yshift=2pt, font=\small] at (P) {$(u, w)$}; % Rotation angles at the top % Angle phi_x (rotation of the cross-section) \draw [->] ($(P0) + (0, 0.8)$) arc (90:115:0.8); \node [left, font=\small] at ($(P0) + (105:0.9)$) {$\phi_x$}; % Angle -dw0/dx (rotation of the normal) \draw [->] ($(P0) + (0, 0.8)$) arc (95:90:0.8); \node [right, xshift=6pt, font=\small] at ($(P0) + (80:0.8)$) {$-\frac{\partial w_0}{\partial x}$}; \draw [green,dashed] (P0) -- ($(P0) + (90:1.2)$); % Slope angle at the neutral axis \draw [blue,dashed] (P0) -- ($(P0) + (1.5, 0)$); \draw [yellow,dashed] ($(P0) + (-0.5, -0.1)$) -- ($(P0) + (1.3, 0.20)$); % tangent line \draw [->] ($(P0) + (1.4, 0)$) arc (0:10:1.2); \node [right, font=\small] at ($(P0) + (5:1.4)$) {$-\frac{\partial w_0}{\partial x}$}; \end{scope} \end{tikzpicture} \end{document}
- Can you help me identify this font [duplicate]by Name Redacted on May 3, 2026 at 1:18 am
Fonts I've tried the following to no avail: Libertinus Math Latin Modern Math STIX Two Math New Computer Modern Math Asana Math TeX Gyre Termes Math TeX Gyre Pagella Math TeX Gyre Schola Math
- Layering schematic diagrams in tikz + matplotlibby Academic on May 2, 2026 at 11:59 pm
When I generate diagrams with matplotlib/seaborn, I find it difficult to set up the padding and what not for it fit properly and have proper consistency across diagrams. Does anyone use this stack and get things running porperly? What I am doing now is gnerating csvs and directly doing tikz but I would like to avoid that.
- XCharter and \hwithstroke (U+0127)by karlh on May 2, 2026 at 10:00 pm
I upgraded from TeXLIVE 2023 to TeXLIVE 2026 recently (along with Fedora 43 to 44), and I could have sworn that the following used to work: \documentclass{article} \usepackage{fontspec} \setmainfont[Ligatures=TeX]{XCharter} \begin{document}\noindent Għajnsielem\\ OR\\ G\hwithstroke ajnsielem \end{document} Now, when I run this with lualatex, I get six errors like this: Missing character: There is no ħ (U+0127) in font [XCharter-Roman.otf]:mode=node;script=latn;language=dflt;+tlig;! and the missing character is a box. (n.b., Għajnsielem is a municipality in Malta, but I picked it primarily because I knew it had that character in it.) I suspect I have a font file missing or something that didn't survive the upgrade, but I wanted to make sure it is something with my operating system's packaging of XCharter or other font packages before I chase this down a rabbit hole. I thought I at least got a character there, not a box, in the past, and I don't remember there being a warning message or error, either, from the old version.
- Personalized bar with dot in a Curriculum Vitae europassby Sebastiano on May 2, 2026 at 7:23 pm
I would like to create in my Europass document \documentclass[italian,a4paper]{europasscv} \usepackage[italian]{babel} \usepackage[most]{tcolorbox} \DeclareRobustCommand\ebseries{\fontseries{eb}\selectfont} \DeclareTextFontCommand{\texteb}{\ebseries} \definecolor{marine}{HTML}{214493} \ecvname{Cristiano Euro} \newtcolorbox{mybox}{ enhanced, boxrule=0pt,frame hidden, borderline west={3pt}{-10pt}{marine}, colback=white, sharp corners } \begin{document} \begin{europasscv} \sffamily \ecvpersonalinfo{} \ecvbigitem{Posizione ricoperta}{ingegnere} \ecvsection{ingegnere} \ecvtitle{2011 – in corso}{C-Med} \ecvitem{}{\begin{mybox} Buyer con 4 anni di esperienza nel settore strategico degli acquisti, focalizzata sull’ottimizzazione delle condizioni di acquisto di C-Med. Ho accelerato gli approvvigionamenti del 65\% in 18 mesi, collaborando con il responsabile produzione per una Go-To-Market Strategy più rapida. Sono dotato di ottime capacità organizzative e di negoziazione.\end{mybox} } \end{europasscv} \end{document} something like this, i.e. inserting a vertical line with tcolorbox (or other solution) that has the same length as the text inside. My MWE does not respect the indications of the image. I thank you for any solution.
- microtype conflicts with titletoc: ! Undefined control sequence \MT@patch@undo@@\MT@patch@name [closed]by sergiokapone on May 2, 2026 at 6:19 pm
The following MWE produces an error with TeXLive 2025: % !TeX program = lualatex \documentclass{article} \usepackage{microtype} \usepackage{titletoc} \begin{document} \end{document} Error: ! Undefined control sequence. <argument> MT@patch@undo@@\MT@patch@name l.? \begin{document} Package versions: microtype 2026/02/26 v3.2c titletoc 2025/01/04 v2.17 (part of titlesec) TeXLive 2025, LuaLaTeX The error occurs because microtype applies its toc patch to internal commands, and titletoc modifies the same commands, leaving \MT@patch@name in an inconsistent state when the undo mechanism fires at \begin{document}. Workaround (works but disables only the toc protrusion patch): \usepackage[nopatch=toc]{microtype} Is there a more targeted fix, or is this a known bug?
- BibLaTeX with custom `.bbx` file to have author names in small capitalsby Laurent Bloch on May 2, 2026 at 4:46 pm
Could I have, in a .bbx file for BibLaTeX, a : \DeclareNameFormat{author} clause for author names in small capitals ? \textsc{\MakeUppercase{\namepartfamily}} doesn't.
- Bigfoot package changes ToC page breaking behaviourby pejsek on May 2, 2026 at 9:56 am
When using the book documentclass, the \tableofcontents tries to avoid leaving a chapter title alone at the end of a page. When loading the bigfoot package, this behaviour is removed. In the following code, the title of chapter 6 is left alone at the end of the first page. Commenting out the line \usepackage{bigfoot} moves the chapter title to the next page. Is there a way to retain the default behaviour while also loading the bigfoot package? \documentclass[oneside]{book} \usepackage{bigfoot} \begin{document} \tableofcontents \chapter{Chapter title} \section{Section title} \subsection{Subsection title} \subsection{Subsection title} \subsection{Subsection title} \subsection{Subsection title} \chapter{Chapter title} \section{Section title} \subsection{Subsection title} \subsection{Subsection title} \subsection{Subsection title} \subsection{Subsection title} \chapter{Chapter title} \section{Section title} \subsection{Subsection title} \subsection{Subsection title} \subsection{Subsection title} \subsection{Subsection title} \chapter{Chapter title} \section{Section title} \subsection{Subsection title} \subsection{Subsection title} \subsection{Subsection title} \subsection{Subsection title} \chapter{Chapter title} \section{Section title} \subsection{Subsection title} \subsection{Subsection title} \subsection{Subsection title} %\subsection{Subsection title} \chapter{Chapter title} \section{Section title} \subsection{Subsection title} \subsection{Subsection title} \subsection{Subsection title} \subsection{Subsection title} \chapter{Chapter title} \section{Section title} \subsection{Subsection title} \subsection{Subsection title} \subsection{Subsection title} \subsection{Subsection title} \end{document}
- How should I namespace my commands so they don't interfere with nobody in ConTeXt?by Jasper on May 2, 2026 at 7:59 am
I am considering making a third party ConTeXt package, built on LuaMetaFun. How should I namespace my commands so they don't interfere with nobody? % main.tex \usemodule[lua-mf3dtools] \starttext \startMPcode path p ; p := (-2,-2) -- (2,-2) -- (2,2) -- (-2,2) -- cycle ; fill p scaled 3.5cm withcolor white ; append_point[ fx="1", spec="withcolor black" ] ; \stopMPcode \stoptext % t-lua-mf3dtools.mkxl \startmodule[lua-mf3dtools] \ctxloadluafile{lua-mf3dtools-implementation} \processMPfigurefile{lua-mf3dtools-commands} \stopmodule -- lua-mf3dtools-implementation.lua local function single_string_expression(str) if type(str) ~= "string" then error("single_string_expression: expected a string, got " .. type(str) .. " (" .. tostring(str) .. ")") end local chunk, err = load(("return %s"):format(str), "expression", "t", _G) if not chunk then error("Failed to parse expression: " .. tostring(str) .. "\nError: " .. tostring(err)) end local ok, result = pcall(chunk) if not ok then error("Error evaluating expression: " .. tostring(result)) end return result end local function MG(MPmacro) return metapost.getparameterset(MPmacro) end local function sse(MPmacro) return single_string_expression(metapost.getparameterset(MPmacro)) end local function sses(MPmacro) return single_string_expression(tostring(metapost.getparameterset(MPmacro))) end local function ssf(MPmacro) return single_string_function(metapost.getparameterset(MPmacro)) end function mp.jasper_append_point_generate() local x, y, z = sses("fx"), sses("fy"), sses("fz") local filloptions = MG("specifications") end % lua-mf3dtools-commands.mp presetparameters "jasper_append_point" [ fx = "0", fy = "0", fz = "0", spec = "withcolor black", ] ; def append_point = applyparameters "jasper_append_point" "jasper_do_append_point" enddef ; vardef jasper_do_append_point = pushparameters "jasper_append_point" ; lua.mp.jasper_append_point_generate() ; popparameters ; enddef ;
- is there an easier way to draw a dotplotby Arne Timperman on May 2, 2026 at 7:23 am
I want to draw this dotplot: The only way I could think of is: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \usepackage{statistics} \usetikzlibrary{patterns} \begin{document} \begin{tikzpicture} \begin{axis}[ width=12cm, height=5cm, ymin=0, ymax=20, xmin=0, xmax=1.3, axis y line=left, axis x line=bottom, ytick=\empty, xlabel={$x$}, tick style={draw=none} ] % Dotplot (voorbeelddata) \addplot[ only marks, mark=*, mark size=2.5pt, green!70!black ] coordinates { % linkerzijde (0.35,1) (0.40,1) (0.45,1) (0.40,2) (0.45,2) (0.50,2) (0.45,3) (0.50,3) (0.55,3) (0.50,4) (0.55,4) (0.60,4) % midden (hoogste stapel) (0.60,1) (0.65,1) (0.70,1) (0.75,1) (0.60,2) (0.65,2) (0.70,2) (0.75,2) (0.60,3) (0.65,3) (0.70,3) (0.75,3) (0.65,4) (0.70,4) (0.65,5) (0.70,5) (0.65,6) (0.65,7) % rechterzijde (0.80,1) (0.85,1) (0.80,2) (0.85,2) (0.85,3) }; \end{axis} \end{tikzpicture} \end{document} Resulting in this not very satisfying result: Any suggestions?
- How to globally suppress in-line citation font being italic?by Redshoe on May 2, 2026 at 2:51 am
I am using the natbib citation management package with the aug08 bibliography style. When I use \cite{something} or \citealp{something} in line with the content, the letters of the citation call-out are in italics. How do I keep them from being italic globally? below is the minimal working example \documentclass[12pt]{report} \usepackage[letterpaper,left=1in,right=1in,bottom=1in,top=1in]{geometry} \usepackage[T1]{fontenc} \usepackage[authoryear]{natbib} \begin{document} \cite{bretherton2005} (\citealp{bretherton2005}). \bibliography{thesis} \bibliographystyle{agu08} \end{document}
- What's wrong with this fancy title page?by Cham on May 1, 2026 at 11:42 pm
I'm playing with a book cover (a novel) with the title separated on three lines. The first part is left aligned to the page, the middle part is centered, and the last part is (should be) right aligned. Currently, my title page is almost right, but I'm experiencing an horizontal glitch that I don't understand. Here's the MWE code that shows the issue. What is wrong with it? \documentclass[11pt,twoside]{book} \usepackage[T1]{fontenc} \usepackage[tt=false]{libertinus} \usepackage[french]{babel} \usepackage[stretch=50]{microtype} \usepackage[letterpaper,left=1.25in,right=1in,top=0.5in,bottom=0.5in,includeheadfoot,headheight=15pt]{geometry} % Option showframe pour montrer les bordures. \raggedbottom \hyphenpenalty=2000 \exhyphenpenalty=2000 \usepackage{titlesec} \usepackage{graphicx} \usepackage[dvipsnames]{xcolor} \usepackage{float} \usepackage[titles]{tocloft} \usepackage[dvipsnames]{xcolor} \usepackage{transparent} \usepackage{tikz} \usetikzlibrary{calc} \titleformat{\chapter}[display] {\normalfont\huge\bfseries\centering} {\chaptertitlename\ \thechapter}{20pt}{\Huge} \begin{document} \frontmatter \begin{titlepage} \definecolor{lightbrown}{RGB}{177, 149, 93} \definecolor{darkred1}{RGB}{60, 25, 0} \pagecolor{darkred1} \begin{tikzpicture}[remember picture, overlay] \draw[line width = 1in,color = white] ($(current page.north west) + (0.25in,0.25in)$) rectangle ($(current page.south east) + (0.25in,-0.25in)$); \draw[line width = 0.25pt,color = black] ($(current page.north west) + (0.75in,-0.25in)$) rectangle ($(current page.south east) + (-0.25in,0.25in)$); \draw[line width = 1pt,color = white] ($(current page.north west) + (1in,-0.5in)$) rectangle ($(current page.south east) + (-0.5in,0.5in)$); \end{tikzpicture} \centering {\textcolor{lightbrown}{\Huge\sffamily Author's name}} \vfill \raggedright {\textcolor{lightbrown}{\fontsize{58}{0}\selectfont\sffamily\textbf{{WOORLDS}}}} \\[2.5\baselineskip] \centering {\textcolor{lightbrown}{\fontsize{48}{0}\selectfont\sffamily\textbf{{of}}}} \\[2.5\baselineskip] \raggedleft {\textcolor{lightbrown}{\fontsize{58}{0}\selectfont\sffamily\textbf{{WOORMS}}}} \\[2\baselineskip] \vfill \centering \vfill \vfill \vfill {\textcolor{brown}{\Large\selectfont\sffamily Copyright Notice}} \end{titlepage} \pagecolor{white} \end{document} Also, the middle part should be well centered, horizontally AND vertically between the first and last part of the title. I'm not sure the code is properly done. Any advice on this would be greatly appreciated. Here's a preview of what this code is doing (don't mind about the weird title. This is just for the the MWE): As you could see on the picture, the last part of the title ("WOORMS") have more space to its right that the left of the fist part ("WOORLDS"). Also, I'm not sure that the middle part ("of") is well centered, vertically and horizontally.
- How to add extrusion glow of irregular shape different from `shadow scale`?by Explorer on May 1, 2026 at 6:50 pm
What I want to achieve is something like: Noted that the "glow" here is somewhat like a "shadow" path out of the border. However, I have tried blur shadow={shadow xshift=0pt,shadow yshift=0pt,shadow scale=1.05}: \documentclass[tikz,border=5pt]{standalone} \usetikzlibrary{shadows.blur,spy} \begin{document} \begin{tikzpicture}[spy using outlines={circle, magnification=3, size=3cm}] \draw[fill=gray!25,draw,rounded corners,blur shadow={shadow xshift=0pt,shadow yshift=0pt,shadow scale=1.05}] (40:4) arc[start angle=40,end angle=140,radius=4] -- (140:2) arc[start angle=140,end angle=40,radius=2] -- cycle; \draw[fill=white] (0,2.75) -- ++(.5,-.25) -- (0,3.5) -- ++(-.5,-1) -- cycle; \spy[red] on (140:2) in node at (-2,-1); \spy[blue] on (40:2) in node at (+2,-1); \end{tikzpicture} \end{document} The shadow glow is not what I was after: Is that possible to provide the shadows for such ideal glow for irregular shape?
- Align Text in Headerby jeroen2009 on May 1, 2026 at 2:49 pm
In the following example I am getting an additional unwanted empty line in the header text and I am looking to get the header text in the right cell aligned left. Is there an easy way to achieve this? \documentclass[a4paper,12pt]{book} \usepackage[utf8]{inputenc} \usepackage[demo]{graphicx} \usepackage{array} \usepackage{lastpage} \usepackage{lipsum} \usepackage{fancyhdr} \usepackage[hmargin=20mm,top=3cm,headheight=65pt,footskip=10pt]{geometry} \usepackage{tgheros} \renewcommand*\familydefault{\sfdefault} \usepackage[T1]{fontenc} \pagestyle{fancy} \renewcommand{\headrulewidth}{0pt} \fancyhead[CE,CO,LE,LO,RE,RO]{} %% clear out all headers \fancyhead[C]{% \begin{tabular}{|m{3.0cm}|m{9.3cm}|m{3.2cm}|} \hline \raisebox{-.2\height}{\includegraphics[height=7mm]{logo.png}} & \centering \raisebox{-.2\height}{\fontsize{18}{18}\selectfont{\textbf{Operating Procedure}}} & \centering {\fontsize{6.5}{6.5}\selectfont{Doc. Ref.: abcdef\\ REV1 of \today\\ Page \thepage\ of \pageref{LastPage}}}\tabularnewline \hline \end{tabular}% } \fancyfoot[CE,CO,LE,LO,RE,RO]{} %% clear out all footers \begin{document} \chapter{Chapter title} \thispagestyle{fancy} \section{Section title} \lipsum[1-10] \end{document}```
- Use "Date-Added" field from BibDesk to set urldateby bmrs on May 1, 2026 at 2:36 pm
Using BibDesk with Biblatex on a huge .bib file, every entry has a "date-added" field. Is it possible to use this one as the source of the "urldate" field for "online" entries? I tried to use "DeclareSourcemap" to set up the second field from the first one but without success. Here is the MWE: \documentclass{scrartcl} \usepackage{polyglossia} \setdefaultlanguage{english} \usepackage[ backend=biber, citestyle=verbose-trad2, ]{biblatex} \usepackage{filecontents} \DeclareSourcemap{ \maps[datatype=bibtex]{ \map{ \step[fieldsource=date-added] \step[fieldset=urldate] } } } \begin{filecontents}{\jobname.bib} @online{Website1, title = {Website 1}, url = {https://www.website1.com}, urldate = {2026-05-01}, date-added = {2026-05-01 16:21:32 +0200}} @online{Website2, title = {Website 2}, url = {https://www.website2.com}, date-added = {2026-05-01 16:22:49 +0200}} \end{filecontents} \addbibresource{\jobname.bib} \begin{document} This website\footcite{Website1} or another\footcite{Website2} \end{document}
- polyglossia and \AtBeginDocumentby Antonis on May 1, 2026 at 6:32 am
When polyglossia is loaded it seems that \AtBeginDocument fails to do its work. The following code \documentclass[12pt]{article} \usepackage{fontsetup} \usepackage{polyglossia} \setmainlanguage{english} \setotherlanguage{greek} \AtBeginDocument{\addfontfeatures{StylisticSet=6,StylisticSet=7}} \begin{document} θυμήθηκα \addfontfeatures{StylisticSet=6,StylisticSet=7} θυμήθηκα \end{document} produces So the \AtBeginDocument did not work (the thetas must be different as in the second line). Now if you comment out the lines of polyglossia, things work as expected, that is both lines produce the same output as in the second line of the picture above. What is wrong with the above code or with polyglossia?
- Create a simple emoji language for babelby David Purton on May 1, 2026 at 2:42 am
I have my doubts about the wisdom of this… But with LuaLaTeX, babel is really great at switching between fonts and languages automatically without mark up. And the settings for the language can by included in an ini file. I wondered about using this feature in a document that is already multilinugual and uses babel so I can just insert emojis wherever without thinking. This following MWE works, but I was wondering: Is this really a good idea? Is there a better way? Can the set up be done wihtout a separate babel-emoji.ini file? MWE %! TeX Program = lualatex \documentclass{article} \begin{filecontents}[overwrite]{babel-emoji.ini} [identification] charset = utf8 script.name = emoji [characters] ranges = 1F300..1F9FF 2600..26FF 2700..27BF \end{filecontents} \usepackage[english]{babel} \babelprovide[import=emoji, onchar=fonts]{emoji} \babelfont[emoji]{rm}{Noto Color Emoji} \begin{document} A \texttt{babel} integrated emoji: 😀 \end{document}
- Borromean Knot Brunnian linkby Julio Michael Stern on April 30, 2026 at 10:18 pm
I am trying to use TiKZ to draw a Borromean knot with 3 Wasp figures. I am getting the wrong superpositions. A single wasp is produced by the following code. Can someone help me to write a TiKZ code for this Brunnian entanglement with 12 crossings. Wasp: \documentclass[border=5mm]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} % Estilos para o anel do mosaico \tikzset{ vespa ring/.style={ draw=red, line width=11pt, line join=round }, white stripe/.style={ draw=white, line width=2pt, % Removida a opacidade para evitar manchas line join=round } } % Macro final da "Cintura de Vespa" com cabeça circular e elevada \newcommand{\vespawaist}{ (0.8, 0) % Cintura direita .. controls (0.8, 1.0) and (2.0, 1.8) .. (1.5, 2.4) % Ombro .. controls (1.0, 3.0) and (-1.0, 3.0) .. (-1.5, 2.4) % Topo elevado .. controls (-2.0, 1.8) and (-0.8, 1.0) .. (-0.8, 0) % Cintura esquerda .. controls (-0.8, -1.0) and (-2.0, -1.8) .. (-1.5, -2.4) % Ombro inferior .. controls (-1.0, -3.0) and (1.0, -3.0) .. (1.5, -2.4) % Base elevada .. controls (2.0, -1.8) and (0.8, -1.0) .. (0.8, 0) % Fecha -- cycle } % Desenho em camadas para garantir o branco puro \draw[vespa ring] \vespawaist; \draw[white stripe] \vespawaist; \end{tikzpicture} \end{document}
- Apply transformation xslant to node shape but not textby Paul on April 30, 2026 at 6:11 pm
I want to create a multi part parallelogram input block for a flowchart. There is no multi part trapezium shape that exist so for now I used a standard rectangular multi part shape with the xslant option to make it look like a parallelogram. I defined a style that I can easily reuse. The problem is that the text is also slanted, and if possible I would like it normal. Is there a way to apply xslant only to the shape and not to the text ? I tried creating a second node only for the text but the problem is that the paralellogram doesn't resize properly to fit the text. My MWE : \documentclass[class=article]{standalone} \usepackage[]{xcolor} \usepackage{tikz} \usetikzlibrary{shapes} \tikzstyle{io} = [rectangle split, rectangle split parts=2, xslant=0.4, draw, rectangle split part fill={blue!50,blue!20}, text centered, minimum width=4.25cm, minimum height=2cm] \begin{document} \begin{tikzpicture} \draw (0,0) node[io,name = ,align = center]{Parameters\nodepart{two} $\alpha$, $\eta$}; \end{tikzpicture} \end{document} Thanks for your help.
- Draw simple figures: l3draw vs PGF performancesby PHL on April 30, 2026 at 3:08 am
I have some lua code that generates coordinates of many triangles/quadrilaterals I then want to draw/fill. See this answer about Penrose tilings for a concrete example. The drawing is actually done in TikZ via the luadraw package, but I am wondering if I can make the code faster by replacing TikZ with l3draw. Rewriting my actual code to remove TikZ and luadraw dependences (and use l3draw or any other drawing tool) is not a complex task, but will ask me some time due to my limited programming skills. So I would prefer to know in advance if this is a good idea or not. Apart possibly performance, is there any other reasons to use l3draw over pgf for this kind of task? Edit: I am not using TikZ/pgf for the rest of the document. Suggesting to use another environment (as picture) is a valid answer.
- What is the proper way of implementing specific formatting requirements?by Simon on April 29, 2026 at 7:14 pm
I want to implement given formatting requirements, however, I feel overwhelmed by the number of parameters and their dependencies, and, thus, I don't know which to begin with, as I feel like all of them need to be considered simultaniously. Furthermore, there are even more formatting requirements to fulfill, yet, the following should be the most essential ones, which is why I want to implement these first and condensed them in a table: I use the KOMA-script class scrreprt and would have used the parskip=full- option to seperate paragraphs from each other. If there is any info missing, please tell me and I'll provide it. And if some requirement seems odd, please also let me know. Thanks in advance! EDIT - This MWE should cover all eventualities: \LoadClass[a4paper,parskip=full-]{scrreprt} \RequirePackage[top=3.5cm,bottom=2.5cm,left=3cm,right=3cm]{geometry} \begin{document} \chapter{Chapter Chapter Chapter Chapter Chapter} \section{Section Section Section Section Section Section Section Section} \subsection{Subsection Subsection Subsection Subsection Subsection Subsection Subsection} \subsubsection{Subsubsection Subsubsection Subsubsection Subsubsection Subsubsection Subsubsection} Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph \subsubsection{Subsubsection} Paragraph \subsection{Subsection} Paragraph \section{Section} Paragraph \end{document} EDIT 2 - Update This here shows how \onehalfspacing works: \LoadClass[a4paper,fontsize=12pt]{scrreprt}%try 10pt/11pt/12pt (or any other font size) \RequirePackage{setspace}%provides \setstretch{} \makeatletter \newcommand{\myonehalfspacing}{\normalsize\setstretch{\fpeval{1.5 * \f@size / \f@baselineskip}}} \makeatother %\myonehalfspacing \makeatletter \newcommand{\reportformattingtobecheckedfor}[1]{#1 When implementing \texttt{\string#1}, the reciprocal of the ratio of normal fontsize corresponding \f@size pt, but called 1\@ptsize pt, to its updated baselineskip of \the\baselineskip, defaulting \f@baselineskip, is \fpeval{\baselineskip / \f@size}.\hrule} \makeatother \begin{document} \hrule \reportformattingtobecheckedfor{\onehalfspacing} \reportformattingtobecheckedfor{\myonehalfspacing} \end{document} With this info, the updated MWE looks as follows: After the initial \LoadClass[a4paper,fontsize=12pt,parskip=full-]{scrreprt} \RequirePackage[top=2cm,bottom=2cm,left=3cm,right=3cm]{geometry}%changed to fit one page to exclude page break effects \RequirePackage[T1]{fontenc} \RequirePackage{setspace}%provides \setstretch{} , you could - for 1.5x-linespacing and formatted section headings - continue the preamble with \makeatletter \newcommand{\ratioofnormaltooneandhalfspacing}{} \AtBeginDocument{ \begingroup \normalsize \xdef\ratioofnormaltooneandhalfspacing{\fpeval{\f@size pt/\f@baselineskip*1.5}} \endgroup \myonehalfspacing%has to be called here to work, other than %\onehalfspacing %that can be called anywhere (don't know why here) --> toggle first % in this line on/off to compare, no need to % previous line } \newcommand{\myonehalfspacing}{\setstretch{\ratioofnormaltooneandhalfspacing}} \newcommand{\relativeonehalfspacingtoabsolute}[1]{\fpeval{#1/\ratioofnormaltooneandhalfspacing}}%would have wanted to wrap the fraction with round(...,0) to get the nearest int, doesn't give expected result (don't know why) \makeatother \RedeclareSectionCommand[ font=\normalfont\fontsize{20}{\relativeonehalfspacingtoabsolute{25}}\bfseries, beforeskip=42pt, afterskip=24pt ]{chapter} \RedeclareSectionCommand[ font=\normalfont\fontsize{16}{\relativeonehalfspacingtoabsolute{20}}\bfseries, beforeskip=28pt, afterskip=14pt ]{section} \RedeclareSectionCommand[ font=\normalfont\fontsize{14}{\relativeonehalfspacingtoabsolute{18}}\bfseries, beforeskip=20pt, afterskip=12pt ]{subsection} \RedeclareSectionCommand[ font=\normalfont\fontsize{12}{\relativeonehalfspacingtoabsolute{18}}\itshape, beforeskip=18pt, afterskip=12pt ]{subsubsection} or instead of this just write \makeatletter \newcommand{\myonehalfspacing}{\normalsize\setstretch{\fpeval{1.5 * \f@size / \f@baselineskip}}} \makeatother \myonehalfspacing %\onehalfspacing \addtokomafont{disposition}{\setstretch{1}} \RedeclareSectionCommand[ font=\normalfont\fontsize{20}{25}\bfseries, beforeskip=42pt, afterskip=24pt ]{chapter} \RedeclareSectionCommand[ font=\normalfont\fontsize{16}{20}\bfseries, beforeskip=28pt, afterskip=14pt ]{section} \RedeclareSectionCommand[ font=\normalfont\fontsize{14}{18}\bfseries, beforeskip=20pt, afterskip=12pt ]{subsection} \RedeclareSectionCommand[ font=\normalfont\fontsize{12}{18}\itshape, beforeskip=18pt, afterskip=12pt ]{subsubsection} , either way, you end the preamble with %from https://texwelt.de/fragen/21544/koma-script-abstande-bei-uberschriften-exakt-einstellen-welche-werte-sind-notwendig (not EN, but DE): \RequirePackage{xpatch} \makeatletter \At@startsection{\addtolength{\@tempskipa}{-\parskip}} % Jetzt folgt ein übler Hack ohne Garantie, dass der auch zukünftig noch funktionieren wird! \xpatchcmd{\@xsect}{\vskip\@tempskipa}{\vskip\dimexpr\@tempskipa-\parskip\relax}{}{} \makeatother % to eliminate the added vertical spacing that parskip effects, and with \makeatletter \newcommand{\reportcurrentformatting}{$\rightarrow\frac{\strip@pt\baselineskip\mathrm{pt}}{\f@size\mathrm{pt}}=\fpeval{\baselineskip / \f@size}$}%for debugging \makeatother for debugging, completed by \begin{document} \chapter{Chapter Chapter Chapter Chapter Chapter \reportcurrentformatting} \hrule \section{Section Section Section Section Section Section Section \reportcurrentformatting} \hrule \subsection{Subsection Subsection Subsection Subsection Subsection \reportcurrentformatting} \hrule \subsubsection{Subsubsection Subsubsection Subsubsection Subsubsection Subsubsection Subsubsection \reportcurrentformatting} \hrule Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph \reportcurrentformatting \hrule \hrule Paragraph \reportcurrentformatting \hrule \subsubsection{Subsubsection \reportcurrentformatting} \hrule Paragraph \reportcurrentformatting \hrule \subsection{Subsection \reportcurrentformatting} \hrule Paragraph \reportcurrentformatting \hrule \section{Section \reportcurrentformatting} \hrule Paragraph \reportcurrentformatting \hrule \chapter{Chapter \reportcurrentformatting} \hrule Paragraph \reportcurrentformatting \hrule \end{document} . The MWE's output looks like this (1st page cropped): At this point, the two only remaining areas where I need help are: Does the code that should eliminate the added vertical spacing around the section headings which parskip effects look correct and effective? Is there a way to check the respective sizes of beforeskip and afterskip? In theory, they should be correct as they were set manually, yet, when I compare the font size of chapter and the line spacing of section (they should be the same) measured with a ruler on a monitor (I know ... but it aint stupid if it works) they are not the same, or am I misunderstanding their theoritical (not code) definition here? If these (bonus) questions justify a new post, please let me know. Just thought they benefit from the overall context of the original question and are still somewhat linked to it. Thanks once again!
- $\implies$ makes "! Missing } inserted" errorby Harry on April 29, 2026 at 11:17 am
In my tex I have a sentence: No external torque $\implies$ Angular momentum $L$ is conserved: After I compile the tex file, it throws out "! Missing } inserted" error. If I delete the $\implies$ in the above sentence, all is fine. Why and how to solve it? The whole tex code (I run it with XeLatex+MakeIndex+BibTex): \documentclass{beamer} % 默认就是 4:3 \usetheme{Madrid} \usecolortheme{seahorse} \usepackage{amsmath} \usepackage{amssymb} \usepackage{physics} \usepackage{tikz} \usepackage{tikz-3dplot} \usetikzlibrary{calc, decorations.markings, arrows.meta, angles, quotes} \usetikzlibrary{patterns,decorations.pathmorphing} \usepackage{amsfonts} \usepackage[utf8]{inputenc} \usepackage[T3,T1]{fontenc} \usepackage{tipa} \usepackage{xcolor} \usepackage{booktabs} % 用于绘制专业的表格线 \usepackage{setspace} \usepackage{fontspec} % 如果你是 Windows 用户,通常 Arial 包含最全的音标字符 \setmainfont{Arial} \usepackage{siunitx} \begin{document} \begin{frame}{Exercise: Angular Momentum Conservation} \textbf{Problem:} \\ Two flywheels $A$ and $B$ share a common axis. Initially, $B$ is at rest, and $A$ rotates with angular velocity $\omega_A$. After they are coupled by clutch $C$, they rotate together with velocity $\omega$. Find $J_B$ if $A$'s moment of inertia is $J_A$. \textbf{Solution:} \\ No external torque $\implies$ Angular momentum $L$ is conserved: \begin{equation*} J_A \omega_A = (J_A + J_B) \omega \end{equation*} \pause \end{frame} \end{document}
- Multiple splits in Tikz rectangle with distinct linesby iago on April 29, 2026 at 9:24 am
My goal is to get a rectangle like the one below, but with text in the nested rectangles. Line types could be for example the following: I saw tikz: Multiple splits of rectangle, but it does not answer the question on the line types. Beyond that, I am a beginner using Tikz, and I'd like the answer explained, since the linked answer is complex to understand. Thanks!