Hot
- Hyperref warning about the anchor of a bookmarkby Cham on June 24, 2025 at 7:03 pm
I'm getting a warning during compilation from the hyperref package and would like to solve it. Here's a MWE showing the issue: \documentclass[11pt,twoside]{book} \usepackage[T1]{fontenc} \usepackage[nomath]{lmodern} \usepackage[french]{babel} \usepackage[letterpaper,left=1.25in,right=1in,top=0.5in,bottom=0.5in,includeheadfoot,headheight=14pt]{geometry} % Option showframe pour montrer les bordures. \usepackage{amssymb} \usepackage[dvipsnames,table]{xcolor} \usepackage{hyperref} \usepackage[pagestyles,medium]{titlesec} \begin{document} \setcounter{tocdepth}{2} \tableofcontents \cleardoublepage \phantomsection \pagestyle{plain} \section*{\centering Introduction} % Need to be shown in the ToC \addcontentsline{toc}{chapter}{\textbf{Introduction}} Blabla \subsection*{\textsf{Remerciements}} % Need to be shown in the ToC. \addcontentsline{toc}{section}{\textsf{Remerciements}} Text \chapter{Chapter title} Text \end{document} From this code, I'm getting the following pesky warning: Package hyperref Warning: The anchor of a bookmark and its parent's must not (hyperref) be the same. Added a new anchor on input line 31. How can I fix this?
- Margin tags on specific vertical position in a display math blockby tomsmeding on June 24, 2025 at 6:27 pm
Sometimes it is helpful to have a tag in a display math block (equation, align, etc.) that is not necessarily an equation tag for an entire equation, but rather a visual label for a specific part of the block. For example: A standard amsmath equation tag will have at most one tag per "line" in the equation environment; this is not sufficient for me, as I would like to typeset an array where multiple, but not all, of the lines in the array have a tag at the margin. In the example above, the indented code layout is achieved with multiple nested uses of \begin{array}[t]{@{}l@{}}, and the circled tags align with lines of various array environments at different nesting levels. How do I produce something like this in LaTeX without manual spacing and positioning of the tags?
- Doxygen Latex Tables not working correctlyby CMercer on June 24, 2025 at 6:13 pm
I am using Doxygen to make a table in latex. I want this to be reproducible without having to manually change it. In the LaTeX setting if I set them to the the setting I below I get a funky looking table as seen in the picture below. GENERATE_LATEX = YES LATEX_OUTPUT = latex LATEX_CMD_NAME = MAKEINDEX_CMD_NAME = makeindex LATEX_MAKEINDEX_CMD = makeindex COMPACT_LATEX = YES PAPER_TYPE = a4 EXTRA_PACKAGES = array \ longtable \ booktabs \ tabularx \ doxygen LATEX_HEADER = LATEX_FOOTER = LATEX_EXTRA_STYLESHEET = LATEX_EXTRA_FILES = PDF_HYPERLINKS = YES USE_PDFLATEX = YES LATEX_BATCHMODE = BATCH LATEX_HIDE_INDICES = YES LATEX_BIB_STYLE = plain LATEX_EMOJI_DIRECTORY = The code that I am using is: /* * @page numbers Numbers * *<table> * <tr><th>File Name</th><th>Start Position</th><th>Length</th><th>Number</th></tr> * <tr><td>File 1</td><td>3.1</td><td>1 Byte</td><td>513</td></tr> * <tr><td>File 2</td><td>4.1</td><td>2 Byte</td><td>190</td></tr> *</table> * */ I have also used this format to with no avail. | File Name | Start Pos | Len | Number | | ----------- | ---------- | ---- | --------- | When I turn Latex_BatchMode = NO, I get the following error: (C:\Users\conradmercer\AppData\Local\Programs\MiKTeX\tex/latex/wasysym\uwasy.fd ) ! Undefined control sequence. <argument> ...rtpbox {\@nextchar }\insert@pcolumn \@endpbox \do@row@strut \o... l.16 \begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|} ? I am using the latest version. My html tables look good, I just need it to work for Latex. I would love any help thanks!
- \pgfplotsinvokeforeach with \pgfmathsetmacro doesn't workby Stanislas Remy on June 24, 2025 at 4:20 pm
I would like to draw straight line segments in order to highlight the abscissa and ordinate for some points on the curve of 2^x, and for that I would like to make a loop with \pgfplotsinvokeforeach and \pgfmathsetmacro but it does not work. I have those segments only for the first loop, and I do not understand why. Thanks in advance. \def\xm{0} \def\XM{3} \def\ym{0} \def\YM{8}\begin{tikzpicture}[x=1.0cm, y=1.0cm, scale=1, every node/.style={scale=1}] \begin{axis} %~~~~~~~~~~~ [ /pgf/number format/.cd , use comma,1000 sep={~} , anchor = origin, %,at={(0pt,0pt)}%, disabledatascaling, clip = false, scale only axis = true, x = 4cm, y = 1cm, %width = longueurcm, %height = hauteurcm, xmin = \xm, xmax = \XM, ymin = \ym, ymax = \YM, xlabel = $x$, ylabel = $y$, axis x line = middle, % left,% right,% none,% axis y line = middle, %left,% right,% none,% x axis line style = {arrows={-Stealth[inset=2pt, angle=30:7pt]},shorten >=-10pt, shorten <=-10pt}, y axis line style = {arrows={-Stealth[inset=2pt, angle=30:7pt]},shorten >=-10pt, shorten <=-10pt}, xtick = {\xm,...,\XM}, % \empty, % minor x tick num = 5, %xticklabels = {label pos 1,label pos 2,...,label pos n}, ytick = {\ym,...,\YM}, % \empty, % minor y tick num = 1, %yticklabels = {label pos 1,label pos 2,...,label pos n}, x tick label style = {anchor=north,yshift=-1ex,font=\normalsize,fill=white,inner sep=1pt}, y tick label style = {anchor=east,xshift=-1ex,font=\normalsize,fill=white,inner sep=1pt}, xlabel style = {anchor=west,at={(ticklabel* cs:1.0)},xshift=2ex}, ylabel style = {anchor=south,at={(ticklabel* cs:1.0)},yshift=2ex}, grid = major,% both, % minor, % %grid style = {line width=.1pt,couleur}, %major grid style = {line width=.2pt,couleur}, %minor grid style = {line width=.2pt,couleur}, ] %~~~~~~~ \addplot [id={id}, domain=\xm:\XM, samples=19, smooth, mark=*, ultra thick, color=carotte] gnuplot {2**x} node [right=10pt, pos=0.1, color=carotte, fill=white, inner sep=1pt] {}; \pgfplotsinvokeforeach{1,2,3}{ \pgfmathsetmacro{\abscisse}{1/#1}; \pgfmathsetmacro{\ordonnee}{pow(2,1/#1)}; \draw [densely dashed,color = red,thick] (\abscisse,0) -- (\abscisse,\ordonnee)-- (0,\ordonnee) ; } %~~~~~~~~~ \end{axis} \end{tikzpicture}
- Compilation error when subfigure option to tocloft is removed, while subfigure package isn't even loadedby Cham on June 24, 2025 at 2:55 pm
I'm experiencing an error issue with the following MWE code: \RequirePackage[l2tabu,orthodox]{nag} \documentclass[11pt,twoside]{book} \usepackage[T1]{fontenc} \usepackage[nomath]{lmodern} \usepackage[french]{babel} \frenchsetup{SmallCapsFigTabCaptions=false} \usepackage{microtype} \usepackage[total={6.25in,10in},left=1.25in,top=0.5in,includehead,includefoot,headheight=14pt,showframe]{geometry} % Option showframe pour montrer les bordures. \usepackage{amsfonts} \usepackage{subfig} \usepackage[titles,subfigure]{tocloft} % ERROR when subfigure is removed \renewcommand{\cftchappresnum}{\color{gray!110}\chaptername\ }% \renewcommand{\cftchapaftersnumb}{\newline\color{Black}}% \setlength{\cftchapindent}{0em} \setlength{\cftchapnumwidth}{0em} % \begin{document} \chapter{Title} Text \end{document} Currently, the code above works flawlessly. As you may notice, the subfigure package isn't even called, while there's an subfigure option in the tocloft package. That subfigure option should be removed, according to the answers to another question of mine on Stack Exchange (Best order of packages, according to Claude AI). If I remove that option, then I get compilation errors: LaTeX Error: Command \c@lofdepth already defined. Or name \end... illegal, see p.192 of the manual. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.623 \newcounter{lofdepth} \setcounter{lofdepth}{1} So I don't understand what is going on here. How can I fix this error, while removing the subfigure option which shouldn't be in the tocloft package since I'm not even using the subfigure package? I could leave that option there, since the code is working great, but then there's a contradiction with answers I got on another question!
- How to prepare the configfile.cfg for the epub with tex4ebook to the WCAG 2.2 Goldstandard?by Thomkrates on June 24, 2025 at 1:20 pm
In the process of a current ebook publication epubcheck gave a valid epub with no errors. The service in publicating the epub, which is connected to the world wide book market, have separate and extra epub checkers which gave now (End of June 2025) here in Germany, errors for not having necessary metadata in the epub for the "Barrierefreiheitsgesetz" (disability access requirements) going valid in law on 28 June 2025 in Germany. The international standard for these requirements is called WCAG (Web Content Accessibility Guidelines). I looked up some wordings and definitions and come to the following cryptic code for the configfile.cfg which is surely not correct for tex4ebook formatting: \Configure{OpfMetadata}{\HCode{<dcterms:conformsTo>03</dcterms:conformsTo>}} % Barrierefreiheitsstandard: WCAG Level A (02), WCAG 2.0 AA (03) prefered, Access Spec 1.1 (04)? \Configure{OpfMetadata}{\HCode{<meta property="schema:accessMode"><PrimaryContentType>10</PrimaryContentType><ContentType>18</ContentType> </meta>}} % Which media type in involved in the epub? text 10, images 18, audio, video \Configure{OpfMetadata}{\HCode{<meta property="schema:accessibilityFeature">..?..</meta>}} % highContrastDisplay, displayTransformability, index, printPageNumbers, alternativeText, MathML, longDescription, readingOrder, structuralNavigation, tableOfContents \Configure{OpfMetadata}{\HCode{<meta property="accessibilityHazard">00</meta>}} % this is to declare dangerous contents for disabled persons which react irritated to some audio or video content of special irritating and triggering character. No dangerous content has the code 00. \Configure{OpfMetadata}{\HCode{<meta property="schema:accessibilitySummary">..?..</meta>}} % with only text to add to the other metadata contents, in addition, not repeating the earlier declared metadata for this purpose. May you know how to code these metadata to make the epub valid for the current law requirements for managing access and information for disabled.
- Two-column footnote styleby Will Gordge on June 24, 2025 at 1:04 pm
I'm writing a two-column document and would like my footnotes to follow the format shown in the example image shown. I have messed about with bigfoot and manyfoot packages but can't seem to find the solution. If not evident from the image, I would like my footnote to evenly spread itself across two columns at the bottom of the page. When simply using \footnote{...}, the footnotes appear in the two separate columns but stick only to that column, I want them to spread across both regardless of where the source in the body is located between columns. EDIT: Document class is article
- Easy way to typeset longdivision in the notation as shown?by Damitr on June 24, 2025 at 12:56 pm
Is there an easy way to typeset the longdivision as shown in the image below. I am aware of longdivision package and it can typset the longdivision in different notation. As shown in the MWE \documentclass{article} \usepackage{longdivision} \begin{document} \longdivision{542.8}{16} \end{document} Please suggest if there is an easy way to do this using a package. If not, I will stick to the notation given by longdivision.
- Error message: minted v3+ executable is not installed or is not added to PATHby suckingalemon on June 24, 2025 at 12:39 pm
I know this problem has been posted a few times (found just by Googling) but I cannot fix this. Package minted Error: minted v3+ executable is not installed or is not added to PATH; or MiKTeX is being used with -aux-directory or -output-directory without setting a TEXMF_OUTPUT_DIRECTORY environment variable. As far as I can tell, I have Python listed as PATH (Windows 11), installed latexminted using pip successfully (the folder where it lives is also listed as PATH), have the minted package installed (and updated) in MiKTeX. I still get this error. I can't see any evidence of MiKTeX is being used with -aux-directory or -output-directory without setting a TEXMF_OUTPUT_DIRECTORY environment variable (although I am unsure where I would find these to check). I'm at a loss. I have also tried adding -shell-escape argument to LuaLaTeX in the the Tool Configuration of TeXworks. Do you have any suggestions I could try? Thanks for your time.
- paracol and tableof: out of syncby daleif on June 24, 2025 at 10:52 am
If I run the example below, I get the following toc, it does not show the correct elements. It seems things get out of sync, since everything works when we use \kant[1] instead of \kant (aka \subsection are on the same page as \section). Anyone have any idea as to how we can generally make these tocs work? If we look in the aux, the toc lines (from tableof) get out of sync. Image should show section + subsection + section in both cases. MWE: \documentclass[a4paper]{article} \usepackage[margin=2cm]{geometry} \usepackage{tableof} \AtBeginDocument{\tofOpenTocFileForWrite} \usepackage{paracol} \usepackage{kantlipsum} \setcounter{tocdepth}{3} \setcounter{secnumdepth}{3} \begin{document} % things work if we use \kant[1] instead of \kant below \begin{paracol}{2} \begin{leftcolumn*} \noindent A TOC \tableoftaggedcontents{A}{B} \end{leftcolumn*} \begin{rightcolumn} \noindent B TOC \tableoftaggedcontents{B}{A} \end{rightcolumn} \end{paracol} \begin{paracol}{2} \begin{leftcolumn*} \toftagstart{A} \section{Test from A} \kant%[1] \subsection{Test from A 1.1} \kant[1] \toftagstop{A} \end{leftcolumn*} \begin{rightcolumn} \toftagstart{B} \section{Test from B} \kant%[1] \subsection{Test from B 1.1} \kant[1] \toftagstop{B} \end{rightcolumn} \end{paracol} \begin{paracol}{2} \begin{leftcolumn*} \toftagstart{A} \section{Test from A 2} \toftagstop{A} \end{leftcolumn*} \begin{rightcolumn} \toftagstart{B} \section{Test from B 2} \toftagstop{B} \end{rightcolumn} \end{paracol} \end{document} (in my actual example I'm using memoir but it seems the problem is the same)
- Passing arguments to style macros for 'execute at end picture' in tikz-cdby so primitive on June 24, 2025 at 10:44 am
I get some weird errors when I try to define a style macro (e.g. mystyle/.style={fill=#1}) and then use that same style macro in the execute at end picture at the end of the same tikzcd diagram's parameter list? \documentclass{article} \usepackage{tikz-cd} \usetikzlibrary{fit,backgrounds} \begin{document} \begin{tikzcd}[ mystyle/.style 2 args={fill=#1,fit={#2}}, execute at end picture={ \begin{scope}[on background layer] \node[mystyle={blue!50}{(A)(B)}] {}; \end{scope} }] |[alias=A]|A \arrow[r] & |[alias=B]|B \\ \end{tikzcd} \end{document} The compiler usually doesn't recognise the macro name (mystyle above) in the scope of the execute at end picture, and sometimes I also get "You can't use `macro parameter character #' in horizontal mode"... I have several different tikzcd diagrams, so I'd like to modify the style macro associated with each separate diagram easily, without creating lots of new style commands?
- How to align arrow directions in tikz-cd?by so primitive on June 24, 2025 at 9:35 am
In the tikzcd diagram below, the arrows aren't aligned at exactly the same angle, between rows. I also have to adjust the rotate fit angle manually, to align the fitted rectangle with the arrows. How to fix this fancy-ish diagram? \documentclass{article} \usepackage{tikz-cd} \usetikzlibrary{fit,backgrounds} \begin{document} \begin{tikzcd}[column sep={5em,between origins}, row sep=large, execute at end picture={ \begin{scope}[on background layer] \node[rectangle,fill=blue!25,inner sep=5pt,rounded corners=12pt,rotate fit=42,fit={(s1)(S1)}] {}; \node[rectangle,fill=red!25,inner sep=5pt,rounded corners=12pt,rotate fit=42,fit={(s2)(S2)}] {}; \node[rectangle,fill=red!25!yellow!40,inner sep=5pt,rounded corners=12pt,rotate fit=42,fit={(s3)(S3)}] {}; \end{scope} }] & & & & & & |[alias=S3]|C \arrow[r] & \cdots \\ & & & & |[alias=S2]|B \arrow[r] & |[alias=s3]|c \arrow[ur] \\ & & |[alias=S1]|A \arrow[r] & |[alias=s2]|b \arrow[ur] \\ \cdots \arrow[r] & |[alias=s1]|a \arrow[ur] \\ \end{tikzcd} \end{document}
- How can I write a Bulk LaTeX University Mathematics Textbook? For Mathematics Community (100k Pages) | Self-Taught Mathematician [closed]by Vedanta Faugoo on June 24, 2025 at 9:01 am
Can somebody help me write a Large LaTeX University Math Book? 100K Pages Long Containing Most Branches and Fields. Link: https://www.cis.upenn.edu/~jean/math-deep.pdf (2204 Pages) I want to build a community university math book to help Mathematicians and Theoretical Physicists. I am Self-Taught Mathematician I want to do this noble task. I really like the above template for my Book, Any advanced LaTeX User? I have a MATLAB Official Documentation from Mathworks.com Around 20K Pages for MATLAB Functions. Please Help !!!
- main table of content for article class. How to show only subsections but keep numbering same as if section was present?by Nasser on June 24, 2025 at 8:09 am
This is best explained with screen shots below. Basically, I have an article class, with title and only one section in it with a title which is really same as main title. It seems the section here is redundant, since it says same thing as the title. (I also do not want to change all subsections to sections, and change all subsubsections to subsections, and so on as this affects other things not covered here). But if I remove the section from the latex or use section*, all numbers of the lower level subsections look bad: 0.1, 0.2, instead of 1.1, 1.2 as before. Let me given MWE first \documentclass{article} \setcounter{secnumdepth}{5} %so all have numbers. \setcounter{tocdepth}{2} % Set TOC depth to show up to subsections only \begin{document} \title{my subject} \author{dowe joe} \date{\today} \maketitle \tableofcontents \section{my subject} \subsection{my first subsection} data... \subsubsection{my first subsubsection} data... \subsection{my second subsection} data... \subsubsection{my second subsubsection} data... \end{document} This gives What I want instead is this: (done using my advanced skills in paint.exe) Using \section* or removing the \section command, does not do what I want, it gives I simply want the above, but with the original numbering as if there was a section there. There will only be one section in the article class. If I had more than one section, then I will not be trying to do this ofcourse. I think I need to just adjust the numbering assigned to subsection and all lower level sections below that, but do not know how to do this. TL 2025, lualatex
- Integral with overbar from Cambria Math (range) is not displayed in equationby user110822 on June 24, 2025 at 7:26 am
I use integral signs from Cambria Math instead of Libertinus Math, but I have problems with \upint and \lowint in the displayed formulas. Nevertheless, \int, also comes from Cambria Math, but it is displayed as expected. \documentclass[11pt]{article} \usepackage{unicode-math} \setmathfont{Libertinus Math} \setmathfont{Cambria Math}[range={\int,\iint,\iiint,\lowint,\upint}] \begin{document} \[ \upint_a^b\biggl(\int_c^d f(x,y)dy\biggr)dx\] \end{document}
- Tikz-cd + Overleaf Weirdnessby Aryan MP on June 24, 2025 at 4:58 am
I'm trying to use the tikz-cd package with overleaf and it's doing some really weird stuff. I can't find a resolution anywhere online -- in fact, I can't even find a mention of a similar problem. I'm using a bunch of "usepackage" commands, among which I have \usetikzlibrary{cd} (obviously with tikz already loaded in with a usepackage). I'm using LuaLaTeX since it's compatible with some other packages I'm using. The markup is simple: \begin{center} \begin{tikzcd} A \arrow[r, "f"] \arrow[rd, "h"']& B \arrow[d, "g"]\\ & C \end{tikzcd} \end{center} And this is the output: The problems are clear: 1. It's WAY too small and cramped, and 2. (much more urgent) what the hell is going on with the line to the left of C? EDIT 1 Yes, the overleaf document compiles with no errors. The following is a full, yet minimal example of my entire markup document: \documentclass{article} \input{imp} \begin{document} \part{--} \section{----} Words words words \begin{center} \begin{tikzcd} A \arrow[r, "f"] \arrow[rd, "h"']& B \arrow[d, "g"]\\ & C \end{tikzcd} \end{center} Words words \end{document} If there is a chance imp.tex is messing with something, it is originally sourced from https://raw.githubusercontent.com/AryanMP16/tex-imports/refs/heads/main/imp.tex and is included in my overleaf document via "input from external url". EDIT 2 I figured it out. Posted solution.
- Error of `\directlua` and `dofile` yields [\directlua]:1: in main chunk?by Explorer on June 24, 2025 at 4:43 am
I was reading and learning Alain Matthes's excellent solution via tkz-elements main.tex \documentclass[margin = 12pt]{standalone} \usepackage[mini]{tkz-euclide} \usepackage{tkz-elements} \begin{document} \directlua{dofile("def_ellipse.lua") z.A = point(5, 4) z.B = point(2, 0) z.O, z.C = draw_ellipse(z.A, z.B, 0.5) CO.EL = conic(EL_points(z.O, z.A, z.C)) PA.curve1 = CO.EL:points(0, .5, 50) PA.curve2 = CO.EL:points(.5, 1, 50) } \begin{tikzpicture} \tkzGetNodes \tkzDrawCoordinates[smooth](PA.curve1) \tkzDrawCoordinates[dashed,smooth](PA.curve2) \tkzDrawSegments(O,A O,C A,B) \tkzDrawPoints(A,B,C,O) \tkzLabelPoints(A,B,C,O) \end{tikzpicture} \end{document} def_ellipse.lua in the same working dir as main.tex: -- the file def_ellipse.lua init_elements() function def_ellipse(pa, pb, ratio) local axe = line(pa, pb) local o = axe.mid local a = 0.5 * axe.length local b = a * ratio local e = math.sqrt(a^2 - b^2)/a local pc = (pa - o):orthogonal(b): at (o) return o, pc end When I compile with lualatex main, it complained that: (c:/texlive/2025/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))[\directlua ]:1: attempt to call a nil value (global 'draw_ellipse') stack traceback: [\directlua]:1: in main chunk. l.13 } My OS is windows11 and TL2025, is that I neglected something, I am really new to lualatex and \directlua... What's more, the version of my tkz-elements now is v3.34c. Edited: Thanks to Alain Matthes's modification: An error on my part, I downloaded the wrong code. You need to replace draw_ellipse with def_ellipse. But even if I make the replacement in z.O, z.C = draw_ellipse(z.A, z.B, 0.5) to z.O, z.C = def_ellipse(z.A, z.B, 0.5), the error changed: [\directlua ]:1: attempt to call a table value (global 'line') stack traceback: [\directlua]:1: in main chunk. l.32 } ? How to debug now...? It seemed that line is undefined?
- Partition matrix using bmatrixby Naraghazi on June 24, 2025 at 3:29 am
Consider this example \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*} \left[ \begin{array}{ccc|ccc} a & 0 & 0 & & & \\ 0 & b & 0 & & \mathbf{0} & \\ 0 & 0 & c & & & \\ \hline & & & a & 0 & 0 \\ & \mathbf{0} & & 0 & b & 0 \\ & & & 0 & 0 & c \end{array} \right] \end{equation*} \end{document} which gives Can this be done using bmatrix? I am trying to avoid \left[\right] because it takes too much space, like this (upper matrices using \left[\right], lower ones using bmatrix)
- Commas appearing at the end of referencesby David Kaplan on June 24, 2025 at 1:05 am
I'm finding that some of my references are generating commas at the end when rendered. For example, the bibtex code for one of my references is @article{HansenYu2001, title = {Model Selection and the Principle of Minimum Description Length}, author = {Hansen, M. H., and Yu, B.}, year = {2001}, journal = {Journal of the American Statistical Association}, volume = 96, pages = {746--774} } and it renders as Hansen, M.H., & Yu, B. (2001). Model selection and the principle of minimum description length. Journal of the American Statistical Association, 96 , 746– 774, Note the comma at the end. This is happening to many of my references. My preamble uses Springer Nature with APA style for references. \documentclass[pdflatex,sn-apa]{sn-jnl} \usepackage{apacite} \usepackage{url} \usepackage{hyperref} \usepackage{graphicx}% \usepackage{multirow}% \usepackage{amsmath,amssymb,amsfonts}% \usepackage{amsthm}% \usepackage{mathrsfs}% \usepackage[title]{appendix}% \usepackage{xcolor}% \usepackage{textcomp}% \usepackage{manyfoot}% \usepackage{booktabs}% \usepackage{threeparttable} \usepackage{float}% \usepackage{booktabs} \usepackage{graphicx} \usepackage{caption} \usepackage{algorithm}% \usepackage{algorithmicx}% \usepackage{algpseudocode}% \usepackage{listings}% \usepackage{natbib} \usepackage{tabularray}
- How to produce a PDF in compliance with PDF/A using `\DocumentMetadata` without tagging?by miticollo on June 23, 2025 at 10:58 pm
I completed a Beamer presentation and now I want to produce a PDF in compliance with PDF/A-3B. IMO Universal Accessibility is not useful for a presentation. For this type of task, I always used pdfx. But I think that \DocumentMetadata is a better choice nowadays. So consider the following MWE: \errorcontextlines=200 \DocumentMetadata{ pdfversion=1.5, pdfstandard=A-3B, tagging=off } \documentclass[usepdftitle=false]{beamer} \usepackage{tikz} \begin{document} \begin{frame} This is a frame. This is a rectangle \tikz \path[fill=red,draw=blue] (0,0) rectangle (1,1);. \end{frame} \end{document} I read documentmetadata-support but it doesn't state if tagging key has a default value. So I wanted to be sure that tagging mechanism was disabled and I made explicit tagging=off. Unfortunately, compilation failed: ./foo.tex:11: Undefined control sequence. <argument> \ERROR \cs_set_eq:NN \__fnote_tmp:w \exp_stop_f: \use_ii:nn #1#2->#2 \__fnote_patch: ...__fnote_tmp:w \exp_stop_f: }}}} \tl_set:Nf \l__fnote_patch... \__hook begindocument ...ntext {\__fnote_patch: }} \providecommand \hyper@lin... \document ...ument \UseOneTimeHook {begindocument} \@kernel@after@begindocume... l.11 \begin{document} as always with latexmk --halt-on-error --file-line-error -pdflualatex=/usr/local/texlive/2025/bin/x86_64-linux/lualatex -lualatex ./foo.tex Removing tagging=off, the issue disappears. So is it safe to remove tagging= key to produce a PDF in compliance with PDF/A? Looking into the pdfinfo -meta output it seems that this MWE is only in compliance with PDF/A-3B as verified by veraPDF. So the answer to the above question should be yes.
- Center nodes in a diagramby the topological beast on June 23, 2025 at 10:17 pm
I need the node $z_{1}$ to be centered with the dotted arrows, but I can’t do it; I don’t know how to make the arrows longer. \begin{tikzcd} [column sep=large, row sep=large] & x_1 \arrow[r, "\alpha_{2}"] & {} \arrow[r, no head, dotted] & {} \arrow[r, "\alpha_{n_1}"] & x_{n_1} \arrow[rd, "\alpha_{n_{1}+1}"] & & \\ a \arrow[ru, "\alpha_{1}"] \arrow[r, "\beta_{1}"] \arrow[rrd, "\gamma_{1}"] & y_1 \arrow[r, "\beta_{2}"] & {} \arrow[r, no head, dotted] & {} \arrow[r, "\beta_{n_2}"] & y_{n_2} \arrow[r, "\beta_{n_{2}+1}"] & {} & {} \\ &&{} z_1 \arrow[rrru, "\gamma_{2}"] && && \end{tikzcd}
- Vertically centering text in tableby Wasi Husain on June 23, 2025 at 5:55 pm
I was working on my Résumé and wrote this table in it (given below) I tried to vertically centre the texts in the 1st column (like "Execution" in this table), all the online solutions I tried either removes the background grey, or completely randomise the table: \begin{tcolorbox}[colback=gray!15, colframe=white, boxsep=2pt, arc=2pt, left=0pt, right=0pt, top=2pt, bottom=2pt] \noindent \textbf{Mentor} \textbar{} \textbf{AR Quest:} Location based AR Game \textbar{} \textbf{Game Development Club} \textbar{} Summer Project '25\hfill \textit{[May'25 - July'25]} \end{tcolorbox} \vspace{-8pt} \renewcommand{\arraystretch}{1.2} \noindent \begin{tabular}{| >{\columncolor{gray!20}\centering\arraybackslash}m{2cm}| >{\raggedright\arraybackslash}p{17.5cm}| } \hline \textbf{Objective} & \textbullet{} Facilitated a large-scale \textbf{AR treasure hunt} involving real-world exploration game at key campus landmarks. \\\hline \textbf{Execution} & \textbullet{} Conducted interactive sessions introducing \textbf{AR development tools}, GPS-based mechanics and workflows. \\ & \textbullet{} Collaboratively developed and deployed a \textbf{functional AR prototype} leveraging campus landmarks. \\\hline \textbf{Result} & \textbullet{} Empowered students to independently create \textbf{AR games} using \textbf{Unity} based development practices. \\\hline \end{tabular} Here's how it looks
- How to named path and get fraction point of `arc` in my tikz example?by Explorer on June 23, 2025 at 5:50 pm
I have a custom command \mydrawellipse: Here below is the example usage: \documentclass[tikz,border=2pt]{standalone} \usepackage{tkz-euclide} \usepackage{amsmath} \newcommand*\mydrawellipse[4][]{% % #2=pointA;#3==pointB;#4= ratio of y on x \tkzCalcLength(#2,#3)% \tkzGetLength{tmpdistance}% \tkzFindSlopeAngle(#2,#3) % \tkzGetAngle{tmpangle}% \begin{scope}[rotate=\tmpangle] \draw[dashed,thick,#1] (#3) arc [start angle=0,delta angle=180,x radius=\fpeval{\tmpdistance/2} cm,y radius=\fpeval{\tmpdistance * (#4) / 2}cm] (#2); \draw[thick,#1] (#2) arc[start angle=180,delta angle=180,x radius=\fpeval{\tmpdistance/2} cm,y radius=\fpeval{\tmpdistance * (#4) / 2}cm] (#3); \end{scope} } \begin{document} \begin{tikzpicture} \tkzDefPoint(0,3){A} \tkzDefPoint(-2,0){B} \tkzDefPoint(3,3){C} \mydrawellipse{B}{A}{.5} \mydrawellipse[magenta]{B}{C}{.35} \mydrawellipse[blue]{A}{C}{.6} \tkzDrawPoints[color=red](A,B,C) \tkzLabelPoints[auto](A,B,C) \end{tikzpicture} \end{document} Now I need more features: \documentclass[tikz,border=2pt]{standalone} \usepackage{tkz-euclide} \newcommand*\mydrawellipse[4][]{% % #2=pointA;#3==pointB;#4= ratio of y on x \tkzCalcLength(#2,#3)% \tkzGetLength{tmpdistance}% \tkzFindSlopeAngle(#2,#3) % \tkzGetAngle{tmpangle}% \begin{scope}[rotate=\tmpangle] \draw[dashed,thick,#1] (#3) arc [start angle=0,delta angle=180,x radius=\fpeval{\tmpdistance/2} cm,y radius=\fpeval{\tmpdistance * (#4) / 2}cm] (#2); \draw[thick,#1] (#2) arc[start angle=180,delta angle=180,x radius=\fpeval{\tmpdistance/2} cm,y radius=\fpeval{\tmpdistance * (#4) / 2}cm] (#3); \end{scope} } \begin{document} \begin{tikzpicture}[line cap=round,line join=round] \tkzDefPoint(0,7){H} \tkzDefPoint(-3,0){A} \tkzDefPoint(3,0){B} \tkzDefPointWith[linear,K=0.65](A,H) \tkzGetPoint{Z1} \tkzDefPointWith[linear,K=0.5](B,H) \tkzGetPoint{Z2'} \tkzDrawPolygon[thick](A,B,H) \mydrawellipse{A}{B}{.18} \mydrawellipse{Z1}{Z2'}{.25} \tkzDrawPoints[color=red](A,B,H,Z1,Z2') \tkzLabelPoints(A,B,H,Z1,Z2') \end{tikzpicture} \end{document} The code shows: What I want to add is: the coordinate P1 at 0.2 fraction's position of dashed arc the coordinate P2 at 0.7 fraction's position of soilded arc the coordinate Q1 is the intersection of arc-Z1Z2'(dashed) and HP1 the coordinate Q2 is the intersection of arc-Z1Z2'(soilded) and HP2 However, in my framework of code, name path and pos aoption seemed difficult. Is there elegant method to fit my requirement of get Q1 and Q2, without breaking too much of my existing \mydrawellipse?
- Missing character: There is no p(and t) in font nullfont!by Aditya Narayan Dutta on June 23, 2025 at 2:38 pm
This question has already been answered before but my case is slightly different. I'm using the {arrows.meta} tikz library and the warning disappears if i dont use any statement containing the 'flex' method like so: \draw [-{>[flex=10pt]}] (3.75,0.4)arc(180:60:0.5cm)node[right]{Length $l$}; This is my preamble: \documentclass{article} %required packages \usepackage[a4paper,total={7.5in,10in}]{geometry} \usepackage{titling} \usepackage{enumitem} \usepackage{pgfplots} \usepackage{caption} \usepackage{amsmath} \usepackage{amssymb} \usepackage{graphicx} \usepackage{mathrsfs} \usepackage{textcomp,gensymb} \usepackage{wrapfig} \usepackage{float} \usepackage{soul} \usetikzlibrary{patterns,patterns.meta,arrows,arrows.meta,calc,bending} \pgfplotsset{compat=1.18} Edit: MWE code with error: \documentclass{article} \usepackage{pgfplots} \usepackage[a4paper,total={7.5in,10in}]{geometry} \usepackage{float} \usetikzlibrary{bending,arrows,arrows.meta} \pgfplotsset{compat=1.18} \begin{document} \begin{figure}[H] \centering \begin{tikzpicture} \draw [-{>[flex=10pt]}](0,0)arc(0:90:2cm); \end{tikzpicture} \end{figure} \end{document} The error was in the line \draw [-{>[flex=10pt]}](0,0)arc(0:90:2cm); as flex only accepts a dimensionless parameter as pointed out in the comments.
- How to add decoration margin beside a certain paragraph or a position?by Sunshine on June 23, 2025 at 2:16 pm
For example, from I want to have (fill in black margin,with controled distance) or (left arrow beside each line in the []) when we use margin to the content in [] \documentclass[openany,a4paper]{ctexart} \usepackage[top=1cm,bottom=1cm,left=1cm,right=1cm]{geometry}% \begin{document} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaa1111111111111哈哈哈哈哈哈哈哈哈哈哈哈哈哈2222222222222222222222222222222222222222aaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbb哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈1哈哈哈哈哈哈哈哈哈哈哈哈哈哈[22222222aaaaa哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈aaaaaaaaaaaaaaaaaaaaaaaa aaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaa哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈1111111111111哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈]bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈 \end{document}
- Luatex version and formatby LeO on June 23, 2025 at 1:45 pm
With the usage of the PDF-Tagging we currently try to keep up to date with the versions of lualatex - especially with new and changed capabilities. If I look in the log file I see as first line something like This is LuaHBTeX, Version 1.22.0 (TeX Live 2025) (format=lualatex 2025.6.23) ... LaTeX2e <2025-06-01> patch level 1 L3 programming layer <2025-05-26> To my understanding the format is the important thing which is updated and defines the capability. Perhaps I'm wrong with the wording format - if so please correct me. When I use the following MWE \documentclass{article} \begin{document} \luatexbanner \end{document} I just get as printout the first part, namely This is LuaHBTeX, Version 1.22.0 (TeX Live 2025) Q: is there a way to include the format (or whatever is relevant for the PDF-Tagging) as well? Background: With the additional information I could easily spot with which version the PDF was compiled. UPDATE: The possible duplicate answer won't help since first of all the format is not printed on the command line with parameter --version. Next the commands there are for pdftex and won't apply to lualatex. Plus to my understanding the version of the format is not (directly) related to the TeX-version.
- How to remove (continued) from caption on the bottom of longtblr [duplicate]by Martin Šudoma on June 23, 2025 at 12:40 pm
please can you give me a advice, how to remove text "continued" from caption on the bottom of long table? ... \NewTblrTheme{fancy}{ \SetTblrStyle{caption-tag}{red} % \DefTblrTemplate{caption}{default}{} % Removes a caption % \DefTblrTemplate{capcont}{default}{} % Removes a caption on subsequent pages \DefTblrTemplate{contfoot}{default}{} % Removes text denoting continuation on next } \NewDocumentEnvironment{table_complex_long}{m o o}{% % \begin{table}[!ht] \centering \fontsize{9}{11}\selectfont \begin{longtblr}[ theme = fancy, caption = {something}, % note{a} = {It is the first footnote.}, ]{ colspec={#1}, rowhead = 1, rowsep=4pt, % <-- hlines, % vlines, row{1}={bg={Stadler_b}, fg={Stadler_w}, font=\bfseries}, vline{2-10}={1}{white} } }{% \end{longtblr} % \IfValueT{#2}{Table 3.1: #2\par} % \IfValueT{#2}{\caption{#2}} \IfValueT{#3}{\label{#3}} % \end{table} } ...
- How to Draw Lines to the Tip of a Curly Braceby Oodood on June 23, 2025 at 12:05 am
Is there a simple way to draw lines to the tips of curly braces? I'm trying to reproduce this diagram from Wittgenstein's Tractatus as accurately as I can. I can't figure out how to reproduce the lines like those that run from the W and F to the tips of those curly braces. I have made something using the Tikz that's almost good enough for me. Here is a sample of what the code looks like. ` \node[] (center) at (6,-9) {}; \node[] (p) [left=of center] {$\xi$}; \node[] (q) [right=of center] {$\eta$}; \node[] (ToP) [left=-1mm of p] {T}; \node[] (FoP) [right=-1mm of p] {F}; \node[] (ToQ) [left=-1mm of q] {T}; \node[] (FoQ) [right=-1mm of q] {F}; \node[] (F2) [below right=4mm and 0mm of ToP] {F}; \node[] (T2) [above left=4mm and 0mm of FoP] {T}; \draw[] (ToP.south) -- (F2.north); \draw[] (FoP.north) -- (T2.south); \draw[decorate,decoration={calligraphic brace, amplitude=5pt,raise=0pt},thick] (T2.north) -- (ToQ.north); \draw[decorate,decoration={calligraphic brace, amplitude=5pt,raise=12pt}, thick] (T2.north) -- (FoQ.west); \draw[decorate,decoration={calligraphic brace, mirror, amplitude=5pt,raise=0pt},thick] (F2.south) -- node[midway] {} (ToQ.south); \draw[decorate,decoration={calligraphic brace, mirror, amplitude=5pt,raise=12pt},thick] (F2.south) -- (FoQ.west);` That produces this image. I would also love to be able to extend the ends of the braces to the nodes they're pointing to, but it doesn't seem like that's possible with Tikz. (Maybe I could solve both of these problems by drawing the braces as two separate parabolas.)
- Best order of packages, according to Claude AIby Cham on June 22, 2025 at 10:06 pm
I'm trying to polish a typical template that I frequently use to write books on maths and physics (so I usually load a large set of packages!). Some packages may be old and obsolete, others may clash or interfere with other packages, so I'm looking for the best order to load them in the preamble. Currently, my code is working great, and I have no error and no warning during compilation. So I asked Claude AI (from Anthropic) to optimize my following preamble: \documentclass[11pt,twoside]{book} \usepackage[T1]{fontenc} \usepackage[nomath]{lmodern} \usepackage[french]{babel} \usepackage{microtype} \usepackage{amsfonts} \usepackage{nccmath,amsmath} \usepackage{amssymb} \usepackage{mathtools} \usepackage{mathrsfs} \usepackage{tensor} \usepackage{dsfont} \usepackage{graphicx} \usepackage[dvipsnames,table]{xcolor} \usepackage{float} \usepackage[inline]{enumitem} \setlist[enumerate]{label*=\arabic*.} \usepackage[nottoc]{tocbibind} \usepackage{subfig} \captionsetup{margin=1cm,format=hang,font=small,format=plain,labelfont={bf,up},textfont={it}} \captionsetup[subfigure]{margin=0cm,font=small,format=plain,labelfont={bf,up},textfont={up}} \renewcommand{\thefigure}{\arabic{figure}} \captionsetup[table]{name=Table,labelfont={bf,up}} \usepackage{hhline} \usepackage{tabularx} \usepackage[separate-uncertainty=true]{siunitx} \sisetup{output-decimal-marker = {,},group-digits=integer,input-digits=0123456789\pi} \usepackage{icomma} \usepackage{upgreek} \usepackage{cancel} \usepackage[bottom]{footmisc} \usepackage{etoolbox} \usepackage[titles,subfigure]{tocloft} \usepackage{hyperref} \usepackage{mdframed} \usepackage{fancyhdr} \usepackage{empheq} \usepackage[theorems]{tcolorbox} \usepackage{scalerel} \begin{document} \chapter{Title of the first chapter} Text \end{document} And Claude AI gave me the following code, with some reasons why it should be the best way (Oh really?): \documentclass[11pt,twoside]{book} % 1. ENCODING AND FONTS (must come first) \usepackage[T1]{fontenc} \usepackage[nomath]{lmodern} % 2. LANGUAGE AND TYPOGRAPHY \usepackage[english]{babel} % Changed from french to english \usepackage{microtype} \usepackage{icomma} % 3. MATHEMATICS PACKAGES (in dependency order) \usepackage{amsfonts} \usepackage{amsmath} \usepackage{nccmath} % Load after amsmath \usepackage{amssymb} \usepackage{mathtools} % Load after amsmath \usepackage{mathrsfs} \usepackage{tensor} \usepackage{dsfont} \usepackage{upgreek} \usepackage{cancel} \usepackage{scalerel} % 4. GRAPHICS AND COLORS \usepackage{graphicx} \usepackage[dvipsnames,table]{xcolor} % 5. FLOATS AND CAPTIONS \usepackage{float} \usepackage{subfig} % 6. TABLES \usepackage{hhline} \usepackage{tabularx} % 7. UNITS AND MEASUREMENTS \usepackage[separate-uncertainty=true]{siunitx} \sisetup{output-decimal-marker = {.},group-digits=integer,input-digits=0123456789\pi} % Changed to English decimal marker % 8. LISTS \usepackage[inline]{enumitem} \setlist[enumerate]{label*=\arabic*.} % 9. TABLE OF CONTENTS AND BIBLIOGRAPHY \usepackage[nottoc]{tocbibind} \usepackage{etoolbox} \usepackage[titles,subfigure]{tocloft} % 10. HEADERS AND FOOTERS \usepackage{fancyhdr} \usepackage[bottom]{footmisc} % 11. BOXES AND FRAMES \usepackage{mdframed} \usepackage{empheq} \usepackage[theorems]{tcolorbox} % 12. HYPERREF (should be loaded near the end) \usepackage{hyperref} % CAPTION SETTINGS (after loading caption-related packages) \captionsetup{margin=1cm,format=hang,font=small,format=plain,labelfont={bf,up},textfont={it}} \captionsetup[subfigure]{margin=0cm,font=small,format=plain,labelfont={bf,up},textfont={up}} \renewcommand{\thefigure}{\arabic{figure}} \captionsetup[table]{name=Table,labelfont={bf,up}} \begin{document} \chapter{Title of the First Chapter} This is the text content of the chapter. \end{document} I know that Claude AI (as all other AI) often do mistakes, so I don't trust it! What should I think of the code it gave me? Is it really better? Note: I'm not working for Anthropic! It is NOT my intention to make any publicity about Claude AI, but as a new powerful tool that do understand LaTeX, I believe it's a good opportunity to try to build good LaTeX codes with it. EDIT: Oups! I just noticed that I forgot to include the geometry package in there! I usually put it near the beginning, and Claude says it should loaded near the end of the preamble! Is that true?
- Increase the rows height manually and color the cell of the tableby SandyM on June 22, 2025 at 12:20 pm
Ques: I want to increase row height in the table and give the red color to cell with text "No" MWE \documentclass[12pt,a4paper]{article} \usepackage{amsmath} \usepackage{amssymb} \begin{document} \begin{table}[htbp] \centering \begin{tabular}{|c|c|c|} \hline \multicolumn{3}{|c|}{Integers are closed under} \\ \hline Addition & Integer $+$ Integer $=$ Integer & Yes \\ \hline Multiplication & Integer $\times$ Integer $=$ Integer & Yes \\ \hline Subtraction & Integer $-$ Integer $=$ Integer & Yes \\ \hline Division & Integer $\div$ Integer $\neq$ Integer & No \\ \hline \end{tabular} \end{table} \end{document}