Hot
- 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?
- Table of contents / AMS BOOKby 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!
- Biblatex IEEE reference a manual: print vs onlineby Michael Jones on November 18, 2025 at 5:27 pm
The IEEE Reference Style Guide for Authors has two different formats for manuals: print and online. Manual (Print) Basic Format: Name of Manual/Handbook, x ed., Abbrev. Name of Co., City of Co., Abbrev. State, Country, year, pp. xxx–xxx. Manual (Online) Basic Format: J. K. Author (or Abbrev. Name of Co., City of Co. Abbrev. State, Country). Name of Manual/Handbook, x ed. (year). Accessed: Date. [Online]. Available: http://www.url.com Biblatex only seems to follow the print version for the @manual entry type, even when a URL is provided (using one of the style guide examples below). @manual{testexample, title={{Antenna Products}}, date={2011}, organization={Antcom}, location={Torrance, CA, USA}, url={http://www.antcom.com/documents/catalogs/L1L2GPSAntennas.pdf}, urldate={2014-02-12} } The correct output should look like: Antcom, Torrance, CA, USA. Antenna Products. (2011). Accessed: Feb. 12, 2014. [Online]. Available: http://www.antcom.com/documents/catalogs/L1L2GPSAntennas.pdf I can almost fudge it by putting the organisation and location in the author field, manually adding a full stop to the title and wrapping the year in parentheses, but this gives a warning, and there is always a comma between the author and title (even when manually adding a full stop). @manual{testexample, author={{Antcom, Torrance, CA, USA.}}, title={{Antenna Products.}}, year={(2011)}, url={http://www.antcom.com/documents/catalogs/L1L2GPSAntennas.pdf}, urldate={2014-02-12} } Is there a proper way to enter an online manual? If not, are there any workarounds? Or, is there a way to add support for this in biblatex/biblatex-ieee?
- 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 showonlyrefsby 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?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 pointby 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.)
- Accessibility, Tagged PDF using Sphinx and LuaLatexby Niklas Maurer on November 18, 2025 at 10:46 am
we are currently using sphinx to build manuals for html and pdf via lualatex. Thanks to the EU we are forced to provided every manual as PDF UA with tags. To get the pdf marked as "tagged" in general. I had first performs the sphinx build to .tex files and then insert: \DocumentMetadata{ lang=en, pdfstandard=ua-2, tagging=on } before the lualatex pdf build. I cannot yet get figures (images) to be "tagged" with alt tags in the pdfua. If I use a block like: .. figure:: ../images/foo.png :width: 80% :align: center :alt: A screenshot of foo A screenshot of foo I get: Package tagpdf Warning: Alternative text for graphic is missing. I know this all is quite new, but I was not able to find any help on Sphinx + Latex with accessibility as a goal. I would appreciate any help or feedback, conf.py examples (preamble), rst examples or useful links...
- Wide figure using sidenotes placed incorrectlyby Heisenbugs on November 18, 2025 at 7:11 am
I am 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 environmentby 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?
- A macro about \quad works differently in beamerby Akira on November 18, 2025 at 12:18 am
I have a tex file \documentclass{beamer} \usepackage{zref-clever} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Create modification of align environments % https://tex.stackexchange.com/a/751147/161639 % https://tex.stackexchange.com/a/751622/161639 \makeatletter \ExplSyntaxOn %% Variable declarations. \int_new:N \g__example_position_int %% The list of environments to define. \prop_const_from_keyval:Nn \c__example_envs_prop { myalign = align, myaligned = aligned, myalign* = align*, myaligned* = aligned*, myequation = equation, } \prop_map_inline:Nn \c__example_envs_prop { %% Define the new environments. \NewEnvironmentCopy { #1 } { #2 } %% Inside the environments, make `&` active and make have it run %% the `\__example_align:` command. \hook_gput_code:nnn { env / #1 / begin } { . } { \zcsetup { currentcounter = equation } \int_gzero:N \g__example_position_int \char_set_catcode_active:N \& \char_set_active_eq:NN \& \__example_align: } } %% Workaround for https://github.com/latex3/latex3/issues/1796 \cs_new:Nn \__example_only_align: { \c_alignment_token } %% Also make `&` active inside the specified environments, so that nested %% `myaligned`s work inside of them. \clist_map_inline:nn { align, align*, equation, equation* } { \hook_gput_code:nnn { env / #1 / begin } { . } { \char_set_catcode_active:N \& \char_set_active_eq:NN \& \__example_only_align: } } %% Reset the position counter after measurement is done, otherwise the %% counter will be twice as large as it should be. \hook_gput_code:nnn { cmd / measure@ / after } { . } { \int_gzero:N \g__example_position_int } %% Define the `\__example_align:` that runs every time `&` is encountered. \cs_new_protected:Nn \__example_align: { %% Increment the position counter. \int_gincr:N \g__example_position_int %% Equivalent to a regular alignment `&`. \c_alignment_token %% If this is not the first `&`, insert a `\quad`. \bool_if:nT { \prop_if_in_p:NV \c__example_envs_prop \@currenvir && \int_compare_p:n { \g__example_position_int > 1} } { \quad } } \ExplSyntaxOff \makeatother \begin{document} \begin{frame} We have \begin{myalign} & A \\ & = B . \end{myalign} We have \begin{align} & A \\ & \quad = B . \end{align} \end{frame} \end{document} Above, in the user-defined environment myalign (modified from align), there is an implicit \quad inserted right after & for all lines except for the first line. However, the indentation in (2) is shorter that in (4) (manual insertion of \quad). On the other hand, myalign works as expected in class article: \documentclass{article} \usepackage{mathtools,zref-clever} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Create modification of align environments % https://tex.stackexchange.com/a/751147/161639 % https://tex.stackexchange.com/a/751622/161639 \makeatletter \ExplSyntaxOn %% Variable declarations. \int_new:N \g__example_position_int %% The list of environments to define. \prop_const_from_keyval:Nn \c__example_envs_prop { myalign = align, myaligned = aligned, myalign* = align*, myaligned* = aligned*, myequation = equation, } \prop_map_inline:Nn \c__example_envs_prop { %% Define the new environments. \NewEnvironmentCopy { #1 } { #2 } %% Inside the environments, make `&` active and make have it run %% the `\__example_align:` command. \hook_gput_code:nnn { env / #1 / begin } { . } { \zcsetup { currentcounter = equation } \int_gzero:N \g__example_position_int \char_set_catcode_active:N \& \char_set_active_eq:NN \& \__example_align: } } %% Workaround for https://github.com/latex3/latex3/issues/1796 \cs_new:Nn \__example_only_align: { \c_alignment_token } %% Also make `&` active inside the specified environments, so that nested %% `myaligned`s work inside of them. \clist_map_inline:nn { align, align*, equation, equation* } { \hook_gput_code:nnn { env / #1 / begin } { . } { \char_set_catcode_active:N \& \char_set_active_eq:NN \& \__example_only_align: } } %% Reset the position counter after measurement is done, otherwise the %% counter will be twice as large as it should be. \hook_gput_code:nnn { cmd / measure@ / after } { . } { \int_gzero:N \g__example_position_int } %% Define the `\__example_align:` that runs every time `&` is encountered. \cs_new_protected:Nn \__example_align: { %% Increment the position counter. \int_gincr:N \g__example_position_int %% Equivalent to a regular alignment `&`. \c_alignment_token %% If this is not the first `&`, insert a `\quad`. \bool_if:nT { \prop_if_in_p:NV \c__example_envs_prop \@currenvir && \int_compare_p:n { \g__example_position_int > 1} } { \quad } } \ExplSyntaxOff \makeatother \begin{document} We have \begin{myalign} & A \\ & = B . \end{myalign} We have \begin{align} & A \\ & \quad = B . \end{align} \end{document} Could you elaborate on this issue and how to make it works as expected for beamer class?
- How to align this flowchart in TikZ?by Yilin Cheng on November 18, 2025 at 12:13 am
(In order to ensure that each post should only focus on one key point, I have reformulated my question and provided the modified TikZ code. )For the problem How can I use straight lines to connect elements inside nested TikZ environments?, how to align?
- Is there a “big” command for square brackets as large as `\left[ … \right]`?by Sebastiano on November 17, 2025 at 10:20 pm
I have the following LaTeX code (using amsmath and amssymb): \documentclass[12pt]{article} \usepackage{amsmath,amssymb} \begin{document} \[ \sum_{n=1}^{+\infty} \frac{\left(1 + \sin \frac{1}{n^2}\right)^{n^2}}{n^x} \] Consider the general term: \[ a_n = \frac{\left(1 + \sin \frac{1}{n^2}\right)^{n^2}}{n^x} = \frac{\left(1 + \dfrac{1}{\frac{1}{\sin \frac{1}{n^2}}}\right)^{n^2}}{n^x} = \frac{\Biggl[\left(1 + \dfrac{1}{\frac{1}{ \sin \frac{1}{n^2}}}\right)^{n^2}}{n^x} \] \end{document} In the last line I used \Biggl[ hoping to make the square bracket as tall as a \left[ ...\right] delimiter. But \Biggl[ does not match the height of \left[ in my expression: the bracket doesn’t scale quite as much, especially when the content inside is very tall (because of exponents, fractions, etc.). My questions are: Is there a “size command” (\big, \Big, \bigg, \Bigg, or something else) for square brackets that produces exactly the same height as \left[ ...\right] in all cases? If not, what is the best practice to get “manual brackets” that are almost as tall as \left[ ...\right], but without using \left/\right (e.g., to avoid weird spacing or other layout issues)? Are there advanced TeX tricks (or uses of font parameters) to “force” bracket sizes even larger than standard \Bigg?
- Same Index twice in a documentby Knudsen on November 17, 2025 at 8:56 pm
I am trying to print the same index twice in a document, and in the following MWE the two indexes print fine, but I am observing that the first occurrence of \printindex stops all indexation in any text that follows, as you can see here: \documentclass{book} \usepackage{imakeidx} \makeindex[program=texindy, options=-L portuguese -C utf8] \begin{document} First part: \index{notation-one} \index{aut-one} \printindex \newpage Second part: \index{notation-two} \index{aut-two} \printindex \end{document} that produces: First part: Index aut-one, 1 notation-one, 1 Second part: Index aut-one, 1 notation-one, 1 and the material in the Second part is not indexed. How can one keep it indexing the entries beyond the first \printindex?
- 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 pdfby 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!
- Can siunitx tabular align section numbers?by Teepeemm on November 17, 2025 at 4:10 pm
I have a table of equations where I'm including the section where that equation was introduced. I'd like to align the sections on the decimal marker between the section and the subsection. Here's an example of what I mean: \documentclass{article} \usepackage{siunitx} \begin{document} \section{Section}\label{sec}\[a^2+b^2=c^2\] \stepcounter{subsection} \subsection{Subsection}\label{subsec}\[E=mc^2\] \addtocounter{subsubsection}{2} \subsubsection{Subsubsection}\label{subsubsec}\[F=ma\] \begin{tabular}{ l S[table-format=1.2, table-align-text-after=false] l } \hline Equation & {Section} & Section \\\hline $a^2+b^2=c^2$ & 1 & 1 \\ $E=mc^2$ & 1.2 & 1.2 \\ $F=ma$ & 1.2{.3} & 1.2.3 \\\hline $a^2+b^2=c^2$ & \ref{sec} & \ref{sec} \\ $E=mc^2$ & \ref{subsec} & \ref{subsec} \\ $F=ma$ & \ref{subsubsec} & \ref{subsubsec} \\\hline \end{tabular} \end{document} If I left align the column (3rd column), then it's too far to the left, relative to the "Section" header. siunitx can align on the decimal like I want, but it doesn't see the marker at all (2nd column, bottom half). And if I manually enter the section numbers, I still have to protect the subsubsection from being seen (2nd column, top half). Is there a way to have the entries aligned on the first decimal point (2nd column, top half) but have \ref produce the section numbers (bottom half)? (Note that this will use booktabs and hyperref, but those do not seem necessary for the question at hand.)
- In tabular environment, aligning a center aligned column to have a left-alignment within the center alignmentby Jason on November 17, 2025 at 3:58 pm
I am wondering if there is a relatively sane way to get a tabular environment with a centered alignment column, to have a consistent left alignment within that centering. This is easiest to explain by showing with example: I want a column within a tabular environment that typesets to look something like the following: |Column Head (Centered)| | A | | AB | | A- | | D | | A+ | | DN | | D- | Notice how the column head is larger than any of the column contents, and how the contents below it are "centered" but they are aligned left within that centering, leading to a nice clean edge that is left aligned, with the contents still generally centered beneath the heading, even though the content of the column has various lengths. For my application, each row content will be 1 or 2 characters long (as in the example above) but fonts being what they are, the actual horizontal spacing may not be equal for all characters and I don't want to use a uniform font/typesetting to force that to be the case. My goal is to see if there is a non-crazy way to typeset this kind of alignment within a column for a tabular environment. I have managed to achieved this by defining some crazy commands to contain the contents I want that then take the maximum horizontal width of all the content going in the column, and artificially making all content in the column that width by appending forced whitespace to the right of the text for each of the contents in that row. This ensures that, when centered, it ends up looking as I wanted... but this is a huge pain and definitely a Rube Goldberg approach. I suspect there is an easy way to do this with multicol package, but I don't know it well enough to know how to do this in a nice way that keeps the content centered more-or-less (exactly center isn't a huge deal as long as it looks centered). I wouldn't mind a multicol approach, but I'm trying to see if there is another solution. If any other solution is just as crazy as mine though, then if someone can point me to (or submit) a good multicol solution that would be nice. It is worth mentioning that I have relatively narrow parameters, in particular each rows content in the column is 1 or 2 characters, so it doesn't need to be hugely dynamic. NOTE: I'm sure this is answered somewhere but I can't get my search-foo to work well enough to find the niche formatting I am after. If anyone can point me to an answered version I'll gladly remove this.
- How to centrally align grid in tcolorbox interiorby Alec on November 17, 2025 at 3:42 pm
I'm making a test using the exam class and wish to have answer boxes with a grid background for my students to write their responses. I'm doing this with a custom tcolorbox. I'm wondering why my grid isn't centrally aligned as I wanted to have it so that, regardless of the size parameter I put in, the grid is 'balanced' vertically and horizontally. Currently it doesn't balance either vertically or horizontally (I've deliberately picked awkward heights to highlight this). In my MWE below I've put two types of custom tcolorbox answer grid, as I actually want the first one with the 'grow to the right' bit, but wanted to show that it's not this bit messing up the grid balance and so omitted it in the second answer grid type. \documentclass[addpoints,12pt,a4paper,dvipsnames,table]{exam} \usepackage[most,many]{tcolorbox} \newtcolorbox{ansgrid}[1] {height=#1, width=\linewidth, grow to right by=10mm, arc=2mm, enhanced, underlay={ \begin{tcbclipinterior} {\centering \draw[step=0.5,line width=0.3mm, gray!50] (interior.center) grid (interior.north east); \draw[step=0.5,line width=0.3mm, gray!50] (interior.center) grid (interior.north west); \draw[step=0.5,line width=0.3mm, gray!50] (interior.center) grid (interior.south east); \draw[step=0.5,line width=0.3mm, gray!50] (interior.center) grid (interior.south west);} \end{tcbclipinterior} } } \newtcolorbox{ansgrid2}[1] {height=#1, width=\linewidth, arc=2mm, enhanced, underlay={ \begin{tcbclipinterior} {\centering \draw[step=0.5,line width=0.3mm, gray!50] (interior.center) grid (interior.north east); \draw[step=0.5,line width=0.3mm, gray!50] (interior.center) grid (interior.north west); \draw[step=0.5,line width=0.3mm, gray!50] (interior.center) grid (interior.south east); \draw[step=0.5,line width=0.3mm, gray!50] (interior.center) grid (interior.south west);} \end{tcbclipinterior} } } \begin{document} \begin{questions} \question[1] What is the answer? \begin{ansgrid}{3.4cm} \end{ansgrid} \question[1] What is the answer to this one? \begin{ansgrid2}{3.9cm} \end{ansgrid2} \end{questions} \end{document}
- Referencing theorems [closed]by Rodrigo Tavares on November 17, 2025 at 2:51 pm
I put a label \label{thm} inside the theorem environment, but when I use \cite{thm} it displays a [?] instead of any label. I wanted to put in the label the number of the theorem. In my text, the theorems are numbered not inside chapter or sections, but with a number since the first, like theorem 1, 2, ..., etc.
- Newest pdfmanagement conflicts with tocloft package also for pdflatexby 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.
- help with 3D Surface plot TikZby Mark Roelands on November 16, 2025 at 9:20 pm
Can someone please help with coding the surface plot for $\sqrt{(x - 1)^2 + y^2} + \sqrt{(x + 1)^2 + y^2} - 4 = -|z|$ in TikZ for my article in LateX? I have been trying, but can't seem to manage it. This is what I have so far, it only plots one half of the surface on a square but not within the disk: \begin{tikzpicture} \begin{axis}[ hide axis, colormap/cool, ] \addplot3[ mesh, samples=50, domain=-2:2, ] {deg(sqrt((x - 1)^2 + y^2) + sqrt((x + 1)^2 +y^2) - 4)}; \end{axis} \end{tikzpicture}
- Text running into right marginby albert on November 16, 2025 at 10:19 am
When having the MWE: \documentclass{book} \usepackage[a4paper,left=2.5cm,right=2.5cm,top=2.5cm,bottom=2.5cm]{geometry} \usepackage{hyperref} \newcommand{\+}{\discretionary{\mbox{\scriptsize$\hookleftarrow$}}{}{}} \begin{document} The MATHJAX\+\_\+\+EXTENSIONS tag can be used to specify one or more Math\+Jax extension names that should be enabled during Math\+Jax rendering. For example for Math\+Jax version 2 (see \href{https://docs.mathjax.org/en/v2.7/tex.html}{\texttt{https\+://docs.\+mathjax.\+org/en/v2.\+7/tex.\+html}})\+: For example for Math\+Jax version 3 (see \href{https://docs.mathjax.org/en/v3.2/input/tex/extensions/}{\texttt{https\+://docs.\+mathjax.\+org/en/v3.\+2/input/tex/extensions/}})\+: For example for Math\+Jax version 4 (see \href{https://docs.mathjax.org/en/v4.0/input/tex/extensions/}{\texttt{https\+://docs.\+mathjax.\+org/en/v4.\+0/input/tex/extensions/}})\+: \end{document} we get as result: We see here that for the second and 3rd line the link is not wrapped like it is done for the first line and that the link runs into the right margin. (The order of loading hyperref and geometry doesn't make a difference) How can this problem be solved?
- Long words can't be line-broken in a right way when invoking babelby M. Logic on November 16, 2025 at 4:45 am
A minimal working sample is as follows. \documentclass{ctexart} \usepackage{babel}% \babelprovide{greek} \babelfont[greek]{rm}[Scale=MatchUppercase, ItalicFont={GFSArtemisiaIt.otf}, BoldFont={GFSArtemisiaBold.otf}, BoldItalicFont={GFSArtemisiaBoldIt.otf}]{GFSArtemisia.otf} \usepackage[utf8, ugly, backend=biber, style=caspervector-ay, sorting=cenyt]{biblatex} \addbibresource{\jobname.bib} \begin{filecontents*}[overwrite]{\jobname.bib} @collection{Msfz2014, editor = {刘查理 and 风格林}, language = {chinese}, location = {北京}, publisher = {科学出版社}, title = {长城}, year = {2014}} @proceedings{Ttom1965, editor = {J. W. Green and L. Stone and A. Bust}, location = {New York and Oxford}, publisher = {Oxford University Press}, title = {History of \LaTeX{}}, year = {1999}} \end{filecontents*} \title{测试} \author{佚名} \begin{document} \maketitle \LaTeX{}(音译“拉泰赫”)是一种基于\TeX{}的排版系统,由美国计算机学家莱斯利·兰伯特(Leslie Lamport)在20世纪80年代初期开发------利用这种格式------即使使用者没有排版和程序设计的知识也可以充分发挥由TeX所提供的强大功能。 Longlongwords Longlongwords Longlongwords Longlongwords Longlongwords Longlongwords test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test Some texts \foreignlanguage{greek}{φιλοσοφία} \foreignlanguage{english}{% \printbibliography[title = {参考文献},heading = bibintoc]% } \nocite{*} \end{document} As you see, I'd like to add Greek texts into the article, so I invoke babel, while long words can't be line broken in a right way at the moment. To make eds, trans and so on work well, I add \foreinlaguage{english}{} around \printbibliography. When I add english option before babel, long words could be line-broken in a right way. But it brings new problems: (1) the date format becomes English while it should be Chinese; (2) eds, trans and so on don't work well. So my question is Is there any way to make long words be line-broken in a right way when invoking babel in the ctexart document class? Don't changing the Chinese date format is also necessary (in fact, don't change some other Chinese formats too), and make eds, trans and so on work well. Summary The following codes could solve the problem. \usepackage[main=chinese,provide=*]{babel} @cfr 's solution could solve the problem if there are no settings on bibliography.
- Large table does not fit on pageby Saïd Maanan on November 15, 2025 at 7:36 pm
I am typesetting a table in landscape mode using the pdflscape package. The table has four columns, one of which contains long mathematical expressions. I want the table to fit properly on the landscape page, while the math remaining readable (no extreme shrinking), and without using tabularx or resizebox (because they produce unreadably small text in my case). However, even when specifying column widths manually, the table still exceeds the page width. Here is my script: \documentclass[12pt,a4paper]{article} \usepackage{amsmath,amssymb,amsfonts,amsthm,enumitem} \usepackage[margin=2cm]{geometry} \usepackage{graphicx} \usepackage{setspace} \usepackage{pdflscape} \onehalfspacing \DeclareMathOperator{\Var}{Var} \DeclareMathOperator{\Cov}{Cov} \DeclareMathOperator{\sgn}{sgn} \title{text} \author{names} \date{text} \begin{document} %\maketitle \begin{landscape} \begin{table}[!htbp] \centering \caption{RNML Penalty Structure Across Spatial Econometric Models} \label{tab:rnml_penalties} \small \renewcommand{\arraystretch}{1.1} \begin{tabular}{p{5cm} p{5cm} p{12cm} p{5cm}} \hline \textbf{Model} & \textbf{Spatial Dependence Type} & \textbf{RNML Adaptive Penalty Term (Spatial Component)} & \textbf{Nesting / Relation} \\ \hline \textbf{SLX} (Spatial Lag of X) & No endogenous or error feedback & No spatial autoregressive term; RNML reduces to the standard non-spatial form: \[ \frac{k}{2}\ln(n) + \ln\Gamma\!\left(\tfrac{n}{2}\right) \] & Baseline model; special case of SDM or SDEM when $\rho=\lambda=0$. \\ \textbf{SAR} (Spatial Autoregressive Model) & Endogenous spatial lag of the dependent variable & \[ \frac{1}{2}\ln\!\left( \operatorname{tr}\!\Bigl[ (\mathbf{A}^{-1}(\hat{\rho})\mathbf{W})^2 \Bigr] + \frac{1}{\hat{\sigma}^2} \hat{\boldsymbol{\beta}}^{\top}\mathbf{X}^{\top}\mathbf{W}^{\top}\mathbf{W}\mathbf{X}\hat{\boldsymbol{\beta}} \right) \] & Special case of SAC when $\lambda=0$. \\ \textbf{SEM} (Spatial Error Model) & Spatial dependence in the error term & \[ \frac{1}{2}\ln\!\left( \operatorname{tr}\!\Bigl[ (\mathbf{B}^{-1}(\hat{\lambda})\mathbf{W})^2 \Bigr] \right) \] & Special case of SAC when $\rho=0$. \\ \textbf{SDM} (Spatial Durbin Model) & Endogenous and exogenous spatial lags & \[ \frac{1}{2}\ln\!\left( \operatorname{tr}\!\Bigl[ (\mathbf{A}^{-1}(\hat{\rho})\mathbf{W})^2 \Bigr] + \frac{1}{\hat{\sigma}^2} \begin{bmatrix} \hat{\boldsymbol{\beta}} \\[0.2em] \hat{\boldsymbol{\theta}} \end{bmatrix}^{\!\top} \mathbf{X}_{+}^{\top}\mathbf{W}^{\top}\mathbf{W}\mathbf{X}_{+} \begin{bmatrix} \hat{\boldsymbol{\beta}} \\[0.2em] \hat{\boldsymbol{\theta}} \end{bmatrix} \right) \] & Reduces to SAR when $\boldsymbol{\theta}=\mathbf{0}$. \\ \textbf{SDEM} (Spatial Durbin Error Model) & Spatial lag in regressors and error autocorrelation & \[ \frac{1}{2}\ln\!\left( \operatorname{tr}\!\Bigl[ (\mathbf{B}^{-1}(\hat{\lambda})\mathbf{W})^2 \Bigr] + \frac{1}{\hat{\sigma}^2} \hat{\boldsymbol{\theta}}^{\top}\mathbf{X}^{\top}\mathbf{W}^{\top}\mathbf{W}\mathbf{X}\hat{\boldsymbol{\theta}} \right) \] & Reduces to SEM when $\boldsymbol{\theta}=\mathbf{0}$. \\ \textbf{SAC} (Spatial Autoregressive Combined Model) & Both lag and error spatial dependence & \[ \frac{1}{2}\ln\!\det\!\!\left( \begin{bmatrix} \mathcal{I}_{\rho\rho} & \mathcal{I}_{\rho\lambda} \\ \mathcal{I}_{\lambda\rho} & \mathcal{I}_{\lambda\lambda} \end{bmatrix}_{\!\!\hat{\phi}} \right) \] & Generalizes SAR and SEM; special case of GNS when $\boldsymbol{\theta}=\mathbf{0}$. \\ \textbf{GNS} (General Nesting Spatial Model) & Full specification with endogenous, exogenous, and error dependence & \[ \frac{1}{2}\ln\!\det\!\bigl( \mathcal{I}_{\phi\phi}(\hat{\phi}) \bigr) \] where $\mathcal{I}_{\phi\phi}$ includes all cross-derivatives for $(\rho,\lambda,\boldsymbol{\theta})$ & Most general model; nests SAR, SEM, SDM, SDEM, and SAC. \\ \hline \multicolumn{4}{l}{\footnotesize \textbf{Notes:} All models include the standard regression and variance penalty $\frac{k}{2}\ln(n) + \ln\Gamma\!\bigl(\tfrac{n}{2}\bigr)$. Here, $\mathbf{A}(\rho)=\mathbf{I}-\rho\mathbf{W}$ and $\mathbf{B}(\lambda)=\mathbf{I}-\lambda\mathbf{W}$. The matrix $\mathcal{I}_{\phi\phi}$ denotes the Fisher Information Matrix block corresponding to the spatial parameters, whose curvature determines the adaptive component of the RNML penalty. As $|\rho|$ or $|\lambda|$ increase, the curvature of the likelihood surface steepens, leading to a stronger penalty and preventing overfitting.} \end{tabular} \end{table} \end{landscape} \end{document} Even in landscape mode, the table width exceeds the page width: What is the recommended way to typeset such table so that: the table fits within the page width, the math stays readable (no global shrinking with resizebox), and I can still control wrapping in only one or two columns?