Hot
- French spacing conflicts with cleverefby Erwann on December 1, 2025 at 5:41 am
In this example I must choose between \cref{sec:bar} and French spacing (o/w disabled using \NoAutoSpace; I presume because sec:bar is read sec\thinspacing:bar. Is there a solution? \documentclass{article} \usepackage[T1]{fontenc} \usepackage[french]{babel} %\NoAutoSpacing \usepackage{cleveref} \begin{document} \section{Foo} bonjour: monde; oui? non! «aujourd'hui» % Voir~\cref{sec:bar} %(./debug-108.aux) %! Missing \endcsname inserted. %<to be read again> % \unskip %l.14 Voir~\cref{sec:bar} % %? \section{Bar}\label{sec:bar} bonjour: monde; oui? non! « aujourd'hui » \end{document}
- How can I mainpulate the arguments in a function defined with \fp_new_function:n?by LaTeXereXeTaL on December 1, 2025 at 4:40 am
I just discovered that we can now create new functions (fp words) that can be evaluated inside \fp_eval:n per page 273 of interface3.pdf (it also seems to work with \fpeval). This is straightforward as the demo shows. What if I want, or need, to manipulate the function arguments to get the returned result? I can't get that to work. This functionality may not be provided yet, but I don't see it mentioned in the documentatin and searching this site turned up nothing (or I somehow missed it). MWE: % !TEX program = lualatexmk % !TEX encoding = UTF-8 Unicode \documentclass{article} \ExplSyntaxOn % This works. \fp_new_function:n { npow } \fp_set_function:nnn { npow } { a,b } { a**b } % This does not work. \fp_new_function:n { biggerof } \fp_set_function:nnn { biggerof } { a,b } { \fp_compare:nTF { a < b } { b } { a } } \ExplSyntaxOff \begin{document} \( \alpha = \fpeval{npow(2,3)} \) \( \alpha = \fpeval{biggerof(2,3)} \) \end{document}
- Practical guidelines for using socketsby Niranjan on December 1, 2025 at 4:22 am
I have read the documentation of sockets and I was wondering how sockets can be used for practical use-cases. While surfing SE, I found this discussion around the topic and this mesmerizing picture-mode-illustrated answer 😛, but still didn't find a straight forward example. I asked AI to give a sample code and got the following (some manual cleanup done and some deprecated commands removed from the original AI-response): \DocumentMetadata{tagging=on} \documentclass{article} \begin{document} \NewSocket{greeting-socket}{0} \NewSocketPlug{greeting-socket}{formal}{Dear ma’am/sir,} \NewSocketPlug{greeting-socket}{informal}{Hi there,} \NewSocketPlug{greeting-socket}{friendly}{Hello, friend!} \NewSocket{closing-socket}{0} \NewSocketPlug{closing-socket}{formal}{Sincerely,} \NewSocketPlug{closing-socket}{informal}{Cheers,} \section*{Formal Letter} \AssignSocketPlug{greeting-socket}{formal} \AssignSocketPlug{closing-socket}{formal} \UseSocket{greeting-socket} This is a formal letter content. \UseSocket{closing-socket} John Doe \section*{Informal Note} \AssignSocketPlug{greeting-socket}{informal} \AssignSocketPlug{closing-socket}{informal} \UseSocket{greeting-socket} This is an informal note. \UseSocket{closing-socket} Jane \section*{Friendly Message} \AssignSocketPlug{greeting-socket}{friendly} \AssignSocketPlug{closing-socket}{informal} \UseSocket{greeting-socket} Just a quick message to say hi. \UseSocket{closing-socket} Your pal \end{document} Now the question is if this type of usage can be called "standard"? Imagine I have some code instead of the un-expandable text in the given example. Here are some questions: Are the names used here recommendable? What names do the kernel use-cases of sockets use? What should package authors use? (The documentation says: Best practice naming conventions are . . . to be documented but it is dated 2024-12-27 which is quite old now, so I assume some recommendations can be given?) Usually it is said that sockets are to be used only once unlike hooks. Does that mean multiple usages of \AssignSocketPlug wrong? The documentation does say: If the programming logic should change, then all that is necessary is to make a new assignment with \AssignSocketPlug to a different {⟨socket-plug-name⟩}. but it also says: A socket is typically only used in one place in code, but this is not a requirement, i.e., if the same operation with the same inputs need to be carried out in several places the same named socket can be used. So I am confused. In the given example, what exactly is wrong (or atypical)? The multiple uses of \AssignSocketPlug or \UseSocket? Theoretically both seem to be fine, but not sure what is expected. Is there any general consensus on what should not be used in sockets? Anything else regarding sockets based on the example or beyond it?
- Option for Stacktrace output of `texlua`by lazyboy on November 30, 2025 at 11:58 pm
If I make mistakes in a Lua script and I call it from a .tex file via \luadirect{ dofile("myscript.lua") } then I get a full stacktrace in the output of lualatex-compiler: myscript.lua:3: attempt to compare nil with number stack traceback: myscript.lua:3: in function 'expected_number' myscript.lua:9: in function 'fn2' myscript.lua:13: in main chunk [C]: in function 'dofile' [\directlua]:1: in main chunk. But if I call script from a console with $ texlua myscript.lua myscript.lua:3: attempt to compare nil with number I just get the last entry of the error. How can I call texlua that it prints all entries in stacktrace out? -- myscript.lua function expected_number(x) if x == 0 then return 0 end if x < 0 then return -1 end if x > 0 then return 1 end end function fn2(n) local m = expected_number(n) end local y fn2(y)
- What are CTAN package modifications that don't affect the package files and why do they happen?by schtandard on November 30, 2025 at 11:25 pm
Today, I updated my TeX Live installation and noticed that a lot of packages were updated where the old and the new version number were identical. Looking into some examples, it seems like the packages are indeed unchanged. There seems to have been a modification in the CTAN catalogue that did not affect the package files at all. What is it and why did it happen? An example: One of the "updated" packages was lipsum, from version 2.7 to version 2.7. Looking at its directory page, all files date from 2021, so there was no recent change justifying an update. However, when I search for lipsum, the search result is marked as "Last modified in Catalogue: 2025-11-11 12:35". This modification must be what triggered the update. However, I could not find this date or any reference to this modification on the package page this search result entry links to (or anywhere else, for that matter).
- Paragraphs in captions with KOMA >= v3.48 (recent caption.sty regression)by H. Weirauch on November 30, 2025 at 10:46 pm
The caption package recently lost its compatibility with KOMA-script >= 3.48. Some more context in the issue tracker of the caption package: https://gitlab.com/axelsommerfeldt/caption/-/issues/183 On TL2024 (pdfTeX 3.141592653-2.6-1.40.26 (TeX Live 2024), Document Class: scrartcl 2023/07/07 v3.41 KOMA-Script document class (article)), the following MWE compiled fine: \documentclass{scrartcl} \usepackage{caption} \begin{document} \begin{figure}[htp] \LaTeX \caption[Alt text for LoF]{% First paragraph. First paragraph. First paragraph. First paragraph. First paragraph. First paragraph. First paragraph. First paragraph. Second paragraph. Second paragraph. Second paragraph. Second paragraph. Second paragraph. Second paragraph. Second paragraph. Second paragraph. Second paragraph. Second paragraph.} \end{figure} \end{document} But on an up-to-date TeXLive installation with Document Class: scrartcl 2025/09/09 v3.48 KOMA-Script document class (article), the caption package complains: Package caption Warning: Unknown document class (or package), (caption) standard defaults will be used. See the caption package documentation for explanation. and subsequently fails to process the paragraphs of the caption. Using the captions=nooneline KOMA option (like suggested by https://tex.stackexchange.com/a/66112 ) is not a solution. It only works with explicit linebreaks of the \\ style, but not with typographically sensible paragraph culture (\par or empty lines). The comments/replies in caption package not recognising KOMA classes are not helpful in the case of multi-paragraph captions, unless I have overlooked a way to teach KOMA captions to recognize paragraphs. In particular, I do not concur with the conclusion in https://tex.stackexchange.com/a/754444/96444 showing that current caption support for KOMA-Script classes is obsolete. because KOMA captions just do not replace the full functionality of caption. Any constructive ideas (superior to freezing TeXLive version at 2024) how to revive paragraphs in captions for KOMA-script documents?
- Compilation OK with TeXShop, but KO in command lineby projetmbc on November 30, 2025 at 9:02 pm
I'm facing a strange problem. With TeXShop configured to use pdflatex --file-line-error --synctex=1 --shell-escape, I can compile a document that incorporates a lot of PDFs via pdfpages. When I run the same command in the terminal, I get pdflatex: ./single/main-Vik-dark.pdf: Too many open files. Since all the files are needed for testing, I am providing a link to an online repository: https://github.com/projetmbc/for-writing/tree/aprism. You will need to compile the file @prism/pre-doc/showcase/showcase-en-dark.tex.
- imakeidx with beamer: inconsistent absence/presence of errorby Denis Bitouzé on November 30, 2025 at 8:34 pm
Trying to apply https://tex.stackexchange.com/a/482980/18401, I stumbled upon a strange error. Indeed, while the following MCE compile like a charm: \documentclass{beamer} \newenvironment{theindex}{}{} \usepackage{imakeidx} \makeatletter \def\@idxitem{\par} \def\imki@firstpagestyle{empty} \makeatother \makeindex \begin{document} \begin{frame} index1\index{index1} index2\index{index2} \end{frame} \begin{frame} index1\index{index1} % foo\index{foo} \end{frame} \begin{frame} \printindex \end{frame} \end{document} But, as soon as the foo\index{foo} line (quite similar to the above one index2\index{index2}) is uncommented, the compilation fails: ! Undefined control sequence. l.5 \indexspace Do you understand what's going on?
- Input `Tofu (square) with char "F" inside` on purpose without warningsby myhsia on November 30, 2025 at 1:19 pm
I want to display the fallback effect of the CJK font. Here, just use the fandol font (already included in TeX Live) as an MWE I want to input the Tofu (square) with char "F" inside on purpose: since some Chinese characters, especially the Cantonese characters like 嘅, 咗, and 哋 won't appears correctly, but render as a Tofu (square) with char "F" inside. Now, I just want to input the sign: Tofu (square) with char "F" inside on purpose, but I tried \symbol{"2370} and ⍰, they can render the sign correctly, but they all give the warning: Missing character: There is no ⍰ (U+2370) in font [FandolSong-Regular.otf]/OT:language=dflt;! Can I use a method, e.g., a Unicode char ID (I don't know if there exists the Unicode ID) ^^^^XXXX to input the sign, but without the warning? \documentclass{article} \usepackage[LoadFandol]{xeCJK} \begin{document} \fontspec[cmap = UniGB-UTF16-H]{FandolSong-Regular.otf}\selectfont \symbol{"2370} and ⍰ Both gives a \underline{Tofu (Square) + F}, but also the Chinese (Cantonese) chars like 嘅、咗、哋 give a \underline{Tofu (Square) + F}. \end{document}
- Adding math kerns (aka cut-ins or staircase kerning) to OpenType math fontsby Apoorv Potnis on November 30, 2025 at 12:10 pm
Is it possible to add math kerns (aka cut-ins or staircase kerning) to OpenType math fonts? If yes, how? I am personally looking for something which works for LuaLaTeX (using fonts.handlers.otf.addfeature?), but I would be happy for other solutions as well. For example, I want to add a bottom right math kern to \lmathccal{O}. \documentclass{article} \usepackage[newcmbb]{fontsetup} % Below code copied from here: https://tex.stackexchange.com/a/373539/128462. \DeclareFontFamily{U}{mathc}{} \DeclareFontShape{U}{mathc}{m}{it}% {<->s*[1.03] mathc10}{} \DeclareMathAlphabet{\lmathccal}{U}{mathc}{m}{it} % \DeclareMathAlphabet\cmmathcal{OMS}{cmsy}{m}{n} % \renewcommand{\symcal}{\lmathccal} \begin{document} \(\lmathccal{O}_i\) \(\symcal{O}_i\) \end{document}
- White-space around counter valuesby Subhajit Paul on November 30, 2025 at 8:15 am
I have created an almost perfect 24-hour format time counter; only to discover unwanted white-spaces appearing around the values. How do I remove them? \documentclass{article} \newcounter{hour} \newcounter{minute} \newcommand{\Time}[2]{ \setcounter{hour}{#1} \setcounter{minute}{#2} } \newcommand*{\Next}[1][20]{ \addtocounter{minute}{#1} { \ifnum\value{minute}>59 \refstepcounter{hour} \addtocounter{minute}{-60} \else\relax \fi } { \ifnum\value{minute}=0 \ifnum\value{hour}<10 0\thehour:\theminute0 \else \thehour:\theminute0 \fi \else \ifnum\value{hour}<10 0\thehour:\theminute \else \thehour:\theminute \fi \fi } } \begin{document} \Time{8}{0} Given time is \thehour:\theminute, properly written as \Next[0]. Next default time slot is at \Next. Next slot in 10 minutes is at \Next[10]. \end{document}
- Windows MikTex looking for directory of a fileby Ashok Kimmel on November 30, 2025 at 5:31 am
I was trying to install miktex on my computer, but it didn't work. My path is C:\Python313\Scripts\;C:\Python313\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Python313\Scripts\;C:\Python313\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Users\myname\AppData\Local\Microsoft\WindowsApps;C:\Users\myname\AppData\Local\JetBrains\Toolbox\scripts;C:\Users\myname\AppData\Local\Programs\Microsoft VS Code\bin;C:\ghcup\bin;C:\ghcup\bin\ghcup\bin;C:\Users\myname\AppData\Local\Microsoft\WinGet\Packages\OCaml.opam_Microsoft.Winget.Source_8wekyb3d8bbwe;C:\Users\myname\AppData\Local\Microsoft\WindowsApps;C:\Users\myname\AppData\Roaming\local\bin;C:\Users\myname\AppData\Roaming\npm;C:\ghcup\bin\cabal\bin\hoogle.exe;C:\ghcup\bin\cabal\bin; Here is the file, I don't know which parts are important so I copied the whole thing: this is MiKTeX Setup Service 5.5 (MiKTeX 24.1) starting installer... Loading package database... starting package maintenance... installation directory: C:\Users\myname\AppData\Local\Programs\MiKTeX package repository: C:\Users\myname\AppData\Local\Temp\mik89934 visiting repository C:\Users\myname\AppData\Local\Temp\mik89934... repository type: local package repository loading package repository manifest... package repository digest: e1335260c78870c42103bbd56846f41a going to install 18447 file(s) (198 package(s)) extracting files from amsfonts.tar.lzma... <extracts a bunch more> extracting files from zapfding.cab... updating package manifests (C:\Users\myname\AppData\Local\Programs\MiKTeX\miktex/config\package-manifests.ini)... installed 6954 package manifests visiting repository C:\Users\myname\AppData\Local\Temp\mik89934... repository type: local package repository loading package repository manifest... initexmf --principal=setup --user-install=C:\Users\myname\AppData\Local\Programs\MiKTeX "--common-install=C:\Program Files\MiKTeX" --set-config-value=[Core]SharedSetup=0 --disable-installer --verbose: 372 [0x00004834] INFO initexmf null - this is MiKTeX Configuration Utility 5.5 (MiKTeX 24.1) 372 [0x00004834] INFO initexmf null - this process (24756) started by basic-miktex-24.1-x64 in directory C:\Users\myname\Downloads with command line: initexmf --principal=setup --user-install=C:\Users\myname\AppData\Local\Programs\MiKTeX "--common-install=C:\Program Files\MiKTeX" --set-config-value=[Core]SharedSetup=0 --disable-installer --verbose 372 [0x00004834] INFO initexmf null - Operating on the private (per-user) MiKTeX setup 372 [0x00004834] INFO initexmf null - Registering root directories... Registering root directories... 460 [0x00004834] INFO trace.initexmf.core null - saving startup configuration; setupVersion=24.1 464 [0x00004834] INFO initexmf null - Setting config value: [Core]SharedSetup=0 Setting config value: [Core]SharedSetup=0 467 [0x00004834] INFO initexmf null - this process (24756) finishes with exit code 0 miktex --disable-installer --verbose fndb remove: Removing C:\Users\myname\AppData\Local\MiKTeX\miktex\data\le\6950f2e6c165c7cb81c64ba8170b26e2.fndb-5... Removing C:\Users\myname\AppData\Local\MiKTeX\miktex\data\le\096a392195c32d7ae4ea36d8f1b3e27d.fndb-5... Removing C:\Users\myname\AppData\Local\MiKTeX\miktex\data\le\80d4ef6e4eae7000d1089117e1d384a6.fndb-5... mpm --register-components --verbose: Operating on the private (per-user) MiKTeX setup miktex --disable-installer --verbose fndb refresh: Creating FNDB for user root directory (C:\Users\myname\AppData\Roaming\MiKTeX)... Creating FNDB for user root directory (C:\Users\myname\AppData\Local\MiKTeX)... Creating FNDB for user root directory (C:\Users\myname\AppData\Local\Programs\MiKTeX)... Refreshing FNDB for MPM... miktex --disable-installer --verbose links install --force: Installing links in target directory C:\Users\myname\AppData\Local\Programs\MiKTeX\miktex\bin\x64... miktex --disable-installer --verbose fontmaps configure: Parsing configuration file C:\Users\myname\AppData\Local\Programs\MiKTeX\miktex/config\updmap.cfg... Writing C:\Users\myname\AppData\Local\MiKTeX\fonts\map\dvipdfmx\kanjix.map... Writing C:\Users\myname\AppData\Local\MiKTeX\fonts\map\dvips\builtin35.map... Writing C:\Users\myname\AppData\Local\MiKTeX\fonts\map\dvips\download35.map... Writing C:\Users\myname\AppData\Local\MiKTeX\fonts\map\dvips\ps2pk.map... Writing C:\Users\myname\AppData\Local\MiKTeX\fonts\map\dvips\psfonts_pk.map... Writing C:\Users\myname\AppData\Local\MiKTeX\fonts\map\dvips\psfonts_t1.map... Writing C:\Users\myname\AppData\Local\MiKTeX\fonts\map\pdftex\pdftex_dl14.map... Writing C:\Users\myname\AppData\Local\MiKTeX\fonts\map\pdftex\pdftex_ndl14.map... Copying C:\Users\myname\AppData\Local\MiKTeX\fonts\map\dvips\psfonts_t1.map to C:\Users\myname\AppData\Local\MiKTeX\fonts\map\dvips\psfonts.map... Copying C:\Users\myname\AppData\Local\MiKTeX\fonts\map\pdftex\pdftex_dl14.map to C:\Users\myname\AppData\Local\MiKTeX\fonts\map\pdftex\pdftex.map... miktex --disable-installer --verbose languages configure: Creating language.dat, language.dat.lua and language.def... initexmf --default-paper-size=A4 --disable-installer --verbose: initexmf --set-config-value=[MPM]AutoInstall=2 --disable-installer --verbose: Setting config value: [MPM]AutoInstall=2 miktex --disable-installer --verbose fndb refresh: Creating FNDB for user root directory (C:\Users\myname\AppData\Roaming\MiKTeX)... Creating FNDB for user root directory (C:\Users\myname\AppData\Local\MiKTeX)... Creating FNDB for user root directory (C:\Users\myname\AppData\Local\Programs\MiKTeX)... Refreshing FNDB for MPM... miktex --disable-installer --verbose filetypes register: initexmf --modify-path --disable-installer --verbose: Sorry, but "MiKTeX Configuration Utility" did not succeed for the following reason: MiKTeX cannot retrieve attributes for the directory 'C:\ghcup\bin\cabal\bin\hoogle.exe\'. The log file hopefully contains the information to get MiKTeX going again: C:\Users\myname\AppData\Local\MiKTeX\miktex\log\initexmf.log Warning: Windows API error 267: The directory name is invalid. Warning: MiKTeX cannot retrieve attributes for the directory 'C:\ghcup\bin\cabal\bin\hoogle.exe\'. Warning: MiKTeX cannot retrieve attributes for the directory 'C:\ghcup\bin\cabal\bin\hoogle.exe\'. initexmf --report --disable-installer --verbose: Sorry, but "MiKTeX Configuration Utility" did not succeed for the following reason: MiKTeX cannot retrieve attributes for the directory 'C:\ghcup\bin\cabal\bin\hoogle.exe\'. The log file hopefully contains the information to get MiKTeX going again: C:\Users\myname\AppData\Local\MiKTeX\miktex\log\initexmf.log Warning: Windows API error 267: The directory name is invalid. Warning: MiKTeX cannot retrieve attributes for the directory 'C:\ghcup\bin\cabal\bin\hoogle.exe\'. Warning: MiKTeX cannot retrieve attributes for the directory 'C:\ghcup\bin\cabal\bin\hoogle.exe\'. removing "C:\Users\myname\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MiKTeX\MiKTeX Console.lnk"... creating shell link "C:\Users\myname\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MiKTeX\MiKTeX Console.lnk"... removing "C:\Users\myname\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MiKTeX\TeXworks.lnk"... creating shell link "C:\Users\myname\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MiKTeX\TeXworks.lnk"... An error occurred: source file: Libraries\MiKTeX\Core\Directory\win\winDirectory.cpp source line: 94 message: Windows API error 267: The directory name is invalid. info: path="C:\ghcup\bin\cabal\bin\hoogle.exe\" If it isn't clear, I just want simple instructions on how to get it to install properly.
- Can arguments extend overlay of outer command in Beamer?by scottkosty on November 29, 2025 at 7:57 pm
Here is an example document. Basically, when I have \omFinalAnswer{some text}, I want it to color that text just for one overlay. But if I do \omFinalAnswer{some \uncover<+->{text}}, I want all of the text to be colored for as long as the overlays inside \omFinalAnswer are created (in this example, 2 overlays). Is it possible for the \uncover<+-> to automatically extend \omFinalAnswer's effect? Here is an example document I try to keep short and explain what I want: \documentclass{beamer} % for this particular example, I want the green to last one extra overlay, % i.e., have same affect as: % \newcommand{\omFinalAnswer}[1]{\textcolor<.-.(1)|handout>{green} {#1}} % but I want it to depend on how many overlays are created inside the argument % (so I don't want to hardcode -.(1). \newcommand{\omFinalAnswer}[1]{\textcolor<.|handout>{green} {#1}} \beamerdefaultoverlayspecification{<alert@+|+->} \newcommand{\dotsUncover}[1]{\alert<.(1)|handout:0>{\only<.>{\rlap{\ldots}}\uncover<+->{#1}}} \begin{document} \begin{frame} \frametitle{How to use $T$ to carry out the hypothesis test} \begin{itemize} \item hello \item \omFinalAnswer{We don't know\dotsUncover{\ and we don't need to know for a hypothesis tt.}}% \item another item \end{itemize} \end{frame} \end{document}
- parskip and parindent in KOMA-script classesby mlg on November 29, 2025 at 7:51 pm
How can I have parskip and parindent in a KOMA-script class? I read this question, but \restoreparindent only works with parskip package, which I'm not using because of the KOMA-script class.
- Change figure caption from 1 to Abb. 1 (Fig. 1) with correct indentation in ToF?by Lennart Herrmann on November 29, 2025 at 5:25 pm
Im trying to change the figure enumeration in the list of figures as many people have tried before me. The answer I most commonly read is by using \renewcommand{\thefigure}{Abb. \arabic{figure}} or \addto\captionsngerman{\renewcommand{\thefigure}{Abb. \arabic{figure}}} In my case, however, the newly set figure enumeration is clipping into the figure name, like so: Also, in text the figures get doubled captions, like so: Im also trying to apply the same change to the list of tables, but i suspect it to be solved by one solution. MWE: \documentclass{article} \usepackage[ngerman]{babel} % \renewcommand{\thefigure}{Abb. \arabic{figure}} \addto\captionsngerman{\renewcommand{\thefigure}{Abb. \arabic{figure}}} % \renewcommand{\thetable}{Tab. \arabic{figure}} \begin{document} \listoffigures \listoftables \newpage \begin{figure} \caption{Testfigure} \end{figure} \begin{figure} \caption{Testfigure2} \end{figure} \begin{table}[] \centering \begin{tabular}{c|c} & \\ & \end{tabular} \caption{Testtable1} \label{tab:placeholder} \end{table} \begin{table}[] \centering \begin{tabular}{c|c} & \\ & \end{tabular} \caption{Testtable2} \label{tab:placeholder} \end{table} \end{document}
- Numbering equations in Typst [closed]by Leatuyr Bertyk on November 29, 2025 at 3:12 pm
I am learning how to use Typst, a new typesetting system. Actually, I have used LaTeX for 3 years, but now, I want to try Typst. During my study, I have 3 questions that LLMs cannot answer correctly. How to number the equation by section (or subsection) in Typst ? I tried using #set math.equation(numbering: "(1.1)") but it did not work correctly (the answer is same as #set math.equation(numbering: "(1)")). How to number sub-equations, such as (2a), (2b) ?. The last one, how to number each line in an align? Because, if I use command #set math.equation(numbering: "(1)") in align, it will show only one number although that align has more than 1 lines. I earnestly request the assistance of everyone.
- \newcommands and align environment: How to get the correct alignment?by Grey Eminence on November 29, 2025 at 2:06 pm
When using the \labelrel command (with \overset instead of \stackrel as \stackrel is obsolete: Differences between \stackrel and \stackbin) from @Circumscribe Put reference above equal sign and refer to it in an align-environment the alignment is not correct: \documentclass{article} \usepackage{mathtools} \newcounter{relctr} %% <- counter for relations \renewcommand*\therelctr{\alph{relctr}} %% <- label format \newcommand\labelrel[2]{% \begingroup \refstepcounter{relctr}% \overset{\textnormal{(\alph{relctr})}}{\mathstrut{#1}}% \originallabel{#2}% \endgroup } \AtBeginDocument{\let\originallabel\label} %% <- store original definition \begin{document} \begin{align*} a &= b \\ &\labelrel{=}{someLabel} c \end{align*} \end{document} This seems to be a well known problem with the \overset command: \overset and align environment: how to get correct alignment? where the aligned-overset package offers a nice solution. So my question is how one can achieve similar behavior for the \labelrel command or even more generally specify the behavior with align for new commands. I don't have any experience with coding new commands myself but I decided to post this as a new questions as this may be an interesting question for other users as well. Here is what I tried: Search the internet Try using the aligned-overset in the definition of \labelrel but I had no idea on how to pass the & from align to the definition Look at the implementation of aligned-overset to copy the relevant code however I almost didn't understand anything.
- algorithm2e - Functional programming style match-with using custom Switchby ixb on November 29, 2025 at 6:29 am
I want to recreate the match-with construct typical in functional programming languages using the algorithm2e package. I've found that \SetKwSwitch gets me most of the way there, but it forces the 'do' to be the same for the switch and the case statements. This is my code: \documentclass{article} \usepackage[linesnumbered,lined,ruled]{algorithm2e} \begin{document} \begin{figure} \begin{algorithm}[H] \DontPrintSemicolon \SetKwSwitch{Match}{MatchCase}{MatchOther}{match}{with}{|}{\_}{}{end} \Match{a}{ \lMatchCase{4}{Some 1\;} \lMatchCase{8}{Some 2\;} } \end{algorithm} \end{figure} \end{document} What I get is something like: match a with | 4 with Some 1 | 8 with Some 2 end What I'd like is: match a with | 4 => Some 1 | 8 => Some 2 end
- Replace glyph from font A with a glyph from font B in LuaLaTeX/Node?by Alain Stalder on November 29, 2025 at 6:22 am
The issue is that I have a font that has 9 different glyphs per characters, glyphs called e.g. a, a.2, … a.8 for the lowercase a; and the glyphs look similar per character and have the identical metrics. Those glyphs are rotated cyclically via the GSUB font table and there is a large kerning table for pairs for all glyphs. This works fine in most places today, including in LuaLaTeX with HarfBuzz renderer and in XeLaTeX, but it is not fully supported with LuaLaTeX with the default Node renderer, there kerning is only correct in part of the cases. Since it looks like it would not be practical to fix this in the source codes, see this luaoftload github issue of mine from 2021, I was wondering if I could maybe find a workaround using Lua hooks, but have not found out so far if there would be such a hook. Specifically, I know that kerning works fine if I reduce the font to just use one glyph per character, let me call that font "A". The idea would now be to use that font via fontspec and use a Lua hook late in the process, when "typesetting" has already happened (kerning, hyphenation, etc.), i.e. when it has been determined where each glyph will be placed on the output and then replace the glyphs with pseudo-randomly one from the full font "B", e.g. replace glyph a from font A with a.5 from font B. Is there such a hook, or would anybody know of a different way achieving this in LuaLaTeX (with Node renderer)? I guess, if not possible, it would in principle be possible to do this afterwards in the resulting pdf, and I could probably figure out how to do this (or ask elsewhere), but that would not be ideal, also because it would be two steps, e.g. not visible in TexShop while writing. Added same day: Here is a specific example. The font with the GSUB rotation is Jackwrite.ttf and I have created a variant with just a single glyph per character, see links in the example. While I am at it, I am also showing an example with the opposite, a font Stoicheoin that has two chars per glyph, uppercase A and lowercase a for glyph A and also there I created a variant with one glyph (duplicated) for each char. I have also added the output of the nodetree package for the Jackwrite case... % !TEX TS-program = lualatex \documentclass{article} \usepackage{fontspec} \usepackage{nodetree} % https://jack-daw.com/fonts/stoicheion.zip => Stoicheion.ttf \newfontfamily\stoicheion{Stoicheion.ttf} % % https://jack-daw.com/fonts/StoicheionSingleCharPerGlyphDoNotDistribute.ttf \newfontfamily\stoicheionsimple{StoicheionSingleCharPerGlyphDoNotDistribute.ttf} % https://jack-daw.com/fonts/jackwrite.zip => Jackwrite.ttf \newfontfamily\jackwrite{Jackwrite.ttf} % https://jack-daw.com/fonts/JackwriteSingleGlyphPerCharDoNotDistribute.ttf \newfontfamily\jackwritesimple{JackwriteSingleGlyphPerCharDoNotDistribute.ttf} \begin{document} \Large \section*{\stoicheion{Full Featured Fonts Yes}} \jackwrite{iiiiiiiii} \section*{\stoicheionsimple{Full Featured Fonts No}} \jackwritesimple{iiiiiiiii} \end{document} And here the output of fontree, first for the simpler font because there the result seems to be simpler (Jackwrite case, the 9 i's): ├─GLUE (baselineskip) wd 9.26pt └─HLIST (line) wd 345pt, dp 0.33pt, ht 8.41pt ╚═head ├─LOCAL_PAR ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt ├─KERN (fontkern) -2.88pt ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═ props {['injections'] = {['leftkern'] = -188743.6}} ├─DISC (regular) penalty 50 │ ╠═replace │ ║ └─KERN (fontkern) -2.88pt │ ╚═pre │ ├─KERN (fontkern) -1.44pt │ └─GLYPH (glyph) '-', font 30, wd 7.88pt, ht 3.61pt │ props {['preinjections'] = {['leftkern'] = -94371.8}} ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═ props {['emptyinjections'] = {['leftkern'] = -188743.6}} ├─DISC (regular) penalty 50 │ ╠═replace │ ║ └─KERN (fontkern) -2.88pt │ ╚═pre │ ├─KERN (fontkern) -1.44pt │ └─GLYPH (glyph) '-', font 30, wd 7.88pt, ht 3.61pt │ props {['preinjections'] = {['leftkern'] = -94371.8}} ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═ props {['emptyinjections'] = {['leftkern'] = -188743.6}} ├─DISC (regular) penalty 50 │ ╠═replace │ ║ └─KERN (fontkern) -2.88pt │ ╚═pre │ ├─KERN (fontkern) -1.44pt │ └─GLYPH (glyph) '-', font 30, wd 7.88pt, ht 3.61pt │ props {['preinjections'] = {['leftkern'] = -94371.8}} ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═ props {['emptyinjections'] = {['leftkern'] = -188743.6}} ├─DISC (regular) penalty 50 │ ╠═replace │ ║ └─KERN (fontkern) -2.88pt │ ╚═pre │ ├─KERN (fontkern) -1.44pt │ └─GLYPH (glyph) '-', font 30, wd 7.88pt, ht 3.61pt │ props {['preinjections'] = {['leftkern'] = -94371.8}} ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═ props {['emptyinjections'] = {['leftkern'] = -188743.6}} ├─DISC (regular) penalty 50 │ ╠═replace │ ║ └─KERN (fontkern) -2.88pt │ ╚═pre │ ├─KERN (fontkern) -1.44pt │ └─GLYPH (glyph) '-', font 30, wd 7.88pt, ht 3.61pt │ props {['preinjections'] = {['leftkern'] = -94371.8}} ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═ props {['emptyinjections'] = {['leftkern'] = -188743.6}} ├─KERN (fontkern) -2.88pt ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═ props {['injections'] = {['leftkern'] = -188743.6}} ├─KERN (fontkern) -2.88pt ├─GLYPH (glyph) 'i', font 30, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═ props {['injections'] = {['leftkern'] = -188743.6}} ├─PENALTY (linepenalty) 10000 ├─GLUE (parfillskip) plus +1fil └─GLUE (rightskip) Looks like it would simply allow to hyphenate anywhere except between first and last pairs of "ii", which makes sense. And here the output with the regular font with GSUB rotation (again Jackwrite case, the 9 i's): ├─GLUE (baselineskip) wd 9.27pt └─HLIST (line) wd 345pt, dp 0.42pt, ht 8.42pt ╚═head ├─LOCAL_PAR ├─GLYPH (glyph) 'i', font 28, wd 7.88pt, ht 8.41pt, dp 0.33pt ├─KERN (fontkern) -2.88pt ├─GLYPH (glyph) '', font 28, wd 7.88pt, ht 8.32pt, dp 0.42pt │ ╚═ props {['injections'] = {['leftkern'] = -188743.6}} ├─KERN (fontkern) -2.88pt ├─GLYPH (glyph) '', font 28, wd 7.88pt, ht 8.37pt, dp 0.35pt │ ╚═ props {['injections'] = {['leftkern'] = -188743.6}} ├─KERN (fontkern) -2.88pt ├─GLYPH (glyph) '', font 28, wd 7.88pt, ht 8.32pt, dp 0.33pt │ ╚═ props {['injections'] = {['leftkern'] = -188743.6}} ├─KERN (fontkern) -2.88pt ├─GLYPH (glyph) '', font 28, wd 7.88pt, ht 8.41pt, dp 0.36pt │ ╚═ props {['injections'] = {['leftkern'] = -188743.6}} ├─KERN (fontkern) -2.88pt ├─GLYPH (glyph) '', font 28, wd 7.88pt, ht 8.32pt, dp 0.35pt │ ╚═ props {['injections'] = {['leftkern'] = -188743.6}} ├─DISC (regular) penalty 50 │ ╠═replace │ ║ ├─KERN (fontkern) -2.88pt │ ║ ├─GLYPH (glyph) '', font 28, wd 7.88pt, ht 8.42pt, dp 0.39pt │ ║ │ props {['replaceinjections'] = {['leftkern'] = -188743.6}} │ ║ ├─GLYPH (glyph) 'i', font 28, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ║ ├─KERN (fontkern) -2.88pt │ ║ └─GLYPH (glyph) '', font 28, wd 7.88pt, ht 8.32pt, dp 0.42pt │ ║ props {['injections'] = {['leftkern'] = -188743.6}} │ ╠═post │ ║ ├─GLYPH (glyph) 'i', font 28, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ║ ├─KERN (fontkern) -2.88pt │ ║ ├─GLYPH (glyph) '', font 28, wd 7.88pt, ht 8.32pt, dp 0.42pt │ ║ │ props {['injections'] = {['leftkern'] = -188743.6}} │ ║ └─GLYPH (glyph) 'i', font 28, wd 7.88pt, ht 8.41pt, dp 0.33pt │ ╚═pre │ └─GLYPH (glyph) '', font 28, wd 7.88pt, ht 3.6pt ├─PENALTY (linepenalty) 10000 ├─GLUE (parfillskip) plus +1fil └─GLUE (rightskip) I do not really understand what it does, but looks like I if I just used the simpler font and found out how to replace the GLYPH settings with the desired glyph (identify it how exactly?) and font 28 instead of 30 (get these numbers from where?), this could yield the desired result… Added same day as asked: Based on Max Cherkoff's answer I managed to make a quick demo that his answer would also work in my case. I am just replacing one of the rs in the example with one with a more prominent "typewriter" glitch, using for the demo just the numbers of the fonts and the glyphs, but would certainly also work along what Max did: % !TEX TS-program = lualatex \documentclass{article} \usepackage{fontspec} \usepackage{luacode} \begin{luacode} local function recurse(head, indent) for n in node.traverse(head) do print(string.rep("-", indent) .. ">>") if n.id == node.id("glyph") then print(string.rep("-", indent) .. "char " .. n.char .. " of font " .. n.font) if n.char == 114 and n.font == 23 then n.char = 983520 n.font = 22 end elseif n.head or n.replace then if n.head then n.head = recurse(n.head, indent+2) end if n.replace then if n.pre then n.pre = recurse(n.pre, indent+2) end if n.post then n.post = recurse(n.post, indent+2) end n.replace = recurse(n.replace, indent+2) end end print(string.rep("-", indent) .. "<<") end return head end local function show_fonts_and_chars(head) print() print("show fonts and chars...") return recurse(head, 0) end luatexbase.add_to_callback("post_linebreak_filter", show_fonts_and_chars, "demo") \end{luacode} % https://jack-daw.com/fonts/jackwrite.zip => Jackwrite.ttf \newfontfamily\jackwrite{Jackwrite.ttf} % https://jack-daw.com/fonts/JackwriteSingleGlyphPerCharDoNotDistribute.ttf \newfontfamily\jackwritesimple{JackwriteSingleGlyphPerCharDoNotDistribute.ttf} \begin{document} \Huge \jackwrite{iiiiiiiiii rrrrrrrrrr} \jackwritesimple{iiiiiiiiii rrrrrrrrrr} \end{document} Output:
- how to define an expandable key-value command?by xcn on November 29, 2025 at 1:43 am
As shown in the code below, in order to use the result of \testSet{a=400, b=900}, I have to declare a global variable \g_test_result_fp and define a \testGet command. Can I directly use \fpeval{\testSet{a=400, b=900} + pi}, or in other words, is it possible to create an expandable key-value command? \documentclass{article} \ExplSyntaxOn \fp_new:N \l_test_a_fp \fp_new:N \l_test_b_fp \fp_new:N \g_test_result_fp \keys_define:nn { test } { a .fp_set:N = \l_test_a_fp, b .fp_set:N = \l_test_b_fp, } \NewDocumentCommand { \testSet } { m } { \keys_set:nn { test } {#1} \fp_gset:Nn \g_test_result_fp { \l_test_a_fp + \l_test_b_fp } } \NewExpandableDocumentCommand { \testGet } { } { \fp_use:N \g_test_result_fp } \ExplSyntaxOff \begin{document} \testSet{a=400, b=900} \testGet \fpeval{\testGet + pi} %\fpeval{\testSet{a=400, b=900} + pi} \end{document}
- Using ASCII Art & pxpicby Sebastiano on November 28, 2025 at 9:30 pm
With https://www.asciiart.eu/ ASCII Art Archive I wanted to create the same dragon of the mame game: Black Tiger, At the moment, I haven’t understood how to use the options inside \pxpic[...], or which ones to set in the package so that it can correctly recognise the colours of the dragon image. \documentclass[border=3.14]{standalone} \usepackage{pxpic} \begin{document} \pxpic[.......] { -:- ++======++ +++==+++ -:- +=---.....-..:--.:--=++ %*+#%@%%#+==-==++ ++-=++- ##### +==-::::-=+*#%@@%%@@@%%###**+====+ ++#@+%#*@%@+=-==+-- +=*@@-=*:++*+- #=.....:--*=:--::----=%@@%*+##*+*@#*=*@%*+*%@***@@*+ ++%*%*%#@##=+==::===*++:-+#*@%*-+ +*# #++::==.:=====+%@##%*+#%*=*%*++%#*+*%**++* *%*%*#*@%@*+++%###%*--+#%%%%*- #*=:-===-:-+-:=+###@@%#%%++%#*+#%*+* +*%*%%#@#=+=+**+*=--**@@#%#* **# #+====---=+======---:::-=+*%@#+#%*++* *@#%%+==*@@**%*-:=--*%#@#** ##=::..=-+-+**==-=+@##%**#@@@@%+=-+%@%*+ @%*#*%%*#%%#+=-*%%.+#+=**+#* +=+-:=#*%@@@%--+%*%*+%%**#%%@@%#+*% %*#%+#@%#*%=:*@@*+%=@+#-*#+++#**# +-:=%##+*#@@@@+-+%#%**@**+* *# ## **%@##@%%@#*+*#--==*#++++*## ###*#*=-*###%*+*%%%%%+-*###** ##@%%%*%@*++%##%@+**++****+=###+++==+-==%@#%+%#**%%##%@+=## %# **#@#@@*+=+*+#%**=#+-=@+=*==*==*++*=+@*%*#%*+** @+=* %%@@%#@%%@#++**@*+#+=+@*++%##%%%%%%%+=##%#* ** ##+#++@=#@*--=*@#+-+@#+*@#@#+#@@**%@%+*@* ##**#*@#*@#*@****+*%*##++=##@*%**%%*+** ## #*@%## *=-=+*%*@+**==-+%#%#* #%# *++++=%#=#+=:*-*%*** ###@*+=+*%#%---+--*@@ *#*+#%+--=%+:+++**#:**# @*+#*%****%**-+#####**+* #**%**##**+*@#%%#**##**#%#* #* *##*#* %%%**#%##%**## ##@****##+#*++@###*#**#*+*####*####*### ##+%@*++#+*@# #*#+####%%#*#+=**+#++#++#*+##+*######*## ****## #**:+#*=*#*#%##**++#****#**## ###*###*##*#*# %## ##% #+-#++=***@@ ## %## * +## #+# } \end{document}
- About \def parameter listby YCH817 on November 28, 2025 at 9:44 am
I try to implement the currying function , and I start from implement the following : \myproc<=b<=a will print a \mapsto b \mapsto {\rm output} \myproc<=b will print {\bf a} \mapsto b \mapsto {\rm output} \myproc<<=a will print a \mapsto {\bf b} \mapsto {\rm output} the next step is to make \myproc<<=a be the function that accepts b as input (e.g. \myproc<<=a<=b outputs \myproc<=b<=a) where the \bf stands for the default value . However when I replace the a / b by x_1 / and x_2 , something undesired happened : Here is the MWE : https://www.overleaf.com/9672474965wszpvxnkwkpr#bdc9bc Here is the code in case you cannot access to the overleaf link : \documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsfonts} \usepackage{mathtools} \usepackage{tikz} \begin{document} \makeatletter \def\myproc<{% \@ifnextchar <% {\myproc@NopB} {\myproc@YopB} } \def\myproc@NopB<=#1{% \myproc@YopB@YopA{{\bf x}_2}<={#1}% } \def\myproc@YopB=#1{%<=#2 \@ifnextchar <% {\myproc@YopB@YopA#1}% myproc <=b<=a myproc@YopB =b<=a myproc@YopB@YopA b<=a {\myproc@YopB@NopA#1}% myproc <=b myproc@YopB =b myproc@YopB@NopA b } \def\myproc@YopB@NopA#1{% \myproc@YopB@YopA{#1}<={{\bf x}_1}% } \def\myproc@YopB@YopA#1<=#2{ {#2} \mapsto {#1} \mapsto {\rm output}% } \makeatother % \myproc@NopB \(\myproc<<={x_1}\)\par \(\myproc<={x_2}\)\par \(\myproc<={x_2}<={x_1}\) \vspace{10pt} The desire result should be\par \(x_1\mapsto {\bf x}_2\mapsto {\rm output}\)\par \({\bf x}_1\mapsto x_2\mapsto {\rm output}\)\par \(x_1 \mapsto x_2 \mapsto {\rm output}\) \end{document}
- Status of the tabularray package?by albert on November 28, 2025 at 9:20 am
I saw something worrying on gthub regarding the status of the package tabularay: Does anyone know how the future will look like for this package? Will there someone who will take over its maintenance?
- Why does LaTeX put the PDF tags for floats at the end of the document?by Mörkö on November 28, 2025 at 8:34 am
Background I am trying to produce a reasonably accessible document template at work. I have worked out basic tagging, reasonably structured tables, alt text for images and mathml output for inline and block math envs. I have been testing this document with NVDA + MathCAT + Adobe Acrobat, which I understand to be a "known good" reader + screen reader combo. (I am sighted and don't use screen readers in my daily life: please correct me if this is an unreasonable test setup!) I have also been inspecting the thing with PAC and the ngpdf editor. Everything I'm showing here is compiled with the lualatex-dev demo here https://latex3.github.io/tagging-project/documentation/wtpdf/small-example (though I did also test it with overleaf's newest release and got the same outcomes) Issue with tagging structure My issue concerns floats (at least tables and figures): whereas LaTeX places them among the text in the visual part of the pdf, the relevant accessibility tags are at the very end of the document. Specifically (per the ngpdf editor) the document ends with a tables element that contains both tables (see screenshot below; I collapsed the table structure itself to save space). Therefore, when just reading the document using a screen reader from top to bottom, the float doesn't get read in the relevant chapter. If I navigate past the end of the document, I can find (and read) my floats there. I believe this not to be a problem with my reader setup, because the ngpdf editor also places these items at the end of the document and the html derivation algorithm implemented by ngpdf places them at the end of the document. I have created what I think of as a minimal repro: \DocumentMetadata{ lang = en, pdfstandard = ua-2, pdfstandard = a-4f, %or a-4 tagging=on, tagging-setup={math/setup=mathml-SE}, testphase={math} } \documentclass{article} \usepackage{graphicx} % Required for inserting images \usepackage{hyperref} \title{Figure repro} \begin{document} \maketitle This document has multiple floats (\ref{tab:A} and \ref{tab:B}). \begin{table}[h] \centering \begin{tabular}{c|c} A & B \\ C & D \end{tabular} \caption{Letters} \label{tab:A} \end{table} Then it has a paragraph of text \begin{table}[h] \centering \begin{tabular}{c|c} 1 & 2 \\ 3 & 4 \end{tabular} \caption{Numbers} \label{tab:B} \end{table} In conclusion: lorem ipsum. \url{https://ctan.org} \end{document} Corresponding html output: https://ngpdf.com/resources/html/df185aa3-feee-4946-8d0d-6ed438c568cd/2f659711-f19d-454c-a710-165dc27b36fd.html ngpdf editor: https://ngpdf.com/editor/editFile Accessibility ramifications As I read the repro with NVDA from top to bottom, I get: figure repro november twenty-eighth this document has multiple floats link go to destination table dot struct dot fourteen and link go destination link table dot struct dot thirty then it has a paragraph of text in conclusion [small pause] lorem ipsum [long pause] link https slash slash ctan dot org caption table one letters out of caption table with two rows and two columns row one column one a [pronouced ey] column two b [pronounced bee] row two column one c [pronounced cee] row two column two d [pronounced dee] out of table caption table two numbers out of caption table with two rows and two columns row one column one one column two two row two column one three row two column two four If I press k (go to next link) at "this document has multiple floats link go to destination table dot struct dot fourteen and link go destination", NVDA announces "link go to destination table dot struct dot fourteen link". When I then press enter, the box surrounding the link in acrobat changes from the purple that hyperref sets it to to a black-on-white dotted line: I would interpret that as having been visited. The same k-and-then-enter maneuver seems to work for the url link and opens a browser. I am therefore reasonably confident this activates the link. However, after activating the table link, I get silence. Then when I press down again, I get "link table dot struct dot thirty" and so on: it does not navigate me to the table. Actual questions Is having all the floats at the end the expected behaviour? I as a sighted person that isn't used to screen readers feel that the floats being at the end of the document makes navigating the document significantly harder. If the floats being at the end is not the expected behaviour, should I report a bug? Is there a known work-around to this? Besides trying to produce reasonable pdf output, I am also interested in deriving HTML / epub (potentially using the html derivation algorithm) for more general ergonomics and access reasons. I would at least want to have the figure placement controllable in that case. (Though in the html produced by ngpdf, the links do at least work) Am I missing something with the non-followable links in acrobat or is acrobat just broken? Can the link titles be made more human readable? The HTML output for reference I don't know how long the ngpdf links last so here is the html output: <!DOCTYPE html> <html lang="en"><head> <title>Figure repro</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <meta name="derivation-algorithm-version" content="1.1"/> <meta name="derivation-algorithm-producer" content="ngPDF"/> <style> li > span[data-pdf-se-type=Lbl] { font-style: bold;margin-right:.5em;display:inline-block;vertical-align:top;} div[data-pdf-se-type=LBody] > div { vertical-align:top;} div[data-pdf-se-type=LBody] > div:first-child > p:first-child { margin-top:0} </style> <style> mtable.align > mtr > mtd:nth-child(2n), mtable.flalign > mtr > mtd:nth-child(2n), mtable.alignat > mtr > mtd:nth-child(2n), mtable.aligned > mtr > mtd:nth-child(2n+1), mtable.alignedat > mtr > mtd:nth-child(2n+1), mtable.split > mtr > mtd:nth-child(2n+1) { padding-right:0;text-align:right;text-align:-moz-right;text-align:-webkit-right; } mtable.align > mtr > mtd:nth-child(2n+3), mtable.flalign > mtr > mtd:nth-child(2n+3), mtable.alignat > mtr > mtd:nth-child(2n+3), mtable.aligned > mtr > mtd:nth-child(2n), mtable.alignedat > mtr > mtd:nth-child(2n), mtable.split > mtr > mtd:nth-child(2n) { padding-left:0;text-align:left;text-align:-moz-left;text-align:-webkit-left; } /* use float right for safari */ @supports (-webkit-appearance:none) and (stroke-color:transparent) { mtable.align > mtr > mtd:nth-child(2n), mtable.flalign > mtr > mtd:nth-child(2n), mtable.alignat > mtr > mtd:nth-child(2n), mtable.aligned > mtr > mtd:nth-child(2n+1), mtable.alignedat > mtr > mtd:nth-child(2n+1), mtable.split > mtr > mtd:nth-child(2n+1) { padding-right:0;text-align:right;float:right:display:math; } } mtable.align > mtr > mtd:nth-child(2n) {border margin-left:1em; padding-left:1em; } mtable.alignat > mtr > mtd { margin-left:0em; margin-right:0em; padding-left:0em; padding-right:0em;} mtable.flalign {width:100%} mtd[intent=":no-equation-label"], mtd[intent=":equation-label"] { position:relative; left:-2em; } </style> </head> <body lang="en"><nav hidden id="PDF-PageNavigation" role="doc-pagelist"><a href="#page-0">1</a></nav><div data-pdf-se-type="Document" id="ID.002"><div data-pdf-se-type-original="text-unit" data-pdf-se-type="Part" id="ID.005"><div data-pdf-se-type="Title" id="ID.006"><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="center" style="text-align:center;" id="ID.007"><span id="page-0" role="doc-pagebreak" aria-label="1"></span>Figure repro</p></div><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="center" style="text-align:center;" id="ID.008"></p><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="center" style="text-align:center;" id="ID.009">November 28, 2025</p></div><div data-pdf-se-type-original="text-unit" data-pdf-se-type="Part" id="ID.010"><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="justify" style="text-align:justify;" id="ID.011">This document has multiple floats (<a href="#ID.014" data-pdf-se-type="Link" id="ID.012">1</a> and <a href="#ID.030" data-pdf-se-type="Link" id="ID.013">2</a>).</p></div><div data-pdf-se-type-original="text-unit" data-pdf-se-type="Part" id="ID.028"><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="justify" style="text-align:justify;" id="ID.029">Then it has a paragraph of text</p></div><div data-pdf-se-type-original="text-unit" data-pdf-se-type="Part" id="ID.044"><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="justify" style="text-align:justify;" id="ID.045">In conclusion: lorem ipsum. <a href="https://ctan.org" data-pdf-se-type="Link" id="ID.046">https://ctan.org</a></p></div><section data-pdf-se-type-original="tables" data-pdf-se-type="Sect" id="ID.004"><aside data-pdf-se-type-original="float" data-pdf-se-type="Aside" id="ID.014"><div data-pdf-se-type="Caption" id="ID.025"><span data-pdf-se-type="Lbl" id="ID.026">Table 1: </span><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="center" style="text-align:center;" id="ID.027">Letters</p></div><div data-pdf-se-type-original="text-unit" data-pdf-se-type="Part" id="ID.015"><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="center" style="text-align:center;" id="ID.016"></p><table data-pdf-se-type="Table" id="ID.017"><tr data-pdf-se-type="TR" id="ID.018"><td data-pdf-se-type="TD" id="ID.019">A</td><td data-pdf-se-type="TD" id="ID.020">B</td></tr><tr data-pdf-se-type="TR" id="ID.021"><td data-pdf-se-type="TD" id="ID.022">C</td><td data-pdf-se-type="TD" id="ID.023">D</td></tr></table><p data-pdf-se-type-original="text" data-pdf-se-type="P" id="ID.024"></p></div></aside><aside data-pdf-se-type-original="float" data-pdf-se-type="Aside" id="ID.030"><div data-pdf-se-type="Caption" id="ID.041"><span data-pdf-se-type="Lbl" id="ID.042">Table 2: </span><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="center" style="text-align:center;" id="ID.043">Numbers</p></div><div data-pdf-se-type-original="text-unit" data-pdf-se-type="Part" id="ID.031"><p data-pdf-se-type-original="text" data-pdf-se-type="P" class="center" style="text-align:center;" id="ID.032"></p><table data-pdf-se-type="Table" id="ID.033"><tr data-pdf-se-type="TR" id="ID.034"><td data-pdf-se-type="TD" id="ID.035">1</td><td data-pdf-se-type="TD" id="ID.036">2</td></tr><tr data-pdf-se-type="TR" id="ID.037"><td data-pdf-se-type="TD" id="ID.038">3</td><td data-pdf-se-type="TD" id="ID.039">4</td></tr></table><p data-pdf-se-type-original="text" data-pdf-se-type="P" id="ID.040"></p></div></aside></section></div></body></html>
- How to create a list with two columns?by ultralegend5385 on November 27, 2025 at 3:26 pm
I want to create a list where each item has two attributes: a title and an associated description. Something that looks like this: Code: \documentclass{article} \begin{document} \begin{enumerate} \item diagonal matrix. \emph{Description.} off-diagonal entries are zero. \item idempotent matrix. \emph{Description.} equal to its square. \item skew-symmetric matrix. \emph{Description.} equal to the negative of its transpose. \end{enumerate} \end{document} but the Description.s are all aligned together with appropriate space from the titles. I had a look at this, but I also want the 1., 2., etc. so that solution does not work. How do I do this?
- How to make a long cases equation more compact and clearer?by mingabua on November 27, 2025 at 10:12 am
I am currently writing my master's thesis. In it, I have to specify a case equation. I can present the formula clearly and comprehensibly, but somehow I find the formatting not quite right. I can't tell you exactly how I would like it to look, but I would like it to be a little clearer and perhaps take up less space vertically. This is my code: \documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lipsum} \usepackage[margin=1in]{geometry} \usepackage{amsmath,amssymb} \usepackage{mathtools} \usepackage{lmodern} \begin{document} \lipsum[2] \begin{align}\label{eq:qt_recursion} Q_{t+1}\bigl(\Omega_{t+1},\alpha_{t+1},\mathbf{l}_{t+1}\bigr) = \min\!\begin{cases} Q_t(\delta_t) - \pi_{jt}, & \text{if R2: } \Omega_{t+1}=\Omega_t+1,\ \alpha_{t+1}=\alpha_t, \\[-1mm] & \qquad\qquad\ \ \mathbf{l}_{t+1}=(1,l_{t,1},\dots,l_{t,MS-2}), \\[0.5mm] Q_t(\delta_t), & \text{if R1: } \Omega_{t+1}=\Omega_t+\theta(\alpha_t),\ \alpha_{t+1}=\alpha_t+1, \\[-1mm] & \qquad\qquad\ \ \mathbf{l}_{t+1}=(0,l_{t,1},\dots,l_{t,MS-2}). \end{cases} \end{align} \lipsum[3] \end{document}
- TikZ word search diagramby yannis on November 26, 2025 at 11:50 pm
How can I draw such a "word-search" diagram in TikZ? I need to place the letters on a grid and then to add red horizontal, vertical, diagonal or antidiagonal highlighting boxes as in the picture.
- Vertical separators in pchstack in cryptocodeby Michael Hammer on November 26, 2025 at 3:02 pm
I work with Cryptocode package in LaTeX and want to generate discription of games with oracles. My goal is to generate something like: (Source: https://eprint.iacr.org/2023/275) If my understanding is correct, this is generate via a pcvstack/pchstack-combination (p. 32 in documentation: https://ftp.rrzn.uni-hannover.de/pub/mirror/tex-archive/macros/latex/contrib/cryptocode/cryptocode.pdf). There is to my knowledge no intended parameter to separate horizontal stacks with a vertical line as on the picture. Is there any elegant solution to this problem? My current best attempt is to introduce dummy procedure inbetween filled with vertical rule: \documentclass{report} \usepackage{cryptocode} \begin{document} \begin{pchstack}[space=1em,center, boxed] \procedure{$\mathsf{Left}$}{ \text{Hello,} } \procedure{}{ \rule{0.4pt}{1.5cm} } \procedure{$\mathsf{Right}$}{ \text{Tex StackExchange} } \end{pchstack} \end{document} But that is not ideal because of the awkward spacing: Any well-known workaround?
- How to get a structure of this nodes tower with proper coordinates?by Explorer on November 25, 2025 at 5:54 pm
What I want to achieve is something as below(sorry for drawing in a hurry): The only requirements is vertical alignment(shown as the red dashed lines), the spacing of each nodes could be design, given that would not ruin the figure is okay. What I have tried is as below: \documentclass[tikz,border=5pt]{standalone} \newcommand\mynode[2][1]{% \node[draw,thick,minimum width=8cm,minimum height=2cm,font=\Huge\bfseries,scale=#1] at (#2) {AAAA}; } \begin{document} \begin{tikzpicture} % \mynode[1]{0,0} % \mynode[.45]{-2.25,-2} % \mynode[.45]{2.25,-2} % \mynode[.225]{-3.25,-3} % \mynode[.225]{1.25,-3} % \mynode[.225]{-1.25,-3} % \mynode[.225]{3.25,-3} %... \foreach \x[ evaluate=\x as \y using {int(2^(\x-1))} ] in {1,...,6}{ \foreach \t in {1,...,\y}{ \def\xx{\fpeval{-4 + (8/(\y+1))*\t*1.25}} \def\yy{\fpeval{(8/(\x+1))*1.25}} \mynode[\fpeval{1/\y}]{\xx,\yy} } } \end{tikzpicture} \end{document} It gives: I found that dilemma to determine the proper spacing, and exact coordinates calculation to guarentee vertical alignment at the same time. Is that any powerful tikz tools or something other (box, coffin?) to achieve this? Or I maybe just to make more effort to solve the better numerical relationship or working with the recursive structure?
- Wild Turkeys in TikZby karlh on November 25, 2025 at 4:20 pm
I have an annual scavenger hunt at Thanksgiving in which the TikZlings and TikZ ducks (and related fauna) guide my nieces and nephew through the course. Given that it is Thanksgiving, I wanted to include a turkey munching on pie and sipping wine, but the closest I can come is \documentclass{article} \usepackage{tikzlings} \begin{document} \begin{tikzpicture} \chicken[cake=orange!50!brown,wine] \end{tikzpicture} \end{document} and that just doesn't have the same ring to it. I found a good wild turkey drawn in MetaPost (Draw a turkey, a pumpkin pie, or any other object traditionally associated with Thanksgiving), but since the holiday is only two days away, I thought I'd see whether anyone was interested in making a picture of Meleagris gallopavo.