Week
- Is there an incompatibility between the lettrine and beamer packages?by AndréC on January 4, 2026 at 8:24 pm
The sentence below wraps to a new line too soon: the word "rapporteur" should not be on a new line. This problem occurs whenever the sentence is too long to fit on a single line. \documentclass[aspectratio=1610,12pt,french]{beamer} \usepackage[T1]{fontenc} \usepackage[french]{babel} \usepackage[locale=FR]{siunitx} \usepackage{lettrine} \usepackage{tikz} \usetikzlibrary{angles} \begin{document} \begin{frame}{} \lettrine[lraise=.25]{S}{ans} utiliser de rapporteur donner la mesure de chacun des angles sachant que $\widehat{xOz}=\ang{60}$. \bigskip \lettrine[lraise=.25]{S}{ans} utiliser de rapporteur donner la mesure de chacun des angles sachant que l'angle xOz mesure 60 degrés. \end{frame} \end{document} Here's what's displayed:
- Place the dotted line in a TOC after first line in KOMA-script scrbook-class with a twoline TOC-entryby Kubo on January 4, 2026 at 2:04 pm
I would like to adjust the appearance of a twoline-TOC entry with scrbook, a KOMA-script document-class. The option chapterentrywithdots enables »dotting« the chapter entry. The book is structured by time periods. This MWE \documentclass[headings=optiontoheadandtoc, toc=chapterentrywithdots]{scrbook} \usepackage{fontspec} \begin{document} \tableofcontents \chapter[tocentry={Chronicles\\January 2026}]{Chronicles} January 2026 \end{document} yields this for the TOC: However, would it be possible to place the dots after the first line (»Chronicles . . . . 3«)? Background: I want to have the specific dates highlighted in the TOC more strongly than in the actual chapter where it is only normalsized text. This is why the time periods are placed in the TOC in the first place; but the chapter-name itself is more important and shall lead to the page-number with dots.
- Change Text Color of Certain Lines in Algorithmic Environmentby M. McIlree on January 4, 2026 at 9:58 am
What I'm trying to do: I'm trying to change the text color of specific lines to highlight them in an algorithmic environment (using algpseudocodex package). \documentclass[12pt]{article} \usepackage{algpseudocodex} \usepackage{algorithm} \usepackage{xcolor} \begin{document} \begin{algorithm} \begin{algorithmic} \State This should not be colored \leavevmode {\color{red} \State This should be colored} \For{$a \in A$} \If{$a = 1$ (this should also be colored)} \State This should be colored \Else \State This should not be colored \EndIf \EndFor \end{algorithmic} \end{algorithm} \end{document} What I tried: Add \color{red} and \color{black} before and after the lines I want to color. This gives me Package varwidth: Failed to reprocess entire contents. Create a group as per this answer (i.e. \leavevmode {\color{red} \State This should be colored} Gives me Missing } inserted. Wrap text in \textcolor{} Does work for the statements but not if I want to color the if-then keywords as well Does anyone have any suggestions?
- tex4ebook: How to automatically adjust text size within tables?by Jack on January 3, 2026 at 10:41 pm
Similar to the challenges with long tables described here, I also struggle with wide tables consisting of several columns, as they tend to run out of the screen. Is there a way to fix the width of a table to the screen size and automatically reduce the text size accordingly? While \adjustbox, for example, is working for fitting graphics to the screen size, it does not work for tables in my case. I also tried \resizebox, but was unable to find a working solution there either. Is there a solution to avoid the table running out of the screen other than statically (e.g. with \footnotesize) reducing the text size? Here is an MWE: \documentclass{article} \usepackage{tabularx} \usepackage{tex4ebook} \begin{document} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \begin{tabularx}{\linewidth}{| l | l | l | l | X | l |} \hline \textbf{First column} & \textbf{Second column} & \textbf{Third column} & \textbf{Fourth column} & \textbf{Fifth column} & \textbf{Sixth column} \\ \hline Some text & More text & More text & More text & More text & More text \\ \hline Some text & More text & More text & More text & More text & More text \\ \hline \end{tabularx} \resizebox{\linewidth}{!}{ \begin{tabularx}{\linewidth}{| l | l | l | l | X | l |} \hline \textbf{First column} & \textbf{Second column} & \textbf{Third column} & \textbf{Fourth column} & \textbf{Fifth column} & \textbf{Sixth column} \\ \hline Some text & More text & More text & More text & More text & More text \\ \hline Some text & More text & More text & More text & More text & More text \\ \hline \end{tabularx} } \adjustbox{\linewidth}{ \begin{tabularx}{\linewidth}{| l | l | l | l | X | l |} \hline \textbf{First column} & \textbf{Second column} & \textbf{Third column} & \textbf{Fourth column} & \textbf{Fifth column} & \textbf{Sixth column} \\ \hline Some text & More text & More text & More text & More text & More text \\ \hline Some text & More text & More text & More text & More text & More text \\ \hline \end{tabularx} } \end{document}
- old-style numerals everywhere, including math modeby Phillip Helbig on January 3, 2026 at 6:30 pm
pdflatex Problem: need old-style numerals in main text Solution: \RequirePackage[osf]{newtxtext} Works fine in main text, but not in math mode. Problem: need old-style numerals also in math mode Solution: \DeclareMathSymbol{0}{\mathord}{letters}{0}` Works fine. Problem: need raised decimal point Solution: RequirePackage{decimal} Works fine as long as all numerals with a decimal point are in math mode, which is clear must be the case. That is not really relevant for the next problem, but it means that more numerals must be in math mode (unless I want 123$.$456 and so on). Problem: In text smaller or larger than normalsize, numerals are somewhat larger and bolder. Solution: Put all numerals in math mode if text is not normalsize. Remark: I noticed the problem since my tables are footnotesize. There, it's easy to get all numbers in math mode automatically, and it's only a minor problem that the numerals look a bit larger and bolder than they should. Problem: The user should not have to worry about whether the text is normalsize. Numbers in tables can be handled automatically. However, in an actual footnote numerals will differ in appearance whether or not they are in math mode. Ditto for text in any other size larger or smaller than normalsize. Note that the problem is NOT that the numerals are not scaling in math mode with the text. They are, whether the text is larger or smaller than normalsize. But they are always slightly larger and bolder than they should be (but not as large as the next larger size, nor as bold as boldfaceseries). Remark: I would be willing to switch to LuaLaTeX if I have to change little or nothing else. (I'll presumably have to use another font-selection mechanism and another font, but presumably there is a font similar to newtxtext and newtxmath.) In particular, the raised decimal point via the decimal package should still work (or there must be an easy alternative), and of course I still want old-style numerals not just in the main text but also in math mode. %class file \ProvidesClass{test}[2026/01/03] \LoadClass[8pt,twoside]{extarticle} \RequirePackage[T1]{fontenc} \RequirePackage[osf]{newtxtext} \RequirePackage{newtxmath} \RequirePackage{extsizes} \RequirePackage{fontsize} \changefontsize[10.2pt]{8.6pt} \DeclareMathSymbol{0}{\mathord}{letters}{`0} \DeclareMathSymbol{1}{\mathord}{letters}{`1} \DeclareMathSymbol{2}{\mathord}{letters}{`2} \DeclareMathSymbol{3}{\mathord}{letters}{`3} \DeclareMathSymbol{4}{\mathord}{letters}{`4} \DeclareMathSymbol{5}{\mathord}{letters}{`5} \DeclareMathSymbol{6}{\mathord}{letters}{`6} \DeclareMathSymbol{7}{\mathord}{letters}{`7} \DeclareMathSymbol{8}{\mathord}{letters}{`8} \DeclareMathSymbol{9}{\mathord}{letters}{`9} %user file \documentclass{test} \begin{document} \noindent Now is the time. 0123.456\\ Now is the time. $0123.456$ \noindent \tiny Now is the time. 0123.456\\ Now is the time. $0123.456$ \scriptsize \noindent Now is the time. 0123.456\\ Now is the time. $0123.456$ \footnotesize \noindent Now is the time. 0123.456\\ Now is the time. $0123.456$ \small \noindent Now is the time. 0123.456\\ Now is the time. $0123.456$ \normalsize \noindent Now is the time. 0123.456\\ Now is the time. $0123.456$ \large \noindent Now is the time. 0123.456\\ Now is the time. $0123.456$ \Large \noindent Now is the time. 0123.456\\ Now is the time. $0123.456$ \LARGE \noindent Now is the time. 0123.456\\ Now is the time. $0123.456$ \huge \noindent Now is the time. 0123.456\\ Now is the time. $0123.456$ \Huge \noindent Now is the time. 0123.456\\ Now is the time. $0123.456$ \end{document} \ProvidesFile{decimal.sty}[2011/06/03 v1.1 Package`decimal.sty'] \let\peri@d\. \def\.{\ifmmode\mbox{.}\else\expandafter\peri@d\fi} \DeclareMathSymbol{\cd@t}{\mathord}{symbols}{"01} \mathcode`\.="8000 {\catcode`\.=\active% \gdef.{\cd@t} } \endinput %% %% End of file `decimal.sty'.
- circuitikz: internal node annotations (maybe 'path picture'?) to a styled 'muxdemux'by cis on January 3, 2026 at 3:35 pm
I need a styled muxdemux like this. I asked myself: is it possible to get some annotations with path picture here (as a style addition)? For example a line and a node, which I only was able to add outside the style definition in the usual way. PS: Using a pic is clear; but that's a different topic. \documentclass[margin=5pt]{standalone} \usepackage{circuitikz} \begin{document} \begin{circuitikz}[] \ctikzset{muxdemux/outer label font={\tiny\ttfamily\color{blue}}} \tikzset{ mychip/.style={muxdemux, muxdemux def={ Lh=4, Rh=4, w=6,% sizes NR=0, NL=0, NB=3, NT=3,}, muxdemux label={ T1=T1, T2=T2, T3=T3, B1=B1, B2=B2, B3=B3, BR1=br1, BL1=bl1, BR2=br2, BL2=bl2, BR3=br3, BL3=bl3,% TR1=tr1, TL1=tl1, TR2=tr2, TL2=tl2, TR3=tr3, TL3=tl3,% }, alias=FG, % Does not have any effect ====================== path picture={%% \draw[red] (FG.bbpin 2) -- (FG.btpin 1) node[font=\tiny, align=center, midway, below, sloped] {internal annotation \\ works not}; },%% }, } \node[mychip]{chip}; \draw[brown] (FG.bbpin 2) -- (FG.btpin 3) node[font=\tiny, align=center, midway, below, sloped] {external annotation \\ works}; \end{circuitikz} \end{document}
- TikZ: overlay labels or nodes or unclip 'path picture'by cis on January 3, 2026 at 9:56 am
Is there a way, to overlay labels or nodes inside a path picture, so that I can see the text? \documentclass[margin=5pt]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[ test/.style={minimum width=6cm, minimum height=4cm, fill=lightgray, path picture={%% \draw[blue] (path picture bounding box.west) -- (path picture bounding box.east) coordinate[pos=0.3, label=center:B1](B1) coordinate[pos=0.6, label=center:B2(all good)](B2) coordinate[pos=0.9, label=center:B2](B3); % How to overlay labels here? ============= \draw[red] (path picture bounding box.north west) -- (path picture bounding box.north east) coordinate[pos=0.3, label={[overlay]center:A1}](A1)% no effect coordinate[pos=0.6, label=center:A2(not good)](A2) coordinate[pos=0.9, label=center:A2](A3); },%% }, ] \node[test]{}; \end{tikzpicture} \end{document}
- TikZ: grid at certain x- and y-positionsby cis on January 3, 2026 at 9:45 am
I want to create a 6x5 dotted grid over an area with clearly defined width and height (\w and \h). Can I configure the grid to only display points at the intersections of the horizontal and vertical lines? I only get that with dash pattern=on 0pt off \w/6, for the x-positions. What do I have to do? By the way: I'm wondering, as a task out of pure interest, how one can adjust the grid. It's clear how to manually create the image using foreach-loops. \documentclass[margin=5pt]{standalone} \usepackage{tikz} \pgfmathsetlengthmacro\w{2cm} \pgfmathsetlengthmacro\h{3.2cm} \begin{document} \begin{tikzpicture}[] \draw[] (0,0) rectangle (\w,\h) node[anchor=south east, align=center]{ Dots only at \\ all intersections \\ of the horizontals \\ and the verticals}; \draw[orange, xstep=\w/6, ystep=\h/5] (0,0) grid (\w,\h); \end{tikzpicture} \begin{tikzpicture}[] \draw[] (0,0) rectangle (\w,\h); \draw[orange, xstep=\w/6, ystep=0*\h/5, % Dotted Style: line width=1.0pt, dash pattern=on 0pt off \w/6, line cap=round, ] (0,0) grid (\w,\h); \end{tikzpicture} \end{document}
- How to make latexmk run only onceby Clara on January 3, 2026 at 7:16 am
I now have a file with the following contents. Normally, I can run pdflatex main to compile. When compiling for the second time, the previous auxiliary file will be loaded, and everything is normal. I have a clear demand now, that is, by configuring latexmkrc file, when running latexmk command, it is the same as running pdflatex main directly. At present, when running latexmk, the default rule will be triggered, resulting in that even if running latexmk for the second time, the directory will not be generated. % main.tex \documentclass{article} \begin{document} \tableofcontents \section{111} \subsection{222} \section{333} \end{document} $pdf_mode = 1; $max_repeat = 1; @default_files = ('main'); >latexmk Initial Win CP for (console input, console output, system): (CP936, CP936, CP936) I changed them all to CP936 Rc files read: latexmkrc Latexmk: This is Latexmk, John Collins, 15 June 2025. Version 4.87. No existing .aux file, so I'll make a simple one, and require run of *latex. Latexmk: applying rule 'pdflatex'... Rule 'pdflatex': Reasons for rerun Category 'other': Rerun of 'pdflatex' forced or previously required: Reason or flag: 'Initial setup' ------------ Run number 1 of rule 'pdflatex' ------------ ------------ Running 'pdflatex -recorder "main.tex"' ------------ This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode (./main.tex LaTeX2e <2025-11-01> L3 programming layer <2025-11-14> (c:/texlive/2025/texmf-dist/tex/latex/base/article.cls Document Class: article 2025/01/22 v1.4n Standard LaTeX document class (c:/texlive/2025/texmf-dist/tex/latex/base/size10.clo)) (c:/texlive/2025/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def) (./main.aux) No file main.toc. [1{c:/texlive/2025/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./main.aux) )<c:/texlive/2025/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb><c:/texl ive/2025/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb> Output written on main.pdf (1 page, 18866 bytes). Transcript written on main.log. Latexmk: Getting log file 'main.log' Latexmk: Examining 'main.fls' Latexmk: Examining 'main.log' Latexmk: Missing input file 'main.toc' message in .log file: No file main.toc. Latexmk: Log file says output to 'main.pdf' Latexmk: Using bibtex to make bibliography file(s). Latexmk: applying rule 'pdflatex'... Rule 'pdflatex': Reasons for rerun Changed files or newly in use/created: main.aux main.toc Latexmk: Maximum runs of pdflatex reached without getting stable files Latexmk: Errors, so I did not complete making targets ---------------------- This message may duplicate earlier message. Latexmk: Failure in processing file 'main': 'pdflatex' needed too many passes ---------------------- Latexmk: Sometimes, the -f option can be used to get latexmk to try to force complete processing. But normally, you will need to correct the file(s) that caused the error, and then rerun latexmk. In some cases, it is best to clean out generated files before rerunning latexmk after you've corrected the files. C:\texlive\2025\bin\windows\runscript.tlu:933: command failed with exit code 12: perl.exe c:\texlive\2025\texmf-dist\scripts\latexmk\latexmk.pl I know some people may say, since you only run it once, there is no need to use latexmk, just use the pdflatex command. However, the scene I have encountered at present is that I can only execute latexmk command, so I need to configure latexmkrc file to achieve the same effect.
- How to make title visible, tcolorboxby user386618 on January 2, 2026 at 10:04 pm
I'm trying to create a hexagon frame, here what i did. \documentclass[12pt]{article} \usepackage[english, russian]{babel} \usepackage[most]{tcolorbox} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tcolorbox}[enhanced, width=\linewidth, attach boxed title to top left={xshift=5mm, yshift=-3.5mm, yshifttext=-1mm}, frame hidden, colback=white, coltitle=green, fonttitle=\large\bfseries\color{green}, boxed title style={frame hidden, colback=white}, title=Идея, underlay={ \draw[draw=green, line width=2pt, fill=green!20] (0.4,0)--(frame.west)--($(frame.north)+(frame.west)-(frame.center)+(0.4,0)$)--($(frame.north)+(frame.east)-(frame.center)-(0.4,0)$)--(frame.east)--($(frame.south)+(frame.east)-(frame.center)-(0.4,0)$)--cycle; \draw[draw=green, line width=2pt, fill=white] ($(title.south)+(title.west)-(title.center)+(0.4,0)$)--(title.west)--($(title.north)+(title.west)-(title.center)+(0.4,0)$)--($(title.north)+(title.east)-(title.center)-(0.4,0)$)--(title.east)--($(title.south)+(title.east)-(title.center)-(0.4,0)$)--cycle;}] Hexagon box Hexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon boxHexagon box \end{tcolorbox} \end{document} I'm quite fine with that, unless the title is below the figure. How to make it visible? Also i want to receive any advice from comunity how to make code from this particullar frame better
- Smartly break text into cells in naked longtblr environment?by Explorer on January 2, 2026 at 12:25 pm
I want a smartly breakable longtblr, but I have to manually assign a breaking point now. What I want is as follows: \documentclass{article} \usepackage[showframe,paperheight=10cm]{geometry} \usepackage{lipsum} \usepackage{tabularray} \usepackage{xcolor} \NewTblrTheme{naked}{ \DefTblrTemplate{foot}{empty}{} \SetTblrTemplate{foot}{empty} \DefTblrTemplate{head}{empty}{} \SetTblrTemplate{head}{empty} } \NewTblrEnviron{mytblr} \SetTblrOuter[mytblr]{long,theme=naked,presep=2pt} \begin{document} \lipsum[2]\lipsum[2] \begin{mytblr}{ hlines={red},vlines={red}, colspec={X[l,m]},width=\linewidth } I can eat the glass and it doesn't hurt me. I can eat the glass and it doesn't hurt me. I can eat the glass and it doesn't hurt me. I can eat the glass and it doesn't hurt me. I can eat the glass and it doesn't hurt me. I can eat the glass and it doesn't hurt me. I can eat the glass and it doesn't hurt me. I can eat the glass and it doesn't hurt me. I can eat the glass and it doesn't\\ hurt me.%<--- I want smart break at here I can eat the glass and it doesn't hurt me. I can eat the glass and it doesn't hurt me. I can eat the glass and it doesn't hurt me.\\ \lipsum[2] \end{mytblr} \lipsum[2] \end{document} I hope that only with \lipsum, the longtblr could automatically break into two or three "cell"s. \documentclass{article} \usepackage[showframe,paperheight=10cm]{geometry} \usepackage{lipsum} \usepackage{tabularray} \usepackage{xcolor} \NewTblrTheme{naked}{ \DefTblrTemplate{foot}{empty}{} \SetTblrTemplate{foot}{empty} \DefTblrTemplate{head}{empty}{} \SetTblrTemplate{head}{empty} } \NewTblrEnviron{mytblr} \SetTblrOuter[mytblr]{long,theme=naked,presep=2pt} \begin{document} \lipsum[2]\lipsum[2] \begin{mytblr}{ hlines={red},vlines={red}, colspec={X[l,m]},width=\linewidth } \lipsum[2]\\ \lipsum[2] \end{mytblr} \lipsum[2] \end{document} It's NOT okay when I just use a bunch of text: \lipsum[2], I still need to manually decide the breaking point. Edited Since cfr wonder what is that actually for, I have the following example: I want to mimic some applicant table's template, it organize contents into breakable cells...
- How can I make the marginnote appear on the margin side of the column they were called from in a two-column book?by stefaniecg on January 2, 2026 at 11:39 am
My problem is that in a two-column book, when the marginnote is placed as the last word (or near the last word) of the left column line end, the note jumps to the right margin instead of being placed on the left margin. How can I make the marginnote appear on the margin side of the column they were called from in a two-column book? \documentclass{book} \usepackage{lipsum} \usepackage{geometry} \usepackage{marginnote} \begin{document} \newgeometry{left=20mm,right=20mm,top=20mm,bottom=20mm,twocolumn=true,marginparwidth=15mm} \edef\marginnotetextwidth{\the\textwidth} \chapter{A short story} Lorem ipsum ipsum \marginnote{ok1} OK1 dolor sit amet, consectetuer adipiscingelit. Ut purus elit, vestibulum ut, \marginnote{wrong1} WRONG1 placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. \marginnote{wrong2} WRONG2 Mauris utleo. Cras viverra metus rhoncus sem. Nulla et lectusvestibulum urna fringilla ultrices. Phasellus eu tellussit amet tortor gravida placerat. Integer sapien est,iaculis in, pretium quis, viverra ac, nunc. Praesenteget sem vel leo ultrices bibendum. \marginnote{ok2} OK2 Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollisac, nulla. Curabitur auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue eu, accumsaneleifend, sagittis quis, diam. Duis eget orci sit ametorci dignissim rutrum. \lipsum[1-3] Lorem ipsum dolor sit amet, consectetuer adipiscingelit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam \marginnote{ok3} OK3 arcu libero, nonummy eget, consectetuer id, vulputate a, magna. \marginnote{ok4} OK4 Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris utleo. Cras \marginnote{ok5} OK5 viverra metus rhoncus sem. Nulla et lectusvestibulum urna fringilla ultrices. Phasellus eu tellussit amet tortor gravida placerat. Integer sapien est,iaculis in, pretium quis, viverra ac, nunc. Praesenteget sem vel leo ultrices bibendum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollisac, nulla. Curabitur auctor semper nulla. Donec varius orci eget risus \marginnote{ok6} OK6. Duis nibh mi, congue eu, accumsaneleifend, sagittis quis, diam. Duis eget orci sit ametorci dignissim rutrum. \end{document}
- Tikz calendar customisationby Louis on January 2, 2026 at 8:45 am
I copied the code from Calendar with tikz and modified it to my requirements: Day abbreviations (successful). Bold for weekends (Successful). Translate month names (Unsucessful) [I also translated it in ./translator-months-dictionary-Afrikaans.dict] Highlight holidays with underline (Unsucessful) [I actually would like to circle them or shade them with light-grey (my colour printer is out of ink). The code is: \documentclass[border=5]{standalone} %\usepackage[afrikaans]{babel} \usepackage{polyglossia} \setdefaultlanguage[]{afrikaans} \usepackage[afrikaans]{translator} \usepackage{tikz} \setmainfont{FreeSerif} \usetikzlibrary{positioning,calendar} \usepackage{ulem} \ProvidesDictionary{translator-months-dictionary}{afrikaans} \providetranslation{January}{Januarie} \providetranslation{February}{Februarie} \providetranslation{March}{Maart} \providetranslation{April}{April} \providetranslation{May}{Mei} \providetranslation{June}{Junie} \providetranslation{July}{Julie} \providetranslation{August}{Augustus} \providetranslation{September}{September} \providetranslation{October}{Oktober} \providetranslation{November}{November} \providetranslation{December}{Desember} \providetranslation{Jan}{Jan} \providetranslation{Feb}{Feb} \providetranslation{Mar}{Mar} \providetranslation{Apr}{Ebr} \providetranslation{May}{Mei} \providetranslation{Jun}{Jun} \providetranslation{Jul}{Jul} \providetranslation{Aug}{Aug} \providetranslation{Sep}{Sep} \providetranslation{Oct}{Okt} \providetranslation{Nov}{Nov} \providetranslation{Dec}{Des} \pgfkeys{/tikz/bold/.code = {\bfseries{#1}}} \pgfkeys{/tikz/highlight/.code = {\uline{#1}}} \colorlet{darkgreen}{green!50!black} %\colorlet{holiday}{black!50} \newcommand{\calrow}[1]{\node[anchor=base east](Mon){M}; \node[base right=of Mon](Tue){D}; \node[base right=of Tue](Wed){W}; \node[base right=of Wed](Thu){D}; \node[base right=of Thu](Fri){V}; \node[base right=of Fri](Sat){S}; \node[base right=of Sat](Sun){S}; \node[darkgreen, above=of Thu]{\textbf{#1}};} \newcommand{\calperiod}[2][\currentyear]{% \calendar[dates=\currentyear-#2-01 to \currentyear-#2-last] if (weekend) [bold] \holidays;} \edef\currentyear{\the\year} \newcommand{\holidays}{% if (equals=01-01) [highlight]% if (equals=04-03) [bold]% if (equals=04-06) [bold]% if (equals=04-27) [bold]% if (equals=05-01) [bold]% if (equals=06-16) [bold]% if (equals=08-09) [bold]% if (equals=08-10) [bold]% if (equals=09-24) [bold]% if (equals=12-16) [bold]% if (equals=12-25) [bold]% if (equals=12-26) [highlight]% } \begin{document} \begin{tikzpicture}[scale=2, every calendar/.style={week list}, every holiday/.style={font=\bfseries}, year label/.style={ fill=white,text=darkgreen,font=\bfseries\Large }, current year/.store in=\currentyear, current year=2026 ] \matrix[% row 1/.style={darkgreen,node distance=.3ex},% row 3/.style={darkgreen,node distance=.3ex}, row 5/.style={darkgreen,node distance=.3ex}, row 7/.style={darkgreen,node distance=.3ex}, column sep=1ex,% draw=darkgreen,thick,rounded corners=5pt,% append after command={ \pgfextra{\edef\matrixname{\tikzlastnode}} node [year label/.try, right=1ex of \matrixname.south west] {\currentyear} node [year label/.try, right=1ex of \matrixname.north west] {\currentyear} node [year label/.try, left=1ex of \matrixname.south east] {\currentyear} node [year label/.try, left=1ex of \matrixname.north east] {\currentyear} } ]{% % first row: week day and month \calrow{January} & \calrow{February} & \calrow{March} \\ \calperiod{01} & \calperiod{02} & \calperiod{03} \\[1ex] % second row: calendar \calrow{April} & \calrow{May} & \calrow{June} \\ \calperiod{04} & \calperiod{05} & \calperiod{06} \\[1ex] % third row: week day and month \calrow{July} & \calrow{August} & \calrow{September} \\ \calperiod{07} & \calperiod{08} & \calperiod{09} \\[1ex] % forth row: calendar \calrow{October} & \calrow{November} & \calrow{December} \\ \calperiod{10} & \calperiod{11} & \calperiod{12} \\[1ex]\\ }; \end{tikzpicture} \end{document} This gives:
- which is better to use \pgfmathsetmacro or \tikzmath to do some calculations in Tikz?by Nasser on January 1, 2026 at 10:28 pm
My goal for the new year is to learn how to add and multiply numbers in tikz. Found one can use something like this \pgfmathsetmacro{\result}{int(2000-\i*50)}; \node[labelstyle] at (dot-\i.west) {year \result}; vs \tikzmath { \result= int((2000-\i*50)); {\node[labelstyle] at (dot-\i.west) {year \result};}; } Both produce same output Since I will be doing lots of calculations, which method is the better method to use? Is there a third method to look at which can be better/easier to use? complete MWE for first method \documentclass[border=10pt]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[ dot/.style={circle, fill=black, inner sep=1.5pt}, % Style for the black dots labelstyle/.style={left, font=\small} % Style for the labels (positioned to the left) ] % Define start and end points for the vertical line \coordinate (Start) at (0, 0); \coordinate (End) at (0, 11); % Draw the vertical line \draw (Start) -- (End); % Use a foreach loop to place equally spaced dots and labels \foreach \i in {0, 1, ..., 11} { % Place the dot as a node on the line \node[dot] (dot-\i) at (0, \i) {}; % Place the label to the left of the dot % The "left" anchor ensures the label sits to the left of the dot node \pgfmathsetmacro{\result}{int(2000-\i*50)}; \node[labelstyle] at (dot-\i.west) {year \result}; } \end{tikzpicture} \end{document} Complete MWE for the second method \documentclass[border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{math} \begin{document} \begin{tikzpicture}[ dot/.style={circle, fill=black, inner sep=1.5pt}, % Style for the black dots labelstyle/.style={left, font=\small} % Style for the labels (positioned to the left) ] % Define start and end points for the vertical line \coordinate (Start) at (0, 0); \coordinate (End) at (0, 11); % Draw the vertical line \draw (Start) -- (End); % Use a foreach loop to place equally spaced dots and labels \foreach \i in {0, 1, ..., 11} { % Place the dot as a node on the line \node[dot] (dot-\i) at (0, \i) {}; % Place the label to the left of the dot % The "left" anchor ensures the label sits to the left of the dot node \tikzmath { \result= int((2000-\i*50)); {\node[labelstyle] at (dot-\i.west) {year \result};}; } } \end{tikzpicture} \end{document} TL 2025
- Aligning across multiple casesby BGreen on January 1, 2026 at 9:51 pm
I would like to give two case-based equations and have them aligned. I've tried several different ways of doing it and always end up with something like this: \begin{equation}\begin{aligned} A & = \left\{\begin{matrix} bb \, , & q=0 \\ c \, , & q\ge1 \end{matrix}\right. \\ D & = \left\{\begin{matrix} ee \, , & q=0 \\ f \, , & q=1 \\ gggggg \, , & q\ge2 \end{matrix}\right. \end{aligned}\end{equation} The issue is that I want to have the bracket outside the matrix, so it can fit the size of the separate cases, and I also want to have the conditions aligned with one another, but I cannot do this unless they are not separated into two matrices for the brackets. I also need to have the expressions on the left side of the cases centered properly. Also, I would like to have the different cases to be left-aligned How can I have all three - the centered expressions on the left with properly-sized brackets, the aligned conditions, and the left-aligned cases?
- Images bookleafby Jack on January 1, 2026 at 9:04 pm
I have some wide figures that I would like to set on facing pages so they can be compared. In this example the images fall on pages 3 and 4 which are overleaf. The images are a CFD profile and the equivalent bench-test results. \documentclass[a4paper,twoside]{ociamthesis} % Include necessary packages \usepackage[utf8]{inputenc} \usepackage{graphicx} \usepackage{float} \usepackage{lipsum} % ... any other packages you need \begin{document} \chapter{Introduction} The figures fall overleaf from each other, which makes comparison awkward \lipsum[] \begin{figure} \centering \includegraphics[width=1\linewidth]{example-image} \caption{bench} \label{fig:placeholder} \end{figure} \begin{figure} \centering \includegraphics[width=1\linewidth]{example-image} \caption{Enter Caption} \label{fig:placeholder} \end{figure} \end{document}
- How to get spaced dots in unicode-mathby dedded on December 31, 2025 at 3:10 pm
The unicode-math package re-defines ellipsis to be the ellipsis character in whatever font you're using, instead of spaced dots. This looks bad in my opinion, and violates the guidance on ellipses in every style guide I own. A solution for \ldots is provided here: variations-in-ldots. But that solution does not fix \cdots, \vdots, or \ddots. I managed to find a solution for \cdots that works in this MWE, but seems to fail in other instances that I haven't figured out a reliable way to reproduce. And I can't figure out a solution for \vdots or \ddots at all. \documentclass{article} \usepackage{unicode-math} \AtBeginDocument{ % From https://tex.stackexchange.com/questions/120627/variations-in-ldots \renewcommand\mathellipsis{\mathinner{\ldotp\ldotp\ldotp}} \renewcommand\cdots{\mathinner{\cdotp\cdotp\cdotp}} % sometimes works %\renewcommand\vdots{\mathinner{\vdotp\vdotp\vdotp}} % doesn't work %\renewcommand\ddots{\mathinner{\ddotp\ddotp\ddotp}} % doesn't work } \begin{document} $\dots, \ldots, \cdots, \vdots, \ddots$ \end{document} Found an example of where my solution for \cdots didn't work. It's when \dots is used instead of \cdots explicitly to centrally place dots: \documentclass{article} \usepackage{unicode-math} \AtBeginDocument{ \renewcommand\mathellipsis{\mathinner{\ldotp\ldotp\ldotp}} \renewcommand\cdots{\mathinner{\cdotp\cdotp\cdotp}} % sometimes works } \begin{document} $x+\dots+ y$ % Do not get spaced dots $x+\cdots+ y$ % Do get spaced dots \end{document}
- Pic or Shape for collection of ready to use objects?by Sammy on December 31, 2025 at 2:25 pm
For the graphics I use on my physics exercise sheets made with TikZ I often use the same objects (hooks, masses, carts, pulleys, force gauges,...). So instead of copy-pasting and modifying the code of these objects I think it makes sense to make them into a ready to use object. There are three ways I know of to make that happen: TeX macros, pics and shapes. There are some features I wish the implementation of these objects to have and need some advice on how to implement it in order to have those features: An object should have multiple anchors so I can easily use certain points for further construction and choose which anchor to use for the placement (so there is no need to calculate that stuff manually). The hook for example could be placed at it's base or the actual hook and either one should be available afterwards for further placement of objects or paths. A default style should be set, i.e. the fill color or shading of the mass body, that can be overwritten. If placed inside a scope that changes shift, rotation, scale, line width,... these changes should automatically also apply to the object as a whole. I want to be able to construct new objects from already existing objects, i.e. I want to be able to use the hook as part of the mass, force gauge and cart. Right now I'm leaning towards defining new shapes, even tho I haven't used low level pgf before. As far as I can see 1 and 3 are no problem with shapes. I feel like 2 could also be achieved (any hints are appreciated - maybe defining a new style that uses that shape?). I however have no Idea if or how to make 4 work in defining a new shape. Pics on the other hand would make 2 and 4 easy as far as I can imagine. But they don't respond to the settings of a scope (3). Also anchors (1) are not natively supported but using tikzmark one answer to this question Anchoring TiKZ pics suggests this could be achieved as well (although I imagine it to be not quite as powerful as a new shape and takes two compilation runs if I understood correctly). Any thoughts, hints or pieces of advice are very welcome. I hope I described the setting clear enough. Edit The following Example is not meant to be beautiful but hopefully helps to illustrate the issue: \documentclass[tikz]{standalone} \usetikzlibrary{calc} \usetikzlibrary{tikzmark} \begin{document} \tikzset{ hook/.pic={ \draw[double=gray!80, double distance=1.4pt] (0,0) .. controls (0,-1.5) and (0,{1/sin(45)-2.5}) .. ($(45:1)+(0,-2.5)$) arc(405:140:1); \node[inner sep=2mm] (-hole) at (0,-2.5) {}; } } \tikzset{ cart/.pic={ \shadedraw[left color=blue, right color=blue!50] (-3,0) rectangle (3,2); \shadedraw[left color=black, right color=gray] (2,-.8) circle (.8); \shadedraw[left color=black, right color=gray] (-2,-.8) circle (.8); \pic[transform shape,rotate=90,scale=.5] (h) at (3,1) {hook}; \coordinate (-front-wheel) at (2,-1.6); \coordinate (-back-wheel) at (-2,-1.6); \node[inner sep=2mm] (-hook) at (h-hole) {}; } } \begin{tikzpicture} \draw (0,0) -- (8,0) -- (8,2); \pic[pic anchor=(-back-wheel),scale=.5] (cart) at (.5,0) {cart}; \pic[rotate=270,xscale=-1,scale=.25] (hook) at (8,0|-cart-hook) {hook}; \draw[ultra thick, line cap=round] (cart-hook) -- (hook-hole); \end{tikzpicture} \end{document} So using a pic with tikzmark (and transform shape as I've discovered) seems to check all the requirements. Can this also be achieved with a custom shape? As in this solution I dislike a few things: tikzmark needs two compilation runs no border anchors can be defined (at least I don't know how) It seems to me all anchors are defined every time a pic is inserted and not calculated when needed as with shapes. I'm not sure about the impacts on compilation time.
- The table is not centering in the itemby M. Logic on December 31, 2025 at 12:18 pm
A MWS is as following. \documentclass{article} \renewcommand{\labelenumi}{(\theenumi)} \usepackage{enumitem} \setenumerate[1,2,3]{itemsep=0pt,partopsep=0.3\baselineskip plus 0.2ex minus 0.1ex,parsep=0pt,topsep=0pt} \setitemize[1,2,3]{itemsep=0pt,partopsep=0.3\baselineskip plus 0.2ex minus 0.1ex,parsep=0pt,topsep=0pt,align=left} \setdescription[1,2,3]{itemsep=0pt,partopsep=0.3\baselineskip plus 0.2ex minus 0.1ex,parsep=0pt,topsep=0pt,align=left} \setlist[enumerate]{leftmargin=2em,align=left,labelwidth=2em,labelsep=0em}%\parindent=2em \setlist[itemize]{leftmargin=1em,align=left,labelwidth=1em,labelsep=0em} \setlist[description]{leftmargin=2em,align=left,labelwidth=1em,labelsep=1em} \usepackage{amsthm} \theoremstyle{theorem} \newtheorem{theorem}{Theorem}[section] \theoremstyle{definition} \newtheorem{definition}[theorem]{Definition} \newtheorem{remark}[theorem]{Remark} \usepackage{longtable, makecell, booktabs, multicol, multirow} \usepackage{lipsum} \begin{document} \section{Test} \begin{remark} \begin{enumerate} \item \lipsum[1] \begingroup %\setlength{\LTleft}{0pt}\setlength{\LTright}{0pt} \begin{longtable}{p{1cm}<{\centering}p{1cm}<{\centering}p{1.5cm}<{\centering}p{1.5cm}<{\centering}p{2.5cm}<{\centering}} \caption{On Implications} \\\toprule $\phi$&$\psi$&$\phi\to\psi$&$\phi\wedge\psi$&$\phi\wedge\psi\to\phi$\\ \midrule\endfirsthead% \midrule $\phi$&$\psi$&$\phi\to\psi$&$\phi\wedge\psi$&$\phi\wedge\psi\to\phi$\\ \midrule\endhead \midrule\endfoot \bottomrule\endlastfoot 1&1&1&1&1\\ 1&0&0&0&1\\ 0&1&$x$&0&1\\ 0&0&$y$&0&1\\ \end{longtable} \endgroup \lipsum[2] \item \lipsum[3] \end{enumerate} \end{remark} \end{document} As you see, the table is centering on the page in in horizontal direction but not centering in the item of the enumerate environment. Is there any way to make the table be centering in the item of the enumerate environment?
- How to properly generate nested pgfkeys procedurally?by dsacre on December 31, 2025 at 10:57 am
Task Consider the following: One needs to store a over time varying amount of pgfkeys entries with a nested data structure. All the entries have the same structure, but the content may vary. So one defines a macro to handle the pgfkeys structure initialization automatically when the user sets the data. Artificial Example: Inventory (MWE) \documentclass[parskip=full]{scrreprt} \usepackage{pgffor} \usepackage{pgfkeys} % DESCRIPTION: Set up inventory entries manually \pgfkeys{ /handlers/.is setter/.code=\pgfkeysedef{\pgfkeyscurrentpath}{% \noexpand\pgfqkeys{\pgfkeyscurrentpath}{##1}% },% /inventory/.cd, Manual 5 Speed/.is setter, Manual 5 Speed/inventory id/.initial = XXXXXXXXXX, Manual 5 Speed/product/.is setter,% Manual 5 Speed/product/manufacturer/.initial = EMPTY, Manual 5 Speed/product/product id/.initial = EMPTY, Manual 6 Speed/.is setter, Manual 6 Speed/inventory id/.initial = YYYYYYYYYY, Manual 6 Speed/product/.is setter,% Manual 6 Speed/product/manufacturer/.initial = EMPTY, Manual 6 Speed/product/product id/.initial = EMPTY } % DESCRIPTION: Logic for creating pgfkey "database" entry automatically and setting them to user specified data % ARGUMENTS: #1 = entry product, #2 = entry data \newcommand{\generateEntry}[2]{ % DESCRIPTION: Creating the pgfkeys "family" and intialize with default values \pgfkeys{ /handlers/.is setter/.code=\pgfkeysedef{\pgfkeyscurrentpath}{% \noexpand\pgfqkeys{\pgfkeyscurrentpath}{##1}% },% /inventory/#1/.cd, inventory id/.initial = ZZZZZZZZZZ, product/.is setter,% product/manufacturer/.initial = EMPTY, product/product id/.initial = EMPTY } % DESCRIPTION: Setting the data to the one specified by the user \pgfqkeys{/inventory/#1}{#2} } % DESCRIPTION: Macro for testing whether it is a problem with wrapping \pgfqkeys in an additional macro \newcommand{\setEntryData}[2]{ \pgfqkeys{/inventory/#1}{#2} } \begin{document} % DESCRIPTION: Setting the data of the manually added entry % with \pgfqkeys and "{}" notation % STATUS: WORKS AS EXPECTED \pgfqkeys{/inventory/Manual 5 Speed}{ inventory id = 6, product = { manufacturer = Herbert Motors, product id = 433M5 } } % DESCRIPTION: Setting the data of the manually added entry % with \pgfqkeys wrapped in macro and "{}" notation % STATUS: WORKS AS EXPECTED \setEntryData{Manual 6 Speed}{ inventory id = 11, product = { manufacturer = Herbert Motors, product id = 433M6 } } % DESCRIPTION: Generate and set data for automatic entry % with "/" notation % STATUS: WORKS AS EXPECTED \generateEntry{Automatic 4 Speed}{ inventory id = 21, product/manufacturer = Jane's Speedshop, product/product id = JS4A } % DESCRIPTION: Generate and set data for automatic entry % with "{}" notation % STATUS: FAILS FOR NESTED KEYS \generateEntry{Automatic 5 Speed}{ inventory id = 42, product = { manufacturer = Jane's Speedshop, product id = JS5A } } % DESCRIPTION: Visualize the data stored in the pgfkeys \section*{Inventory} \foreach \entry in {Manual 5 Speed, Manual 6 Speed, Automatic 4 Speed, Automatic 5 Speed}{ \textbf{\entry}:\\ inventory id: \pgfkeysvalueof{/inventory/\entry/inventory id}\\ manufacturer: \pgfkeysvalueof{/inventory/\entry/product/manufacturer}\\ product id: \pgfkeysvalueof{/inventory/\entry/product/product id} \\[0.25cm] } \end{document} This produces the following output: Issue When using the {...} notation to set the data of automatically generated entries, the data is not stored (see Automatic 5 Speed in MWE). The / notation seems to work. What was tried so far The problem seems to be related to the .is setter pgfkeys handler. It seems like the nested structure is not created, but a single key with e. g. product/manufacturer as id (with the / being interpreted as a letter, not a separator). So far, the following has been tried: Changing .code to .ecode Modifying the expansion from \noexpand to other possibilities Those experiments always resulted in errors and the compilation failing. Question Is there a simple way to achieve the desired behavior with pgfkeys (e.g. via .is family)? Suggestions of other methods are also welcome. However, solutions with pgfkeys would be preferred, since the rest of the data handling in the real project is already based upon pgfkeys.
- Bizarre interaction between `microtype` package and \eqref macroby John Pardon on December 30, 2025 at 11:14 pm
I would have thought that if I declare \let\stdeqref\eqref, then the \stdeqref macro and the \eqref macro would be interchangeable. But here is an example where it fails! Moreover, this failure is (somehow) caused by the microtype package?! What is going on, and how to fix it? \documentclass{article} \usepackage{microtype} \usepackage{amsmath} \let\stdeqref\eqref \begin{document} \begin{equation}\label{a} A \end{equation} This is good spacing: \eqref{a}\allowbreak\eqref{a} This is bad spacing: \stdeqref{a}\allowbreak\stdeqref{a} But the bad spacing becomes good if we remove microtype! \end{document} The reason I'm asking is that I would like to redefine the \eqref macro in a way which uses the usual \eqref macro as a subcomponent, via the usual strategy I've seen time and time again on this site: \let\stdeqref\eqref \renewcommand\eqref[1]{Something fancy containing \stdeqref{#1} etc.} but that doesn't work anymore if \let isn't behaving as expected . . .
- Drawing Only a Portion of an Oval Frameby DDS on December 30, 2025 at 10:39 pm
Consider the following code which I compile with xelatex: \documentclass{book} \usepackage{graphicx} \usepackage[abs]{overpic} \usepackage{tikz} \definecolor{cadmiumgreen}{rgb}{0.0, 0.42, 0.235} % 0, 107, 60 \definecolor{Gold}{RGB}{228,168,73} \begin{document} \thispagestyle{empty} \begin{center} \begin{tikzpicture} \clip (0,0) ellipse (4.25cm and 5.5cm); \draw[line width=5pt,Gold,fill=cadmiumgreen] ellipse (4.25cm and 5.5cm); \node at (0,0) {\includegraphics[scale=.37,clip, trim = 0 0 0 0]{example-image-a}}; \draw[line width=12pt,Gold!70!black] ellipse (4.25cm and 5.5cm); \end{tikzpicture} \end{center} \end{document} with the output: QUESTION: How may I draw only a part of the 12pt-thick oval frame; in particular, relative to the node (0,0), draw the frame from only -45 degrees to 225 degrees in a clockwise fashion (instead of from -90 degrees to 270 degrees which gives the entire oval)? Thank you.
- Increase vertical spacing for the boxed choice in enumextby Sebastiano on December 30, 2025 at 9:24 pm
I'm using the enumext package to create multiple-choice questions. In my case, the answer labels are boxed letters, produced using the wrap-label key. The issue is that the boxed letters appear too close to each other vertically. I would like to know the correct way to increase the vertical spacing between the boxed labels, without unnecessarily changing the text spacing or breaking the column alignment. Here a MWE: \documentclass[a4paper,12pt]{article} \usepackage{amsmath, amssymb} \usepackage{graphicx} \usepackage{enumext} \begin{document} \begin{enumext}[label=\textbf{Domanda} \arabic*.,wrap-label=\textbf{#1},list-indent=0pt, save-ans=test] \item Lion \setenumext[keyans]{label=\Alph*,font=\small,nosep,wrap-label={\fbox{\makebox[\height]{##1}}}} \begin{keyans}[columns=2,nosep,mini-env={0.4\linewidth}] \item \item \item \item \miniright \includegraphics[scale=.4]{example-image.png} \end{keyans} \end{enumext} \end{document}
- Undesired bold text in Bibliography with BibLatexby DaVarPhi on December 30, 2025 at 1:44 pm
I'm using a template in Overleaf to make a mock article for practice, but it used natbib instead of biblatex so I attempted to replace the package and did all of the suitable replacements (like \citep to \parencite) But, it produced this "ugly" bibliography like below. Notice the bold texts Here is my bib file @book{sutton1998, title = {Reinforcement Learning: An Introduction}, author = {Sutton, Richard S. and Barto, Andrew G.}, year = {1998}, publisher = {MIT Press}, } @inproceedings{togelius2015, title = {AI Researchers, Video Games Are Your Friends!}, author = {Togelius, Julian}, booktitle = {Proceedings of the International Joint Conference on Computational Intelligence}, pages = {3--18}, year = {2015}, publisher = {Springer} } @incollection{johnson2016, author = {Johnson, Mark}, title = {Bullet Hell: The Globalized Growth of Danmaku Games and the Digital Culture of High Scores and World Records}, booktitle = {Transnational Contexts of Culture, Gender, Class, and Colonialism in Play: Video Games in East Asia}, pages = {17--42}, publisher = {Springer}, year = {2016} } @book{koziel2019, title = {Speedrun Science: A Long Guide to Short Playthroughs}, author = {Koziel, Eric}, year = {2019}, publisher = {Fangamer} } @inproceedings{li2019, author = {Li, Raymond C. and Ahn, Jun Min and Esteron, Zachary Tyler and Hong, Qiyin}, title = {Collision Avoidance with Deep Reinforcement Learning}, booktitle = {Proceedings of the 2019 Purdue Undergraduate Research Conference}, year = {2019} } @online{chen2025, author = {Chen, Jackson}, title = {Summer Games Done Quick 2025 Raises \$2.4 Million for Doctors Without Borders}, year = {2025}, organization = {Engadget}, url = {https://www.engadget.com/gaming/summer-games-done-quick-2025-raises-24-million-for-doctors-without-borders-182314037.html}, urldate = {2025-12-31} } And some MWE \input{preamble} \begin{document} LOREM IPSUM DOLOT SIT AMET \parencite{chen2025} LOREM IPSUM DOLOT SIT AMET \parencite{johnson2016} LOREM IPSUM DOLOT SIT AMET \parencite{koziel2019} LOREM IPSUM DOLOT SIT AMET \parencite{li2019} LOREM IPSUM DOLOT SIT AMET \parencite{sutton1998} LOREM IPSUM DOLOT SIT AMET \parencite{togelius2015} \newpage \input{bibliography} \end{document} that produces also an ugly citation Here are the content of preamble.tex that I think directly contributed to the bibliography and also the template for bibliography.tex %preamble.tex \documentclass[12pt,a4,american]{extreport} \usepackage[utf8]{inputenc} \usepackage[indonesian]{babel} \usepackage[T1]{fontenc} \usepackage{relsize} \usepackage{times} \usepackage{amsmath, amsthm, amssymb, amsfonts} \usepackage{actuarialsymbol} \usepackage{lipsum} \usepackage{geometry} \usepackage[onehalfspacing]{setspace} \usepackage{parskip} \usepackage{microtype} \usepackage{fancyhdr} \usepackage[ pdftex, bookmarks=true, unicode=true, pdfusetitle, bookmarksnumbered=true, bookmarksopen=true, breaklinks=true, pdfborder={0 0 1}, backref=page, colorlinks=false ]{hyperref} \usepackage[noabbrev, capitalise]{cleveref} \usepackage{xcolor} \usepackage[style=authoryear, backend=biber]{biblatex} \DeclareDelimFormat{nameyeardelim}{\addcomma\space} \addbibresource{citation.bib} \usepackage{xurl} \usepackage[nottoc,numbib]{tocbibind} % bibliography.tex \clearpage \phantomsection \addcontentsline{toc}{chapter}{BIBLIOGRAPHY} \nocite{*} \printbibliography[heading=bibintoc, title={BIBLIOGRAPHY}] I don't know what I did wrong here. I have checked the custom settings file of the template and there are no other command that modify the bibliography and I've done the suitable replacements. Any help? EDIT : Added MWE and all the relevant files content.
- circuitikz: How to read out the value of bipoles/lengthby cis on December 30, 2025 at 8:55 am
According to the manual, section 3.1.4.1 "Components size", bipoles/length (default 1.4cm) is the central parameter; "which can be interpreted as the length of a resistor (including reasonable connections): all other lengths are relative to this value." How can I read out bipoles/length? I tried \pgfmathsetlengthmacro\Rlength{ %\ctikzvalueof{bipoles/length}% does not work %\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}% does not work 5mm% works } without success. What do I have to do? \documentclass[margin=5pt, multi=circuitikz]{standalone} \usepackage{circuitikz} \begin{document} \pgfmathsetlengthmacro\Rlength{ %\ctikzvalueof{bipoles/length}% does not work %\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}% does not work 5mm% works } \begin{circuitikz}[european resistors] \draw[] (0,0) to[R, name=R0] (2,0); \draw[red] (R0.west) -- +(\Rlength,0) node[below=3mm]{\Rlength}; \end{circuitikz} \ctikzset{bipoles/length=22.5mm,}% test for value change \begin{circuitikz}[european resistors] \draw[] (0,0) to[R, name=R0] (2,0); \draw[red] (R0.west) -- +(\Rlength,0) node[below=3mm]{\Rlength}; \end{circuitikz} \end{document}
- How to reproduce `listings` style features (right-side numbers, stepnumber) in `piton`?by d7ek on December 30, 2025 at 5:21 am
In the listings package, \lstset{numbers=right,stepnumber=3,numberfirstline} gives right-aligned line numbers and numbering every third line. I would like to achieve the same behavior using the piton package instead of listings, but I can’t find equivalent options in the documentation. \documentclass{article} \usepackage{piton,xcolor} \PitonOptions{line-numbers,} %\usepackage{listings} %\lstset{ % numbers=right, % stepnumber=3, % numberfirstline %} \begin{document} %\begin{lstlisting}%[firstnumber=2] \begin{Piton} print("Hello world") x = 1 + 1 print(x) x = 1 + 2 print(x) x = 2 + 2 print(x) \end{Piton} %\end{lstlisting} \end{document}
- Is it possible to create a circular document?by Brendan Langfield on December 30, 2025 at 3:11 am
I recently learned that it's possible to set fully custom page dimensions using geometry. However as far as I can tell, you can only do rectangular document shapes. Is it possible to use the geometry package or some other method to make the document itself circular?
- List with one item in an enviroment issueby murray on December 30, 2025 at 2:40 am
The following code produces the output shown. It uses an enviroment inside which there is a description list with just one item. Note the blank line before \item. With that, or with instead, {} or \mbox{}, the code compiles as expected. However, removing that blank line before \item causes error "Something's wrong--perhaps a missing \item when compilation reaches the line \end{oneproperty}. Why does this happen, and how can the definition of oneproplis or oneproperty be modfied so as to avoid the error? \documentclass{article} \usepackage{enumitem} \newlength{\oneproplabelwd} % NB: default is parentheized 2-char sf \settowidth{\oneproplabelwd}{\textsf{(SN)}} % NB: Enclose actual item name in parens, \label[...] in optional arg! \newlist{oneproplis}{description}{1} \newenvironment{oneproperty}[1]{% \setlist[oneproplis,1]{% font=\normalfont\textsf, wide, leftmargin=\dimexpr\parindent+\oneproplabelwd+\labelsep, itemsep=0pt, topsep=2pt, format={\normalfont\textsf}, }\begin{oneproplis}% \upshape} {\end{oneproplis}} \begin{document} \noindent A relation $\leq$ in a set $X$ is said to \emph{well-order} $X$ if it partially orders $X$ and: % \settowidth{\oneproplabelwd}{\textsf{(WO)}} \begin{oneproperty} \item[(WO)\label{property:wo}] Each nonempty subset of $X$ has a least element. \end{oneproperty} \end{document}
- Use some characters from the text font instead of the corresponding ones from mtpro2by ncant on December 29, 2025 at 2:10 pm
I'm typesetting my math document in Times New Roman using XeLaTeX and the fontspec package. I'm using mtpro2 as the math font, but I've noticed that certain letters, such as u, v and w, look quite different from their TNR italic counterparts (maybe because it's advertised as a Times-compatible font). Considering I'm already using the fontspec package, I tried ditching mtpro2 entirely and using other math fonts. I consulted the LaTeX Stack Exchange master list of maths fonts and tried XITS Math, TeX Gyre Termes Math and STIX Two Math. However, these fonts lack some features that I really like about mtpro2, such as round brackets (especially for matrices) and the letter z identical to the letter z in TNR. mtpro2 is here to stay. Next, I found the 'mathastext' package, which enables alphanumeric glyphs from the text font to be used in maths environments. For example, \usepackage[basic, italic]{mathastext} replaces all the alphanumeric characters in the maths font with the corresponding characters in the text font. However, this approach led me to another issue: the spacing between letters is awful, especially the subscripted ones. Since my only issue is with the letters u, v, and w, is there a way to just replace those three and use the rest of the mtpro2 glyphs? The code I'm using for my document is really bog standard: \documentclass{memoir} % Throw an error if this is not XeLaTeX. \usepackage{ifxetex} \RequireXeTeX \usepackage[lite]{mtpro2} \usepackage[no-math]{fontspec} \setmainfont{Times New Roman} \begin{document} \end{document} Any help would be appreciated.
- circuitikz: European Amplifier (en amp) without pins or with absolut valued pin lengthby cis on December 29, 2025 at 12:10 pm
I want to create an en amp with a pin length of 0 - alternatively: a pin length with a clearly defined value, for example 5mm. I tried to transfer the "trick" \ctikzset{tripoles/en amp/port width=1, tripoles/en amp/width=1.19, % = 1.7*0.7 } from 4.20.2.2 "Input and output pins symbols"; but this only works with op amp. What do I have to do? \documentclass[margin=5pt, multi=circuitikz]{standalone} \usepackage{circuitikz} \begin{document} \begin{circuitikz}[] \ctikzset{tripoles/en amp/port width=1, tripoles/en amp/width=1.19, % = 1.7*0.7 } \node[en amp, en amp text={No pins}, label={[yshift=-12mm]below:works not} ] (A){please!}; %% --> Trick from 4.20.2.2 "Input and output pins symbols" \ctikzset{tripoles/op amp/port width=1, tripoles/op amp/width=1.19, % 1.7*0.7 } \draw (3,0) node[op amp, color=blue, label={[yshift=-12mm]below:works} ]{}; \end{circuitikz} \end{document}