• Why is Proposition 11 referred to as Proposition 12 when \ref{} is used?
    by Michael Hardy on May 24, 2026 at 1:02 am

    When I compiled the code below, the resulting pdf called the stated proposition "Proposition 11." Note the label \label{f2}. But in the three places where you see \ref{f2} it says "12" rather than "11". Might this have something to do with the fact that the first occurrence of \ref{f2} comes before rather than after the proposition bearing that label? Or what? A proof of Proposition \ref{f3} and of Proposition \ref{f2} (below) will follow. A conditional trigonometric identity that does with even numbers what (\ref{third}) does with odd numbers has the Proposition \ref{even numbers} as its simplest nontrivial form. Here is its general form, with a sum of more than three terms: \begin{proposition} \label{f2} \begin{align*} \text{If } & \sum_{\alpha\,\in\,I} \alpha = 180^\circ = \text{half-circle} \\ \text{then } & \sum_{\alpha\,\in\,I} \sin^2\alpha = \sum_{\text{even } n\,\ge\,2} (-1)^{(n-2)/2} n \sum_{A\in\binom I n} \prod_{\alpha\,\in\,A} \sin\alpha \prod_{\alpha\,\in\,I\smallsetminus A} \cos\alpha. \end{align*} \end{proposition} In both Propositions \ref{f3} and \ref{f2}, the coefficients are $2,-4,6,-8,10,-12,\ldots$. I know no geometric interpretation either the left side or the right side of the identity in Proposition \ref{f2}.

  • Why can't TeX \par remove these spaces?
    by Elayson Abreu on May 23, 2026 at 11:30 pm

    I encountered a problem while writing. Consider the following example in Plain TeX: \def\cmd{ \par\noindent\hfil ??? \par\noindent\hfil ??? \par\noindent\hfil ??? } {\cmd} \par \bye The compilation generates: Note the last misaligned line. Why didn't \par remove the two spaces preceding it? Note that if I add a percentage mark to the end of the definition of \cmd or to the end of {\cmd}, the problem disappears: \def\cmd{ \par\noindent\hfil ??? \par\noindent\hfil ??? \par\noindent\hfil ???% } {\cmd} \par \bye Or \def\cmd{ \par\noindent\hfil ??? \par\noindent\hfil ??? \par\noindent\hfil ??? } {\cmd}% \par \bye Generates: The original code that generated this question is similar to (the definition of \eject in Plain TeX is \def\eject{\par\break}): \def\printA{ \par\noindent\hfil City \par\noindent\hfil Year } \def\printB{ \eject more... } \def\printC{ \printA \printB } \printC \bye

  • empty line between \begin{longtable} and \hline causes compile error with tex4ht in TL 2026
    by Nasser on May 23, 2026 at 9:30 pm

    This file compiles OK with lualatex (I did not mean to put am empty line after \begin{longtable} and only noticed this after compiling to HTML) \documentclass{article} \usepackage{longtable} \begin{document} \begin{longtable}{|p{4in}|p{.4in}|p{1.5in}|} \hline A&B&C \end{longtable} \end{document} But using tex4ht it gives compile error >make4ht -ulm default -a debug 5.tex "mathjax,htm,charset=utf-8" (/usr/local/texlive/2026/texmf-dist/tex/generic/tex4ht/html5.4ht)) (/usr/local/texlive/2026/texmf-dist/tex/latex/l3backend/l3backend-dvips.def) (./5.aux) (/usr/local/texlive/2026/texmf-dist/tex/latex/lm/ot1lmtt.fd) ! Misplaced \noalign. \a:hline ->\ifx \ar:cnt \:UnDef \else \o:noalign: {\append:def \hline:s {\a:... l.8 \hline ? Should not this compile OK with tex4ht also? Removing the empty line after \begin{longtable} tex4ht now compiles it OK. TL 2026 on Ubuntu under windows 10 WSL 1.0 >make4ht --version make4ht version v0.4e >which tex4ht /usr/local/texlive/2026/bin/x86_64-linux/tex4ht Reference https://puszcza.gnu.org.ua/bugs/index.php?675

  • Bracealign and oversized exponents
    by Sebastiano on May 23, 2026 at 9:00 pm

    Is it the bracealign package that generates such large exponents equal to the base of the power? \documentclass{article} \usepackage{bracealign} \begin{document} \[ \begin{bracealign} = x^{\overbrace{(m+1)+\cdots+(m+1)}^{k}} = x_{\underbrace{(m+1)+\cdots+(m+1)}_{k}} \end{bracealign} \] \end{document}

  • Sequence of functions: easing package
    by Sebastiano on May 23, 2026 at 8:20 pm

    I was trying to understand how the easing package works and whether it can be useful for plotting a sequence of functions in order to study uniform convergence. I am not sure whether the package only allows plotting a set of predefined functions, or whether it also enables the representation of arbitrary sequences of functions. In particular, I would like to know whether there is a way to use this package (or other similar LaTeX packages) to effectively visualize any sequence of functions. If there is a more suitable tool, I would appreciate it if you could suggest it. Additionally I not understand the reason of a ugly graph for $n=1, 2$. Here an example: \documentclass{article} \usepackage{pgfplots} \usepgflibrary{easing} \pgfplotsset{compat=1.18} \begin{document} \begin{center} \begin{tikzpicture} \begin{axis}[ width=12cm, height=7cm, domain=0:1, axis equal image, samples=300, xmin=0, xmax=1, ymin=0, ymax=1.05, axis lines=left, xlabel={$x$}, ylabel={$x^n$}, legend pos=north west, thick ] \pgfkeys{/easing/pow/exponent=1} \addplot[blue] {poweasein(0,1,x)}; \addlegendentry{$n=1$} \pgfkeys{/easing/pow/exponent=2} \addplot[red] {poweasein(0,1,x)}; \addlegendentry{$n=2$} \pgfkeys{/easing/pow/exponent=4} \addplot[green!60!black] {poweasein(0,1,x)}; \addlegendentry{$n=4$} \pgfkeys{/easing/pow/exponent=8} \addplot[orange] {poweasein(0,1,x)}; \addlegendentry{$n=8$} \addplot[black, dotted] { (x==1 ? 1 : 0) }; \addlegendentry{$\lim f_n$} \end{axis} \end{tikzpicture} \end{center} \end{document}

  • How to remove the spurious vertical space while joining split boxes with coffins?
    by niru on May 23, 2026 at 6:16 am

    For some reasons, I need to create a multi-column layout without using the popular packages for multi-column text. What I do is, I grab the text, set it inside a box of restricted \hsize, split the box with \vbox_set_split_to_ht:NNn. Then the split boxes are unpacked inside coffins, they are attached with some x offset and typeset. Have a look at the following MWE: \documentclass{article} \usepackage[margin=3cm]{geometry} \usepackage{kantlipsum} \usepackage{microtype} \begin{document} \ExplSyntaxOn \vbox_set:Nn \l_tmpa_box { \hsize = 0.475 \linewidth \prg_do_nothing: \kant [ 1 - 3 ] } \vbox_set_split_to_ht:NNn \l_tmpb_box \l_tmpa_box { \textheight - \baselineskip % to get the effect of a \vtop } \vcoffin_set:Nnn \l_tmpa_coffin { 0.475 \linewidth } { \vbox_unpack_drop:N \l_tmpb_box } \vcoffin_set:Nnn \l_tmpb_coffin { 0.475 \linewidth } { \vbox_unpack_drop:N \l_tmpa_box } \coffin_join:NnnNnnnn \l_tmpa_coffin { r } { t } \l_tmpb_coffin { l } { t } { 0.025 \linewidth } \c_zero_dim \coffin_typeset:Nnnnn \l_tmpa_coffin { l } { t } \c_zero_dim \c_zero_dim \ExplSyntaxOff \end{document} This produces: I read that \splittopskip could be causing this, but it is 10pt which nearly is of a line's height and as can be seen from the screenshot, our difference is smaller than that. I tried \lineskip and that did produce a tiny amount of space which I thought could be related to the spurious space, but I require 3 times the \lineskip to get both the columns at the right position. \documentclass{article} \usepackage[margin=3cm]{geometry} \usepackage{kantlipsum} \usepackage{microtype} \begin{document} \ExplSyntaxOn \vbox_set:Nn \l_tmpa_box { \hsize = 0.475 \linewidth \prg_do_nothing: \kant [ 1 - 3 ] } \vbox_set_split_to_ht:NNn \l_tmpb_box \l_tmpa_box { \textheight - \baselineskip % to get the effect of a \vtop } \vcoffin_set:Nnn \l_tmpa_coffin { 0.475 \linewidth } { \vbox_unpack_drop:N \l_tmpb_box } \vcoffin_set:Nnn \l_tmpb_coffin { 0.475 \linewidth } { \vbox_unpack_drop:N \l_tmpa_box } \coffin_join:NnnNnnnn \l_tmpa_coffin { r } { t } \l_tmpb_coffin { l } { t } { 0.025 \linewidth } { 3 \lineskip } \coffin_typeset:Nnnnn \l_tmpa_coffin { l } { t } \c_zero_dim \c_zero_dim \ExplSyntaxOff \end{document} I am almost sure that \lineskip is not the correct macro to be used there, but then which one exactly is it? What stores the culprit skip/glue? What would be a recommended (and preferably L3) way of doing it?

  • How can I automatically align circuitikz voltage labels with rotated bipoles?
    by Evelyn Walker on May 23, 2026 at 5:40 am

    I am drawing a large electrical schematic using circuitikz and noticed that voltage labels attached to rotated bipoles are not always visually aligned with the component orientation. For example, in the following code: \documentclass{article} \usepackage[american]{circuitikz} \begin{document} \begin{circuitikz} \draw (0,0) to[R, v=$v_R$] (4,0) to[V, rotate=90, v=$v_s$] (4,4); \end{circuitikz} \end{document} the voltage label orientation and positioning seem inconsistent once the bipole is rotated. I would like the labels to: automatically follow the component rotation, preserve readable text orientation, and maintain consistent spacing relative to the symbol. Is there a recommended way to redefine the voltage label placement behavior globally for rotated bipoles in circuitikz?

  • How can I define a custom sinusoidal voltage source in circuitikz using pic?
    by Marco Moldenhauer on May 22, 2026 at 3:37 pm

    I am trying to define a custom electrical symbol for use with circuitikz. The symbol is a sinusoidal voltage source consisting of: a circle, a sinusoidal waveform inside the circle, + / − polarity markings, and a voltage label such as v_1 (which should be customizable). I would like to implement it as a TikZ pic so that it behaves similarly to built-in circuitikz components and allows easy connection of wires to its terminals. The symbol I want to reproduce is shown below (from Engineering Circuit Analysis by Hayt): I noticed that circuitikz already provides a sinusoidal voltage source. If possible, I would like to use that existing implementation as a reference (or perhaps extend it) so that the custom symbol matches the standard circuitikz style, dimensions, and line thickness used by the library.

  • How to extend the decoration path with multiple arrows?
    by Explorer on May 22, 2026 at 2:05 pm

    What I want is the arrow path patterns as below, but not only work for straight line, but ployline, curve, as path style/decoration: \documentclass[tikz,border=6pt]{standalone} \begin{document} \begin{tikzpicture} \foreach \i in {1,...,5} \draw[-latex,shorten >=2pt, shorten <=2pt] (\i,0) -- ({\i+1},0); \end{tikzpicture} \begin{tikzpicture} \draw[-latex,shorten >=2pt, shorten <=2pt] (0.5,0) -- (1,0); \foreach \i in {1,...,5} \draw[-latex,shorten >=2pt, shorten <=2pt] (\i,0) -- ({\i+1},0); \node[text width=5.5cm,align=left,anchor=north] at (3,-.25) {If the length is not exactly N cm, then I hope the starting point could be shortened. For instance, the 5.5cm here, I want the first arrow to start at 0.5cm, then follows five 1cm arrows.}; \end{tikzpicture} \end{document} I don't think the following is the same as my case: Draw consecutive arrows with TikZ Generating Multiple Arrow Decorations in Series Here below is my attempt with decoration, but not what I want: \documentclass[tikz,border=6pt]{standalone} \usetikzlibrary{decorations.markings,arrows.meta} \tikzset{ multiarrow/.style={ decoration={ markings, mark=between positions 0.1 and 0.9 step 0.2 with { \draw[-Stealth,shorten >=1pt, shorten <=1pt] (-10pt,0) -- (10pt,0); % the gap here not what I want... and hard to control the `0.1 and 0.9 step 0.2' } }, postaction=decorate } } \begin{document} \begin{tikzpicture} \path[multiarrow] (-2,-3) -- (2,-3); % good! \path[multiarrow,yshift=-1cm] (-2,-3) -- (2,-3)-- (5,-2); % not good! % \draw[multiarrow] plot[ % domain=-5:5, % samples=160, % smooth, % variable=\x % ] ({\x},{sin(\x r)}) % -- (5,-2) % -- (-5,-2) % -- cycle; \end{tikzpicture} \end{document} I want every arrow to be, says, fixed, 1cm length, shorten 1pt of both sides, for example of the closed path, I want something as below: (Quite sure that may be duplicated post, but I can't find that...) More information of the original purpose: \documentclass[tikz,border=5pt]{standalone} \usepackage{fourier} \usetikzlibrary{bending,decorations.pathmorphing} \begin{document} \begin{tikzpicture}[>=latex,line join=round,line cap=round] \draw[semithick,->] (0,0) -- (-1,0) node[below] {$y$}; \draw[semithick,->] (0,0) -- (0,-3) node[right] {$x$}; \draw[thick] (-110:2.5) -- node[left=5pt] {$q$} (0,0) node[above] {$O$} -- node[right=5pt] {$q$} (-70:2.5); \def\tmp{\fpeval{2.5*sind(20)}} \draw[thick, decorate, decoration={random steps, segment length=1pt, amplitude=.75pt}] (-110:2.5) arc[start angle=-110, end angle=-70, radius=2.5]; \foreach \i in {1,...,5}{ \draw[->,shorten <=1.5pt] (-.1,0) ++(-110:{(\i-1)*0.5}) -- ++(-110:0.5); \draw[->,shorten <=1.5pt] (+.1,0) ++(-70:{(\i-1)*0.5}) -- ++(-70:0.5); } \end{tikzpicture} \end{document} I use the code above to plot the following: I found that quite difficult to decide the (-.1,0) and ++(-110:{(\i-1)*0.5}) -- ++(-110:0.5) here, I want "extend the decoration path with multiple arrows" and put it together with the offset trick...

  • Advice for TeX Live installation and post-installation actions in a multi-user system
    by Snowrabbit on May 22, 2026 at 1:34 pm

    We will have a later version of TeX Live installed in a multi-user system (Linux). The system is a bit special in the sense that no updates will be made once the installation is complete (good or bad is debatable, but it is what it is). Users have read-only file permission to the installation. Any additions that a user wishes, they can make locally. Beyond what is mentioned in the TeX Live Guide, are there any more tips and recommendations for installation and post-installation actions? TeX Live updmap and fmtutil are generally recommended to have in system mode. But for a installation that will not receive updates, is it better to have these in user mode? The non-system variables in texmf.cnf TEXMFHOME = ~/texmf TEXMFVAR = ~/.texliveYYYY/texmf-var TEXMFCONFIG = ~/.texliveYYYY/texmf-config The non-system variables in texmfcnf.lua TEXMFHOME = "home:texmf", TEXMFVAR = "home:texmf/texmf-var", TEXMFCONFIG = "home:texmf/texmf-config",

  • Custom acronym capitalisation using glossaries-extra?
    by amdnim on May 22, 2026 at 12:48 pm

    I'm using the glossaries-extra package for acronyms, and am using it like so to have it in lowercase in text and titlecase in the glossary: \setabbreviationstyle[acronym]{long-short} \glssetcategoryattribute{acronym}{glossdesc}{title} \MFUhyphentrue And this works great. My issue is with an "irregular" acronym like XML (eXtensible Markup Language), or FLOP (FLoating point OPerations) where titlecase isn't enough. Is it possible to have custom titlecase for specific acronyms in the glossary? Failing that, is it possible to disable the titlecase for specific acronyms?

  • How to specify date-written and date-published in biblatex
    by Frisket on May 22, 2026 at 12:05 pm

    What is the best way to encode (for example) an entry from a diary which has been published in book form centuries later? At the moment, it seems the standard styles are unable to handle this, eg: @incollection{pepys-early, author={Samuel Pepys}, title={Up by candlelight}, date={1666-01-02}, booktitle={Pepys' Diary}, year={1928}, editor={A N Other}, publisher={George Morrow}, location={Edinburgh} } This generates the message WARN - Overwriting field 'year' with year value from field 'date' The origdate field is unsupported in the standard styles, it seems. How do others handle the modern publication of old writings, poems, letters, articles, etc with this kind of date disparity?

  • A \bigboxtimes symbol?
    by M.G. on May 22, 2026 at 11:45 am

    The tensor product symbol \otimes comes with a big version \bigotimes. Then there is also the external / box product symbol \boxtimes, however it doesn't come with a big version unlike the tensor product. Is there a way to get a big version of \boxtimes, e.g. \bigboxtimes, that behaves similarly to the good ol' \bigotimes in math mode? Here is a MWE with the symbol packages in use: \documentclass[11pt,a4paper,twoside]{report} \usepackage[utf8]{inputenc} \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsthm} \usepackage{latexsym} \usepackage{mathtools} \usepackage{mathrsfs} \usepackage{graphicx} \usepackage{gensymb} \usepackage{tikz} \usetikzlibrary{calc} \usepackage{tikz-cd} \usepackage{mathcomp} \begin{document} Here are the three products in display math mode: \[ \otimes,\bigotimes,\boxtimes \] \end{document} Here is a comparison between \bigboxtimes from kabenyuk's solution and \bigotimes: I feel like typographically it would more aesthetic if \bigboxtimes were a little smaller due to the fact that it's a square. I think the right size comparison should be that both inside crosses should be of equal size.

  • How to create this table on every page?
    by Bakamashine on May 22, 2026 at 11:28 am

    Sorry, my Latex skills and English are bad. My college requires me to put this table on every page. Please help me, I don't know how to resolve this. Table example: My table: My code: \RequirePackage{array} \RequirePackage{tabularx} \RequirePackage{geometry} \RequirePackage{eso-pic} \geometry{ a4paper, left=25mm, right=15mm, top=25mm, bottom=25mm } \usepackage{tabularx} \usepackage{multirow} \newcommand{\BackgroundTopTable}{% \begin{tabularx}{\textwidth}{|c|c|c|c|c|X|c|} \hline & & & & & \multirow{3}{=}{\centering 09.02.07 Ф 2484 25 КП-ПЗ} & \multirow{2}{2em}{\centering Page} \\ \cline{1-5} & & & & & & \\ \cline{1-5}\cline{7-7} Изм. & Page & № Document. & Signature & Date & & \thepage \\ \hline \end{tabularx} } \AddToShipoutPictureBG{% \AtPageLowerLeft{% \raisebox{20mm}{% \makebox[\paperwidth]{% \hspace*{0mm}\BackgroundTopTable }% }% }% } My main.tex is default: \documentclass[a4paper, 14pt]{extarticle} \usepackage{gost} \usepackage{table} \begin{document} Hello world \end{document}

  • `colorlinks` URL loses color on page break inside footnote
    by user442187 on May 22, 2026 at 10:54 am

    When a \url{} command inside a footnote spans two pages, the link is correctly colored on the first page but appears black on the second page. The problem reproduces with pdfLaTeX, XeLaTeX, and LuaLaTeX. MWE: \documentclass[a4paper,12pt]{article} \usepackage[dvipsnames]{xcolor} \usepackage[colorlinks=true, urlcolor=blue]{hyperref} \usepackage{lipsum} \begin{document} \lipsum[1-4] \footnote{et avec beaucoup de blblaba avant et avec beaucoup de blblaba avant et avec beaucoup de beaucoup de blblaba avant et avec beaucoup de blblaba avant \url{https://www.une-url-tres-longue-qui-passe-sur-deux-pages.com/avec/un/chemin/tres/longne-url-tres-longue-qui-passe-sur-deux-pages.com/avec/un/chemin/tres/longne-url-tres-longue-qui-passe-sur-deux-pages.com/avec/un/}} \lipsum[6-7] \end{document} Environment: TeXLive 2026 Reproduces with pdfLaTeX, XeLaTeX, and LuaLaTeX hyperref (latest from TeXLive 2026) xcolor with dvipsnames Expected behavior: the URL should be rendered in blue on both pages. Observed behavior: the URL is blue on the first page, then turns black on the second page where the footnote continues. I also tried adding \DocumentMetadata{} before \documentclass (as suggested for the new LaTeX PDF management layer), but the problem persists. Is this a known limitation of hyperref? Is there a workaround short of preventing the URL from breaking across pages?

  • Can't change figure caption sizing when using \DocumentMetadata{}
    by Rachel Birchmier on May 21, 2026 at 9:48 pm

    I am trying to make captions smaller but since adding metadata for alt text use I cannot control the caption size! The document starts with this: \DocumentMetadata{} \documentclass[12pt]{report} and then I have the other packages including the tag PDF and caption parts of the pre-amble. I have tried them in different order and have tried putting the caption part basically everywhere, but the font is stuck at the default. %tag PDF \usepackage{tagpdf} \tagpdfsetup{ activate-all, uncompress, tabsorder=structure, nofloat=true } % Caption setup \usepackage{caption} \usepackage{subcaption} \captionsetup{ font=footnotesize, labelfont=bf } The goal would be to have small footnotsize captions while also being able to use alttext to describe figures. If I remove the \DocumentMetadata{} and tag PDF sections the captions fontsize can be changed by putting the caption block anywhere in the preamble.

  • Placement of wraptable under minipages
    by Martin on May 21, 2026 at 6:26 pm

    I have two minipages side by side (the left one being larger than the right one) and want to have a wraptable under the right one (of same width). If I do this, I have 2 problem: The wraptable is wider than the minipage if I specify the same width. Why is this the case? Since the left minipage is larger, there is space beneath the right minipage. I want the wraptable to begin right under the smaller minipage. How can I do this? (I have multiple such pages, where the size of the smaller minipage may vary. How can I get the wraptable to the correct space automatically, depending on the space available) MWE: \documentclass{report} \usepackage{showframe} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{lipsum} \begin{document}\noindent \begin{minipage}[t][][b]{0.65\textwidth} \includegraphics[width=\textwidth]{example-image-a} \end{minipage} \begin{minipage}[t][][b]{0.34\textwidth} \begin{tabular}{cc} aa&aa\\aa&aa\\aa&aa\\ \end{tabular} \includegraphics[width=\textwidth]{example-image-b} \end{minipage} \begin{wraptable}{r}{0.34\textwidth} \begin{tabular}{cc} aa&aa\\aa&aa\\aa&aa\\aa&aa\\aa&aa\\aa&aa\\aa&aa\\aa&aa\\aa&aa\\ \end{tabular} \end{wraptable} \lipsum[1] \end{document}

  • Is that possible to extend the path pattern decoration solution with `nfold` and `offset`?
    by Explorer on May 21, 2026 at 5:18 pm

    This post is partly the follow-up of my previous question and the samcarter's excellent answer based on the "wheel". However, I came across a more easy solution with nfolds and offset here. Unfortunely, I found it only work with closed path, but not an open one: % Source - https://tex.stackexchange.com/a/738063 \documentclass[tikz,border=5pt]{standalone} \usetikzlibrary{patterns,nfold} \makeatletter \tikzset{ remove inside/.code={% \tikzset{even odd rule}% \tikz@addmode{\pgfsyssoftpath@getcurrentpath\tikz@temp \pgfoffsetpath\tikz@temp{#1}}}} \makeatother \tikzset{ EDR/.style ={ line width=+1pt, preaction={remove inside=#13mm, fill=white},%<-add `fill=white' as preaction preaction={remove inside=#13mm, pattern=north west lines, pattern color=black!75} } } \begin{document} \begin{tikzpicture} \draw[thick,teal] (0,0) -- (10,4); \draw[EDR] (1,0) -- (4.5,1.5) -- (4,4) -- (1,3.5) -- (2.5,2) -- cycle; \draw[magenta,EDR=-] (5,0) rectangle (9,4) ; \draw[cyan,EDR] (6,1) rectangle (8,3); \end{tikzpicture} \begin{tikzpicture} \draw[EDR] (-3,0) -- (-1,0) -- (-1,2) -- (1,2) -- (1,0) -- (3,0); \draw[thick,teal] (-3,1) -- (3,1); \end{tikzpicture} \end{document} which gives: I wonder whether any extension could be added with the thought of nfold and \pgfoffsetpath?

  • LaTeX dash warnings and ISO8601 dates
    by ana on May 21, 2026 at 2:42 pm

    ISO 8601 dates are written as 2026-05-01. Using these dates in LaTeX generates errors of: Wrong length of dash may have been used. What is the solution to this? Suppress warning? Or use -- instead? Neither seems correct. -- Seems people need an example??? \documentclass{article} \begin{document} 2026-05-01 \end{document}

  • Can This Somewhat Long textnormal Title be Displayed Over Two Lines?
    by DDS on May 21, 2026 at 1:10 pm

    Consider the code: \documentclass[12pt]{book} \usepackage{bookman,scalerel} \textwidth=4.00in \begin{document} \thispagestyle{empty} \vstretch{2}{\textnormal{\Huge{{\bf CAN THIS SOMEWHAT LONG TITLE BE EASILY BROKEN?}}}} \end{document} which produces the output: QUESTION: How may I easily (without resorting to two separate such titles) break this \textnormal title into two pieces; say, "CAN THIS SOMEWHAT LONG TITLE" and "BE EASILY BROKEN?" with aesthetically sufficient vertical space between the two? Remark: Standard tricks such as vspace{8pt} or \\[8pt] do not work. Thank you.

  • How to avoid code duplication in path along with patterns?
    by Explorer on May 21, 2026 at 1:06 pm

    Here below is my original code: \documentclass[tikz,border=5pt]{standalone} \usepackage{fourier} \usetikzlibrary{bending,patterns.meta,angles,quotes} \begin{document} \begin{tikzpicture}[>=latex] \draw[thick,->] (0,0) -- (10,0) node[below] {$x$}; \draw[thick,->] (0,0) -- (0,-3) node[right] {$y$}; \draw[ultra thick] (7,2) -- (7,0) coordinate (A) -- (8,0) -- (8,-4) -- (7,-4) coordinate (B) -- (7,-6); %%%%%%%%%%%%%%%% path coordinate duplicated \fill[pattern={Lines[angle=-45,distance={5pt}]},preaction={fill=white}] (7,2) -- (7,0) -- (8,0) -- (8,-4) -- (7,-4) -- (7,-6) -- ++(.5,0) -- ++(0,+1.5) -- ++(1,0) -- ++(0,+5) -- ++(-1,0) -- ++(0,1.5) -- cycle; %%%%%%%%%%%%%%%% \draw(0,0) node[label={[label distance=-2.5mm]above left:$O$}] (O) {} -- (7,-4) pic[draw,<->,angle radius=2cm,angle eccentricity=1.15,"$\alpha$"] {angle = B--O--A}; \end{tikzpicture} \end{document} which gives: However, the path: (7,2) -- (7,0) -- (8,0) -- (8,-4) -- (7,-4) -- (7,-6) appeared twice, and I think that is duplicated. How to avoid and make the code more neater?

  • When are variables in texmfcnf.lua used as opposed to texmf.cnf in TeX Live?
    by Snowrabbit on May 21, 2026 at 11:16 am

    I am using lualatex in the TeX Live distribution to generate pdf-files. The TeX Live installation is in a multi-user computer system, where users of TeX Live have read-only file permission to the installation. I have noted two configuration files, ../texlive/YYYY/texmf.cnf and ../texlive/YYYY/texmfcnf.lua where I interpreted the latter to be a configuration file for lualatex (but maybe that's incorrect?). Both files contains variables like TEXMFHOME, TEXMFVAR, TEXMFCONFIG but they are set to different search paths. When I run lualatex it seem to use values from ../texlive/YYYY/texmf.cnf and not the lua-file. When are the variables set in ../texlive/YYYY/texmfcnf.lua used? Is there a precedance order to use variables from ../texlive/YYYY/texmf.cnf and ../texlive/YYYY/texmfcnf.lua, for example if TEXMFVAR is not in the first file use it from the latter when lualatex run? Recommended reading about texmfcnf.lua?

  • Passing string from class option then using the string to load the corresponding key set
    by myhsia on May 21, 2026 at 10:09 am

    I configured a set of choices mode: {fooa, foob, bar}, which will be loaded as the class option. I also configured 3 set of keys: { fooa / set }, { foob / set }, { bar / set }. My goal is that when loading the class option, the string \g_classoption_mode_str will be set as the value of the key mode, then, the macro \docset #1 will execute \keys_set:nn { \g_classoption_mode_str / set } {#1}. For example, if I write \documentclass[mode = foob]{mycls} Then, \docset{} will load the key set: { foob / set }. The following is my MWE: In mycls.cls: I've assigned different initial values for the test -> \testtl key. \ProvidesExplClass {mycls} {2026-05-21} {v0.0.1} {} \str_new:N \g_classoption_mode_str \keys_define:nn { classoption } { mode .choices:nn = { fooa, foob, bar } { \exp_args:Ne \AtEndOfClass { \str_gset_eq:NN \g_classoption_mode_str \l_keys_choice_str } }, mode .initial:n = { fooa }, } \keys_define:nn { fooa / set } { test .tl_set:N = \testtl, test .initial:n = { fooa }, } \keys_define:nn { foob / set } { test .tl_set:N = \testtl, test .initial:n = { foob }, } \keys_define:nn { bar / set } { test .tl_set:N = \testtl, test .initial:n = { barr }, } \ProcessKeyOptions [ classoption ] \LoadClass { article } \DeclareDocumentCommand \docset { m } { \keys_set:nn { \g_classoption_mode_str / set } {#1} } In test.tex: \documentclass[mode = bar]{mycls} \docset{} \begin{document} \testtl 1 \end{document} Under this MWE, I hope \testtl will output fooa if the class option is mode = fooa, foob if the class option is mode = foob, bar if the class option is mode = barr. But the MWE returns the error: Missing control sequence inserted. <inserted text> Update: 2026-05-21 If I remove the line in .cls \exp_args:Ne \AtEndOfClass The error disappeared. But the output isn't right, if I type \documentclass[mode = fooa]{mycls} \testtl will output barr.

  • Background picture for part page
    by Martin on May 20, 2026 at 9:07 pm

    I want to add a background picture for the page(s) that get created for using the \part command. But when I do this, the picture instead goes to the next side and not to the part page. How can I get the picture to the correct page? MWE: \documentclass{report} \usepackage{tikz} \usepackage[newparttoc]{titlesec} \usepackage{titletoc} \usepackage{tocloft} \titleformat{\part}[display]{\Huge\scshape\filright\centering}{}{20pt}{\thispagestyle{empty}} \titlecontents{part}[0pt]{\addvspace{2pc}\centering\large\bfseries}{}{}{} \begin{document} \part{A}\tikz[remember picture, overlay] \node[opacity=0.3, inner sep=0pt] at (current page.center){\includegraphics[width=\paperwidth, height=\paperheight]{example-image-a}}; \part{B}\tikz[remember picture, overlay] \node[opacity=0.3, inner sep=0pt] at (current page.center){\includegraphics[width=\paperwidth, height=\paperheight]{example-image-b}}; \end{document}

  • expanding an argument to control case in \href
    by troy on May 20, 2026 at 5:31 pm

    I see that there some questions and answers related to expanding arguments, but I just don't seem to get it. I'm writing a document in which I'd like to include hyperlinks to our institutional website. I want a macro like \mcmd{Opt}{report} that expands to \href{https://foo.com/extra/ui/command/Opt/ReportCmd.html}{\texttt{Opt.report}}. The problem I'm having is all about transforming "report" into "Report". I'm using the \mdoc macro for other links. Here's my MWE: \documentclass{article} \usepackage{mfirstuc} \usepackage{hyperref} \newcommand{\varn}[1]{\texttt{#1}} \newcommand{\mdoc}[2]{\href{https://foo.com/extra/#1}{#2}} \newcommand*{\mcmd}[2]{\mdoc{ui/command/#1/#2Cmd.html}{\varn{#1.#2}}} \newcommand*{\mcmdu}[2]{\mdoc{ui/command/#1/\makefirstuc{#2}Cmd.html}{\varn{#1.#2}}} \begin{document} \mcmd{Opt}{report} \mcmdu{Opt}{report} \end{document} but \mcmd{Opt}{report} gives me "\href{https://foo.com/extra/ui/command/Opt/reportCmd.html}{\texttt{Opt.report}}". I want "Opt/reportCmd.html" to be "Opt/ReportCmd.html" but "Opt.report" to stay as is. I've tried using \makefirstuc in my \mcmdu macro, but it's not expanding the way I need it to. \mcmdu{Opt}{report} seems to give me \href{https://foo.com/extra/ui/command/Opt/%5Cmakefirstuc%2520%7Breport%7DCmd.html}{\texttt{Opt.report}} I get the impression that this is easier in LaTeX3. While I need to spend some hours learning LaTeX3, I welcome solutions using LaTeX3 or LaTeX2e. I'm happy to have anything that works 🙂 EDIT 5/20: I absentmindedly left out that I need this to preserve case after the first character (for camel-case inputs): \mcmd{Opt}{initCov} should return \href{https://foo.com/extra/ui/command/Opt/InitCovCmd.html}{\texttt{Opt.initCov}}

  • How can I run this hello world C code from TeX using Lua's ffi?
    by Jasper on May 20, 2026 at 12:49 pm

    How can I run this hello world C code from TeX using Lua's ffi? See https://luajit.org/ext_ffi.html Edit: This problem was produced on Windows 11. I solved it by using Linux, as was suggested in an answer. \documentclass{article} \usepackage{luacode} \begin{document} \begin{luacode*} local ffi = require("ffi") ffi.cdef[[ int printf(const char *fmt, ...); ]] ffi.C.printf("Hello %s!", "world") \end{luacode*} Test \end{document} (./test.aux)[\directlua]:5: failed to find function/global printf stack traceback: [C]: in metamethod '__index' [\directlua]:5: in main chunk. \luacode@dbg@exec ...code@maybe@printdbg {#1} #1 } l.10 \end{luacode*}

  • Defining a detailed operational amplifier subcircuit (with input/output anchors) in circuitikz
    by Marco Moldenhauer on May 20, 2026 at 12:45 pm

    I am trying to create an electrical circuit symbol motivated by the textbook Engineering Circuit Analysis (Edition 8, Hayt, Page 192, Figure 6.24). Here is the reference image of what I am trying to achieve: I want to define this into a new symbol in circuitikz. Ideally, I am looking for an elegant way to define this with three main anchor points: NodePlus, NodeMinus, and NodeOut. What is the best/most elegant way to wrap this drawing into a reusable component where I can easily connect wires to the three defined input/output nodes? my code \documentclass{article} \usepackage{circuitikz} \begin{document} \begin{circuitikz}[european] \node (NodeMinus) at (0,0) {}; \node (NodePlus) at (0,3) {}; \node (NodeOut) at (6,1.5) {}; %% input resistor \draw(NodeMinus.center) node[above]{$-$} to[short, o-] ++(1,0) node[below]{$-$} to[R, l_=$R_i$] (1,3) node[above]{$+$} to[short, -o] (NodePlus.center) node[below]{$+$}; %% input voltage label \path(NodeMinus.center) -- (NodePlus.center) node[midway]{$v_d$}; %% output voltage source and output resitor \draw(NodeOut.center) to[short, o-] ++(-1,0) -- ++(0,1) to[R,l_=$R_o$] ++(-2,0) to[american controlled voltage source, l=$A\cdot v_d$] ++(0,-2.5) node[ground]{}; \end{circuitikz} \end{document} my output THANKS to the community (here my final solution) \documentclass{article} \usepackage{circuitikz} \usetikzlibrary{tikzmark} \begin{document} \tikzset{pics/myOA/.style={ code={ \coordinate (-NodeMinus) at (-.5,0) {}; \coordinate (-NodePlus) at (-.5,2) {}; \coordinate (-NodeOut) at (6.5,1) {}; %% input resistor \draw(-NodeMinus.center) node[above]{$-$} to[short, o-] ++(1.5,0) node[below]{$-$} to[R, l_=$R_i$] (1,2) node[above]{$+$} to[short, -o] (-NodePlus) node[below]{$+$}; %% input voltage label \path(-NodeMinus) -- (-NodePlus) node[midway]{$v_d$}; %% output voltage source and output resitor \draw(-NodeOut.center) to[short, o-] ++(-2.2,0) -- ++(0,0.65) to[R,l=$R_o$] ++(-1.8,0) to[american controlled voltage source, name=VCVS] ++(0,-1.7) node[ground]{} (VCVS) node[right=6pt,yshift=-10pt] {$A\cdot v_d$}; %% equilateral triangle, adjust it \draw (0.5,-2) -- (0.5,4) -- ({0.5+3*sqrt(3)},1) -- cycle; } } } \begin{circuitikz}[european] \draw (0,0) pic(detailedOpAmp){myOA}; \draw[red] (detailedOpAmp-NodeOut) -- ++(1,-1); \draw[red] (detailedOpAmp-NodePlus) -- ++(-1,1); \draw[red] (detailedOpAmp-NodeMinus) -- ++(-1,-1); \end{circuitikz} \end{document}

  • How to make tikzcd diagram possible [closed]
    by Hamza Ayub on May 19, 2026 at 7:30 pm

    I’ve been trying to make this image in LaTeX, but I’m not able to replicate it at all. The uppermost and lowermost down-arrow are becoming super squished. Any help in reproducing it would be really appreciated. Thank you. Edit: here is the code I used and by super squished i mean the downarrow is not visible as you can see by running the code... \[ \begin{tikzcd}[column sep=huge] \mathcal{C} \arrow[r, bend left=80, "I\circ F"{name=IF}] \arrow[r, bend left=40, "J\circ F"{name=JF}] \arrow[r, "J\circ G"{inner sep=0,fill=white,anchor=center,name=JG}] \arrow[r, bend right=40, "K\circ G"'{name=KG}] \arrow[r, bend right=80, "K\circ H"'{name=KH}] \arrow[from=IF.south-|JG,to=JF.north-|JG,Rightarrow,shorten=4pt,"\gamma F"] \arrow[from=JF.south-|JG,to=JG,Rightarrow,shorten=4pt,"J\alpha"] \arrow[from=JG,to=KG.north-|JG,Rightarrow,shorten=4pt,"\delta G"] \arrow[from=KG.south-|JG,to=KH.north-|JG,Rightarrow,shorten=4pt,"K\beta"] & \mathcal{E}. \end{tikzcd} \] this is the ususal procedure i use when there are less arrows (inspired by an answer which i cannot recall whome) and it works but it does not for this.

  • Line across sphere
    by Sokoban on May 18, 2026 at 12:21 pm

    I am currently solving some Putnam problems for fun, and I wanted to visualize a few geometry questions. One exercise goes as follows: Let S be a spherical cap, where the distance between two points is given by the length of the shortest great-circle arc. Then there is no distance-preserving mapping to the Euclidean plane. I solved the exercise (which is not particularly difficult), and now I want to visualize the cap. I managed to draw almost everything except the distance between the north pole and a point on the rim of the cap. This is what I have so far: \documentclass{article} \usepackage{graphicx} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=3] \draw (0,0) circle (1); \draw[thick] (-1,0) arc (180:360:1 and 0.28); \draw (-1,0) arc (180:0:1 and 0.28); \draw[dashed] (-0.85,0.5) arc (180:360:0.85 and 0.18); \draw[dashed] (-0.85,0.5) arc (180:0:0.85 and 0.18); \fill (0,1.) circle (0.015); \node[right] at (0,1.1) {$N$}; \fill (0,0.5) circle (0.015); \node[left] at (0,0.5) {$O$}; \coordinate (P) at (0.85,0.5); \fill (P) circle (0.015); \draw[thick] (0,0.5) -- (P); \node[above] at (0.4,0.5) {$r$}; \node[blue,right] at (0.45,0.93) {$R$}; \node[left] at (-0.88,0.55) {$C$}; \end{tikzpicture} \end{document} What is still missing is a spherical arc from the north pole to the rim. However, I would like it to appear three-dimensional, rather than like the current 2D curve, but instead more like this: I tried my best, but I have no idea how to achieve this. Can someone help me? Also, I think I only need the spherical cap itself, not the entire sphere.

  • Why are `{` and `}` printed as `-` and `"` instead of as themselves when their category codes are changed to normal letters?
    by H4XeO6 on May 18, 2026 at 2:22 am

    Here is my minimal example (main.tex): \catcode`\{=11 \catcode`\}=11 hello}{ \bye I compiled it with tex main && dvipdfmx main.dvi and obtained main.pdf, which contains a single page printed as hello˝–. Actually, the issue could fixed up when I switch to a typewriter font: \catcode`\{=11 \catcode`\}=11 \tt hello}{ \bye Why does the default font produce this unexpected output? What is the underlying reason?