• Problem with the option 'lang=fr' in \DocumentMetadata?
    by paulbou on November 19, 2025 at 7:19 pm

    This code \DocumentMetadata{lang=fr} \documentclass[10pt]{article} \usepackage{babel} \begin{document} \begin{itemize} \item a \item b \item c \end{itemize} \end{document} gives an error ! LaTeX Error: Lonely \item--perhaps a missing list environment. If, instead, you complile \documentclass[10pt,french]{article} \usepackage{babel} \begin{document} \begin{itemize} \item a \item b \item c \end{itemize} \end{document} it's OK. With an other language option (lang=en, lang=it, lang=ru, ...) in \DocumentMetadata, everything works fine. This error occurs since this afternoon, after an MikTek update. Is there an explanation or is it a bug ?

  • How can I make an oversized display-math expression break or wrap in LaTeX?
    by Rajdeep on November 19, 2025 at 2:48 pm

    I’m writing summary notes in LaTeX, and one of my equations is too long to fit on the page. I tried using aligned, multline, split, and even putting parts in \parbox, but the long expression still overflows horizontally. \begin{align*} \begin{vmatrix} a & b & c & d \\ -b & a & d & -c \\ -c & -d & a & b \\ -d & c & -b & a \end{vmatrix} &= { \left( \begin{vmatrix} a & b \\ -b & a \end{vmatrix}(-1)^{1+2+1+2} \begin{vmatrix} a & b \\ -b & a \end{vmatrix} \right) } + { \left( \begin{vmatrix} a & c \\ -b & d \end{vmatrix}(-1)^{1+2+1+3} \begin{vmatrix} -d & b \\ c & a \end{vmatrix} \right) } + { \left( \begin{vmatrix} a & d \\ -b & -c \end{vmatrix}(-1)^{1+2+1+4} \begin{vmatrix} -d&a\\ c&b \end{vmatrix} \right) } + { \left( \begin{vmatrix} b&c\\ a&c \end{vmatrix}(-1)^{1+2+2+3} \begin{vmatrix} -c&b\\ -d&a \end{vmatrix} \right) } + { \left( \begin{vmatrix} b&d\\ a&c \end{vmatrix}(-1)^{1+2+2+4} \begin{vmatrix} -c&a \\ -d&-b \end{vmatrix} \right) } + { \left( \begin{vmatrix} c&d\\ d&-c \end{vmatrix}(-1)^{1+2+3+4} \begin{vmatrix} -c&-d\\ -d&c \end{vmatrix} \right) } \\ &= (a^{2} + b^{2})^{2} + (c^{2} + d^{2})^{2} + (ad + bc)^{2} + (ac - bd)^{2} + (bd - ac)^{2} + (bc + ad)^{2} \\ &= (a^{2} + b^{2})^{2} + (c^{2} + d^{2})^{2} + 2(a^{2}d^{2} + b^{2}c^{2} + a^{2}c^{2} + b^{2}d^{2})\\ &= (a^{2} + b^{2})^{2} + (c^{2} + d^{2})^{2} + 2\left\{ a^{2}(c^{2}+d^{2}) + b^{2}(c^{2}+d^{2})\right\}\\ &= (a^{2} + b^{2})^{2} + (c^{2} + d^{2})^{2} + 2(a^{2}+b^{2})(c^{2}+d^{2}) \\ &= (a^{2}+b^{2}+c^{2}+d^{2})^{2} \end{align*} I only want LaTeX to break the line when needed, or wrap it in a box that automatically handles line breaks, without changing the mathematical content.Also I can manually specify the line breaks. What is the correct way to make this expression wrap properly inside display math?

  • aligning an element at the top tabular [duplicate]
    by Khánh Bùi on November 19, 2025 at 12:53 pm

    I don't know how to put the "solution" at the top of the column. Here is my code. Can anyone help me? \begin{tabular}{c|c} \input{picture} & solution \end{tabular} %the picture is tikz code

  • Randomize an enumerate list containing lstlisting
    by Dimitrios ANAGNOSTOU on November 19, 2025 at 10:52 am

    I would like to create a randomized enumerate list whose items may contain lstlisting environments. So far, I can successfully randomize ordinary items, but items containing a lstlisting environment break the mechanism. I have a workaround, but it forces all listings to stay in fixed positions, which defeats the purpose of randomization. I would like all items—including those containing listings—to be included in the shuffle performed by \additem. Here is an example of my 'workaround' solution. \documentclass{article} % ---------- Packages ---------- \usepackage[french]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{enumitem} \usepackage{xcolor} \usepackage{listings} % ----------- Style Matlab ----------- \lstdefinestyle{stylematlab}{ language=Matlab, basicstyle=\ttfamily\small, keywordstyle=\color{blue}, commentstyle=\color{green!60!black}, numbers=left, numberstyle=\tiny, stepnumber=1, frame=single } % ----------- Randomized items ----------- \usepackage{pgffor} \usepackage{pgf} \usepackage{xparse} \ExplSyntaxOn % Sequence storing the items \seq_new:N \g_myitems_seq % Add item \NewDocumentCommand{\additem}{m}{ \seq_put_right:Nn \g_myitems_seq {#1} } % Shuffle and typeset \NewDocumentCommand{\shuffleitems}{}{ \pgfmathsetseed{\number\pdfrandomseed} \seq_shuffle:N \g_myitems_seq \begin{enumerate} \seq_map_inline:Nn \g_myitems_seq {##1} \end{enumerate} } \ExplSyntaxOff \begin{document} Indiquer si chaque affirmation est vraie (V) ou fausse (F). % ---- Ajout des items ---- \additem{ \item En programmation numérique, une complexité algorithmique en $\mathcal{O}(n^2)$ est toujours préférable à une complexité en $\mathcal{O}(n \ln n)$. } \additem{ \item Les fonctions anonymes en \textsc{Matlab} ne peuvent pas être passées comme arguments à d'autres fonctions. } \additem{ \item En général, dans un problème d’optimisation, une solution optimale locale est garantie d’être aussi une solution optimale globale. } % ---- Mélange des items ---- \shuffleitems % ---- Items supplémentaires (non randomisés) ---- \begin{enumerate}[start=4] \item Exemple avec listing Matlab : \begin{lstlisting}[style=stylematlab] f = @(x) x.^2 + 1; x = -5:0.1:5; plot(x,f(x)) \end{lstlisting} \end{enumerate} \end{document} Items containing lstlisting do not behave well inside the token storage. They seem to prevent the shuffle from working properly. My temporary workaround is to keep such items outside the randomized block, but this defeats the point. Is there a way to fully integrate items containing lstlisting into the randomization process performed by \additem, without switching to the exam class and eventually exam-randomizechoices?

  • you have an array with n values write an algorithem that biuld a 2-3 tree with those n values [closed]
    by adva layani on November 19, 2025 at 10:51 am

    a 2-3 tree is n m tree when m=3

  • Problem with arabic font
    by Aviroum on November 19, 2025 at 9:33 am

    Consider this example: (with this font). How to get ride with this problem? \mainlanguage[ar] \language[ar] \setupdirections[bidi=global,method=one] \setuppapersize[A4] \setuplayout[width=middle, direction=reverse, cutspace=3cm,backspace=3cm] \setupinteraction[state=start,focus=width] \setupinteractionscreen[option=bookmark] \setupalign[r2l] \starttext \definedfont[file:MohammadHead-Regular.ttf*arabic at 24pt] المؤرِّخون بين التأثير و التأثُّر {\language[en] \setupalign[l2r] Without diacritics :} المؤرخون بين التأثير و التأثر \stoptext Result : with LaTeX % !TEX TS-program=lualatex \documentclass[12pt]{article} \usepackage{polyglossia} \setmainlanguage[locale=algeria,numerals=maghrib]{arabic} \usepackage{fontspec} \newfontfamily\arabicfont{MohammadHead-Regular.ttf}[Script=Arabic] \usepackage{anyfontsize} \begin{document} \arabicfont \centering \fontsize{24}{28.8}\selectfont المؤرِّخون بين التأثير و التأثُّر \end{document}

  • XeLaTeX vs. LuaLaTeX with special font
    by Alain Stalder on November 19, 2025 at 7:56 am

    This time from me a question around a set of issues that can maybe actually be resolved in the near future, even though more likely via code changes than just configuration, but I am asking here first for some insights... I have a document with a rather special font, a font has been working well with all of its features on modern webbrowsers and also e.g. on Mac since at least 2021, and I am using XeLaTeX to render it, where it also essentially works. But since apparently things gravitate towards evolving rather LuaLaTeX than XeLaTeX, I wanted to see if I can just switch to LuaLaTeX, also since that had worked fine for me with at least one "normal" font in a somewhat simpler setup. Well, this seems to fail in various ways. Here is some source that is close enough to my real use case to show them all: \documentclass{article} \usepackage[english]{babel} \usepackage{geometry} \usepackage{fontspec} \geometry{ twoside=true, paperwidth=4.37in, paperheight=7in, top=0.263in, bottom=0.613in, inner=0.64in, outer=0.5in, bindingoffset=0cm, } \AddToHook{normalfont}{ \fontdimen2\font=0.25em % interword space \fontdimen3\font=0.3em % interword stretch \fontdimen4\font=0.2em % interword shrink \fontdimen7\font=0.1em % extra space } % https://jack-daw.com/fonts/jackwrite.zip \setmainfont{Jackwrite.ttf}[ %Renderer=HarfBuzz, Scale=MatchLowercase, FakeBold=0.001, ] \begin{document} \noindent Cynthia was secretly peeking over Jack’s shoulder as he started to write: \vspace{2.2mm}\noindent All experience in life is personal. Life as experienced by everybody is a bit like a movie. Things are happening inside and outside of you. Unlike in a movie, you can influence some of it. But most of it is just happening independently of what you desire. Nobody ever looked at the world consistently from that perspective. The personal, individual perspective. How everybody experiences life. Obviously this is not the only viable perspective. But a fascinating one. With lots of potential to explore. Way more than it may seem. What’s in it for you? Well, many things in the world are simpler from this perspective. A lot of things should make sense that previously seemed hard to relate. This can be useful, make happy. It hardly ever makes things more convoluted. So let me just start. \end{document} Here is the output with XeLaTeX: Here with LuaLaTeX and HarfBuzz renderer: And the same but without FakeBold, since it "blurs" other issues: And here just as an example for basic usage outside TeX in TextEdit on Mac: Obviously, FakeBold behaves differently. I noticed that with XeLaTeX, there seems to be a discrete jump between no FakeBold and a very low values like FakeBold=0.001 and then things appear to stay roughly constant until you get to something around FakeBold=3, while with LuaLaTeX (HarfBuzz) the values seem to have a more linear effect. I can live with that, and seems rather to be an issue or limitation with XeLaTeX than LuaLaTeX. But worse is, of course, how the paragraphs are rendered overall. In principle, since XeLaTeX is apparently also based on HarfBuzz, you would expect the same result. The space between words shrinks much smaller with LuaLaTeX. Also, which is not immediately obvious, with LuaLaTeX the width of paragraphs is slightly larger, which I could presumably correct by reducing the nominal width, but that seem to be rather a workaround. About the font (download it here): It is based on a subset of the glyphs from Fredrick Brennan’s TT2020 Font, a monospaced typewriter font with the special feature of rendering each character as 9 slightly different glyphs with tiny "typewriter-like" defects, described who it works by him here. What I did for the Jackwrite font was to add kerning individually between each character pair, actually between all 9 variants of it, which means that there is quite a bit more kerning info in the font than usual. (The Node renderer of LuaLaTeX fails to get the kerning right, or rather gets it right in only maybe 95% of cases, I have not investigated further there.) Added same day in evening: I noticed that what I wrote about the discrete jump for FakeBold with XeLaTeX is not true, was an "illusion", where I viewed it (TexShop on Mac) at lower magnification the fake bold shows more strongly than at higher magnification. Here is a comparison for the following source (plus use corresponding renderers when using LuaLaTeX) \documentclass{article} \usepackage{fontspec} \begin{document} \Huge \setmainfont{Jackwrite.ttf} XeLaTeX\par \setmainfont{Jackwrite.ttf} yyyyyyyyy\par \setmainfont{Jackwrite.ttf}[FakeBold=0.001] yyyyyyyyy 0.001\par \setmainfont{Jackwrite.ttf}[FakeBold=1] yyyyyyyyy 1\par \setmainfont{Jackwrite.ttf}[FakeBold=2] yyyyyyyyy 2\par \setmainfont{Jackwrite.ttf}[FakeBold=3] yyyyyyyyy 3\par \setmainfont{Jackwrite.ttf}[FakeBold=4] yyyyyyyyy 4\par \setmainfont{Jackwrite.ttf}[FakeBold=5] yyyyyyyyy 5\par \setmainfont{Jackwrite.ttf}[FakeBold=10] yyyyyyyyy 10\par \setmainfont{Jackwrite.ttf}[FakeBold=20] yyyyyyyyy 20\par \end{document} Thus except for the difference for 0.001, pretty much the same result. (The difference for the "10" with XeLaTeX is presumably because, due to some different internas, it chose another one of the 9 glyphs for "1" than with LuaLaTeX.) And, I presume some tiny "spikes" the glyphs are amplified a lot when using large values for FakeBold. That is OK for my use case, and probably better fixed if needed in the font itself, while a more robust algorithm for FakeBold would, of course, in principle be desirable. Leaves the issue with different spacing and paragraph widths...

  • Referencing of imported figure code only identifies last occurrence
    by Basile on November 19, 2025 at 3:57 am

    I use a file once in every chapter, so I call it Laboratory Notebook.tex: \subsection{Laboratory Notebook} \begin{figure}[H] \centering \includegraphics[height=2cm]{images/Laboratory notebook} \caption{Laboratory Notebook.} \label{fig: Laboratory Notebook} \end{figure} Figure \ref{fig: Laboratory Notebook} shows a typical Laboratory Notebook. and I call it from every chapter as: \import{./}{Equipment/Laboratory Notebook} The line: \label{fig: Laboratory Notebook} displays correctly the number of the Figure, i.e., Figure 7.5.1 The problem is that the last line: Figure \ref{fig: Laboratory Notebook} shows a typical Laboratory Notebook. displays the number of the last occurence of the file, i.e., Figure 12.5.1. How I can have it to display the number of the current occurrence/chapter: Figure 7.5.1, then next chapter should be 8.5.1, etc.

  • TQFT non-usual cobordism drawing
    by MATIAS EZEQUIEL STICCA GONZLEZ on November 19, 2025 at 12:43 am

    I'm currently trying to recreate something like this: Using of course the tikz tqft library. So, I first tried to do the "easiest" part, that is the drawing alone of every cobordism used in the relation. So, here's my attempt for that: \documentclass[10pt,border=3mm,tikz]{standalone} \usepackage{tikz} \usetikzlibrary{shapes.geometric,tqft} \usepackage{tqft} \tikzset{tqft/use nodes=true} \begin{document} \begin{tikzpicture}[ tqft, mycobordism/.style={ draw, boundary lower style={draw}, boundary upper style={draw}, circle width=0.4cm, circle depth=0.15cm, } ] \node[ tqft cap, mycobordism, cobordism height=2cm, flow=east, anchor=center ] (a) at (-0.7,0) {}; \node at (0, -0.8) {$\epsilon$}; \node at (0, -1.1) {counit}; \end{tikzpicture} \begin{tikzpicture} \tikzset{ tqft/use nodes=false, } \pic[ tqft, incoming boundary components=0, outgoing boundary components=2, genus=0, every lower boundary component/.style={draw}, every outgoing boundary component/.style={draw}, cobordism edge/.style={draw}, ]; \end{tikzpicture} \end{document} Aaaaand, as you may see, the problems begins. First, it seems that if you use a cobordism that is not the "primary ones" (I mean, pair of pants, cup, etc) then you have to add the command node=false, and then I'm unable to do two things: labelling the cobordism and rotating it so it's not looking down. Well, I can worry about the equalities later, but I'd appreciate if someone has some idea of how to "glue" cobordisms in general, so I can try it on my own and learn how to do it, because these ones are the simplest ones that I need to do. Anyways, thank you!

  • Implementing page 260 of the TeXbook in LaTeX using fancyhdr package
    by marcelgoh on November 18, 2025 at 11:35 pm

    I have mostly been a Plain TeX user, but for collaboration purposes find myself having to use LaTeX. In the LaTeXed book I am working on, I would like to have headers as described in the fourth paragraph of page 260 of the TeXbook: "On left-hand pages, the section number in the headline is supposed to reflect the situation at the top of the page, as we have discussed, but on right-hand pages it is supposed to refer to the bottom of the page." Knuth then goes on to give the Plain TeX solution to this problem: \def\beginsection #1. #2. {\mark{\currentsection \noexpand\else #1} \sectionbreak \leftline{\sectionfont #1. #2} \mark{#1\noexpand\else #1} \def\currentsection{#1} \nobreak\smallskip\noindent} \def\currentsection{} % the current section number The \rightheadline macro can then use \iftrue\botmark\fi, and the \leftheadline macro can say \expandafter\iffalse\topmark\fi. I won't claim to fully understand how everything works here, but I successfully adapted this code before for my Master's thesis that I wrote in Plain TeX several years ago. (EDIT. I looked through the code for my thesis again, and found that I only used one mark, ignoring Knuth's warning, and sure enough there is a mistake in the header numbering in my thesis. But I do trust that this code in the TeXbook works, and of course TAOCP doesn't have any header numbering issues that I know of.) My question is, what is the best way to get this same behaviour in LaTeX using the fancyhdr package? I have the following MWE (it feels wrong to use \rightmark on a left-hand page, but if I use \leftmark I get the a blank, presumably because I haven't defined a chapter title yet). \documentclass[10pt]{book} \usepackage{fancyhdr, lipsum, extramarks} \pagestyle{fancy} \fancyhf{} \fancyhead[LE]{\thepage} \fancyhead[RE]{\rightmark} \fancyhead[LO]{\rightmark} \fancyhead[RO]{\thepage} \begin{document} \section{First section} \lipsum[1-7] \section{Second section} \lipsum[1-5] \section{Third section} \lipsum[1-2] \goodbreak \section{Fourth section} \lipsum[1-2] \end{document} It produces the following four pages, which I believe should illustrate the full complexity of the problem. Page 1 is correct since the section at the bottom of the page is still 0.1. Page 2 is incorrect because the section at the top of the page is still 0.1, but it says 0.2 Page 3 is correct since the section at the bottom of the page is 0.3. Page 4 is correct since section 0.4 starts at the top of the page, (but it's correct by accident, since there is no section 0.5). How would one fix this MWE to get the headers to say 0.1, 0.1, 0.3, and 0.4? I am not above janky things like redefining LaTeX primitives, but I'd prefer the least invasive solution. I thought the extramarks package might be what I need, but I wasn't able to figure out how to make it work. Thanks in advance! EDIT. It seems, following @cfr's comments, that out of the box package solutions might not be good enough to solve this issue. I suspect that one might have to redefine LaTeX's \beginsection code (or whatever its analogue is) to emit two marks as in the TeXbook example. I'll look into this myself once I have some free time tomorrow or later in the week, but if anyone beats me to it I'd gladly accept the answer, of course!

  • interaction between command \IfNoValueTF and baseline in TikZ
    by Léo S. on November 18, 2025 at 10:12 pm

    I am trying to define a command that draw TikZ pictures whose baseline is centered, with an optional argument to modify the y-coordinate of the baseline. I came up with the following code. When the optional parameter is provided, it behaves as expected. However, when no parameter is provided, it doesn't do what I expected: instead, it seems to pick the top as the baseline. If I manually replace the parameters, it behaves as expected. What is it that I am missing? \documentclass{article} \usepackage{tikz} \NewDocumentCommand{\tikzpic}{mO{}}{ \begin{tikzpicture}[ baseline=(base), ] #1 \IfNoValueTF{#2} {\coordinate (base) at (current bounding box.center);} {\coordinate (base) at (0,#2);} \end{tikzpicture} } \begin{document} command \tikzpic{ \draw (0,0) rectangle (1,1); } \medbreak expected behaviour \begin{tikzpicture}[ baseline=(base), ] \draw (0,0) rectangle (1,1); \coordinate (base) at (current bounding box.center); \end{tikzpicture} \end{document}

  • Line wrapping in forest labels
    by Mate de Vita on November 18, 2025 at 9:25 pm

    I have the following forest setup that allows me to add citations to the bottom of each leaf node of my taxonomical diagram: \documentclass[twocolumn]{article} \usepackage{array} \usepackage{tikz} \usepackage{forest} % tikz setup \newcolumntype{C}[1]{>{\centering}p{#1}} \forestset{% cite/.style={label=below:{\cite{#1}}}, concept/.style={% anchor=center, rounded corners, draw=black, fill=blue!20, l sep'=20pt, s sep'=2.5pt, align={C{2cm}}, font=\small, }, } \begin{document} \begin{figure*} \centering \begin{forest} for tree={concept}, [Segmentation [Classical [Colour \& intensity, cite={entry01}] [Clustering, cite={entry02}] ] [Deep [Downstream CNN, cite={entry03}] [CED, cite={entry04}] [GAN, cite={entry05}] [Transformers, cite={entry06}] ] ] \end{forest} \end{figure*} \bibliographystyle{unsrt} \bibliography{Literature} \end{document} This works fine (aside from some vertical alignment issues), as seen in the above picture. However, if I include several references, the picture becomes unreadable: \begin{figure*} \centering \begin{forest} for tree={concept}, [Segmentation [Classical [Colour \& intensity, cite={entry01,entry07,entry08,entry09,entry10,entry11,entry12,entry13,entry14,entry15,entry16,entry17,entry18}] [Clustering, cite={entry02,entry19,entry20,entry21,entry22,entry23,entry24,entry25,entry26,entry27,entry28,entry29,entry30}] ] [Deep [Downstream CNN, cite={entry03}] [CED, cite={entry04}] [GAN, cite={entry05}] [Transformers, cite={entry06}] ] ] \end{forest} \end{figure*} In this specific case, this would be solvable using citation ranges (like [1-4] instead of [1],[2],[3],[4]), but this isn't always possible in general. Is there a way to make forest automatically wrap the citation text into multiple lines so each label fits within the width of its leaf node? ChatGPT-generated fake .bib file included below for easier testing: @article{entry01, author={Ima N. Ventor}, title={Applications of Imaginary Coefficients in Everyday Life}, year={2024}, journal={Journal of Hypothetical Mathematics} } @article{entry02, author={Fae K. Titious}, title={A Survey of Nonexistent Marine Species}, year={2023}, journal={Aquatic Fiction Review} } @article{entry03, author={Nulla Fictor and Max U. Lation}, title={Stability Analysis of Impossible Equilibria}, year={2022}, journal={Unreal Dynamics Letters} } @article{entry04, author={Veris I. Militude}, title={Cartographic Techniques for Mapping Uncharted Dimensions}, year={2025}, journal={Atlas of Imagined Worlds} } @article{entry05, author={Anne Thropic}, title={Entropy in Alternate Reality Thermodynamics}, year={2021}, journal={Speculative Physics Quarterly} } @article{entry06, author={Hugh M. Or}, title={On the Predictability of Completely Random Events}, year={2020}, journal={Journal of Impossible Statistics} } @article{entry07, author={Sara N. Dippity}, title={Causality Reversal in Hypothetical Timelines}, year={2024}, journal={Temporal Studies Review} } @article{entry08, author={U. N. Known}, title={An Overview of Anonymous Particles in Theoretical Physics}, year={2022}, journal={Particles of Mystery} } @article{entry09, author={Eve N. Tual}, title={Evaluating the Ethics of Fictional AI}, year={2023}, journal={Synthetic Minds Journal} } @article{entry10, author={Doug M. Atic}, title={Acoustic Properties of Silent Materials}, year={2022}, journal={Journal of Hypersilent Engineering} } @book{entry11, author={Paige Turner}, title={A Complete History of Books That Were Never Written}, year={2020}, publisher={Phantom Press} } @book{entry12, author={Wyn D. Ows}, title={Wind Patterns in Empty Universes}, year={2024}, publisher={Imaginary Atmospheres Publishing} } @book{entry13, author={A. Bridge}, title={Crossing Conceptual Gaps: A Study}, year={2021}, publisher={Metaphorical Structures Press} } @inproceedings{entry14, author={Meta Phar and Ali Gory}, title={Symbolism in Objects That Do Not Exist}, booktitle={11th Conference on Abstract Semantics}, year={2023} } @inproceedings{entry15, author={Nora Tion}, title={Notions of Nothingness in Pre-Theoretical Cosmology}, booktitle={Symposium on Vacuous Phenomena}, year={2022} } @article{entry16, author={Ella Vate}, title={Elevated Thinking: Airborne Philosophies}, year={2021}, journal={Journal of High-Altitude Thought} } @article{entry17, author={Cy R. Cling}, title={Cycling Through Recursive Metaphors}, year={2025}, journal={Recursive Discourse Review} } @article{entry18, author={Alf A. Numeric}, title={Counting the Uncountable: A Formal Study}, year={2024}, journal={Mathematics of Paradox} } @article{entry19, author={Lois Tick}, title={Temporal Loops in Fictional Biographies}, year={2023}, journal={Chronological Imaginarium} } @article{entry20, author={Gene Erration}, title={Genetic Drift in Pretend Organisms}, year={2021}, journal={Imaginary Genetics Bulletin} } @article{entry21, author={Art I. Ficial}, title={Artificial Creativity and Imagined Innovation}, year={2022}, journal={Invented Ideas Review} } @article{entry22, author={Ray F. Erence}, title={Optical Behavior of Nonexistent Light}, year={2025}, journal={Invisible Optics Letters} } @article{entry23, author={Quinn Tess}, title={Questioning Questions That Cannot Be Asked}, year={2021}, journal={Philosophy of the Unaskable} } @article{entry24, author={Clara Fication}, title={Clarifying Ambiguously Clear Concepts}, year={2022}, journal={Journal of Semantic Precision} } @inproceedings{entry25, author={Otto Nomous}, title={Autonomous Systems with No Defined Purpose}, booktitle={Workshop on Aimless Engineering}, year={2024} } @article{entry26, author={Mira Ge}, title={Mirages as Data Sources in Hypothetical Scenarios}, year={2021}, journal={Illusionary Data Reports} } @article{entry27, author={Theo Retical}, title={Theoretical Approaches to Pure Abstraction}, year={2023}, journal={Conceptual Mechanics} } @article{entry28, author={Penny Tration}, title={Penetrating Layers of Conceptual Density}, year={2020}, journal={Dense Ideas Journal} } @article{entry29, author={Bea Yond}, title={Going Beyond the Limits of Imagined Space}, year={2024}, journal={Frontiers of Fictional Cosmology} } @article{entry30, author={Wanda R. Ing}, title={Wandering Through Indeterminate Models}, year={2023}, journal={Models of Uncertainty Review} }

  • How to stretch a content like the wave?
    by Sunshine on November 18, 2025 at 8:34 pm

    For example, the 'orange' we want the effect below: The text moves vertically according to the height(of the waveline path) below. If there are some words on a piece of cloth, imagine what will happen?

  • How to make a `tcolorbox` appear empty first, then reveal its content on click (Beamer pause)?
    by Student on November 18, 2025 at 8:07 pm

    I am preparing a Beamer presentation and I am using several tcolorbox environments (custom theorem, definition boxes, etc.). What I want is the following animation: The tcolorbox frame should appear immediately (empty box). After clicking (next overlay), the content inside the box should appear. Using \pause inside the box does not work, because the pause hides the whole box, not only its body. Here is a minimal example showing the issue: \documentclass[xcolor=dvipsnames,notheorems]{beamer} \usefonttheme[onlymath]{serif} \setbeamertemplate{navigation symbols}{} %--- Block 1: Packages --- \usepackage{tcolorbox} \usepackage{pifont} \usepackage{amsmath} \usepackage{stackengine} \usepackage{graphicx} \usepackage{hyperref} \usepackage{fontawesome5} \usepackage{fancybox} \newcommand{\cadre}[1]{ \setlength{\fboxsep}{7pt} \begin{center} \shadowbox{#1} \end{center}} %--- Block 2: Color Definitions --- \definecolor{myblue}{RGB}{0,51,102} \definecolor{kkgray}{RGB}{34,139,104} \definecolor{kaisbrown}{RGB}{76,114,176} \definecolor{kaiscyan}{RGB}{70,89,135} \definecolor{kaispurple}{RGB}{142,68,173} \definecolor{wafa}{RGB}{192,57,43} \definecolor{myyellow}{RGB}{255,235,205} \colorlet{newblue}{blue!40!black} \definecolor{deepteal}{RGB}{0,128,128} \definecolor{warmorange}{RGB}{230,126,34} \definecolor{softviolet}{RGB}{155,89,182} \definecolor{titlebg}{RGB}{248,249,250} \definecolor{accentgold}{RGB}{241,196,15} %--- Use the new color --- \setbeamercolor{title}{bg=myblue!90!white} \setbeamerfont{frametitle}{series=\bfseries} \usecolortheme[named=myblue]{structure} %--- Block 3: Theme and Appearance --- \usetheme{Madrid} \useoutertheme{shadow} \makeatletter \pgfdeclarehorizontalshading[titleleft,titleright]{beamer@frametitleshade}{\paperheight}{% color(0pt)=(titleleft); color(\paperwidth)=(titleright)} \makeatother \colorlet{titleleft}{myblue!90} \colorlet{titleright}{myblue!70} \setbeamercolor*{frametitle}{fg=white} \setbeamertemplate{headline}{} %--- Block 4: Footline --- \setbeamertemplate{footline}{ \leavevmode% \hbox{% \begin{beamercolorbox}[wd=.15\paperwidth,ht=2.5ex,dp=1ex,center]{author in head/foot} \usebeamerfont{author in head/foot}\insertshortauthor \end{beamercolorbox}% \begin{beamercolorbox}[wd=.77\paperwidth,ht=2.5ex,dp=1ex,center]{title in head/foot} \usebeamerfont{title in head/foot}\insertshorttitle \end{beamercolorbox}% \begin{beamercolorbox}[wd=.08\paperwidth,ht=2.5ex,dp=1ex,center]{page number in head/foot} \insertframenumber{} / \inserttotalframenumber \end{beamercolorbox}% }% \vskip0pt% } \setbeamercolor{author in head/foot}{bg=myblue!90,fg=white} \setbeamercolor{title in head/foot}{bg=myyellow, fg=myblue!90} \setbeamercolor{page number in head/foot}{bg=myblue!90, fg=white} %--- Block 5: tcolorbox base style --- \tcbset{ commonstyle/.style={ colframe=#1, coltitle=white, colbacktitle=#1!85!black, colback=white, sharp corners, boxrule=1.5pt, width=\textwidth, before skip=12pt, after skip=12pt, boxsep=2pt, left=4pt, right=4pt, top=3pt, bottom=3pt, fonttitle=\bfseries\large } } %--- Block 6: tcolorbox theorem-like environments --- \newtcolorbox{theorem}[1][]{ commonstyle=kaispurple, title={\faLightbulb[regular]\,\textbf{Theorem}\hfill\ifx\relax#1\relax\else[#1]\fi}, halign title=left } \newtcolorbox{proposition}[1][]{ commonstyle=kaiscyan, title={\faChartLine\,\textbf{Proposition}\hfill\ifx\relax#1\relax\else[#1]\fi}, halign title=left } \newtcolorbox{lemma}[1][]{ commonstyle=kkgray, title={\faCube\,\textbf{Lemma}\hfill\ifx\relax#1\relax\else[#1]\fi}, halign title=left } \newtcolorbox{corollary}[1][]{ commonstyle=red!75!black, title={\faCheckCircle[regular]\,\textbf{Corollary}\hfill\ifx\relax#1\relax\else[#1]\fi}, halign title=left } \newtcolorbox{definition}[1][]{ commonstyle=kaisbrown, title={\faBook\,\textbf{Definition}\hfill\ifx\relax#1\relax\else[#1]\fi}, halign title=left } \newtcolorbox{remark}[1][]{ commonstyle=wafa, title={\faExclamationCircle\,\textbf{Remark}\hfill\ifx\relax#1\relax\else[#1]\fi}, halign title=left } \newtcolorbox{example}[1][]{ commonstyle=deepteal, title={\faListOl\,\textbf{Example}\hfill\ifx\relax#1\relax\else[#1]\fi}, halign title=left } \newtcolorbox{problem}[1][]{ commonstyle=warmorange, title={\faPuzzlePiece\,\textbf{Problem}\hfill\ifx\relax#1\relax\else[#1]\fi}, halign title=left } \newtcolorbox{tcproof}[1][]{ commonstyle=softviolet, title={\faEdit[regular]\,\textbf{Proof}\hfill\ifx\relax#1\relax\else[#1]\fi}, halign title=left } %--- Block 7: Section transitions --- \makeatletter \AtBeginSection[]{ \begin{frame}[noframenumbering,plain] \centering \vspace{1cm} \begin{minipage}{.85\textwidth} \begin{beamercolorbox}[rounded=true,shadow=true,sep=12pt,center]{title} \usebeamerfont{title}\Large\insertsectionhead \end{beamercolorbox} \end{minipage} \end{frame} } \AtBeginSubsection[]{ \begin{frame}<beamer>[noframenumbering,plain]{Table of Contents} \tableofcontents[currentsection,currentsubsection] \end{frame} } \makeatother %--- Block 8: Title and Author --- \title[General Presentation]{A General Presentation Template} \author[Your Name]{\Large Your Name} \date{\today} %--- Block 9: Document Start --- \begin{document} \begin{frame}[plain,noframenumbering] \centering \maketitle \end{frame} %--- Table of Contents --- \begin{frame} \frametitle{Table of Contents} \tableofcontents[hideallsubsections] \end{frame} %--- Example Section --- \section{Introduction} \begin{frame} \frametitle{Sample Slide} \pause \begin{theorem} \pause This is a general theorem environment. \end{theorem} \begin{definition} This is a general definition. \end{definition} \end{frame} \begin{frame}[plain,noframenumbering] \vfill \begin{center} \begin{tcolorbox}[colback=myblue!5,colframe=myblue!90,boxrule=2pt,arc=8pt,width=0.7\textwidth] \centering {\Huge\faThumbsUp} \\[5mm] {\Large\bfseries Thank You!} \\[2mm] Questions and Discussion \end{tcolorbox} \end{center} \vfill \end{frame} \end{document} With \pause, the box itself is delayed — but I want the box to appear first, and the content to appear only on the next click. I tried options such as \pause, visible, uncover, but I cannot find a clean way to achieve: empty box (frame only) next click → content appears inside the same box How can I create a tcolorbox in Beamer whose body appears after a pause, but the frame is visible immediately? I would also appreciate a reusable solution (command or environment) if possible.

  • Footer margins, visibility, and centering with a long footer
    by Seth Robertson on November 18, 2025 at 7:23 pm

    I'm unable to get my large footer to look sane on the first page. Specifically the "Limited Distribution" block is not centered, and even worse the footer runs off the bottom of the page. I'd prefer that the first page margin was automatically computed based on the size of the footer (since it changes from document to document), but if I have to do it manually then fine. I've spent hours trying to search various questions and forums and trying various cargo-cult items to get things better. Things are much better (on the second and following pages) but my first page remains overly stupid. I try changing parameters but while I can get more of the footer off the bottom, I have been unable to get less of the footer off. \documentclass[11pt]{article} \newcommand{\DBLOCK}{ Limited Distribution \\ Do not give to people named Bob \\ Distribution statement: !Bob \\ POC: Bob Brown, 703-555-0135 } \newcommand{\misctext}{ WARNING - Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count. } \newcommand{\doctype}{ Fancy } \newcommand{\DOCUMENTNUM}{ 234-45454-12323345 } \newcommand{\PROJECTNAME}{ LaTeX Stupidity } \newcommand{\docblock}{ \begin{minipage}{5in} \scriptsize \DBLOCK \\ \misctext \end{minipage} } \usepackage[left=1in, right=1in, top={\dimexpr 1in-10pt \relax}, bottom=1.1in ]{geometry} \usepackage{tikz} % you know what this does! \usepackage{fancyhdr} \usepackage{lipsum} \pagestyle{fancy} \usepackage{titling} \newcommand{\headright}{\DOCUMENTNUM \\ \PROJECTNAME} \fancyhf{} \fancyhead[L]{\PROJECTNAME} \fancyhead[R]{\DOCUMENTNUM} \fancyhead[C]{\doctype} \fancyfoot[L]{{\begin{minipage}{.29\textwidth}\raggedright\scriptsize Distribution subject to restrictions on the first page.\end{minipage}}} \fancyfoot[C]{\doctype} \fancyfoot[R]{\thepage} \fancypagestyle{firstpage}{% \setlength{\footskip}{40pt} \fancyfoot[R]{\thepage} \fancyfoot[C]{ \makebox[5in][c] { \docblock } \leavevmode \\ \normalsize \doctype} \fancyfoot[L]{test} } \setlength{\headheight}{13.6pt} \setlength{\headsep}{15pt} \addtolength{\topmargin}{.2in} \setlength{\droptitle}{-10ex} \preauthor{\vspace*{-2ex}\begin{center}\fontsize{14bp}{14bp}\selectfont} \postauthor{\par\end{center}} \author{Bob Brown <bbrowwn@example.com>} \date{\today} \title{Examples of whitepaper} \begin{document} \maketitle \vspace*{-5ex} \section{Introduction} \thispagestyle{firstpage} \lipsum[1-17] \section{Symbolic Constants, Variables, etc.} The following is a list of symbol constants and variables used in the above text. The default value of the variables are listed. \end{document}

  • Table of contents / AMS BOOK
    by Number_Pi on November 18, 2025 at 7:02 pm

    I am writing a document in amsbook and I am having trouble customizing the table of contents. I would like the table of contents to look like this: Chapter titles should be in bold, including their corresponding page numbers. Section titles should have dot leaders connecting them to their page numbers. That is, something like this: Chapter 1. Title of the first chapter ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎‎ ‎‎ ‎‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ 2 ‎ ‎ ‎ 1. Name of the first section . . . ‎. . . . . . . . . ‎. . . . . . . . . . . . . . . . . . . . 3 ‎ ‎ ‎ 2. Name of the second section ‎. . . . . . . . . . ‎. . . . . . . . . . . . . . . . . . . 6 Chapter 2. Title of the second chapter ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ 9 ‎ ‎ ‎ 1. Name of the first section ‎. . . . . . . . . . . ‎. . . . . . . . . . . . . . . . . . . . 11 ‎ ‎ ‎ 2. Name of the second section ‎. . . . . . . . . ‎. . . . . . . . . . . . . . . . . . . 15 Thank you in advance for your help!

  • Link with many %
    by Sebastiano on November 18, 2025 at 5:27 pm

    Generally, I don't include many links in my PDFs. Until now I’ve never had problems with \href from the hyperref package: when the URL contains % characters, I escape them using \% and everything works fine. I suppose to have a URL with many % https://www.emathhelp.net/calculators/calculus-2/series-calculator/?f=n%5E%280.9999%29*%281%2F%28n-2%29-1%2F%28n-1%29%29&var=n&a=3&b=%2Binf \documentclass[12pt]{article} \usepackage{hyperref} \begin{document} \href{https://www.emathhelp.net/calculators/calculus-2/series-calculator/?f=n\%5E\%280.9999\%29*\%281\%2F\%28n-2\%29-1\%2F\%28n-1\%29\%29&var=n&a=3&b=\%2Binf}{t} \end{document} I put for every % the symbol \ thus the \href work correctly. If I use the original link provides me with an incomplete URL because the first % acts as a comment (see the picture below). But if a URL contains, for example, twenty % characters, what is the correct way to handle them so that \href works properly without put manually twenty \?

  • Equation numbering with \pause and showonlyrefs
    by Akira on November 18, 2025 at 4:09 pm

    I have a tex file: \documentclass{beamer} \usepackage{zref-clever,mathtools} \mathtoolsset{showonlyrefs} % Numbering an equation when using \pause and showonlyrefs % https://tex.stackexchange.com/a/732782/161639 \begin{document} \begin{frame} We have \begin{align} & A \\ & = B . \end{align} \pause We have \begin{align} \label<2->{intro:main-sde} \tag{EQ.1} & A \\ & = B . \end{align} \end{frame} \begin{frame} We have \zcref{intro:main-sde}. \end{frame} \end{document} Above, I use \mathtoolsset{showonlyrefs} intentionally. However, the reference is not resolved correctly: Is there a way to fix this issue?

  • babel “onchar=ids fonts” not detecting Chinese text, in XeLaTeX?
    by Peter LeFanu Lumsdaine on November 18, 2025 at 4:05 pm

    I’m writing a multilingual document with English and Chinese. I’d like to use XeLaTeX with Babel’s onchar=ids fonts option to automatically detect language based on the source text, rather than switching language explicitly every time; but the auto-detection doesn’t seem to be working for me — when I give un-escaped Chinese text in the source, TeX attempts to typeset it in the English font, and hence has missing characters: There is no 前 (U+524D) in font Latin Modern Roman 10 Regular/OT:script=latn;language=ENG;+liga;mapping=tex-text; When I explicitly mark the Chinese with \foreignlanguage, it comes out fine. I’ve tried several example files demonstrating onchar=ids fonts that I’ve found online, and had the same issue with all of them. I’m using TeXLive 2025 (installed via BasicTeX 2025, but with all relevant packages installed as far as I can see — at least, enough that I get no other errors/warnings); the Latin Modern and Noto CJK fonts are installed systemwide. The following MWE is based on this answer. \documentclass{article} \tracinglostchars=3 % throw error on missing chars \usepackage{babel} \usepackage{fontspec} \defaultfontfeatures{Scale=MatchLowercase, Ligatures=TeX} \babelprovide[import, onchar=ids fonts]{chinese} \babelfont{rm}[Scale=1.0, Ligatures=Common]{Latin Modern Roman} \babelfont{sf}[Ligatures=Common]{Latin Modern Sans} \babelfont[chinese]{rm}{Noto Serif CJK SC} \babelfont[chinese]{sf}{Noto Sans CJK SC} \begin{document} Hello world. \foreignlanguage{chinese}{前言} % comes out correctly 前言 % gives warning/error for missing chars \end{document}

  • circuiTikZ: Transistor where the lines of the emitter and collector start at the same point
    by cis on November 18, 2025 at 2:56 pm

    Is there a circuitikz-package-like way, to get a transistor like this? This means where the lines of the emitter and collector start at the same point. \documentclass[margin=5mm]{standalone} \usepackage{circuitikz} \begin{document} \begin{circuitikz}[] \draw (0,0) node[npn](T){}; \draw (T.B) node[left]{B} (T.C) node[above]{C} (T.E) node[below]{E}; \end{circuitikz} \end{document}

  • Report card of st. Xavier's institution school [closed]
    by Sneha Adhya on November 18, 2025 at 12:27 pm

    \documentclass[11pt, a4paper]{article} % --- UNIVERSAL PREAMBLE BLOCK --- \usepackage[a4paper, top=2.5cm, bottom=2.5cm, left=2cm, right=2cm]{geometry} \usepackage{fontspec} \usepackage[english, bidi=basic, provide=*]{babel} \babelprovide[import, onchar=ids fonts]{english} % Set default font to Sans Serif \babelfont{rm}{Noto Sans} % Required for tables and better rules \usepackage{tabularx} \usepackage{booktabs} \usepackage{array} \usepackage{amsmath} % for general math if needed \usepackage{enumitem} % For better list formatting \setlength{\parindent}{0pt} % Remove paragraph indentation % --- CUSTOM STYLES & MACROS --- % Define the school color (e.g., deep blue or maroon) \definecolor{schoolblue}{RGB}{0, 51, 102} \newcommand{\reportheader}[1]{ \centering \color{schoolblue} \fontsize{20pt}{24pt}\selectfont \textbf{ST. XAVIER'S INSTITUTION} \\ \fontsize{14pt}{16pt}\selectfont \textbf{PROGRESS REPORT} \\ \vspace{0.3cm} \rule{\linewidth}{1.5pt} \vspace{0.5cm} } \newcommand{\sectiontitle}[1]{ \vspace{0.4cm} \textbf{\large #1} \\ \rule{\linewidth}{0.5pt} \vspace{0.2cm} } % --- DOCUMENT BEGINS --- \begin{document} \reportheader{} % ---------------------------------------------------- % STUDENT INFORMATION % ---------------------------------------------------- \begin{tabularx}{\linewidth}{@{} l X l X @{}} \textbf{Student Name:} & Anirban Das & \textbf{Admission No.:} & 1045/2024 \\ \textbf{Class/Section:} & IX-A & \textbf{Roll No.:} & 12 \\ \textbf{Date of Birth:} & 15/03/2010 & \textbf{Examination:} & Mid-Term Assessment \\ \end{tabularx} \sectiontitle{I. ACADEMIC PERFORMANCE} % ---------------------------------------------------- % ACADEMIC GRADES TABLE (Using a common 5-column format) % ---------------------------------------------------- \begin{center} \begin{tabularx}{\linewidth}{@{} l X c c c @{}} \toprule \textbf{Subject} & \textbf{Teacher's Name} & \textbf{Maximum Marks} & \textbf{Marks Obtained} & \textbf{Grade} \\ \midrule English Language & Ms. A. Sharma & 100 & 88 & A1 \\ Second Language (Bengali) & Mr. S. Ghosh & 100 & 75 & B1 \\ Mathematics & Mrs. P. Kundu & 100 & 92 & A1 \\ Science (Physics, Chem, Bio) & Mr. D. Mallick & 100 & 81 & A2 \\ Social Studies (History/Civics) & Ms. J. Sen & 100 & 65 & C1 \\ Computer Applications & Mr. V. Prasad & 50 & 48 & A1 \\ \bottomrule \end{tabularx} \end{center} \vspace{0.5cm} % ---------------------------------------------------- % GRADING KEY % ---------------------------------------------------- \sectiontitle{Grading Key and Attendance Summary} \begin{tabularx}{\linewidth}{@{} X X @{}} \textbf{Grading Scale (for Marks)} & \textbf{Attendance Summary} \\ \begin{itemize}[noitemsep, topsep=0pt, leftmargin=1.5em] \item A1: $90\%$ and above (Excellent) \item A2: $80\%$ to $89\%$ (Very Good) \item B1: $70\%$ to $79\%$ (Good) \item B2: $60\%$ to $69\%$ (Satisfactory) \item C1: $50\%$ to $59\%$ (Fair) \item D: Below $40\%$ (Needs Improvement) \end{itemize} & \begin{itemize}[noitemsep, topsep=0pt, leftmargin=1.5em] \item Total School Days: 120 \item Days Present: 116 \item Days Absent: 4 \item Punctuality Grade: A (Excellent) \end{itemize} \\ \end{tabularx} % ---------------------------------------------------- % CO-SCHOLASTIC ASSESSMENT % ---------------------------------------------------- \sectiontitle{II. CO-SCHOLASTIC SKILLS (Graded on A to D Scale)} \begin{center} \begin{tabularx}{\linewidth}{@{} X c X c @{}} \toprule \textbf{Area of Assessment} & \textbf{Grade} & \textbf{Area of Assessment} & \textbf{Grade} \\ \midrule Discipline and Conduct & A & Teamwork and Collaboration & B \\ Responsibility and Initiative & A & Participation in Extra-Curriculars & A \\ Homework/Assignment Submission & B & Effort and Diligence & A \\ \bottomrule \end{tabularx} \end{center} % ---------------------------------------------------- % TEACHER'S REMARKS % ---------------------------------------------------- \sectiontitle{III. TEACHER'S REMARKS} \vspace{0.2cm} \fbox{\parbox{\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}{ \textbf{Class Teacher's Observation:} Anirban is a highly motivated and disciplined student who shows exceptional aptitude in Mathematics and Computer Applications. He maintains a high standard of behavior in class. He is encouraged to focus on deeper analysis in Social Studies to improve his overall grade. }} \vspace{1cm} % ---------------------------------------------------- % PROMOTION STATUS & SIGNATURES % ---------------------------------------------------- \sectiontitle{IV. RESULT AND AUTHORIZATION} \vspace{0.2cm} \textbf{Promotion Status:} Promoted to the next grade (Based on this Mid-Term Assessment: \textbf{YES} / NO) \vspace{1.5cm} \begin{tabularx}{\linewidth}{@{} l X l X l X @{}} \textbf{Date:} 18/11/2025 & & \textbf{Class Teacher's Signature:} & \rule{4cm}{0.4pt} & \textbf{Principal's Signature:} & \rule{4cm}{0.4pt} \\ \end{tabularx} \vspace{0.5cm} \begin{center} \textbf{Parent's/Guardian's Signature} (Please sign and return the acknowledgement slip): \rule{6cm}{0.4pt} \end{center} \end{document}

  • PDF links without "active content" [closed]
    by JDecou on November 18, 2025 at 11:25 am

    I want to submit a PDF to a web portal including URL links created with \href{}{}. The portal complains about "active content" in the PDF and won't allow it to upload. I somehow need to get rid of this "active content" flag but KEEP the links in the PDF. Since it doesn't complain about things like \href{mailto:email@address.com}{email@address.com} I'd think it should be possible to get the URL links to work as well. I've tried playing around with some hyperref options such as pdfa etc. but to no avail. Would be most grateful for a solution to this problem! (I saw multiple answers on similar questions that would disable the links, but that's not what I want! They're fairly long, so I can't write them out explicitly for readers to simply copy.)

  • Oneside document with sidenotes: wide figure placed incorrectly
    by Heisenbugs on November 18, 2025 at 7:11 am

    I am preparing a oneside document using a wide margin together with the sidenotes package. I'm experiencing issues with full-width figures that are occasionally misaligned. For example, the MWE below renders like this on the second page: Do I need to be re-running pdflatex? Is this an inherent issue with sidenotes? Any help is greatly appreciated! I am some way into a very large document and would hate to have to change my formatting... The MWE is: \documentclass{article} \usepackage{geometry} \usepackage{mwe} \usepackage{sidenotes} \newgeometry{ inner=30mm, outer=20mm, marginpar=30mm, marginparsep=8mm, includemp, } \begin{document} \lipsum[1] \begin{figure*} \centering \includegraphics[width=\linewidth]{example-image-16x9} \sidecaption{This is a wide figure that is placed correctly.} \end{figure*} \lipsum[2-3] \begin{figure*} \centering \includegraphics[width=\linewidth]{example-image-16x9} \sidecaption{This is a wide figure that isn't placed correctly.} \end{figure*} \lipsum[1] \end{document}

  • Remove "middle quotes" on line breaks with the verse environment
    by ronno on November 18, 2025 at 5:35 am

    I'm using the \enquote command from csquotes to automatically produce appropriate quotation marks. I have also specifically enabled the "middle quotes" so that if there's a paragraph break inside a quotation then the new paragraph starts with an extra opening quote. But this is producing unwanted middle quotes in the verse environment. Here is an example: \documentclass{book} \usepackage[english=american]{csquotes} \DeclareQuoteStyle[american]{english} {\textquotedblleft} [\textquotedblleft] {\textquotedblright} {\textquoteleft} [\textquoteleft] % this is redundant for the example but I kept it for symmetry {\textquoteright} \begin{document} \enquote{Voila!\\ In view, a humble vaudevillian veteran, cast vicariously as both victim and villain in the vicissitudes of fate. This visage, no mere veneer of vanity, is but a vestige of the \enquote{vox populi} now vacant, vanished.} \begin{verse} \enquote{Mary had a little lamb,\\ Its fleece was white as snow\\ And everywhere that Mary went\\ The lamb was sure to go. It followed her to school one day,\\ That was against the rule;\\ It made the children laugh and play,\\ To see a lamb at school.} \end{verse} \end{document} I only want the first line of each stanza to start with opening quotes, just like the prose, but as it stands every line gets one. So in the output as follows, I don't want the highlighted quotation marks to appear: In case it matters, I would like the solution to also work with the more advanced verse environment from the memoir class. Tangential issue: I want to also be able to use just one \enquote in case the same quotation changes from prose to verse (or vice versa), but I don't see how to nest the \enquote and verse appropriately for that (unless there is prose both before and after the verse).

  • How to make \input be relative to directory of the tex file, not the working directory?
    by ana on November 18, 2025 at 4:59 am

    In my document, I have sub-documents in different sub-directories. The images for these sub-documents are placed in the same sub-directories. This makes it easy for organization, but a pain for \input because I now have to hard-code these sub-directory names in the documents. I understand \input (and \includegraphics, etc.) are relative to the working directory. Is there any way to make them instead relative to the directory of the including .tex file? For example, if I have main.tex, then have chapters/ch1/ch1.tex and chapters/ch1/tikzimg.tex, how can I get \input{tikzimg} inside ch1.tex to work without having to hardcode the path chapters/ch1?

  • KOMA-Script method to add linebreak after a section number?
    by ana on November 17, 2025 at 8:46 pm

    I would like to add a line break in between the section number and section title. The title would start on the next line and not be indented if it wraps. Only in the content, not the TOC. In other words, instead of: 1.1 This is a really long section name. I would like: 1.1 This is a really long section name. This was asked ten years ago for KOMA version 3.20. The solution was a hack. KOMA-Script is now version 3.48. Is there a better way to do this? MWE Overleaf Project \documentclass[twocolumn]{scrartcl} \KOMAoptions{toc=sectionentrywithdots} \title{MWE Break After Section} % Seems like a hack ... \renewcommand*{\sectionlinesformat}[4]{ \hspace*{#2} \parbox{\dimexpr\linewidth-#2\relax}{ \raggedsection \ifstr{#3}{}{}{#3\\} #4 } } \begin{document} \maketitle \tableofcontents \section{This is a very long section name that wraps.} This is an entry. \section{This is a very long section name that wraps.} This is an entry. \section{This is a very long section name that wraps.} This is an entry. \end{document}

  • I'm using the Enotez package and want to have the endnotes in a completely separate pdf
    by A.Ellett on November 17, 2025 at 8:09 pm

    I've got a document with a number of endnotes and I would like those to note be printed in the main document but in a separate document. I know I can do someone pdf shenanigans by grapping the pages I want. I would like a more streamlined approach. I can kind of do this with the endnotes package, but I find the presentation of enotez is much more appealing. With endnotes, I'm able to read in the main.ent file and all works as I want. But, enotez puts everything into an aux file and sharing the aux file with another LaTeXable document is not working as I had hoped. Any ideas? Or do I just need to write a perl script to extra what I want from the aux file and build the endnotes using minipages? The other thing I have resorted to is grepping for my footnotes in the main document and pasting the results in a new project file. That works, but I then have pages of front garbage I don't want just to get the endnotes. (Again I have to go in and muck with the pdf to remove the content I don't want.) Using Endnotes I can do this with Endnotes (kind of) %% main.tex \documentclass{article} \usepackage{endnotes} \let\footnote\endnote \begin{document} stuff\footnote{hello} %% I don't want the endnotes in the main document %% %% \newpage %% %% \theendnotes %% \end{document} and then I have %% endnotes.tex \documentclass{article} \usepackage{endnotes} \let\footnote\endnote \begin{document} \theendnotes \end{document} after running pdflatex on main.tex, there will be main.ent. I copy main.ent to endnotes.ent and then run pdflatex on endnotes.tex. I get something along the lines of what I want. However, if I run pdflatex twice on endnotes.ent I lose my notes. So, if there is something in endnotes that require two runs (such a \begin{tikzpicture}[remmeber picture,overlay]) I easily lose the endnotes. (I suppose I could copy them back into the aux file but things seem to get wonky in doing this.) I just don't like the presentation that Endnotes gives. Using Enotez I like the presentation of Enotez a lot better %% main.tex \documentclass{article} \usepackage{enotez} \let\footnote\endnote \begin{document} stuff\footnote{hello} I don't want the endnotes in the main document \newpage \printendnotes \end{document} You need two runs of pdflatex. Enotez writes to main.aux for the footnotes. You need tikz (or pgf) in a second file if you don't want complaints. But in a supplemental file endnotes.tex setup to use Enotez, the aux file gets overwritten and the end notes are not created and nothing is printed %% endnotes.tex \documentclass{article} \usepackage{enotez} \let\footnote\endnote \begin{document} ~ \printendnotes \end{document}

  • 1. How to use "funny letters" in LaTeX? And why are there "fake" letters?
    by Grzegorz Brzczyszczykiewicz on November 17, 2025 at 7:16 pm

    How to use "funny letters" in LaTeX? Specifically: the "phonetic" package (not to be confused with TIPA) the T4 encoding the X2 encoding (for various Cyrillic letters) inside normal text encoded in the default LaTeX encoding. And where can I find documentation? Also, some of the supposedly-Cyrillic letters from X2 don't seem to be real, they look like fakes (specifically: 034 and 035, the two delta-like glyphs (δ), 120 and 160 (looks like р with a weird line), 233 and 273 (looks like Ԑԑ but are defined as "cyrillic epsilon" not "cyrillic reversed ze")). If they are what I suspect them to be (fake letters that don't exist), why did they include them? Additionally, there are weird glyphs in T2B and T2C (allegedly combinations of T1+X2) that do not appear to be present in X2. Some of them are real (T2B's 224 and 264 (Ӿ, ӿ), T2C's 206 and 246 (Ҏ, ҏ), 223 and 263 (Ҍ and ҍ (semisoft sign), distinct from Ѣ ѣ (yat) present in X2), 224 and 264 (Ҋ, ҋ), ), while others appear to be more "fakes" (T2B's 200 and 240 (Ӷ̶ and ӷ̶), 221 and 261 (looks like a messed up version of Ç ç), T2C's 216 and 256 (Ɱ), 233 and 273 (looks like Ϧ with an Р head)). If T2B and T2C are stored internally using T1 and X2 glyphs (which is what The LaTeX Project claims), how are these "extras" stored, and why do they include more "fakes"? The "fakes" aren't even in Unicode!

  • Newest pdfmanagement conflicts with tocloft package also for pdflatex
    by Linear Christmas on November 17, 2025 at 1:30 pm

    I have been using DocumentMetadata with tocloft in pdflatex without setbacks for more than two years. However, something changed with the most recent updates. Currently the code gives warning tocloft.sty: warning: 1156: \@starttoc has already been redefined; tocloft bailing out. All (or most) links in table of contents do not work. MWE: \DocumentMetadata{lang=en, pdfversion=2.0} \documentclass{article} \usepackage[english]{babel} \usepackage{tocloft} \usepackage[hypertexnames=false]{hyperref} \begin{document} \tableofcontents \section{123123} \subsection{absc} No links in table of contents. Comment out \verb|\DocumentMetadata| or \verb|tocloft| package and links work. \end{document} Could I do something differently? I saw Non-hyperlinked TOC entry when loading tocloft+hyperref with phase-III tagging with lualatex/xelatex 2023 #74 on latex3 / tagging-project. That is from May 2024 about XeLaTeX and LuaLaTex; pdflatex at the time seems not to have had this issue. There is also the confusing warning babel.sty: warning: : Configuration files are deprecated, as they can break document portability., but that is irrelevant here. Log This is pdfTeX, Version 3.141592653-2.6-1.40.27 (MiKTeX 25.4) (preloaded format=pdflatex 2025.11.17) 17 NOV 2025 14:36 entering extended mode restricted \write18 enabled. %&-line parsing enabled. **./testbugs.tex (testbugs.tex LaTeX2e <2025-11-01> L3 programming layer <2025-10-24> (C:\Users\Username\MikTeX\tex/latex/latex-lab\documentmetadata-support.ltx (C:\Users\Username\MikTeX\tex/latex/pdfmanagement-testphase\pdfmanagement-testpha se.sty Package: pdfmanagement-testphase 2025-08-05 v0.96v LaTeX PDF management bundle (C:\Users\Username\MikTeX\tex/latex/tagpdf\tagpdf-base.sty Package: tagpdf-base 2025-10-31 v0.99w part of tagpdf - provide base, no-op ver sions of the user commands \c@g__tag_MCID_abs_int=\count275 \c@g__tag_struct_abs_int=\count276 ) (C:\Users\Username\MikTeX\tex/latex/pdfmanagement-testphase\pdfmanagement.ltx File: pdfmanagement.ltx 2025-08-05 v0.96v PDF management code \g__pdfmanagement_EmbeddedFiles_int=\count277 \l__pdfmeta_xmp_indent_int=\count278 \g_pdffile_embed_pdfa_int=\count279 \g_pdffile_embed_nonpdfa_int=\count280 ))) (C:\Users\Username\MikTeX\tex/latex/l3backend\l3backend-pdftex.def File: l3backend-pdftex.def 2025-10-09 L3 backend support: PDF output (pdfTeX) \l__color_backend_stack_int=\count281 ) (C:\Users\Username\MikTeX\tex/latex/pdfmanagement-testphase\l3backend-testphase-p dftex.def File: l3backend-testphase-pdftex.def 2025-08-05 v0.96s LaTeX PDF management bun dle backend support:PDFoutput(pdfTeX) \l__pdf_backend_tmpa_box=\box53 \l__pdf_backend_tmpb_box=\box54 \g__pdf_backend_resourceid_int=\count282 \g__pdf_backend_name_int=\count283 \g__pdf_backend_page_int=\count284 ) (C:\Users\Username\MikTeX\tex/latex/latex-lab\latex-lab-testphase-latest.sty Package: latex-lab-testphase-latest 2025-09-13 v0.1d latex-lab modules (C:\Users\Username\MikTeX\tex/latex/tagpdf\tagpdf.sty Package: tagpdf 2025-10-31 v0.99w LaTeX kernel code for PDF tagging \l__tag_tmpa_int=\count285 \l__tag_tmpa_box=\box55 \l__tag_tmpb_box=\box56 \l__tag_loglevel_int=\count286 \g__tag_unique_cnt_int=\count287 \l__tag_tag_stop_int=\count288 (C:\Users\Username\MikTeX\tex/latex/tagpdf\tagpdf-mc-code-generic.sty Package: tagpdf-mc-code-generic 2025-10-31 v0.99w part of tagpdf - code related to marking chunks - generic mode \g__tag_mc_marks=\marks4 ) \g__tag_tree_id_pad_int=\count289 \c@g__tag_parenttree_obj_int=\count290 Package tagpdf Info: reading namespace definitions tagpdf-ns-pdf.def Package tagpdf Info: reading namespace definitions tagpdf-ns-pdf2.def Package tagpdf Info: reading namespace definitions tagpdf-ns-mathml.def Package tagpdf Info: reading namespace definitions tagpdf-ns-latex-book.def Package tagpdf Info: reading namespace definitions tagpdf-ns-latex.def Package tagpdf Info: reading namespace definitions tagpdf-ns-latex-lab.def Package tagpdf Info: reading namespace definitions tagpdf-ns-pdf.def Package tagpdf Info: reading namespace definitions tagpdf-ns-pdf2.def \g__tag_struct_AFobj_int=\count291 \g__tag_para_begin_int=\count292 \g__tag_para_end_int=\count293 \g__tag_para_main_begin_int=\count294 \g__tag_para_main_end_int=\count295 ) (C:\Users\Username\MikTeX\tex/latex/latex-lab\latex-lab-testphase-names.sty Package: latex-lab-testphase-names 2025-08-14 v0.8f Code related to the names o f tags ) (C:\Users\Username\MikTeX\tex/latex/latex-lab\latex-lab-testphase-new-or-2.sty Package: latex-lab-testphase-new-or-2 2025-05-10 v0.86d Changes to the output r outine (C:\Users\Username\MikTeX\tex/latex/latex-lab\latex-lab-footnotes.ltx File: latex-lab-footnotes.ltx 2025-07-04 v0.8o changes to the footnote interfac es \footnotemargin=\dimen148 \g_fnote_id_int=\count296 )) (C:\Users\Username\MikTeX\tex/latex/latex-lab\latex-lab-testphase-block.sty Package: latex-lab-testphase-block 2025-07-26 v0.9k blockenv implementation (C:\Users\Username\MikTeX\tex/latex/latex-lab\latex-lab-kernel-changes.sty Package: latex-lab-kernel-changes 2025-07-09 v0.85i General kernel and class ch anges (C:\Users\Username\MikTeX\tex/latex/latex-lab\glyphtounicode-cmex.tex)) (C:\Users\Username\MikTeX\tex/latex/latex-lab\latex-lab-testphase-context.sty Package: latex-lab-testphase-context 2025-10-09 v0.5b Providing context for ins tance, etc. ) LaTeX template Info: Declaring template type 'blockenv' taking 1 argument(s) (template) on line 96. LaTeX template Info: Declaring template type 'block' taking 1 argument(s) on (template) line 97. LaTeX template Info: Declaring template type 'para' taking 1 argument(s) on (template) line 98. LaTeX template Info: Declaring template type 'list' taking 1 argument(s) on (template) line 99. LaTeX template Info: Declaring template type 'item' taking 1 argument(s) on (template) line 100. \c@maxblocklevels=\count297 \l__par_start_skip=\skip49 \l__block_botsep_skip=\skip50 \l__block_parbotsep_skip=\skip51 \l__block_parindent_dim=\dimen149 \l__block_counter_start_int=\count298 \l__block_one_label_box=\box57 \g__block_labels_box=\box58 \l__block_tmpa_skip=\skip52 \l__block_topsepadd_skip=\skip53 \l__block_effective_top_skip=\skip54 LaTeX Info: Redefining \centering on input line 1476. LaTeX Info: Redefining \raggedleft on input line 1477. LaTeX Info: Redefining \raggedright on input line 1478. ) (C:\Users\Username\MikTeX\tex/latex/latex-lab\latex-lab-testphase-sec.sty Package: latex-lab-testphase-sec 2025-10-20 v0.84k Code related to the tagging of sectioning commands ) (C:\Users\Username\MikTeX\tex/latex/latex-lab\latex-lab-testphase-toc.sty Package: latex-lab-testphase-toc 2025-07-02 v0.85h Code related to the tagging of toc-like lists \g__tag_toc_level_int=\count299 ) (C:\Users\Username\MikTeX\tex/latex/latex-lab\latex-lab-testphase-minipage.sty Package: latex-lab-testphase-minipage 2025-05-10 v0.81g Code related to the tag ging of minipages and parboxes (C:\Users\Username\MikTeX\tex/latex/latex-lab\latex-lab-testphase-new-or-1.sty Package: latex-lab-testphase-new-or-1 2025-05-10 v0.85d Temporary output patche s for tagging and better link support -- no longer active )) (C:\Users\Username\MikTeX\tex/latex/latex-lab\latex-lab-testphase-graphic.sty Package: latex-lab-testphase-graphic 2025-09-25 v0.80i Code related to the tagg ing of graphics \g__tag_graphic_int=\count300 ) (C:\Users\Username\MikTeX\tex/latex/latex-lab\latex-lab-testphase-float.sty Package: latex-lab-testphase-float 2025-10-17 v0.81l Code related to the taggin g of floats \g__tag_float_int=\count301 ) (C:\Users\Username\MikTeX\tex/latex/latex-lab\latex-lab-testphase-bib.sty Package: latex-lab-testphase-bib 2025-05-09 v0.81c Code related to the tagging of bibliography and cite command ) (C:\Users\Username\MikTeX\tex/latex/latex-lab\latex-lab-testphase-text.sty Package: latex-lab-testphase-text 2025-05-10 v0.85f Code related to the tagging of various small text commands LaTeX Info: Redefining \mbox on input line 84. ) (C:\Users\Username\MikTeX\tex/latex/latex-lab\latex-lab-testphase-marginpar.sty Package: latex-lab-testphase-marginpar 2025-07-23 v0.85h Changes related to the tagging of the margin notes \g__kernel_marginpar_int=\count302 ) (C:\Users\Username\MikTeX\tex/latex/latex-lab\latex-lab-testphase-title.sty Package: latex-lab-testphase-title 2025-03-08 v0.85d Changes related to the tag ging of the title ) (C:\Users\Username\MikTeX\tex/latex/latex-lab\latex-lab-testphase-table.sty Package: latex-lab-testphase-table 2025-08-01 v0.85s Code related to the taggin g of tables (C:\Users\Username\MikTeX\tex/latex/tools\array.sty Package: array 2025/09/25 v2.6n Tabular extension package (FMi) \col@sep=\dimen150 \ar@mcellbox=\box59 \extrarowheight=\dimen151 \NC@list=\toks17 \extratabsurround=\skip55 \backup@length=\skip56 \ar@cellbox=\box60 )) (C:\Users\Username\MikTeX\tex/latex/latex-lab\latex-lab-testphase-math.sty Package: latex-lab-testphase-math 2025-03-10 v0.8d code related to the math tag ging (C:\Users\Username\MikTeX\tex/latex/latex-lab\latex-lab-math.ltx File: latex-lab-math.ltx 2025-10-02 v0.6w Grab all the math(s) and tag it (expe riments) \l__math_tmpa_skip=\skip57 \g__math_mathml_total_int=\count303 \g__math_mathml_int=\count304 \g__math_math_total_int=\count305 \g__math_mathml_AF_found_int=\count306 \g__math_mathml_AF_attached_int=\count307 \l__math_tmpa_box=\box61 \l__math_mathstyle_int=\count308 \g__math_mathchoice_int=\count309 \l__math_grab_env_int=\count310 \g__math_postdisplaypenalty_int=\count311 ) (C:\Users\Username\MikTeX\tex/latex/latex-lab\latex-lab-mathpkg.ltx File: latex-lab-mathpkg.ltx 2025-06-20 v0.1c mathpkg adaptions ) (C:\Users\Username\MikTeX\tex/latex/latex-lab\latex-lab-mathintent.ltx File: latex-lab-mathintent.ltx 2025-08-03 v0.1c MathML intent attributes )) (C:\Users\Username\MikTeX\tex/latex/latex-lab\latex-lab-testphase-firstaid.sty Package: latex-lab-testphase-firstaid 2025-11-03 v2025-11-03 Temporary patches to external packages needed for the tagging project ) (C:\Users\Username\MikTeX\tex/latex/latex-lab\latex-lab-testphase-tikz.sty Package: latex-lab-testphase-tikz 2025-09-27 v0.80d Code related to the tagging of tikz pictures )) (C:\Users\Username\MikTeX\tex/latex/pdfmanagement-testphase\pdfmanagement-firstai d.sty Package: pdfmanagement-firstaid 2025-08-05 v0.96v LaTeX PDF management bundle / firstaid-patches Package pdfmanagement Info: loading pdfmanagement firstaid code for pgf ) (C:\Users\Username\MikTeX\tex/latex/base\article.cls Document Class: article 2025/01/22 v1.4n Standard LaTeX document class (C:\Users\Username\MikTeX\tex/latex/base\size10.clo File: size10.clo 2025/01/22 v1.4n Standard LaTeX file (size option) ) \c@part=\count312 \c@section=\count313 \c@subsection=\count314 \c@subsubsection=\count315 \c@paragraph=\count316 \c@subparagraph=\count317 \c@figure=\count318 \c@table=\count319 \abovecaptionskip=\skip58 \belowcaptionskip=\skip59 \bibindent=\dimen152 ) (C:\Users\Username\MikTeX\tex/generic/babel\babel.sty Package: babel 2025/10/22 v25.14 The multilingual framework for LuaLaTeX, pdfLa TeX and XeLaTeX \babel@savecnt=\count320 LaTeX Encoding Info: Redeclaring text command \ij (encoding OT1) on input li ne 2050. LaTeX Encoding Info: Redeclaring text command \IJ (encoding OT1) on input li ne 2052. LaTeX Encoding Info: Redeclaring text command \ij (encoding T1) on input lin e 2054. LaTeX Encoding Info: Redeclaring text command \IJ (encoding T1) on input lin e 2055. LaTeX Encoding Info: Ignoring declaration for text command \ij (encoding ?) on input line 2056. LaTeX Encoding Info: Ignoring declaration for text command \IJ (encoding ?) on input line 2058. LaTeX Encoding Info: Ignoring declaration for text command \SS (encoding ?) on input line 2083. \U@D=\dimen153 \l@unhyphenated=\language84 (C:\Users\Username\MikTeX\tex/generic/babel\txtbabel.def) \bbl@readstream=\read2 \bbl@dirlevel=\count321 Package babel Info: Fetching locale name for tag en (babel) from babel-en.ini. Reported on input line 4153. Package babel Info: Passing english to babel on input line 4158. Package babel Warning: Configuration files are deprecated, as (babel) they can break document portability. (babel) Reported on input line 4172. ************************************* * Local config file bblopts.cfg used * (C:\Users\Username\MikTeX\tex/latex/arabi\bblopts.cfg File: bblopts.cfg 2005/09/08 v0.1 add Arabic and Farsi to "declared" options of babel ) (C:\Users\Username\MikTeX\tex/generic/babel/locale/en\babel-english.tex) Package babel Info: Importing font and identification data for english (babel) from babel-en.ini. Reported on input line 4295. (C:\Users\Username\MikTeX\tex/latex/babel-english\english.ldf Language: english 2017/06/06 v3.3r English support from the babel system Package babel Info: Hyphen rules for 'canadian' set to \l@english (babel) (\language0). Reported on input line 102. Package babel Info: Hyphen rules for 'australian' set to \l@ukenglish (babel) (\language78). Reported on input line 105. Package babel Info: Hyphen rules for 'newzealand' set to \l@ukenglish (babel) (\language78). Reported on input line 108. )) (C:\Users\Username\MikTeX\tex/latex/tocloft\tocloft.sty Package: tocloft 2017/08/31 v2.3i parameterised ToC, etc., typesetting Package tocloft Info: The document has section divisions on input line 51. \cftparskip=\skip60 \cftbeforetoctitleskip=\skip61 \cftaftertoctitleskip=\skip62 \cftbeforepartskip=\skip63 \cftpartnumwidth=\skip64 \cftpartindent=\skip65 \cftbeforesecskip=\skip66 \cftsecindent=\skip67 \cftsecnumwidth=\skip68 \cftbeforesubsecskip=\skip69 \cftsubsecindent=\skip70 \cftsubsecnumwidth=\skip71 \cftbeforesubsubsecskip=\skip72 \cftsubsubsecindent=\skip73 \cftsubsubsecnumwidth=\skip74 \cftbeforeparaskip=\skip75 \cftparaindent=\skip76 \cftparanumwidth=\skip77 \cftbeforesubparaskip=\skip78 \cftsubparaindent=\skip79 \cftsubparanumwidth=\skip80 \cftbeforeloftitleskip=\skip81 \cftafterloftitleskip=\skip82 \cftbeforefigskip=\skip83 \cftfigindent=\skip84 \cftfignumwidth=\skip85 \c@lofdepth=\count322 \c@lotdepth=\count323 \cftbeforelottitleskip=\skip86 \cftafterlottitleskip=\skip87 \cftbeforetabskip=\skip88 \cfttabindent=\skip89 \cfttabnumwidth=\skip90 Package tocloft Warning: \@starttoc has already been redefined; tocloft bailing out. on input line 1156. ) (C:\Users\Username\MikTeX\tex/latex/hyperref\hyperref.sty Package: hyperref 2025-07-12 v7.01o Hypertext links for LaTeX (C:\Users\Username\MikTeX\tex/generic/iftex\iftex.sty Package: iftex 2024/12/12 v1.0g TeX engine tests ) (C:\Users\Username\MikTeX\tex/latex/graphics\keyval.sty Package: keyval 2022/05/29 v1.15 key=value parser (DPC) \KV@toks@=\toks18 ) (C:\Users\Username\MikTeX\tex/latex/kvsetkeys\kvsetkeys.sty Package: kvsetkeys 2022-10-05 v1.19 Key value parser (HO) ) (C:\Users\Username\MikTeX\tex/generic/kvdefinekeys\kvdefinekeys.sty Package: kvdefinekeys 2019-12-19 v1.6 Define keys (HO) ) (C:\Users\Username\MikTeX\tex/generic/pdfescape\pdfescape.sty Package: pdfescape 2019/12/09 v1.15 Implements pdfTeX's escape features (HO) (C:\Users\Username\MikTeX\tex/generic/ltxcmds\ltxcmds.sty Package: ltxcmds 2023-12-04 v1.26 LaTeX kernel commands for general use (HO) ) (C:\Users\Username\MikTeX\tex/generic/pdftexcmds\pdftexcmds.sty Package: pdftexcmds 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO ) (C:\Users\Username\MikTeX\tex/generic/infwarerr\infwarerr.sty Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO) ) Package pdftexcmds Info: \pdf@primitive is available. Package pdftexcmds Info: \pdf@ifprimitive is available. Package pdftexcmds Info: \pdfdraftmode found. )) (C:\Users\Username\MikTeX\tex/latex/hycolor\hycolor.sty Package: hycolor 2020-01-27 v1.10 Color options for hyperref/bookmark (HO) ) (C:\Users\Username\MikTeX\tex/latex/hyperref\nameref.sty Package: nameref 2025-06-21 v2.57 Cross-referencing by name of section (C:\Users\Username\MikTeX\tex/latex/refcount\refcount.sty Package: refcount 2019/12/15 v3.6 Data extraction from label references (HO) ) (C:\Users\Username\MikTeX\tex/generic/gettitlestring\gettitlestring.sty Package: gettitlestring 2019/12/15 v1.6 Cleanup title references (HO) (C:\Users\Username\MikTeX\tex/latex/kvoptions\kvoptions.sty Package: kvoptions 2022-06-15 v3.15 Key value format for package options (HO) )) \c@section@level=\count324 ) (C:\Users\Username\MikTeX\tex/latex/etoolbox\etoolbox.sty Package: etoolbox 2025/10/02 v2.5m e-TeX tools for LaTeX (JAW) \etb@tempcnta=\count325 ) (C:\Users\Username\MikTeX\tex/generic/stringenc\stringenc.sty Package: stringenc 2019/11/29 v1.12 Convert strings between diff. encodings (HO ) ) \@linkdim=\dimen154 \Hy@linkcounter=\count326 \Hy@pagecounter=\count327 (C:\Users\Username\MikTeX\tex/latex/hyperref\pd1enc.def File: pd1enc.def 2025-07-12 v7.01o Hyperref: PDFDocEncoding definition (HO) Now handling font encoding PD1 ... ... no UTF-8 mapping file for font encoding PD1 ) (C:\Users\Username\MikTeX\tex/generic/intcalc\intcalc.sty Package: intcalc 2019/12/15 v1.3 Expandable calculations with integers (HO) ) \Hy@SavedSpaceFactor=\count328 (C:\Users\Username\MikTeX\tex/latex/hyperref\puenc.def File: puenc.def 2025-07-12 v7.01o Hyperref: PDF Unicode definition (HO) Now handling font encoding PU ... ... no UTF-8 mapping file for font encoding PU ) Package hyperref Info: Option `hypertexnames' set `false' on input line 4066. Package hyperref Info: Hyper figures OFF on input line 4195. Package hyperref Info: Link nesting OFF on input line 4200. Package hyperref Info: Hyper index ON on input line 4203. Package hyperref Info: Plain pages OFF on input line 4210. Package hyperref Info: Backreferencing OFF on input line 4215. Package hyperref Info: Implicit mode ON; LaTeX internals redefined. Package hyperref Info: Bookmarks ON on input line 4462. \c@Hy@tempcnt=\count329 (C:\Users\Username\MikTeX\tex/latex/url\url.sty \Urlmuskip=\muskip17 Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc. ) LaTeX Info: Redefining \url on input line 4801. \XeTeXLinkMargin=\dimen155 (C:\Users\Username\MikTeX\tex/generic/bitset\bitset.sty Package: bitset 2019/12/09 v1.3 Handle bit-vector datatype (HO) (C:\Users\Username\MikTeX\tex/generic/bigintcalc\bigintcalc.sty Package: bigintcalc 2019/12/15 v1.5 Expandable calculations on big integers (HO ) )) \Fld@menulength=\count330 \Field@Width=\dimen156 \Fld@charsize=\dimen157 Package hyperref Info: Hyper figures OFF on input line 6078. Package hyperref Info: Link nesting OFF on input line 6083. Package hyperref Info: Hyper index ON on input line 6086. Package hyperref Info: backreferencing OFF on input line 6093. Package hyperref Info: Link coloring OFF on input line 6098. Package hyperref Info: Link coloring with OCG OFF on input line 6103. Package hyperref Info: PDF/A mode OFF on input line 6108. \Hy@abspage=\count331 \c@Item=\count332 ) Package hyperref Info: Driver (custom): hgeneric-testphase. (C:\Users\Username\MikTeX\tex/latex/pdfmanagement-testphase\hgeneric-testphase.de f File: hgeneric-testphase.def 2025-08-05 v0.96v generic Hyperref driver for the LaTeX PDF management bundle (C:\Users\Username\MikTeX\tex/latex/pdfmanagement-testphase\hyperref-colorschemes .def) LaTeX Info: Redefining \href on input line 274. LaTeX Info: Redefining \url on input line 360. \l__hyp_tmpa_box=\box62 \l__hyp_tmpa_int=\count333 \l__hyp_dest_box=\box63 \g__hyp_linknestlevel_int=\count334 \HyAnn@Count=\count335 \Fld@listcount=\count336 \Hy@SectionHShift=\skip91 ) (C:\Users\Username\MikTeX\tex/latex/amsmath\amsmath.sty Package: amsmath 2025/07/09 v2.17z AMS math features \@mathmargin=\skip92 For additional information on amsmath, use the `?' option. (C:\Users\Username\MikTeX\tex/latex/amsmath\amstext.sty Package: amstext 2024/11/17 v2.01 AMS text (C:\Users\Username\MikTeX\tex/latex/amsmath\amsgen.sty File: amsgen.sty 1999/11/30 v2.0 generic functions \@emptytoks=\toks19 \ex@=\dimen158 )) (C:\Users\Username\MikTeX\tex/latex/amsmath\amsbsy.sty Package: amsbsy 1999/11/29 v1.2d Bold Symbols \pmbraise@=\dimen159 ) (C:\Users\Username\MikTeX\tex/latex/amsmath\amsopn.sty Package: amsopn 2022/04/08 v2.04 operator names ) \inf@bad=\count337 LaTeX Info: Redefining \frac on input line 233. \uproot@=\count338 \leftroot@=\count339 LaTeX Info: Redefining \overline on input line 398. LaTeX Info: Redefining \colon on input line 409. \classnum@=\count340 \DOTSCASE@=\count341 LaTeX Info: Redefining \ldots on input line 495. LaTeX Info: Redefining \dots on input line 498. LaTeX Info: Redefining \cdots on input line 619. \Mathstrutbox@=\box64 \strutbox@=\box65 LaTeX Info: Redefining \big on input line 721. LaTeX Info: Redefining \Big on input line 722. LaTeX Info: Redefining \bigg on input line 723. LaTeX Info: Redefining \Bigg on input line 724. \big@size=\dimen160 LaTeX Font Info: Redeclaring font encoding OML on input line 742. LaTeX Font Info: Redeclaring font encoding OMS on input line 743. \macc@depth=\count342 LaTeX Info: Redefining \bmod on input line 904. LaTeX Info: Redefining \pmod on input line 909. LaTeX Info: Redefining \smash on input line 939. LaTeX Info: Redefining \relbar on input line 969. LaTeX Info: Redefining \Relbar on input line 970. \c@MaxMatrixCols=\count343 \dotsspace@=\muskip18 \c@parentequation=\count344 \dspbrk@lvl=\count345 \tag@help=\toks20 \row@=\count346 \column@=\count347 \maxfields@=\count348 \andhelp@=\toks21 \eqnshift@=\dimen161 \alignsep@=\dimen162 \tagshift@=\dimen163 \tagwidth@=\dimen164 \totwidth@=\dimen165 \lineht@=\dimen166 \@envbody=\toks22 \multlinegap=\skip93 \multlinetaggap=\skip94 \mathdisplay@stack=\toks23 LaTeX Info: Redefining \[ on input line 2950. LaTeX Info: Redefining \] on input line 2951. ) (C:\Users\Username\MikTeX\tex/latex/latex-lab\latex-lab-amsmath.ltx File: latex-lab-amsmath.ltx 2025-09-29 v0.1i amsmath adaptions LaTeX Info: Redefining \eqref on input line 57. ) (C:\Users\Username\MikTeX\tex/latex/bookmark\bookmark.sty Package: bookmark 2023-12-10 v1.31 PDF bookmarks (HO) (C:\Users\Username\MikTeX\tex/latex/bookmark\bkm-pdftex.def File: bkm-pdftex.def 2023-12-10 v1.31 bookmark driver for pdfTeX and luaTeX (HO ) \BKM@id=\count349 )) (testbugs.aux) \openout1 = `testbugs.aux'. LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 8. LaTeX Font Info: ... okay on input line 8. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 8. LaTeX Font Info: ... okay on input line 8. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 8. LaTeX Font Info: ... okay on input line 8. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 8. LaTeX Font Info: ... okay on input line 8. LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 8. LaTeX Font Info: ... okay on input line 8. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 8. LaTeX Font Info: ... okay on input line 8. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 8. LaTeX Font Info: ... okay on input line 8. LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 8. LaTeX Font Info: ... okay on input line 8. LaTeX Font Info: Checking defaults for PU/pdf/m/n on input line 8. LaTeX Font Info: ... okay on input line 8. Package hyperref Info: Link coloring OFF on input line 8. (testbugs.toc) \tf@toc=\write3 \openout3 = `testbugs.toc'. [1 {C:/Users/Username/AppData/Local/MiKTeX/fonts/map/pdftex/pdftex.map}{C:/Users/Username/MikTeX/fonts/enc/dvips/cm-super/cm-super-t1.enc}] (testbugs.aux) *********** LaTeX2e <2025-11-01> L3 programming layer <2025-10-24> *********** ) Here is how much of TeX's memory you used: 15841 strings out of 467833 357684 string characters out of 5427605 937895 words of memory out of 5000000 44543 multiletter control sequences out of 15000+600000 649696 words of font info for 51 fonts, out of 8000000 for 9000 1141 hyphenation exceptions out of 8191 75i,5n,83p,456b,470s stack positions out of 10000i,1000n,20000p,200000b,200000s <C:/Users/Username/MikTeX/fonts/type1/public/cm-super/sfbx1000.pfb><C:/Users/Username/MikTeX/fonts/type1/public/cm-super/sfbx1200.pfb><C:/Users/Username/MikTeX/fo nts/type1/public/cm-super/sfbx1440.pfb><C:/Users/Username/MikTeX/fonts/type1/publ ic/cm-super/sfrm1000.pfb><C:/Users/Username/MikTeX/fonts/type1/public/cm-super/sf tt1000.pfb> Output written on testbugs.pdf (1 page, 90597 bytes). PDF statistics: 66 PDF objects out of 1000 (max. 8388607) 4 named destinations out of 1000 (max. 500000) 25 words of extra memory for PDF output out of 10000 (max. 10000000)

  • How can I use straight lines to connect elements inside nested TikZ environments?
    by Yilin Cheng on November 17, 2025 at 6:13 am

    I am currently refining the flowchart in this problem Why does \begin{figure}[H] disrupt line spacing?. The solution in the problem involves using nested TikZ, but I have encountered another issue that I cannot resolve: For example, connecting nodes B and C across two separate TikZ environments, but the generated result is: and I want to get: LaTeX code is as follows (not exactly a minimal working example, but relatively concise): \documentclass{ctexart} \usepackage{ctex} \usepackage{setspace} \setstretch{1.5} \usepackage{float} \usepackage{tikz} \usepackage{standalone} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture}[remember picture,foo/.style={draw,inner sep=5pt},>=stealth] \node[foo,font=\bfseries] (O) {A}; \node[foo,font=\bfseries] (A) [below=of O] {\begin{tikzpicture}[remember picture,nodes={foo,draw,minimum width=1cm}] \node (X_1) {B}; \end{tikzpicture} }; \node[foo,font=\bfseries] (B) [below=of A] {\begin{tikzpicture}[remember picture,nodes={foo,draw,minimum width=1cm}] \node (X_2) {C}; \end{tikzpicture} }; \draw[-] (X_1.south) -- (X_2.north); \end{tikzpicture} \end{document} Is there any feasible approach to address this concern? Your comments and alternatives are highly appreciated. PS: I have drafted the flowchart according to the method proposed by @Explorer, but certain aspects lack aesthetic refinement, and the connecting lines are not entirely vertically aligned. \documentclass{ctexart} \usepackage{ctex} \usepackage{setspace} \setstretch{1.5} \usepackage{float} \usepackage{tikz} \usetikzlibrary{positioning,fit,calc} \begin{document} \begin{tikzpicture}[ >=stealth, foo/.style 2 args={draw,font=\bfseries,inner sep=5pt,minimum width=#1 cm,minimum height=#2 cm}, foo/.default={1}{0.8}, box/.style={draw,inner sep=8pt,rounded corners=2pt,minimum width=15cm,minimum height=2.5cm}, small/.style={draw,inner sep=3pt,minimum width=1cm,minimum height=0.6cm,font=\small} ] \node[foo] (O) {test}; \node[foo] (A) [left=2cm of O] {test}; \node[foo] (B) [right=2cm of O] {test}; \draw[->] (A) -- (O); \draw[->] (B) -- (O); \node[small] (X_o) [below=2.5cm of O] {test}; \node[small] (X_a) [left=3cm of X_o.center] {test}; \node[small] (X_b) [right=3cm of X_o.center] {test}; \node[small] (X_c) [below=1.2cm of X_o] {test}; \node[small] (X_d) [above=1.2cm of X_a] {test}; \node[small] (X_e) [below=2.4cm of X_a] {test}; \draw[->] (X_d) -- (X_a); \draw[<-] (X_a) -- (X_o); \draw[<-] (X_b) -- (X_o); \draw[<-] (X_c) -- (X_o); \draw[<-] (X_e) -- (X_a); \draw[->] (X_c) -| ([xshift=1.2em]X_a.south); \draw[->] (X_c) -| (X_b.south); \node[box] (X_box) [fit=(X_o)(X_a)(X_b)(X_c)(X_d)(X_e)] {}; \node[font=\bfseries,anchor=north] at (X_box.north) {test}; \draw[<-] (X_box.north) -- (O); \node[small,text width=5em,align=center] (Y_o) [below=4cm of X_o] {test}; \node[small,text width=5em,align=center] (Y_a) [below=1cm of Y_o] {test}; \node[small,text width=5em,align=center] (Y_dfp) [below=1cm of Y_a] {test}; \node[small,text width=1em,align=center] (Y_c) [left=0.3cm of Y_a] {test}; \node[small,text width=1em,align=center] (Y_d) [right=0.3cm of Y_a] {test}; \node[small,text width=3em,align=center] (Y_e) [left=3cm of Y_o.center] {test}; \node[small,text width=3em,align=center] (Y_i) [below=1cm of Y_e] {test}; \node[small,text width=1em,align=center] (Y_j) [below left=0.8cm and -0.5cm of Y_i] {test}; \node[small,text width=1em,align=center] (Y_k) [below right=0.8cm and -0.5cm of Y_i] {test}; \node[small,text width=3em,align=center] (Y_f) [right=3cm of Y_o.center] {test}; \node[small,text width=3em,align=center] (Y_g) [below=1cm of Y_f] {test}; \node[small,text width=3em,align=center] (Y_h) [below=1cm of Y_g] {test}; \draw[-] (Y_o) -- (Y_a); \draw[-] (Y_a) -- (Y_dfp); \draw[-] (Y_c.north) |- (Y_o.west); \draw[-] (Y_c.east) -- (Y_a.west); \draw[-] (Y_d.north) |- (Y_o.east); \draw[-] (Y_d.west) -- (Y_a.east); \draw[-] (Y_dfp.west) -| (Y_c.south); \draw[-] (Y_dfp.east) -| (Y_d.south); \draw[-] (Y_e) -- (Y_i); \draw[-] ([xshift=-0.3em]Y_i.south) -- ++(0,-0.5) -| (Y_j.north); \draw[-] ([xshift=0.3em]Y_i.south) -- ++(0,-0.5) -| (Y_k.north); \draw[-] (Y_f) -- (Y_g); \draw[-] (Y_g) -- (Y_h); \node[box] (Y_box) [fit=(Y_o)(Y_a)(Y_dfp)(Y_c)(Y_d)(Y_e)(Y_i)(Y_j)(Y_k)(Y_f)(Y_g)(Y_h)] {}; \node[anchor=east,text width=1em,font=\linespread{1.}\bfseries] at (Y_box.east) {test}; \draw[<-] (Y_box.north) -- (X_box.south); \node[small,text width=4em,align=center] (Z_o) [below=2.2cm of Y_dfp] {test}; \node[small,text width=4em,align=center] (Z_hedge) [left=3cm of Z_o.center] {test}; \node[small,text width=4em,align=center] (Z_f) [right=3cm of Z_o.center] {test}; \node[box] (Z_box) [fit=(Z_hedge)(Z_o)(Z_f)] {}; \node[font=\linespread{1.}\bfseries,anchor=east,text width=1em,] at (Z_box.east) {test}; \draw[->] (Y_dfp.south) -- (Z_o.north); \draw[<-] (Z_f) -- (Y_h); \draw[<-] ([xshift=-0.3em]Z_hedge.north) -- ++(0,0.5) -| (Y_j.south); \draw[<-] ([xshift=0.3em]Z_hedge.north) -- ++(0,0.5) -| (Y_k.south); \node[small,text width=7em,align=center] (U_o) [below=1.5cm of Z_o] {(\textbf{test})\\test}; \node[small,text width=6em,align=center] (U_g) [left=3cm of U_o.center] {(\textbf{test})\\test}; \node[small,text width=6em,align=center] (U_f) [right=3cm of U_o.center] {(\textbf{test})\\test}; \node[box] (U_box) [fit=(U_g)(U_o)(U_f)] {}; \node[font=\linespread{1.}\bfseries,anchor=east,text width=1em,] at (U_box.east) {test}; \draw[->] (Z_hedge.south) -- (U_g.north); \draw[->] (Z_o.south) -- (U_o.north); \draw[->] (Z_f.south) -- (U_f.north); \node[foo] (Z) [below=1cm of U_o] {\textbf{test}}; \draw[<-] (Z.north) -- (U_box.south); \end{tikzpicture} \end{document} why the vertical lines are still skewed when U_o.center and Z_o.center should be aligned (I have let the [left=3cm of U_o.center] and [left=3cm of Z_o.center])? PS: I will update this ... PS: I update in link and the problem is completely: https://tex.stackexchange.com/a/755001/307309 and thanks to @Explorer and @MS-SPO.