• How obtain Cyrillic with Lucida Bright and unicode engine?
    by murray on February 7, 2026 at 4:37 pm

    With pdfLaTeX, the following code works as expected, including rendering the Cyrillic portion of the text: \documentclass{article} \usepackage[russian,english]{babel} % Optional: for hyphenation \babeltags{russian=russian} \usepackage[T2A,T1]{fontenc} \usepackage{newtx} \DeclareFontFamilySubstitution{T2A}{\rmdefault}{Tempora-TLF} % for Cyrillic \begin{document} `\textrussian{Тихонов}' is often transliterated as `Tychonoff'. \end{document} How can I similarly produce the Cyrillic characters if, instead, I use the LuaLaTeX engine and Lucida Bright font, as in the following? % !TEX program = lualatex \documentclass{article} \usepackage{fontspec} \usepackage[russian,english]{babel} % Optional: for hyphenation \babeltags{russian=russian} \babelfont{rm}[Scale=0.92,DefaultFeatures={Ligatures=TeX}]{LucidaBrightOT.otf} \begin{document} `\textrussian{Тихонов}' is often transliterated as `Tychonoff'. \end{document}

  • Numbered citation with multiple sources without line break on dash
    by Kalo on February 7, 2026 at 1:44 pm

    I have a document using the revtex4-2 class. Citations using the standard \cite{...} command are numbered, and when there are multiple sources in the citations (\cite{ref1,ref2,...,refN}) that have consecutive numbers, they appear as summarized with the first and last numbers around an en-dash, as "[1-N]". I would like to keep all of this functionality, but prevent line breaks: before citations; and before or after the en-dash inside a summarized citation. I achieve the first by using a tilde between the text and the citation command, i.e. ~\cite{...}. However, I notice that in many cases I get line breaks after the en-dash in the citation. How can I achieve the second?

  • ConTeXt: customize citation numbers
    by Georgian Ilie on February 7, 2026 at 1:33 pm

    Good afternoon everyone, I am trying to tweak the appearance of the citation numbers of a document. To reach the intended result, I am using the approach reported in the next code: \startbuffer[biblatex-chem] @Article{Booth1962, hyphenation = {british}, author = {Booth, G. and Chatt, J.}, title = {The reactions of carbon monoxide and nitric oxide with tertiary phosphine complexes of iron(II), cobalt(II), and nickel(II)}, journal = {J.~Chem. Soc.}, year = {1962}, pages = {2099--2106}, doi = {10.1039/JR9620002099}, annotation = {An article which does not have a volume number} } @Article{Arduengo1991, hyphenation = {american}, author = {Arduengo, III, Anthony J. and Harlow, Richard L. and Kline, Michael}, title = {A stable crystalline carbene}, journal = {J.~Am. Chem. Soc.}, year = {1991}, volume = {113}, pages = {361--363}, number = {1}, doi = {10.1021/ja00001a054}, annotation = {An article with ``III'' in the author section} } @Book{Armarego2003, hyphenation = {british}, title = {Purification of Laboratory Chemicals}, publisher = {Butterworth--Heine\-mann}, year = {2003}, author = {Armarego, W. L. F. and Chai, Christina Lin Li}, address = {London}, edition = {5}, annotation = {A simple \texttt{book} entry} } \stopbuffer \definebtx[default] \usebtxdataset[default][biblatex-chem] \loadbtxdefinitionfile[aps] \definebtxrendering[define][aps][dataset=default] \setupbtx[default:cite:num][command=\high,right={\high{)}},left={\high{(}}] \starttext \subject[title=Hello] But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. \cite[Booth1962,Arduengo1991,Armarego2003] To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure? On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee \cite[Booth1962,Arduengo1991] \starttitle[title=Bibliography] \placelistofpublications[default][method=global] \stoptext The compilation of this code sends out two pages: As you can notice, the parentheses and the comma present in the two citations seem bigger than the citations' numbers, and respecting to the latter they are off-centre. How do I solve these issues? Thank you in advance for your help.

  • pgfplotstable: add vspace depending of row value (above rows that contain a zero)
    by cis on February 7, 2026 at 1:12 pm

    I have a pgfplotstable in it's column named k are some zeros and the very first k-value is alway zero. How could I add a remarkable space above these rows which contains zeros in the k-column? (Alternativly a \hline above the "0-row" could be thinkable.) \documentclass[margin=5pt, varwidth]{standalone} \usepackage{pgfplotstable} \pgfplotsset{compat=1.18} \begin{document} \pgfplotstabletypeset[col sep=comma, string type, every head row/.style={before row=\hline, after row=\hline}, string replace={0}{\color{red}0},% just for highlighting ]{ No, n, k, 2, 3, 4 0, 1, 0, 2, 3, 4 1, 1, 1, 2, 3, 4 2, 2, 0, 2, 3, 4 3, 2, 1, 2, 3, 4 4, 2, 2, 2, 3, 4 5, 4, 0, 2, 3, 4 6, 4, 1, 2, 3, 4 7, 4, 2, 2, 3, 4 8, 4, 3, 2, 3, 4 9, 4, 3, 2, 3, 4 } \end{document}

  • Label equation terms with aligned labels
    by ecoer on February 7, 2026 at 1:01 pm

    I'd like to label each term of an equation like this: I tried with \underset, \mathop, \underbrace... but, since some terms take more vertical space than others, all the labels are on different heights. This is the closest I got to what I want, using alignat, but still the numerals are not centered: \begin{alignat*}{7} &\frac{\partial u_i}{\partial t} + &&u_j \frac{\partial u_i}{\partial x_j} &&= &&-g\delta_{i3} + &&f\varepsilon_{ij3}u_j - &&\frac{1}{\rho}\frac{\partial p}{\partial x_i} + &&\nu\frac{\partial ^2u_i}{\partial x^2_j} \\ & \text{I} && \text{II} && && \text{III} && \text{IV} && \text{V} && \text{VI} \end{alignat*} How can I label in a clear, aligned way? PS: this is just the equation: $\frac{\partial u_i}{\partial t} + u_j \frac{\partial u_i}{\partial x_j} = -g\delta_{i3} + f\varepsilon_{ij3}u_j - \frac{1}{\rho}\frac{\partial p}{\partial x_i} + \nu\frac{\partial ^2u_i}{\partial x^2_j}$

  • MakeLowercase not working with lipsum
    by Jonathan Webley on February 7, 2026 at 9:34 am

    This MWE: \documentclass{article} \usepackage{lipsum} \begin{document} \MakeLowercase{\lipsum[1][1]} \end{document} generates: Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

  • Where is the l3benchmark.sty file located?
    by Alain Matthes on February 7, 2026 at 8:24 am

    I wanted to test an old file, but I got an error. ! LaTeX Error: File `l3benchmark.sty' not found. My distribution is up to date, so I assume this file has been removed. What can I replace it with? \RequirePackage{l3benchmark} \ExplSyntaxOn \AtEndDocument { \benchmark_toc: } \benchmark_tic: \ExplSyntaxOff \documentclass{article} \usepackage{tikz} \begin{document} \directlua{ function f(t0, t1, n) local filename = tex.jobname .. ".table" local out = assert(io.open(filename, "w")) for t = t0, t1, (t1 - t0) / n do local x = math.sin(5*t) local y = math.cos(3*t) out:write(x, " ", y, " i", string.char(10)) % or out:write(x, " ", y, " i\string\n") end out:close() end } \begin{tikzpicture}[scale=4] \directlua{f(0, 2*math.pi, 256)}% \draw[red] plot[smooth] file {\jobname.table}; \end{tikzpicture} \end{document}

  • combine column in tcolorbox
    by 조문수 on February 7, 2026 at 5:09 am

    I want to merge columns using the side-by-side rule in tcolorbox. How can I create something like the image below using tcolorbox? | contents -1 | figure | | contents -2 |

  • Test if item to be written is at the top of the page?
    by Gary on February 7, 2026 at 4:38 am

    Is it possible to test within a before option command whether or not the item to be written is at the top of the page? For example, I tried in \setuphead before={\doiftopofpageelse{...true...}{...false...}} and it is always true even when the head item is not being written at the top of the page. Thank you. For example, every section below shows "top of the page". Why? \setuplayout[height=4.7in,width=4in] \setuphead[section][ conversion=Romannumerals, sectionstopper={.}, align=center, before={\blank[0mm]}, beforesection={\doiftopofpageelse{\hrule{top of page}}{\hrule{not top of page}}}, after={\blank[5mm,]}, style={\tfa\it}, ] \starttext \showframe \startsection[title={Title One}] A paragraph of the to fill the line to observe the spacing. \stopsection \startsection[title={Title Two}] \input{ward} \stopsection \startsection[title={Title Three}] A paragraph of the to fill the line to observe the spacing. \stopsection \stoptext Added There are two parts to the item I can't get to work as needed. It occurs when a section's before area is at the bottom of a page and the head title is at the top of the next page. For example, I need to get the whitespace of the before to move to the top of the next page. The second part of it is to know when this occurs such that I can reduce that whitespace by the size of the distance between the header and the text block so the overall space above and below the section header is about even rather than more on the top. Thanks. \setuplayout[height=5.85in,width=4in] \setuphead[section][ conversion=Romannumerals, sectionstopper={.}, align=center, beforesection={{\darkred(beforesection)}}, before={{\darkblue(before)}\blank[force,line]}, after={{\darkblue(after)}}, aftersection={{\darkred(aftersection)}}, style={\tfa\it}, ] \starttext \showframe \startsection[title={Title One}] A paragraph of the to fill the line to observe the spacing. \stopsection \startsection[title={Title Two}] \input{ward} \stopsection \startsection[title={Title Three}] A paragraph of the to fill the line to observe the spacing. \stopsection \stoptext Yet another addition I need to read about \testpage[] but the context wiki site responds with forbidden, here. In the meantime, the framedtext approach as @MaxChernoff provided here appears to be working for a "real" section also. I think I can adjust the toffset by the header distance and add it in \setuphead with a \blank that will be suppressed at the top of a new page only. \setuplayout[height=4.5in,width=4in,] \define[2]\MySection{% \framedtext [frame=on, width=\textwidth, offset=none, toffset=5mm, align=center]{#1 #2} } \setuphead[section][ conversion=Romannumerals, sectionstopper={.}, align=center, command=\MySection, before=, after={\blank[5mm]}, aftersection=\blank[back], style={\tfa\it}, ] \starttext \showframe \startsection[title={Title One}] A paragraph of the to fill the line to observe the spacing. \stopsection \startsection[title={Title Two}] \input{ward} \stopsection \startsection[title={Title Three}] A paragraph of the to fill the line to observe the spacing. \stopsection \stoptext

  • biblatex French "pp." and "dash" issue when writing page range
    by Jinwen on February 7, 2026 at 2:26 am

    Not sure if this is the correct way to write things in French, but I usually prefer format like pp.~1--10 for page ranges. Based on the solutions to this question on pp. and this question on dash, now I have the following configuration: \DefineBibliographyStrings{french}{% pages = {pp\adddot}, } \DefineBibliographyExtras{french}{% \protected\def\bibrangedash{% --\penalty\hyphenpenalty}} which seems to work as expected. May I ask if it is indeed the "right" way to achieve this nowadays? Below is a MWE: \documentclass{article} \usepackage[french]{babel} \usepackage{biblatex} \usepackage{filecontents} \begin{filecontents}{\jobname.bib} @article{dash, author = {Dashing, Walter Very}, year = {1942}, title = {Dashing Past a Hyphen}, journaltitle = {Life}, volume = {42}, number = {42}, pages = {123--321}, } \end{filecontents} \addbibresource{\jobname.bib} \DefineBibliographyStrings{french}{% pages = {pp\adddot}, } \DefineBibliographyExtras{french}{% \protected\def\bibrangedash{% --\penalty\hyphenpenalty}} \begin{document} \cite[142--242]{dash}. \printbibliography \end{document}

  • Displaying equations involving TikZ graphics on a WordPress site with MathJax [closed]
    by abcdf on February 7, 2026 at 12:09 am

    I am writing a website using WordPress with MathJax. In my LaTeX documents, I use TikZ to construct equations that include graphics embedded in the math (for example, superscripts or subscripts connected by lines drawn with TikZ). I would like to display equations of this kind on my website as well. An example of the desired output is shown in the image below. While this works fine in LaTeX, I do not know how to achieve a similar result on a website using MathJax (or related tools such as tikzjax). Is this possible in principle? If so, what would be the recommended approach? Any help or pointers would be greatly appreciated. The following code produces the equation shown in the image in a LaTeX environment using TikZ. \documentclass[a4paper,15pt,riqno]{bxjsreport}%{bxjsarticle} \usepackage[ipa]{zxjafont} \usepackage{tikz-cd} \usetikzlibrary{calc} \usepackage{amsmath} \usetikzlibrary{tikzmark} \begin{document} \begin{align} a^{\tikzmarknode{X}{x}} +b^{\tikzmarknode{Y}{y}} =c^{\tikzmarknode{Z}{z}} \end{align} \tikz[remember picture,overlay]{ \coordinate (Xp) at ($(X.north)+(0,0.3ex)$); \coordinate (Yp) at ($(Y.north)+(0,0.3ex)$); \coordinate (Zp) at ($(Z.north)+(0,0.3ex)$); \path let \p1 = (Xp), \p2 = (Yp), \p3 = (Zp) in coordinate (TopX) at (\x1,{max(\y1,\y2,\y3)+2ex}) coordinate (TopY) at (\x2,{max(\y1,\y2,\y3)+2ex}) coordinate (TopZ) at (\x3,{max(\y1,\y2,\y3)+2ex}); \draw (Xp) -- (TopX); \draw (Yp) -- (TopY); \draw (Zp) -- (TopZ); \draw (TopX) -- (TopY) -- (TopZ); } \begin{align} d_{\tikzmarknode{X}{p}} +e_{\tikzmarknode{Y}{q}} =f_{\tikzmarknode{Z}{r}} \end{align} \tikz[remember picture,overlay]{ \coordinate (Xp) at ($(X.south)+(0,-0.3ex)$); \coordinate (Yp) at ($(Y.south)+(0,-0.3ex)$); \coordinate (Zp) at ($(Z.south)+(0,-0.3ex)$); \path let \p1 = (Xp), \p2 = (Yp), \p3 = (Zp) in coordinate (BottomX) at (\x1,{min(\y1,\y2,\y3)-2ex}) coordinate (BottomY) at (\x2,{min(\y1,\y2,\y3)-2ex}) coordinate (BottomZ) at (\x3,{min(\y1,\y2,\y3)-2ex}); \draw (Xp) -- (BottomX); \draw (Yp) -- (BottomY); \draw (Zp) -- (BottomZ); \draw (BottomX) -- (BottomY) -- (BottomZ); } \end{document}

  • Forcing blank vertical space at the top of a page when force option alone doesn't do it?
    by Gary on February 6, 2026 at 10:41 pm

    How can the blank space above \SectionTitle III be forced at the top of page 2 as it is on the top of page 1? I've tried using \blank[5mm,force] directly but with no change. Am I mis-using the \define command or \definedelimitedtext? I'm just trying to declare this command because it needs to be used many, many times in this document (and it is not a "real" section linked to headers or the TOC). It works, as is, when there is a pagebreak but not when the text flows such that the title starts at the top of a new page. Thank you. \setuplayout[height=4.5in,width=4in] \definedelimitedtext[ST][ spacebefore={5mm,force,fixed}, spaceafter=5mm, ] \define[1]\SectionTitle{% \startST \startalignment[middle] \tfa\it#1 \stopalignment \stopST} \starttext \showframe \SectionTitle{I. Title One} A paragraph of the to fill the line to observe the spacing. \SectionTitle{II. Title Two} \input {ward} \SectionTitle{III. Title Three} A paragraph of the to fill the line to observe the spacing. \SectionTitle{IV. Title Four} Paragraph. \stoptext Added In looking at this further, perhaps the space is being added but the distance is being counted from the end of the previous paragraph and not the top of the page; because the previous page does not reach the bottom since the last paragraph ends one line before the last possible print line. Something that appears closely related and confusing to me is that if change the body to \starttext \showframe \SectionTitle{I. Title One} A paragraph of the to fill the line to observe the spacing. \SectionTitle{II. Title Two} \input{ward} A new line of text to fill the space to reach the very last line. A new paragraph. \SectionTitle{III. Title Three} \stoptext the result is as expected below But, if remove the short "A new paragraph" just before section III, the result is as below; and what confuses me is why the last two lines of the last paragraph of page 1 are now moved to page 2. The same occurs if use \blank[5mm, force] \midaligned{III. Title Three} \blank[5mm] in that, once try to force the space at the top, the two lines of the previous paragraph move also. Is it possible to "separate" the before space from the previous paragraph? Thank you. Also, if, instead of trying to define a command to style a title that isn't a section in any real way, it is defined as a section or subsection that can be excluded from the TOC and headers, then all works as expected. For example, \setuplayout[height=4.5in,width=4in] \setuphead[section][ conversion=Romannumerals, sectionstopper={.}, align=center, before={\blank[5mm,force]}, after={\blank[5mm]}, style={\tfa\it}, ] \starttext \showframe \startsection[title={Title One}] A paragraph of the to fill the line to observe the spacing. \stopsection \startsection[title={Title Two}] {\input{ward} A new line of text to fill the space to reach the very last line.} \stopsection \startsection[title={Title Three}] A paragraph of the to fill the line to observe the spacing. \stopsection \startsection[title={Title Four}] A paragraph of the to fill the line to observe the spacing. \stopsection \stoptext renders This is what I expected would happen for my attempt at defining \SectionTitle command.

  • How can I get text (marginnote) next to a tabularray-row?
    by lukascbossert on February 6, 2026 at 10:12 pm

    I would like to have short information next to certain rows of tabularray-environment, like a marginnote. The content in the note is a macro (here just text). The issue I face is: ! Undefined control sequence. <argument> \@currbox l.68 \requestedFundingTable[A1] TeXnically it does not necessarily need to be a \marginpar but also anything that would get text next to the specific row. \documentclass{scrartcl} \usepackage{xcolor} \usepackage{tabularray} \UseTblrLibrary{siunitx} \UseTblrLibrary{functional} \ExplSyntaxOn \tl_new:N \l__tmp_body_staff_tl \tl_new:N \l__tmp_body_costs_tl \NewDocumentCommand{\requestedFundingTable}{o}{ Table~ #1 :\par \tl_clear:N \l__tmp_body_staff_tl \tl_clear:N \l__tmp_body_costs_tl \tl_put_right:Nn \l__tmp_body_staff_tl { \SetRow{red!20} \SetCell{font=\footnotesize\bfseries,halign=l} Staff & Qty & Sum \\ } \tl_put_right:Nn \l__tmp_body_costs_tl { \SetHline{-}{red,0.5pt} \SetRow{red!20} \SetCell{font=\footnotesize\bfseries,halign=l} Direct~ Costs & \SetCell[c=2]{c} Sum & \\ } % further processing in between \tl_put_right:Ne \l__tmp_body_staff_tl { category & 12 & 123 \\ } \tl_put_right:Ne \l__tmp_body_costs_tl { \SetRow{cmd={\marginpar{A note: #1}}} %<<<<<<<<<<<<<<<<<<<<<<<<< category & \SetCell[c=2]{c} 1234 & \\ } \begin{tblr}[ long, expand= \l__tmp_body_staff_tl \l__tmp_body_costs_tl, ]{ colspec = { *{1}{X[4,m]} *{2}{X[r, si={table-format=4}]} }, row{1,2} = {guard}, } CATEGORY & \SetCell[c=2]{c} year & \\ \l__tmp_body_staff_tl \l__tmp_body_costs_tl \end{tblr} } \ExplSyntaxOff \begin{document} \requestedFundingTable[A1] \requestedFundingTable[A2] \end{document}

  • Memoir class + twocolumn: strategies for reliable full-width floats and strip environments across large documents
    by Grant Petty on February 6, 2026 at 8:08 pm

    I'm compiling a 25-chapter book using XeLaTeX and memoir in (for my first time) twocolumn mode. Each chapter is a separate file loaded via \include{}. Individual chapters compile correctly with \includeonly{}, but compiling the full book produces errors and layout failures that don't appear in either single-chapter or single-column mode. Specific symptoms: \enlargethispage throws "page is already too large" at locations where it works fine in single-chapter compilation \input of a file containing a float environment triggers "not in outer par mode," but pasting the same content inline works Float placement (figure*, table*, strip from cuted) becomes unpredictable — floats migrate to wrong pages with no obvious cause and can't be forced back without abandoning the float environment altogether. Environment: XeLaTeX + memoir class cuted package for strip environment placeins, dblfloatfix, float, afterpage, longtable, mdframed, tcolorbox, rotating, nowidow multicol (for one specific 3-column text block) What I've tried: Removing \enlargethispage at problem locations (works around the error but doesn't explain it) Replacing \input with literal content (works, but defeats the purpose) Adjusting float placement specifiers (inconsistent results) My question: For those who have successfully produced print-ready books in two-column memoir: what combination of packages, settings, and workflow practices gives you deterministic results with full-width floats? I'm less interested in debugging my specific errors than in learning whether there's a more robust foundation I should be building on.

  • How to make f\left(x\right) not add extra space after f?
    by Nasser on February 6, 2026 at 8:01 pm

    I tried all answers in Spacing around \left and \right and none of them work. I use code generate by computer CAS. And all the code generates \left(...\right). So not possible to do any manual editing of latex code generated. Only issue is that something like f\left(x\right) adds extra space between function name f and the parentheses. I am not talking about any space inside parentheses, but the space outside between function name and starting (. I only want this space to be the same as if code was written using f(x). Nothing else change. First, here is MWE showing the issue \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage{kpfonts,baskervald} \usepackage{amsmath} \begin{document} \begin{align*} \int \frac{dy}{g(y)} &= \int f(x) \, dx\\ \int \frac{dy}{g\left(y\right)} &= \int f\left(x\right) \, dx \end{align*} \end{document} Compiled with lualatex gives Notice how the space after function name is larger when using \left(...\right) which is the second equation. I'd like the space after function names and starting ( in the second equation to be same as first equation as it looks better. Below are all my tries. Some of them fix the space after g and not after f and some solution fix the space after f but not after g. But there is no solution which produce same exact output for second equation as the first one. Try 1 (accepted answer in the above link) \documentclass[12pt]{article} \let\originalleft\left \let\originalright\right \renewcommand{\left}{\mathopen{}\mathclose\bgroup\originalleft} \renewcommand{\right}{\aftergroup\egroup\originalright} \usepackage[T1]{fontenc} \usepackage{kpfonts,baskervald} \usepackage{amsmath} \begin{document} \begin{align*} \int \frac{dy}{g(y)} &= \int f(x) \, dx\\ \int \frac{dy}{g\left(y\right)} &= \int f\left(x\right) \, dx \end{align*} \end{document} Gives Notice the space after g in second equation have become too small. Try 2 \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage{kpfonts,baskervald} \usepackage{amsmath} \usepackage{mathtools} \DeclarePairedDelimiter\pars{\lparen}{\rparen} \begin{document} \begin{align*} \int \frac{dy}{g(y)} &= \int f(x) \, dx\\ \int \frac{dy}{g\left(y\right)} &= \int f\left(x\right) \, dx \end{align*} \end{document} Gives No effect. Larger space after function names still exist. Try 3 \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage{kpfonts,baskervald} \usepackage{amsmath} \let\originalleft\left \let\originalright\right \def\left#1{\mathopen{}\originalleft#1} \def\right#1{\originalright#1\mathclose{}} \begin{document} \begin{align*} \int \frac{dy}{g(y)} &= \int f(x) \, dx\\ \int \frac{dy}{g\left(y\right)} &= \int f\left(x\right) \, dx \end{align*} \end{document} Gives Again, now space after g is too small. Try 4 \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage{kpfonts,baskervald} \usepackage{amsmath} \Umathopinnerspacing\displaystyle=0mu \Umathopinnerspacing\textstyle=0mu \begin{document} \begin{align*} \int \frac{dy}{g(y)} &= \int f(x) \, dx\\ \int \frac{dy}{g\left(y\right)} &= \int f\left(x\right) \, dx \end{align*} \end{document} Gives Still, the space between function names and ( is not same in second equation as first equation. try 5 \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage{kpfonts,baskervald} \usepackage{amsmath} \def\delim#1#2#3{ \mathopen{\left#1 \vphantom{#2} \right.} \kern-\nulldelimiterspace #2 \kern-\nulldelimiterspace \mathclose{ \left. \vphantom{#2} \right#3 } } \begin{document} \begin{align*} \int \frac{dy}{g(y)} &= \int f(x) \, dx\\ \int \frac{dy}{g\left(y\right)} &= \int f\left(x\right) \, dx \end{align*} \end{document} Gives Still, the space between function names and ( is not same in second equation as first equation. Try 6 \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage{kpfonts,baskervald} \usepackage{amsmath} \usepackage{mleftright} \renewcommand{\left}{\mleft} \renewcommand{\right}{\mright} \begin{document} \begin{align*} \int \frac{dy}{g(y)} &= \int f(x) \, dx\\ \int \frac{dy}{g\left(y\right)} &= \int f\left(x\right) \, dx \end{align*} \end{document} Gives The space after f looks same as in equation 1, but the space after g in second equation is now too small.

  • Siunitx and font and/or alignments
    by LeO on February 6, 2026 at 7:52 pm

    I want to use siunitx for alignments within a currency table. Perhaps euros are not a scientific unit - but I haven't seen why this might be a problem. I want to use a different font. Anyway there seems to be a strange mixture which leads to a weird result. \documentclass[12pt]{article} \usepackage[margin=2.5cm]{geometry} \usepackage{fontspec} \setmainfont{Bitter}[Ligatures=TeX,Scale=MatchLowercase] \usepackage{tabularx, multirow} \usepackage[locale = DE]{siunitx} \begin{document} \begin{tabular}{S} \textbf{Betrag} \\ 120,00 €\\ -12,00 €\\ \large\textbf{108,00 €}\\ \end{tabular} \end{document} Only the header and the last line are in "Bitter" font. Addtionally I don't understand why the euro sign has an extra space in the 3rd line. The result of the given MWE has two weird aspects: The ammount 120€ and -12€ are NOT in the main font. Is there a way to keep it? the euro sign after -12 has a strange additional space. Is there a way to correct it? (to have only ONE extra space)?

  • White line space at a table with hhline, colortbl and diagbox
    by cis on February 6, 2026 at 6:06 pm

    What is the trick to get this white line between yellow and gray away? The rest is as it should be. Hint: all fills should become lightgray at the end, here different to see the effects. \documentclass[margin=5pt, varwidth]{standalone} \usepackage{xcolor} \usepackage{colortbl}% \rowcolor, \cellcolor \usepackage{diagbox}% \diagbox \usepackage{hhline}% \hhline{~|-------|} and so on \setlength\arrayrulewidth{4pt}% test: correctness of the rules \begin{document} \begin{tabular}{c c | *{6}{c} |c|} \hhline{~ -| *{6}{-} |-} \rowcolor{yellow} \multicolumn{1}{c}{\cellcolor{white}aaa}% erase rule on the left & \cellcolor{white} bbb% & 9 & 8 & 7 & 6 & 5 & 4 & \diagbox{$p$}{$k$} \\ % \arrayrulecolor{blue} \hhline{~ ~| *{6}{~} |-} \rowcolor{lightgray} \multicolumn{1}{c}{\cellcolor{white}} & \multicolumn{1}{c|}{\cellcolor{white}} & \multicolumn{7}{c|} {{\tiny Here comes a text......}} \\ \hhline{~~| *{7}{-} |} \end{tabular} \end{document}

  • Drawing diagrams in latex [duplicate]
    by Noah on February 6, 2026 at 4:43 pm

    I’m relatively new at diagram drawing in latex. How would I go about drawing an upper half sphere with an elliptic curve plotted along it (to resemble the real projective plane)? I want it to look something like this where you have the upper-half sphere drawn and shaded in a solid light grey, and the intersection of the equation X^3-3XZ^2+3Z^3-Y^2Z=0 with the upper-half sphere, the point (0,1,0) annotated with infinity, and the viewing angle rotated as in the image (and possibly the curve in another colour). I really don’t like the usual 3D look but prefer the way the following attached images look. I’d greatly appreciate your help!

  • pgfplotstable: how to use a list to show wanted columns
    by cis on February 6, 2026 at 3:29 pm

    If I have \def\IndexList{[index]1, [index]2, [index]4, [index]5}; why can't I say columns={No, \IndexList, [index]6}% works not! at a pgfplotstable? What do I have to do, to use a created list to show wanted columns? \documentclass[margin=5pt, varwidth]{standalone} \usepackage{pgfplotstable} \begin{document} \pgfplotstableread[col sep=comma, header=true]{ No, a, b, c, d, e, f 0, 1, 2, 3, 4, 5, 6 1, 1, 2, 3, 4, 5, 6 2, 1, 2, 3, 4, 5, 6 3, 1, 2, 3, 4, 5, 6 4, 1, 2, 3, 4, 5, 6 }{\mytable} \section{Normal Table} \pgfplotstabletypeset[]{\mytable} \section{Index List Table - works not with Index List} \def\IndexList{[index]1, [index]2, [index]4, [index]5} \pgfplotstabletypeset[ columns={No, [index]1, [index]2, [index]4, [index]5, [index]6}% works %columns={No, \IndexList, [index]6}% works not! ]{\mytable} \end{document}

  • Unequal parens sizes in numerator and denominator of a fraction
    by Knudsen on February 6, 2026 at 2:22 pm

    Why are the parens on the numerator of this construction much bigger than the ones in the denominator? \documentclass{report} \usepackage{amsmath} \begin{document} \[ \frac{\left(q^k\right)} {\left(q^k\right)} \] \end{document}

  • Bold + Italic Greek symbol in PlainTeX
    by GowriSaro on February 6, 2026 at 1:48 pm

    I am aware that in LaTeX, \boldsymbol tag will produce Greek characters in Bold+Italic font, but how can I achieve this using PlainTeX, I tried with: $$ \alpha $$ \bye

  • How to use the \convolution operator command provided by fontsetup with ConTeXT? (using PUA glyphs in ConTeXt)
    by Apoorv Potnis on February 6, 2026 at 11:54 am

    The fontsetup package provides with a \convolution operator command to access a big star symbol from the New Computer Modern fonts. However, fontsetup works only with XeLaTeX and LuaLaTeX. How does one access this glyph from the NewCM fonts with ConTeXt? The \convolution command is defined in fspdefault.tex as \DeclareMathOperator*{\convolution}{\mathchoice{\char"E037}{\char"E036}{\char"E038}{\char"E039}}. The question essentially asks about using glyphs not encoded their Unicode slots (Private Use Areas?), as a Unicode slot for the glyph does not exist. ConTeXt MWE: \setupbodyfont[newcomputermodern] \startTEXpage[offset=1TS] \startformula \convolution_{1\le i\le n} a_i \stopformula \startformula \sum_{i=1}^n \convolution_{i=1}^n x_i \qquad \textstyle \sum\convolution_{i=1}^n x_i \qquad \scriptstyle \sum\convolution_{i=1}^n x_i \qquad \scriptscriptstyle \sum\convolution_{i=1}^n x_i \stopformula \stopTEXpage

  • How to use the \convolution operator command provided by fontsetup with OpTeX? (using PUA glyphs in OpTeX)
    by Apoorv Potnis on February 6, 2026 at 11:38 am

    The fontsetup package provides with a \convolution operator command to access a big star symbol from the New Computer Modern fonts. However, fontsetup works only with XeLaTeX and LuaLaTeX. How does one access this glyph from the NewCM fonts with OpTeX? The \convolution command is defined in fspdefault.tex as \DeclareMathOperator*{\convolution}{\mathchoice{\char"E037}{\char"E036}{\char"E038}{\char"E039}}. The question essentially asks about using glyphs not encoded their Unicode slots (Private Use Areas?), as a Unicode slot for the glyph does not exist. LuaLaTeX MWE: \documentclass{article} \usepackage[newcmbb]{fontsetup} \begin{document} \[ \convolution_{1\le i\le n} a_i \] \[ \sum_{i=1}^n \convolution_{i=1}^n x_i \qquad \textstyle \sum\convolution_{i=1}^n x_i \qquad \scriptstyle \sum\convolution_{i=1}^n x_i \qquad \scriptscriptstyle \sum\convolution_{i=1}^n x_i \] \end{document}

  • Finding and displaying the intersection points of two surfaces
    by SH.Madadpour on February 6, 2026 at 10:23 am

    How can I display the intersection of the following two surfaces in LaTeX? I have used the following codes as a default but I am not getting acceptable output. Is it possible to create a form to find its intersection points in LaTeX? Thanks a lot. \documentclass[border=3.14mm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.16} \begin{document} \begin{tikzpicture} \begin{axis}[domain=0.01:30,xlabel=$x$] \addplot3[surf,domain={0:1},color=green]{x^3+y^3}; \addplot3[surf,domain={0:1},color=red]{(x*(1-y^2)^(.5)+y*(1-x^2)^(.5))^3}; \end{axis} \end{tikzpicture} \end{document}

  • tikz / xint: Read out (and calc with) fractions from list (or array) with xint or pgfmath
    by cis on February 6, 2026 at 8:45 am

    How can I read out numbers from a list, say \def\pList{0.1, 1/6, 0.25, 0.4} (or array, say \def\pListArray{{\pList}}), with xint? Background: I want to keep fractions, like 1/6 in it's original form (not decimal value 0.1666 here). On the other hand, I need to calc 1-<value> too, and I want, in the case of 1/6 the value 5/6 (=1 - 1/6). I have a main document with a lot of xint content and calculations; therefore, for consistency reasons, it should be done with xint (it's clear that there are other packages or methods for this); and: There must be a method in the xint-package that I can't find in the manual. Does anybody know? \documentclass[margin=5pt, varwidth]{standalone} \usepackage{tikz} \usepackage{xintexpr} \begin{document} \def\pList{0.1, 1/6, 0.25, 0.4}% List \def\pListArray{{\pList}} \section{The pList} \pList \section{pgfmath-test for fraction-readout (bad)} p=\pgfmathprint{\pListArray[0]}, q=\pgfmathprint{1-\pListArray[0]} good. But p=\pgfmathprint{\pListArray[1]}, q=\pgfmathprint{1-\pListArray[1]} bad. \section{xint-test for fractions (good), but how to readout?} p=\xinteval{1/6}, q=\xinteval{1-1/6} \end{document}

  • Space after \bmod in normal and script mode
    by Jinwen on February 6, 2026 at 6:27 am

    \bmod seems to behave differently in text style and script style (here is just an example, in reality I am writing it on the arrow of a commutative diagram). Am I using this command in a wrong way? (I learned \bmod from here.) \documentclass{article} \begin{document} \( \bmod{\mathcal{N}} \) \( x^{\bmod{\mathcal{N}}} \) \end{document}

  • Make perfect circular diagrams
    by Fran on February 5, 2026 at 12:23 pm

    I know that I can make circular diagrams with the nice smartdiagram package, but arrows do not fit perfectly in a imaginary circle. In fact, the diagram is far from a circle when there are only two or three nodes: \documentclass{standalone} \usepackage{smartdiagram} \begin{document} \smartdiagramset{ connection color=red, module shape= circle, circular distance=2cm, uniform color list=white for 6 items, uniform arrow color=true, arrow color=black} \smartdiagram[circular diagram:clockwise]{foo, bar} \end{document} I know also that there are several examples in this site about making circular diagrams without this package, but translating these examples to diagrams with a different numbers of nodes is complex, so I tried an automated solution with tikz (without really knowing what I was doing, I have to admit) so that I only have to modify a list of nodes in \mylist and little more to obtain the result: \documentclass[border=2mm]{standalone} \usepackage{tikz} \usetikzlibrary{arrows.meta} \begin{document} \begin{tikzpicture}[ > = Stealth, every node/.style = {circle, draw, thick, minimum width=1cm, align=center} ] \def\mylist{foo, bar, baz} % play with this \foreach \x [count=\i from 1] in \mylist {\xdef\n{\i}} \def\radio{2cm} % and this if needed \foreach \texto [count=\i from 0] in \mylist{ \pgfmathsetmacro\ang{-\i*360/\n} \node (n\i) at (\ang:\radio) {\texto}; } \foreach \dummy [count=\i from 0] in \mylist{ \pgfmathsetmacro\j{int(mod(\i+1,\n))} \pgfmathsetmacro\angini{-\i*360/\n} \pgfmathsetmacro\angfin{-\j*360/\n} \pgfmathsetmacro\outang{mod(\angini - 90 + 720, 360)} \pgfmathsetmacro\inang {mod(\angfin + 90 + 720, 360)} \draw[->, thick, line width=1.4pt] (n\i) to[out=\outang, in=\inang, looseness=.9] (n\j); % and with the looseness } \end{tikzpicture} \end{document} Mainly it works. The problem is that like in smartdiagram, the arrows don't perfectly follow an imaginary circle, that was the idea behind getting involved in this business. Playing with looseness is possible to correct a bit the curvature of the arrows, but it's tedious and the result is never perfect. So, the result should be ideally near to the image below (that I modified manually in Inkscape) and still require minimal settings to adapt the code to diagrams of n nodes. Fixes of the MWE as well as alternative approaches are welcome. Edit Thank you all for the excellent suggestions. This time, I am truly sorry I can only accept one.

  • Looking for a symbol like big \ast
    by Dimitrios ANAGNOSTOU on February 5, 2026 at 9:16 am

    The question is rather simple. How to obtain the following big asterisk symbol? I apologize if it is duplicate. Thank you very much.

  • My LaTeX code is super slow
    by YCH817 on February 5, 2026 at 7:00 am

    I want to do something like this : display binary operation evaluation in different ways (decomposing the binary evaluation in two unary evaluation, etc) with a much simple syntax, i.e. : Here I use postfix and infix notation for function applications, for example : in row 7 of this table, (c1 → c2) can be decomposed into c2 (c1 → _) , in which (c1 → _) is the first unary application (marked with blue framed box), c2 (c1 → _) is the second one (marked with blue framed box); and Homo stands for the Hom functor, Expo stands for Exponent operation in Cartesian Closed Category. However the compilation tooks so much time, I think I use too much \csname...\endcsname, \@ifnextchar and so on. Seeking for better solution like expl3 or LuaLaTeX. Here is the full MWE : \documentclass[10pt,a4paper]{article} % for font \usepackage{pifont} % for \ding \usepackage{fontspec} % for font % for programming \usepackage{etoolbox} % patch \usepackage{calc} % calculation \usepackage{keyval} % key-value settings % for layout \usepackage[ a4paper, ]{geometry} % \usepackage{multicol} % for multiple columns % for mathematics \usepackage{amsmath} % \usepackage{amssymb} % \usepackage{amsfonts} % for \mathbf \mathsf \mathit \usepackage{mathtools} % for \overbracket , \underbracket \usepackage{stackengine} % for \stackon , \stackunder % for color \usepackage[ dvipsnames, svgnames, table ]{xcolor} % % for boxes \usepackage[ export ]{adjustbox} % for box scaling \usepackage{relsize} % for relevative font size \linespread{2} \setlength\parindent{0pt} % cancel indent \setlength{\columnseprule}{.4pt} % set the width of rule used in multicolumn environment % ---- enable stack for math equations \stackMath % ----- adding boxes with colored frames \newcommand{\cfbox}[2][blue]{% \setlength{\fboxsep}{0pt}% \setlength{\fboxrule}{0.4pt}% \colorlet{currentcolor}{.}% {\color{#1}% \fbox{\color{currentcolor}\ensuremath{#2}}}% } % ---- delimiters : \def\vts#1{\lvert#1\rvert} % verts \def\prs#1{\left(#1\right)} % parentheses \def\bcs#1{\left\{#1\right\}} % braces \def\bks#1{\left[#1\right]} % brackets \def\plr#1{\vphantom{(fg)}\smash{#1}}% to restrict box height and depth \def\etc{\plr{\rm etc}} % et cetera \def\occ{\plr{\texttt{\_}}} % similar to _ in lean or haskell % ----- Following code used for register variable types \makeatletter \def\RegistVarType#1BG#2Font#3{ \colorlet{color#1}{#2} \expandafter\newif\csname ifColorVarType#1\endcsname % determine whether the variable is highlighted \expandafter\def\csname var#1\endcsname##1{% \setlength{\fboxsep}{0pt}% \setlength{\fboxrule}{0pt}% \let\RegistVarTypeCache=\relax \csname ifColorVarType#1\endcsname{% \gdef\RegistVarTypeCache{\colorbox{color#1}}% }\else{% \gdef\RegistVarTypeCache{\fbox}% }\fi% \RegistVarTypeCache{\ensuremath{\plr{#3 ##1}}}% } \csname ColorVarType#1true\endcsname % enable highlighting is default } % ----- Following code used for register a specific family of variables \def\RegistVarFreqType#1Name#2{ \@ifnextchar D% {\RegistVarFreqType@{#1}{#2}} {\RegistVarFreqType@{#1}{#2}Disp{#2}} } \def\RegistVarFreqType@#1#2Disp#3{% \expandafter\def\csname #1#2\endcsname{% \csname var#1\endcsname{{#3}^{}}% } \expandafter\def\csname #1#2n\endcsname##1{% \csname var#1\endcsname{{#3}_{##1}^{}}% } \@ifnextchar p {\RegistVarFreqType@Loop{#1}{#2}{p}{'}{#3}} {\relax} } \def\RegistVarFreqType@Loop#1#2#3#4#5p{% \expandafter\def\csname #1#2#3\endcsname{% \csname var#1\endcsname{{#5}#4}% } \expandafter\def\csname #1#2#3n\endcsname##1{% \csname var#1\endcsname{{#5}#4_{##1}}% } \@ifnextchar p {\RegistVarFreqType@Loop{#1}{#2}{#3p}{#4'}{#5}} {\relax} } % ----- Used for registering operation form (Type B) \def\RegistOprFormTypeBName#1Dflt#2{% \expandafter\newcommand\expandafter{\csname #1\endcsname}[1][#2]{\plr{\ensuremath{% \xrightarrow[\text{\scriptsize\(\plr{##1}\)}]{}% }}} } \def\RegistOprEvalTypeB#1Form#2{% \let\RegistOprEvalTypeB@opr=\relax% \expandafter\def\csname ev#2\endcsname{% \@ifnextchar [% {\csname ev#2@Yopt\endcsname} {\csname ev#2@Nopt\endcsname}% }% \expandafter\def\csname ev#2@Yopt\endcsname[##1]{% \def\RegistOprEvalTypeB@opr{\csname #2\endcsname[{##1}]}% \csname ev#2@\endcsname % <--- 移到这里! }% \expandafter\def\csname ev#2@Nopt\endcsname{% \def\RegistOprEvalTypeB@opr{\csname #2\endcsname}% \csname ev#2@\endcsname % <--- 移到这里! }% \expandafter\def\csname ev#2@\endcsname{% \@ifnextchar <% {\csname ev#2@YargL@\endcsname} {\@ifnextchar >% {\csname ev#2@YargR@\endcsname} {\@ifnextchar .% {\csname ev#2@YargL@Qp@\endcsname} {\RegistOprEvalTypeB@opr}}}% }% \expandafter\def\csname ev#2@YargL@Qp@\endcsname.##1{% \@ifnextchar .% {\csname ev#2@YargL@Qp@YargR@\endcsname{##1}}% {\relax}% }% \expandafter\def\csname ev#2@YargL@Qp@YargR@\endcsname##1.##2{% \@ifnextchar p% {\csname ev#2@YargL@Qp@YargR@Yp\endcsname{##1}{##2}}% {\csname evB#1\endcsname{\RegistOprEvalTypeB@opr}{##1}{##2}}% }% \expandafter\def\csname ev#2@YargL@Qp@YargR@Yp\endcsname##1##2p{% \csname evB#1p\endcsname{\RegistOprEvalTypeB@opr}{##1}{##2}% }% \expandafter\def\csname ev#2@YargL@\endcsname<##1{% \@ifnextchar p% {\csname ev#2@YargL@Yp@\endcsname{##1}}% {\csname ev#2@YargL@Np@\endcsname{##1}}% }% \expandafter\def\csname ev#2@YargL@Np@\endcsname##1{% \@ifnextchar .% {\csname ev#2@YargL@Np@YargR@\endcsname{##1}}% {\relax}% }% \expandafter\def\csname ev#2@YargL@Np@YargR@\endcsname##1.##2{% \@ifnextchar p% {\csname ev#2@YargL@Np@YargR@Yp\endcsname{##1}{##2}}% {\csname evB#1LR\endcsname{\RegistOprEvalTypeB@opr}{##1}{##2}}% }% \expandafter\def\csname ev#2@YargL@Np@YargR@Yp\endcsname##1##2p{% \csname evB#1LRp\endcsname{\RegistOprEvalTypeB@opr}{##1}{##2}% }% \expandafter\def\csname ev#2@YargL@Yp@\endcsname##1p{% \@ifnextchar .% {\csname ev#2@YargL@Yp@YargR@\endcsname{##1}}% {\csname evB#1Lp\endcsname{\RegistOprEvalTypeB@opr}{##1}}% }% \expandafter\def\csname ev#2@YargL@Yp@YargR@\endcsname##1.##2{% \@ifnextchar p% {\csname ev#2@YargL@Yp@YargR@Yp\endcsname{##1}{##2}}% {\csname evB#1LpR\endcsname{\RegistOprEvalTypeB@opr}{##1}{##2}}% }% \expandafter\def\csname ev#2@YargL@Yp@YargR@Yp\endcsname##1##2p{% \csname evB#1LpRp\endcsname{\RegistOprEvalTypeB@opr}{##1}{##2}% }% \expandafter\def\csname ev#2@YargR@\endcsname>##1{% \@ifnextchar p% {\csname ev#2@YargR@Yp@\endcsname{##1}}% {\csname ev#2@YargR@Np@\endcsname{##1}}% }% \expandafter\def\csname ev#2@YargR@Np@\endcsname##1{% \@ifnextchar .% {\csname ev#2@YargR@Np@YargL@\endcsname{##1}}% {\csname evB#1Rp\endcsname{\RegistOprEvalTypeB@opr}{##1}}% }% \expandafter\def\csname ev#2@YargR@Np@YargL@\endcsname##1.##2{% \@ifnextchar p% {\csname ev#2@YargR@Np@YargL@Yp\endcsname{##1}{##2}}% {\csname evB#1RL\endcsname{\RegistOprEvalTypeB@opr}{##2}{##1}}% }% \expandafter\def\csname ev#2@YargR@Np@YargL@Yp\endcsname##1##2p{% \csname evB#1RLp\endcsname{\RegistOprEvalTypeB@opr}{##2}{##1}% }% \expandafter\def\csname ev#2@YargR@Yp@\endcsname##1p{% \@ifnextchar .% {\csname ev#2@YargR@Yp@YargL@\endcsname{##1}}% {\csname evB#1Rp\endcsname{\RegistOprEvalTypeB@opr}{##1}}% }% \expandafter\def\csname ev#2@YargR@Yp@YargL@\endcsname##1.##2{% \@ifnextchar p% {\csname ev#2@YargR@Yp@YargL@Yp\endcsname{##1}{##2}}% {\csname evB#1RpL\endcsname{\RegistOprEvalTypeB@opr}{##2}{##1}}% }% \expandafter\def\csname ev#2@YargR@Yp@YargL@Yp\endcsname##1##2p{% \csname evB#1RpLp\endcsname{\RegistOprEvalTypeB@opr}{##2}{##1}% }% } \makeatother % ----- evaluation for unary operation \def\evU#1#2{\plr{\cfbox{% {#2}\mathop{#1}% }}} \def\evUp#1#2{\plr{\cfbox{% \prs{{#2}\mathop{#1}} }}} \def\evUn#1#2{\cfbox{% \plr{{#2}^{#1}} }} \def\evUnp#1#2{\cfbox{% \prs{\plr{{#2}^{#1}}} }} % ------- evaluation for binary operation (infix) \def\evBin#1#2#3{\cfbox[Purple]{\plr{% {#2}\mathbin{#1}{#3}% }}} \def\evBinp#1#2#3{\cfbox[Purple]{% \prs{\plr{{#2}\mathbin{#1}{#3}}}% }} \def\evBinLp#1#2{\plr{\cfbox{% \prs{{#2}\mathbin{#1}\occ} }}} \def\evBinRp#1#2{\plr{\cfbox{% \prs{\occ\mathbin{#1}{#2}} }}} \def\evBinLpR#1#2#3{%\plr{% \evU{\evBinLp{#1}{#2}}{#3} }%} \def\evBinRpL#1#2#3{%\plr{% \evU{\evBinRp{#1}{#3}}{#2} }%} \def\evBinLpRp#1#2#3{%\plr{% \evUp{\evBinLp{#1}{#2}}{#3}% }%} \def\evBinRpLp#1#2#3{%\plr{% \evUp{\evBinRp{#1}{#3}}{#2}% }%} \def\evBinLR#1#2#3{\plr{\cfbox{% \cfbox{\plr{{#2}\mathbin{#1}{}}}{#3}% }}} \def\evBinLRp#1#2#3{\plr{\cfbox{% \prs{\cfbox{\plr{{#2}\mathbin{#1}{}}}{#3}}% }}} \def\evBinRL#1#2#3{\plr{\cfbox{% {#2}\cfbox{\plr{{}\mathbin{#1}{#3}}}% }}} \def\evBinRLp#1#2#3{\plr{\cfbox{% \prs{{#2}\cfbox{\plr{{}\mathbin{#1}{#3}}}}% }}} \begin{document} % ----- Regist variable types \RegistVarType{obj}BG{pink}Font{\sf} \RegistVarType{cat}BG{Rhodamine}Font{\sf} % ----- Regist frequently used variables \RegistVarFreqType{obj}Name{c}ppppp \RegistVarFreqType{cat}Name{C}ppppp % ----- Regist constants \RegistVarFreqType{cat}Name{Cat}Disp{Cat} \RegistVarFreqType{cat}Name{Set}Disp{Set} % ----- Regist operators, Disp stands for Display \RegistOprFormTypeBName{Homo}Dflt{\catC} % functor : hom % ----- Regist operator evaluation types \RegistOprEvalTypeB{in}Form{Homo} \verb|$\evHomo[\catC]$| will produce $\evHomo[\catC]$; \\ \verb|$\evHomo[\catC].{\objcn1}.{\objcn2}$| will produce $\evHomo[\catC].{\objcn1}.{\objcn2}$; \\ \verb|$\evHomo[\catC].{\objcn1}.{\objcn2}p$| will produce $\evHomo[\catC].{\objcn1}.{\objcn2}p$; \\ \verb|$\evHomo[\catC]<{\objcn1}.{\objcn2}$| will produce $\evHomo[\catC]<{\objcn1}.{\objcn2}$; \\ \verb|$\evHomo[\catC]<{\objcn1}.{\objcn2}p$| will produce $\evHomo[\catC]<{\objcn1}.{\objcn2}p$; \\ \verb|$\evHomo[\catC]<{\objcn1}p$| will produce $\evHomo[\catC]<{\objcn1}p$; \\ \verb|$\evHomo[\catC]<{\objcn1}p.{\objcn2}$| will produce $\evHomo[\catC]<{\objcn1}p.{\objcn2}$; \\ \verb|$\evHomo[\catC]<{\objcn1}p.{\objcn2}p$| will produce $\evHomo[\catC]<{\objcn1}p.{\objcn2}p$; \\ \verb|$\evHomo[\catC]>{\objcn2}.{\objcn1}$| will produce $\evHomo[\catC]>{\objcn2}.{\objcn1}$; \\ \verb|$\evHomo[\catC]>{\objcn2}.{\objcn1}p$| will produce $\evHomo[\catC]>{\objcn2}.{\objcn1}p$; \\ \verb|$\evHomo[\catC]>{\objcn2}p$| will produce $\evHomo[\catC]>{\objcn2}p$; \\ \verb|$\evHomo[\catC]>{\objcn2}p.{\objcn1}$| will produce $\evHomo[\catC]>{\objcn2}p.{\objcn1}$; \\ \verb|$\evHomo[\catC]>{\objcn2}p.{\objcn1}p$| will produce $\evHomo[\catC]>{\objcn2}p.{\objcn1}p$; \end{document} The code for the syntax shown in the image is inside \def\RegistOprEvalTypeB, and you will find control sequence which name include following strings : Yopt : stands for "Yes, option exists" Nopt : stands for "No , option does not exist" YargL : stands for "Yes, argument on the left exists" NargL : stands for "No , argument on the left does not exist" Yp : stands for "Yes, add parentheses" Np : stands for "No , don't add parentheses" YargR : stands for "Yes, argument on the right exists" NargR : stands for "No , argument on the right does not exist" For example , For example , \csname ev#2@Yopt\endcsname means optional argument exists \csname ev#2@Nopt\endcsname means optional argument does not exist \csname ev#2@\endcsname means optional argument detection has finished, @ in the end means require further detection; \csname ev#2@YargL@\endcsname means argument on the left detected, @ in the end means require further detection: \csname ev#2@YargL@Yp@\endcsname means first parentheses is detected, @ in the end means require further detection; \csname ev#2@YargL@Np@YargR@\endcsname means argument on the right detected, @ in the end means require further detection; \csname ev#2@YargL@Np@YargR@Yp\endcsname means second parentheses is detected, output (c2 (c1 → _)) with two blue frame boxes otherwise output c2 (c1 → _) with two blue frame boxes otherwiseoutput (c1 → _) with one blue frame box \csname ev#2@YargL@Np@\endcsname means first parentheses is not detected, @ in the end means require further detection; \csname ev#2@YargL@Np@YargR@\endcsname means argument on the right detected, @ in the end means require further detection; \csname ev#2@YargL@Np@YargR@Yp\endcsname means second parentheses is detected, output (c1 → c2) with two blue frame boxes otherwise output c1 → c2 with two blue frame boxes otherwise do nothing \csname ev#2@YargR@\endcsname means argument on the right detected, @ in the end means require further detection; \csname ev#2Yarg@Yp\endcsname means first parentheses is detected, @ in the end means require further detection; \csname ev#2@YargR@Yp@YargL@\endcsname means argument on the left is detected, @ in the end means require further detection; \csname ev#2@YargR@Yp@YargL@Yp\endcsname means second parentheses is detected, output (c1 (_ → c2)) with two blue frame boxes otherwise output c1 (_ → c2) with two blue frame boxes otherwise output (_ → c2) with one blue frame box \csname ev#2YargR@Np\endcsname means first parentheses is not detected, @ in the end means require further detection; \csname ev#2@YargR@Np@YargL@\endcsname means argument on the left detected, @ in the end means require further detection; \csname ev#2@YargR@Np@YargL@Yp\endcsname means second parentheses is detected, output (c1 → c2) with two blue frame boxes otherwise output c1 → c2 with two blue frame boxes otherwise do nothing \csname ev#2@YargL@Qp@\endcsname meansbinary evaluation will not be decomposed into two unary evaluation . @ in the end means require further detection; \csname ev#2@YargL@Qp@YargR@\endcsname meansargument on the right is detected,@ in the end means require further detection; \csname ev#2@YargL@Qp@YargR@Yp\endcsname meansparentheses is detected,output (c1 → c2) with single violet box otherwiseoutput c1 → c2 with single violet box Although the MWE is not slow, my overleaf project is very slow . https://www.overleaf.com/9896942569kgyvrxgjgmpv#e62d2e , And the result PDF should look like this : https://drive.google.com/file/d/1RzpXM5Rlqx8z5A-eTJJI__sDNXJPcrbE/view?usp=sharing, it has full description of my motivation Inside the overleaf project, you will find layouts_custom/set_math_evl02.tex should be the main reason of low efficiency, it serve as the syntax sugar for set_math_evl01.tex layouts_custom/set_math_evl01.tex, contains all the commands for display evaluations : \evU, \evUp \evUn, \evUnp \evBpo, \evBpop, \evBpoA, \evBpoAB, \evBpoABp, \evBpoAp, \evBpoApB, \evBpoApBp \evBpoBp, \evBpoBpA, \evBpoBpAp, where B means binary and po stands for postfix \evBin, \evBinp, \evBinLp, \evBinLpR, \evBinLpRp, \evBinLR, \evBinLRp \evBinRp, \evBinRpL, \evBinRpLp, \evBinRL, \evBinRLp, where B means binary and in stands for infix \evBinx, \evBinxp, \evBinxLp, \evBinxLpR, \evBinxLpRp, \evBinxLR, \evBinxLRp \evBinxRp, \evBinxRpL, \evBinxRpLp, \evBinxRL, \evBinxRLp, where B means binary and in stands for infix , x means it is used for exponent type layouts_custom/set_math_opr contains commands like \RegistOprFormTypeAName \RegistOprFormTypeBName \RegistOprFormTypeCName \RegistOprFormTypeDName layouts_custom/set_math_var defines how to register different types of variables : \RegistVarType \RegistVarFreqType , which relies on \RegistVarFreqType@ \RegistVarFreqType@Loop and contains some abbrevations like \xpndaft stands for \expandafter \ncm stands for \newcommand \rcm stands for \renewcommand \vph stands for \vphantom \hph stands for \hphantom \ph stands for \phantom \mllap stands for \mathllap \mrlap stands for \mathrlap \mclap stands for \mathclap \mop stands for \mathop \mbin stands for \mathbin \mrel stands for \mathrel

  • Left-aligning lines of text to left edge of right-aligned line?
    by Dan Li on February 5, 2026 at 1:36 am

    What I’m trying to accomplish is best illustrated as follows: The first line (“Monday, December 22, 2025, 16:00 EST”) is right-aligned to the text width (possibly by \hfill, but not a hard requirement). The second line (“New York City, New York”) needs to be left-aligned to the left edge of that first line. In other words, the start of the M in “Monday” and N in “New York” are vertically aligned. How can this be done?