Hot
- How do I draw the feedback loop in my latex code for my research paper?by Sajid Mahfuz on June 11, 2026 at 10:21 pm
How do I create the feedback loop shown in the image? I’ve also been trying to make all the arrow lengths uniform, but I keep failing (bear with me, I’m a beginner in LaTeX), and I need the diagram to be larger. I’ve attached my code and the image. \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows.meta, positioning, calc} \begin{document} \begin{center} \begin{tikzpicture}[ node distance=1.2cm and 1.2cm, block/.style={ draw, rectangle, minimum width=2.5cm, minimum height=0.9cm, line width=1pt, align=center }, innerblock/.style={ draw, rectangle, minimum width=1.8cm, minimum height=0.9cm, line width=1pt, % changed from 0.5pt to 1pt align=center }, disturbance/.style={ draw, rectangle, minimum width=1.8cm, minimum height=0.9cm, fill=red!10, line width=1pt, align=center }, arrow/.style={-{Triangle[length=2mm,width=2mm]}, line width=1pt} ] % ================= INPUT ================= \node[circle, draw, minimum size=0.8cm, line width=1pt] (sum) at (0,0) {}; % changed to 1pt % X inside circle (also 1pt) \draw[line width=1pt] (sum.north east) -- (sum.south west); \draw[line width=1pt] (sum.north west) -- (sum.south east); \draw[arrow] (-1.2,0) -- (sum.west); \node[left=1.2cm] {$Z_D$}; % ================= CONTROL ================= \node[block, above right=0.5cm and 1.0cm of sum] (sdre) {SDRE}; \node[block, below right=0.5cm and 1.0cm of sum] (pi) {PI}; \draw[arrow] (sum.east) -- ++(0.2,0) |- (sdre.west); \draw[arrow] (sum.east) -- ++(0.2,0) |- (pi.west); % ================= ACTUATION ================= \node[block, right=1.0cm of sdre] (actuator) {Actuator}; \node[block, right=1.0cm of pi] (thrust) {Thrust}; \draw[arrow] (sdre.east) -- (actuator.west); \draw[arrow] (pi.east) -- (thrust.west); % ================= THRUST MAP ================= \node[block, below=0.8cm of pi] (thrustMap) {Thrust Map}; \draw[arrow] (pi.south) -- (thrustMap.north); \draw[arrow] (thrustMap.east) -| (thrust.south); % ================= DYNAMICS ================= \node[innerblock, right=1.0cm of actuator] (att_dyn) {Attitude Dynamics}; \node[innerblock, right=1.0cm of thrust] (alt_dyn) {Altitude Dynamics}; \draw[arrow] (actuator.east) -- (att_dyn.west); \draw[arrow] (thrust.east) -- (alt_dyn.west); % ================= DISTURBANCES ================= \node[disturbance, above=0.6cm of att_dyn] (distAtt) {Gust}; \node[disturbance, below=0.6cm of alt_dyn] (distAlt) {Gust}; \draw[arrow] (distAtt.south) -- (att_dyn.north); \draw[arrow] (distAlt.north) -- (alt_dyn.south); % ================= OUTPUT MERGE ================= \coordinate (mergeTop) at ($(att_dyn.east)+(0.6,0)$); \coordinate (mergeBottom) at ($(alt_dyn.east)+(0.6,0)$); \draw[line width=1pt] (att_dyn.east) -- (mergeTop); \draw[line width=1pt] (alt_dyn.east) -- (mergeBottom); \draw[line width=1pt] (mergeTop) -- (mergeBottom); % Midpoint of the vertical line \coordinate (mergeMid) at ($(mergeTop)!0.5!(mergeBottom)$); % Output arrow from that midpoint \draw[arrow] (mergeMid) -- ++(0.8,0) node[right] {Output}; \end{tikzpicture} \end{center} \end{document}
- Two overlapping circles with lens effect between two colored rectangles in TikZby Morace Elegbele on June 11, 2026 at 3:43 pm
I am trying to reproduce the following header style for exercises in a LaTeX document using TikZ. The header consists of two rectangles side by side: A blue rectangle on the left with rounded corners An orange rectangle on the right with rounded corners Each rectangle has a circle on its inner edge (right edge of the blue one, left edge of the orange one). The two circles overlap and their intersection should appear as a white lens-shaped area (vesica piscis effect), as if the circles were drawn on top of the rectangles and cut through both. The exercise number is placed inside the blue circle area, and the word "Exercice" appears in the orange rectangle. I tried using even odd rule and \clip with \begin{scope} but I cannot get the intersection to look clean — either one circle hides the other, or the background rectangle shows through. Here is my current code: [coller votre code ici] And here is the image I want to reproduce: [joindre l'image] How can I achieve this effect cleanly in TikZ? My code: \documentclass[a4paper,12pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{tikz} \usepackage{xcolor} \definecolor{bleuFonce}{RGB}{30,100,180} \definecolor{orangeTitre}{RGB}{255,140,0} \newcounter{numexo} \newcommand{\titreExercice}{% \stepcounter{numexo}% \begin{tikzpicture} % Rectangle bleu avec bords arrondis \fill[bleuFonce, rounded corners=8pt] (0,0) rectangle (4.5,0.7); % Grand cercle bleu débordant à gauche \fill[bleuFonce,even odd rule] (2.3,0.35) circle(0.42); % Cercle blanc intérieur gauche \fill[white] (2.3,0.35) circle (0.28); % Rectangle orange avec bords arrondis (par dessus à droite) \fill[orangeTitre, rounded corners=8pt] (2.8,0) rectangle (5.8,0.7); % Grand cercle orange débordant à gauche du rectangle orange \fill[orangeTitre,even odd rule] (2.8,0.35) circle (0.42); % Cercle blanc intérieur droit \fill[white] (2.8,0.35) circle (0.28); % Numéro dans le cercle blanc gauche \node[bleuFonce, font=\large\bfseries] at (0.1,0.35) {\thenumexo}; % Texte "Exercice" en blanc \node[white, font=\large\bfseries] at (4.5,0.35) {Exercice}; \end{tikzpicture}% } \begin{document} \titreExercice \bigskip \titreExercice \end{document}
- Can I use BFO to validate my PDFs locally?by Teepeemm on June 11, 2026 at 3:26 pm
I've been creating PDFs using \DocumentMetadata{ lang=en, tagging=on, pdfstandard=ua-2, tagging-setup={ math/setup=mathml-SE } } Accessible math in PDF – finally! lists five accessibility checkers that support PDF/UA-2. The first one is BFO with an online tool OctoPDF. The online tool limits my uploads to 2MB, but they make their Java library available. Is it possible to use the BFO library to validate PDF/UA-2 files locally?
- How to define a 'smart,' resizeable paired-brace delimiter macro that supports set-builder notation and line-breaking at commas in inline math mode?by Nyx on June 11, 2026 at 3:00 pm
In [1] we have the following MWE of the definition and use-cases of a \set macro, which is a resizeable paired-brace delimiter with \suchthat detection for set-builder notation. \documentclass[varwidth]{standalone} \usepackage{amsmath} \usepackage{xparse} \newcommand{\suchthat}{\mid} \ExplSyntaxOn \NewDocumentCommand{\set}{som} { % limit the scope for \suchthat \group_begin: \cs_set_protected:Npn \suchthat { \tl_use:N \l__egreg_set_st_tl } \IfBooleanTF{#1} { \egreg_set_auto:n { #3 } } { \egreg_set_fixed:nn { #2 } { #3 } } \group_end: } \tl_new:N \l__egreg_set_st_tl \cs_new_protected:Nn \__egreg_set_st:n { \tl_set:Nn \l__egreg_set_st_tl { #1 } } \cs_new_protected:Nn \egreg_set_auto:n { \__egreg_set_st:n { \nonscript\; \middle\vert \nonscript\; } \left\{ #1 \right\} } \cs_new_protected:Nn \egreg_set_fixed:nn { \tl_if_novalue:nTF { #1 } { \__egreg_set_st:n { \mid } \lbrace #2 \rbrace } { \__egreg_set_st:n { \mathrel{#1\vert} } \mathopen{#1\lbrace} #2 \mathclose{#1\rbrace} } } \ExplSyntaxOff \begin{document} $\set{a,b,c}\cup\set[\big]{a,b,c}$ $\set{x\suchthat a<x<b}$ $\set[\Big]{x\suchthat a<x<b}$ $\set*{x\suchthat \dfrac{1}{2}<x<3}$ \end{document} In [2] we have the following MWE of the definition and use-cases of a \splitatcommas macro, which allows for line breaks at commas inside inline math mode. \documentclass{article} \ExplSyntaxOn \NewDocumentCommand{\splitatcommas}{m} { \group_begin: \int_compare:nNnF { \char_value_mathcode:n {`,} }= {"8000} { \char_set_active_eq:nN {`,} \__kennytm_comma: \char_set_mathcode:nn {`,} {"8000} } #1 \group_end: } \cs_new_protected:Ne \__kennytm_comma: { \mathchar\char_value_mathcode:n {`,}~ \penalty0~\exp_not:n { \hspace{0pt plus 1em} } } \ExplSyntaxOff \newcommand{\tuple}[1]{(\splitatcommas{#1})} \newcommand{\set}[1]{\{\splitatcommas{#1}\}} \begin{document} \setlength{\lineskiplimit}{2pt}\setlength{\lineskip}{3pt} % for this particular case \setlength{\parindent}{0pt} % just for this example $\splitatcommas{ \frac{1}{2},\frac{3}{5},\frac{8}{13},\frac{21}{34},\frac{55}{89}, \frac{144}{233},\frac{377}{610},\frac{987}{1597},\frac{2584}{4181}, \frac{6765}{10946},\frac{17711}{28657},\frac{46368}{75025}, \frac{121393}{196418},\frac{317811}{514229},\frac{832040}{1346269}, \frac{2178309}{3524578},\frac{5702887}{9227465}, \frac{14930352}{24157817},\frac{39088169}{63245986},\frac{102334155}{165580141} }$ \medskip $\set{ \tuple{a,b,c,d},\tuple{1,2,3,4,5,6},\tuple{11,22,33,44,55,66,77,88}, \tuple{a,b,c,d},\tuple{1,2,3,4,5,6},\tuple{11,22,33,44,55,66,77,88}, \tuple{a,b,c,d},\tuple{1,2,3,4,5,6},\tuple{11,22,33,44,55,66,77,88}, \tuple{a,b,c,d},\tuple{1,2,3,4,5,6},\tuple{11,22,33,44,55,66,77,88} }$ \end{document} My question is How can I define a 'smart,' resizeable paired-brace delimiter macro that supports set-builder notation and line-breaking at commas in inline math mode (i.e., combine \set from [1] and \splitatcommas from [2])? The following is an MWE of my attempt so far. \documentclass[ border={10pt}, varwidth, ]{standalone} \usepackage{unicode-math} % \usepackage{amsmath} % Loaded by `unicode-math` \usepackage[default]{fontsetup} % For NewCM \usepackage{mleftright} % \usepackage{xparse} % Integrated into the kernel from 2020-10-01 \newcommand{\suchthat}{\mid} \ExplSyntaxOn \NewDocumentCommand{\setaux}{som} { % limit the scope for \suchthat \group_begin: \cs_set_protected:Npn \suchthat { \tl_use:N \l__egreg_set_st_tl } \IfBooleanTF{#1} { \egreg_set_auto:n { #3 } } { \egreg_set_fixed:nn { #2 } { #3 } } \group_end: } \tl_new:N \l__egreg_set_st_tl \cs_new_protected:Nn \__egreg_set_st:n { \tl_set:Nn \l__egreg_set_st_tl { #1 } } \cs_new_protected:Nn \egreg_set_auto:n { \__egreg_set_st:n { \nonscript\; \middle\vert \nonscript\; } \left\{ #1 \right\} } \cs_new_protected:Nn \egreg_set_fixed:nn { \tl_if_novalue:nTF { #1 } { \__egreg_set_st:n { \mid } \lbrace #2 \rbrace } { \__egreg_set_st:n { \mathrel{#1\vert} } \mathopen{#1\lbrace} #2 \mathclose{#1\rbrace} } } \NewDocumentCommand{\splitatcommas}{m} { \group_begin: \int_compare:nNnF { \char_value_mathcode:n {`,} }= {"8000} { \char_set_active_eq:nN {`,} \__kennytm_comma: \char_set_mathcode:nn {`,} {"8000} } #1 \group_end: } \cs_new_protected:Ne \__kennytm_comma: { \mathchar\char_value_mathcode:n {`,}~ \penalty0~\exp_not:n { \hspace{0pt plus 1em} } } \ExplSyntaxOff % Combined macro \NewDocumentCommand{\set}{som}{ \IfBooleanTF{#1}{\splitatcommas{\setaux*{#3}}}{% \IfNoValueTF{#2}{% \splitatcommas{\setaux{#3}}% }{% \splitatcommas{\setaux[#2]{#3}}% } } } % Empty set \setmathfont[CharacterVariant=2]{NewCMMath-Regular.otf} \AtBeginDocument{% \renewcommand{\emptyset}{\char"2300}% \renewcommand{\varnothing}{\char"2205}} \begin{document} % \setlength{\lineskiplimit}{2pt}\setlength{\lineskip}{3pt} \setlength{\parindent}{0pt} % \(\set{a,b,c}\cup\set[\big]{a,b,c}\) \(\set{x\suchthat a<x<b}\) \(\set[\Big]{x\suchthat a<x<b}\) \(\set*{x\suchthat \dfrac{1}{2}<x<3}\) We have \(\emptyset = \set{}\) and \(\omega_0 = \set{ \emptyset, \set{\emptyset}, \set{\emptyset, \set{\emptyset}}, \set{\emptyset, \set{\emptyset}, \set{\emptyset, \set{\emptyset}}}, \set{\emptyset, \set{\emptyset}, \allowbreak {\set{\emptyset, \set{\emptyset}}, \set{\emptyset, \set{\emptyset}, \set{\emptyset, \set{\emptyset}}}}}, \dots }. \) % \end{document} References [1] E. Gregorio. (2020). TeX, LaTeX and math. TUGboat, 41(1), 43–53. https://www.latex-project.org/publications/2020-egreg-TUB-tb127gregorio-math.pdf [2] E. Gregorio. (2025, May 17). Allowing line break at ',' in inline math mode? (answer). TeX Stack Exchange. https://tex.stackexchange.com/a/309558
- mathc10 don't apply bold modeby mathrm alpha on June 11, 2026 at 1:54 pm
Although mathc10 has a lowercase version \mathcal, it cannot be used with bold fonts because it is undefined. % Source - https://tex.stackexchange.com/a/747706 % Posted by John, modified by community. See post 'Timeline' for change history % Retrieved 2026-06-11, License - CC BY-SA 4.0 \documentclass{article} \DeclareFontFamily{OT1}{mathc}{} \DeclareFontShape{OT1}{mathc}{m}{it}{<-> mathc10}{} \DeclareMathAlphabet{\mathcal}{OT1}{mathc}{m}{it} \DeclareMathAlphabet{\mathbfcal}{OT1}{mathc}{bx}{it} \begin{document} $\mathcal{Aa}$, $\mathbfcal{Aa}$ \end{document} This not only didn't become bold, but it was also fallen back to the \mathrm style. The bold \mathcal should look like this: It would be even better if it could fake bold and achieve a similar width styles effect. References: Lowercase \mathcal
- Drawing tikz five line style arrows in text display [closed]by mathrm alpha on June 11, 2026 at 12:15 pm
Although a five-line arrow was unearthed, but: But it's not the specific text size I want. \documentclass[tikz,border=5pt]{standalone} \usetikzlibrary{nfold} \begin{document} \begin{tikzpicture} \draw[double equal sign distance, nfold=5, arrows=-Implies] (0,-0.7) -- (3,-0.7); \end{tikzpicture} \end{document} References: Drawing a quadruple arrow
- Forcing LyX to place label inside caption to reference floatby NicolasBourbaki on June 11, 2026 at 10:45 am
When inserting a label at the very beginning or end inside a caption in LyX (really inside the box of the caption in the LyX window), the label ends up outside \caption{my caption}´ as in \caption{my_caption}\label{my_figure} in the generated *.tex file. However, LaTeX (pdflatex) requires the label to be inside the caption as in \caption{my caption\label{fig:my_figure}} to resolve \ref{fig:my_figure}. Removing \usepackage{mhchem} from the preamble solves the issue. Manually correcting the generated *.tex file to \caption{my caption\label{fig:my_figure}} also solves the problem, but LyX would overwrites it in the next run. Minimal example to reproduce the problem (MWE): #LyX 2.5 created this file. For more info see https://www.lyx.org/ \lyxformat 643 \begin_document \begin_header \save_transient_properties true \origin unavailable \textclass tufte-handout \begin_preamble \usepackage{mhchem} \end_preamble \use_default_options true \maintain_unincluded_children no \language english \language_package default \inputencoding utf8 \fontencoding auto \font_roman "default" "default" \font_sans "default" "default" \font_typewriter "default" "default" \font_math "auto" "auto" \font_default_family default \use_non_tex_fonts false \font_sc false \font_roman_osf false \font_sans_osf false \font_typewriter_osf false \font_sf_scale 100 100 \font_tt_scale 100 100 \use_microtype false \use_dash_ligatures true \graphics default \default_output_format default \output_sync 0 \bibtex_command default \index_command default \float_placement class \float_alignment class \paperfontsize default \spacing single \use_hyperref false \papersize default \use_geometry true \use_package amsmath 1 \use_package amssymb 1 \use_package cancel 1 \use_package esint 1 \use_package mathdots 1 \use_package mathtools 1 \use_package mhchem 1 \use_package stackrel 1 \use_package stmaryrd 1 \use_package undertilde 1 \cite_engine natbib \cite_engine_type authoryear \biblio_style plain \use_bibtopic false \use_indices false \paperorientation portrait \suppress_date false \justification default \crossref_package refstyle \use_formatted_ref 0 \use_minted 0 \use_lineno 0 \backgroundcolor none \fontcolor none \notefontcolor lightgray \boxbgcolor red \table_border_color default \table_odd_row_color default \table_even_row_color default \table_alt_row_colors_start 1 \index Index \shortcut idx \color #008000 \end_index \secnumdepth 2 \tocdepth 2 \paragraph_separation indent \paragraph_indentation default \is_math_indent 0 \math_numbering_side default \quotes_style english \dynamic_quotes 0 \papercolumns 1 \papersides 1 \paperpagestyle default \tablestyle default \tracking_changes false \output_changes false \change_bars false \postpone_fragile_content true \html_math_output 0 \html_css_as_file 0 \html_be_strict false \docbook_table_output 0 \docbook_mathml_prefix 1 \docbook_mathml_version 0 \end_header \begin_body \begin_layout Standard \end_layout \begin_layout Standard \begin_inset Float figure placement document alignment document wide false sideways false status open \begin_layout Plain Layout \end_layout \begin_layout Plain Layout \begin_inset Caption Standard \begin_layout Plain Layout My figure \begin_inset CommandInset label LatexCommand label name "fig:my_figure" \end_inset \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Standard This sentence refers to \begin_inset CommandInset ref LatexCommand formatted reference "fig:my_figure" plural "false" caps "false" noprefix "false" nolink "false" tuple "list" \end_inset . \end_layout \end_body \end_document Could the problem be that the mhchem package gets loaded by LyX by default and using \usepackage{mhchem} causes the problem? Why would this not be a problem when using other documentclasses? When I remove \usepackage{mhchem}, I can no longer use macros like \ce{H2O}. Is this a known issue? Does anyone know of a workaround? I'm using the latest stable release of LyX on Windows (and also Linux).
- Image not vertically-centered in text [duplicate]by Rassine Orange on June 11, 2026 at 9:49 am
How to make the image "vertically-centered" right after the text? With my code, the image is "bottom-aligned"... \documentclass{article} \usepackage{graphicx} \newcommand\LevelEasy[0]{\includegraphics[width=0.7cm]{Pics/base} } \newcommand\LevelHard[0]{\includegraphics[width=0.7cm]{Pics/skull} } \begin{document} \begin{itemize} \item \textbf{A simple one}~\LevelEasy \vspace{3cm} \item \textbf{A difficult one}~\LevelHard \end{itemize} \end{document}
- How apply to \MakeUppercase, \MakeLowercase in math-mode Greek letters?by mathrm alpha on June 11, 2026 at 8:43 am
math-mode Math Greek letters do not work for \MakeUppercase, \MakeLowercase. \documentclass{article} \begin{document} $\MakeUppercase{\alpha\beta\gamma}\MakeLowercase{\Gamma\Delta\Theta}$ \end{document}
- How to use LaTeX to calculate the average divided by the sum and the ranking of values in a table? [closed]by mathrm alpha on June 11, 2026 at 8:34 am
While there are similar posts on LaTeX for calculating sums, they don't seem to mention division for the average sum. How can I automatically calculate sums in a LaTeX table? There posts was no mention of automatic ranking based on score. \documentclass{article} \usepackage{datatool} \usepackage{xfp} \usepackage{booktabs} \newcommand{\addteam}[4]{% \DTLnewrow{basketball}% \DTLnewdbentry{basketball}{Name}{#1}% \DTLnewdbentry{basketball}{Winner}{#2}% \DTLnewdbentry{basketball}{Loser}{#3}% \DTLnewdbentry{basketball}{AvgScore}{#4}% \def\winrate{\fpeval{round(#2 / (#2 + #3), 3)}}% \DTLnewdbentry{basketball}{WinRate}{\winrate}% } \begin{document} \DTLnewdb{basketball} \addteam{Detroit Pistons}{60}{22}{117.8} \addteam{Boston Celtics}{56}{26}{114.9} \addteam{New York Knicks}{53}{29}{116.5} \DTLsort{WinRate=descending}{basketball} \begin{table}[htbp] \centering \caption{Basketball Team Standings} \begin{tabular}{cccccc} \toprule Ranking & Name & Winner & Loser & Win rate & Average score \\ \midrule \DTLforeach*{basketball}{% \Name=Name,\Winner=Winner,\Loser=Loser,\WinRate=WinRate,\AvgScore=AvgScore}{% \DTLcurrentrow~& \Name & \Winner & \Loser & \WinRate & \AvgScore \\ }% \bottomrule \end{tabular} \end{table} \end{document} Although there are results, the rankings and the winning percentage seem a bit odd. Source: https://www.espn.com/nba/standings
- Querying CTAN packages by licenceby Psychonaut on June 10, 2026 at 4:29 pm
Packages on CTAN are tagged according to their licence; this information is displayed on each package's page along with other basic metadata such as its name, version, maintainer, and topics. I know that I can browse or search for all packages assigned to a given topic using the topics index or using the extended search form. Is there any similarly easy way of finding all CTAN packages with a given licence? Here's what I've tried so far: I checked the master licence list, but if I click on one of the licences in the list, the page I'm taken to gives me only basic information about the licence and (in some cases) some statistics about the number of packages that use that licence. I checked the extended search form form. It doesn't have a dedicated field for the licence. If I do search for a licence name, then it returns only the individual licence pages described above, not the packages that use that licence. I checked the XML API and JSON API. They provide endpoints for listing all licences, and for listing all packages, but not for listing packages by licence. The entries returned by the "List of licenses" endpoints list only a unique ID, name, and free/non-free status for each licence, but not which packages use that licence. The entries returned by the "List of Packages" endpoints list only a unique ID, name, and brief description for that package, but not its licence. I could use the XML or JSON API to get a full list of packages, extract the unique IDs to construct the URL for each package's page on CTAN, download each of those pages, and then scrape the licence data. But there are currently almost 7000 packages, so scraping the site in this way will take a long time, and I'm not sure that the site operators would appreciate all that traffic. (My use case, in case anyone is wondering, is finding packages that are available on CTAN but that are not distributed with TeX Live due to licensing restrictions. I'm curious as to what sort of functionality I and other TeX Live users might be missing out on, and might decide to code freely licensed replacements for any seemingly useful non-free packages.)
- tikz: absolute coordinates of a node placed in a second node positioned relative to a third nodeby pluton on June 10, 2026 at 4:18 pm
A MWE is probably better than lengthy explanations: \documentclass[tikz,10pt]{standalone} \usetikzlibrary{positioning} % savedbox with a sketch \newsavebox{\sdbox} \sbox{\sdbox}{% \begin{tikzpicture}[scale=0.35] \node (rbox) [fill=red] at (1,0) {}; \node (bbox) [fill=blue] at (1,1) {}; \end{tikzpicture}% } \begin{document} \begin{tikzpicture}[scale=0.5,font=\small] % blocks \node (comp) {computer}; \node[right = 1cm of comp] (sb) {\usebox{\sdbox}}; % arrow \draw[->] (rbox) -- (comp); \end{tikzpicture} \end{document} Upon compilation, you'll notice that the arrow does not link the node (rbox) from its absolute position after the node (sb) is drawn, as it should go from the red rectangle to the computer box. Would it be possible to achieve that goal?
- How do I directly input foreign scripts into LuaLaTeX equations?by Sageof6Paths on June 10, 2026 at 4:03 pm
How do I directly input foreign scripts into LuaLaTeX equations? I'm using LuaLaTeX with the unicode-math package. I have text mode setup that uses fallback font for any glyphs not covered. I also want to do the same for math mode, but with different font choices. I'm currently unable to input a foreign script like Kanji and Thai without adding commands like \text{} around it, despite having fonts that support Kanji and Thai. I want to be able to input scripts like Kanji and Thai into equations without extra commands as long as I have the proper font for it. \documentclass{article} \usepackage{unicode-math} \directlua{ luaotfload.add_fallback ("textFallback", { "SimSun:mode=harf;", } ) } \setmainfont{Arial}[RawFeature={fallback=textFallback}] \setmathfont{Latin Modern Math} \begin{document} This is a sample text. この文章は日本語です。 $∀天∈ℝ, ∀ค∈ℝ, 天+ค∈ℝ$ \end{document} Edit: Added clarification and included the Thai script.
- Good way to write dynamical physics problemsby Rassine Orange on June 10, 2026 at 3:58 pm
I'm a physics teacher and I'd like to share here my way to write "dynamical" exercises. After posting a couple of questions more or less related, I've read comments implying that my way of doing could be improved. When I say "dynamical" I mean that the variables of my problem (\mass, \speed, ...) are coded in the questions. I don't wanna hard-code for the following reasons: If I write everything with, say, m=3kg, and then I wanna change to m=2kg, I don't wanna rewrite everything. I can reuse the questions very fast with different values, e.g. for exams or for the students to practise. Below a MWE of a "typical" problem. Please, do not focus on the Physics, but on the LaTeX ideas, mainly: Could I improve the way I store variables and compute other quantities? For the units, which command should I use: mathrm; text ; textup; ... ? Anything else? I want to make clear that, even if in this example I use basic maths (mainly the 4 operations), I typically need all the usual fonctions (powers, log, sqrt, exp, trigo), so any solution that you suggest should handle all these functions. \documentclass{article} \usepackage{xfp} % provides \fpeval \usepackage{amsmath} \begin{document} \def\mass{3} \def\speed{10} \def\distance{1} \edef\Ekin{\fpeval{0.5*\mass*\speed^2}} \edef\force{\fpeval{0.5*\mass*\speed^2/\distance}} A mass $m=\mass\, \mathrm{kg}$ starts moving from rest. After a distance $d=\distance\, \textup{m}$ its velocity is $\speed\, \text{m} \times \text{s}^{-1}$\,. Compute the force. \vspace{5cm} Solution First you compute the kinetic energy $$ E=\frac 12 mv^2 = \Ekin\, \mathrm{J} $$ blabla more details, more equations, blablabla Use the work theorem to find $$ F=\frac{mv^2}{2d} = \force\, \mathrm{N}\,. $$ \end{document} Community Edit: Current output
- Custom section formatting with titlesec and ulem: making subsection underline span both number and titleby Nevpzo on June 10, 2026 at 2:52 pm
I found a section formatting style on TeX Stack Exchange that I really like. The only issue is that it applies the same formatting to sections, subsections, and subsubsections, whereas I would like a clearer hierarchy with sections having boxed number + colored underline; subsections having colored number + underline; subsubsections having colored number and text (no underline). My current implementation is below. It mostly works, but for some reason, there is a gap in the underline between the section number box and the title. I am using titlesec and ulem for the underlining. \documentclass{article} % === Required packages === \RequirePackage[explicit]{titlesec} \RequirePackage{soul} \RequirePackage{xcolor} \definecolor{titlepagecolor}{rgb}{.13, .36, .38} % === Underline helper === \newbox\TitleUnderlineTestBox \newcommand*\TitleUnderline[1]{% \bgroup \setbox\TitleUnderlineTestBox\hbox{\colorbox{titlepagecolor}\strut}% \setul{\dimexpr\dp\TitleUnderlineTestBox-.3ex\relax}{.3ex}% {\color{titlepagecolor}\ul{\mbox{#1}}}% \egroup } % === (sub)Section numbers === \newcommand*\SectionNumberBox[1]{% \colorbox{titlepagecolor}{% \makebox[2.5em][c]{% \color{white}\strut\csname the#1\endcsname }% }% \hspace{0.5em}% } \newcommand*\SubsectionNumberColored{% {\color{titlepagecolor}\thesubsection}% } % === Section === \titleformat{\section} {\Large\bfseries\sffamily\color{titlepagecolor}} {\SectionNumberBox{section}} {0pt} {\TitleUnderline{#1}} % === Subsection === \titleformat{\subsection} {\large\bfseries\sffamily} {} {0pt} {% \TitleUnderline{% \SubsectionNumberColored\hspace{0.8em}#1% }% } % === Subsubsection === \titleformat{\subsubsection} {\normalsize\bfseries\sffamily} {} {0pt} {\textcolor{titlepagecolor}{\thesubsubsection\hspace{0.8em}#1}} \begin{document} \section{Section} \subsection{Subsection} \subsubsection{Subsubsection} \end{document}
- Bibliography not printingby Dots_and_Arrows on June 10, 2026 at 2:19 pm
The Bibliography chapter name is visible but there are no bibliography entries. I have checked the bibtex file carefully and it is there in the folder containing BibTeX entries. What should I change in the code? \documentclass[a4paper,12pt,english,oneside]{book} \setcounter{tocdepth}{3} \setcounter{secnumdepth}{4} \usepackage[T1]{fontenc} \usepackage{imakeidx} \usepackage[utf8]{inputenc} \usepackage[a4paper,left=1in,right=1in,top=1in,bottom=1in,bindingoffset=0.5in]{geometry} \usepackage{graphicx} \usepackage{import} \usepackage{verbatim} \usepackage{amsmath} \usepackage{afterpage} \usepackage{dashrule} \usepackage{amsmath,amssymb,amsfonts,amsthm} \usepackage{algorithmic} \usepackage[ruled,vlined]{algorithm2e} \usepackage{multirow} \usepackage{comment} \usepackage{array} \usepackage{ragged2e} \usepackage{type1cm} \usepackage{enumitem} \usepackage{pifont} \usepackage{dirtytalk} \usepackage{epigraph} \usepackage{setspace} \usepackage{indentfirst} \usepackage[super]{nth} \usepackage{enumitem} \usepackage{caption} \usepackage{lipsum} \usepackage{tikz} \usepackage{tikz-cd} \usepackage[all]{xy} \usetikzlibrary{cd} \usetikzlibrary{shapes,arrows,positioning} \setlength{\headheight}{15pt} \makeindex[columns=2, title=Index, intoc, options=-s mystyle.ist] \newcommand{\nomunit}[1]{% \renewcommand{\nomentryend}{\hspace*{\fill}#1}} %---------------------------------------------- % ******** PDF, URL AND HYPERLINK PACKAGES ********* % \usepackage{url} \usepackage[dvipsnames]{xcolor} \usepackage{indentfirst} \usepackage{hyperref} \hypersetup{colorlinks=false} % ************* DROPCAP PACKAGE ******************** % \usepackage{type1cm} \usepackage{lettrine} \setlength{\DefaultNindent}{0pt} \setlength{\DefaultFindent}{3pt} \setcounter{DefaultLines}{2} \renewcommand{\LettrineTextFont}{\rmfamily} \renewcommand{\LettrineFontHook}{\fontfamily{ptm}} %---------------------------------------------- %***************** GRAPHICS PACKAGES AND COMMANDS **************% \usepackage{float} \usepackage{subfigure} \usepackage{multicol} \newcolumntype{R}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} % ****************** Chapter Title header *************************** \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \fancyhead[L]{\nouppercase{\footnotesize\leftmark}} \fancyhead[C]{} \fancyhead[R]{} \renewcommand{\headrulewidth}{0.1pt} \cfoot{\thepage} \usepackage[explicit]{titlesec} \usepackage[style=numeric,backend=biber,sorting=nyt]{biblatex} \addbibresource{Bibliography.bib} %\titleformat*{\subsubsection}{\normalfont\normalsize\bfseries\color{Sepia}} % **************Theorem Environments ************************* \renewcommand{\baselinestretch}{1.2} \setlength{\oddsidemargin}{.2cm} \setlength{\evensidemargin}{.2cm} \topmargin -1.4cm \theoremstyle{plain} \newtheorem{theorem}{Theorem}[section] \newtheorem{lemma}[theorem]{Lemma} \newtheorem{proposition}[theorem]{Proposition} \newtheorem{conjecture}[theorem]{Conjecture} \newtheorem{result}[theorem]{Result} \newtheorem{corollary}[theorem]{Corollary} \theoremstyle{definition} \newtheorem{definition}[theorem]{Definition} \newtheorem{observation}[theorem]{Observation} \newtheorem{observations}[theorem]{Observations} \newtheorem{definitions}[theorem]{Definitions} \newtheorem{example}[theorem]{Example} \newtheorem{examples}[theorem]{Examples} \newtheorem{remark}[theorem]{Remark} \newtheorem{remarks}[theorem]{Remarks} \newtheorem{notation}[theorem]{Notations} \newtheorem{note}[theorem]{Note} \newtheorem{notes}[theorem]{Notes} \newtheorem{ques}[theorem]{Question} \renewcommand{\thefootnote}{} %**************** BEGIN DOCUMENT *********************% % \begin{document} %***************** FRONT MATTER *****************% \pagestyle{empty} \import{FRONT MATTER/}{PAGE01-Title_Page} %\blankpage \import{FRONT MATTER/}{PAGE02-Certificate_from_Supervisors} \newpage \import{FRONT MATTER/}{PAGE03-Author declaration} \newpage \import{FRONT MATTER/}{PAGE04-Dedication} \clearpage %-------------------------------------------------- %************* NUMBERED FRONT PAGES ************% \frontmatter \pagestyle{plain} \pagenumbering{roman} \setcounter{page}{1} \singlespacing \phantomsection \addcontentsline{toc}{chapter}{Acknowledgements} \import{FRONT MATTER/}{PAGE05-Acknowledgement} \clearpage \phantomsection \addcontentsline{toc}{chapter}{Abstract} \import{FRONT MATTER/}{PAGE06-Abstract} \clearpage \onehalfspacing \phantomsection \addcontentsline{toc}{chapter}{List of Research Papers} \import{FRONT MATTER/}{List of publications} \clearpage \singlespacing \tableofcontents %---------------------------------------------------- %***************** CHAPTER_1 **********************% \mainmatter \pagenumbering{arabic} \pagestyle{fancy} \fancyhf{} \fancyfoot[C]{\thepage} \fancyhead[LE,RO]{Chapter 1: Introduction} % Change Chapter Heading here \renewcommand{\headrulewidth}{1pt} \onehalfspacing \include{CHAPTERS/Chapter1} % Change Chapter Number here \clearpage %---------------------------------------------------- %***************** CHAPTER_2 **********************% \pagestyle{fancy} \fancyhf{} \fancyfoot[C]{\thepage} \fancyhead[LE,RO]{Chapter 2: Preliminaries} % Change Chapter Heading here \renewcommand{\headrulewidth}{1pt} \onehalfspacing \include{CHAPTERS/Chapter2} % Change Chapter Number here \clearpage %\csname @openrightfalse\endcsname %---------------------------------------------------- %***************** CHAPTER_3 **********************% \pagestyle{fancy} \fancyhf{} \fancyfoot[C]{\thepage} \fancyhead[LE,RO]{Chapter 3: Running title} % Change Chapter Heading here \renewcommand{\headrulewidth}{1pt} \onehalfspacing \include{CHAPTERS/Chapter3} % Change Chapter Number here \clearpage %---------------------------------------------------- %***************** CHAPTER_4 **********************% \pagestyle{fancy} \fancyhf{} \fancyfoot[C]{\thepage} \fancyhead[LE,RO]{Chapter 4: Running title} % Change Chapter Heading here \renewcommand{\headrulewidth}{1pt} \onehalfspacing \include{CHAPTERS/Chapter4} % Change Chapter Number here \clearpage %---------------------------------------------------- %***************** CHAPTER_5 **********************% \pagestyle{fancy} \fancyhf{} \fancyfoot[C]{\thepage} \fancyhead[LE,RO]{Chapter 5: On Singquandle Shadows} % Change Chapter Heading here \renewcommand{\headrulewidth}{1pt} \onehalfspacing \include{CHAPTERS/Chapter5} % Change Chapter Number here \clearpage %---------------------------------------------------- %***************** CHAPTER_6 **********************% \pagestyle{fancy} \fancyhf{} \fancyfoot[C]{\thepage} \fancyhead[LE,RO]{Chapter 6: Categorical interplay in Singquandles} % Change Chapter Heading here \renewcommand{\headrulewidth}{1pt} \onehalfspacing \include{CHAPTERS/Chapter6} % Change Chapter Number here \clearpage %---------------------------------------------------- %***************** CHAPTER_7 **********************% \pagestyle{fancy} \fancyhf{} \fancyfoot[C]{\thepage} \fancyhead[LE,RO]{Chapter 7: Conclusions and Remarks} % Change Chapter Heading here \renewcommand{\headrulewidth}{1pt} \onehalfspacing \include{CHAPTERS/Chapter7} % Change Chapter Number here \clearpage %---------------------------------------------------- %***************** BIBLIOGRAPHY **********************% \pagestyle{fancy} \fancyhf{} \fancyfoot[C]{\thepage} \fancyhead[LE,RO]{Bibliography} \renewcommand{\headrulewidth}{1pt} \printbibliography \clearpage \pagestyle{fancy} \fancyhf{} \fancyfoot[C]{\thepage} \fancyhead[LE,RO]{Index} \renewcommand{\headrulewidth}{1pt} \printindex \end{document}
- rowcolor not fill properly when \multicolumn comesby MadyYuvi on June 10, 2026 at 1:47 pm
In my table, column heads are in shade and the text should be in white color, and the table body have alternative shades, I've try with: \documentclass{article} \usepackage{tabularx} \usepackage[table]{xcolor} \begin{document} \newcommand{\colhead}[1]{\color{white}#1} \newcolumntype{P}[1]{>{\raggedright\arraybackslash}p{#1}}% \def\toprule{\rowcolor{black!70}} \def\midrule{\relax} \rowcolors{0}{black!10}{black!20}% \arrayrulecolor{white} \setlength{\arrayrulewidth}{1pt} \begin{table} \caption{Party identification, by social characteristics, 2024} \begin{tabularx}{\textwidth}{ P{50pt}| P{45pt}|X|X|X|X|X|X|} \toprule \colhead{Category (Percentage of Sample)} &\multicolumn{2}{X}{\colhead{Democrats}} &\multicolumn{3}{X}{\colhead{Independents}} &\multicolumn{2}{X}{\colhead{Republicans}}\\ \toprule \colhead{} & \colhead{Strong} & \colhead{Weak} & \colhead{Lean Dem} & \colhead{Pure} & \colhead{Lean Rep} & \colhead{Weak} & \colhead{Strong}\\ \hline \midrule Men\index{Men} (48) & 20 & 9 & 17 & 5 & 20 & 10 & 19\\ \hline Women\index{Women} (52) & 24 & 16 & 16 & 6 & 13 & 9 & 16\\ \hline Whites (72) & 21 & 10 & 12 & 6 & 14 & 12 & 26\\ \hline \end{tabularx} \end{table} \end{document} when \multicolumn comes, shades for column heads not coming properly: Please advise.
- Escaped \pause works well in listings' lstlisting but not in tcolorbox' tcblistingby Denis Bitouzé on June 10, 2026 at 11:34 am
As shown by the following MCE, escaped \pause works well in listings' lstlisting but not in tcolorbox' tcblisting: with the latter, what should appear only from the 4th slide: appears on the 2nd, disappears on the 3rd, reappears on the 4th. How to fix this issue? \documentclass[t]{beamer} \usepackage{listings} \usepackage{tcolorbox} \lstset{% basicstyle=\ttfamily, escapeinside=@\ , escapebegin=\pause{}\$\ , } \tcbuselibrary{listings} \begin{document} \begin{frame}[fragile]{lstlisting: OK (slide number : \insertslidenumber)} Foo \pause{} Bar \begin{lstlisting} @ bar \end{lstlisting} \pause{} Baz \end{frame} \begin{frame}[fragile]{tcblisting: not OK (slide number : \insertslidenumber)} Foo \pause{} Bar \begin{tcblisting}{listing only} @ bar \end{tcblisting} \pause{} Baz \end{frame} \end{document}
- How to tweak the bounding box of `overarrows`?by Explorer on June 10, 2026 at 10:00 am
This post comes from my previous solution, then I simplified them: \documentclass{article} \usepackage{showframe} \usepackage[tikz]{overarrows} \usetikzlibrary{decorations.markings} \NewOverArrowCommand[tikz]{\underarrowA}{% add tikz options={line cap=round,decoration={markings,mark=at position 0.5 with {\draw[-](-1pt,-1pt)--(1pt,1pt);\draw[-](-1pt,1pt)--(1pt,-1pt);}}}, add path options={postaction={decorate}}, arrows={->[scale=0.5]}, path = {(0,0) -- (1,0)}, center arrow, arrow under, min length=15, space after arrow=0.4ex, } \NewOverArrowCommand[tikz]{\underarrowC}{% path options={arrows={<[scale=0.5]->[scale=0.5]}},% path={% (0,0) -- (0.5,0) to[loop below,in=-45,out=225,min distance=4mm,every loop/.style={}] (0.5,0) -- (1,0) }, center arrow, arrow under, min length=15, space after arrow=0.4ex, } \setlength{\parindent}{0pt} \setlength{\fboxsep}{0pt} \usepackage{lipsum} \begin{document} $\underarrowA{v} \qquad \underarrowA{vvv} \qquad \underarrowA{ABCD} $ $\underarrowC{v} \qquad \underarrowC{vvv} \qquad \underarrowC{ABCD} $ \fbox{$A\underarrowA{v}B$} \fbox{$A\underarrowC{v}B$} \bigskip \end{document} We could see from the above that the bounding box of arrowC is larger than expected. I wonder whether there are good suggesion to refine this?
- Custom optional parameters for classes in LaTeXby Zerina on June 10, 2026 at 9:46 am
I have customized a MyReport.cls file with a custom optional parameter "Reference", which functions as follows: It defaults to None. If the user passes a bib file path via \documentclass[Reference={ref.bib}]{MyReport}, then execute: \RequirePackage[hyperref=true,backend=biber,url=false,doi=false,sorting=none,style=gb7714-2015]{biblatex} \AtBeginDocument{\addbibresource{ref.bib}} \AtEndDocument{\printbibliography[heading=bibintoc]} How can I implement this feature? Here is the MyReport.cls \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} \ProvidesClass{MyReport}[2024/01/01 v1.0.0 My custom report class] \def\xjtuthesis{MyReport} \def\meta@version{1.0.0} \def\metaversion{\meta@version} \newcommand{\MyReport@bibfile}{} \DeclareOption{Reference}{ \renewcommand{\MyReport@bibfile}{#1} } \ProcessOptions\relax \LoadClass[twoside]{article} \RequirePackage[zihao=-4]{ctex} \RequirePackage[a4paper,left=2.54cm,right=2.54cm,top=3.18cm,bottom=3.18cm]{geometry} \RequirePackage[hidelinks,bookmarksnumbered=true]{hyperref} \makeatletter \ifx\MyReport@bibfile\@empty % do nothing \else \RequirePackage[hyperref=true,backend=biber,url=false,doi=false,sorting=none,style=gb7714-2015]{biblatex} \AtBeginDocument{\addbibresource{\MyReport@bibfile}} \AtEndDocument{ \clearpage \printbibliography[heading=bibintoc] } \fi \makeatother and the below is the main.tex \documentclass[Reference={ref.bib}]{MyReport} \begin{document} \section{test} text\cite{Deb2014} \end{document} the ref.bib: @article{Deb2014, title = {An {{Evolutionary Many-Objective Optimization Algorithm Using Reference-Point-Based Nondominated Sorting Approach}}, {{Part I}}: {{Solving Problems With Box Constraints}}}, shorttitle = {An {{Evolutionary Many-Objective Optimization Algorithm Using Reference-Point-Based Nondominated Sorting Approach}}, {{Part I}}}, author = {Deb, Kalyanmoy and Jain, Himanshu}, date = {2014-08}, journaltitle = {IEEE Transactions on Evolutionary Computation}, shortjournal = {IEEE Trans. Evol. Computat.}, volume = {18}, number = {4}, pages = {577--601}, issn = {1089-778X, 1089-778X, 1941-0026}, doi = {10.1109/TEVC.2013.2281535}, url = {http://ieeexplore.ieee.org/document/6600851/}, urldate = {2025-11-08}, langid = {english} } No matter how I try, although the compilation does not report an error, it prompts: LaTeX: Unused global option(s): [Reference]. LaTeX: Empty bibliography. In fact, there is no "References" section, as if the operation to generate the references was not executed. How can I solve this problem? Note: \documentclass{MyReport} \addbibresource{ref.bib} \begin{document} \section{test} text\cite{Deb2014} \printbibliography[heading=bibintoc] \end{document} This main.tex can be compiled successfully, indicating that the basic functionalities of ref.bib and MyReport.cls are correct.
- Error when using pyluatex in align* environmentby Ada Gauss on June 10, 2026 at 9:09 am
The following latex-code throws a ! Missing } inserted error. Please help me to find the reason. Minimal example: \documentclass{article} \usepackage{amsmath,amsfonts} \usepackage[executable=python.exe]{pyluatex} \newcommand\Zn{\mathbb{Z}_n} \begin{document} \begin{pythonq} from sympy import gcd a = 221 b = 39 r = a%b q = int((a-r)/b) mggt = gcd(a,b) \end{pythonq} \[ \begin{align*} \exists_{k\in\Zn} \quad \py{a} &= k\cdot t \\ \exists_{l\in\Zn} \quad \py{b} &= l\cdot t \\ \Rightarrow \quad \py{a}-\py{b} &= kt-lt = t\cdot \underbrace{(k-l)}_{\in\Zn} \end{align*} \] \end{document}
- Make a special integral symbols in tikzby mathrm alpha on June 10, 2026 at 8:34 am
Although you can draw \int extended parts "\qsymb" in Tikz, it doesn't fit when zoomed in with math-mode. \documentclass{article} \usepackage{tikz} \usepackage{graphicx} \usepackage{amsmath} \usepackage[margin=0.5in]{geometry} \newcommand{\qsymb}{% \mathbin{ \vcenter{\hbox{ \scalebox{0.075}{ \begin{tikzpicture}[line width=2.5pt, line cap=round, line join=round, yscale=0.6] \draw (0.2, 2.4) -- (2.7, 3.9) -- (4.7, 2.9) -- (2.2, 1.4) -- cycle; \draw (2.2, 1.4) -- (4.2, 0.4) -- (1.7, -0.6) -- (-0.3, 0.4) -- cycle; \end{tikzpicture}% }% }}% }% } \newcommand{\qint}{\int\!\!\!\!\!\!\!\!\qsymb} \newcommand{\qiint}{\iint\!\!\!\!\!\!\!\!\!\!\qsymb} \begin{document} $A \qint B \qiint C$\\ $$A \qint B \qiint C$$ \end{document}
- flipped \sum symbolsby mathrm alpha on June 10, 2026 at 7:57 am
I found that using it this way doesn't result in the same subscript and superscript positions as \sum, and it's even crooked, which is really undesirable. % Source - https://tex.stackexchange.com/a/689279 % Posted by egreg % Retrieved 2026-06-10, License - CC BY-SA 4.0 % Code modified by: @mathrm alpha \documentclass{article} \usepackage{amsmath,graphicx} \makeatletter \NewDocumentCommand{\flippedsum}{e{_^}}{% \mathop{\mathpalette\flippedsum@{{#1}{#2}}}% } \NewDocumentCommand{\flippedsum@}{mm}{% \flippedsum@@#1#2% } \NewDocumentCommand{\flippedsum@@}{mmm}{% \begingroup \sbox\z@{$\m@th#1\sum$}% \reflectbox{\usebox\z@}% \IfValueT{#2}{% subscript _{#2}% }% \IfValueT{#3}{% superscript ^{\kern-\ifx#1\displaystyle0.5\else0.4\fi\wd\z@#3}% }% \endgroup } \makeatother \begin{document} \[ \flippedsum_a^b \] \begin{center} $\flippedsum_a^b$\\ $\scriptstyle\flippedsum_a^b$\\ $\scriptscriptstyle\flippedsum_a^b$ \end{center} \end{document} References: Superscript horizontal alignment on flipped integral symbol
- Why loading autobreak package breaks code even when not using the command?by Nasser on June 10, 2026 at 7:05 am
This old code used to compile OK. \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} Substituting $\sqrt{-x}$ in first equation gives% \begin{align} y-e^{\frac{\sqrt{-x}}{-x-x}} & =0\nonumber\\ y & =e^{\frac{\sqrt{-x}}{-2x}}\nonumber\\ \ln y & =\frac{\sqrt{-x}}{-2x}\nonumber\\ \left( \ln y\right) ^{2} & =\frac{-x}{4x^{2}}\nonumber\\ 4x\left( \ln y\right) ^{2}+1 & =0\nonumber\\ y_{s} & =\left\{ \begin{array} [c]{c}% e^{\frac{-i}{2\sqrt{x}}}\\ e^{\frac{i}{2\sqrt{x}}}% \end{array} \right. \tag{4}% \end{align} \end{document} Compiling gives no error: >lualatex 9.tex This is LuaHBTeX, Version 1.24.0 (TeX Live 2026) restricted system commands enabled. (./9.tex LaTeX2e <2025-11-01> L3 programming layer <2026-03-20> (/usr/local/texlive/2026/texmf-dist/tex/latex/base/article.cls Document Class: article 2025/01/22 v1.4n Standard LaTeX document class ... Output written on 9.pdf (1 page, 73469 bytes). Transcript written on 9.log. > But when changing preamble to this \usepackage{amsmath} \usepackage{autobreak} %added this with no code change at all, Now lualatex gives error >lualatex 9.tex This is LuaHBTeX, Version 1.24.0 (TeX Live 2026) restricted system commands enabled. (./9.tex LaTeX2e <2025-11-01> L3 programming layer <2026-03-20> (/usr/local/texlive/2026/texmf-dist/tex/latex/base/article.cls Document Class: article 2025/01/22 v1.4n Standard LaTeX document class (/usr/local/texlive/2026/texmf-dist/tex/latex/base/size12.clo)) (/usr/local/texlive/2026/texmf-dist/tex/latex/amsmath/amsmath.sty For additional information on amsmath, use the `?' option. (/usr/local/texlive/2026/texmf-dist/tex/latex/amsmath/amstext.sty (/usr/local/texlive/2026/texmf-dist/tex/latex/amsmath/amsgen.sty)) (/usr/local/texlive/2026/texmf-dist/tex/latex/amsmath/amsbsy.sty) (/usr/local/texlive/2026/texmf-dist/tex/latex/amsmath/amsopn.sty)) (/usr/local/texlive/2026/texmf-dist/tex/latex/autobreak/autobreak.sty (/usr/local/texlive/2026/texmf-dist/tex/generic/catchfile/catchfile.sty (/usr/local/texlive/2026/texmf-dist/tex/generic/infwarerr/infwarerr.sty) (/usr/local/texlive/2026/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty) (/usr/local/texlive/2026/texmf-dist/tex/generic/etexcmds/etexcmds.sty (/usr/local/texlive/2026/texmf-dist/tex/generic/iftex/iftex.sty)))) (/usr/local/texlive/2026/texmf-dist/tex/latex/l3backend/l3backend-luatex.def) (./9.aux) ! Missing # inserted in alignment preamble. <to be read again> \cr l.22 \end{align} ? Notice there is no usage of the autobreak command in code. Only loading the package itself causes this error. Is this supposed to happen? Or is this a bug? TL 2026 on Linux ps. please do not complain about the code itself. It is auto-generated by external software.
- How to change arrow style for a NPN component in CircuiTikZby Forrest on June 10, 2026 at 1:35 am
I want to change the arrow style of NPN when I use circuiTikz. I read the manual of CircuiTikz. All I found is that: I can only change the arrow position in 4.15.5.2 \ctikzset{transistors/arrow pos=end} It do change the position of arrow. Then, I tried to change the arrow style. I tried the following ways: \draw (7, 0) node[npn, scale=2.0, flow arrow/.style={->, >=Stealth}] (T) {}; \ctikzset{bipoles/npn/arrow/.style={>=Stealth}} None works! Could you kindly give me a solution? Thanks!
- File involving sharenumber thmtools' option doesn't compile anymoreby Denis Bitouzé on June 9, 2026 at 3:05 pm
Whereas it used to compile smoothly until some weeks ago (and with e.g. pdfTeX 3.141592653-2.6-1.40.27), the following MCE: \documentclass{article} \usepackage{thmtools} \newcounter{mycounter} \declaretheorem[ sharenumber=mycounter ]{theorem}[] \begin{document} \end{document} doesn't compile anymore with an up to date TeX Live 2026. Note that it still compiles if sharenumber=mycounter is commented. The compile fails with pdfTeX, Version 3.141592653-2.6-1.40.29 and: article.cls 2025/01/22 v1.4n Standard LaTeX document class size10.clo 2025/01/22 v1.4n Standard LaTeX file (size option) thmtools.sty 2023/05/04 v0.76 thm-patch.sty 2023/05/04 v0.76 parseargs.sty 2023/05/04 v0.76 thm-kv.sty 2023/05/04 v0.76 keyval.sty 2026-05-17 v1.15 key=value parser (DPC) kvsetkeys.sty 2022-10-05 v1.19 Key value parser (HO) thm-autoref.sty 2023/05/04 v0.76 aliasctr.sty 2023/05/04 v0.76 thm-listof.sty 2023/05/04 v0.76 thm-restate.sty 2023/05/04 v0.76 l3backend-luatex.def 2026-02-18 L3 backend support: PDF output (LuaTeX)
- How to type rotated Khitan text format in TeX? [closed]by mathrm alpha on June 9, 2026 at 1:23 pm
Example of rotated Khitan text on a web page: Image Source: https://www.babelstone.co.uk/Fonts/KhitanSmall.html Font: https://fonts.google.com/noto/specimen/Noto+Serif+Khitan+Small+Script But it seems LaTeX can't output rotated Khitan text. There is no command rotated Khitan text format in LaTeX. \documentclass{article} \usepackage{xeCJK} \setCJKmainfont{NotoSerifKhitanSmallScript-Regular.ttf} \xeCJKDeclareCharClass{CJK}{"18B00 -> "18CD5} \begin{document} 𘬐𘬑𘬒 Doesn't type rotated Khitan text \end{document} References: How can xeCJK expand its support to include "new standard Unihan characters"? Unicode PDF: https://www.unicode.org/charts/PDF/U18B00.pdf
- How to make the parenthesis around equation number be colorful and hyperlinked too when using \eqref?by M. Logic on June 9, 2026 at 11:07 am
A minimal working sample is as follows. \documentclass{article} \usepackage{amsmath} \usepackage[colorlinks=true]{hyperref} %\makeatletter %\def\tagform@#1{\maketag@@@{(\ignorespaces#1\unskip\@@italiccorr)}} %\DeclareRobustCommand{\eqref}[1]{\textup{\tagform@{\ref{#1}}}} %\makeatother \begin{document} \begin{equation}\label{eq} 1+2=3 \end{equation} TEXT \eqref{eq} TEXT \end{document} As you see, when using \eqref on the equation number, it produce only colorful equation number but black parenthesis, and also it produce a hyperlink only on equation number but including no parenthesis. Then how to make the parenthesis around equation number be colorful and hyperlinked too when using \eqref? I hope, the color could change when I reset linkcolor in hyperref. is it possible to redefine some setting to make the equation number be around with parenthesis when using \ref? In this case I think the parenthesis must be colorful and hyperlinked too.
- pixel square draw spacing bad in LaTeXby mathrm alpha on June 8, 2026 at 11:32 pm
The horizontal spacing is a bit bad when I'm drawing LaTeX pixel maps. \documentclass{article} \usepackage{setspace,parskip,newunicodechar,xcolor,fontspec} % parskip It's failing... \newunicodechar{█}{\fontspec{Arial}{█}} \newunicodechar{ }{\fontspec{Arial}{\color{white}{█}}} \begin{document} \vspace{-1mm} \color{blue}{█ ████ }\color{gray}{█ ████ }\\ \vspace{-1mm} \color{pink}{██ ████}\color{cyan}{█ ████ }\\ \vspace{-1mm} \color{yellow}{██████ ██}\color{blue}{██} \end{document}
- ⅌ apply in tikz text symbols?by mathrm alpha on June 8, 2026 at 11:58 am
The original drawing instructions in ⅌: \documentclass{article} \usepackage{tikz} \usepackage[margin=0.5in]{geometry} \begin{document} \centering \begin{tikzpicture}[scale=2] % The stylized symbol is a calligraphic character, likely a script 'P' or 'V' with an ellipse. % We recreate it using thick paths and curves. % 1. The horizontal ellipse \draw[line width=6pt] (0.4, 0) ellipse (2.2 and 0.7); % 2. The main "U" shape (the stems) % Left stem starts from the flourish, goes down, curves at the bottom, and goes up to form the right stem. \draw[line width=14pt, line cap=round] (-0.6, 1.5) .. controls (-0.6, -3.2) and (0.6, -3.2) .. (0.6, 1.5); % 3. The flourish on the top left % A decorative hook and a small "bud" on top of the left stem. \draw[line width=14pt, line cap=round] (-0.6, 1.5) .. controls (-1.8, 2.8) and (-3.0, 1.5) .. (-2.2, 1.2); \fill (-0.5, 1.9) circle (0.25); % 4. The large loop on the right (completing the 'P' shape) % It starts from the top of the right stem, loops over to the right, and curves back down. \draw[line width=14pt, line cap=round] (0.6, 1.5) .. controls (0.6, 4.2) and (3.5, 3.2) .. (3.5, 0.5) .. controls (3.5, -0.8) and (2.5, -1.2) .. (1.8, -1.0); \end{tikzpicture} \end{document} However, after reading his/her command usage, This convert to can typed ⅌ text symbols method doesn't seem to work for multiple overlapping shapes in tikz (or maybe I just don't know how to use it). Is there better method to declare tikz picture with proper baseline and fontsize?