• Print page numbers from one run of a document as rules in a later run?
    by modallyFragile on November 6, 2026 at 11:27 am

    I have a custom class for making lecture handouts. It has an environment notes and an option notes; when the option is enabled, everything in the environment is printed in greyed-out text. When it is not, the environment is ignored completely. I use this to prepare my own, 'instructors version' of the handout for each lecture -- I write just one document, then I compile without the option (and print many copies for the students), then recompile with the option (and print one copy for me). During lectures I often refer to our place in the handout. Before I used the greyed-out notes I used to do this by page number. But of course, with the greyed-out notes, my copy of the handout has different numbering to the student's. I can use section and paragraph numbers, but it's not the same. Goal: I would like to somehow save the locations of the page-breaks in the students (non-noted) compilation run, and print these, perhaps as margin notes or cross-pages rules, in my notated compilation run (e.g. similar to the cross-page rules used for page-numbering here). I know how to do all the typesetting and I can play around with the format myself, but I don't know where to start with saving and printing the external numbers. I imagine the answer has something to do with the aux file, zref, or maybe the new marks interface? Ideally I would also like to be able to compile with notes more than once, and not lose the existing data on the student's page numbering, but I recognise that might be a lot of extra work for little benefit. Any solution should also ideally account for the possibility that I compile with notes first, and so there is no data on the students' numbering -- in this case perhaps just print a question mark or something. Here's an MWE. \begin{filecontents}[overwrite]{handout.cls} \NeedsTeXFormat{LaTeX2e} \ProvidesClass{handout-base} % Option for displaying notes \newif\ifnotes \notesfalse \DeclareOption{notes}{% \typeout{Option `notes' passed, notes will be displayed. Define macro `noteformat' to change formatting.} \notestrue% } \DeclareOption*{% \PassOptionsToClass{\CurrentOption}{article}% } \ProcessOptions\relax \LoadClass{article} \RequirePackage{xcolor} % Environment for writing notes \NewDocumentEnvironment{notes}{ +b }% {\ifnotes\bgroup\color{gray}#1\fi}% {\ifnotes\egroup\fi} % Cross-page rule counter printer for the page number \newcommand*\arabicpagerule[1]{\expandafter\@arabicpagerule\csname c@#1\endcsname} \newcommand*\@arabicpagerule[1]{ \begin{center} \hrulefill\raisebox{-0.5ex}{\the#1}\hrulefill\relax \end{center} } \end{filecontents} \documentclass% % [notes] % Uncomment and recompile for notated version {handout} \title{On the importance of \LaTeX\ in academia} \date{}\author{} \usepackage{lipsum} \begin{document} \maketitle \section{\TeX, the earlier days} \lipsum[1-2] \begin{notes}\lipsum[3]\end{notes} \section{Lamport's genius} \lipsum[5-6] \end{document} Which delivers: And my desired output after two runs, without then with notes, is something like this: Any help gratefully received. TIA.

  • Is there a way, using Pandoc, to set the format of \today (Markdown to PDF)?
    by gjmb on November 6, 2026 at 1:01 am

    I'm trying to set the format of the date field using Pandoc to convert .MD to .PDF. I use the xelatex engine to convert. Here is a MWE: --- title: "foo" author: Me date: \today --- What this prints as the date: November 5th, 2026. What I want: to be able to set it to things like 2026-11-05. What I've tried: Loading the isodate package (-\usepackage[USenglish]{isodate}). This didn't seem to do anything. Setting options as described here. I included every variant of -M date="`date "+%B%e, %Y"`" listed, but all this seemed to was to print that string of code in place of \today. What I have not tried (because it seems unnecessarily complicated) is making a Lua filter. I admittedly do not know that much about Pandoc or LaTeX. I know LaTeX and Markdown syntax, but my knowledge of the backend of these things is limited. I never learned raw TeX, and I may be missing something obvious. Is there some way to just format the input \today so that it is in, say, ISO?

  • Alignment of cells in a simple table
    by Ahmed Musa on November 6, 2026 at 12:38 am

    Why can are the cell alignment reversed in this code? \documentclass{article} \usepackage{array} \usepackage{booktabs} \begin{document} \begin{table}[htbp] \centering \begin{tabular}{| p{0.45\textwidth} | b{0.45\textwidth} |} \hline \textbf{Top-Aligned Column (p)} & \textbf{Bottom-Aligned Column (b)} \\ \hline This is a multi-line paragraph. Because we used the \textbf{p} specifier here, this column's content anchors to the top of the cell. & This is another multi-line paragraph. Because we used the \textbf{b} specifier here, this column's content anchors to the bottom of the cell. \\ \hline \end{tabular} \end{table} \end{document}

  • Can I automatically record the alt text of images?
    by Teepeemm on November 5, 2026 at 7:17 pm

    To support digital accessibility, my graduate school is requiring students' theses and dissertations to include an appendix that contains the alt-text, and long description when applicable, for all visual elements. I can somewhat help this process by creating commands for any alt text and description as follows: \DocumentMetadata{ tagging=on, lang=en-US, pdfstandard=ua-2 } \documentclass{article} \title{Title} \usepackage{graphicx} \begin{document} Some text that comes before a float. \begin{figure} \centering \gdef\duckAlt{A rubber duck with a crown on its head and a pizza.} \includegraphics[alt={\duckAlt},width=.5\textwidth]{example-image-duck} \caption{King duck}\label{fig:duck} \end{figure} Some text that comes between floats. \begin{figure} \centering % \gdef\gardnerAlt{Gardner's Conceptual Framework of Doctoral Student Development outlines the progressive phases of identity development that doctoral students experience, highlighting key challenges, sources of support, and potential points of attrition at each state.} % \gdef\gardnerDesc{% This is a diagram of Gardner's Conceptual Framework of Doctoral Student Development. It includes challenges and supports at three different phases. It also shows that students may depart their program at any phase. There is indication of the overlapping nature of Phase 1 to Phase 2 and Phase 2 to Phase 3. \begin{itemize} \item Phase 1 Challenges include admission, coursework begins, learning balance, transition from undergraduate to graduate expectations. \item Phase 1 Supports include orientation and initial relationships formed with peers and faculty. \item Phase 2 Challenges include coursework, examinations, changing role. \item Phase 2 Supports include peer relationships and advisor relationships. \item Phase 3 Challenges include candidacy, dissertation work, job search, and transition to professional role. \item Phase 3 supports include writing groups, advisor, and mentors. \end{itemize}} % \includegraphics[alt={\gardnerAlt},width=.77\textwidth]{Gardner} % \caption{Gardner's Conceptual Framework of Doctoral Student Development}\label{fig:gardner} % \end{figure} Some text that comes after a float. \clearpage \appendix \section*{Alt texts and figure descriptions} \paragraph{Figure \ref{fig:duck}:} \duckAlt \paragraph{Figure \ref{fig:gardner}:} \gardnerAlt \gardnerDesc \end{document} But this seems a bit error prone. Would it be possible to automate this process so that alt= records everything and then another command prints them? And a custom longDesc environment attaches itself to that alt text as well? The Gardner figure:

  • I cant compile my acros anymore, because of Helvetica and xcolor? [closed]
    by digior on November 5, 2026 at 2:00 am

    I have been trying to fix this issue for multiple hours yet i cant find the solution. Prerequisites: I have multiple files which all use the same template. The older ones i am certain used to work, but now i cant compile them anymore. Since then i had to reinstall vscode (unable to open on ARM-macOS) via homebrew. Further I am using pdflatex and acros in a seperate file from the main.tex. I use fancyhdr, color acro and xspace Possible Culprit: Acros in general work, but once i include the \fontfamily{phv} everything seems to break. Breaking used to mean for my acros to be bold font, wrong color and a ! behind it. Additionally for \acro{test}[Test]{Test full} i would get test instead of Test as the resulting word in my pdf. After recompiling and restarting my systems, somehow i have gotten to a point where now the acros work but i get @<>@<>@@<>@<>@ next to my acro inside of the tableofcontent, when i use my acro inside of \section{...} for example. I also get an error now: \contentsline {section}{\numberline {B} Test Section \ac {test}\global \let @<>@<>@@<>@<>@\global \AC@clearlist {\global \let @<>@<>@\relax \global \let @<>@<>@\relax \global \let @<>@<>@\relax \global \let @<>@<>@\relax \global \let @<>@<>@\relax \global \let @<>@<>@\relax \global \let @<>@<>@\relax \global \let @<>@<>@\relax \global \let @<>@<>@\relax \global \let @<>@<>@\relax \global \let @<>@<>@\relax \global \let @<>@<>@\relax \global \let @<>@<>@\relax \global \let @<>@<>@\relax \global \let @<>@<>@\relax \global \let @<>@<>@\relax \global \let @<>@<>@\relax }\xspace }{6}{appendix.B}% \providecommand \tocbasic@end@toc@file {}\tocbasic@end@toc@file Is there an easier way to this? Where can i educate myself? working example \documentclass{scrartcl} \usepackage{acro} \DeclareAcronym{test}{short=short,long=a test acronym} \begin{document} \fontfamily{phv}\selectfont % not the best way to switch to sans serif, but matches the question \tableofcontents \section{Test Section \ac {test}} \end{document}

  • Drawing 3D atomic orbitals in LaTeX [closed]
    by sstac on November 4, 2026 at 12:54 pm

    I am trying to recreate a few graphics found on a paper: https://www.researchgate.net/publication/376028984_Visualizing_atomic_orbitals_of_an_electron_by_Latex The images I want to recreate: The author supposedly wanted to share the source code, but the link in abstract is (at least for me) not working and I wasn't able to reach out to the author, so I decided to try to recreate the graphics myself. Unfortunaley I don't have much experience in drawing in latex/tikz/pgfplots (I did some 3d graphics in tikz-3dplot tho, but that was some time ago) so I am interested if someone can guess or say how were such graphics created? Thanks in advance! Best, Stipe Edit: Narrowed the question, removed the whole bunch of images.

  • How to make diagonal titles on a step table
    by es2377 on November 4, 2026 at 12:07 pm

    Here is a sideways step-table taking up full page, with each title for part of a column and the corresponding row. The titles, however, will not rotate about the origin specified by \rotatebox, and crash into the columns. Ideally they would rotate about the last letter and all be parallel. \documentclass{memoir} \usepackage{array} \usepackage[figuresright]{rotating} \usepackage{xltabular} \begin{document} \newlength{\pwid} \setlength{\pwid}{0.15\textwidth} %Define width of parbox %Excess width leads to squashing the table. \newcommand{\rot}[1]{\rotatebox[origin=br]{-45}{#1}} %Define a rotation %\newcommand{\rpar}[1]{\rot{\parbox[c][0.05\linewidth]{\pwid}{ #1}}}% %Rotating the parbox itself leads to excess column heights. \newcommand{\rpar}[1]{\parbox[c][0.05\textwidth]{\pwid}{\raggedleft% \leftskip 0pt plus \hsize minus \hsize % %This justifies the % \leftskip 0pt plus 1fill minus 1fill %This appears to have no effect \rot{#1}}} \newcolumntype{Q}{>{\tiny\arraybackslash}>{\raggedright}X} %Define our main column \renewcommand{\arraystretch}{1.3} \begin{sidewaystable} \begin{xltabular}{\textwidth}{|r |Q|Q|Q| Q|Q|Q| Q|Q|Q| Q|Q|Q|} \multicolumn{13}{r}{\rpar{Amsterdam}} \\ \cline{13-13} \multicolumn{12}{r|}{\rpar{Birmingham}} & \\ \cline{12-13} \multicolumn{11}{r|}{\rpar{Cleveland}} && \\ \cline{11-13} \multicolumn{10}{r|}{\rpar{Donegal {(Ireland)}}} &&& \\ \cline{10-13} \multicolumn{9}{r|}{\rpar{Eboracum (Yorkshire)}} && Some info && \textbf{MORE!}\\ \cline{9-13} \multicolumn{8}{r|}{\rpar{Florence}} &&&&&\\ \cline{8-13} \multicolumn{7}{r|}{\rpar{Geneva \mbox{(Switzerland)}}} &&&&& &\\ \cline{7-13} \multicolumn{6}{r|}{\rpar{Hartlepool }} &&&&& &&\\ \cline{6-13} \multicolumn{5}{r|}{\rpar{Indianapolis}} &&&&& &&&\\ \cline{5-13} \multicolumn{4}{r|}{\rpar{Jakarta {(Indonesia)}}} &&& More info && &&&&\\ \cline{4-13} \multicolumn{3}{r|}{\rpar{Kaliningrad (Russia)}} &&&&& &&& And so on && \\ \cline{3-13} \multicolumn{2}{r|}{\rpar{Ladrillera \mbox{(Mexico)}}} &&&&& &&Perhaps a distance &&& & \\ \cline{2-13} \multicolumn{1}{r|}{\rpar{Mandanici \mbox{(Italy)}}} &&&&& &&&&& &&\\ \cline{2-13} \end{xltabular} \smallskip \caption[Short caption title]{A long caption title that spreads across the page, all the way across, on and on and on it goes, before finally spreading itself onto the next line.} \end{sidewaystable} \end{document} The \parbox for each title is needed to force the row-heights to be fixed. It needs its height specified and the and the rotation to be within it, as rotating the \parboxes leads to different row heights. The \parbox width cannot be too much, or it squashes the table to the right, as the last row . This answer on right-justified text in a \parbox suggests \leftskip 0pt plus \hsize minus \hsize, but it does not seem to work. Overleaf suggests 1fill as an adjustment, but it also does not work, while the LaTeX Wikibook has only a brief description. (I am well aware that some people hate vertical lines in tables, but for the purposes of this exercise, they help to show the columns.)

  • Selectively remove some borders (those set with linkbordercolor and citebordercolor) when using hyperref with pdfborder setting in beamerclass
    by canIchangethis on November 3, 2026 at 5:07 pm

    When using hyperref I want boxes, not colorlinks in my Beamer presentation. However, not for all links, not for internal links and not for citations, I want nothing just the default that there is a link when hoovering over, because currently, when setting them to the background color (white) one can still see the borders (ugly borders, when the links are in parentheses). See this screenshot on what bugs me: MWE of what bugs me: \documentclass[aspectratio=169,10pt,handout]{beamer} \usepackage[ngerman]{babel} % Document is german \usepackage{hyperref} % clickable URls and cross-references \hypersetup{ breaklinks = true, pdfborder = 0 0 1, % boxes instead of 0 0 1 underlines or colorlinks linkbordercolor = white, % white internal links % BUT NONE DESIRED citebordercolor = white, % color of links to bibliography filebordercolor = red, % color of file links urlbordercolor = gray % color of external links } \title{beamer} \author{Author} \date{November 2026} \begin{document} \begin{frame}[label={Targetframe}] \maketitle \end{frame} \begin{frame}[label={Here}]{I want no borders at all (\hyperlink{Here}{here})} This is a (\hyperlink{Targetframe}{link in parentheses}). This is an \href{https://tex.stackexchange.com}{external link}. \end{frame} \end{document} As I removed the citations in the MWE (thus I am not showing the citebordercolor) so that I don't have to include BibLaTeX in the MWE, I provide this here. My desired output is: colored boxes around all links, except around internal links and citations. Those two link types should look like this, i.e., the outcome of NOT setting any hypersetup: So far, unsuccessfully, I tried: I can use this code https://tex.stackexchange.com/a/662960/114622 to remove the citation hyperlinks all together, which is not what I want. Plus, doesn't solve the other internal links problem. I tried to use some code from this answer, which disables all internal links (not what I want) https://tex.stackexchange.com/a/559760 I thought I could try to move to underlines instead so it wouldn't look that bad (using a variant of this question: https://tex.stackexchange.com/a/26085/114622). However, this colors links in beamer frame titles, which I really would not want either.

  • How can I 'hide' character '#' in a macro definition?
    by katang on November 3, 2026 at 9:57 am

    I want to make a macro with a \hyperref that uses '#' character which is legal for HTML, but not in a macro definition in LaTeX. How can I preserve hyperref functionality while processing the reference with LaTeX (the compiler throws the message "illegal garameter number in definition") \physicspanel{phys:VoltageLaw}{Voltage Law} { In classical electricity, \href{http://hyperphysics.phy-astr.gsu.edu/hbase/electric/ohmlaw.html#c2} {the voltage changes around any closed loop must sum to zero.} }

  • Is subcaptionlite compatible with pdf tagging?
    by murray on November 3, 2026 at 2:33 am

    The Title asks my question! Namely, is the new package subcaptionlite.sty compatible with pdf taggoing?

  • Spacing differences of the cases curly brace between CM and mtpro2 and the impact of mtp2otf conversion
    by Sebastiano on November 2, 2026 at 9:17 pm

    I am comparing the visual output of the cases environment between the standard Computer Modern font and MathTime Professional 2 (mtpro2) [lite]. Specifically, I noticed that the horizontal spacing between the large curly brace and the math content inside cases is quite different. Computer Modern curly brace is elegant and has a nice "breathing room", whereas in mtpro2 the brace looks too tight and sits visually too close to the curly brace. Here is the standard cases with Computer Modern: \documentclass{article} \usepackage{amsmath} %\usepackage[lite]{mtpro2} \begin{document} \[ \begin{cases} x > 2 & x+1\\ x < 2 & x-1 \end{cases} \] \end{document} And here is the code using mtpro2: \documentclass{article} \usepackage{amsmath} \usepackage[lite]{mtpro2} \begin{document} \[ \begin{cases} x > 2 & x+1\\ x < 2 & x-1 \end{cases} \] \end{document} Why is there not enough space in mtpro2 between the curly brackets and the equations? Does the Mtp2otf conversion package, into OpenType math format for modern Unicode engines (LuaLaTeX/XeLaTeX), correct the spacing between the curly brackets and the equations?

  • TeXstudio 4.9.9: Typing { replaces selected text instead of enclosing it in braces
    by Cyrus on November 2, 2026 at 6:49 pm

    I switched from TeXstudio 4.9.7 to 4.9.9. And now the left curly brace does not close automatically over selected text. Instead the select text disappears if I type "{" to the left of the selection. Other symbols such as (), [], \left{ \right} are functioning as they should. The selected text does not disappear. Instead the left and right symbols close over the selected text. Some setting got disturbed when I upgraded. Additionally: In addition slash-leftbrace{ does not automatically get completed by slash-rightbrace}.

  • How can I get a cursive (non-\mathscr) "S" which goes nicely with other \mathscr letters?
    by Sourav on November 2, 2026 at 5:38 pm

    I am using \mathscr to write uppercase cursive letters. All of them look nice except for one — The "S" : It looks bad to my eye because it is too slanted and looks like a half-formed "L" : The "S" produced by \mathcal is very less cursive and looks like the usual S. Hence, I don't want to use that too. Note that I have a big document and have been using \mathscr for writing cursive letters like A,B,C,F,T, etc. So, I would like a non-\mathscr cursive "S" which goes nicely with other mathscr letters. MWE : \documentclass{article} \usepackage{amsmath,amssymb} \usepackage{mathrsfs} \begin{document} $\mathscr{S}$ \end{document}

  • want certain phrases to appear differently
    by Rup_LA on November 2, 2026 at 12:55 pm

    I am writing a report, where I need certain words and phrases to appear in different fonts or/and sizes to distinguish them from that of the other texts (and for some personal preferences too). How can I achieve this? Any help or suggestions would be appreciated. \documentclass[a4paper,12pt]{report} \usepackage{amsmath,amssymb,amsthm} \begin{document} As the rank of $L(G)$ is $n-k$ where $k=k(G)$ is the number of connected components in $G$, it is easy to see that the multiplicity of $0$ is $k(G)$ and hence, the second smallest eigenvalue of $L(G)$ is $0$ if and only if $G$ is disconnected. Thus the second smallest eigenvalue of $L(G)$ is popularly known as the \textbf{\textit{algebraic connectivity}} of $G$ and is denoted by $a(G)$. The eigenvectors corresponding to $a(G)$ are called\textbf{\textit{ Fiedler vectors}} of the graph $G$. \end{document} In particular, for the above, I want "algebraic connectivity" & "Fiedler vectors" appearing in the pdf to be in Times New Roman font with 14pt size.

  • cmd=... have no effect on multiline cell
    by Stephen on November 2, 2026 at 11:22 am

    In the following code I want the cells in the second and third column to appear from slide 2. But cmd=\onslide<2-> have no control over the multiline cell. How to fix? \documentclass{beamer} \usepackage{tabularray} \begin{document} \begin{frame} \begin{tblr}{hlines,vlines,cell{1}{2-3}={cmd=\onslide<2->}} one & two & {three\\four} \end{tblr} \end{frame} \end{document}

  • Why × (multiplication sign) doesn't appear in a listing?
    by Denis Bitouzé on November 2, 2026 at 9:38 am

    Why \lstinline|×| (multiplication sign) doesn't appear in the following MCE compiled with lualatex, despite × is added to \lst@DefEC? \documentclass{article} \usepackage{fontspec} \usepackage{listings} \lstset{basicstyle=\ttfamily} \makeatletter \lst@InputCatcodes \def\lst@DefEC{% \lst@CCECUse \lst@ProcessLetter ^^80^^81^^82^^83^^84^^85^^86^^87^^88^^89^^8a^^8b^^8c^^8d^^8e^^8f% ^^90^^91^^92^^93^^94^^95^^96^^97^^98^^99^^9a^^9b^^9c^^9d^^9e^^9f% ^^a0^^a1^^a2^^a3^^a4^^a5^^a6^^a7^^a8^^a9^^aa^^ab^^ac^^ad^^ae^^af% ^^b0^^b1^^b2^^b3^^b4^^b5^^b6^^b7^^b8^^b9^^ba^^bb^^bc^^bd^^be^^bf% ^^c0^^c1^^c2^^c3^^c4^^c5^^c6^^c7^^c8^^c9^^ca^^cb^^cc^^cd^^ce^^cf% ^^d0^^d1^^d2^^d3^^d4^^d5^^d6^^d7^^d8^^d9^^da^^db^^dc^^dd^^de^^df% ^^e0^^e1^^e2^^e3^^e4^^e5^^e6^^e7^^e8^^e9^^ea^^eb^^ec^^ed^^ee^^ef% ^^f0^^f1^^f2^^f3^^f4^^f5^^f6^^f7^^f8^^f9^^fa^^fb^^fc^^fd^^fe^^ff% ^^^^20ac^^^^0153^^^^0152% ^^^^00d7% × ^^00} \lst@RestoreCatcodes \makeatother \begin{document} \ttfamily ×\lstinline|×|× \end{document}

  • Number of parameters exceeded? [duplicate]
    by Duchamp Gérard H. E. on November 2, 2026 at 7:25 am

    In order to get formatted 4x4 matrices, I introduced the following macro ‘‘bquatre'' (below in a MNWE) \documentclass{article} \usepackage{mathtools} \newcommand{\bquatre}[16] {\tiny \begin{bmatrix} #1 & #2 & #3 #4\\ #5 & #6 #7 #8\\ #9 & #10 & #11 & #12 \\ #13 & #14 & #15 & #16\end{bmatrix}} \begin{document} \bquatre{1}{2}{3}{4}{5}{6}{7}{6}{5}{4}{3}{2}{1} \end{document} And I got the following error message ! You already have nine parameters. \reserved@a ...xpandafter \bquatre \reserved@b #11 6{ l.5 ... #12 \\ #13 & #14 & #15 & #16\end{bmatrix}} Can you help me ? Thanks

  • Automatically track and print a document's file history (creation date and subsequent edits) on the final page
    by Sebastiano on November 1, 2026 at 8:06 pm

    I am looking for a way to automatically track the "life cycle" of a LaTeX document and print a revision/history log on the final page. Suppose I create a file today, on November 1, 2026. I would like LaTeX (perhaps via a specific package or toolchain integration) to record this creation event along with the time. Then, every time I modify and recompile the document on subsequent days, I want it to log those edits. Ideally, the final page of the document should display a neat list like this: • November 1, 2026: File created [Time] • November 2, 2026: First modification [Time] • November 5, 2026: Major revision / Third edit [Time] Here is a MWE of my document: \documentclass{article} \usepackage{lipsum} % Is there a package to put here? \begin{document} \section{Introduction} \lipsum[1-3] \newpage \section*{Document history} % Automatically generated history list should go here \end{document} Is there an existing package that handles this automatically? Thanks in advance!

  • How to dig holes on a three-dimensional curved surface using LuaDraw?
    by Explorer on November 1, 2026 at 4:23 pm

    Here is the follow-up of my previous answer. Now, I want to focus on the holes on the surfaces. zoom in, we could see the details: \documentclass{standalone} \usepackage[3d]{luadraw} \usepackage[svgnames]{xcolor} \usepackage{fourier-otf} \begin{document} \begin{luadraw}{name=gaussian_surface} local ld = luadraw local pt3d, cpx = ld.pt3d, ld.cpx local M, Mc, Ms = pt3d.M, pt3d.Mc, pt3d.Ms local Origin, vecI, vecJ, vecK = pt3d.Origin, pt3d.vecI, pt3d.vecJ, pt3d.vecK local exp = math.exp local pi, cos, sin = math.pi, math.cos, math.sin local h = 0.025 -- half height of the border local g = ld.graph3d:new{ window3d = {-2,2,-2,2,-2.5,2.5,1,1,1.75},window = {-4,4,-4,4}, size = {12,12},viewdir = {-60,55} } local wI, wmax = 0.45, 1 local f = function(x,y) return -exp(-(x*x+y*y)/1.3) end local top = ld.cartesian3d(function(x,y) return h+wI*f(x,y) end,-2,2,-2,2,{50,50}) local bottom = ld.cartesian3d(function(x,y) return -h+wmax*f(x,y) end,-2,2,-2,2,{50,50}) --- begin local cx, cy = 0.5, 1 local a, b, n = 0.4, 0.25, 50 local base = {} for k = 0, n-1 do local t = 2*pi*k/n base[k+1] = M(cx+a*cos(t),cy+b*sin(t),-2) end local cutter = ld.prism(base,M(0,0,4)) top = ld.clip3d(top,cutter,true) bottom = ld.clip3d(bottom,cutter,true) --- end local front = ld.surface(function(s,t) return M(s,-2,(1-2*t)*h+(wI+t*(wmax-wI))*f(s,-2)) end,-2,2,0,1,{50,2}) local back = ld.surface(function(s,t) return M(s,2,(1-2*t)*h+(wI+t*(wmax-wI))*f(s,2)) end,-2,2,0,1,{50,2}) local left = ld.surface(function(s,t) return M(-2,s,(1-2*t)*h+(wI+t*(wmax-wI))*f(-2,s)) end,-2,2,0,1,{50,2}) local right = ld.surface(function(s,t) return M(2,s,(1-2*t)*h+(wI+t*(wmax-wI))*f(2,s)) end,-2,2,0,1,{50,2}) local limits = {-1.75*(h+wmax),0} g:Dmixfacet( top, { mode = ld.mFlat, edgecolor = "gray!25", edgewidth = 2, usepalette = {ld.palRainbow,"z",limits} }, bottom, {}, front, {}, back, {}, left, {}, right, {} ) g:Show() \end{luadraw} \end{document} The cuttter here was not what I want, it gives: What I would prefer is that the cut here should only remove the thick upper layer of the curved surface, rather than completely removing the entire upper and lower curved surfaces. And I have no idea on how to get the thickeness here similar to this hollowed-out sphere example.

  • How to reduce the size of chapter names? [duplicate]
    by Rup_LA on November 1, 2026 at 4:01 pm

    I am writing a project report in report environment. I would like to keep the title in LARGE style. Now when I give the chapter names using \chapter, the font size of the chapter names get bigger than that of the title of the report, which does not look good to me. So is there any way to reduce the size of the chapter names keeping the title and other font sizes intact ? \documentclass[a4paper,12pt]{report} \usepackage{amsmath,amssymb,amsthm} \begin{document} \thispagestyle{empty} \begin{center} \LARGE \textbf{A study on Algebraic Connectivity \\ and Spectral Integral Variation of Graphs} \end{center} \newpage \thispagestyle{empty} \tableofcontents \newpage \chapter{Introduction and Preliminaries} \section{Introduction} \subsection{Spectrum of a Graph} \begin{thebibliography}{33} \bibitem{Fan} Fan Y., On spectral integral variation of graphs. \end{thebibliography} \end{document} I would also like to reduce the sizes of "Contents" and "References" appearing in the document as same as that of Chapter names.

  • LaTeX Error: Command \c@Dm already defined with thmtools sibling counters after recent LaTeX kernel updates
    by Sebastiano on November 1, 2026 at 1:44 pm

    I am opening an old project after 5 months, using a preamble file called prol2025.tex that used to work perfectly until recently. Now, when compiling my main document, the compilation stops with the following error: ! LaTeX Error: Command \c@Dm already defined. Or name \end... illegal, see p.192 of the manual. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.99 \newtheorem{esp}[Es]{\sc Esempio} This happens on all my older files that share this preamble. I suspect it is related to a recent update in the LaTeX kernel regarding how shared/sibling counters are handled, which seems to conflict with thmtools or amsthm. Here is the exact setup of my theorem definitions in the preamble where the crash occurs: \theoremstyle{remark} \newtheorem{oss}{\sc Osservazione}% \newtheorem{Es}{\sc Esercizio}% \newtheorem{Dm}[Es]{\sc Domanda}% \newtheorem{esp}[Es]{\sc Esempio}% <-- It crashes exactly here \newtheorem{Prob}[Es]{\sc Problema}% My questions: How can I fix this \c@Dm already defined error? Is there a known patch or a better way to declare these sibling counters using thmtools or modern amsthm without triggering this conflict? I would be extremely grateful if someone could help me clean up and better organize my full preamble (prol2025.tex). Specifically, where is the best place to load font packages like newtxtext and mtpro2 to avoid clashes with other packages like mathtools or amsmath? Here is my current complete preamble prol2025.tex: %\documentclass[14pt,reqno,a4paper]{amsart} %\usepackage{extsizes} \documentclass[12pt,a4paper]{amsart} \pdfpagewidth=21cm \pdfpageheight=29.7cm \setlength{\textheight}{27cm} \setlength{\textwidth}{18cm} \setlength{\headsep}{.5cm} \setlength{\footskip}{.6cm} \calclayout \usepackage[italian]{babel} \usepackage{parskip} \usepackage{mathtools} \usepackage{newtxtext} \let\Bbbk\relax \usepackage[mtpccal,subscriptcorrection,mtphrb,zswash]{mtpro2} \usepackage{verbatim} \usepackage{esint} \usepackage{textcomp} \usepackage{subcaption} \captionsetup[subfigure]{labelfont=rm} \usepackage{dsfont} \usepackage{graphicx} \usepackage{xcolor} \graphicspath{ {img2/} } \usepackage{epstopdf} \usepackage{amscd} \DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `basename #1 .tif`.png} \usepackage{mdframed} \usepackage{thmtools} \usepackage{hyperref} \usepackage{tikz} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % BOX %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newmdenv[ skipabove=7pt, skipbelow=7pt, rightline=false, leftline=true, topline=false, bottomline=false, linecolor=red, backgroundcolor=red!5, innerleftmargin=5pt, innerrightmargin=5pt, innertopmargin=2pt, innerbottommargin=5pt, leftmargin=0cm, rightmargin=0cm, linewidth=2.5pt, fontcolor=red ]{rBox} \newmdenv[ skipabove=7pt, skipbelow=7pt, rightline=false, leftline=true, topline=false, bottomline=false, linecolor=blue, backgroundcolor=blue!5, innerleftmargin=5pt, innerrightmargin=5pt, innertopmargin=2pt, innerbottommargin=5pt, leftmargin=0cm, rightmargin=0cm, linewidth=2.5pt, fontcolor=blue ]{bBox} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % UPRIGHT (ROMAN) ONLY FOR QUE E RIS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \theoremstyle{definition} \declaretheoremstyle[ headfont=\normalfont\sc, bodyfont=\normalfont, notefont=\normalfont, headpunct={.} ]{col} \declaretheorem[name=Quesito Sebastiano,style=col]{queT} \declaretheorem[name=Risposta GDM,style=col]{risT} \newenvironment{que}{\begin{rBox}\begin{queT}}{\end{queT}\end{rBox}} \newenvironment{ris}{\begin{bBox}\begin{risT}}{\end{risT}\end{bBox}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % OTHER THEOREM IN EMPH (plain) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \theoremstyle{plain} \newtheorem{teor}{\sc Teorema} \newtheorem{cor}{\sc Corollario} \newtheorem*{prop}{\sc Proposizione} \newtheorem*{lemma}{\sc Lemma} \newtheorem{defin}{\sc Definizione} \newtheorem{definn}{Definizioni} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % REMARK STYLE (upright) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \theoremstyle{remark} \newtheorem{oss}{\sc Osservazione}% \newtheorem{Es}{\sc Esercizio}% \newtheorem{Dm}[Es]{\sc Domanda}% \newtheorem{esp}[Es]{\sc Esempio}% \newtheorem{Prob}[Es]{\sc Problema}% \newtheorem*{blankit}{} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % COMMANDS AND OPERATORS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \DeclareMathOperator{\Res}{Res} \def\tir{\tilde{\mathbb{R}}} \def\ve{\varepsilon} \newcommand{\ili}[1]{\item[(#1)]} \def\bite{\begin{itemize}} \def\fite{\end{itemize}} \def\CP{\mathcal P} \newcommand{\dimo}{\renewcommand{\proofname}{\it Dimostrazione}\begin{proof}} \newcommand{\findim}{\end{proof}} \DeclareMathOperator{\dist}{dist} \DeclareMathOperator*{\pr}{pr} \DeclareMathOperator*{\cl}{cl} \newcommand{\sol}{\renewcommand{\proofname}{\it Risoluzione}\begin{proof}} \newcommand{\finsol}{\end{proof}} \newcommand{\ope}[1]{\mathop{\mathrm{#1}}} \def\men{\smallsetminus} \DeclareMathOperator{\ch}{ch} \DeclareMathOperator{\sh}{sh} \DeclareMathOperator{\tah}{th} \def\xyz{(x,y,z)} \def\xy{(x,y)} \def\vf{\varphi} \def\b{\beta} \def\z{\zeta} \def\a{\alpha} \def\la{\lambda} \def\vt{\vartheta} \def\vr{\varrho} \def\s{\sigma} \def\de{\delta} \def\ga{\gamma} \def\om{\omega} \DeclareMathOperator{\Rea}{Re} \DeclareMathOperator{\Ima}{Im} \DeclareMathOperator{\sgn}{sgn} \newcommand{\field}[1]{\mathbb{#1}} \def\R{\field{R}} \def\K{\field{K}} \def\Z{\field{Z}} \def\C{\field{C}} \def\Q{\field{Q}} \def\N{\field{N}} \def\SS{\field{S}} \def\I{\field{I}} \def\H{\field{H}} \def\U{\field{U}} \DeclareMathOperator{\cis}{cis} \DeclareMathOperator{\Card}{Card} \def\e{\`e\ } \def\r{\sqrt{x^2+y^2}} \def\cosi{cos\`\i\ } \newcommand{\suc}[2]{(#1_#2)_{#2\in\N}} \DeclareMathOperator{\Ker}{Ker} \DeclareMathOperator*{\Lin}{L} \DeclareMathOperator*{\fr}{fr} \DeclareMathOperator{\Dom}{Dom} \def\fra{\operatorname{frac}} \allowdisplaybreaks \pagenumbering{arabic} \DeclareMathSymbol{\smallsetminus}{\mathbin}{AMSb}{"72} \DeclareMathSymbol{\pitchfork} {\mathrel}{AMSa}{"74} \DeclareMathSymbol{\preccurlyeq} {\mathrel}{AMSa}{"34} \DeclareMathSymbol{\lneqq} {\mathrel}{AMSb}{"08} \DeclareMathSymbol{\gneqq} {\mathrel}{AMSb}{"09} \DeclareMathSymbol{\nleq} {\mathrel}{AMSb}{"02} \DeclareMathSymbol{\twoheadrightarrow} {\mathrel}{AMSa}{"10} \DeclareMathSymbol{\subsetneq} {\mathrel}{AMSb}{"28} \DeclareMathSymbol{\lesseqqgtr} {\mathrel}{AMSa}{"53} \DeclareMathSymbol{\square} {\mathord}{AMSa}{"03} \DeclareMathSymbol{\gtrless} {\mathrel}{AMSa}{"3F} \ProvidesFile{Umsa.fd} [1995/01/05 v2.2e AMS font definitions% ] \DeclareFontFamily{U}{msa}{} \DeclareFontShape{U}{msa}{m}{n}{ <5> <6> <7> <8> <9> gen * msam <10> <10.95> <12> <14.4> <17.28> <20.74> <24.88> msam10 }{} %\endinput \ProvidesFile{Umsb.fd} [1995/01/05 v2.2e AMS font definitions% ] \DeclareFontFamily{U}{msb}{} \DeclareFontShape{U}{msb}{m}{n}{ <5> <6> <7> <8> <9> gen * msbm <10> <10.95> <12> <14.4> <17.28> <20.74> <24.88> msbm10 }{} \endinput File test.tex: \input{../../prol2025.tex} \usepackage{hyperref} \usepackage{tikz} \def\be{\beta} %%%%%%%%%%%%%%%%%%%%%%%%% %\usepackage{ibrackets} %%%%%%%%%%%%% Se non funziona lo tolga \usepackage{marvosym,cancel} %\usepackage{pgfplots} %\pgfplotsset{compat=1.18} %\usepgfplotslibrary{fillbetween} %\usetikzlibrary{patterns} \newcommand{\ok}{\textcolor{green!60!black}{\fbox{\textbf{OK}}}} \newcommand{\att}{\textcolor{red}{\Large {\fontencoding{U}\fontfamily{futs}\selectfont\char 49\relax}}} %%%% da visionare ancora una volta \newcommand{\stp}{\textcolor{red}{\Large\Stopsign}} %%%% da verificare \usepackage[cmtip,all]{xy} \begin{document} %%%%% Testo \end{document}

  • Optimize page where figures apear in a book or report document [duplicate]
    by Joce on November 1, 2026 at 11:48 am

    In a document of above a dozen of pages, with approximately one half-page figure (or table) every second page, LaTeX tends to display figures at an increasing distance from the place where the float environment is located (and from the place where they're first referred to). As a naive user, an easy but unsatisfactory way to cure this is to insert the float code several paragraphs before the figure is relevant. Would there be a package able to force LaTeX to move floats to previous pages, or to trigger a full-page figure if needed? Ideally, the package should attempt to have the figure appear on the double page (even-odd) where the float code is located.

  • Consistency of pdfx standards and color profile using includepdf
    by Iacobus1983 on November 1, 2026 at 10:15 am

    I have a x-1a pdf, generated by means of pdfx package. I need to include it in another document (to be sumbitted to a printing company) via pdfpages; to produce this second document, I'll use pdfx with the same settings and the same ICC color profile of the first document. Can I expect the second document to be x-pdf compliant, and the included pages of the first document behave exactly the same (as to pre-flight and professional printing process) in the second document? An example of code: File 1 \documentclass{article} \usepackage{pagecolor} \usepackage[x-1a]{pdfx} \title{Hello World} \begin{document} \pagecolor{red} \maketitle \end{document} File 2 \documentclass{article} \usepackage[paperwidth=480mm,paperheight=330mm]{geometry} \usepackage{pdfpages} \usepackage[x-1a]{pdfx} \begin{document} \includepdf[noautoscale]{file-1} \end{document}

  • How to type set these letters (what even are they)? [duplicate]
    by Mstislav Keldysh on October 31, 2026 at 2:37 pm

    I have seen the following in a few older soviet textbooks. How do I type set them? Also what even are they?

  • Controlling the length of a vertical bar with bNiceArray
    by user446112 on October 31, 2026 at 2:13 pm

    By using bNiceArray,is there a way to control the length of the vertical bar (i.e., with a prescribed length)? See MWE below. \documentclass{beamer} \usepackage{nicematrix} \usepackage{amsmath,amssymb,amsbsy} \begin{document} \begin{frame} \begin{equation*} \begin{bNiceArray}{c|c}[columns-width=5pt,cell-space-limits=3pt,margin] \dfrac{a}{b} & \dfrac{c}{d} \\[15pt] \dfrac{\alpha}{\beta} & \dfrac{\delta}{\eta} \end{bNiceArray} \end{equation*} \end{frame} \end{document}

  • HTML Commands in LyX Layout [closed]
    by chel1 on October 30, 2026 at 6:55 pm

    I'm trying to learn how to use this, but it's not working out so well. For example, I write like this: Style MyLayout Margin Static LatexType Paragraph LatexName dummy ParIndent MM ParSkip 0.4 Align Block AlignPossible Block, Left, Right, Center LabelType No_Label HTMLForceCSS 0 HTMLStyle div.MyLayout { # margin-right: 5cm; left: 320px; } EndHTMLStyle Font Color green EndFont End As a result, the text color in the MyLayout layout turns green, in this regard everything is fine, but the text in this layout does not receive any indentation to the right. Maybe someone has ready-made examples of using this. Please share.

  • What is the font used for $x$ in the following image? [duplicate]
    by VoulKons on October 30, 2026 at 6:51 pm

    What is the font used in the $x$ in the following image? The suggested questions are not helpful for me.