• How to align the visual bottom of a large quotation mark with the cap height of the text?
    by Mihai on November 23, 2025 at 10:03 pm

    I am trying to figure how to correctly place a symbol (e.g., a quotation mark) as illustrated below. So, far I have the following: % Document class. \documentclass[12pt]{article} % Dependencies. \usepackage{lipsum} % Start. \ExplSyntaxOn % Define a box for the quote symbol. \box_new:N \l_quote_box % Define the `\pquote` command. \NewDocumentCommand{\pquote}{ m }{% % Start the quote environment. \begin{quote} % Enter horizontal mode. \leavevmode % Set the quote box to its content. \hbox_set:Nn \l_quote_box {% % Define the quote symbol. \rule{1em}{1em}% } % Place the quote symbol to the left. \llap{% % Smash to avoid affecting line spacing. \smash{% % Raise to align with the top of the first line. \raisebox{ \dim_eval:n { \fontcharht\font`H } }{% % Render the box containing the quote symbol. \box_use:N \l_quote_box }% }% }% % Render the quote content. #1 \end{quote} } % Stop. \ExplSyntaxOff \begin{document} \lipsum[1][1-3] \pquote{\lipsum[1][1-3]} \end{document} Which produces as output: However, the moment I redefine \l_quote_box as % Set the quote box to its content. \hbox_set:Nn \l_quote_box {% % Define the quote symbol. \fontsize{46}{0}\selectfont``% } the positioning of the symbol along the y-axis offset seems off, and the output obtained is: I can correctly reposition the symbol by tweaking the \raisebox, e.g. by setting \dim_eval:n { \fontcharht\font`H - 0.8em } but this feels arbitrary and perhaps dependent on the size used in \fontsize, which is not what I want. I would ideally like to: Determine (i.e., or scale) the size of quotation mark without compromising its "touch" point with the cap height, and thus not have to adjust the y-shift manually. Be mindful that large quotation marks do not overlap the text above, but rather push the entire quote environment down. Is there a robust way of achieving this, preferably without tikZ? I'd appreciate any ideas!

  • Footer shows “Page X of A3” instead of total number of pages
    by Jose Dias on November 23, 2025 at 9:19 pm

    I’m having a strange issue with the page numbering in the footer of my LaTeX document. My footer is defined like this: \cfoot{Page \thepage\ of \pageref{LastPage2}} On the first page everything appears correctly, but in the appendix I get: Page 1 of A3 Page 2 of A3 Page 3 of A3 In other words, the total page count shows up as “A3”. After inspecting the document, I suspect this is caused by the page numbering configuration I apply right before starting the appendix: \pagenumbering{arabic} \renewcommand{\thepage}{A\arabic{page}} It looks like the value “A3” doesn’t actually come from the total number of pages, but from my own redefinition of \thepage — so the footer is literally reading “A3” as the last page label. Can someone confirm if this is indeed the cause? And what is the correct way to add a prefix (like "A") only to appendix page numbers without breaking the “Page X of Y” footer? Thanks in advance! Appeding stard and end of the document: \documentclass[11pt,a4paper]{report} % Encoding e língua \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[english,portuguese]{babel} % Layout e tipografia \usepackage[margin=3cm]{geometry} \usepackage{setspace} \doublespacing \usepackage{indentfirst} \usepackage{ragged2e} % permite \justifying e variantes % Figuras, tabelas e formatação avançada \usepackage[table]{xcolor} % SEMPRE primeiro entre os pacotes de tabela \usepackage{array} \usepackage{booktabs} \usepackage{multirow} \usepackage{makecell} \usepackage{tabularx} \usepackage{longtable} \usepackage{ltablex} % DEPOIS de tabularx + longtable \keepXColumns \usepackage{collcell} \usepackage{float} \usepackage{adjustbox} % SEMPRE por último % Matemática e código \usepackage{amsmath} \usepackage{listings} \definecolor{graygray}{gray}{0.95} % Ferramentas adicionais úteis \usepackage{csquotes} \usepackage{comment} \usepackage{textcomp} \usepackage{changepage} % adjustwidth \usepackage{datetime} % datas personalizadas \usepackage{pdfpages} % inserir páginas PDF % Gráficos e elementos posicionados \usepackage{tikz} \usepackage{eso-pic} % fundos e overlays \usepackage[absolute,overlay]{textpos} % Anexos e índice \usepackage[toc,page]{appendix} \usepackage{imakeidx} \makeindex % Glossários \usepackage[toc,acronym,nopostdot,nonumberlist]{glossaries} \makeglossaries % Bibliografia \usepackage{biblatex} \addbibresource{ref.bib} % Estilo de página \usepackage{fancyhdr} \usepackage{lastpage} \usepackage[bottom]{footmisc} % Legendas \usepackage{caption} % Hyperref — deve ser sempre o último \usepackage[hidelinks]{hyperref} \newcommand\BackgroundPic{ \put(0,0){ \parbox[b][\paperheight]{\paperwidth}{ \vfill \centering \includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio]{Capa.pdf}% \vfill } } } \begin{document} \thispagestyle{empty} \ClearShipoutPicture \begin{adjustwidth}{0pt}{20pt} \begin{flushright} \includegraphics[scale=0.45]{figs/logo-ipvc-old.pdf}\\ \vspace*{2cm} \textsf{\huge xxx}\\ \vspace{3cm} \large \textsf{Autor(a)}\\ \textcolor{gray}{\textsf{\Large José Dias}}\\ \vspace{3cm} \vspace{1cm} \large \textsf{Trabalho orientado por}\\ \textcolor{gray}{\large \textsf{xxx}}\\ \vspace{2cm} \textcolor{gray}{\large \textsf{xxxx}}\\ \vspace{2cm} \large \textsf{20 de 09 de 2025}\\ \end{flushright} \end{adjustwidth} \newpage \ClearShipoutPicture \begin{titlepage} \begin{tikzpicture}[remember picture,overlay,shift={(current page.center)}] \node[anchor=center,xshift=-2.8cm,yshift=10.4cm]{\includegraphics[scale=0.18]{figs/MCiber-logo.pdf}}; \node[anchor=center,xshift=2.8cm,yshift=10.3cm]{\includegraphics[scale=0.7]{figs/letter-MCiber.pdf}}; \node[anchor=center,xshift=7cm,yshift=-13cm]{\includegraphics[scale=0.6]{figs/MCiber-end2.pdf}}; \end{tikzpicture} \centering \vspace{4.5cm} \huge xxxxxxx\\ \vspace{1.5cm} \large authored by\\ \Large xxx\\ \vspace{1.5cm} \large and supervised by\\ \large xxx\\ \vspace{0.2cm} \large xxxx\\ \vspace{1.5cm} \normalsize This was submitted in partial fulfilment of the requirements for the degree in\\ \vspace{0.5cm} \includegraphics[scale=0.65]{figs/logo-XXXX-s.pdf}\\ \vspace{0.2cm} \newdateformat{daymonthyear}{\THEDAY\ of \monthname[\THEMONTH], \THEYEAR} \daymonthyear\today \\ %December, 2019 %\large v2.3 \end{titlepage} \input{acro_list} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \selectlanguage{english} \pagenumbering{roman} %\chapter*{\centering\Large\bfseries Abstract} \chapter*{Abstract} \begin{center}\Large\bfseries Abstract\end{center} %context %problem %proposal %solution This xxx \vspace{2cm} \textbf{Keywords:} 5G networks. network slicing. vulnerabilities. security. risk mitigation. \selectlanguage{portuguese} %\chapter*{\centering\Large\bfseries Resumo} \chapter*{Resumo} \begin{center}\Large\bfseries Resumo\end{center} XXXX \vspace{2cm} \textbf{Palavras-chave:} 5G networks. network slicing. vulnerabilities. security. risk mitigation. \selectlanguage{english} \chapter*{Aknowledgements} I would like to express my deepest gratitude ... %insert index \tableofcontents \clearpage \phantomsection \addcontentsline{toc}{chapter}{\listfigurename} % The List of Figures (Do not modify) \listoffigures \clearpage \phantomsection \addcontentsline{toc}{chapter}{\listtablename} % The List of Tables (Do not modify) \listoftables %in case there are listings with code: \clearpage \renewcommand\lstlistlistingname{List of Listings} \phantomsection \addcontentsline{toc}{chapter}{List of Listings} % \lstlistoflistings \glsaddall %\printglossary[type=\acronymtype] \printglossary[type=\acronymtype,title={List of Abbreviations},toctitle={List of Abbreviations}] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \clearpage \pagestyle{fancy} \fancyhf{} %\fancyhead[LE,LO]{Title Short} \fancyhead[CO]{\nouppercase{\leftmark}} %\fancyfoot[CE,CO]{\leftmark} \fancyfoot[CO]{\thepage} \cfoot{Page \thepage\ of \pageref{lastpage2}} \renewcommand{\headrulewidth}{0.4pt} \renewcommand{\footrulewidth}{0.4pt} \fancypagestyle{plain}{% \fancyhf{}% \fancyfoot[C]{Page \thepage\ of \pageref{lastpage1}}% \renewcommand{\headrulewidth}{0pt}% Line at the header invisible \renewcommand{\footrulewidth}{0.4pt}% Line at the footer visible } \glsresetall \chapter{Introduction} \pagenumbering{arabic} \label{chap:introduction} MY TEXT \clearpage \addcontentsline{toc}{chapter}{References} \printbibliography[title={References}] \label{lastpage1} \clearpage \pagestyle{fancy} \fancyhf{} %\fancyhead[LE,LO]{Title Short} \fancyhead[RO]{\nouppercase{\leftmark}} %\fancyfoot[CE,CO]{\leftmark} \fancyfoot[CO]{\thepage} \cfoot{Page \thepage\ of \pageref{LastPage2}} \renewcommand{\headrulewidth}{0.4pt} \renewcommand{\footrulewidth}{0.4pt} \fancypagestyle{plain}{% \fancyhf{}% \fancyfoot[C]{Page \thepage\ of \pageref{lastpage2}}% \renewcommand{\headrulewidth}{0pt}% Line at the header invisible \renewcommand{\footrulewidth}{0.4pt}% Line at the footer visible } \pagenumbering{arabic}% resets `page` counter to 1 \renewcommand*{\thepage}{A\arabic{page}} \appendix \begin{appendices} \chapter{Title of Appendix} The contents... A\arabic{page \chapter{Title of other Appendix} The contents... \end{appendices} \label{lastpage2} \end{document} %HELP %https://tikz.dev/pgfplots/reference-2dplots

  • HowTo produce footnotes *) , **), ***), etc?
    by Steven Thomas Hatton on November 23, 2025 at 8:12 pm

    The current preamble is this: \documentclass[a4paper,12pt,leqno]{book} \usepackage[margin=1in]{geometry} \usepackage[italian]{babel} \usepackage{fontspec} \usepackage{amsmath} \usepackage{accents} \usepackage{unicode-math} \usepackage{amsthm} \usepackage{csquotes} \usepackage{graphicx} \usepackage{hyperref} \usepackage[g]{esvect} \usepackage{mathtools} \usepackage[svgnames]{xcolor} \usepackage{tabularray} \usepackage{outlines} \usepackage{eso-pic} \usepackage{fancyhdr} \usepackage{enumitem} \setmainfont{STIX Two Text} \setmathfont{STIX Two Math} \hypersetup{ colorlinks=true, linkcolor=blue, filecolor=magenta, urlcolor=cyan, } \urlstyle{same} \pagestyle{fancy} \fancyhead[LE]{\thepage} \fancyhead[RE]{[9} \fancyhead[LO]{9]} \fancyhead[RO]{\thepage} \fancyhead[C]{RICERCHE DI ANALISI APPLICATA ALLA GEOMETRIA.} \renewcommand{\headrulewidth}{0.4pt} \fancyfoot{} \setlength{\headheight}{15pt} \addtolength{\topmargin}{-3pt} \begin{document} preamble template \end{document} How do I produce footnotes that look like the ones in this page from Beltrami's original text?

  • How to Make TikZ Overlay Arrows Smoother and Better Arranged in Table?
    by mingabua on November 23, 2025 at 6:33 pm

    I'm creating a table with TikZ overlay arrows to illustrate the data flow between cells. The arrows currently work, but they look somewhat crude and could be improved. I'm looking for suggestions on: How to make the curved arrows look more fluid and natural Better positioning strategies for the labeled nodes (A, B, C, D) so they don't overlap with arrows How to avoid awkward arrow angles and improve the overall visual flow Here's my MWE: \documentclass{article} \usepackage[margin=1in]{geometry} \usepackage{amsmath} \usepackage{booktabs} \usepackage{xcolor} \usepackage{lipsum} \usepackage{caption} \usepackage{tikz} \usetikzlibrary{tikzmark} \usepackage[most]{tcolorbox} % Color \definecolor{boxBack}{RGB}{245, 247, 250} \definecolor{darkgrey}{HTML}{464e51} \definecolor{customGray}{HTML}{DDDDDD} \definecolor{customRed}{HTML}{FDE7A9} \definecolor{customOrange}{HTML}{FC8E64} \definecolor{customBlue}{HTML}{B83779} % tcolorbox settings \tcbset{ enhanced, colback=boxBack, colframe=gray!40, boxrule=0.5pt, fonttitle=\bfseries\sffamily, coltitle=black, attach boxed title to top left={xshift=0.5cm, yshift=-3mm}, boxed title style={colback=white, colframe=gray!40, arc=3pt}, top=1em, bottom=1em, left=1em, right=1em } \begin{document} \lipsum[1-3] \begin{tcolorbox}[title=Test] \footnotesize $\quad$ \lipsum[1] \renewcommand{\arraystretch}{1.2} \begin{center} \captionsetup{font=footnotesize,labelfont={color=darkgrey,bf}} \captionof{table}{\textcolor{darkgray}{Example}} \label{tab:shifte} \vspace{-0.5cm} \[ \begin{array}{@{\hspace{1em}}c@{\hspace{2em}}c@{\hspace{3.5em}}c@{\hspace{3.5em}}c@{\hspace{3.5em}}c@{\hspace{2em}}c@{\hspace{1.0em}}} \toprule \text{Day} & \text{$1$} & \text{$2$} & \text{$3$} & \text{$4$} & \text{$\ldots$} \\ \midrule \text{{\fontsize{9}{10}\selectfont ...}} & \text{{E}} & \text{{L}} & \text{{O}} & \text{{E}} & \text{$\ldots$} \\[6pt] \text{$a_{ds}$} & \tikzmarknode{A2}{\text{$(1,0)$}} & \tikzmarknode{A3}{\text{$(0,1)$}} & \tikzmarknode{A4}{\text{$(0,0)$}} & \tikzmarknode{A5}{\text{$(1,0)$}} & \tikzmarknode{A6}{$\ldots$} \\[6pt] \text{$b_{ds}$} & \tikzmarknode{B2}{\text{$(1,0)$}} & \tikzmarknode{B3}{\text{$(1,0)$}} & \tikzmarknode{B4}{\text{$(0,1)$}} & \tikzmarknode{B5}{\text{$(0,1)$}} & \tikzmarknode{B6}{$\ldots$} \\[6pt] \text{$c_{ds}$} & \text{$(0,0)$} & \text{$(0,0)$} & \tikzmarknode{Z1}{\text{$(0,1)$}} & \text{$(0,0)$} & \text{$\ldots$} \\[6pt] \text{$v_{ds}$} & \tikzmarknode{E3}{\text{$(0,0)$}} & \tikzmarknode{E4}{\text{$(0,1)$}} & \text{$(0,0)$} & \tikzmarknode{E5}{\text{$(1,0)$}} & \tikzmarknode{E6}{$\ldots$ } \\ [6pt] \text{$d_{d}$} & \text{$0$} & \text{$1$} & \tikzmarknode{Z12}{\text{$0$}} & \text{$1$} & \text{$\ldots$} \\ \bottomrule \end{array} \] \begin{tikzpicture}[remember picture,overlay] % Fixed the typo here \draw[thick, ->] (-1.94,0.98) -- (-1.32,0.98); \draw[thick, -<] (-1.94,2.02) -- (-1.32,2.02); \draw[thick, -<] (-1.94,2.58) -- (-1.32,2.58); \draw[thick, ->] (-2.44,2.8) -- (-1.32,2.26); \draw[thick, customGray, -] (1.48,1.6) -- (2.56,2.22); \draw[thick, ->] (-0.44,2.8) -- (0.6,1.60); \draw[thick, ->] (1.48,1.6) -- (2.56,2.22); \draw[thick, -] (-1.94,2.58) -- (-1.94,0.98); \fill[customGray] (-2.21,2.65) circle (0.19); \fill[customGray] (2.02,1.91) circle (0.19); \fill[customGray] (0.08,2.16) circle (0.19); \fill[customGray] (-1.94,1.5) circle (0.19); \node[circle,draw,inner sep=1pt,font=\tiny] at (-2.21,2.65) {A}; \node[circle,draw,inner sep=1pt,font=\tiny] at (-1.94,1.5) {B}; \node[circle,draw,inner sep=1pt,font=\tiny] at (0.08,2.16) {C}; \node[circle,draw,inner sep=1pt,font=\tiny] at (2.02,1.91) {D}; \end{tikzpicture} \end{center} \noindent \lipsum[1] \end{tcolorbox} \normalsize \lipsum[2] \end{document} I want the arrows to look something like this:

  • arithmetic operations with \ifthenelse
    by underflow on November 23, 2025 at 5:47 pm

    Is there a way to add arithmetic operations to \ifthenelse statements? Here is a minimal (non)example: \documentclass{amsart} \usepackage{tikz, ifthen} \begin{document} \begin{tikzpicture} \foreach \a in {-6,...,6} { \foreach \b in {-6,...,6} { \ifthenelse{ (\a + \b) < 4 } { \node at ( (\a, \b ) {(\a, \b)}; } {} } } \end{tikzpicture} \end{document} It is not working because \ifthenelse does not allow \a+\b. Bonus question: Is there a way to e.g. define \c = \a + \b in advance so I can use \c elsewhere, in \ifthenelse and subsequence \draw commands? EDIT: Actually what I needed is \a + 1.414*\b < 4 AND \a - 1.414*\b > 0. I thought I could handle the rest once I know how to insert arithmetic operations into \ifthenelse, but apparently it's more complicated than that. Apologies for the mixup and thanks for your help.

  • \foreach loop inside tikz
    by underflow on November 23, 2025 at 5:16 pm

    I need to loop through a variables in tikz, using the ifthen package. Here is a MWE: \documentclass{amsart} \usepackage{tikz, ifthen} \begin{document} \begin{tikzpicture} \foreach \x in {-1,0,1, 2, 3, 4, 5} { \ifthenelse{ \x > 3 } { $\bullet$ } { $\star$ } } \end{tikzpicture} \end{document} This works, but when I replace \foreach \x in {-1,0,1, 2, 3, 4, 5} with \foreach \x in {-1,0,1, ... , 5} (or similar variations) I got the error message Runaway argument? 5\pgffor@@stop \expandafter \pgffor@dots@charcheck \pgffor@dotsvalue \ETC. ! Paragraph ended before \pgffor@dots@stripcontext was complete. <to be read again> \par l.13 ? s OK, entering \scrollmode... ! Missing number, treated as zero. <to be read again> . l.25 } ! Missing = inserted for \ifnum. <to be read again> . I tried to look up the tikz manual but I could not figure out what happen. Many thanks for your help!

  • Breakline with underline can't work together
    by Sunshine on November 23, 2025 at 5:11 pm

    I want to break line to show the unshown content, how to do it? \documentclass[openany,a4paper]{ctexart} \usepackage{amsmath,amssymb,mathrsfs,bm,tcolorbox,enumerate,graphicx} \usepackage[top=1cm,bottom=1cm,left=0.5cm,right=0.5cm]{geometry} \usepackage{setspace} \usepackage{lipsum,paracol} \usepackage{ulem} % for '\uline' and '\uuline' macros \begin{document}\columnratio{0.6} \begin{paracol}{2} \lipsum{1}\switchcolumn \uuline{\bfseries aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\uline{aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa} \lipsum{1} \end{paracol} \end{document}

  • Producing the sums outside of the 3x3 Magic Square
    by Vee on November 23, 2025 at 2:49 pm

    How can I align the column of sums outside of this 3x3 magic square? I've coursed through different variations of code, but I can't seem to get it correct. Kindly see the photo below. The 15s representing the diagonal sums don't seem to align with the row sums. \[ \begin{blockarray}{ccc@{\hspace{5mm}}c} \matindex{15} & \matindex{15} & \matindex{15} & \matindex{15} \\ % top column sums \begin{block}{[ccc]c} 4 & 9 & 2 & 15 \\ % row sums 3 & 5 & 7 & 15 \\ 8 & 1 & 6 & 15 \\ \end{block} & & & \matindex{15} % extra bottom-right 15 \end{blockarray} \]

  • Texshop doesn’t compile when activated
    by Victor on November 23, 2025 at 2:33 pm

    I use Macvim as an external editor with Texshop. I have it set up so that a single vim command writes the file out and triggers an osascript that activates Texshop. In the past, Texshop would then activate and automatically recompile the latex file if it had changed. However, I just got a new MacBook with Tahoe (upgraded to 26.1) and the version of Texshop from mactex. Now, while Texshop still activates, it doesn’t auto-recompile. It’s not the end of the world, but it would be nice to have the old behavior. Thanks for any tips!

  • Merging Multiple Customised LaTeX Documents with Continuous Pages and Working Links (and more)
    by Stefano Bragaglia on November 23, 2025 at 12:01 pm

    Last year I asked for your help in creating a package to produce the newsletter for my bonsai club. I’ve been using it successfully and with great satisfaction to publish all of last year's issues. Thank you all very much! Now I’d like to compile all of last year's issues into a single volume, but I'm not sure how best to approach the task to get a fully satisfactory result. I'm aware of several methods for merging multiple PDFs into a single file, but they wouldn’t update the page numbers, and I’m not certain whether the clickable links in the side panel on each issue’s main page would still work properly. By the way, I've noticed that when I click any of those links (I use Preview on a Mac), they take me to the middle of the first page rather than to the correct page (even though the page number shown in the link text is accurate). So there must be something wrong with the package code itself, but I’ve no idea how to go about debugging it. Moreover, the newsprint.sty package that I created with your help requires the issue number, volume number, and month to be specified in the preamble in order for the main page to render correctly. I've really no idea how to make this happen multiple times within a single document (once for each issue I’d like to include). Last but not least, I'd like to include a table of contents before all the issues, so that it's easy to jump to any particular issue. Since the newsprint.sty package doesn't use the standard sectioning commands, the ToC isn't generated automatically, and I'd have to use \addcontentsline{toc}{chapter}{...} (and possibly \phantomsection). If I go down that route, I'd need to edit all the previous issues manually, so I'm wondering whether it might be better to fix the code in newsprint.sty once and for all instead. At the moment, I'm experimenting with the pdfpages and combine packages to see how they handle the issues mentioned above. I’ve also tried looking into how publishing companies compile scientific articles, but I quickly realised I’d fallen down a bit of a rabbit hole... So, to summarise, I'd like to find the best way to merge all the newsletter issues so that: I need to do as little editing as possible on the old files There's a table of contents that allows me to navigate easily to each issue The page numbers continue across issues instead of restarting at 1 each time The issue number, volume, and month (normally set in the preamble of each document) work correctly Bonus: the "In this issue:" links in the side panel of each issue's main page function properly. Please find below my current newsprint.sty, editorial.tex, article_1.tex, article_2.tex, and main.tex (which includes the others and produces a PDF when compiled) as a minimal working example. You can assume there's a set of main.tex, editorial.tex, article_1.tex, and article_2.tex for each newsletter issue that needs to be merged. Since the issues have recurring sections, it is safe to assume that these articles have the same /label{...}. I've also included placeholders for images and the logo. Thank you in advance for any help! newsprint.sty %%% insert your licence statement here and declare the package as a derivative, %%% if applicable (but good practice even if not required) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% original licence statement: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Matthew Allen %%% January 14, 2007 %%% %%% This package provides a newspaper style heading %%% for the standard Article class. The default plain %%% page style is redefined to accomodate headings %%% at the top of all subsequent pages. %%% %%% a good idea to use with this package is %%% the multicols package and the picinpar package %%% %%% Modified by Stefano Bragaglia to create %%% the newsletter of the TWickenham bonsai club %%% with help from the community on tex.stackexchange.com %%% %******* Identification ***** \ProvidesPackage{newsprint} \NeedsTeXFormat{LaTeX2e} %******* Declaration of options ***** % no options at this time %******* Execution of options ***** % no options at this time %****** Package Loading ***** % \RequirePackage[semibold,condensed]{cabin} % used for the paper title font % similar to Avenir Next Condensed % used in the club logo %****** main code ***** %define font for page title % \DeclareFontFamily{LYG}{bigygoth}{} % \DeclareFontShape{LYG}{bigygoth}{m}{n}{<->s*[2.5]ygoth}{} \DeclareRobustCommand \titlefont{% \not@math@alphabet\titlefont\relax \fontfamily{Cabin-TLF}\fontseries{c}\upshape } \DeclareTextFontCommand \texttitle{\titlefont} %%%%%%%%%%% Define Text Dimensions %%%%%%% \setlength\topmargin{-48pt} % article default = -58pt \setlength\headheight{0pt} % article default = 12pt \setlength\headsep{34pt} % article default = 25pt \setlength\marginparwidth{-20pt} % article default = 121pt \setlength\textwidth{7.0in} % article default = 418pt \setlength\textheight{9.5in} % article default = 296pt \setlength\oddsidemargin{-30pt} %%%% counters for volume and number %%%% \newcounter{volume} \newcommand\currentvolume[1]{\setcounter{volume}{#1}} \newcounter{issue} \newcommand\currentissue[1]{\setcounter{issue}{#1}} %%%% set internal variables %%%% \def\@papername{Committee Times} \def\@headername{Committee Times:} % because of the yfonts you may need both papername and headername \def\@paperlocation{Washington DC} \def\@paperslogan{``All the News I Feel Like Printing.''} \def\@paperprice{Zero Dollars} \newcommand\SetPaperName[1]{% \def\@papername{#1}} \newcommand\SetHeaderName[1]{% \def\@headername{#1}} \newcommand\SetPaperLocation[1]{% \def\@paperlocation{#1}} \newcommand\SetPaperSlogan[1]{% \def\@paperslogan{#1}} \newcommand\SetPaperPrice[1]{% \def\@paperprice{#1}} %%%%%%%%%%% Redefine \maketitle %%%%%%% \renewcommand{\maketitle}{\thispagestyle{empty} \vspace*{-40pt} \begin{center} {\setlength\fboxsep{3mm}\raisebox{12pt}{\framebox[1.2\width]{\parbox[c]{1.15in}{\begin{center}\small \@paperslogan\end{center}}}}}\hfill {\titlefont\fontsize{40pt}{10pt}\selectfont\@papername}\hfill \raisebox{12pt}{\textbf{\footnotesize \@paperlocation}}\\ \vspace*{0.1in} \rule[0pt]{\textwidth}{0.5pt}\\ {\small VOL.\MakeUppercase{\roman{volume}}\ldots No.\arabic{issue}} \hfill \MakeUppercase{\small\itshape\@date} \hfill {\small\MakeUppercase{\@paperprice}}\\ \rule[6pt]{\textwidth}{1.2pt} \end{center} \pagestyle{plain}% } %%%%%%% redefine plain page style %%%%%%% \renewcommand{\ps@plain}{% \renewcommand\@oddfoot{}% % empty recto footer \let\@evenfoot\@oddfoot % empty verso footer \renewcommand\@evenhead {\parbox{\textwidth}{\vspace*{4pt} {\small VOL.\MakeUppercase{\roman{volume}}\ldots No.\arabic{issue}}\hfill\normalfont\textbf{\@headername}\quad\MakeUppercase{\itshape\@date}\hfill\textrm{\thepage}\\ \rule{\textwidth}{0.5pt} \vspace*{12pt}}}% \let\@oddhead\@evenhead} %%%%%%%%%%% Headline (with byline) command %%%%%%%%% \newcommand\headline[1]{\begin{center} #1\\ % \rule[3pt]{0.4\hsize}{0.5pt}\\ \end{center} \par} \newcommand\byline[2]{\begin{center} #1 \\% {\footnotesize\bfseries By \MakeUppercase{#2}} \\ % \rule[3pt]{0.4\hsize}{0.5pt}\\ \end{center} \par} \newcommand\closearticle{{\begin{center}\rule[6pt]{\hsize}{1pt}\vspace*{-16pt} \rule{\hsize}{0.5pt}\end{center}}} \newcommand\topic[1]{\vspace{0.5em}\noindent\textbf{\sffamily #1} \par} %%%%%%%%%%%%%%%%%%%% End of Package %%%%%%%%%%%%%%% editorial.tex \byline{{\textbf{\Large\sffamily Bonsai Club Newsletter:}}\\ {\textbf{\large\sffamily How to collate issues into a single volume?}}}{The Newsletter Team} \noindent \lipsum[2] \medskip \lipsum[4] \begin{window}[2,l,\includegraphics[width=1.0\columnwidth]{picture},\centerline{\emph{Placeholder for a picture.}}] \end{window} \vspace{-1em} \closearticle \clearpage article_01.tex \headline{{\textbf{\Large\sffamily Article 1:}}\\ {\textbf{\large\sffamily Lorem Ipsum at its Best!}}} \label{art01} \noindent \lipsum[2] \medskip \topic{Lorem Topic} \noindent \lipsum[4] \medskip \topic{Ipsum Topic} \noindent \lipsum[3] \begin{center} $\cdots$ \end{center} \noindent \lipsum[2] \closearticle } \end{multicols} \begin{center} \begin{minipage}[b]{.9\textwidth} \includegraphics[angle=0,origin=c,width=1.0\textwidth]{picture} \centerline{\emph{Lorem ipsum dolor.}} \end{minipage}\quad \end{center} \clearpage \begin{multicols}{2}{ article_02.tex \headline{{\textbf{\Large\sffamily Article 2:}}\\ {\textbf{\large\sffamily More Lorem Ipsum for you!}}} \label{art02} \noindent \lipsum[3] \medskip \topic{Lorem Topic} \noindent \lipsum[4] \lipsum[5] \begin{window}[2,l,\includegraphics[width=1.0\columnwidth]{picture},\centerline{\emph{Lorem ipsum dolor sit amen.}}] \end{window} \columnbreak \medskip \topic{Ipsum Topic} \noindent \lipsum[1] \lipsum[2] \vspace{-1em} \begin{center} $\cdots$ \end{center} \vspace{-1em} \noindent \lipsum[6] \closearticle \begin{window}[2,l,\includegraphics[width=1.0\columnwidth]{picture},\centerline{\emph{Consectetuer adisciping elit.}}] \end{window} \pagebreak

  • Automatic (but deactivatable) language switching when typing cyrillic
    by Apothikon on November 23, 2025 at 10:50 am

    this is my first question on this site, so I hope I didn't broke any social convention in not introducing myself. I'm writing a simple grammar of Church Slavonic, a slavic liturgical language written with an archaich variant of the cyrillic script. The main text of my document is in English (actually in Italian, but here I use English for clarity's sake) but it obviously contains quite a bit of Church Slavonic, both in long example texts and in short words or even single letters scattered in the English sentences. I've loaded the appropriate polyglossia options and a font for archaic cyrillic letters, and the long Church Slavonic passages are easily handled with \textchurchslavonic{⟨random text⟩} or: \begin{churchslavonic} ⟨random text⟩ \end{churchslavonic} However, in sentences such as the following, the use on \textchurchslavonic{} is quite inefficient: Letters \textchurchslavonic{і}, \textchurchslavonic{и} and \textchurchslavonic{ѵ} usually represent the same sound, but sometimes \textchurchslavonic{ѵ} is pronounced like \textchurchslavonic{в} instead. The above case is very frequent and not the worst possible. So I wanted a way to make the language switch more or less automatic using LuaLaTeX. A possible solution I found would be to load \usepackage{newunicodechar} and redefine each cyrillic letter to be treated as Church Slavonic, like this: \newunicodechar{А}{{\textchurchslavonic А}} \newunicodechar{а}{{\textchurchslavonic а}} The problem of this approach is that it seems impossible to deactivate the language/font switching in the rare instances in which I need to write in modern cyrillic, as shown in the following MWE: \documentclass{article} \usepackage{fontspec} \usepackage{polyglossia} \usepackage{xkeyval} % it solves an incompatibility issue between polyglossia and churchslavonic \usepackage{churchslavonic} \usepackage{newunicodechar} %%%%%%%%%%% \setmainlanguage{english} \setotherlanguage{churchslavonic} \setmainfont{EB Garamond} \newfontfamily\churchslavonicfont{Arial} % I actually use a specialized font which I've installed on my computer \newunicodechar{А}{{\textchurchslavonic А}} \newunicodechar{а}{{\textchurchslavonic а}} \begin{document} These letters are in Church Slavonic script (here set in Arial): А, а. These following should be in EB Garamond: \textnormal{А, а}, which are not! \end{document} I know that \textnormal or similar commands can't work in this situation, so I'm asking: is there any solution in LuaLaTeX? Thank you in advance

  • First paragraph not indented in paracol environment
    by Roland Chastain on November 23, 2025 at 10:04 am

    I am making a bilingual document using paracol. I don't know why the first paragraph is not indented, as other are. I would like that it be indented. Here is my code: \documentclass[14pt,a4paper]{extarticle} \usepackage{fontspec} \usepackage[german,latin]{babel} \usepackage{microtype} \usepackage[margin=16mm]{geometry} \usepackage{paracol} % https://tex.stackexchange.com/a/505562/295527 \newcommand\chunks[2]{% \begin{leftcolumn*}\begin{otherlanguage}{latin}% {#1}% \end{otherlanguage}\end{leftcolumn*}% \begin{rightcolumn}\begin{otherlanguage}{german}% {#2}% \end{otherlanguage}\end{rightcolumn}% } \setlength{\columnsep}{8mm} \setlength{\columnseprule}{0.4pt} \usepackage[center]{titlesec}% https://tex.stackexchange.com/a/107282/295527 \begin{document} \thispagestyle{empty} \section*{GEBETE.} \subsection*{Das «Gegrüsset seist du, Maria».} \begin{paracol}{2} \chunks{\textsc{Ave}, Maria, gratia plena, Dominus tecum, benedicta tu in mulieribus et benedictus fructus ventris tui, Jesus.} {\textsc{Gegrüsset} seist du, Maria, voll der Gnade; der Herr ist mit dir; du bist gebeinedeit unter den Weibern, und gebeinedeit ist die Frucht deines Leibes, Jesus.} \chunks{Sancta Maria, Mater Dei, ora pro nobis peccatoribus, nunc et in hora mortis nostræ. Amen.} {Heilige Maria, Mutter Gottes, bitte für uns Sünder jetzt und in der Stunde unseres Todes! Amen.} \end{paracol} \end{document}

  • Plans for evolution/support of {Xe|Lua[node|harf]}LaTeX?
    by Alain Stalder on November 23, 2025 at 7:44 am

    Let me first give some context: As far as I can see, the original TeX/LaTeX including rendering with pdflatex has been very reliably producing the same visual output for decades now and presumably will for many more decades into the future, while there can be glitches due to various optional packages influencing each other. If you plan to or need to support a series of possibly evolving documents with a shared *TeX source code base, that is a very important feature, often close to an absolute necessity. However, I guess still due to Donald E. Knuth’s decision of 1990 in a TUGboat article titled The Future of TeX and METAFONT to not allow especially METAFONT to evolve into the future, and with in parallel newer font features broadly needed and desired, new variants/"variants" of LaTeX emerged that use especially OpenType fonts, I presume having evolved partially via ConTeXt to now XeLaTeX and LuaLaTeX. As far as I understand, XeLaTeX uses the HarfBuzz library (C++, the basis of font support in modern web browsers, Android and a lot more), which is also used by LuaLaTeX with the HarfBuzz renderer, while LuaLaTeX with the default Node renderer is doing it in some other way (maybe native Lua or C?). These three "engines" (XeLaTeX, LuaLaTeX/HarfBuzz and LuaLaTeX/Node) seem to produce similar output in many typical use cases, but in border cases differ. In contrast, as Knuth writes in the above article, at least at the time he wrote it there were tests called TRIP and TRAP that specifically focus on border/edge cases, again a very desirable feature in the context of long-term reliability. Since I write software for a living and partially also as a hobby, I am well aware that for all that it appears the situation is not easy or simple: The three "engines" are broadly used (except maybe LuaLaTeX/HarfBuzz?) so that I presume even making small meaningful changes or small bug fixes would often be close to impossible. Now to the main question (which I presume is of interest to many *TeX users): What are the plans and/or the likely outcome for the three "engines" and thus what is the recommendation which of those three (if any) to use if you want long-term reliable output and need features beyond pdflatex? Related questions that could at least make it easier to decide individually for users: • Any plans to freeze one or some of the "engines"? (Has XeLaTeX already been essentially frozen? And maybe LuaLaTeX/HarfBuzz less future than LuaLaTeX/Node? Or the other way round? Or both to evolve? If several "engines" are planned to keep evolving, any plans to harmonize their output a bit further? Or plans for a new "engine" that would be largely compatible with "the best of all three" but have a more stringent design and tests? Maybe a new renderer "..." for LuaLaTeX?) • Are there tests similar to "TRIP and TRAP" for any of those "engines" or plans to implement more of that in the future? • Any helpful links around the planned/envisioned future of *TeX would be appreciated... Questions on the side: • Did anybody recently ask Donald E. Knuth if he would maybe be willing to change his mind regarding the Computer Modern font under some circumstances, like maybe a well-defined and well-tested environment, like maybe in a future "engine" out of or derived from the mentioned three? (In my personal view, the quality of the font is unparalleled, but it is also tied to it being typeset as intended, which I why I can understand his decision in 1990.)

  • Command \showhyphens has changed
    by DavidIsDumb on November 23, 2025 at 1:58 am

    I got a warning when using Overleaf saying "Command \showhyphens has changed". The AI tells me I don't need to change anything, but honestly I don't understand why that pops up. There are hyphens in my text and they work normally. Can somebody explain why the error message is there? The AI said "The message "Command \showhyphens has changed." is an informational message, not an error. It usually appears when a package (like babel or polyglossia) redefines the \showhyphens command. This does not stop compilation and does not require a fix unless you are experiencing other issues. No action is needed for this message. If you are experiencing other errors, please provide those log entries." and I used \usepackage[dvipsnames,svgnames]{xcolor} \usepackage[shortlabels]{enumitem} \usepackage[framemethod=TikZ]{mdframed} \usepackage{amsmath,amssymb,amsthm} \usepackage{epigraph} \usepackage[colorlinks]{hyperref} \usepackage{microtype} \usepackage{mathtools} \usepackage[headsepline]{scrlayer-scrpage} \usepackage{thmtools} \usepackage{listings} \usepackage{derivative} Which package doesn't work?

  • How to use a GPU to run Lua math faster?
    by Jasper on November 23, 2025 at 12:37 am

    I've heard that I can hook up a GPU to handle my matrix multiplications significantly faster. I want to do this locally, so I can make gifs faster. E.g., I have a lua-based animation, and it still takes ages to compile. I heard a GPU can do it orders of magnitude faster. That makes a 10 minute video compile in about 6 seconds, assuming as least two orders. MWE: \documentclass[tikz,border=1cm]{standalone} \usepackage{lua-tikz3dtools} % https://github.com/Pseudonym321/TikZ-Animations/tree/master1/TikZ/lua-tikz3dtools \begin{document} \pgfmathsetmacro{\startparam}{0} \pgfmathsetmacro{\stopparam}{2*pi} \pgfmathsetmacro{\samplesparam}{40} \pgfmathsetmacro{\stepparam}{(\stopparam-\startparam)/(\samplesparam-1)} \foreach \param[parse=true] in {\startparam,\startparam+\stepparam,...,\stopparam-\stepparam } { \begin{tikzpicture} \useasboundingbox[scale=6] (-1,-1) rectangle (1,1); \setobject[ name = {T} ,object = { matrix_multiply( matrix_multiply( euler(pi/2,pi/4+pi/4*sin(\param),5.25*pi/6+\param) ,translate(0,0,-10) ) ,matrix_multiply( { {1,0,0,0} ,{0,1,0,0} ,{0,0,1,0} ,{0,0,0,1} } ,matrix_multiply(xscale(1),yscale(1)) ) ) } ] \setobject[ name = {I} ,object = { matrix_inverse(T) } ] \appendsurface[ ustart = {-2} ,ustop = {2} ,usamples = {20} ,vstart = {-2} ,vstop = {2} ,vsamples = {20} ,transformation = {T} ,x = {u} ,y = {v} ,z = {u^4 + v^4 - 4*u*v + 1} ,fill options = { preaction = { fill = green ,fill opacity = 0.2 } ,postaction = { draw = blue ,ultra thin ,line join = round } } ,filter = { abs(matrix_multiply(A,I)[1][3])<2.01 and abs(matrix_multiply(B,I)[1][3])<2.01 and abs(matrix_multiply(C,I)[1][3])<2.01 and abs(matrix_multiply(A,I)[1][2])<2.01 and abs(matrix_multiply(B,I)[1][2])<2.01 and abs(matrix_multiply(C,I)[1][2])<2.01 and abs(matrix_multiply(A,I)[1][1])<2.01 and abs(matrix_multiply(B,I)[1][1])<2.01 and abs(matrix_multiply(C,I)[1][1])<2.01 } ] % I can't find these trajectories for the life of me! % \appendcurve[ % ustart = {-2} % ,ustop = {2} % ,usamples = {20} % ,transformation = {T} % ,x = {u*cos(pi/4)} % ,y = {u*sin(pi/4)} % ,z = {(u*cos(pi/4))^4 + (u*sin(pi/4))^4 - 4*(u*cos(pi/4))*(u*sin(pi/4)) + 1} % ,draw options = { % draw = blue % ,ultra thin % ,line join = round % } % ] % \appendcurve[ % ustart = {-2} % ,ustop = {2} % ,usamples = {20} % ,transformation = {T} % ,x = {u*cos(3*pi/4)} % ,y = {u*sin(3*pi/4)} % ,z = {(u*cos(3*pi/4))^4 + (u*sin(3*pi/4))^4 - 4*(u*cos(3*pi/4))*(u*sin(3*pi/4)) + 1} % ,draw options = { % draw = red % ,ultra thin % ,line join = round % } % ] \appendsolid[ ustart = {-2} ,ustop = {2} ,usamples = {2} ,vstart = {-2} ,vstop = {2} ,vsamples = {2} ,wstart = {-2} ,wstop = {2} ,wsamples = {2} ,transformation = {T} ,x = {u} ,y = {v} ,z = {w} ,fill options = { preaction = { fill = none ,fill opacity = 0.5 } ,postaction = { draw = none ,ultra thin ,line join = round ,line cap = round } } ] \appendcurve[ ustart = {0} ,ustop = {4} ,usamples = {2} ,x = {0} ,y = {0} ,z = {u} ,transformation = {T} ,arrow tip = {true} ,draw options = { draw ,ultra thin ,line cap = round } ] \appendlabel[ x = {0} ,y = {0} ,z = {4.3} ,transformation = {T} ,name = {\(z\)} ] \appendcurve[ ustart = {0} ,ustop = {4} ,usamples = {2} ,x = {0} ,y = {u} ,z = {0} ,transformation = {T} ,arrow tip = {true} ,draw options = { draw ,ultra thin ,line cap = round } ] \appendlabel[ x = {0} ,y = {4.3} ,z = {0} ,transformation = {T} ,name = {\(y\)} ] \appendcurve[ ustart = {0} ,ustop = {4} ,usamples = {2} ,x = {u} ,y = {0} ,z = {0} ,transformation = {T} ,arrow tip = {true} ,draw options = { draw ,ultra thin ,line cap = round } ] \appendlabel[ x = {4.3} ,y = {0} ,z = {0} ,transformation = {T} ,name = {\(x\)} ] \foreach \p in {-4,-3,...,4} { \appendcurve[ ustart = {-4} ,ustop = {4} ,usamples = {2} ,x = {u} ,y = {\p} ,z = {0} ,transformation = {T} ,draw options = { draw = black!70!white ,ultra thin ,line cap = round ,densely dashed } ] \appendcurve[ ustart = {-4} ,ustop = {4} ,usamples = {2} ,x = {\p} ,y = {u} ,z = {0} ,transformation = {T} ,draw options = { draw = black!90!white ,ultra thin ,line cap = round ,densely dashed } ] } \appendsurface[ ustart = {-4} ,ustop = {4} ,usamples = {2} ,vstart = {-4} ,vstop = {4} ,vsamples = {2} ,transformation = {T} ,x = {u} ,y = {v} ,z = {0} ,fill options = { preaction = { fill = gray!70!white ,fill opacity = 0.6 } ,postaction = { draw = none ,ultra thin ,line join = round } } ] \displaysegments \end{tikzpicture} } \end{document}

  • [T1]{fontenc} changes "lightness" of font [duplicate]
    by Allan Felipe on November 22, 2025 at 11:04 pm

    I noticed that I need to comment the line \usepackage[T1]{fontenc} to get a normal font or else it becomes "light". Since I believe that's not a normal behavior, what could be the reason for that? I'll paste the packages in my preamble and two images with and without [T1]{fontenc}. Thanks % \usepackage[T1]{fontenc} \usepackage[ansinew]{inputenc} \usepackage[brazil]{babel} \usepackage{etoolbox} \usepackage{graphicx} \usepackage{array} \usepackage{caption} \usepackage{subcaption} % \usepackage{newtxtext,newtxmath} \usepackage{pifont} \usepackage[dvipsnames]{xcolor} \usepackage{amsmath} \usepackage{amssymb} \usepackage{tikz} \usepackage{multirow} \usepackage{fancyhdr} \usepackage{indentfirst} \usepackage[a4paper, left=2.5cm, right=2.5cm, bottom=2.2cm, top=3.2cm]{geometry}

  • Why doesn't Tcolorbox respect spacing
    by Dorian on November 22, 2025 at 10:41 pm

    I am facing a problem with tcolorbox: the spacing between my paragraphs and my lists is not the same inside a tcolorbox, and I don’t know how to fix it (as you can see in the image, the blue arrow shows a much larger spacing than the purple arrow). Thank you in advance. MWE : \documentclass[11pt]{article} % Encodings and language \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[french]{babel} \usepackage{lmodern} % ============================================================ % GLOBAL SPACING MANAGEMENT % ============================================================ % 1. Spacing between paragraphs \setlength{\parskip}{4pt} % space between paragraphs \setlength{\parindent}{0pt} % indentation of the first line % 2. Line spacing in the text \usepackage{setspace} \setstretch{1.15} % line spacing (1.0 = single, 1.3 = 1.5, 1.6 = double) % ============================================================ % LIST MANAGEMENT (itemize, enumerate, etc.) % ============================================================ \usepackage{enumitem} % Fine configuration: \setlist{ % itemsep=0pt, % space between items % parsep=4pt, % space between paragraphs inside an item topsep=0pt, % space before/after the list % partopsep=2pt, % additional space at the beginning of a list inside environments % left=1.5em % left margin } % ============================================================ % PARAMETERS FOR TCOLORBOX % ============================================================ \usepackage{tcolorbox} % Example of a tcolorbox style controlling spacing \tcbset{ myboxstyle/.style={ colback=white, colframe=black, boxsep=4pt, % internal space between the border and the text left=4pt, % internal left margin right=4pt, % internal right margin top=6pt, % internal top margin bottom=6pt, % internal bottom margin before skip=12pt, % space before the box after skip=12pt, % space after the box } } % ============================================================ \begin{document} \section*{Example with all spacing controlled} Here is a paragraph of text to illustrate spacing. % Outer list \begin{itemize} \item Outer item A \item Outer item B \item Outer item C \end{itemize} Here is the paragraph that follows the list. % tcolorbox with a list \begin{tcolorbox}[myboxstyle, title=Box with itemize] Example of text inside a tcolorbox. \begin{itemize} \item Inner item 1 \item Inner item 2 \item Inner item 3 \end{itemize} Middle of the box \begin{itemize} \item Inner item 4 \item Inner item 5 \item Inner item 6 \end{itemize} \end{tcolorbox} % List after the box \begin{itemize} \item Outer item D \item Outer item E \end{itemize} \end{document}

  • Make tcblistof display tcolorboxes from the current chapter only
    by UnderscorePoY on November 22, 2025 at 9:41 pm

    Setup: In a big document with several chapters, i generate several tcolorbox instances per chapter of the same tcbtheorem called "method", with an option list inside={methods}. Needed: At the start of each chapter, i want to display -- with a call to \tcblistof -- a list of all methods within that chapter. Issue: With this default implementation, the first call to \tcblistof outputs a single list containing all "method" boxes from all the chapters, and any subsequent call to \tcblistof produces an empty list. Question: What is the simplest way to achieve this ? An idea could be to edit the value inside the list inside option to change depending on the chapter count, but i don't know how to do this or even if this is the cleanest solution. MWE: \documentclass[a4paper, 11pt]{report} \usepackage[many]{tcolorbox} \newtcbtheorem[list inside={methods}]{method}{Method}{}{}% \begin{document} \chapter{My chapter 1} \tcblistof[\section*]{methods}{Methods Chapter 1}% Lists all methods, not only this chapter's \begin{method}{1}{} \end{method} \begin{method}{2}{} \end{method} \chapter{My chapter 2} \tcblistof[\section*]{methods}{Methods Chapter 2}% Lists nothing \begin{method}{3}{} \end{method} \begin{method}{4}{} \end{method} \end{document}

  • Refactor AI code for a forest diagram
    by projetmbc on November 22, 2025 at 9:40 pm

    In the code below, made using the "AI" Claude, there is too much copying and pasting of lines like the ones shown below. What is the best way to refactor the full code? archivefile/.style={ before typesetting nodes={ content/.wrap value={ \textcolor{orange!80}{\faFileArchive}\ ##1 } } } Here is the full code. \documentclass{article} \usepackage{forest} \usepackage{fontawesome5} \definecolor{foldercolor}{RGB}{124,166,198} \definecolor{filecolor}{RGB}{88,88,88} \forestset{ dir tree/.style={ for tree={ font = \sffamily, grow' = 0, child anchor = west, parent anchor= south, anchor = west, calign = first, inner ysep = 1pt, inner xsep = 1.75pt, text depth = 0pt, edge path = { \noexpand \path[draw, \forestoption{edge}] (!u.south west) +(7.5pt,0) |- (.child anchor)\forestoption{edge label}; }, before typesetting nodes={ if n=1 {insert before={[,phantom]}} {} }, fit = band, before computing xy = {l = 15pt}, } }, open/.style={ before typesetting nodes={ content/.wrap value={ \textcolor{foldercolor}{\faFolderOpen}\ ##1 } } }, closed/.style={ before typesetting nodes={ content/.wrap value={ \textcolor{foldercolor}{\faFolder}\ ##1 } } }, file/.style={ before typesetting nodes={ content/.wrap value={ \textcolor{filecolor}{\faFile}\ ##1 } } }, codefile/.style={ before typesetting nodes={ content/.wrap value={ \textcolor{filecolor}{\faFileCode}\ ##1 } } }, pdffile/.style={ before typesetting nodes={ content/.wrap value={ \textcolor{red!70}{\faFilePdf}\ ##1 } } }, textfile/.style={ before typesetting nodes={ content/.wrap value={ \textcolor{filecolor}{\faFile*}\ ##1 } } }, imagefile/.style={ before typesetting nodes={ content/.wrap value={ \textcolor{blue!70}{\faFileImage}\ ##1 } } }, archivefile/.style={ before typesetting nodes={ content/.wrap value={ \textcolor{orange!80}{\faFileArchive}\ ##1 } } }, } \begin{document} \subsection*{Exemple d'arborescence de fichiers} \begin{forest} dir tree [system, open [config, closed [settings.conf, textfile] [database.yml, codefile] ] [doc, open [manual.pdf, pdffile] [README.md, textfile] [images, closed [logo.png, imagefile] [banner.jpg, imagefile] ] ] [lib, closed [utils.py, codefile] [helpers.js, codefile] [archive.zip, archivefile] ] [test, open [test\_unit.py, codefile] [test\_integration.py, codefile] [fixtures, closed [data.json, file] ] ] ] \end{forest} \subsection*{Exemple simple} \begin{forest} dir tree [system, open [config, closed] [Dog, closed] [lib, closed] [test, closed] ] \end{forest} \end{document}

  • how to shade an region bounded by curves
    by underflow on November 22, 2025 at 6:43 pm

    I have a region on the plane bounded by two hyperbolas xy = +/- C. What is the best/simplest way to shade (not filled) the "star shaped" region enclosed by these two hyperbolas? Advanced version of this question: I have two rays in the first quadrant, starting from the origin. These two rays cut out a curved wedge in the star shaped region. How I can shade this wedge in a different color from the rest of the region? Here is a MWE for the star shaped region, plus the two rays: \documentclass{amsart} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw [thick, domain=0.5:3] plot (\x, { 1.2/\x)}); \draw [thick, domain=-3:-0.5] plot (\x, { 1.2/\x)}); \draw [thick, domain=0.5:3] plot (\x, {-1.2/\x)}); \draw [thick, domain=-3:-0.5] plot (\x, {-1.2/\x)}); \draw (-3.4,0) -- (3.4,0); \draw (0,-2.6) -- (0,2.6); \draw [thick] (0,0) -- (2.2,2.2); \draw [thick] (0,0) -- (3.1,1.5); \end{tikzpicture} \end{document} Thanks for your help! EDIT: I know how to fill a polygon using \draw [filled] (coord) -- (coord) -- etc but I don't know how to handle the parabolas.

  • resume enumerate from previous environment
    by stackoverflow21 on November 22, 2025 at 6:01 pm

    I'd like to resume the enumeration from my defined exercise environment. However, the resume option of enumitem obviously only resumes the first level of the enumeration. Therefore, I tried to save and restore enumii, which unfortunately does not work this way. Is there any way to resume with the second level of the previous environment? Here is my MWE: \documentclass{article} \usepackage{enumitem} \newcounter{cntExercise} \newcounter{saveenumii} \newenvironment{Exercise}{ \refstepcounter{cntExercise} \subsubsection*{Exercise Number \thecntExercise} \begin{enumerate}[label={\thecntExercise.\arabic*}] } { \setcounter{saveenumii}{\value{enumii}} \end{enumerate} } \newenvironment{Exerciseresume}{ \setcounter{enumii}{\value{saveenumii}} \begin{enumerate}[resume, label={\thecntExercise.\arabic*}] } { \end{enumerate} } \begin{document} \begin{Exercise} \item problem 1.1 \end{Exercise} \begin{Exercise} \item problem 2.1 \item problem 2.2 \end{Exercise} \noindent some text... \begin{Exerciseresume} \item shoud be problem 2.3 \end{Exerciseresume} \end{document}

  • How can I make sure characters 157 and 158 are populated with autoinst?
    by TobiBS on November 22, 2025 at 5:00 pm

    I have some Corporate True Type Fonts and use autoinst to convert them. However even though unicode characters uni0130 and uni0111 are there, after using the converted fonts I get the issue: glyph `Idotaccent' not found and glyph `dcroat' not found So I had a look and thought I need to provide unicoding commands to otftotfm, so I added extra commands to autoinst and the log files confirm that they are used: extra: --no-truetype --unicoding=Idot=:uni0130 --unicoding=dmacron=:uni0111` But no matter if I use Idotaccent or Idot or dmacron or dcroat, pdfLatex gives me the same output. What I don't get in the first place is, why I should provide such a command anyway. The font gives when I call otfinfo -g the glyphs Idotaccent and dcroat and of course contains unicode characters uni0130 as well as uni0111. If I am calling otfinfo -u I even get: uni0111 278 dcroat uni0130 101 Idotaccent What am I missing and what do I need to change? Reacting to cfrs questions: Minimal example \documentclass[]{minimal} \pdfmapfile{+MyOwnSansFont.map} \usepackage{MyOwnSansFont} \usepackage[T1]{fontenc} \begin{document} \sffamily \.Iletişim İletişim Character 157: \char157 I with dot \end{document} The MyOwnSansFont is the auto generated style file from autoinst. This then gets me this error message: pdfTeX warning: pdflatex.exe (file MyOwnSansFont.ttf): glyph Idotaccent' not found` So I want T1 encoding and also told autoinst so, hence also in the style file it is available and from what I understand T1 should have them: % 0x90 /Rcaron /Sacute /Scaron /Scedilla /Tcaron /Tcedilla /Udblacute /Uring /Ydieresis /Zacute /Zcaron /Zdot /IJ /Idot /dmacron /section Further finding Thank you for the questions and reactions so far, I think I came closer to a solution, but it is still strange. So I started to read and then I traced down the encoding file that comes out of otftotfm, copied it to my working directory and manually changed from: %90 /Rcaron /Sacute /Scaron /Scedilla /Tcaron /Tcommaaccent /Uhungarumlaut /Uring /Ydieresis /Zacute /Zcaron /Zdotaccent /IJ /Idotaccent /dcroat /section to %90 /Rcaron /Sacute /Scaron /Scedilla /Tcaron /Tcommaaccent /Uhungarumlaut /Uring /Ydieresis /Zacute /Zcaron /Zdotaccent /IJ /Idot /dmacron /section and everything works as it should. So for whatever reason even though the glyph names are reported to be available by the ttf and are also properly mapped, pdftex can only access them under the other name. What could be the reason for this and how can I fix this in the creation process?

  • latexmk and numerical calculus - Failure with --shell-escape
    by projetmbc on November 22, 2025 at 3:48 pm

    The following TeX file is well managed when invoking latexmk -pdf -pdflatex="lualatex" main.tex, but latexmk fails when used with latexmk -pdf -pdflatex="lualatex --shell-escape" main.tex. First case needs at most 2 compilations Second case implies more than 5 compilations. Why? As latexmk is aware of the external files, the reason could be numerical changes in the _luadraw folder files. But in that case, who is guilty? Lua? TikZ? Can we stress the problem? PS: luadraw is used. See https://github.com/pfradin/luadraw . % !TEX TS-program = lualatex \documentclass{standalone} \usepackage[svgnames]{xcolor} \usepackage[3d]{luadraw} \usepackage{animate} \begin{luacode*} nbimages = 35 name = "shadow" basename = cachedir .. name \end{luacode*} \begin{luadraw}{auto = false, exec = true} require 'luadraw_polyhedrons' local z0 = -3 local graphview = graph3d:new{ window3d = {-5, 8, -5, 8, z0, 5}, adjust2d = true, bbox = false, viewdir = perspective("yz", 0.35, 60), bg = "Beige", size = {10, 10} } local light = M(-5, -5, 3.5) local center = M(-1, -1, -1) local proj = function(A) return proj3dO( A, {z0*vecK, vecK}, A - light ) end local C = cube(center, M(-1, -1, z0)) -- TEMP: bug in version 2.3 local shadow, beam, beamVisible, beamHidden local theta = linspace(0, 360, nbimages + 1) for k = 1, nbimages do C_rotated = rotate3d( C, theta[k], {M(-1, -1, z0), vecK} ) shadow = cvx_hull3d( ftransform3d(C_rotated.vertices, proj) )[1] if not graphview:Isvisible(shadow) then shadow = reverse(shadow) end beam = pyramid(shadow, light, true) beamVisible, beamHidden = graphview:Classifyfacet(beam) graphview:Dfacet( graphview:Plane2facet({z0*vecK, vecK}), { color = "lightgray", contrast = 0 } ) graphview:Dseg3d({M(-5, -5, z0), light}) graphview:Dballdots3d(light, "Yellow", 2) graphview:Dpolyline3d( shadow, true, "draw = none, fill = DarkGray, fill opacity = 0.9" ) graphview:Dfacet( beamHidden, { color = "yellow", opacity = 0.4, mode = mShadedOnly } ) graphview:Dpoly( C_rotated, { color = "cyan", mode = mShadedHidden } ) graphview:Dfacet( beamVisible, { color = "yellow", opacity = 0.4, mode = mShadedOnly } ) graphview:Savetofile(basename .. k .. ".tkz") graphview:Cleargraph() end \end{luadraw} \def\nb{\directlua{tex.print(nbimages)}} \def\name{\directlua{tex.print(basename)}} \begin{document} \begin{animateinline}[ poster = first, controls, loop ]{6} \multiframe{\nb}{ik = 1+1}{% \input{\name\ik.tkz}% }% \end{animateinline} \end{document}

  • circuitikz / pgfpicture: modify existing symbol to a new one and rename it
    by cis on November 22, 2025 at 1:37 pm

    I want to create these block-circuit-symbols (I don't know the correct English name. 'Size limiter'? 'Limiter'? [German: "Größenwertbegrenzer"]) So I stole the \pgfpicture-code for the saturation-block (manual, p.107) out of the file pgfcircquadpoles.tex this is \pgfcirc@define@twoports{blocks} ... {saturation} ... (see MWE too). My current result (see below) definitely needs improvement. Feel free to make changes! But my main problem right now is: How do I give the new symbol its own name? In other words: How to make \draw (0,0) to[saturation] (2,0) to \draw (0,0) to[<better name>] (2,0) MWE: \documentclass[margin=5pt]{standalone} \usepackage{circuitikz} % How to give that another name as "saturation? \makeatletter %% origin: %% saturation block, contributed by P.Sacco <paul.sacco@estaca,eu> \pgfcirc@define@twoports{blocks} {} {\ctikzvalof{bipoles/saturation/width}} {saturation} {\ctikzvalof{bipoles/saturation/width}} {\ctikzvalof{bipoles/saturation/width}} { \pgfsetlinewidth{1.2\pgfstartlinewidth} \pgfpathmoveto{\pgfpointorigin} \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{.6\pgf@circ@res@step}} % \pgfpathlineto{\pgfpoint{0.65\pgf@circ@res@step}{.4\pgf@circ@res@step}} % \pgfpathmoveto{\pgfpointorigin} \pgfpathlineto{\pgfpoint{-.4\pgf@circ@res@step}{-.6\pgf@circ@res@step}} \pgfpathlineto{\pgfpoint{-0.85\pgf@circ@res@step}{-.6\pgf@circ@res@step}} \pgfusepath{draw} } \makeatother \begin{document} \begin{circuitikz} \draw (0,0) to[saturation, l=not orig. saturation] (2,0) to[L] (4,0); \end{circuitikz} \end{document}

  • How to recreate a DuPont scheme
    by Dorian on November 22, 2025 at 1:30 pm

    I'd like to recreate a DuPont scheme as the image below. I’m not necessarily asking for the exact code used to recreate the graphic, but rather for the packages and commands that would allow me to do it myself. Is there anything more “accessible” than TikZ? Thank you in advance 😉

  • How to configure language with DocumentMetadata and documentclass
    by user2609605 on November 22, 2025 at 12:11 pm

    I started using \DocumentMetadata just to create PDF/A. If I don't specify lang in the metadata, I receive LaTeX DocumentMetadata Warning: The language has not been set in (DocumentMetadata) \DocumentMetadata. (DocumentMetadata) Setting it to 'en' as fallback. which I can avoid specifying lang=en. I a sense, I specify the language also in \documentclass as an option english. I also use babel package and I know this reads the option english. It feels like a duplicate so I would like to remove language specification from the document class. Is the metadata setting really a replacement? What about hyphenation? What about German language? In particular I wonder about the treatment of german vs ngerman. Can this be expressed in \DocumentMetadata??

  • Integral symbol
    by Didier on November 22, 2025 at 7:52 am

    I have a problem with the integral symbol. Previously, it was perfectly straight and now it's tilted, even though I haven't changed my code. Before: Now: Here are the packages I use: \usepackage[dvipsnames,table,xcdraw]{xcolor} \usepackage{wrapfig2}%pour mettre des figures à côté de texte \usepackage{babel}%francisation \usepackage{mathtools} \usepackage[warnings-off={mathtools-colon,mathtools-overbracket},math-style=french]{unicode-math} \usepackage[default,varnothing]{fontsetup} \newfontface{\STIXTWO}{STIX Two Math} \usepackage[scale={0.75,0.8},footskip=1.5cm,heightrounded]{geometry} \usepackage[shortlabels]{enumitem}%pour pouvoir changer les labels des listes \usepackage{siunitx}%pour les unités \usepackage{xspace}%pour la gestion des espaces \usepackage[np,autolanguage]{numprint}%pour la séparation des milliers \usepackage{autoaligne}%pour les systèmes linéaires \usepackage{nicematrix}%pour les matrices "évoluées" \usepackage{tikz}%pour les graphiques et bien d'autres choses \usetikzlibrary{babel,fit,calc,arrows.meta,positioning,% decorations.pathreplacing,patterns.meta,angles,matrix,3d,quotes,mindmap,backgrounds} \usepackage{tkz-tab} \usepackage{emoji} \setemojifont{Noto Color Emoji} \usepackage[most]{tcolorbox}%pour les théorèmes, définitions, etc. \tcbuselibrary{documentation} Maybe there is an option in a package I should add? PS: Sorry for my English (I am French) Here is a MWE: \documentclass[10pt,a4paper,french]{book} \usepackage[dvipsnames,table,xcdraw]{xcolor} \usepackage{wrapfig2}%pour mettre des figures à côté de texte \usepackage{babel}%francisation \usepackage{mathtools} \usepackage[warnings-off={mathtools-colon,mathtools-overbracket},math-style=french]{unicode-math} \usepackage[default,varnothing]{fontsetup} \newfontface{\STIXTWO}{STIX Two Math} \usepackage[scale={0.75,0.8},footskip=1.5cm,heightrounded]{geometry} \usepackage[shortlabels]{enumitem}%pour pouvoir changer les labels des listes \usepackage{siunitx}%pour les unités \usepackage{xspace}%pour la gestion des espaces \usepackage[np,autolanguage]{numprint}%pour la séparation des milliers \usepackage{autoaligne}%pour les systèmes linéaires \usepackage{nicematrix}%pour les matrices "évoluées" \usepackage{tikz}%pour les graphiques et bien d'autres choses \usetikzlibrary{babel,fit,calc,arrows.meta,positioning,% decorations.pathreplacing,patterns.meta,angles,matrix,3d,quotes,mindmap,backgrounds} \usepackage{tkz-tab} \usepackage{emoji} \setemojifont{Noto Color Emoji} \usepackage[most]{tcolorbox}%pour les théorèmes, définitions, etc. \tcbuselibrary{documentation} \begin{document} \[\int_a^b f\] \end{document} And here is the result: I can't reproduce the upright version (and that's what I would want) Edit: I tried the solution provided by Apporv Potnis with the upint option. It is better but that's not exactlty what I had before: What I had before: Now with the upint option: As you can see, before it was less straight and more bold. I remember I recently updated the packages in Miktex. Maybe, it is the reason of the change? New Edit: In the stix-two package documentation, I see this: I think that is what I had before. So how do I get the Stylistic set 8?

  • Key value option for enumerate definition
    by azetina on November 22, 2025 at 5:44 am

    Consider the following MWE: \documentclass{article} \usepackage{amsmath} \usepackage{xcolor} \usepackage{enumitem} \newlist{enumatlib}{enumerate}{2}% \setlist[enumatlib]{ label=\arabic*, font=\bfseries, align=left, leftmargin=*, labelsep=1em, labelwidth=*, itemsep=2.5ex, before=\setupmodenumerate } \setlist[enumatlib,2]{ label=\Alph*, font=\bfseries, leftmargin=*, itemsep=1ex, before=\setupmodenumerate} \newif\ifmoditem \newif\ifcitem \newcommand{\setupmodenumerate}{% \global\moditemfalse \global\citemfalse \let\origmakelabel\makelabel \def\moditem##1{\global\moditemtrue\def\mesymbol{\footnotesize\normalfont\color{red}\parbox[t]{10em}{\raggedleft##1}}\item}% \def\citem##1{\global\citemtrue\def\cecolor{##1}\item}% \def\makelabel##1{% \origmakelabel{\ifmoditem\llap{\mesymbol\enspace}\else\ifcitem\color{\cecolor}\fi\fi##1}% \global\moditemfalse\global\citemfalse}% } %----------------- usage examples ----------------- \begin{document} Default behaviour (both features on): \begin{enumatlib} \moditem{M4.5 (KSC)} First question \begin{enumatlib} \citem{red} option 1 \item option 2 \item option 3 \item option 4 \end{enumatlib} \moditem{GT8.9 (KSC)} Second question \begin{enumatlib} \item option 1 \citem{red} option 2 \item option 3 \item option 4 \end{enumatlib} \end{enumatlib} \end{document} I would like assistance in creating a key-value that toggles off and on the entries for moditem and citem. See below. \begin{enumatlib}[mod=false,citem=false] \moditem{M4.5 (KSC)} First question \begin{enumatlib} \citem{red} option 1 \item option 2 \item option 3 \item option 4 \end{enumatlib} \moditem{GT8.9 (KSC)} Second question \begin{enumatlib} \item option 1 \citem{red} option 2 \item option 3 \item option 4 \end{enumatlib} \end{enumatlib} By default \citem will always have red as the color but having the option to choose the color is ideal.

  • expl3: l3file: \iow_now:Ne... doesn't expand tokens before writing to the stream?
    by Grass on November 22, 2025 at 4:43 am

    MWE: \documentclass{article} \begin{document} \ExplSyntaxOn \iow_new:N \g__test_iow \iow_open:Nn \g__test_iow { test.pl } \iow_now:Ne \g__test_iow { \# } \iow_close:N \g__test_iow \ExplSyntaxOff \end{document} This produces the file test.pl with contents \# instead of #. Also, if I do \iow_now:Ne \g__test_iow { \$ }, I get the error \g__test_iow=\write3 \openout3 = `test.pl'. ./testing2.tex:7: TeX capacity exceeded, sorry [input stack size=10000]. \font@name -> \OT1/cmr/m/n/10 l.7 \iow_now:Ne \g__test_iow { \$ } I don't understand why this error occurs. In any case, to avoid a X-Y problem situation, here is more context: I want to make the following work: \documentclass{article} \begin{document} \ExplSyntaxOn \seq_new:N \l__test_seq \seq_put_right:Ne \l__test_seq { 1 } \int_new:N \l__test_int \iow_new:N \g__test_iow \iow_open:Nn \g__test_iow { test.pl } \iow_now:Ne \g__test_iow { \#!/usr/bin/perl \seq_map_inline:Nn \l__test_seq { \int_incr:N \l__test_int my~\$width\_\int_use:N \l__test_int~=~##1 } } \iow_close:N \g__test_iow \ExplSyntaxOff \end{document} As you can see, I'm trying to create a perl script to which I save some TeX values to.

  • Command with `^^` and `__` as exponent optional arguments
    by projetmbc on November 21, 2025 at 8:54 am

    In the following toy example, I would like to use __ and ^^ instead of - and .. Is it possible? \documentclass[varwidth, border = 3pt]{standalone} \NewDocumentCommand{\hyperseq}{ m e_ e^ e- e. }{% $% {}% \IfValueT{#4}{_{#4}}% \IfValueT{#5}{^{#5}}% #1% \IfValueT{#2}{_{#2}}% \IfValueT{#3}{^{#3}}% $ } \begin{document} \hyperseq{u} \hyperseq{u}_{1} \hyperseq{u}_{1}^{2} \hyperseq{u}_{1}^{2}-{3} \hyperseq{u}_{1}^{2}-{3}.{4} \hyperseq{u}-{3}.{4} \end{document}