Hot
- How to restrict a renewbibmacro to a specific entry type in the bibliographyby Jonathan Granzow on December 2, 2025 at 8:47 pm
I am modifying my bibliography style (ext-authoryear) to get this for all sources that offer urls: Author, S. (year). Title. Subtitle. Publisher. Abgerufen am TT.MM.YYYY von https://www.hf.uni-koeln.de/. After days of struggle I finally managed to put URLSEEN and URLFROM in the desired order, adding the German words "Abgerufen am (URLSEEN) von (URLFROM)" with the help of a renewbibmacro command - though I still don't understand when to use URLSEEN and URLDATE. My problem is that other entry types will get a superfluous "von" at the end of the printed bib entry. I am glad for any advice! Here comes the MWE: \documentclass[11pt,a4paper,openany]{scrbook} \usepackage[hidelinks]{hyperref} \usepackage[sfdefault]{quattrocento} \usepackage[T1]{fontenc} %\usepackage{lmodern} \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} \usepackage{url} \urlstyle{same} \usepackage{color} \usepackage[babel,german=quotes]{csquotes} \usepackage[toc,page]{appendix} \usepackage{xurl} \usepackage{doi} \usepackage{textcomp} \usepackage[backend=biber, style=ext-authoryear, citestyle=authoryear-icomp, uniquename=minfull, uniquelist=true, ibidtracker=false, pagetracker=true, sorting=nyvt, sortcase=false, maxnames=2, innamebeforetitle=true, isbn=false, maxbibnames=8, minbibnames=8, dashed=false, giveninits]{biblatex} \DeclareFieldFormat{doi}{\href{https://doi.org/#1}{https://doi.org/{#1}}} \DefineBibliographyStrings{german}{% urlseen = {Abgerufen am}, urlfrom = {von}} \DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1} \DeclareFieldFormat{url}{\url{#1}} \renewbibmacro*{url+urldate}{% \usebibmacro{urldate}{}% \newunit\newblock \addspace \text{von} \nopunct \usebibmacro{url}} \begin{filecontents*}{examplelit.bib} @misc{Aaron.2013, author = {Aaron, Samuel}, year = {2013}, title = {{Sonic Pi}}, url = {https://sonic-pi.net/}, urldate = {2025-11-23}, } @article{Aaron.2016b, author = {Aaron, Samuel and Blackwell, Alan F. and Burnard, Pamela}, year = {2016}, title = {{The development of Sonic Pi and its use in educational partnerships: co-creating pedagogies for learning computer programming}}, journal = {{Journal of Music, Technology and Education}}, doi = {10.17863/CAM.8369}, file = {AaronBlackwellBurnard-revised-V2:Attachments/AaronBlackwellBurnard-revised-V2.doc:application/msword}, } @incollection{Ahner.2021, author = {Ahner, Philipp}, title = {{Ding-Praktiken, musikalische Praxen und Praxisfelder: Soziomaterielle Betrachtungen zu analogen und digitalen Dingen im Musizieren, musikbezogenen Lernen und in der Musikdidaktik des Aufbauenden Musikunterricht}}, pages = {103--117}, publisher = {Helbling}, isbn = {9783990697689}, editor = {Schilling-Sandvo{\ss}, Katharina and Goebel, Matthias and Spychiger, Maria}, booktitle = {{Musikalische Bildung: Festschrift f{\"u}r Werner Jank}}, year = {2021}, file = {Ahner-2021-Ding-Praktiken-musikalische-Praxen-und-Praxisfelder-scan-preview:Attachments/Ahner-2021-Ding-Praktiken-musikalische-Praxen-und-Praxisfelder-scan-preview.pdf:application/pdf}, } @book{Dreyfus.1986, author = {Dreyfus, Hubert L. and Dreyfus, Stuart E.}, year = {1986}, title = {{Mind over machine: The power of human intuition and expertise in the era of the computer}}, publisher = {{Basil Blackwell}}, isbn = {978-0631151265}, } \end{filecontents*} \addbibresource{examplelit.bib} \begin{document} \textcite{Aaron.2013} did a great job with Sonic Pi. \textcite{Aaron.2016b}, \textcite{Dreyfus.1986}, \textcite{Ahner.2021}. \printbibliography \end{document}
- Is there a way in TikZ or Lua to make a short function which converts letters to their corresponding alphabetical position (and vice versa)?by Jasper on December 2, 2025 at 5:38 pm
Is there a way in TikZ or Lua to make a short function which converts letters to their corresponding alphabetical position (and vice versa)? The only way I can think of it so string check each letter, but that sounds too computationally expensive. M(non)WE: \documentclass[tikz,border=1cm]{standalone} \newcommand{\letterpos}[1]{ \pgfmathparse{#1 == a} \ifnum\pgfmathresult=1 1 \fi \pgfmathparse{#1 == ab} \ifnum\pgfmathresult=1 2 \fi \pgfmathparse{#1 == c} \ifnum\pgfmathresult=1 3 \fi \pgfmathparse{#1 == d} \ifnum\pgfmathresult=1 4 \fi \pgfmathparse{#1 == e} \ifnum\pgfmathresult=1 5 \fi } \begin{document} \begin{tikzpicture} \foreach \letter in {a,b,...,e} { \node at (\letterpos{\letter},0) {\letter}; } \end{tikzpicture} \end{document}
- Redefine quotation environment to remove initial indentby agoldst on December 2, 2025 at 4:13 pm
The default LaTeX quotation environment starts each paragraph with an indentation. I prefer for a multi-paragraph block quote not to indent the first paragraph (as recommended by the Chicago Manual of Style, for example). It is of course possible to write \begin{quotation}\noindent every time. But I would like to redefine the environment. I tried to modify the default article.cls definition of quotation minimally, but the result somehow puts a word space at the start of the quotation. How do I avoid this space without having to manually begin every block quote with a \noindent? Example: \documentclass{article} \newenvironment{lquote}{\list{}{\listparindent 1.5em% \itemindent\listparindent \rightmargin \leftmargin \parsep 0pt plus 1pt}\item\noindent\relax}% {\endlist} \begin{document} Quotation environment with explicit noindent: \begin{quotation} \noindent He finally lit on the ground and walked around the body to see if it were really dead. Peered into its nose and mouth. Examined it well from end to end and leaped upon it and bowed, and the others danced a response. That being over, he balanced and asked: ``What killed this man?'' \end{quotation} Custom environment attempting to put noindent at the beginning \begin{lquote} He finally lit on the ground and walked around the body to see if it were really dead. Peered into its nose and mouth. Examined it well from end to end and leaped upon it and bowed, and the others danced a response. That being over, he balanced and asked: ``What killed this man?'' \end{lquote} \end{document} On my system, pdflatex gives this:
- Section title with \starby Roberto Rastapopoulos on December 2, 2025 at 1:47 pm
I am trying to get the following: But when I insert it in this way: \documentclass[a4paper,12pt]{amsart} \usepackage{hyperref} \begin{document} \tableofcontents \section{Introduction} \subsection{$\star$ N-Soliton solutions} Some text about N-soliton solutions... \end{document} I get the error "Package hyperref Warning: Token not allowed in a PDF string (Unicode): removing `math shift' [...]". When I write \subsection{\star N-Soliton solutions} I get How can I get the first one without the error? I have tried several things, but all come with another problem.
- Three-columns paracol with image, second column shifted left, third column shifted rightby user40960 on December 2, 2025 at 1:04 pm
I have a three-columns paracol between two paragraphs of normal text, see code and output below. In the first attempt where I use \columnratio, the second column is shifted too much to the left and overlaps the image, and the third column is also shifted too much to the right. In the second attempt where I use \setcolumnwidth, the problem with the second column has disappeared but the problem with the third column has gotten much worse. What is the best way to adjust the sizes in this situation ? The image used is available at https://github.com/jonathandoyle58/some_icons/blob/main/bart_simpson.png (although it shouldn't matter which image is used, since the \includegraphics sets the size independently of the original image size). \documentclass{article} \usepackage{calc} \usepackage[export]{adjustbox} \usepackage{multicol} \usepackage{paracol} \usepackage{lipsum} \usepackage{xcolor} \usepackage[colorlinks = true, linkcolor = blue, urlcolor = blue, citecolor = blue, anchorcolor = blue]{hyperref} \newcommand*{\foto}{% \includegraphics[width=0.2\textwidth,height=\heightof{M}+\heightof{M}+\heightof{M}+\heightof{M}+\heightof{M}+\heightof{M}+\heightof{M}+\heightof{M}+\heightof{M}+\heightof{M}+\heightof{M}+\heightof{M}]{bart_simpson}% } \begin{document} \lipsum[2] \columnratio{0.1,0.4} \begin{paracol}{3} \foto \switchcolumn \begin{flushleft} Amet ac, Aenean Ante a, Dui a. Adipiscing ad intervestibulum vestibulum. Condimentum a'est Leo Arcu cras Diam a. \end{flushleft} \switchcolumn \bigskip \begin{tabular}{r} \color{gray}\large 7 Augue dui Accumsan 96150 Taho\\ \ bart.simpson@mail.com \\ +33 671549730\\ \href{https://github.com/bart-simpson/}{\color{gray}{github.com/bart-simpson/}} \\ \href{https://www.linkedin.com/in/bart-simpson-3a7uvl65/}{\color{blue}{@bart-simpson-3a7uvl65/}} \\ \end{tabular} \end{paracol} \bigskip \setcolumnwidth{0.25\textwidth} \begin{paracol}{3} \foto \switchcolumn \begin{flushleft} Amet ac, Aenean Ante a, Dui a. Adipiscing ad intervestibulum vestibulum. Condimentum a'est Leo Arcu cras Diam a. \end{flushleft} \switchcolumn \bigskip \begin{tabular}{r} \color{gray}\large 7 Augue dui Accumsan 96150 Taho\\ \ bart.simpson@mail.com \\ +33 671549730\\ \href{https://github.com/bart-simpson/}{\color{gray}{github.com/bart-simpson/}} \\ \href{https://www.linkedin.com/in/bart-simpson-3a7uvl65/}{\color{blue}{@bart-simpson-3a7uvl65/}} \\ \end{tabular} \end{paracol} \lipsum[2] \end{document}
- Under `zref-clever`, command to retrieve name strings of a given reference type?by Peter LeFanu Lumsdaine on December 2, 2025 at 12:50 pm
I’m using zref-clever, and looking for a way to explicitly retrieve the various name strings associated to a given reference type — so I can write e.g. \zcrefgetstring{theorem}{Name-pl} and get “Theorems”. Presumably the package must already include some command that does roughly this, but as far as I can find, it’s not documented in the user manual, so must be internal-only. I am searching through the code, which is excellently documented but quite long and complex — so I am also asking here, either in case someone who knows the package better can give the answer quicker than I can find it, and (even if I find it first myself) to make the answer more easily searchable in future. MWE, showing approximate desired usage; expected output is hopefully clear: \documentclass{article} \usepackage{zref-clever} \newcommand{\zcrefgetstring}[2]{UNDEFINED} \begin{document} The reference type \texttt{theorem} has name \zcrefgetstring{theorem}{name-sg}. Capitalised and in plural, it is \zcrefgetstring{theorem}{Name-pl}. \end{document} Edit: I’ve tracked down the occurrence of this in reference typesetting to the calls to \__zrefclever_opt_tl_get:cNF inside \__zrefclever_type_name_setup:, but that invocation is heavily dependent on the context where it’s called during the reference-processing stack, and I haven’t yet figured out to invoke \__zrefclever_opt_tl_get successfully in an external context.
- Using \columnratio to set column width in a paracol with more than two columnsby user40960 on December 2, 2025 at 10:18 am
I want a three-column paracol environment where the second and third column have equal width and this width is three times the width of the first column. The command \columnratio seems indicated for this task. Unfortunately no example at all of their use is provided in the user manual. This older question gives a good, clear answer but only for two columns. Here are my failed attempts : \documentclass{article} \usepackage{paracol} \usepackage{lipsum} \usepackage{lmodern} \begin{document} \columnratio{1,3,3} \begin{paracol}{3} \lipsum[2] \switchcolumn \lipsum[2] \switchcolumn \lipsum[2] \end{paracol} \columnratio{3,3} \begin{paracol}{3} \lipsum[2] \switchcolumn \lipsum[2] \switchcolumn \lipsum[2] \end{paracol} \end{document}
- Biblatex-publist replacing all co-authors with et alby user383619 on December 2, 2025 at 5:40 am
When using biblatex-publist with a reference that has several authors, all co-authors are incorrectly replaced with a single "et al." See reference [1] in the screenshot for an example. What I expect is "with <name>" (as shown correctly in reference [2]) or "with <name> et al." (as shown correctly in reference [3]). Why does this happen? Is this a bug? If I use a different base style or specify maxnames=99, the problem goes away. But I don't think this is addressing the (potential) underlying bug. Here's an MWE. \documentclass{article} % \newcommand*\publistbasestyle{ieee} \usepackage[ style=publist, plauthorhandling=omit, nameorder=given-family, % maxnames=99 ]{biblatex} \plauthorname{Herrmann} \plauthorname{Kastenholz} \plauthorname{Murray} \addbibresource{biblatex-examples.bib} \begin{document} \nocite{herrmann,kastenholz,murray} \printbibliography[heading=none] \end{document}
- xcolor not fully colouring commutative diagrams drawn by tikzcdby Ishan Deo on December 2, 2025 at 3:12 am
I'm using xcolor in a table whose cells contain commutative diagrams drawn by tikzcd. However, the colour from xcolor is not fully going through these commutative diagrams, as can be seen by the image below Here is a MWP for the code \documentclass[12pt]{article} \usepackage[svgnames,table]{xcolor} \usepackage{tikz-cd} \begin{document} \begin{table} \centering \rowcolors{1}{Gray!10}{} \begin{tabular}{c} $\displaystyle \begin{tikzcd}[column sep=huge, ampersand replacement=\&] * \arrow[r, bend left = 40, "\,", ""{name=U, inner sep=1pt, below}] \arrow[r, bend right = 40, "\,"{below}, ""{name=D, inner sep=1pt}] \& \arrow[Rightarrow, from=U, to=D, "\alpha"] * \end{tikzcd}$ \end{tabular} \end{table} \end{document} Why is this error happening? And how can I fix it?
- cases environment with left brace boldedby Martín Moreno on December 2, 2025 at 3:11 am
I want a reformulation of the cases environment, where the left brace '{' is bolded. Could someone formulate the renewenvironment?
- LaTeX doesn't accept citations as numbers with Author-year referencesby hager moharram on December 1, 2025 at 9:28 pm
In Springer Nature submission guidelines, they require this style in referencing: Gamelin FX, Baquet G, Berthoin S, Thevenet D, Nourry C, Nottin S, Bosquet L (2009) Effect of high intensity intermittent training on heart rate variability in prepubescent children. Eur J Appl Physiol 105:731-738. https://doi.org/10.1007/s00421-008-0955-8 at the same time, they ask for this style in citation: 'This effect has been widely studied [1-3,7].' but no matter how I try to arrange my references like this, it doesn't show an author-year style. It shows either the numeric style in citation or the author-year style. Is it possible that the journal itself edits the manuscript to show references in this style? or am I doing something wrong? this is my MWE. I don't know what to put more to help as I am new in LaTeX. \usepackage{natbib} \documentclass[pdflatex,sn-mathphys-num]{sn-jnl}% Math and Physical Sciences Numbered Reference Style \bibliographystyle{spbasic} \bibliography{sn-bibliography} By the way I used every document class I can use, but without any results.
- AMSrefs incorrectly uses singular "ed." instead of "eds." for a second bibitem with the same editorsby LSpice on December 1, 2025 at 8:13 pm
The problem description is in the title: AMSrefs incorrectly uses singular "ed." instead of "eds." for a second bibitem with the same editors. I'm not sure if it's OK to report such bugs here, but I have done so successfully in the past, so hopefully this is OK, too. Here's a MWE (or maybe not really M, but hopefully acceptably brief): \documentclass{article} \usepackage{amsrefs} \begin{document} \begin{bibdiv} \begin{biblist} \bib{SGA-3.1}{book}{ editor={Demazure, Michel}, editor={Grothendieck, Alexander}, title={Sch\'emas en groupes. I: Propri\'et\'es g\'en\'erales des sch\'emas en groupes}, } \bib{SGA-3.2}{book}{ editor={Demazure, Michel}, editor={Grothendieck, Alexander}, title={Sch\'emas en groupes. II: Groupes de type multiplicatif, et structure des sch\'emas en groupes g\'en\'eraux}, } \end{biblist} \end{bibdiv} \end{document} The expected outcome is that the first entry is listed with "Michel Demazure and Alexander Grothendieck (eds.)", and the second entry is listed with "————— (eds.)". Actually the second entry is listed with "————— (ed.)".
- Multi-Column Subprotocol in Cryptocodeby Zachary Barbanell on December 1, 2025 at 7:51 pm
I'm trying to typeset a subprotocol that spans multiple columns (because it includes multiple of the parties in the original protocol) in Cryptocode (or even have an arbitrary box span multiple columns). An example of what I'd like it to look like follows: It seems like the only thing in cryptocode that spans multiple columns is \sendmessagerightx (and equivalently left), and I can't figure out how to make other things span multiple columns. The source code for \sendmessagerightx uses \multicolumn internally, but I can't figure out a way to use it directly - that would be a nice solution if it's possible. A minimum (non-)working example is below: \documentclass{article} \usepackage{cryptocode} \begin{document} \centering \boxed{ \procedure{Protocol}{ \mathsf{Alice} \< \mathsf{Bob} \\ \dots \< \dots \\ \> \sendmessageright*{} \> \\ \dots \< \dots \\ \boxed{ \begin{subprocedure} \procedure{Subprotocol}{ \dots \< \dots \\ \> \sendmessageright*{} \\ \dots \< \dots } \end{subprocedure} } \\ } } \end{document}
- aligning of equations near as long as linewidthby DraUX on December 1, 2025 at 6:08 pm
I stumbled upon a weird behavior in the aligning of equations almost as long as the \linewidth. As you can see in the MWE down below all the equations are of the same length except the 'o's of the 'equation' increasing. At some point the equation 'jumps' to the left and looses its centering. I tried to google it, but didn't find an answer on whats going on with the alignment. Is there a way of keeping the centering? \documentclass[11pt,a4paper]{scrartcl} \usepackage[showframe]{geometry} \usepackage{amsmath} \begin{document} \begin{equation} looooooooooooooooooooooooooooooooooooooooooooooooooooooong\ equation \end{equation} \begin{equation} looooooooooooooooooooooooooooooooooooooooooooooooooooooong\ equatioon \end{equation} \begin{equation} looooooooooooooooooooooooooooooooooooooooooooooooooooooong\ equatiooon \end{equation} \begin{equation} looooooooooooooooooooooooooooooooooooooooooooooooooooooong\ equatioooon \end{equation} \end{document}
- Splitting a sentence into characters (incl. spaces) and displaying each character in a tikz nodeby Ted Black on December 1, 2025 at 5:50 pm
I have written the following code using expl3 \documentclass{article} \usepackage{tikz} \ExplSyntaxOn \NewDocumentCommand{\boxedglyphs}{m} { \mgs_box_chars:n { #1 } } \cs_new_protected:Npn \mgs_box_chars:n #1 { \seq_set_split:Nnn \l_tmpa_seq {} {#1} \seq_map_inline:Nn \l_tmpa_seq { \mgs_box_one_char:n { ##1 } } } \cs_new_protected:Npn \mgs_box_one_char:n #1 { \tl_if_blank:nTF { #1 } {\tikz{\node[draw=red] {\textvisiblespace};}} {\tikz{\node[draw=red,inner~sep=0pt,outer~sep=0pt,minimum~height=2ex,] {#1};}} } \ExplSyntaxOff \newcommand{\new}{new} \begin{document} \boxedglyphs{Hello~brave~\new~world!} \end{document} The code is used to break a sentence in individual characters and/or words/subwords. The code works well except with spaces. The output I get is The code does not recognize blank spaces in \tl_if_blank; instead it just goes to the false branch and prints a node with a blank space. I am sure I am missing something elementary but having looked through the documentation of interface3 I am no wiser. Any hints would be appreciated.
- Section specific \thepage and \numpages for an exam class documentby BoiBhai on December 1, 2025 at 5:21 pm
I'm compiling past-year-questions of an examination into a question booklet and I've chosen to structure different years' question papers as different section contents of the exam class document. In the footer I currently display document level page numbering and totalling: Page \thepage of \numpages I want to be able to display section level page numbering and totalling: Page \thepage of \numpages Is there a way of accomplishing this? Below is a MWE of my current configuration. Also, what about at the subsection level? Note that in case of subsections, I might also create new subsection's within the questions environment. Would it work then? Thanks! \documentclass{exam} \begin{document} \footer{}{\thepage\ of \numpages}{} \section{2025} \begin{questions} \question What is my name? \newpage \question What is my age? \end{questions} \section{2024} \begin{questions} \question What is your name? \newpage \question What is your age? \end{questions} \end{document}
- datetime2 to display date in a custom formatby user1850133 on December 1, 2025 at 4:09 pm
I'm trying to setup the date style using datetime2. I want the code bits to display the date all these styles (I will use only one per document): Wednesday, 01^{st} December 2025 wednesday, 01st december 2025 wed. 01 dec. 2025. I must be able to display the current date or a given one. I took some solutions found on the web but I can't do what I want. The date displayed by the \maketitle macro is not displaying the date accordingly with the style setup. \documentclass{article} \usepackage[calc,showdow,english]{datetime2} \usepackage{polyglossia,fontsize,fix-cm} \setdefaultlanguage{english} \DTMnewdatestyle{mydateformat}{% \renewcommand{\DTMdisplaydate}[4]{% \DTMtweekdayname{##4},\space% \DTMmonthname{##2}\nobreakspace% (full) Month \number##3,\space% day, \number##1% year }% \renewcommand{\DTMDisplaydate}{\DTMdisplaydate}% } \title{document de test} \author{myself} \begin{document} \let\today\DTMtoday \today \DTMsetdatestyle{mydateformat} \maketitle \today \end{document}
- How to fix error `auto expansion is only possible with scalable fonts`? [duplicate]by Elia Immanuel Auer on December 1, 2025 at 3:47 pm
I'm on Windows 10 using MiKTeX. I have the following files: 1.tex: \documentclass{book} \usepackage{microtype} \usepackage[ backend=biber ]{biblatex} \addbibresource{bibliography.bib} \usepackage{etoolbox} \usepackage{amsthm} \usepackage{thmtools} \declaretheoremstyle[ headformat={\NUMBER \quad \NAME \quad \NOTE}, headpunct={} ]{mystyle} \makeatletter \declaretheorem[ numberlike=subsubsection, name=Theorem, refname={theorem, theorems}, Refname={Theorem, Theorems}, style=mystyle, postheadhook={ \addcontentsline{toc}{subsubsection}{\protect\numberline{\thesubsubsection} Theorem \ifdefempty{\thmt@optarg}{}{ : \thmt@optarg}} } ]{theoremaux} \newenvironment{theorem}[1][]{ \ifstrempty{#1}{ \begin{theoremaux}\leavevmode\par }{ \begin{theoremaux}[{#1}]\leavevmode\par } }{ \end{theoremaux} } \makeatother \begin{document} \chapter{Chapter} \section{Section} \subsection{Subsection} \begin{theorem}[Theorem {\cite[§ 1]{book}}] Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \end{theorem} \end{document} 2.tex: \documentclass{book} \usepackage{microtype} \usepackage[ backend=biber ]{biblatex} \addbibresource{bibliography.bib} \usepackage{etoolbox} \usepackage{amsthm} \usepackage{thmtools} \declaretheorem[ numberlike=subsubsection, name=Theorem, refname={theorem, theorems}, Refname={Theorem, Theorems}, style=definition, ]{theorem} \begin{document} \chapter{Chapter} \section{Section} \subsection{Subsection} \begin{theorem}[Theorem {\cite[§ 1]{book}}] Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \end{theorem} \end{document} bibliography.bib: @book{book, title = "Title", author = "Author", year = 2000, } I used to have a preamble similar to 1.tex. When I compile 1.tex, everything works perfectly. However, I was told that I should use a document layout that is more standard. Hence, I tried to do something like 2.tex. When I try to compile 2.tex, I get the following error: Chapter 1. [1{C:/Users/eliai/AppData/Local/MiKTeX/fonts/map/pdftex/pdftex.map} ! pdfTeX error (font expansion): auto expansion is only possible with scalable fonts. <argument> ...shipout:D \box_use:N \l_shipout_box \__shipout_drop_firstpage_... l.33 \end{document} ! ==> Fatal error occurred, no output PDF file produced! Transcript written on 2.log. How can I fix this error?
- Missing hyphens with IBM Plex fonts and `\DocumentMetadata`by chrispi_cookie on December 1, 2025 at 3:38 pm
I would like to use IBM Plex Serif (and other IBM Plex fonts) for my documents. Everything works fine without \DocumentMetadata. But if I use \DocumentMetadata TeX is hangry and eats all my hyphens. See the mwe and pdf output below. \DocumentMetadata{lang=de} \documentclass{article} \usepackage{unicode-math} \setmainfont{IBM Plex Serif} \begin{document} test test test test test test test test test test test test test test Schifffahrtsbauergasse \end{document} I'm aware of the discussion at GitHub regarding missing hyphens with \DocumentMetadata (https://github.com/latex3/tagging-project/issues/967). However, I have absolutely no real knowledge of fonts, other than that I use them. As this is the tagging repo I thought it has something to do with tagging. But even without tagging=on or no tagging option at all the hyphens are missing. The following workaround was described in the discussion, but I'm not sure if that is a good idea (and it doesn't work for me neither). \tagpdfsetup{activate/softhyphen=false} Is there something (maybe a working workaround) I can do to use IBM Plex together with \DocumentMetadata and correct hyphenation (and enable tagging) at the moment? If required I am using a current LaTeX version: LaTeX2e <2025-11-01> L3 programming layer <2025-11-14>
- Inconsistent headers in Classicthesis / KOMAscriptby Tibor Schneider on December 1, 2025 at 3:06 pm
I am experiencing extremely weird behavior with headers in my dissertation. Sometimes, the headers are applies, and sometimes not. This changes throughout the book, without any clear indication of a pattern (at least to me). My goal is it to have the chapter on the left, and the section on the right of the heading (pretty easy stuff). I use classicthesis (with my heavy modifications to get the layout I want) that relies on KOMAscript. For the headings specifically, I use the following commands: \renewcommand{\chaptermark}[1]{\markboth{#1}{}} % I use more complex formatting, but I simplify it for the log. \renewcommand{\sectionmark}[1]{\markright{#1}} % I use more complex formatting, but I simplify it for the log. \clearpairofpagestyles \lehead{\mbox{\llap{\small\textbf{\thepage}\kern4mm}\color{black}\leftmark\hfil}} \rohead{\mbox{\hfil{\color{black}\rightmark}\rlap{\kern4mm\small\textbf{\thepage}}}} \ofoot[]{} Now, once I compile (without notable warnings / errors), I can see that the headings update sometimes, but not always. I checked my document, and I never modify the way I generate the marks (except in the ToC before section 1, and in the Bibliography in the end of the document, and both times, I wrap them in a group). I have provided some screenshots of the behavior further down the post. Can someone help me debug this issue? Do you know what might be causing this weird behavior? Or do you know a work-around to get it to work nevertheless? Some info on the document Providing a MWE is difficult, as the document grew significantly over time. I will try my best to do so right now. In the meantime, here are a few snippets on the document: \documentclass[ twoside, openright, titlepage,% BCOR=5.5mm, paper=a5, 10pt, ]{book} \PassOptionsToPackage{twoside}{classicthesis-tibor} % my own style to change the layout \usepackage[% dottedtoc, eulerchapternumbers=true, % parts, pdfspacing, palatino=false, style=tibor, % my own style to change the layout ]{classicthesis} \geometry{ paperwidth=176mm, paperheight=246mm, top=33mm, bottom=33mm, inner=19mm, outer=63mm, bindingoffset=5.5mm, marginpar=38mm, marginparsep=6mm } My latex version: pdfTeX 3.141592653-2.6-1.40.27 (TeX Live 2025/nixos.org) Frustratingly, using the older distribution fixes the issues: pdfTeX 3.141592653-2.6-1.40.26 (TeX Live 2024/nixos.org) Debugging / Tracing To debug further, I instrumented the code with some debug output: \let\oldmarkboth\markboth \let\oldmarkright\markright \renewcommand\markboth[2]{\typeout{>>>>> markboth{#1}{#2}}\oldmarkboth{#1}{#2}} \renewcommand\markright[1]{\typeout{>>>>> markright{#1}}\oldmarkright{#1}} \let\oldchaptermark\chaptermark \let\oldsectionmark\sectionmark \renewcommand\chaptermark[1]{\typeout{>>>>> chaptermark{#1}}\oldchaptermark{#1}} \renewcommand\sectionmark[1]{\typeout{>>>>> sectionmark{#1}}\oldsectionmark{#1}} \usepackage{everypage} \AddEverypageHook{ \typeout{>>> page = \thepage} \typeout{>>> left = {\leftmark}} % is always wrapped inside \protect \foreignlanguage {english}{\protect \bbl@restore@actives \typeout{>>> right = {\rightmark}} % is always wrapped inside \protect \foreignlanguage {english}{\protect \bbl@restore@actives } In the following, I describe the behavior, and also give the logs that correspond to that section so you can see what things are called and when. I modify the logs slightly, replacing \protect \foreignlanguage {english}{\protect \bbl@restore@actives thingy with \STUFF. Just so you know it's there. Chapter 1 There are no headers at all (except the page numbers), but there are also no sections. (./chapters/introduction/main.tex Chapter 1. >>>>> chaptermark{Introduction} >>>>> markboth{\textit {Introduction}}{} >>> page = 1 >>> left = {} % <<< Here should be the result of markboth... >>> right = {} [1] >>> page = 2 >>> left = {} >>> right = {} [2] >>> page = 3 >>> left = {} >>> right = {} [3] >>> page = 4 >>> left = {} >>> right = {} [4]) Chapter 2 I get no chapter header. The section 2.2 is shown on the right, but for some reason is not updated (I start section 2.3, and 2.4 spanning over multiple pages, but the right header does not change). (./chapters/background/main.tex Chapter 2. >>>>> chaptermark{Background and Related Work} >>>>> markboth{Background and Related Work}{} (./chapters/background/internet-routing.tex >>>>> sectionmark{Internet Routing} >>>>> markright{Internet Routing} >>> page = 5 >>> left = {} % <<< Here should be the results of markboth. >>> right = {} % <<< Results of the first markright (Internet Routing) is ignored [5]) (./chapters/background/formal-methods.tex >>>>> sectionmark{Formal Methods for Network Management} >>>>> markright{Formal Methods for Network Management} (./chapters/background/figures/verification.tex Opening 'thesis.figlist' for writing. Opening 'thesis.makefile' for writing. Writing 'tikz/background-verification' to 'thesis.figlist'. Writing 'tikz/background-verification' to 'thesis.makefile'. ) >>> page = 6 >>> left = {} >>> right = {\STUFF{Formal Methods for Network Management}} % <<< Results of the second markright has made it here... [6] >>> page = 7 >>> left = {} >>> right = {\STUFF{Formal Methods for Network Management}} [7 <./build/tikz/background-verification.pdf>] (./chapters/background/figures/verification-smt.tex) >>> page = 8 >>> left = {} >>> right = {\STUFF{Formal Methods for Network Management}} [8{/nix/store/zqc1h9zagr58l7122lkq5qgkiw7h4234-texlive-combined-full-2025.20250703-texmfdist/fonts/enc/dvips/libertinust1math/libusMI.enc}{/nix/store/zqc1h9zagr58l7122lkq5qgkiw7h4234-texlive-combined-full-2025.20250703-texmfdist/fonts/enc/dvips/libertinust1math/libusMR.enc}] >>> page = 9 >>> left = {} >>> right = {\STUFF{Formal Methods for Network Management}} [9] >>> page = 10 >>> left = {} >>> right = {\STUFF{Formal Methods for Network Management}} [10]) (./chapters/background/models.tex >>>>> sectionmark{Models for Routing Protocols} >>>>> markright{Models for Routing Protocols} >>> page = 11 >>> left = {} >>> right = {\STUFF{Formal Methods for Network Management}} % <<< Results of the third markright (Models for Routing Protocols) is ignored again. [11{/nix/store/zqc1h9zagr58l7122lkq5qgkiw7h4234-texlive-combined-full-2025.20250703-texmfdist/fonts/enc/dvips/libertinust1math/libusSYM.enc}]) (./chapters/background/bgpsim.tex >>>>> sectionmark{An Efficient BGP Network Simulator} >>>>> markright{An Efficient BGP Network Simulator} >>> page = 12 >>> left = {} >>> right = {\STUFF{Formal Methods for Network Management}} % <<< Again, markright (An efficient BGP Network Simulator) is ignored [12] (./chapters/background/figures/overview.tex Writing 'tikz/bgpsim-overview' to 'thesis.figlist'. Writing 'tikz/bgpsim-overview' to 'thesis.makefile'. ) >>> page = 13 >>> left = {} >>> right = {\STUFF{Formal Methods for Network Management}} [13{/nix/store/zqc1h9zagr58l7122lkq5qgkiw7h4234-texlive-combined-full-2025.20250703-texmfdist/fonts/enc/dvips/libertine/lbtn_ggtxir.enc} <./build/tikz/bgpsim-overview.pdf>] >>> page = 14 >>> left = {} >>> right = {\STUFF{Formal Methods for Network Management}} [14] (./chapters/background/figures/running-time.tex) >>> page = 15 >>> left = {} >>> right = {\STUFF{Formal Methods for Network Management}} [15]) >>> page = 16 >>> left = {} >>> right = {\STUFF{Formal Methods for Network Management}} [16]) Chapter 3 Here, the chapter title makes it through. However, none of the section titles are shown, except the last one. (./chapters/state_iter/main.tex Chapter 3. >>>>> chaptermark{Guided Exploration of Routing States} >>>>> markboth{Guided Exploration of Routing States}{} (./chapters/state_iter/introduction.tex >>> page = 17 >>> left = {\STUFF{Guided Exploration of Routing States}} % <<< The chapter mark is finally here. >>> right = {} [17] >>> page = 18 >>> left = {\STUFF{Guided Exploration of Routing States}} >>> right = {} [18]) (./chapters/state_iter/overview.tex >>>>> sectionmark{Overview} >>>>> markright{Overview} >>> page = 19 >>> left = {\STUFF{Guided Exploration of Routing States}} >>> right = {} % <<< The section mark is missing [19] (./chapters/state_iter/figures/overview.tex (./chapters/state_iter/figures/overview_tree.tex) (./chapters/state_iter/figures/overview_graph.tex) (./chapters/state_iter/figures/overview_net.tex)) >>> page = 20 >>> left = {\STUFF{Guided Exploration of Routing States}} >>> right = {} [20{/nix/store/zqc1h9zagr58l7122lkq5qgkiw7h4234-texlive-combined-full-2025.20250703-texmfdist/fonts/enc/dvips/libertinust1math/libusEX.enc}] >>> page = 21 >>> left = {\STUFF{Guided Exploration of Routing States}} >>> right = {} [21] >>> page = 22 >>> left = {\STUFF{Guided Exploration of Routing States}} >>> right = {} [22]) (./chapters/state_iter/model.tex >>>>> sectionmark{Model of BGP} >>>>> markright{Model of BGP} >>> page = 23 >>> left = {\STUFF{Guided Exploration of Routing States}} >>> right = {} % <<< The section mark is missing [23] >>> page = 24 >>> left = {\STUFF{Guided Exploration of Routing States}} >>> right = {} [24] (./chapters/state_iter/figures/set_relations.tex)) (./chapters/state_iter/algorithm.tex >>>>> sectionmark{Backtracking Algorithm} >>>>> markright{Backtracking Algorithm} >>> page = 25 >>> left = {\STUFF{Guided Exploration of Routing States}} >>> right = {} [25] >>> page = 26 >>> left = {\STUFF{Guided Exploration of Routing States}} >>> right = {} [26] >>> page = 27 >>> left = {\STUFF{Guided Exploration of Routing States}} >>> right = {} [27] >>> page = 28 >>> left = {\STUFF{Guided Exploration of Routing States}} >>> right = {} [28]) (./chapters/state_iter/specification.tex >>>>> sectionmark{Supported Specifications} >>>>> markright{Supported Specifications} >>> page = 29 >>> left = {\STUFF{Guided Exploration of Routing States}} >>> right = {} % <<< The section mark is missing [29] >>> page = 30 >>> left = {\STUFF{Guided Exploration of Routing States}} >>> right = {} [30]) (./chapters/state_iter/evaluation.tex >>>>> sectionmark{Evaluation} >>>>> markright{Evaluation} >>> page = 31 >>> left = {\STUFF{Guided Exploration of Routing States}} >>> right = {} % <<< The section mark is missing [31] >>> page = 32 >>> left = {\STUFF{Guided Exploration of Routing States}} >>> right = {} [32] (./chapters/state_iter/figures/eval-network-size.tex Writing 'tikz/state-iter-eval-network-size' to 'thesis.figlist'. Writing 'tikz/state-iter-eval-network-size' to 'thesis.makefile'. ) >>> page = 33 >>> left = {\STUFF{Guided Exploration of Routing States}} >>> right = {} [33 <./build/tikz/state-iter-eval-network-size.pdf>] (./chapters/state_iter/figures/eval-num-external-networks.tex Writing 'tikz/state-iter-eval-num-external-networks' to 'thesis.figlist'. Writing 'tikz/state-iter-eval-num-external-networks' to 'thesis.makefile'. ) (./chapters/state_iter/figures/eval-failures.tex Writing 'tikz/state-iter-eval-failures' to 'thesis.figlist'. Writing 'tikz/state-iter-eval-failures' to 'thesis.makefile'. ) >>> page = 34 >>> left = {\STUFF{Guided Exploration of Routing States}} >>> right = {} [34 <./build/tikz/state-iter-eval-num-external-networks.pdf>] >>> page = 35 >>> left = {\STUFF{Guided Exploration of Routing States}} >>> right = {} [35 <./build/tikz/state-iter-eval-failures.pdf>] (./chapters/state_iter/figures/eval-config-complexity.tex) >>> page = 36 >>> left = {\STUFF{Guided Exploration of Routing States}} >>> right = {} [36] >>> page = 37 >>> left = {\STUFF{Guided Exploration of Routing States}} >>> right = {} [37] (./chapters/state_iter/figures/eval-router-ordering.tex Writing 'tikz/state-iter-eval-router-ordering' to 'thesis.figlist'. Writing 'tikz/state-iter-eval-router-ordering' to 'thesis.makefile'. ) >>> page = 38 >>> left = {\STUFF{Guided Exploration of Routing States}} >>> right = {} [38]) (./chapters/state_iter/conclusion.tex >>>>> sectionmark{Conclusion} >>>>> markright{Conclusion} ) >>> page = 39 >>> left = {\STUFF{Guided Exploration of Routing States}} >>> right = {\STUFF{Conclusion}} % <<< For some reason, the conclusion works??? [39 <./build/tikz/state-iter-eval-router-ordering.pdf>] >>> page = 40 >>> left = {\STUFF{Guided Exploration of Routing States}} >>> right = {\STUFF{Conclusion}} [40])
- Resumé with geometry and multicol - third column shifed to the rightby user40960 on December 1, 2025 at 2:42 pm
I'm using LaTeX to write my resumé. I chose the geometry and multicol packages as my main tools (although I'm open to solutions using other packages), the main reason for the geometry package is to save space because I need all the document gathered on one single page. The source code below does almost what I want, with the obvious defect being located in the three-column paragraph : there is too much space (wasted space) between the photo and the text in the second column, and as a result the contact data in the third column are pushed too far to the right. Any help appreciated. The icons (pdf and png) used in the LaTeX source are available at https://github.com/jonathandoyle58/some_icons \documentclass{article} \usepackage{tikz} \usepackage{calc} \usepackage[export]{adjustbox} \usepackage{marvosym} \usepackage{multicol} \usepackage{tcolorbox} \usepackage{xcolor} \usepackage[colorlinks = true, linkcolor = blue, urlcolor = blue, citecolor = blue, anchorcolor = blue]{hyperref} \newcommand*{\badge}{% \includegraphics[height=\heightof{M}+\heightof{M},valign=c]{badge}% } \newcommand*{\book}{% \includegraphics[height=\heightof{M}+\heightof{M}+\heightof{M},valign=c]{book}% } \newcommand*{\burette}{% \includegraphics[height=\heightof{M}+\heightof{M}+\heightof{M},valign=c]{burette}% } \newcommand*{\diploma}{% \includegraphics[height=\heightof{M}+\heightof{M}+\heightof{M},valign=c]{diploma}% } \newcommand*{\foto}{% \includegraphics[height=\heightof{M}+\heightof{M}+\heightof{M}+\heightof{M}+\heightof{M}+\heightof{M}+\heightof{M}+\heightof{M}+\heightof{M}+\heightof{M}+\heightof{M}+\heightof{M}]{bart_simpson}% } \newcommand*{\github}{% \includegraphics[height=\heightof{M}]{github_icon}% } \newcommand*{\glove}{% \includegraphics[height=\heightof{M}+\heightof{M}]{glove_498313}% } \newcommand*{\linkedin}{% \includegraphics[height=\heightof{M}]{linkedin_icon}% } \newcommand*{\manreading}{% \includegraphics[height=\heightof{M}+\heightof{M}+\heightof{M},valign=c]{manreading}% } \newcommand*{\manspeaking}{% \includegraphics[height=\heightof{M}+\heightof{M}+\heightof{M}+\heightof{M},valign=c]{manspeaking}% } \newcommand*{\pin}{% \includegraphics[height=\heightof{M}]{pin}% } \newcommand*{\sitting}{% \includegraphics[height=\heightof{M}+\heightof{M}+\heightof{M},valign=c]{sitting}% } \newcommand*{\spanner}{% \includegraphics[height=\heightof{M}+\heightof{M}]{spanner}% } \addtolength{\textwidth}{4cm} \addtolength{\textheight}{7cm} \addtolength{\hoffset}{-2cm} \addtolength{\voffset}{-3.5cm} \begin{document} \pagestyle{empty} \centerline{\color{cyan}\Huge \badge~Bart Simpson} \bigskip \centerline{\color{orange}\huge Adipiscing-Pellentesque dui} \bigskip \begin{center} Aenean adipiscing ac pellentesque amet ad intervenenatis dui, consequat a'at accumsan. Et ante condimentum eu aptent id auctor est convallis in mi aliquam arcu congue leo curabitur nam vestibulum ut dignissim. \end{center} \bigskip \begin{multicols}{3} \foto \columnbreak \begin{center} Amet ac, Aenean Ante a, Dui a. Adipiscing ad intervestibulum vestibulum. Condimentum a'est Leo Arcu cras Diam a. \end{center} \columnbreak \bigskip \begin{tabular}{r} \color{gray}\large \pin~7 Augue dui Accumsan 96150 Taho\\ \Letter\ bart.simpson@mail.com \\ \Telefon\ +33 671549730\\ \github \ \href{https://github.com/bart-simpson/}{\color{gray}{github.com/bart-simpson/}} \\ \linkedin \ \href{https://www.linkedin.com/in/bart-simpson-3a7uvl65/}{\color{blue}{@bart-simpson-3a7uvl65/}} \\ \end{tabular} \end{multicols} \setlength{\columnseprule}{1pt} \def\columnseprulecolor{\color{green}} \begin{tcolorbox}[ sharp corners=all, colback=white, colframe=green, size=tight, boxrule=1mm, left=3mm,right=3mm ] {\begin{multicols}{2} \ \newline \bigskip \centerline{\Large \burette~Experience} \bigskip \ \newline {\bf Pellentesque Amet} : Dui (Augue) , Ante - ad.arcu/at.cras \newline {\it\small Condimentum a'consectetur eu Diam a, Est Duis, Adipiscing} \ \newline \ \newline {\bf Augue pellentesque ad accumsan} : Class Bibendum, Dolor Eleifend, Amet - ante/arcu \newline \ \newline {\bf Adipiscing intervenenatis Aenean} Consequat Convallis, Curabitur - amet. ante / arcu cras \newline \bigskip \columnbreak \ \newline \bigskip \centerline{\Large \diploma~Training} \bigskip \noindent {\bf Augue interpulvinar ``Adipiscing-pellentesque a'sollicitudin''}, Class Aliquam Amet, dolor ante \newline \ \newline \ \newline {\bf Interpulvinar Augue}, Class.dui Amet, ad at/et/ante \newline \ \newline {\bf Accumsan ad intervenenatis}, Condimentum Amet a At Ante, arcu-cras\newline {\it\small Intervenenatis class, pellentesque. Consectetur eu sollicitudin a'id consequat aenean in ars} \newline \end{multicols}} \end{tcolorbox} \begin{tcolorbox}[ sharp corners=all, colback=white, colframe=green, size=tight, boxrule=1mm, left=3mm,right=3mm ] {\begin{multicols}{2} \ \newline %\bigskip \centerline{\Large \spanner~Skills} \ \newline %\bigskip {\bf Accumsan ad interpulvinar} Dui, Amet, A, Ante, Adipiscing, Augue. \newline \ \newline {\bf Augue-dui} Amet a, Est a, Consequat a \newline \ \newline {\bf Adipiscing} Aliquam, Aenean Amet, Aliquet, Ante ad Augue \newline \ \newline \columnbreak \ \newline \bigskip \centerline{\Large \manspeaking~Langues} \bigskip \ \newline {\bf Aliquam} Aliquet (consequat \& interpulvinar conubia) \newline \ \newline {\bf Consequat} Ad, aenean \newline \ \newline \end{multicols}} \end{tcolorbox} \begin{tcolorbox}[ sharp corners=all, colback=white, colframe=green, size=tight, boxrule=1mm, left=3mm,right=3mm ] {\begin{multicols}{2} \ \newline %\bigskip \centerline{\Large \glove~Soft skills} \smallskip \ \newline %\bigskip Interpulvinar, accumsan, aliquam \ \newline \ \newline \columnbreak \ \newline \bigskip \centerline{\Large \manreading~Hobbies} \bigskip \ \newline Condimentum ac adipiscing intervenenatis. Augue dui amet.interpulvinar \ \newline \end{multicols}} \end{tcolorbox} \end{document}
- How to precisely recreate a textbook page layout (Pattern Recognition and Machine Learning)by Jonutson on December 1, 2025 at 12:10 pm
\documentclass{book} \usepackage{xcolor} \usepackage{amsmath} \usepackage{graphicx} \setlength{\oddsidemargin}{\evensidemargin} \reversemarginpar \setcounter{chapter}{3} \setcounter{section}{1} \setcounter{page}{140} \begin{document} \begin{figure}[h] \centering \includegraphics[width=0.2\textwidth]{example-image} \caption{Examples of basis functions, showing polynomials on the left, Gaussians of the form (3.4) in the centre, and sigmoidal of the form (3.5) on the right.} \label{fig:3.1} \end{figure} \noindent on a regular lattice, such as the successive time points in a temporal sequence, or the pixels in an image. Useful texts on wavelets include Ogden (1997), Mallat (1999), and Vidakovic (1999). Most of the discussion in this chapter, however, is independent of the particular choice of basis function set, and so for most of our discussion we shall not specify the particular form of the basis functions, except for the purposes of numerical illustration. Indeed, much of our discussion will be equally applicable to the situation in which the vector $\boldsymbol{\phi}(\mathbf{x})$ of basis functions is simply the identity $\boldsymbol{\phi}(\mathbf{x}) = \mathbf{x}$. Furthermore, in order to keep the notation simple, we shall focus on the case of a single target variable $t$. However, in Section 3.1.5, we consider briefly the modifications needed to deal with multiple target variables. \subsection{Maximum likelihood and least squares} \hspace{1.6em}In Chapter 1, we fitted polynomial functions to data sets by minimizing a sum-of-squares error function. We also showed that this error function could be motivated as the maximum likelihood solution under an assumed Gaussian noise model. Let us return to this discussion and consider the least squares approach, and its relation to maximum likelihood, in more detail. As before, we assume that the target variable $t$ is given by a deterministic function $y(\mathbf{x}, \mathbf{w})$ with additive Gaussian noise so that \begin{equation} t = y(\mathbf{x}, \mathbf{w}) + \epsilon \label{eq:3.7} \end{equation} where $\epsilon$ is a zero mean Gaussian random variable with precision (inverse variance) $\beta$. Thus we can write \begin{equation} p(t|\mathbf{x}, \mathbf{w}, \beta) = \mathcal{N}(t|y(\mathbf{x}, \mathbf{w}), \beta^{-1}). \label{eq:3.8} \end{equation} Recall that, if we assume a squared loss function, then the optimal prediction, for a \marginpar{\textit{Section 1.5.5}} new value of $\mathbf{x}$, will be given by the conditional mean of the target variable. In the case of a Gaussian conditional distribution of the form (3.8), the conditional mean \end{document} I'm trying to recreate an exact page layout from a textbook in LaTeX and I'm encountering issues with the specific formatting required. I need the output to look identical to the attached image (Pattern Recognition and Machine Learning). The main problem is the indentation under the figures. I don't know how to create it and how to add the "Section 1.5.5" note. Please help.
- Giving the index a preface [duplicate]by rensemil on December 1, 2025 at 10:09 am
I am using the package imakeidx to make an index in my dissertation. This works as it should. I would like, however, to include a short preface between the index's heading and the actual index. How can this be done? In my preface I have \usepackage{imakeidx} \makeindex[columns=2, title=Index der zitierten Stellen, intoc] and in the appendix I include the index with \printindex Thanks in advance! Edit: This is a MWE: \documentclass[12pt]{book} \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} \usepackage{hyperref, imakeidx} \makeindex[columns=2, title=Index der zitierten Stellen, intoc] \begin{document} blalbalbalbedk\index{Enn. scaen.!39–53} blablalba\index{Enn. scaen.!132 f.} \printindex \end{document}
- Numbering only in a specific line of an align environment (without \tag or extra packages) [duplicate]by Sebastiano on December 1, 2025 at 9:56 am
I’m trying to number a system of equations using the amsmath package, but I would like the equation number to appear on a specific line within the align environment. In my example, I want the numbering to appear on the second line instead of the first one. Here is the code: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align}\label{498h} \mathcal{L}\left\{ t \cos(a t) \right\} & = \frac{ s^2 - a^2 }{ (s^2 + a^2)^2 } \int_0^t \frac{\partial{K(\sigma,\gamma)}}{\partial \sigma}K_L e(\sigma) \\ & = \frac{8 h^3}{a^3}-\frac{8 (h^2-1) h}{a^3}+\frac{16 u}{a^2} \end{align} I want the numered equation on the 2nd \eqref{498h} \end{document} I would like only the second line to be numbered, leaving the first one unnumbered. Moreover, I do not want to use additional packages or the \tag command or \nonumber. In general, for example, if I have 35 line of equation, how is it possible to put, the number in the 24-th equation? I have not checked whether a similar question has already been answered on the site. Thank you all!
- 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 \directlua{ 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).
- 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?