• Reference order [closed]
    by Rajasekar on January 12, 2026 at 6:25 am

    Using flushend package to balance the spread in two column paper; in some articles, the references in the very last column is not coming in correct order. That is, in the place of #35, 38 is priting at the top, then remaining references printing in correct order. If we give columnbreak before, it comes correct. Please suggest any solution to correct this.

  • How to properly induce a forced page break in `longtblr`
    by Subhajit Paul on January 12, 2026 at 6:05 am

    I want to force a page break within a longtblr environment. The documentation states that this can be done using the \pagebreak command; however, when I do so, the contfoot-text is not applied. How can I force a page break while still preserving the contfoot-text? The following MWE demonstrates my exact use case and explains the motivation for enforcing a page break. \documentclass[a5paper]{article} \usepackage[margin=2in, includeheadfoot]{geometry} \usepackage[table]{xcolor} \usepackage{tabularray} \DeclareTblrTemplate{contfoot-text}{mystyle}{\small\itshape Continued on next page\textellipsis} \SetTblrTemplate{contfoot-text}{mystyle} \DeclareTblrTemplate{conthead-text}{mystyle}{(\emph{Continued})} \SetTblrTemplate{conthead-text}{mystyle} \begin{document} \begin{longtblr} [ caption={Long table} ] { colspec = {X[l,m] Q[l,m,0.5\linewidth]}, row{1} = {c,m,bg=gray,font=\bfseries}, column{1} = {font=\bfseries}, rowhead = {1}, hlines, vlines, } A & B \\ \SetCell[r=10]{l,m}Merged 1 & R1\\ & R2\\ & R3\\ & R4\\ & R5\\ & R6\\ & R7\\ & R8\\ & R9\\ & R10\\\pagebreak \SetCell[r=10]{l,m}Merged 2 & R1\\ & R2\\ & R3\\ & R4\\ & R5\\ & R6\\ & R7\\ & R8\\ & R9\\ & R10 \end{longtblr} \end{document} A hack is given in this answer. However, I will wait for any better alternative.

  • Cyrillic script letter el with tail
    by moorooduc on January 11, 2026 at 11:19 pm

    I am trying to typeset a text in the Khanty language, whose orthography uses the Cyrillic script. I know how to make Cyrillic script work in the book project, but Khanty has the letter Ӆ ӆ (that's a Cyrillic "l" with a tail: https://en.wikipedia.org/wiki/El_with_tail). I don't find a way to typeset this correctly. Does anyone have advice?

  • Suble change in header on last overlay of every frame
    by scottkosty on January 11, 2026 at 10:55 pm

    It is often useful to know when I'm on the last overlay of a frame (i.e., when the next overlay will be on a different frame). I use miniframes, and one idea for a subtle change is to have the "current dot" turn from black to light grey. However, I'm open to other ideas. Related threads: Signaling the last overlay in a beamer frame shows how to make a change in the footer. Lightweight change to beamer font/colors mid-frame shows how to change the page style. Here is an example of the Beamer style I am using. There is some complicated code in it which collapses the miniframes to be on the same line as the section names (to reduce vertical space). In the example I use "hint" to mean that when that text is shown, that's when the miniframes should have a subtle change so that I can know I'm on the last overlay. \documentclass{beamer} \beamerdefaultoverlayspecification{<alert@+|+->} \usecolortheme{crane} \useoutertheme[ subsection=false ]{smoothbars} %%%%% % this code changes the miniframe dots to be on the same line as the section name, to save vertical space: % https://tex.stackexchange.com/questions/88182/beamer-miniframes-side-by-side-section-names-and-navigation-dots \usepackage{etoolbox} \makeatletter \patchcmd{\slideentry}{\advance\beamer@tempdim by -.05cm}{\advance\beamer@tempdim by\beamer@vboxoffset\advance\beamer@tempdim by\beamer@boxsize\advance\beamer@tempdim by 1.2\pgflinewidth}{}{} \patchcmd{\slideentry}{\kern\beamer@tempdim}{\advance\beamer@tempdim by 2pt\advance\beamer@tempdim by\wd\beamer@sectionbox\kern\beamer@tempdim}{}{} \makeatletter % reduce margin between dots and frame title \setbeamertemplate{frametitle}{% \vspace*{-0.6ex}% <- make more negative to pull title upward \begin{beamercolorbox}[wd=\paperwidth,ht=2.3ex,dp=1.0ex,leftskip=1em]{frametitle}% \usebeamerfont{frametitle}\insertframetitle \end{beamercolorbox}% } %%%%% \begin{document} \section{Summation operator and the mean} \begin{frame} \begin{itemize} \item On the overlay introducing this item, the hint should not show, since there are more overlays left in this frame. \item This one is also not the last. \item This is the last overlay of the frame. Show the hint. \end{itemize} \end{frame} \begin{frame} \begin{itemize} \item another frame just for testing. \item On the overlay introducing this item, I also want the hint since it is the last overlay of the frame as well. \end{itemize} \end{frame} \end{document}

  • ConTeXt: Spacing between main text body and footnote(s) area
    by Jeff Dodson on January 11, 2026 at 10:55 pm

    This might be something that's simple, and I'm making it difficult. But I'm struggling with it, so I thought I'd post here (I didn't see a similar question posted). I've got a ConTeXt project where I'm showing two separate footnote apparatuses. One apparatus, called "appnote," is the main apparatus. There's a second apparatus called "marginal" that, if it appears on a given page, will display above the apparatus named "appnote". Depending on the particular page, you might have no apparatuses show up (if there's no notes), one apparatus show up, or both show up. I always want a horizontal rule to be displayed between the main text body and the footnote area. And if both apparatuses show up, I'd like the two apparatuses to also be separated from each other with a horizontal rule. These horizontal rules should be the width of the entire text area. So here's my question: If you are typesetting on a grid under the above conditions, what is the proper way to ensure that whichever apparatuses shows up are separated from each other and the main text body properly? I'm assuming that some sort of logic might be necessary, because if both apparatuses show up, it's the top apparatus that needs spacing between itself and the main text body. Whereas if only the lower apparatus shows up, it would need that extra spacing between itself and the main text body. Here's the code I have as a working sample: \definepapersize[Trade][width=6in, height=9in] \setuppapersize[Trade] \setupinterlinespace[line=15pt] % Set up a two-sided layout \setuppagenumbering[alternative=doublesided, location={bottom, middle}] % Set up a geometry for our main body that is grid-based. \setuplayout[ grid=yes, % Layout on a grid % ------------------------------------------------------------------- backspace=0.75in, % 0.75in inner margin cutspace=1in, % 1in outer margin width=middle, % Text width (6in - (0.75in + 1in) = 4.25in) % ------------------------------------------------------------------- topspace=45pt, % 3 lines above the header header=15pt, % 1 line header headerdistance=15pt, % 1 line between the header and the body % ------------------------------------------------------------------- lines=34, % 34 lines of text (34 * 15 = 510) % ------------------------------------------------------------------- footerdistance=15pt, % 1 line between the body and the footer footer=15pt, % 1 line footer bottomspace=33pt, % Remainder to fill 9in (648 - other = 33) ] \definenote[marginal][way=bypage, location=page] \setupnotation[marginal][number=yes, alternative=serried] \setupnote[marginal][ grid=yes, rule=off, location=page, before={\blank[7.5pt]\blackrule[width=\textwidth,height=0.4pt]\blank[3.75pt]}, width=\textwidth, paragraph=yes, alternative=serried, bottom={\ifnotes\blank[none]\fi}, inbetween={\hskip .5em plus .2em minus .1em}, style={\switchtobodyfont[9pt]}, indenting=no ] \definenote[appnote][way=bypage, location=page] \setupnotation[appnote][number=yes, alternative=serried] \setupnote[appnote][ grid=yes, rule=off, location=page, before={\blank[7.5pt]\blackrule[width=\textwidth,height=0.4pt]\blank[3.75pt]}, width=\textwidth, paragraph=yes, alternative=serried, inbetween={\hskip .5em plus .2em minus .1em}, style={\switchtobodyfont[9pt]}, indenting=no ] \showgrid \starttext Lorem ipsum dolor sit amet consectetur\appnote{This is note number one.} adipiscing elit. Quisque faucibus ex sapien vitae\appnote{This is note number two.} pellentesque sem placerat. In id\appnote{This is note number three.} cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia. Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos. Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos. Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubianubiotopia. Now is the time for all good men. \stoptext If both apparatuses show up, the main text body is always separated from the footnote area by at least 1/2 of a grid line. However, as shown in the image below, the sample demonstrates that if only one apparatus appears on a page, there are cases where there's no separation at all between the main text body and the footnote area. This is the problem I'm trying to solve. On most pages, there does end up being a decent buffer of one line between the main text body and the footnote area. However, the above sample demonstrates what happens at times: There's no distance at all between the main text and the footnote area. So to repeat the question above: If I have multiple apparatuses, which can either not show up, or show up in various combinations, how can I ensure that uniform spacing occurs between each apparatus and between the top apparatus and the main text body? Note also that the sample here does define the "marginal" apparatus, but doesn't show any notes from it. You can easily add "marginal" notes to the sample code, but I didn't include any here because the problem only occurs when one apparatus appears.

  • Why is my pgffor loop not iterating as expected? \foreach \i[parse=true] in {0,pi/18,...,2*pi-pi/18} {works \i\\}
    by Jasper on January 11, 2026 at 10:47 pm

    Why is my pgffor loop not iterating as expected? \documentclass{article} \usepackage{pgffor} \begin{document} \foreach \i[parse=true] in {0,pi/18,...,2*pi-pi/18} {works \i\\} \end{document} It only prints the first two elements of the sequence, but not the rest. It does however work when I evaluate the numbers first: \documentclass{article} \usepackage{pgffor} \usepackage{pgfmath} \begin{document} \pgfmathsetmacro{\a}{pi/18} \pgfmathsetmacro{\b}{2*pi-\a} \foreach \i[parse=true] in {0,\a,...,\b} {works \i\\} \end{document} I would expect parse = true to do this for me. Am I mistaken?

  • Add DOIs to all references list easily [closed]
    by Umar Hussain on January 11, 2026 at 9:11 pm

    I have published an R Package, 'DOIcreator' and it's shinyapp for non- R users. Package:https://cran.r-project.org/web/packages/DOIcreator/index.html App:https://umarhussain.shinyapps.io/doiapp/ UMAR HUSSAIN

  • tikz: using the pos key to place nodes along a plot
    by Jasper on January 11, 2026 at 7:39 pm

    In this tikz MWE, why is the node placement not even close to pos=0.7 on a plotted curve? \documentclass[tikz,border=1cm]{standalone} \begin{document} \begin{tikzpicture} \draw[ domain = 0:2, samples = 100, variable = \y ] plot (\y*\y,\y) node[pos = 0.7, above left] {\(x=y^2\)} ; \end{tikzpicture} \end{document}

  • Problem with \ifx
    by user209882 on January 11, 2026 at 6:32 pm

    \def\drawDSID#1#2{ \def\trP{#2}\def\rpT{R}\def\trV{\ifx{\trP}{\rpT}3\else2\fi} \trV} The result is always 2, irrespective of #2, eg \drawDSID{(0,-7)}{R};

  • Creating a CircuiTikz custom voltage source component/style with a plus sign for polarity
    by MatG on January 11, 2026 at 6:24 pm

    In certain contexts (italian schools) an ideal DC voltage source is represented by the symbol in this circuit: \documentclass{standalone} \usepackage{circuitikz} \begin{document} \begin{circuitikz} \draw (0,0) to[V,a^=V1,name=VS] (0,4); \node[above left,inner sep=1pt] at (VS.e) {$+$}; \draw (0,0) to[V,a=V2,name=VS] (4,0); \node[above right,inner sep=1pt] at (VS.e) {$+$}; \draw (4,4) to[V,a=V3,name=VS] (0,4); \node[below left,inner sep=1pt] at (VS.e) {$+$}; \draw (4,4) to[V,a^=V4,name=VS] (4,0); \node[below right,inner sep=1pt] at (VS.e) {$+$}; \end{circuitikz} \end{document} This is the symbol I want. Unfortunately, drawing circuits like this is rather cumbersome, so I’m wondering whether it would be possible to define a CircuiTikz style or a custom component that produces the symbol in a more natural way. I’m not a TikZ expert, and I struggle with the part of the documentation that explains how to create new components. I’m aware of existing questions such as: Adding a plus sign in a circuit diagram Including +/- signs to battery in Circuitikz But the answers there didn't help me. I also had no luck with AI tools, so I’m hoping someone with more experience in CircuiTikz and TikZ can offer some guidance.

  • circuitikz: 'draw=none' for a electrical symbol
    by cis on January 11, 2026 at 4:58 pm

    If I use color=white, the resistor R wouldn't be visible unless I added a colored background. Out of theoretical interest: Is there a way to pass the resistor with something like draw=none, so that it isn't drawn? (The rest should be drawn as before.) \documentclass[margin=5pt, multi=circuitikz]{standalone} \usepackage{circuitikz} \usetikzlibrary{backgrounds} \begin{document} \begin{circuitikz}[european resistors, background rectangle/.style={draw=none, fill=gray!25, rounded corners}, show background rectangle, ] \draw[] (0,0) to[L=L] (2,0) to[R=R](4,0); \draw[yshift=-12mm] (0,0) to[L=L] (2,0) to[R=R, color=white](4,0); \end{circuitikz} \end{document}

  • TeXStudio 4.9.1 with strange behaviour
    by Thomkrates on January 11, 2026 at 4:53 pm

    When using TexStudio 4.9.1, which I today have downloaded and installed, there is a strange behaviour when compling with LuaLaTeX. I installed the newest version, since this behaviour has been found the foremost version 4.8.7. Klicking in the menu LuaLteX, compling is starting with pdfLaTex and runs after that lualatex, but gives me an error that LuaLaTex is needed in my source. My source seems correct, since a small MWE works well with LuaLaTeX compiling. I have checked the run settings in the menu, but they are correct, as usual. Does anybody know what can be wrong? And how to fix this?

  • How to patch texlive including pythontex
    by user2609605 on January 11, 2026 at 6:14 am

    The application pythontex is very important for me, it is still maintained but activity became low a bit so you cannot get quick solution. So I ask for a quick fix. For python 3 it seems to be a wrapper around pythontex3.py. As python changes, the original pythontex3.py needs more and more patches. Don't be shocked, I just overwrote the original by a script. Now i found out that this is not state of the art. I need not patch directly in texmf-dist but in texmf-local. Ok, I patched some packages also and this seems to work. But with pythontex it does not. Still the original pythontex3.py in texmf-dist is used although the one in texmf-local is present also. For packages texmf-local takes priority over texmf-dist. But for python scripts I cannot figure out the mechanism that determine the one that it is used. Please help. I want to solve my problem but also understand the techniques.

  • label referencing problem in tcolorbox
    by mmjt on January 11, 2026 at 5:38 am

    I am trying to use tcolorboxes to highlight exercises in a math tutorial (book document class) for a course I teach. I use a \label in the box hoping to reference the exercise by number in the solutions manual. However, the label does not "attach" to the colorbox; instead it returns the section number. Thus, Exercise "17" is referenced as "2.2.3" because that is the chapter section it is in. This behavior is different to that of a normal LaTeX environment and I am going in circles trying to resolve the issue. The tcolorbox manual is very detailed, but I cannot sort out this (seemingly) simple issue. What I want to accomplish is this: (1) create a box and put a \label{mylabel} in it. (2) \ref{mylabel} returns the box (exercise) number. (3) I want to reset the box numbering at the start of each chapter, with no "cross-talk" between the similarly numbered boxes in each chapter. I hope somebody can help restore my sanity and reveal the secret to doing this! Here is a MWE: \documentclass{article} \usepackage{tcolorbox} \tcbuselibrary{most} \begin{document} \section{Introduction} This document contains labeled tcolorboxes in Section \ref{sec:example}. The first box is numbered as \ref{box:label1}. \section{An Example Section} \label{sec:example} \newcounter{myboxcounter} \newtcolorbox[auto counter]{mybox}[1][]{ enhanced, colback=blue!5!white, colframe=blue!75!black, fonttitle=\bfseries, before title={\refstepcounter{myboxcounter}}, title={Exercise~\arabic{myboxcounter}\ifx#1\empty\else\ (#1)\fi}, fonttitle=\bfseries, breakable } \begin{mybox}[] \label{box:label1} This is box \ref{box:label1}. \end{mybox} \begin{mybox}[] \label{box:label2} This is box \ref{box:label2}. \end{mybox} \subsection{An Example Section} \begin{mybox}[] \label{box:label3} This is box \ref{box:label3}. The first two are boxes \ref{box:label1} and \ref{box:label2}. \end{mybox} \end{document}

  • How get ISO math style with lua-unicode-math package?
    by murray on January 11, 2026 at 12:26 am

    The commented-out line in the source below, if used instead of the line preceding it, produces ISO-style for upper-case Greek math letters, namely, Italic insead of upright. How does one get the same result with lua-unicode-math instead of just unicode-math? % !TEX program = lualatex \NeedsTeXFormat{LaTeX2e}[2025-11-01] \documentclass{article} \usepackage{fontspec,lua-unicode-math} %\usepackage[math-style=ISO]{unicode-math} % Italic upper-case Greek math \defaultfontfeatures{Scale=MatchLowercase, Ligatures=TeX} \setmathfont{STIX Two Math}[Scale=MatchUppercase,math-style=ISO] \begin{document} $a, z, B, X, \quad \alpha, \beta, \Gamma, \Xi $ \end{document}

  • tex4ht does not create local TOC when using starred version of sectioning with an explicit \addcontentsline
    by Nasser on January 11, 2026 at 12:01 am

    setup: I wanted to make all my sections and subsections without numbers showing on the left side of each entry. So I changed to using the star version and with manually entering each section or subsection into the main toc. But now I find that only the main TOC is created, but local toc at top of each section is missing. This happens with splitting or no splitting. Removing the star version of sectioning, the local TOC shows up again as expected. Here is a MWE \documentclass[12pt]{article} \begin{document} \ifdefined\HCode \Configure{tableofcontents*}{section} \TocAt{section,subsection} \else \tableofcontents \fi \section*{section 1} \addcontentsline{toc}{section}{section 1}% text \subsection*{subsection 1} \addcontentsline{toc}{subsection}{subsection 1}% text \subsection*{subsection 2} \addcontentsline{toc}{subsection}{subsection 2}% text \end{document} Compiled with make4ht -ulm default -a debug C.tex 'mathjax,htm' Gives this Now see what happens when I change back to normal sectioning (i.e. no star) \documentclass[12pt]{article} \begin{document} \ifdefined\HCode \Configure{tableofcontents*}{section} \TocAt{section,subsection} \else \tableofcontents \fi \section{section 1} text \subsection{subsection 1} text \subsection{subsection 2} text \end{document} Compiled using same command gives I expected local TOC to show up in both cases. Is there a workaround? reference https://puszcza.gnu.org.ua/bugs/index.php?667

  • Double integral with intexgral: display error
    by Sebastiano on January 10, 2026 at 8:35 pm

    Am I make a mistake, but the code \integral[symbol=\iint, llimit=S, variables={x, y}]{f(x, y)} taken from the manual on page 7 does not give me the double integral? \documentclass{article} \usepackage[margin=0.5in]{geometry} \usepackage[italic=true]{intexgral} \begin{document} \begin{equation} \integral[symbol=\iint, llimit=S, variables={x, y}]{f(x, y)} \end{equation} \begin{equation} \integral[nint=2, llimit=\Omega, variables={x, y}]{f(x,y)} \end{equation} \end{document}

  • How to create a list of referenced values based on entries in a datatool-database
    by lukascbossert on January 10, 2026 at 7:34 pm

    This is a followup question to How to split the value of a macro into elements using LaTeX3? since I fail to integrate the answer there into my actual code. My overall aim is the following: I want to have a list of affiliations and below the institutions that belong to the affiliation (cf. Obtain unique values of multiple specific columns from a datatool database): One Affiliation > One Institution Another Affiliation > Two Institution > Three Institution The data is stored in various datatool databases. The data comes originally from the database person, from there we get the IDs for the institutions, in the database institution we find the IDs of the affiliations, which names are stored in the database affiliation. It should be based on LaTeX3 and the problem is, that there can be multiple institutions listed in the person-database (one person can be working at multiple institutions). When I try to split the value from \pInst I get an error message about ! LaTeX Error: A sequence was misused. Here is my current approach: \documentclass{article} \ExplSyntaxOn \usepackage{datatool} \newcommand{\thePeriod}{3} \tl_new:N \l_my_database_name_tl \keys_define:nn { person }{ role .code:n = \DTLnewdbentry{\l_my_database_name_tl}{role}{#1}, period .code:n = \DTLnewdbentry{\l_my_database_name_tl}{period}{#1}, ref-institution-id .code:n = \DTLnewdbentry{\l_my_database_name_tl}{ref-institution-id}{#1}, } \keys_define:nn { institution }{ id .code:n = \DTLnewdbentry{\l_my_database_name_tl}{id}{#1}, name .code:n = \DTLnewdbentry{\l_my_database_name_tl}{name}{#1}, ref-affiliation-id .code:n = \DTLnewdbentry{\l_my_database_name_tl}{ref-affiliation-id}{#1}, } \keys_define:nn { affiliation }{ id .code:n = \DTLnewdbentry{\l_my_database_name_tl}{id}{#1}, name .code:n = \DTLnewdbentry{\l_my_database_name_tl}{name}{#1}, } \NewDocumentCommand{\addEntry}{ O{#2} m m }{ % #1: keys % #2: database % #3: key-values \group_begin: % https://tex.stackexchange.com/q/738902/98739 \tl_set:Nn \l_my_database_name_tl {#2} \DTLifdbexists{#2}{}{\DTLnewdb{#2}} \DTLnewrow{#2} \exp_args:Ne \keys_set:nn { #1 } {#3} \group_end: } % 1. filter database 'person' for all entries, % Conditions: 1) 'role=PI', 2) period=3 % 2. from the filtered list get a unique list of 'ref-instiution-id' % 3. get from the 'ref-instituion-id' an unique list of the % 'ref-affiliation-id' % 4. print all names that are behin 'ref-affiliation-id', below each % affiliation there are all names of the institutions that are from the unique % list of 'ref-institution-id' % ------------------------------------------------- \NewDocumentCommand{\listOfAffiliations}{} { \seq_new:N \l_instsplit_seq \seq_new:N \l_inst_seq % --- Walk through the whole “person” DB \DTLforeach*[%start of conditions \DTLisinlist{\thePeriod}{\pPeriod}% 1st condition \and% \DTLisinlist{PI}{\pRole}% 2nd condition ]{person}{% \pRole=role,% \pPeriod=period,% \pInst=ref-institution-id% }{ Debugging:\par Person~found: \quad role = \pRole, \quad period = \pPeriod, \quad institution = \pInst\par\bigskip % split multiple values into individual values \seq_set_split:Nne \l_instsplit_seq { , } { \pInst } % fill the list \seq_put_right:Ne \l_inst_seq { \l_instsplit_seq } } % each institution should appear only once \seq_remove_duplicates:N \l_inst_seq % show the values \seq_use:Nn \l_inst_seq {\space--\space} % Get the affiliations to the institutions and print first the affiliation then % below its institutions .... } \ExplSyntaxOff \begin{document} \addEntry{person}{ role = {PI,spokesperson}, period={2,3}, ref-institution-id = {institution1,institution3} } \addEntry{person}{ role = {PI}, period={3}, ref-institution-id = {institution2} } \addEntry{person}{ role = {PI}, period={3}, ref-institution-id = {institution1,institution2} } \addEntry{institution}{ id=institution1, name={One Institution}, ref-affiliation-id={affiliation1} } \addEntry{institution}{ id=institution2, name={Two Institution}, ref-affiliation-id={affiliation2} } \addEntry{institution}{ id=institution3, name={Three Institution}, ref-affiliation-id={affiliation2} } \addEntry{affiliation}{ id=affiliation1, name={One Affiliation} } \addEntry{affiliation}{ id=affiliation2, name={Another Affiliation} } \listOfAffiliations \end{document} Edit: The error message is ! Use of \??? doesn't match its definition. <argument> \??? ! LaTeX Error: A sequence was misused. l.123 \listOfAffiliations

  • How to move an equations system letter to midline height?
    by graograman on January 10, 2026 at 6:36 pm

    I'd like to move the letter H below so it's at a midline height in between the two equations, please. Here's a MWE. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*} \left.\begin{matrix} \frac{x-h}{a}=\sec\theta\Rightarrow x-h=a\sec\theta\Rightarrow x=a\sec\theta+h \\ \frac{y-k}{b}=\tan\theta\Rightarrow y-k=b\tan\theta\Rightarrow y=b\tan\theta+k \end{matrix}\right\}\Rightarrow \mbox{\Huge$\mathcal{H}$:} \begin{matrix} x=a\sec\theta+h \\ y=b\tan\theta+k \end{matrix} \end{equation*} \end{document} This code produces the equations system thus:

  • Redefine `$...$` to `\(...\)`
    by weisj on January 10, 2026 at 2:44 pm

    The mathtools package can automatically insert italics correction when using \(...\) for inline math mode. See this answer. However, I much prefer $...$ for inline math as I find it more readable and comfortable to type on my keyboard layout. I am currently using the following hack to keep using the $...$ syntax while preserving the italics correction. \catcode`\$=13% \def$#1${\(#1\)}% I haven't had issues with it in my current document, but I was wondering whether there are reasons this might be a bad idea. I would image that if this was harmless the mathtools package would use it to also patch the $...$ syntax for the mathic feature. So my question is: Is this safe and are there any caveats I might be overseeing?

  • Does catchfilebetweentags significantly slow down LaTeX compilation?
    by taiwan12 on January 10, 2026 at 1:27 pm

    I'm using the catchfilebetweentags package to separate content (descriptions and data blocks) from the main document structure and include them via \ExecuteMetaData. In a simplified example, my setup looks like this: main.tex \documentclass{report} \usepackage{graphicx} \usepackage{geometry} \usepackage{float} \usepackage{lipsum} \usepackage{catchfilebetweentags} \newcommand{\fig}[1]{\begin{figure}[H]\includegraphics[width=0.2\linewidth]{#1}\end{figure}} \newcommand{\des}[1]{\ExecuteMetaData[des.tex]{#1}} \newcommand{\data}[1]{\ExecuteMetaData[data.tex]{#1}} \newcommand{\merge}[4]{\par\textbf{#1}\par\fig{#2}\des{#3}\par\data{#4}\par} \begin{document} \merge{First}{example-image-a}{Des1}{Data1} \merge{Second}{example-image-b}{Des2}{Data2} \merge{Third}{example-image-c}{Des3}{Data3} \end{document} des.tex %<*Des1> \lipsum[1] %</Des1> %<*Des2> \lipsum[1] %</Des2> %<*Des3> \lipsum[1] %</Des3> data.tex %<*Data1> \lipsum[1] %</Data1> %<*Data2> \lipsum[1] %</Data2> %<*Data3> \lipsum[1] %</Data3> In the actual document, there are 50+ \merge blocks, each calling \ExecuteMetaData twice (for description and data). My question is about performance: Does using catchfilebetweentags (and repeatedly calling \ExecuteMetaData) significantly slow down LaTeX compilation in this kind of setup, especially as the document grows? Thanks in advance!

  • Count items in an itemize list, but not the indented ones
    by Loulou on January 10, 2026 at 1:05 pm

    The title says it all: I want to count the items in a list like itemize but not the items in the indented ones. I currently use the code below. In my document, I use a \label{nameoflabel} inside my list, just after the last item, and I can call it whenever I want with a \numitems{nameoflabel}. At the moment, this counts every items of the indented lists, whether they also are itemize or even enumerate (hence, compilating the code below gives "3" in the last sentence, but there are 2 items in the general list). I lack ideas and technique to prevent that! MWE : \documentclass{article} \usepackage{enumitem} \usepackage{refcount} \usepackage{xpatch} \newcommand{\numitems}[1]{\getrefnumber{#1}} \newcounter{itemcntr} \AtBeginEnvironment{itemize}{% \setcounter{itemcntr}{0}% \xapptocmd{\item}{\refstepcounter{itemcntr}}{}{}% } \begin{document} \begin{itemize} \item 1 \begin{itemize} \item 1 \end{itemize} \item 2 \label{nameoflabel} \end{itemize} There are \numitems{nameoflabel} items in the list, not counting the indented one. \end{document}

  • How to split the value of a macro into elements using LaTeX3?
    by lukascbossert on January 10, 2026 at 10:24 am

    I would like to have separate values for the content of the macro. In the example below they should be considered as two elements (splitted at the ,). \documentclass{article} \usepackage{expl3} \ExplSyntaxOn \seq_new:N \l_inst_seq \newcommand{\institutions}{ins1,ins2} \begin{document} \ExplSyntaxOn % Split the macro contents at commas \seq_set_split:Nnn \l_inst_seq { , } { \institutions } % Use the sequence Count:~\seq_count:N \l_inst_seq\par Items:~\seq_use:Nn \l_inst_seq {~|~} \ExplSyntaxOff \end{document}

  • LaTeX enumeration: two-digit numbering with prefix (FR-01)
    by Markus M on January 10, 2026 at 10:21 am

    I currently fail to create an referenceable enumeration in LaTeX where each item is labeled and numbered with a fixed string prefix, and a two-digit number with leading zeros Example: FR-01, FR-02, FR-03, … References using \ref / \cref should reproduce the item prefix+number (e.g. FR-01). What already works This minimal example works for one-digit numbers: \documentclass[12pt,a4paper,twoside,openright]{scrbook} \usepackage{enumitem} \usepackage{hyperref} \usepackage{cleveref} \begin{document} \begin{enumerate}[ label=\textbf{FR-\arabic*}, ref=FR-\arabic*, leftmargin=*, ] \item\label{fr:upload-data} The system shall allow a user to upload data. \end{enumerate} This task addresses \cref{fr:upload-data}. \end{document} This produces FR-1 This task addresses FR-1. What I want FR-01 This task addresses FR-01. My attempts to use commands such as \twodigits fail. Does anyone have a good solution and can help?

  • How to tweak the distance of resistor's "+"/"-" label's vertical distance when `raised` is set?
    by Explorer on January 10, 2026 at 10:09 am

    I have the following code: \documentclass[margin=5pt]{standalone} \usepackage{circuitikz} \begin{document} \begin{circuitikz}[european] \ctikzset{voltage=raised}%<- \draw (0,0) -- ++(1,0) to[R=R,label distance=3pt, v=$\mathrm{u_R}$] ++(0,+3) -- ++(-1,0); \end{circuitikz} \end{document} However, I want the "+" and "-" to get closer with "u_R"(that is: shift "+" up and shift "-" down), I have tried shift and label distance and voltage/distance from node, but all failed, because they justs tweak the distance between the wire. It's hard for me to dig it out from the manual, is that exists elegant method?

  • What is the symbol/macro for `$(\!\!)$` (symbol that looks like opening and closing paretheses that overlap each other)?
    by Dima Pasechnik on January 10, 2026 at 1:05 am

    In 100+ years old algebraic geometry texts one sees notation like $(a(\!\!)A,B,C)^2=0$. How does one properly typeset $(\!\!)$ in (La)TeX? for some reason I can't seem to be able to post proper TeX here. Edited The symbol's usage and example screenshot is shown in x-post at here and in the comment:

  • tex4ebook: How to create list of own theorems
    by Jack on January 10, 2026 at 12:36 am

    I am trying to create a List of Definitions, similar to the Table of Content: It should automatically include all definitions, and should allow for adding manually parts or sections. For PDF output, I found a working solution via \@starttoc, but it remains empty in the ebook. Of course, I do not need page numbers in the ebook, but would rather like the Definitions in the list to be clickable (equivalent to the features of the ToC). Is there a way to create such a list? Here is an MWE which works for PDF, but not for the ebook. \documentclass{book} \usepackage{tex4ebook} \usepackage{titletoc,tocloft} \usepackage{amsthm} \makeatletter \newcommand\ListofDefinitions{\chapter*{List of Definitions}\@starttoc{LoD}} \newtheoremstyle{DefinitionStyle}{3pt}{3pt}{\bfseries}{}{\bfseries}{}{.5em}{\thmname{#1}\thmnumber{ #2} \addcontentsline{LoD}{section}{#1\protect\numberline{ #2}{#3}}} \theoremstyle{DefinitionStyle} \newtheorem{Definition}{Definition} \begin{document} \tableofcontents \newpage \addcontentsline{toc}{chapter}{List of Definitions} {\let\cleardoublepage\clearpage\ListofDefinitions} \newpage \part{Part ONE} \addcontentsline{LoD}{part}{Part ONE} \begin{Definition}[Name of first definition] This is the first definition. \end{Definition} \begin{Definition}[Name of second definition] This is the second definition. \end{Definition} \begin{Definition}[Name of third definition] This is the third definition. \end{Definition} \part{Part TWO} \addcontentsline{LoD}{part}{Part TWO} \begin{Definition}[Name of fourth definition] This is the fourth definition. \end{Definition} \end{document}

  • Simple way to show/hide controls points in a Tikz line?
    by YaGoi Root on January 9, 2026 at 2:18 pm

    In Tikz diagrams, one of the best ways to make controlled curved lines (such as pointing arrows in a flow chart) is using \draw with control points. For example, \documentclass{article} \usepackage{graphicx} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \usetikzlibrary{shapes.arrows, arrows.meta} \begin{document} \begin{figure} \begin{tikzpicture} \draw[thick,->,>=Stealth, show controls] (0,0) .. controls (0.5,3) and (4.5,0).. (5,5); \end{tikzpicture} \end{figure} \end{document} However, I feel like it ends up being a sort of guessing game when trying to determine where to actually place the control points, because I have a hard time visualizing where the points are, but once I know where they are I know how their position affects the curved line. I understand how the points effect the line very intuitively, but moving said points to the desired location is easier when you can see the points as well. Is there any simple way to "toggle" on a display of the control points, so that you can see them while editing the diagram, and then hide them when you've got the line that you want?

  • Rafael Bombelli's mathematical power notation
    by Eff on January 9, 2026 at 12:02 am

    In the 1572 algebra book L'Algebra by Rafael Bombelli, he uses his own notation for powers. I want to reproduce this notation in LaTeX. Below is a screenshot from the book that shows how he wrote to the sixth power, the fifth power, etc. In general, x to the power of n is written as n above a kind of circular arc. I have found a good example where it is made nicely in LaTeX. But I don't know how to reproduce it. Can anyone offer a solution to writing this power notation in LaTeX?

  • How to use turn coordinate specification in combination with global transforms like scale and shift?
    by dsacre on January 8, 2026 at 1:54 pm

    Scenario Consider the following: One needs to draw from a point on a curve following its tangent direction. TikZ provides for this scenario the ([turn]<ANGLE>:<DISTANCE>) syntax. As one continues the image, it becomes too big for the page layout. In order to prevent having to recreate the complete image with a smaller size, one tries to use the scale parameter (globally on the tikzpicture or via scope does not make a difference for this scenario). MWE \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} % DESCRIPTION: Plain, no modification % STATUS: WORKING \draw[black] (0,0) arc(0:90:-1.5 and 1.5) arc(90:135:-2.0 and 2.0) --([turn]0:0.5) node[below]{plain} ; % DESCRIPTION: Scale % STATUS: FAIL \begin{scope}[scale=0.5] \draw[red] (0,0) arc(0:90:-1.5 and 1.5) arc(90:135:-2.0 and 2.0) --([turn]0:0.5) node[below]{scale} ; \end{scope} % DESCRIPTION: Shift % STATUS: FAIL \begin{scope}[xshift=5cm] \draw[red] (0,0) arc(0:90:-1.5 and 1.5) arc(90:135:-2.0 and 2.0) --([turn]0:0.5) node[below]{xshift} ; \end{scope} \end{tikzpicture} \end{document} Result As soon as transformation are applied, the result of the ([turn]<ANGLE>:<DISTANCE>) specification is wrong. Research so far It was tried to encapsulate the \draw command into a TikZ pic, hoping that this might act as a wrapper, but the result was identical. The corresponding section 13.4.2: Rotational Relative Coordinates of the TikZ manual specifies: The effect of this key is to locally shift the coordinate system so that the last point reached is at the origin and the coordinate system is “turned” so that the (x)-axis points in the direction of a tangent entering the last point. From that, I would assume that certain global transforms cannot/will not be taken into account properly. Question Is it possible to use the ([turn]<ANGLE>:<DISTANCE>) syntax under (global) transformations? If not, is there another option to achieve the same functionality or an easy way to implement it? UPDATE: 2026-01-12 I have opened a GitHub Issue, since this behavior seems to be a bug.