Hot
- Create a synchronized bilingual parallel text layout using paracol?by Bhaskar Vashishth on December 18, 2025 at 12:31 am
Problem- Create a synchronized bilingual parallel text layout using paracol where line numbers appear in outer margins, with spanning floats and cross-column references, all while maintaining proper hyphenation of technical terms. My MWE- \documentclass[twocolumn]{article} \usepackage{paracol} \usepackage{fontspec} \usepackage{marginnote} \usepackage{caption} \usepackage{hyperref} \newcounter{lineno} \newcommand{\linenum}{\stepcounter{lineno}\marginpar{\tiny\thelineno}} \setmainfont{Times New Roman} \columnratio{0.5,0.5} \setlength{\columnsep}{2cm} \renewcommand{\thesection}{\Roman{section}} \titleformat{\section}{\large\scshape}{\thesection}{1em}{} \newenvironment{bilingual}[2]{% \begin{paracol}{2} \textbf{#1} \linenum \\ \switchcolumn \textit{#2} \linenum }{% \end{paracol} } \usepackage{float} \floatstyle{boxed} \newfloat{code}{!ht}{loc} \begin{document} \title{Parallel Text Analysis} \author{J. Smith} \date{\today} \maketitle \begin{abstract} This paper analyzes bilingual alignment. \end{abstract} \twocolumn[ \section{Introduction} \begin{bilingual}{English text here with some verylongtechnicaltermthatneedshyphenation.}{Texto en español aquí.} \end{bilingual} \begin{figure*}[t] \centering \rule{0.8\textwidth}{2cm} \caption{Cross-column figure} \label{fig:wide} \end{figure*} \marginpar{Note in margin} % Will appear wrong \switchcolumn* More text in second column without proper environment. \begin{paracol}{2} Left column text. \switchcolumn Right column text. \end{paracol} As shown in Figure \ref{fig:wide}... \label{fig:wide} \cite{smith2023} \hyphenation{very-long-technical-term-that-needs-hyphenation} \ifdraft Draft text here \else Final text here \fi \begin{verbatim} Code here \end{verbatim} This is a sentence.\linebreak Next line. \end{document}
- How to get biblatex-chicago to properly format a book that is only part of a volume of a multivolume editionby stefano on December 17, 2025 at 9:57 pm
I am writing about an author whose complete works have been published in a multivolume edition, each volume containing either collections of previously published books (which may, in turn, be collections of essays), or essays and other short pieces. Most levels (not all) of the hierarchy (multivolume collection, single volumes, single works) have individual editors. I need to have the references list to include the title (in italics when I am referring to a book) and the editor, plus the author name and short title of the complete works, followed by volume number and page range. No combination of mvbook and inBook or bookinbook gets me the desired result. Here is a MWE: \documentclass{article} \usepackage[authordate,backend=biber]{biblatex-chicago} \begin{filecontents*}{\jobname.bib} @MvBook{GaddaOpere1988, author = {Carlo Emilio Gadda}, title = {Opere di Carlo Emilio Gadda}, shorttitle = {Opere}, editor = {Dante Isella}, publisher = {Garzanti}, volumes = {6}, address = {Milano}, langid = {italian}, date = {1988/1993}, } @bookInBook{GaddaAdalgisa1, author = {Carlo Emilio Gadda}, editor = {Giorgio Pinotti}, origdate = {1943}, pages = {283--564}, title = {L'Adalgisa (disegni milanesi)}, volume = {1}, crossref = {GaddaOpere1988}, } @inBook{GaddaAdalgisa2, author = {Carlo Emilio Gadda}, date-added = {2025-11-29 09:52:24 -0600}, editor = {Giorgio Pinotti}, origdate = {1943}, pages = {283--564}, title = {L'Adalgisa (disegni milanesi)}, volume = {1}, crossref = {GaddaOpere1988}} @InBook{Gadda1950Ilfautdabord, author = {Gadda, Carlo Emilio}, pages = {612--622}, title = {Il faut d'abord {\^e}tre coupable (1950)}, volume = {3}, crossref = {GaddaOpere1988}, booktitle = {I viaggi e la morte}, origdate = {1950}, } \end{filecontents*} \addbibresource{\jobname.bib} \begin{document} \nocite{GaddaAdalgisa1, GaddaAdalgisa2, Gadda1950Ilfautdabord, GaddaOpere1988 } \printbibliography \end{document} which gets me this output: The first reference uses @bookinbook and has the title correctly italicized, and lists the editor, BUT interpret the citation as being the entirety of volume 1 of Opere and it has the long reference instead of the short and preferred author, shorttitle, v:range The second ref, a copy of the first using @inBook, has the correct reference for the complete works, minus the short title, but the title is in quot marks and th editor is missing. Brief, the reference format I am aiming for is: Gadda, Carlo Emilio. 1943a. L'Adalgisa (disegni milanesi), edited by Giorgio Pinotti. In Gadda,1988/1943, 1:283-564. Finally, the third one, which is an essay within a book, within a volume of the complete works, omits the title of the book the essay is from. The correct format should be: Gadda, Carlo Emilio. 1950. "Il faut d'abord être coupable." In I viaggi e la morte. In Gadda, 1988/1993, 3: 612-622. I have tried several permutations of book/inbook/bookinbook ref types and title/booktitle/maintitle fields, but I can't get it right. Help is greatly, greatly appreciated.
- Is it possible to use the STY file to set table formats?by jeffbiss on December 17, 2025 at 7:38 pm
First, I find the LaTeX documentation lacking, in this case Tabularray Typeset Tabulars and Arrays with LATEX3. The issue as to whether I could preset certain table formats in a STY file is not covered. I am trying to setup my LaTeX template such that users who are not familiar with LaTeX, such as Word users, will find it easier to use. One thing that I thought that I could do is to preset certain formats in my STY file but I am having no such luck. I used the code, with some extras, shown on page 39 of 222 of Tabularray Typeset Tabulars and Arrays with LATEX3 in my STY file: %test \NewTblrTheme{fancy}{ \SetTblrStyle{firsthead}{bg=acornBlue, fg=white, font=\bfseries} \SetTblrStyle{firstfoot}{fg=blue2} \SetTblrStyle{middlefoot}{\itshape} \SetTblrStyle{caption-tag}{acornBlue} } I used a small code segment from their example in my TEX file (it references the STY file: \usepackage{controls}): \begin{longtblr}[ theme = fancy, caption = {A Table}, entry = {Short Caption}, label = {tblr:test}, note{a} = {It is the first footnote.}, note{$\dag$} = {It is the second footnote.}, remark{Note} = {Some general note}, remark{Source} = {Made up by myself}, ]{ colspec = {XXX}, width = 0.85\linewidth, rowhead = 1, rowfoot = 1, row{odd} = {gray9}, row{even} = {brown9}, row{1} = {acornBlue}, row{Z} = {blue7}, } \hline Head & Head & Head \\ \hline Alpha & Beta & Gamma \\ \hline Phi & Chi & Psi \\ \hline Foot & Foot & Foot \\ \hline \end{longtblr} This produces the following result: I realized that the formatting, cell colors, are overriding that specified in the STY file, so I delete them: \begin{longtblr}[ theme = fancy, caption = {A Table}, entry = {Short Caption}, label = {tblr:test}, note{a} = {It is the first footnote.}, note{$\dag$} = {It is the second footnote.}, remark{Note} = {Some general note}, remark{Source} = {Made up by myself}, ]{ colspec = {XXX}, width = 0.85\linewidth, rowhead = 1, rowfoot = 1, } \hline Head & Head & Head \\ \hline Alpha & Beta & Gamma \\ \hline Phi & Chi & Psi \\ \hline Foot & Foot & Foot \\ \hline \end{longtblr} and recompile from scratch and get the following reult: It appears that the STY file cannot be used to preset certain formats that would then free my users from having to do that for every table that they create. I tried changing \SetTblrStyle{firsthead} to: \SetTblrStyle{rowhead} and SetTblrStyle{row{1}} but got the same result. So, is the STY file supposed to allow me to preset certain table cell formats, such as bg and fg colors, etc.?
- Can't connect to local MySQL server through socket [closed]by Zilore Mumba on December 17, 2025 at 7:05 pm
I have the following error trying to insert into mysql table from a file using perl, as a user. As root this error does not arise. inserting manually works. DBI connect('database=aws_database;host=localhost','root',...) failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) at ./perl_insert.pl line 27. line 27 in my perl script is: my $dbh = DBI->connect($dsn, $database_user, $database_password, { RaiseError => 1, AutoCommit => 0 # Use transactions for better performance and data integrity }) or die "Unable to connect: $DBI::errstr"; I have two "my.cnf" files in "/etc/mysql" and in "/etc/alternatives" both with only the following two uncommented lines: !includedir /etc/mysql/conf.d/ !includedir /etc/mysql/mysql.conf.d/ !includedir /etc/mysql/conf.d has two files with entries indicated by -> mysql.cnf ->[mysql] mysql.cnf -> [mysqldump] quick quote-names max_allowed_packet = 16M !includedir /etc/mysql/mysql.conf.d has: mysqld.cnf -> user = mysql # pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock # port = 3306 # datadir = /var/lib/mysql my.cnf in /var/lib/dpkg/alternatives has entries: auto /etc/mysql/my.cnf /etc/mysql/my.cnf.fallback 100 /etc/mysql/mysql.cnf 200 I am wondering where "/tmp/mysql.sock'" in the error is coming from. This is my first time to install and try to run mysql. i an running on ubuntu 24.04 Please help
- Edit the caption and subcaption of figure in Arabic languageby الطريق طالب العلم on December 17, 2025 at 5:21 pm
I want to control the caption for an image independently and the subtitles for images independently. As shown in the picture, and it supports the Arabic language.
- Circuitikz full list of `\ctikzset` optionsby aulven on December 17, 2025 at 3:56 pm
Where can I find the full list of options for \ctikzset? I couldn't find something like this in the documentation from CTAN, or in the Github repository, and for the life of me I cannot figure a consistent pattern between examples that are in the documentation. For instance if I pick up a line from examples and change it from bipoles to tripoles it sometimes works, sometimes throws and error and sometimes does nothing whatsoever. Or, otherwise, how do people figure out what the syntax for what they want to do is? As an example, the last problem I encountered that lead me to write this is adjusting the font size of transistors. Conveniently the document has the section titled Labels and Annotations under Labels, Voltages and Currents. Here it gives the example for bipoles, \ctikzset{bipole label style/.style={font=\tiny}} Which works as it should, however, it concerns bipoles only. My attempt of modifying it to: \ctikzset{tripole label style/.style={font=\tiny}} does nothing. neither does my other extrapolation attemps like quadpole, multipole, tripole/transistors, multipole/transistors, tripoles/.style, tripoles/transistors/nigfete/.style and so on. None of these do nothing and doesn't give an error either, unlike some other attemps which did give errors at least. At this point, I don't know if I'm missing the correct syntax or whether this feature exists in the first place. This happens to be my last frustration (that I'm yet to solve). However countless times in the past I have searched for similar modifications, it always boils down to finding the magic words for ctikzset and I don't know where to look. MRE \documentclass[8pt, a4paper]{article} \usepackage[american]{circuitikz} \begin{document} \begin{figure*} \begin{circuitikz} \ctikzset{bipole label style/.style={font=\tiny}} %<- From the doc. \ctikzset{tripole label style/.style={font=\tiny}} %<- My guess \draw (0,0) to[R, l=$R$] (2,0); \draw (0,2) node[nigfete]{$Q$}; \end{circuitikz} \end{figure*} \end{document}
- Perfectly center a box in a (beamer) page in one compilationby tobiasBora on December 17, 2025 at 2:48 pm
I'd like to perfectly center a box in a page, but tikz with (current page.center) needs 2 compilations. Since this code is going to be called a lot in a library that aims precisely to improve efficiency, I'd rather optimize this. Any solution that involves only one compilation? \documentclass[beamer]{standalone} \usepackage{tikz} \begin{document} \begin{standaloneframe}% \begin{tikzpicture}[overlay, remember picture] \node[anchor=center, at=(current page.center)]{\fbox{\onslide<2>{My} content}}; \end{tikzpicture} \end{standaloneframe}% \end{document} EDIT So far no solution works for me (either not pixel-perfect, or needs too many compilations), hence I don't think this is a duplicate of the linked question. Here is what I get with @samcarter's solution (fixed since the fbox was added only to the tikz and not to his solution). \documentclass[beamer]{standalone} \usepackage{tikz} \begin{document} \begin{standaloneframe}[s] \vfill \centering\strut \fbox{My content}% \begin{tikzpicture}[overlay, remember picture,red,inner sep=0pt,outer sep=0pt] \draw (current page.south west) -- (current page.north east); \draw (current page.north west) -- (current page.south east); \node[at=(current page.center)]{\fbox{My content}\strut}; \end{tikzpicture}% \vfill \end{standaloneframe} \end{document} This kind of shift is too large for my needs as I need pixel-perfect centering (of the whole box not its baseline). And things get even worse with, e.g., a rule like \fbox{My content \rule{3cm}{3cm}}: \documentclass[beamer]{standalone} \usepackage{tikz} \begin{document} \begin{standaloneframe}[s] \vfill \centering\strut \fbox{My content \rule{3cm}{3cm}}% \begin{tikzpicture}[overlay, remember picture,red,inner sep=0pt,outer sep=0pt] \draw (current page.south west) -- (current page.north east); \draw (current page.north west) -- (current page.south east); \node[at=(current page.center)]{\fbox{My content \rule{3cm}{3cm}}\strut}; \end{tikzpicture}% \vfill \end{standaloneframe} \end{document}
- Immediate write: write percent or skip newlineby tobiasBora on December 17, 2025 at 2:44 pm
How can I either write the percent (%) character when writing to a file via \immediate\write? I tried \% but it actually prints \%. I managed to get it work with latex3, but curious about non-latex3 versions as well since latex3 code can't be written inside tikz pictures, forcing me to define macros… \documentclass{article} \usepackage{verbatim} \begin{document} \newwrite\mywrite% \immediate\openout\mywrite=foo.tex% \immediate\write\mywrite{I want to write a percent at the end of this line: \%} % This works but I'd rather avoid relying on latex3 here \ExplSyntaxOn \immediate\write\mywrite{I~can~do~it~with~latex3~but~I'd~like~to~avoid~it~here\c_percent_str} \show\c_percent_str \ExplSyntaxOff \immediate\closeout\mywrite The text is: \verbatiminput{foo.tex} \end{document}
- Footnote numbering and `breakable` option in tcolorboxesby clueless on December 17, 2025 at 1:28 pm
Footnotes within tcolorbox followof different numbering scheme that those in regular text. How can I make them uniformly numbered? \documentclass[notitlepage,a4paper]{book} \usepackage{keytheorems} \usepackage{tcolorbox} \tcbuselibrary{breakable} \usepackage{footnote} \BeforeBeginEnvironment{tcolorbox}{\savenotes} \AfterEndEnvironment{tcolorbox}{\spewnotes} \newkeytheoremstyle{my} { noteseparator={: }, notebraces={}{}, notefont=\bfseries, headpunct={}, bodyfont=\normalfont, } \newkeytheorem{theorem}[style=my,tcolorbox={breakable},name=Thm] \begin{document} \begin{theorem} text\footnote{fotnote within tcolorbox} with footnote. \end{theorem} text out of the box\footnote{fotnote out of tcolorbox} \end{document}
- supra/infra reference using \label and zref-cleverby matteofg on December 17, 2025 at 9:56 am
Starting with version v0.4.0 (2023-06-14), zref-clever makes use of the kernel’s new label hook, so that \label can be used instead of \zlabel. See the following mwe taken from the issue supra/infra reference using zlabel (this solution was provided - thanks to @gusbrs - before the v0.4.0 release). \documentclass{article} \usepackage{zref-clever} \usepackage{hyperref} % From https://tex.stackexchange.com/a/670745/105447 \newcounter{labelcount} \AddToHook{cmd/zlabel/before}{\stepcounter{labelcount}} \makeatletter \ExplSyntaxOn \zref@newprop{labelcount}{\arabic{labelcount}} \zref@addprop{main}{labelcount} \cs_new:Npn \matteo_supinf:n #1 { % \zcref can take multiple labels as argument, but this whole idea % presumes only one is being given, so at least we don't typeset % supra/infra if there are more labels. \int_compare:nNnF { \clist_count:n {#1} } > { 1 } { \int_compare:nNnTF { \arabic{labelcount} } < { \zref@extractdefault {#1} {labelcount} {0} } { \emph{infra},~ } { \emph{supra},~ } } } \cs_new_protected:Npn \matteo_rzcref:nnn #1#2 { \matteo_supinf:n{#2} \zcref[ref=page, abbrev, #1]{#2} } \NewDocumentCommand{\rzcref}{ O{} m }{ \matteo_rzcref:nnn {#1} {#2} } \ExplSyntaxOff \makeatother \begin{document} \section{First Section (sec1)}\zlabel{sec1} \section{Second Section} \verb|\rzcref{sec1}| \rzcref{sec1} \par\noindent \verb|\rzcref{sec3}| \rzcref{sec3} \section{Third Section (sec3)}\zlabel{sec3} \end{document} Now I would like to understand how to modify the counter comparison mechanism in my MWE, so that I can use both \label and \zlabel, as in the current version of zref-clever.
- pgfplots: 3D Line Plot with Multiple x Axesby Dr. Manuel Kuehner on December 17, 2025 at 9:25 am
Happy Xmas all together. This question is about pgfplots, specifically about plotting line plots ins 3D. Ideally, I woudl have three x axes labelled x_1, x_2 and x_3, one y axis and one z axis (called F for force). I managned to ge the belwo MWE but from there, I am stuck (did not try ChatGPT yet!). I attached two hand drawings to show the desired outcome. It is ok to fake the three x axes as long there is a easy to understand logic / syntax. Remark: In my real world example, the y axis is reversed but I did not want to overcomplicate the question. (typo: y = -15 should say y = +15 and vice versa) \documentclass{article} \usepackage{pgfplots} \pgfplotsset{ width = \textwidth, compat = 1.18, } \begin{document} \begin{tikzpicture} \begin{axis}[ view = {60}{30}, title = {MWE}, xlabel = {$x$}, ylabel = {$y$}, zlabel = {$F$}, xmin = -30, xmax = 30, ymin = -30, ymax = 30, zmin = -100, % F zmax = 100, grid = major, axis lines = center, ] % Plots \addplot3 [ red, domain = -30:30, % for x I assume samples = 100, samples y = 1, % not sure what this does ](5,x,x^2); \end{axis} \end{tikzpicture} \end{document}
- Is it possible to test if a float is at the top of a page?by Denis Bitouzé on December 17, 2025 at 7:30 am
Is it possible to test if a float is at (say) the top of a page? The use case is the following: for a class I'm working on, the floating figures (are customized thanks to a floatrow style in order to) have (their captions in the left margin and) horizontal lines just above and below them and I'd like to remove e.g. the top lines of the figures that happen to be at the top of the pages (especially because there is already an horizontal line at the top of each page that separates the header and the text). Here is a MCE: \documentclass{article} \usepackage{floatrow} \usepackage{mwe} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhead[L]{I'm a header} \DeclareMarginSet{hangleft}{% \setfloatmargins{\hskip-3cm}{\hfil}% } \DeclareFloatVCode{ruleabove}{% \par\rule{\hsize}{.8pt}\vskip4pt\par% } \DeclareFloatVCode{rulebelow}{% \par\vskip2pt\rule{\hsize}{.8pt}\par% } \DeclareFloatStyle{ruled}{ rowprecode=ruleabove, rowpostcode=rulebelow, } \floatsetup{objectset=justified} \floatsetup[figure]{ style=ruled, margins=hangleft, capposition=beside, capbesideposition={top,left}, floatwidth=0.85\textwidth } \begin{document} \lipsum[1-5] \begin{figure}[ht] \includegraphics[width=\linewidth]{example-image} \caption{A very very very very very very very very very very very very very very very very very very very very very long caption} \end{figure} \lipsum[1-5] \end{document}
- Why \verb| test } | fail in section header with the use of cprotect?by Nasser on December 17, 2025 at 3:54 am
I am processing 1000's of input where section title can contain random text. Hence I am using this set up \cprotect\section{\verb| the title read from file|} And the above works for any title (which do not ofcourse already have | in it). But why does it fail for this title below which do not have | in it? \documentclass[12pt]{article}% \usepackage{cprotect} \begin{document} %%%%%%%%%%%%%%%%%%%%% \cprotect\section{\verb|Adding footnote to the table leads to the error: ! Extra } |} text \end{document} Compiling with lualatex gives >lualatex A.tex This is LuaHBTeX, Version 1.24.0 (TeX Live 2026/dev) restricted system commands enabled. (./A.tex LaTeX2e <2025-11-01> L3 programming layer <2025-11-06> (/usr/local/texlive/2025/texmf-dist/tex/latex/base/article.cls Document Class: article 2025/01/22 v1.4n Standard LaTeX document class (/usr/local/texlive/2025/texmf-dist/tex/latex/base/size12.clo)) (/usr/local/texlive/2025/texmf-dist/tex/latex/cprotect/cprotect.sty (/usr/local/texlive/2025/texmf-dist/tex/latex/base/ifthen.sty) (/usr/local/texlive/2025/texmf-dist/tex/latex/bigfoot/suffix.sty)) (/usr/local/texlive/2025/texmf-dist/tex/latex/l3backend/l3backend-luatex.def) (./A.aux) (./A-1.cpt ! LaTeX Error: \verb ended by end of line. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.1 ...he table leads to the error: ! Extra ^^E^^L ? It is because } inside the title. But I thought \verb| ....| means I can put anything inside it? Note that in body of text \verb|Adding footnote to the table leads to the error: ! Extra } | works and there is no error. It is only in the section title. It is easy for me to workaround this, I just add extra check in the program that the title read do not have { or } in it and remove these for now, like it does for |. I was just wondering why } can not be inside \verb when in section. It seems the parser of the section title looked at the first } inside the the closing for the section itself and not part of the inner title. TL 2025
- How much can I trust verapdf?by user2609605 on December 17, 2025 at 1:54 am
I found some hints that PDF/A and PDF/UA are not completely verifyable automatically. So how much can i trust verapdf? I suppose if verification fails, i can trust but if it passes... Are there examples where the judgement of verapdf is definitively wrong? By the way, there is no tag PDF/UA, only PDF/A.
- Unexpected behavior in luatexbase.add_to_callbackby rallg on December 16, 2025 at 8:02 pm
Using TeXlive 2025/Linux, up-to-date: I expect that when I use luatexbase.add_to_callback then whatever is already in the callback should remain in effect, with my own code added. But apparently that is not the case. I have tried tweaking the callback by adding a priority number (values tried: -1000, 0, 1, 2, 1000) but no obvious difference. In this MWE, the undefined \dingle command throws an error, and the Terminal correctly informs me that the name of the undefined command is \dingle. But if I uncomment the callback, the error fails to show me the command name. Why is that? I expect that it should show the command name as usual, then perform my added function. In actual usage, I have an external *.lua file, but that makes no difference. \documentclass{article} % Compile only with lualatex. \directlua{% to see difference, uncomment the following line: % luatexbase.add_to_callback('show_error_hook', function() texio.write_nl('BOO HOO') end, 'boo_hoo') } \begin{document} Hello, World.\par % Next command is undefined, throws error: \dingle \end{document} EDIT: My above MWE was "too minimal". It illustrated my question, but was not a situation that appears in practice. The following MWE shows what I am doing, greatly simplified. Trick: The correct callback is to show_error_message, not show_error_hook, even if the callback is not itself a message. [although David's answer, accepted below, shows that this was not necessary]. Part of the Terminal message will be replaced, but the important stuff will show. Perhaps this could be further improved by modifying how \GenericError treats this, but I am trying to keep this simple. There is also a callback, show_warning_message that may be useful, and hpack_quality for overfull lines. These were mentioned in other tex.SE posts from years ago; I stand on the shoulders of giants. In many cases, a LaTeX error has consequences that throw more errors, so that no PDF is produced. But there are some errors that can be ignored by the compiler (at your request), and the resulting PDF is good. However, although it is a good PDF, something about its content is not what you intended to do. You must either remove the erroneous code, or fix it, so that the resulting PDF is exactly what you mean. Why this is important: In my workflow, the PDF is sent to a human editor with no knowledgeof TeX. The editor reviews the PDF for content, just like in the good old days of typewriters. The PDF with highlights and annotations is sent back to the writer. This may happen several times. It wastes the editor's time, if the content of the PDF was not exactly what the writer intended, because that may add another cycle to the writer-editor-writer flow. So, in this MWE, a LaTeX error will change the Producer string, which can be seen in any PDF reader. The editor will first look there, and refuse to edit it when the Producer string is BAD RESULT. This is also useful to the writer, if the PDF is produced by a method that automatically continues past errors. Caution: This method may be too simple for documents using more advanced methods for writing metadata. But that is not the question. \documentclass{article} % Compile only with lualatex. \directlua{% badstuff = false function boohoo () badstuff = true ; texio.write_nl('! Bad code shown below') end luatexbase.add_to_callback('show_error_message', boohoo, 'boo_hoo') } \AtEndDocument{% \def\goodresult{1}% \directlua{% if badstuff == true then tex.sprint('\\def\\goodresult{0}') end }% \ifnum\goodresult=0\relax% \pdfextension info{/Producer (BAD RESULT)}% \fi }% \begin{document} Hello, World.\par % Next command is undefined, throws error: \dingle \end{document}
- Problem with "Float(s) lost" error using a custom environmentby Sebastiano on December 16, 2025 at 7:51 pm
From my previous question One colored structure combining amsart, amsthm, mdframed and thmtools I'm trying to use a custom environment called ris (or que) in my document, but when I include a figure environment inside it, I get the error: LaTeX Error: Float(s) lost. Here is my fragment-example code: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{ris} Lipsum \begin{figure}[h] \centering \includegraphics[scale=0.2]{example-image-b} \caption{Graphs of some $f_n$} \end{figure} \end{ris} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% When I place the figure outside the custom environment, the code compiles fine. However, I would like to understand how to fix this error without adding any extra packages. Does anyone know how to solve this? Here the minimal working example: \documentclass[12pt,a4paper]{amsart} \usepackage{mathtools} \usepackage{amssymb} \usepackage{subcaption} \captionsetup[subfigure]{labelfont=rm} \usepackage{graphicx} \usepackage[svgnames]{xcolor} \usepackage{mdframed} \usepackage{thmtools} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % BOX %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newmdenv[ skipabove=7pt, skipbelow=7pt, rightline=false, leftline=true, topline=false, bottomline=false, linecolor=Green, backgroundcolor=Green!10, innerleftmargin=5pt, innerrightmargin=5pt, innertopmargin=2pt, innerbottommargin=5pt, leftmargin=0cm, rightmargin=0cm, linewidth=2.5pt, fontcolor=Green ]{rBox} \newmdenv[ skipabove=7pt, skipbelow=7pt, rightline=false, leftline=true, topline=false, bottomline=false, linecolor=Blue, backgroundcolor=Blue!10, innerleftmargin=5pt, innerrightmargin=5pt, innertopmargin=2pt, innerbottommargin=5pt, leftmargin=0cm, rightmargin=0cm, linewidth=2.5pt, fontcolor=Blue ]{bBox} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % UPRIGHT (ROMAN) ONLY FOR QUE E RIS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \theoremstyle{definition} \declaretheoremstyle[ headfont=\normalfont\sc, bodyfont=\normalfont, notefont=\normalfont, headpunct={.} ]{col} \declaretheorem[name=Quesito,style=col]{queT} \declaretheorem[name=Risposta,style=col]{risT} \newenvironment{que}{\begin{rBox}\begin{queT}}{\end{queT}\end{rBox}} \newenvironment{ris}{\begin{bBox}\begin{risT}}{\end{risT}\end{bBox}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % OTHER THEOREM IN EMPH (plain) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \theoremstyle{plain} \newtheorem{teor}{\sc Teorema} \newtheorem{cor}{\sc Corollario} \newtheorem*{lemma}{\sc Lemma} \newtheorem{defin}{\sc Definizione} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % REMARK STYLE (upright) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \theoremstyle{remark} \newtheorem{oss}{\sc Osservazione} \newtheorem{Es}{\sc Esercizio} \newtheorem{Dm}[Es]{\sc Domanda} \newtheorem{esp}[Es]{\sc Esempio} \newtheorem{Prob}[Es]{\sc Problema} \begin{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{ris} Lipsum \begin{figure}[h] \centering \includegraphics[scale=0.2]{example-image-b} \caption{Grafici di alcune $f_n$} \end{figure} \end{ris} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \end{document}
- unicode-math or lua-unicode-math?by Svend Tveskæg on December 16, 2025 at 5:02 pm
I just noticed the lua-unicode-math package. Question I compile all my .tex documents using lualatex and therefore my question is as follows: What are the main differences between lua-unicode-math and unicode-math and when should I use which package?
- How can I code confidence intervals (linear regression) from Jamovi into latexby Paulina Puczek on December 16, 2025 at 1:44 pm
That is my plot from jamovi: and here it is in LaTeX: I want to add those confidence intervals to LaTeX. How do I do it? Here is code: \begin{figure}[H] \noindent {\textbf{Rysunek 6} \\ \textit{Regresja liniowa}} \\ \newline \begin{center} \begin{tikzpicture} \begin{axis}[ width=0.6\textwidth, height=0.5\textwidth, xlabel={Narcyzm grupowy}, ylabel={Religijność indywidualna}, axis x line=bottom, axis y line=left, xmin=-2, xmax=4, ymin=1.5, ymax=6, xtick={-1,0,1,2,3}, ytick={2,3,4,5}, tick label style={font=\small}, label style={font=\small}, legend style={font=\small,draw=none, at={(0.88,0.16)}, anchor=south}, every axis plot/.append style={thick}, ] % Linia: brak autoafirmacji (grupa = 0) \addplot[ blue, ] table { x y -1.5 2.1215 -1 2.385 0 2.912 1 3.439 2 3.966 3 4.493 3.5 4.7565 }; \addlegendentry{kontrolna} % Linia: autoafirmacja (grupa = 1) \addplot[ red, ] table { x y -1.5 1.655 -1 2.017 0 2.741 1 3.465 2 4.189 3 4.913 3.5 5.275 }; \addlegendentry{eksperymentalna} \end{axis} \end{tikzpicture} \end{center} \begin{tablenotes} \small \item {\textit{Adnotacja:} Interakcja (Autoafirmacja × Narcyzm grupowy) dla zmiennej zależnej (Religijność indywidualna).} \end{tablenotes} \end{figure}
- Two identical Overleaf projects produce a different PDF, one with figures at the very end [duplicate]by Daniel P on December 16, 2025 at 1:10 pm
I am working on an Overleaf LaTeX project that I want to upload to two different places, with slight adjustments. Naturally, I copied the original project into a new project, and pressed Recompile. To my surprise, the copied project produced a different PDF that the original project. It placed all figures at the very end of the document, even though in the original document, I had them placed in relevant spots throughout the paper. Additional information: It is an Elsevier style document. All figures are wrapped in \begin{figure} ... \end{figure}, and either [h], [h!] or [ht] placement modifiers are used. All figures specify the extension, e.g. figurename.png. No figures are too larger than 1.0\textwidth. I have even tried to make them at most 0.9\textwidth, but that didn't solve the issue. I have the following packages: natbib, float, algorithm, algpseudocode, physics, scalerel, amssymb, xcolor, caption, multirow, flafter, url. I believe this to be an Overleaf bug, not a LaTeX bug, for the following reasons: The original project displayed the figures in the correct spots. Overleaf recently received a major update, which may have introduced a bug in its copying or compiling behavior. Alternatively, the way Overleaf handles packages after the update may have caused the issue. The page counting is also messed up. In the original project, it is working correctly, it goes from Page 1/29 to 29/29; however, in the copied project, it goes from 1/29 to 36/29; with pages 30-36 containing all figures one after another. However I have also started a completely new project, copy and pasted the LaTeX source with Ctrl+C Ctrl+V, added the style file from the Elsevier website, and reuploaded the images to it, and after compiling, Overleaf also placed all figures at the very end with the incorrect page numbering. So that may suggest that there is a compile error or package error, since the "Copy Project" functionality wasn't used in this case. How do I make sure the copied file behaves the same way as the original? How do I make sure it places the figures in their original spot? Cross-posted to: https://stackoverflow.com/questions/79848562/two-identical-overleaf-projects-produce-a-different-pdf-one-with-figures-at-the
- Native digits in babel without maparabic/mapdigitsby Niranjan on December 16, 2025 at 11:10 am
I am just a small feature away from a release, but badly stuck with a babel conversion problem. I want to get the native digits of the "main" language wherever TeX provides numbers. For independent reasons I can't use maparabic or mapdigits. My experiments with them have failed several times. The current approach seems to be working working fine. I renew the respective \thexxxx commands with a babel command for printing the number. But this doesn't work well with the commands that write to aux/toc files, because while writing the number to a file, it is already converted in active language and then it is only printed in the font of the main language if coded to do so (in the following example, the .toc file contains 1 and it is printed in Marathi's font. I need १ there.). The only way I could think of for changing this was to \protect the \localeconter command which partially works as it produces the section numbers in the correct script, but then the table of contents is completely wrong. Consider the following example: \documentclass{article} \usepackage{babel} \babelprovide[main,import,onchar={ids fonts}]{marathi} \babelprovide[import,onchar={ids fonts letters}]{english} \babelfont{rm}[Color=red,BoldFont=Mukta-Bold.ttf]{Mukta-Light.ttf} \babelfont{sf}[Color=red,BoldFont=Mukta-Bold.ttf]{Mukta-Regular.ttf} \babelfont{tt}[Color=red,BoldFont=Mukta-Bold.ttf]{Mukta-Regular.ttf} \babelfont[english]{rm}[Color=blue]{NewCM10-Book.otf} \babelfont[english]{sf}[Color=blue]{NewCMSans10-Book.otf} \babelfont[english]{tt}[Color=blue]{NewCMMono10-Book.otf} \AtBeginDocument{% \edef\mainlanguage{\languagename}% } \def\thesection{% \foreignlanguage{\mainlanguage}{% \protect\localecounter{digits}{section}% }% } \def\thepage{% \foreignlanguage{\mainlanguage}{% \protect\localecounter{digits}{page}% }% } \begin{document} \tableofcontents \selectlanguage{english} \section{foo} \newpage \section{foo} \newpage \section{foo} \end{document} It produces a document with correct section numbers, but wrong table of contents. Is there any way out of this?
- Defining an option key for TColorboxby Jesco on December 16, 2025 at 10:41 am
I would like to add an option key "points" to my custom tcolorbox aufgabe (so you use points=n, where n is a number, that acts as if I had added the option after title app={\hfill n Punkt(e}, where Punkt(e) depends on n (so without an e for 1). Concretely: My current aufgabe definition \renewcommand{\theaufgabe}{\arabic{aufgabe}} \refstepcounter{aufgabe} \newtcolorbox{aufgabe}[1][]{% before title={Aufgabe \theaufgabe \ (}, after title={)}, coltitle=black, colback=\typecolor!10, colframe=\typecolor, fonttitle=\bfseries, before upper={\refstepcounter{aufgabe}}, segmentation style={draw=\typecolor, line width=2pt}, #1 } Intended usage \begin{aufgabe}[title=some title, points=6] some task \end{aufgabe} should act like \begin{aufgabe}[title=some title, after title app={\hfill 6 Punkte}] some task \end{aufgabe} Edit: Fair point by @samcarter. This is a minimum example of what I would like: \documentclass[a4paper, 12pt]{article} \usepackage[many]{tcolorbox} \newcounter{aufgabe}[section] \renewcommand{\theaufgabe}{\arabic{aufgabe}} \refstepcounter{aufgabe} \newtcolorbox{aufgabe}[1][]{% before title={Aufgabe \theaufgabe \ (}, after title={)}, coltitle=black, fonttitle=\bfseries, before upper={\refstepcounter{aufgabe}}, #1 } \begin{document} \begin{aufgabe}[title=title, after title app={\hfill 6 Punkte}] some task \end{aufgabe} \end{document}
- \LibertinusInitials no longer recognized using old preamble?by Gary on December 16, 2025 at 5:06 am
I'm probably doing something very stupid but ... I worked with LaTeX in Kile a little over a year ago for several months and then got involved in other projects and haven't touched the old files in awhile. Most of them rebuild the documents without any issue, except for one that uses the LibertinusSerifInitials to make a dropcap using the outlined letter. Because I wanted to add some extra space between words, I defined the fonts as follows: \usepackage[T1]{fontenc} \usepackage{libertinus-type1} \newcommand{\wspc}{1.4} \DeclareFontFamily{T1}{LibertinusSerif-LF}{} \DeclareFontShape{T1}{LibertinusSerif-LF}{m}{n}{<-> LibertinusSerif-Regular-lf-t1.tfm}{ \fontdimen2\font=\wspc\fontdimen2\font } \DeclareFontShape{T1}{LibertinusSerif-LF}{m}{it}{<-> LibertinusSerif-Italic-lf-t1.tfm}{ \fontdimen2\font=\wspc\fontdimen2\font } and repeated it for each font style needed. However, there was nothing specific added for the Initials style; and I used it to start the first paragaph of a chapter as: \lettrine[lines=3,lhang=0.25,loversize=0.01,lraise=0.03,findent=-5pt,nindent=2pt,slope=0pt]{\LibertinusInitials{J}}{EREMIAH} But, now, when I open Kile and it automatically rebuilds the document, it errors with "undefined control sequence {\LibertinusInitials}...". My question is, Did something change since around July 2024 in this respect? I don't see an Initials style in the folder texmf-dist/fonts/tfm/public; but do see it in texmf-dist/fonts/opentype/public but haven't been able to get it to work again. I tried adding OT1 to the usepackage commannds but it still doesn't recognize \LibertinusIntitials. Would you please point me to where I might learn how to fix this? Thank you.
- reledmac: Column separator for multi-column familiar footnotesby Jeff Dodson on December 16, 2025 at 4:41 am
Question: Is there a reledmac command to display a vertical rule between columns when using multi-column familiar footnotes? I can see that the related reledpar package allows you to set up columns (in your main text) that are separated by a column rule. But I don't understand if that can somehow be applied to a multi-column familiar footnote block. Maybe I'm missing it, but I didn't see anything about this in the reledmac docs, here, or elsewhere online about this. Here's a MWE that does not show a vertical rule separating the two columns in the footnotes. How would I show a vertical bar there? % !TEX program = XeLaTeX \documentclass[11pt]{book} \usepackage[nocritical,noend,noledgroup,noeledsec,series={A}]{reledmac} \arrangementX[A]{twocol} \hsizetwocolX[A]{0.485\hsize} \widthX{\columnwidth} \colalignX[A]{\RaggedRight} \hangindentX[A]{0.6em} \begin{document} This\footnoteA{Footnote 1} is\footnoteA{Footnote 2} some\footnoteA{Footnote 3} text\footnoteA{Footnote 4} that\footnoteA{Footnote 5} will\footnoteA{Footnote 6} have\footnoteA{Footnote 7} familiar\footnoteA{Footnote 8} footnotes.\footnoteA{Footnote 9} \end{document} I'd like the line to be in between the two columns, kind of like what is shown below by the red vertical line (I don't need the line to be red, I just drew it in red to demonstrate where I'd like it positioned):
- Can i make a wedding card in latex using hindi and sanskrit language with decorations?by Bhaskar Vashishth on December 16, 2025 at 4:27 am
I created one in english. But I don't know how can I put hindi fonts or sanskrit in it. here is what I created. and added some pictures of hindu gods and goddesses on other pages. I used the following code to generate my wedding card. \documentclass[12pt]{article} \usepackage[a4paper, margin=0.5in]{geometry} \usepackage{tikz} \usetikzlibrary{patterns, decorations.pathmorphing,decorations.markings, shapes, shadows, fadings, positioning} \usepackage{palatino} \usepackage{pifont} \usepackage{xcolor} \usepackage{graphicx} \usepackage{multicol} \usepackage{array} \usepackage{setspace} % Define colors \definecolor{gold}{RGB}{212,175,55} \definecolor{maroon}{RGB}{128,0,0} \definecolor{rose}{RGB}{255,228,225} \definecolor{leafgreen}{RGB}{34,139,34} \definecolor{cream}{RGB}{255,253,208} \definecolor{saffron}{RGB}{255,153,51} \definecolor{holyred}{RGB}{178,34,34} \begin{document} % Page 1 - Main Invitation \thispagestyle{empty} % Background with subtle pattern \begin{tikzpicture}[remember picture, overlay] % Main background gradient \fill[top color=cream, bottom color=rose!30] (current page.south west) rectangle (current page.north east); \end{tikzpicture} % Central decorative elements \begin{tikzpicture}[remember picture, overlay] % Mandala design \begin{scope}[shift={(10.5,14)}, rotate=45] \draw[gold, line width=2pt, opacity=0.7] (0,0) circle (3); \draw[gold, line width=1pt, opacity=0.5] (0,0) circle (4); \foreach \i in {0,45,...,315} { \draw[gold, line width=1pt, rotate=\i] (3,0) -- (4,0); \node[scale=1.5, color=maroon, rotate=\i] at (3.5,0) {\ding{62}}; } \end{scope} % Swirling vines \begin{scope}[shift={(5,8)}] \draw[leafgreen, line width=3pt, opacity=0.6, decoration={coil, aspect=0}, decorate] (0,0) .. controls (2,3) and (4,2) .. (6,4); \node[color=gold] at (2.5,1.5) {\ding{80}}; \node[color=gold] at (4.5,3.5) {\ding{80}}; \end{scope} \begin{scope}[shift={(15,20)}] \draw[leafgreen, line width=3pt, opacity=0.6, decoration={coil, aspect=0}, decorate] (0,0) .. controls (-2,-3) and (-4,-2) .. (-6,-4); \node[color=gold] at (-2.5,-1.5) {\ding{80}}; \node[color=gold] at (-4.5,-3.5) {\ding{80}}; \end{scope} \end{tikzpicture} \begin{center} \vspace*{2cm} % Main Title \begin{tikzpicture} % Decorative header \node[maroon, scale=3] at (0,1.5) {\ding{118}}; \node[maroon, scale=3] at (0,-1.5) {\ding{119}}; % Wedding text with shadow effect \node[font=\fontsize{50}{60}\bfseries\selectfont, color=maroon, text depth=0.2ex] at (0,0) {Wedding}; \node[font=\fontsize{50}{60}\bfseries\selectfont, color=gold, opacity=0.3, text depth=0.2ex, xshift=2pt, yshift=-2pt] at (0,0) {Wedding}; % Hearts around wedding \foreach \angle/\dist in {0/2.5, 45/2.3, 90/2.5, 135/2.3, 180/2.5, 225/2.3, 270/2.5, 315/2.3} { \node[scale=2, color=gold, rotate=\angle] at (\angle:\dist) {\ding{170}}; } \end{tikzpicture} \vspace{2cm} % Couple's Names \begin{tikzpicture} \node[font=\fontsize{40}{48}\bfseries\selectfont, color=maroon, text width=15cm, align=center] at (0,0) {Bhaskar Vashishth}; \node[font=\fontsize{25}{30}\selectfont, color=gold] at (0,-1.2) {\textit{weds}}; \node[font=\fontsize{40}{48}\bfseries\selectfont, color=maroon, text width=15cm, align=center] at (0,-2.5) {Bharti Sharma}; % Connecting hearts \node[scale=3, color=gold] at (-4,-1.2) {\ding{170}}; \node[scale=3, color=gold] at (4,-1.2) {\ding{170}}; \end{tikzpicture} \vspace{2.5cm} % Wedding details in decorative box \begin{tikzpicture} \draw[gold, line width=3pt, rounded corners=15pt, fill=rose, fill opacity=0.3] (-8,-2) rectangle (8,2); \draw[gold, line width=1pt, rounded corners=15pt] (-7.8,-1.8) rectangle (7.8,1.8); \node[font=\LARGE\bfseries, color=maroon, text width=14cm, align=center] at (0,0.7) {Together with their families}; \node[font=\Large, color=maroon] at (0,0) {Request the pleasure of your company}; \node[font=\LARGE\bfseries, color=maroon] at (0,-0.8) {On their wedding ceremony}; \vspace{1cm} % Date and venue \begin{scope}[shift={(0,-2.5)}] \draw[gold, line width=2pt, rounded corners=10pt, fill=cream, fill opacity=0.5] (-7,-1) rectangle (7,1); \node[font=\Large\bfseries, color=maroon] at (0,0.3) {\ding{116} Date: \underline{DD Month, 2026} \ding{117}}; \node[font=\Large\bfseries, color=maroon] at (0,-0.3) {\ding{116} Venue: \underline{Ajmer} \ding{117}}; \end{scope} \end{tikzpicture} \vspace{1.5cm} % Bottom decorative elements \begin{tikzpicture} % Peacock feathers (traditional Indian motif) \foreach \x in {-3,0,3} { \begin{scope}[shift={(\x,0)}, scale=0.8] \draw[gold, line width=1pt] (0,0) -- (0,1.5); \foreach \y in {0.3,0.6,0.9,1.2,1.5} { \draw[gold, line width=1pt] (-0.5,\y) .. controls (-0.2,\y+0.2) and (0.2,\y+0.2) .. (0.5,\y); } \node[scale=1.5, color=maroon] at (0,1.8) {\ding{115}}; \end{scope} } % Blessing text \node[font=\large, color=maroon, text width=15cm, align=center] at (0,-2) {``May your love blossom and grow with each passing year''}; \node[font=\large, color=gold] at (0,-2.8) {\ding{43}\quad Your Blessings are Requested \quad\ding{43}}; \end{tikzpicture} \end{center} \begin{figure} \centering % Centers the image \includegraphics[width=0.4\textwidth]{saraswati.png} \end{figure} \begin{center} \begin{tikzpicture} % RSVP details at bottom \draw[maroon, line width=1pt, dashed] (-8,0) -- (8,0); \node[font=\normalsize\bfseries, color=maroon, text width=16cm, align=center] at (0,-0.5) {For RSVP and Details: Contact +91 7355831744 \quad|\quad abelianbhaskar@gmail.com}; \node[font=\small, color=gold] at (0,-1.2) {\ding{72} Dress Code: Traditional Attire \ding{72}}; \end{tikzpicture} \end{center} \newpage % Page 2 - Blessings Page \thispagestyle{empty} % Background for blessings page \begin{tikzpicture}[remember picture, overlay] \fill[top color=rose!20, bottom color=cream] (current page.south west) rectangle (current page.north east); % Decorative border corners \node[rotate=0, scale=1.2, color=gold] at (0.5,0.5) {\Huge\ding{64}}; \node[rotate=90, scale=1.2, color=gold] at (20,0.5) {\Huge\ding{64}}; \node[rotate=180, scale=1.2, color=gold] at (20,27) {\Huge\ding{64}}; \node[rotate=270, scale=1.2, color=gold] at (0.5,27) {\Huge\ding{64}}; % Floral border \foreach \x in {1,2,...,19} { \node[scale=0.6, color=gold] at (\x,0.4) {\ding{108}}; \node[scale=0.6, color=gold] at (\x,29.7) {\ding{108}}; } \end{tikzpicture} \begin{center} \vspace*{2cm} % Title for blessings page \begin{tikzpicture} \node[font=\fontsize{45}{54}\bfseries\selectfont, color=maroon] at (0,0) {Blessings}; \node[scale=2.5, color=gold] at (-3.5,0) {\ding{118}}; \node[scale=2.5, color=gold] at (3.5,0) {\ding{119}}; \end{tikzpicture} \vspace{1.5cm} % Divine blessings text \begin{tikzpicture} \draw[gold, line width=2pt, rounded corners=10pt, fill=cream, fill opacity=0.7] (-9,-1) rectangle (9,1); \node[font=\Large, color=maroon, text width=16cm, align=center] at (0,0) {With heartfelt gratitude, we seek your divine blessings for our journey ahead}; \end{tikzpicture} \vspace{2cm} % Blessings in columns \begin{multicols}{2} \centering % Column 1 - Blessings \begin{tikzpicture} \draw[gold, line width=2pt, rounded corners=10pt, fill=rose!30] (-4.5,-5) rectangle (4.5,0.5); \node[font=\normalsize, color=maroon, text width=7.5cm, align=left] at (0,-1.5) {\ding{43} Eternal love and companionship\\ \ding{43} A home filled with laughter and joy\\ \ding{43} Good health and prosperity\\ \ding{43} Wisdom in all decisions\\ \ding{43} Strength during challenging times\\ \ding{43} Patience and understanding\\ \ding{43} Success in all endeavors\\ \ding{43} Beautiful memories together}; \end{tikzpicture} \columnbreak % Column 2 - More Blessings \begin{tikzpicture} \draw[gold, line width=2pt, rounded corners=10pt, fill=cream!70] (-4.5,-5) rectangle (4.5,0.5); \node[font=\normalsize, color=maroon, text width=7.5cm, align=left] at (0,-1.5) {\ding{43} A sanctuary of peace\\ \ding{43} A partnership of equals\\ \ding{43} A journey of growth\\ \ding{43} A bond that strengthens daily\\ \ding{43} A source of inspiration\\ \ding{43} A celebration of unity\\ \ding{43} A testament to commitment\\ \ding{43} A beautiful love story}; \end{tikzpicture} \end{multicols} \vspace{1.5cm} % Additional blessings section \begin{tikzpicture} \node[font=\LARGE\bfseries, color=maroon, text width=16cm, align=center] at (0,0) {Wishes for Your Journey Together}; \end{tikzpicture} \vspace{0.8cm} % Wishes in a decorative frame \begin{tikzpicture} \draw[gold, line width=3pt, rounded corners=15pt, fill=maroon!5] (-10,-2.5) rectangle (10,2.5); \draw[gold, line width=1pt, rounded corners=15pt] (-9.8,-2.3) rectangle (9.8,2.3); \node[font=\normalsize, color=maroon, text width=18cm, align=center] at (0,1.5) {May every sunrise bring new hopes, every sunset bring peace, and every moment bring joy}; \node[font=\normalsize, color=maroon, text width=18cm, align=center] at (0,0.5) {May your love be the anchor in storms, the compass in uncertainty, and the light in darkness}; \node[font=\normalsize, color=maroon, text width=18cm, align=center] at (0,-0.5) {May you build a life together that reflects the beauty of your shared dreams and aspirations}; \node[font=\normalsize, color=maroon, text width=18cm, align=center] at (0,-1.5) {May your home be a place where love resides, memories are created, and happiness never ends}; \end{tikzpicture} \vspace{1.5cm} % Final blessing with decorative elements \begin{tikzpicture} % Decorative elements \node[scale=2, color=gold] at (-5,0) {\ding{170}}; \node[scale=2, color=gold] at (5,0) {\ding{170}}; % Main blessing text \node[font=\LARGE\bfseries, color=maroon, text width=12cm, align=center] at (0,0) {May God bless your union abundantly}; \node[font=\large, color=gold] at (0,-1) {With all our love and best wishes}; \end{tikzpicture} \vspace{1.5cm} % Closing decorative elements \begin{tikzpicture} \foreach \x in {-4,-2,0,2,4} { \node[scale=1.2, color=gold] at (\x,0) {\ding{108}}; } \node[font=\small, color=maroon, text width=16cm, align=center] at (0,-1) {Your presence and blessings will make our special day even more meaningful}; \end{tikzpicture} \end{center} \begin{figure}[h!] % 'h' tries to place it 'here', '!' allows flexibility \centering % Centers the image \includegraphics[width=0.8\textwidth]{ganesha.png} \end{figure} \begin{center} \begin{tikzpicture} \draw[gold, line width=1pt] (-8,0.5) -- (8,0.5); \node[font=\footnotesize, color=maroon, text width=16cm, align=center] at (0,0) {Thank you for being part of our journey}; \node[font=\tiny, color=gold] at (0,-1) {With heartfelt gratitude, Bhaskar \& Bharti}; \end{tikzpicture} \end{center} \end{document}
- Enlarging rendered PDF in comment boxby Erwann on December 16, 2025 at 3:01 am
I've been looking for ways to exhibit exhaustive listings (for replicability) alongside cropped output. Here are the two solutions I've come up with. For the second, I'm unable to stretch the PDF to the box width. Main question: how to fix this? Subsidiary question: what other solutions are there? \jobname.tex: \begin{filecontents}[overwrite]{\jobname-snippet.tex} \documentclass{article} \begin{document} Hello,~world! \end{document} \end{filecontents} \documentclass{article} \usepackage{lipsum,tcolorbox,graphicx} \tcbuselibrary{listings,raster,skins} \newtcblisting{listing-tex}{ listing and text, listing options={language=Tex, style=tcblatex} } \begin{document} \section{Comment out} \begin{listing-tex} %\documentclass{article} %\begin{document} Hello,~world! %\end{document} \end{listing-tex} \section{PDF as comment} % Adapted from % 17.9 Option Keys for Processing and Full Document Examples % https://ctan.math.washington.edu/tex-archive/macros/latex/contrib/tcolorbox/tcolorbox.pdf#section*.656 \tcbinputlisting{ lower separated=false, listing and comment, listing file={\jobname-snippet}, listing options={style=tcblatex}, pdf comment, comment style={graphics pages={1}, graphics options={trim=1.18in 9.06in 1.18in 1.18in, clip, width=\linewidth}, % https://ctan.math.washington.edu/tex-archive/macros/latex/contrib/tcolorbox/tcolorbox.pdf#section*.656 }, % on the fly: % https://ctan.math.washington.edu/tex-archive/macros/latex/contrib/tcolorbox/tcolorbox.pdf#section*.818 % pdflatex -shell-escape \jobname.tex freeze pdf=false, run system command={pdflatex -interaction=nonstopmode \jobname-snippet.tex} } \end{document}
- My (\xdef) definitions are expanding to blanks. I'm not sure whyby Jasper on December 14, 2025 at 10:11 pm
I am trying to make an algorithm to do my homework for me. I am having trouble with some csname definitions being blank when I call them. I tried making a more minimal example, but I could not reproduce the error. The empty parenthesis at the end should be the (red) expansion of 2.0. \documentclass[letterpaper]{article} \usepackage{tikz} \pgfmathsetmacro{\m}{7} \pgfmathsetmacro{\b}{2} \pgfmathsetmacro{\lettersInAlphabet}{26} \begin{document} Euclidean-Bezoution algorithm: \foreach[count=\countdooku from 1] \i in {1,...,9} { \ifnum\i=1 \pgfmathsetmacro{\remainder}{mod(\lettersInAlphabet,\m)} \pgfmathsetmacro{\coefficient}{(\lettersInAlphabet-\remainder)/\m} \lettersInAlphabet=\coefficient(\m)+\remainder\par \pgfmathparse{-floor(\lettersInAlphabet/\m)} \color{red}{\remainder=(1)(\lettersInAlphabet)+(\pgfmathresult)(\m)}\par % this isn't being stored correctly \expandafter\xdef\csname str\i\endcsname{(1)(\lettersInAlphabet)+(\pgfmathresult)(\m)} \global\let\remainder\remainder \global\let\coefficient\coefficient \global\let\lettersInAlphabet\lettersInAlphabet \else \pgfmathsetmacro{\lettersInAlphabet}{\m} \pgfmathsetmacro{\m}{\remainder} \pgfmathsetmacro{\remainder}{mod(\lettersInAlphabet,\m)} \pgfmathsetmacro{\coefficient}{(\lettersInAlphabet-\remainder)/\m} \pgfmathsetmacro{\coefficienttwo}{-floor(\lettersInAlphabet/\m)} \lettersInAlphabet=\coefficient(\m)+\remainder\par \pgfmathparse{\remainder == 0} \ifnum\pgfmathresult=1 \breakforeach \else \color{red}{\remainder=(1)(\lettersInAlphabet)+(\coefficienttwo)(\m)}\par \pgfmathsetmacro{\j}{\i-1} % and neither is this \expandafter\xdef\csname str\i\endcsname{(1)(\lettersInAlphabet)+(\coefficienttwo)(\csname str\j\endcsname)} \global\let\remainder\remainder \global\let\coefficient\coefficient \global\let\lettersInAlphabet\lettersInAlphabet \global\let\m\m \global\let\coefficienttwo\coefficienttwo \fi \fi \global\let\countdooku\countdooku } \color{blue}{\countdooku} 1=(\remainder)(\lettersInAlphabet)+(\coefficienttwo)(\m)\par \foreach \i in {\countdooku,...,1} { \pgfmathparse{\i==3.0} \ifnum\pgfmathresult=1 \breakforeach \else 1=(\remainder)(\lettersInAlphabet)+(\coefficienttwo)(\expandafter\csname str\i\endcsname)\par \fi } \end{document}
- Vertical line in matrix using LaTeXby Oliver Braunsberger on December 14, 2025 at 8:26 pm
I tried making a vertical line in a matrix and I found two workarounds: \documentclass{article} \usepackage{amsmath} \makeatletter \renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{% \hskip -\arraycolsep \let\@ifnextchar\new@ifnextchar \array{#1}} \makeatother \begin{document} \[ \begin{bmatrix}[cccc|c] 1 & 0 & 3 & -1 & 0 \\ 0 & 1 & 1 & -1 & 0 \\ 0 & 0 & 0 & 0 & 0 \\ \end{bmatrix} \] \[ \left( \begin{array}{cccc|c} 1 & 0 & 3 & -1 & 0 \\ 0 & 1 & 1 & -1 & 0 \\ 0 & 0 & 0 & 0 & 0 \\ \end{array} \right) \] \end{document} But I wanted to use this on the following matrix: \begin{pmatrix} -2 & 2 & -1 \\ 2 & -3 & 1 \\ 2& -1 & 1 \end{pmatrix} Also with zeros at the end of every line. But having a negative in very column doesn't seem to work.
- Evolution of “Computer Modern” or who lowered the dot on the “i”?by Alain Stalder on December 14, 2025 at 12:27 pm
In the process of hopefully migrating some documents from pdflatex that use Computer Modern fonts (mostly Sans) to LuaLaTeX, I am looking at the different variants that have evolved since the original METAFONT Computer Modern family. The good news for me is that the differences seem to be smaller than it first appeared, both regarding glyphs and metrics. The most prominent difference in Latin Modern with “plain English characters” is that the dot on the lowercase letter “i” is a bit lower, at least in the Sans variants (except in ligatures like “fi” where the height of the dot matches the too of the “f”). Was that a conscious choice in Latin Modern? Or maybe already in an earlier variant which I could not find, yet? (Computer Modern Unicode and CM-Super seem to have the original height of the dot on the “i”.) CTAN does list various Computer Modern variants and there is also some info in its external references, but I was wondering if there is maybe additional historical info about the evolution of “Computer Modern” variants, maybe a TUGboat article about that or maybe that someone who was already somewhat involved at the time would still remember? Below some examples with sources and — to make sure — the font that was actually used from the console log, and some differences noticed in the example text. pdflatex / Computer Modern (the reference; same result with \usepackage{amsfonts}, as expected): % !TEX TS-program = pdflatex \documentclass{article} \renewcommand\familydefault{\sfdefault} \begin{document} Liegenstraße 95 in “larger” Wil… % </usr/local/texlive/2025/texmf-dist/fonts/type1/public/amsfonts/cm/cmss10.pfb> \end{document} pdflatex / CM-Super: % !TEX TS-program = pdflatex \documentclass{article} \usepackage[T1]{fontenc} \renewcommand\familydefault{\sfdefault} \begin{document} Liegenstraße 95 in “larger” Wil… % </usr/local/texlive/2025/texmf-dist/fonts/type1/public/cm-super/sfss1000.pfb> \end{document} (Different “ß” and different spacing before “, rest same incl. “i”.) LuaLaTeX / Computer Modern Unicode: % !TEX TS-program = lualatex \documentclass{article} \usepackage{fontspec} \setmainfont{CMU Sans Serif} \begin{document} Liegenstraße 95 in “larger” Wil… % </usr/local/texlive/2025/texmf-dist/fonts/opentype/public/cm-unicode/cmunss.otf> \end{document} (Same alternative “ß” as CM-Super, different space after ”, denser ellipsis, rest same incl. “i”) LuaLaTeX / AMS Type 1 converted to OpenType (using FontLab 8 on Mac): % !TEX TS-program = lualatex \documentclass{article} \usepackage{fontspec} \setmainfont{ams-cmss10.ttf} \begin{document} % emulated ellipsis… Liegenstraße 95 in “larger” Wil.\,.\,. % <./ams-cmss10.ttf> \end{document} (Almost identical to Computer Modern (as expected), except line overall a bit denser and had to emulate the ellipsis, same “i”.) LuaLaTeX / Latin Modern: % !TEX TS-program = lualatex \documentclass{article} \renewcommand\familydefault{\sfdefault} \begin{document} Liegenstraße 95 in “larger” Wil… % </usr/local/texlive/2025/texmf-dist/fonts/opentype/public/lm/lmsans10-regular.otf> \end{document} Here the dot on the “i” is a bit lower. Also, the “a” has the same metric but is shifted a bit to the right. Also, more space inside “...”, and also denser ellipsis. Diff between LM and AMS OpenType (would be practically the same to pdflatex / Computer Modern, but wanted to stick to OpenType, into the future): The dot on the “i” is lowered and the “a” is shifted, otherwise letters just shifted a tiny little bit, but maybe that would be just a rendering artefact/limitation, at some point becomes the princess and the pea… But overall, seems like an “AMS to OpenType x Latin Modern” (as new font or maybe a virtual font on-the-fly) could already come close to the original pdflatex / Computer Modern look and feel for texts that could already be typset with the limitations regarding language support of pdflatex / Computer Modern. Added same day: Here’s a diff between LuaLaTeX / Latin Modern and pdflatex / Computer Modern, almost only the dot on the ”i” and the shift of the “a” are different, the other letters shifted in the diff above was just that was more condensed with LuaLaTeX / ”AMS OpenType” as I had mentioned but forgot about again. Added 2025-12-16: Examples with “New Computer Modern” also in the heavier book style. Note that, at least so far, I can only see 8pt and 10pt versions of that font in TeXLive 2025, i.e. at different sizes results would differ more from Computer Modern (and also from Latin Modern, for example), which would so far be a no-go for me because I have lots of 9pt stuff in my documents. Also, slanted text seems to be very heavily slanted. LuaLaTex / New Computer Modern: % !TEX TS-program = lualatex \documentclass{article} \usepackage[sansdefault]{fontsetup} \begin{document} Liegenstraße 95 in “larger” Wil… % </usr/local/texlive/2025/texmf-dist/fonts/opentype/public/newcomputermodern/NewCMSans10-Regular.otf> \end{document} (Output identical to Latin Modern, except that the upper horizontal line of the uppercase letter “L” is completely horizontal; I guess the choice in Computer Modern and Latin Modern for 10pt might have been to make it look horizontal at 10pt and maybe with New Conmputer Modern, since that is also the largest size font, it was made horizontal to look horizontal at larger point sizes?) LuaLaTex / New Computer Modern Book: % !TEX TS-program = lualatex \documentclass{article} \usepackage[default]{fontsetup} \renewcommand\familydefault{\sfdefault} \begin{document} Liegenstraße 95 in “larger” Wil… % </usr/local/texlive/2025/texmf-dist/fonts/opentype/public/newcomputermodern/NewCMSans10-Book.otf> \end{document} (As expected a bit heavier (with a nice amount to me), but otherwise the same.) Added 2025-12-17: pdflatex / Computer Modern with simulated bleeding via \pdfpkmode (modes.mf): % !TEX TS-program = pdflatex \documentclass{article} \pdfpkresolution=1200 \pdfpkmode={lexmarkr} \pdfmapfile{} \renewcommand\familydefault{\sfdefault} \begin{document} Liegenstraße 95 in “larger” Wil… % </Users/alain/Library/texlive/2025/texmf-var/fonts/pk/lexmarkr/public/cm/cmss10.1200pk> \end{document} (A bit thicker but otherwise the same as pdflatex/CM and if you zoom in a bit you can see that the glyphs are rasterized. Uses a Metafont-generated *.pk font, packaged *.tfm font, TeX font metric; not sure in which form exactly that goes into the pdf.)
- TikZ, \x^2 != \x * \x?by ana on December 13, 2025 at 8:04 pm
Why do the two \draw commands produce two different plots? Shouldn't they both produce a parabola? How do you use the ^2 notation to plot a parabola? \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[domain=-1:1] plot (\x, \x^2); \draw[domain=-1:1] plot (\x, \x * \x); \end{tikzpicture} \end{document}
- Graphing the function y=x^2sin(1/x)by azetina on December 13, 2025 at 6:50 pm
Consider the following MWE: \documentclass{article} \usepackage{amsmath} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} \begin{axis}[ axis equal, axis lines = middle, xlabel = $x$, ylabel = $y$, xmin = -0.4, xmax = 0.4, ymin = -0.4, ymax = 0.4, grid = both, grid style = {line width=.1pt, draw=gray!10}, major grid style = {line width=.2pt, draw=gray!50}, samples = 200, legend pos = north west, width = 10cm, height = 8cm ] % Plot the curve \addplot[domain=-0.4:0.4, thick, blue] {x^2*sin(1/x)}; \addlegendentry{$y = x^2\sin(1/x)$} % Tangent line at (1, -2) \addplot[domain=-0.5:0.5, thick, red] {x^2}; \addplot[domain=-0.5:0.5, thick, red] {-x^2}; \addlegendentry{$y=\pm x^2$} \end{axis} \end{tikzpicture} \end{document} Currently, I am getting: But I would like the curve to show like in the following image: What am I missing?