Hot
- How does \NewCommandCopy work?by M0M0 on February 24, 2026 at 12:16 pm
usrguide motivates \NewCommandCopy with ... If the existing command is robust, then the old trick of using the low-level \let for this doesn’t work, because it only copies the top-level definition, but not the part that actually does the work. this suggests that \NewCommandCopy can somehow copy the full definition of a robust command. The only way I can image it can do this, is by expanding the command. However, the whole point of a robust command is that it might not be expandable and might break in an expansion only context. Does \NewCommandCopy just accept the risk and hence is basically quite similar to \edef\oldcommand{\command} or am I missing something here?
- parskip: Avoid extra spacing before equationsby elst on February 24, 2026 at 11:45 am
I am using the parskip package and wonder if there is a way to always avoid the extra spacing before equations regardless if having a space in the .tex file or not? That is, when doing something like text blablablablabla \begin{equation} ... \end{equation} there is an extra (unwanted) space which doesn't show when doing text blablablablabla \begin{equation} ... \end{equation} So I wonder if there is a way to achieve the compiled output as in the latter case, for both alternatives. (For equations, align, etc.) I found a tip about using \abovedisplayskip in another post, but didn't get this to work.
- how to zoom in on tikz clipped imageby Matteo on February 24, 2026 at 10:38 am
I have the following situation: where the first \clip in the second frame is very small and I wish to present it a bit bigger for visibility reasons. I'm unsure how to tweak the code I'm using and if it is possible by simply using tikz + clip. Thanks in advance! MWE \documentclass[aspectratio=149]{beamer} \usepackage[T1]{fontenc} \usetheme{Singapore} \usecolortheme{dolphin} \usepackage{tikz} \usepackage[export]{adjustbox} \begin{document} \begin{frame} \frametitle<2>{Inset 1} \frametitle<3>{Inset 2} \only<1-3>{ \centering\includegraphics<1>[width=.75\textwidth]{example-image-a} \begin{adjustbox}{max width=\textwidth,max height=\textheight} \begin{tikzpicture} \clip<2> (-6,4) rectangle (6,5); \clip<3> (-6,-3.25) rectangle (6,-7.5); \node<2-> at (0,0) {\includegraphics[width=\textwidth]{example-image-a}}; \end{tikzpicture} \end{adjustbox} } \end{frame} \end{document} EDIT: sketch attempt Cropped from the original, the image can be stretch vertically, primarily, and horizontally up to the size of the frame while preventing Overfull hbox warnings. Proportion should be preserved but if not possible a vertical stretch has the priority.
- Ordering of yhmath and accents packages (\wideparen command)by ivankokan on February 24, 2026 at 9:59 am
MWE \documentclass[12pt,a4paper,oneside]{article} \usepackage{lmodern} \usepackage[centertags,intlimits,namelimits,sumlimits]{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{yhmath} % (*) \usepackage{accents} % (**) \listfiles \begin{document} $\wideparen{AB}$, $\wideparen{BC}$, $\wideparen{CA}$, $\wideparen{AC}$, $\wideparen{AF}$, $\wideparen{EF}$, $\wideparen{A_1C}$, $\wideparen{XY}$, $\wideparen{ZW}$, $\wideparen{CD}$ \end{document} Compiled on Overleaf LaTeX2e <2025-06-01> patch level 1 L3 programming layer <2025-05-26> *********** *File List* article.cls 2025/01/22 v1.4n Standard LaTeX document class size12.clo 2025/01/22 v1.4n Standard LaTeX file (size option) lmodern.sty 2015/05/01 v1.6.1 Latin Modern Fonts amsmath.sty 2025/05/18 v2.17x AMS math features amstext.sty 2024/11/17 v2.01 AMS text amsgen.sty 1999/11/30 v2.0 generic functions amsbsy.sty 1999/11/29 v1.2d Bold Symbols amsopn.sty 2022/04/08 v2.04 operator names amsfonts.sty 2013/01/14 v3.01 Basic AMSFonts support amssymb.sty 2013/01/14 v3.01 AMS font symbols yhmath.sty 2020/03/17 v1.6 accents.sty 2006/05/12 v1.4 Math Accent Tools ot1lmr.fd 2015/05/01 v1.6.1 Font defs for Latin Modern l3backend-pdftex.def 2025-04-14 L3 backend support: PDF output (pdfTeX) omllmm.fd 2015/05/01 v1.6.1 Font defs for Latin Modern omslmsy.fd 2015/05/01 v1.6.1 Font defs for Latin Modern omxlmex.fd 2015/05/01 v1.6.1 Font defs for Latin Modern umsa.fd 2013/01/14 v3.01 AMS symbols A umsb.fd 2013/01/14 v3.01 AMS symbols B OMXyhex.fd 2013/07/03 v1.1 YH's humble contribution to TeX maths (NP) *********** Output If I reorder (*) and (**) to (**) and (*), I get the following output: What is the root cause of the difference? What is the recommended order between these two packages (the original output looks better: it does not span horizontally more than needed, neither it lacks of spanning)? Is the \wideparen the only command that is affected in this context? EDIT: https://github.com/norbusan/yhmath/issues/8
- pgfplotstable commands do not work in a foreach loopby CarLaTeX on February 24, 2026 at 8:33 am
I'm trying to put together n files into one with pgfplotstable. This example works: \begin{filecontents}{data1.csv} aaa bbb ccc \end{filecontents} \begin{filecontents}{data2.csv} 111 222 333 \end{filecontents} \begin{filecontents}{data3.csv} aaa111 bbb222 ccc333 \end{filecontents} \documentclass{book} \usepackage{pgfplotstable} \pgfplotsset{compat=1.18} \begin{document} \pgfplotstableread[header=false]{data1.csv}\overallTable \pgfplotstableread[header=false]{data2.csv}\tableTwo \pgfplotstablevertcat{\overallTable}{\tableTwo} \pgfplotstableread[header=false]{data3.csv}\tableTwo \pgfplotstablevertcat{\overallTable}{\tableTwo} \begin{table} \pgfplotstabletypeset[ string type, ]{\overallTable} \end{table} \end{document} It gives what I want: But if I put the \pgfplotstableread and \pgfplotstablevertcat in a \foreach loop, they don't work: \begin{filecontents}{data1.csv} aaa bbb ccc \end{filecontents} \begin{filecontents}{data2.csv} 111 222 333 \end{filecontents} \begin{filecontents}{data3.csv} aaa111 bbb222 ccc333 \end{filecontents} \documentclass{book} \usepackage{pgfplotstable} \pgfplotsset{compat=1.18} \begin{document} \pgfplotstableread[header=false]{data1.csv}\overallTable \foreach \ind in {2,3} {the loop is executed: \ind\newline \pgfplotstableread[header=false]{data\ind.csv}\tableTwo \pgfplotstablevertcat{\overallTable}{\tableTwo} } \begin{table} \pgfplotstabletypeset[ string type, ]{\overallTable} \end{table} \end{document} Even if the loop is executed, I got no errors, and in the log I have: PGFPlots: reading {data1.csv} PGFPlots: reading {data2.csv} PGFPlots: reading {data3.csv}
- lualatex writing strange things into ~/.texliveby user2609605 on February 23, 2026 at 10:30 pm
I installed texlive with the following profile TEXDIR /usr/local/texlive/2025 TEXMFCONFIG ~/.texlive2025/texmf-config TEXMFHOME ~/texmf TEXMFLOCAL /usr/local/texlive/2025/texmf-local TEXMFSYSCONFIG /usr/local/texlive/2025/texmf-config TEXMFSYSVAR /usr/local/texlive/2025/texmf-var TEXMFVAR ~/.texlive2025/texmf-var # platforms TBD: configure with new setting based on instTexliverc and local plattform binary_aarch64-linux 0 binary_amd64-freebsd 0 binary_amd64-netbsd 0 binary_armhf-linux 0 binary_i386-freebsd 0 binary_i386-linux 0 binary_i386-netbsd 0 binary_i386-solaris 0 binary_universal-darwin 0 binary_windows 1 binary_x86_64-cygwin 0 binary_x86_64-darwinlegacy 0 binary_x86_64-linux 1 binary_x86_64-linuxmusl 0 binary_x86_64-solaris 0 # OPTIONs: Maximal Performance & Stability # installation option s instopt_adjustpath 0 instopt_adjustrepo 1 # default instopt_letter 0 # TBD: must be tied to $PAPER instopt_portable 1 instopt_write18_restricted 1 # TBD: must be tied to new setting # turned options into tlpdbopt tlpdbopt_autobackup 0 #tlpdbopt_backupdir tlpkg/backups # not needed because tlpdbopt_autobackup 0 tlpdbopt_create_formats 1 tlpdbopt_desktop_integration 0 tlpdbopt_file_assocs 0 tlpdbopt_generate_updmap 0 # doubt tlpdbopt_install_docfiles 1 # TBD: make configurable tlpdbopt_install_srcfiles 1 # TBD: make configurable #tlpdbopt_location https://ftp.math.utah.edu/pub/tex/historic/systems/texlive # TBD: configure tlpdbopt_post_code 1 tlpdbopt_sys_bin /usr/local/bin # unused because of instopt_adjustpath 0? tlpdbopt_sys_info /usr/local/share/info # unused because of instopt_adjustpath 0? tlpdbopt_sys_man /usr/local/share/man # unused because of instopt_adjustpath 0? tlpdbopt_w32_multi_user 0 This profile is just based on the one written back on some older installation and adapted. I want to focus on the variables in particular TEXMFVAR ~/.texlive2025/texmf-var The first observation is, that ~/.texlive2025 seems unused, i.e. does not show up but lualatex writes ~/.texlive. If I erase it reappears. I wonder whether my setting is ignored. Since I have in parallel release 2024 and 2025 I would like to keep separated. If I understand the settings in the profile right, this is done, but reality differs: all is written into one folder, namely ~/.texlive. If I have a look inside, some strange files show up: ~/.texlive/texmf-var/luatex-cache/generic/names/luaotfload-names.lua.gz gunzipping unveils: ... ["/usr/share/fonts/truetype/luxisri.ttf"]={ ["index"]={ [false]=458, }, ["timestamp"]=1770577183, }, ["/usr/share/fonts/xscreensaver/OCRA.ttf"]={ ["index"]={ [false]=180, }, ["timestamp"]=1763843231, }, ... which means that lualatex scans my system fonts. This is not a nice observation because I want to make my texlive reproducible. How can I prevent this problem??? Next bad ovservation: ~/.texlive/texmf-var/luamplib_cache/luamplib_input_F4_05someMetapost_mp I am sure this is from luamplib and the name is that of a specific figure in some (Chapter 4, Figure 5) so part of my document leaks into my home folder. Also very bad but not as bad as the above problem, because I can just avoid luamplib. Last problem: TEXMFHOME ~/texmf does not show up, but I am worried what this is for and what kind of information is stored there and I fear also mixing up several releases of texlive.
- Formatting a sequence of items with comma and ending with 'and' or 'respectively'by mf67 on February 23, 2026 at 10:02 pm
Can someone help me create a macro like \MyList{A;B;C;D;E;F} which returns “A, B, C, D, E[,] respectively F" independently on how many ”arguments” (2+) that are specified and also support math, e.g. \MyList{\(A\);\(B\);\(C\);\(D\);\(E\);\(F\)} ? (I used the [,] notation since I’m not sure if the Oxford comma is used today.) If the number of arguments is two; \MyList{A;B} I would like it to return “A respectively B”. Edit: I tried using sinuitx but it might not be suitable for this task as it mainly(?) handles numbers. Here is a test \documentclass{article} \usepackage{siunitx} \begin{document} \numlist[parse-numbers=false]{A;2;3} \numlist[parse-numbers=false]{\text{A};2;3} \numlist[parse-numbers=false]{\(A+B\);2;3} \end{document} but it gives an error on the last line and I would like to have ”roman letters” if no ”math mode” is used, and avoid using \text{}.
- Is there a resource that goes through (La)TeX fonts, gives them a pairing, and a description?by Barnabas on February 23, 2026 at 8:52 pm
Is there a resource that goes through (La)TeX fonts, gives them a pairing, and a description? I asking, which fonts like serif for body text, and sans serif for headers and stuff complement each other; and fonts good for long reading like a book? To be clear: it would pair Serif fonts with Sans Serif fonts, specifically ones that are shipped with TeX Live and MiKTeX. I think this would be very handy for everybody, especially people who do not know which fonts to use for the headings and which ones for their body text. With type families that have matching faces (Serif, Sans Serif, Monospaced,etc) is easy, e.g., Latin Modern, Kp-Fonts, etc. The amount of pairings is just baffling, and you searched the web for TeX font pairings and came up with nothing. 🙂 Hopefully, this question doesn't violate any rules, and I don't think I need a MWE?
- Set the left margins for the exercises added at the end of the chapterby Mehmet Onat on February 23, 2026 at 8:24 pm
I want to adjust the left margins of the list for the exercises added at the end of the section. As seen in the image, the i., ii., iii. lists have extra space on the left. I want to align them to the left or manually adjust the left margin. How can I do this? \documentclass{article} \usepackage{makeidx} \usepackage{amsmath, amssymb} \usepackage{amsfonts} \usepackage{stmaryrd} \usepackage{tasks} \usepackage[ddmmyyyy]{datetime} \usepackage[a4paper,left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry} \usepackage{tikz} \usepackage{xypic} \usepackage{tkz-euclide} \usepackage{pgfplots} \usepackage{xcolor} \usepackage{mwe} \usepackage{enumitem} \newtheorem{theorem}{Teorem} \newtheorem{acknowledgement}[theorem]{Acknowledgement} \newtheorem{algorithm}[theorem]{Algorithm} \newtheorem{axiom}[theorem]{Axiom} \newtheorem{case}[theorem]{Case} \newtheorem{claim}[theorem]{Claim} \newtheorem{conclusion}[theorem]{Sonu\c{c}} \newtheorem{condition}[theorem]{Condition} \newtheorem{conjecture}[theorem]{Conjecture} \newtheorem{corollary}[theorem]{Sonu\c{c}} \newtheorem{criterion}[theorem]{Criterion} \newtheorem{definition}[theorem]{Tan\i m} \newtheorem{example}[theorem]{\"{O}rnek} \newtheorem{exercise}[theorem]{\"{O}dev} \newlist{exercises}{enumerate}{1} \setlist[exercises]{ label*=\thesection.\arabic*., ref=\thesection.\arabic*, before= {\subsection*{Al\i \c{s}t\i rmalar}}, resume, } \let\oldsection\section \renewcommand{\section}{\restartlist{exercises}\oldsection} \begin{document} \section{Section 1} \subsection{Subsection 1} \begin{exercises} \item Item 1 \begin{enumerate} \item[i.] Item one \item[ii.] Item two \item[iii.] Item three \end{enumerate} \item Item 2 \end{exercises} \section{Section 2} \subsection{Subsection 1} \begin{exercises} \item Item 1 \begin{enumerate} \item[i.] Item one \item[ii.] Item two \end{enumerate} \item Item 2 \end{exercises} \end{document}
- Cite in text [Name_year], and use the same label in bibliographyby JLG on February 23, 2026 at 2:13 pm
I would like to make my citations appear in the text as [Name_year], with some preferences: Name of the only first author (no First+Second authors, no initials of the first 3 authors, no "+", etc) No additional "et al.", in case of multiple authors No space between "Name", "underscore" and "year" Then in the bibliography section, I would like that the references appear as: [Name_year] followed by the list of all the authors with first name initial and full name, "paper title", journal name, year At the moment I tried the following command in the main file: \usepackage[style=authoryear,giveninits=true,maxbibnames=20,maxcitenames=1]{biblatex} \DefineBibliographyStrings{french}{andothers={}} % removes "et al." \DefineBibliographyExtras{french}{\restorecommand\mkbibnamefamily} \DeclareCiteCommand{\cite} {\usebibmacro{prenote}} % Pre-citation text (empty here) {\bibopenbracket \MakeLowercase{\printnames[first]{labelname}} % Only the first author's name \printtext{\printdate} \bibclosebracket} % Close the square bracket {\multicitedelim} % Delimiter for multiple citations (e.g., for multiple references) {\usebibmacro{postnote}} % Post-citation text (empty here) \addbibresource{Bibliography.bib} %Import the bibliography file However I still have the following issues: citations with randomly 1 or 2 names instead of only first author's bibliography entries starting with Name of 1st author, initial of first name, followed by the names of the other authors Thanks a lot for your help
- tabular: add lines until the end of the text body is reachedby cis on February 23, 2026 at 12:56 pm
Can I configure this loop, or a similar loop, to add rows until the end of the text body is reached? A small gap at the end will probably be unavoidable. Could this be achieved with \pdfpos? \documentclass[a5paper]{article} \usepackage[margin=14mm, showframe=true, paperheight=126mm, ]{geometry} \newcounter{mycount} \setcounter{mycount}{0} \def\mylines{}% \loop\ifnum\themycount<7% \addtocounter{mycount}{1} \expandafter\def\expandafter\mylines\expandafter{% \mylines & & \themycount \\ }% \repeat% \begin{document} \section{Table} \begin{tabular}{| c c | c|} \hline \multicolumn{3}{|c|}{Something} \\ \hline A & B & (My Head) \\ \hline a & b & n\\ a & b & n\\ a & b & n\\ \mylines \hline A & B & (My Foot)\\ \hline \end{tabular} \end{document}
- Controlling Subsection Visibility in LaTeX Table of Contentsby Aimar on February 23, 2026 at 10:43 am
I am using the amsart document class in LaTeX. I would like the table of contents to display all sections while including only a single, specific subsection. All other subsections should remain numbered and visible in the document, but should not appear in the table of contents. \documentclass{amsart} \usepackage{hyperref} \begin{document} \title{title} \author{Author Name} \maketitle \tableofcontents \section{First Section} \subsection*{This subsection should NOT appear in the TOC} \subsection{This subsection SHOULD appear in the TOC} \section{Second Section} \subsection*{Another subsection NOT in the TOC} \end{document}
- wrong citation formatby Faith on February 23, 2026 at 9:48 am
My problem ist that when I try to cite e.g. \textcite{zotero-item-155} it appears as "AG Boden, (2024)" in the text instead of "AG Boden (2024)". And When I do (\cite{BlumeLehrbuchBodenkunde10}) it appears as "(Blume et al. 2010)" instead of "(Blume et al., 2010)". When I do \parencite{liuLandUseDependent2018} it also appears as "(Liu et al. 2018)" in the text. My preamble looks like this: \documentclass[a4paper,12pt]{article} \usepackage[backend=biber, style=apa]{biblatex} %\addbibresource{Literatur.bib} % not available \addbibresource{biblatex-examples.bib} % \usepackage{anyfontsize} % \usepackage{makecell} % \usepackage{setspace} % \fontsize{13pt}{19.5pt}\selectfont % \onehalfspacing % \usepackage{booktabs} % \usepackage{xcolor} % \usepackage{csquotes} % \usepackage{circuitikz} % \usepackage{ragged2e} % \usepackage[most]{tcolorbox} \usepackage[ngerman]{babel} % \usepackage{mathptmx} \usepackage[T1]{fontenc} % \usepackage{graphicx} %\usepackage{amsfonts} %\usepackage{amssymb} % \usepackage{caption} % \usepackage{placeins} % \usepackage{subcaption} % \usepackage{float} % \usepackage{amsmath} % \captionsetup[table]{justification=raggedright, singlelinecheck=false} % \captionsetup[figure]{labelformat=mylabel, format=plain, singlelinecheck=false, justification=raggedright} % \usepackage{tocloft} % \setlength{\bibitemsep}{1.5\baselineskip} % \usepackage{hyperref} % \hypersetup{ % colorlinks=false, % pdfborder={0 0 0} % } % \usepackage[a4paper, left=3cm, right=3cm, top=2cm, bottom=2cm]{geometry} \DefineBibliographyStrings{ngerman}{% andothers = {et al.}, } % \renewcommand\thefigure{\arabic{figure}} % \DeclareCaptionLabelFormat{mylabel}{Abbildung #2} \DeclareDelimFormat*{nameyeardelim}{\addcomma\space} \DeclareDelimFormat[bib]{andothersdelim}{\addcomma\space} \DeclareLanguageMapping{ngerman}{ngerman-apa} \begin{document} Textcite one author: \textcite{glashow} Regular cite more authors: \cite{yoon} Parencite more authors: \parencite{herrmann} \printbibliography \end{document}
- How to draw arc segments of circular quiver diagram elegant with tikz?by Explorer on February 23, 2026 at 9:23 am
Claim This post is more likely asking for better approach, focused on the arc's plot. And that is similar to, but I don't find the same one: Drawing cyclic quiver Drawing a circular graph using xypic https://tex.stackexchange.com/a/759710/322482 Descrption I found that just with: \draw[<->,shortstyle,violet] (\ang:\RR cm) arc[radius=\RR cm,start angle=\ang,delta angle=\deltaang]; The arc is not exactly centered at (0,0)(the violet part), thus I learnt from here and calculate the \deltaangg with cosline rule manually. Code \documentclass[tikz,border=5pt]{standalone} \usetikzlibrary{arrows.meta} \begin{document} \def\NN{5} \def\RR{5} \def\rr{0.5} \def\deltaang{\fpeval{360/\NN}} \def\deltaangg{\fpeval{acosd((2*\RR^2-\rr^2)/(2*\RR^2))}} % cosine rule \begin{tikzpicture}[ thick,>=Stealth,shortstyle/.style={shorten >=\rr cm,shorten <=\rr cm}] \foreach \i in {1,...,\NN}{ \def\ang{\fpeval{\deltaang*(\i-1)}} \path[draw,fill=gray!75] (\ang:\RR cm) circle[radius=\rr cm]; \def\startang{\fpeval{\ang+\deltaangg}} \def\endang{\fpeval{\ang+\deltaang-\deltaangg}} %%%%%%%%%%%%%% \draw[<->,shortstyle,violet] (\ang:\RR cm) arc[radius=\RR cm,start angle=\ang,delta angle=\deltaang]; %%%%%%%%%%%%%% % https://tex.stackexchange.com/a/66265/322482 \draw[<->,magenta] ([{shift=(\startang:\RR cm)}]0,0) arc[radius=\RR cm,start angle=\startang,end angle=\endang]; \foreach[parse=true] \j in {2,...,{\NN-2}}{ \def\nextang{\fpeval{\ang+\deltaang*\j}} \draw[shortstyle,<->] (\ang:\RR cm) -- (\nextang:\RR cm); } } \end{tikzpicture} \end{document} Question The magenta arcs is what I want, but I found it too hard to calculate \def\deltaangg{\fpeval{acosd((2*\RR^2-\rr^2)/(2*\RR^2))}}. Any suggestions on the code?
- Setting pages of an index entry with an specific fontby Knudsen on February 23, 2026 at 6:24 am
I have always used \documentclass{article} \usepackage{fontspec} \setmainfont{Times New Roman} \newfontfamily\semibold[Ligatures={TeX, Common}]{Times LT Std Semibold} \usepackage{imakeidx} \makeindex[program=texindy, options=-L english -C utf8, title=Index] \begin{document} Some text\index{Important Topic|textbf}. Some text\index{Not Important Topic}. \printindex \end{document} to be processed with xelatex -shell-escape main.tex, which sets the page of the entry in boldface using the standard font used by \textbf{}. How can I set the page in a particular (semibold) font? Or, for that matter, any other font?
- Text above horizontal arrow in longtblr / tblr with minimal vertical spacingby GJW on February 23, 2026 at 12:40 am
I would like text to be above a horizontal arrow in longtblr, with the following constraints longtblr package Define start and stop points of arrow relative to column borders - i.e. enable the table is dynamic if width of columns change Minimal space between arrow bar and the text Text in column A centred between rows 2 and 3 A screen grab of the desired outcome is attached. Here is a minimal example illustrating what I currently have: \documentclass{article} \usepackage{tabularray} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{longtblr}{ colspec={|c|c|c|}, vlines, hlines, row{3} = {ht=0pt}, % arrow row height } % --- First row --- A & B & C \\ % --- SECOND row: merge columns 2 and 3 --- 1 & \SetCell{c=2} 2 & \\ % --- Arrow row (thin) --- & \SetCell{cmd=\tikz[remember picture]\node (Bstart) {};} & \SetCell{cmd=\tikz[remember picture]\node (Cend) {};} \\ \end{longtblr} % --- Draw the arrow --- \begin{tikzpicture}[overlay, remember picture] \draw[red, thick, <->] ($(Bstart.west)+(-\pgflinewidth/2,0)$) -- ($(Cend.east)+(\pgflinewidth/2,0)$); \end{tikzpicture} \end{document}
- Vsplit : Why loses vsplit the eveness of columns? [closed]by MBE on February 23, 2026 at 12:06 am
I cannot build a real MWE. I post a working example. Just imagine, the rows were whole pages (\vsize) I have a file with ca. 100 pages, two columns. I vsplit one big single box into 200 and ship them out. All works well, so far. But, in some cases or on some pages,the top lines are not even, and the bottomlines aren't as well. I tried starting all the boxes with a \hbox, without success. Does someone have an idea? \parindent=0pt \hsize=150mm \setbox20=\vtop{\hsize0.4\hsize Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. Phasellus eu tellus sit amet tortor gravida placerat. Integer sapien est, iaculis in, pretium quis, viverra ac, nunc. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. Phasellus eu tellus sit amet tortor gravida placerat. Integer sapien est, iaculis in, pretium quis, viverra ac, nunc. .} \newdimen\splitheight \splitheight=0.12\vsize \newcount\start \newcount\stop \start=21 \stop=31 \loop \ifnum\start<\stop \setbox\the\start=\vsplit20 to \splitheight{} \advance\start by 1 \repeat \start=21 \stop=31 \loop \ifnum\start<\stop \hskip1pt \copy\the\start \hskip20pt\copy\the\start \break\hskip10pt%\hskip10pt \advance\start by 1 \repeat \bye
- texlive profile: how to specify the scheme?by user2609605 on February 22, 2026 at 9:53 pm
I tried to install texlive from a profile... I just adapted the profile written after some installation and this works quite well -- except two details: This is the modified scheme that works: # Scheme: not recognized #selected_scheme scheme-small # paths, recommended to set all of them # TBD: configure $ROOT/$YEAR TEXDIR /usr/local/texlive/2025 # TBD: configure ~/.texlive$YEAR/texmf-config, find a solution TEXMFCONFIG ~/.texlive2025/texmf-config # TBD: find a solution TEXMFHOME ~/texmf # TBD: configure $ROOT/$YEAR/texmf-local TEXMFLOCAL /usr/local/texlive/2025/texmf-local # TBD: configure $ROOT/$YEAR/texmf-config TEXMFSYSCONFIG /usr/local/texlive/2025/texmf-config # TBD: configure $ROOT/$YEAR/texmf-var TEXMFSYSVAR /usr/local/texlive/2025/texmf-var # TBD: configure ~/.texlive$YEAR/texmf-var, find a solution TEXMFVAR ~/.texlive2025/texmf-var # platforms TBD: configure with new setting based on instTexliverc and local plattform binary_aarch64-linux 0 binary_amd64-freebsd 0 binary_amd64-netbsd 0 binary_armhf-linux 0 instopt_adjustpath 0 instopt_adjustrepo 1 instopt_letter 0 instopt_portable 1 instopt_write18_restricted 1 #instopt_location https://mirror.ctan.org/systems/texlive/tlnet ... #tlpdbopt_location https://mirror.ctan.org/systems/texlive/tlnet tlpdbopt_autobackup 0 #tlpdbopt_backupdir tlpkg/backups # not needed because tlpdbopt_autobackup 0 tlpdbopt_create_formats 1 tlpdbopt_desktop_integration 0 ... In two respects I could not put all pieces of information into the profile: The selected_scheme scheme-small is not recognized. I tried some variants, but without success. So as you see in the listing above, I commented out selected_scheme scheme-small and substituted by an option as shown below. Likewise I could not enter the repository into the profile. First the written profile did not contain any information on that. In tlpkg/TeXLive/TLCOnfig.pm some settings are specified, quite nice, seems to be the repository url, but again it is not recognized: "location" => [ "u", "__MASTER__", "repository", "Default package repository" ], but trying to add location to the profile did not work and again i substitute with an option for the installer. Now I install with a mixture between profile and other options: ./install-tl -repository "$repo" \ -scheme "$SCHEME" \ -profile "../texlive$YEAR.profile" This seems to work, but I think it is against the intention of the developers. I tried to explain better.
- Wrong links in \hyperrefby Alex Degtyarev on February 22, 2026 at 9:01 pm
Sorry everyone. I just did an update, which was probably a mistake, and encountered another problem with hyperref. For years I've been using a workaround which I borrowed from a journal, and it worked. Well, I understand that this is an undocumented feature, but there seems (seemed?) to be no other way to have everything numbered consecutively. Here's a minimal example: \documentclass{amsart} \usepackage{hyperref} \newtheorem{theorem}{Theorem}[section] \makeatletter \let\c@equation\c@theorem \let\theequation\thetheorem \makeatother \begin{document} \section{1} \begin{equation} a=b\label{1} \end{equation} \newpage \section{2} \begin{equation} c=d\label{2} \end{equation} \newpage \eqref1 \eqref2 \end{document} Both links lead to eqn. 1.1, and the log reports multiple anchors with the same name. What would the new hack be? Or is there a documented way now to have all theorems, lemmas, ... and equations numbered consecutively within sections and, at the same time, have \autoref work correctly?
- I don't get how to make vertical space between a \paragraph{} and a simple lineby Lucord on February 22, 2026 at 8:58 pm
this is my first LaTeX question and I'm really exited about it 😀 Jokes apart I'm just asking how to make vertical space between a paragraph and a simple new line. I tried to use "\\", but it doesn't work, it gives me "There's no line here to end." to the line where i m writing. 7) "/paragra{}" 8) \\ 9) x And at the line 9 gives me that error. Any idea?
- Multiple images stacked with a single caption, no extra vertical spaceby palloc on February 22, 2026 at 7:53 pm
I'm trying to create a LaTeX document where I have several images stacked vertically, with no extra vertical space between them, and only one caption for all images (appearing under the last image). The problem is that each \IMG creates a separate figure, so each image gets its own caption and there’s extra vertical space between images. What I want: Multiple images stacked vertically with no extra vertical space. Only one caption for all images (appearing under the last one). Allow overlays on the images (x, y, text). This is how it should look like: The code what I got from taiwan12 with little modification (link: https://tex.stackexchange.com/a/760076/287423) : \documentclass{report} \usepackage{graphicx} \usepackage{float} \usepackage{xcolor} \usepackage{xparse} \ExplSyntaxOn % variables \tl_new:N \l_taiwanxii_image_tl \tl_new:N \l_taiwanxii_caption_tl \tl_new:N \l_taiwanxii_shortcaption_tl \tl_new:N \l_taiwanxii_label_tl \tl_new:N \l_taiwanxii_pos_tl \fp_new:N \l_taiwanxii_scale_fp \fp_new:N \l_taiwanxii_overlayscale_fp \clist_new:N \l_taiwanxii_x_clist \clist_new:N \l_taiwanxii_y_clist \clist_new:N \l_taiwanxii_text_clist % keys \keys_define:nn { taiwanxii } { image .tl_set:N = \l_taiwanxii_image_tl, caption .tl_set:N = \l_taiwanxii_caption_tl, shortcaption .tl_set:N = \l_taiwanxii_shortcaption_tl, label .tl_set:N = \l_taiwanxii_label_tl, pos .tl_set:N = \l_taiwanxii_pos_tl, scale .fp_set:N = \l_taiwanxii_scale_fp, overlayscale .fp_set:N = \l_taiwanxii_overlayscale_fp, x .clist_set:N = \l_taiwanxii_x_clist, y .clist_set:N = \l_taiwanxii_y_clist, text .clist_set:N = \l_taiwanxii_text_clist, } \NewDocumentCommand{\IMG}{m} { % reset \tl_clear:N \l_taiwanxii_image_tl \tl_clear:N \l_taiwanxii_caption_tl \tl_clear:N \l_taiwanxii_shortcaption_tl \tl_clear:N \l_taiwanxii_label_tl \tl_clear:N \l_taiwanxii_pos_tl \tl_clear:N \l_taiwanxii_pos_tl \clist_clear:N \l_taiwanxii_x_clist \clist_clear:N \l_taiwanxii_y_clist \clist_clear:N \l_taiwanxii_text_clist \tl_set:Nn \l_taiwanxii_pos_tl {H} \fp_set:Nn \l_taiwanxii_scale_fp {1} \fp_set:Nn \l_taiwanxii_overlayscale_fp {1} \keys_set:nn { taiwanxii } { #1 } % shortcaption \tl_if_empty:NT \l_taiwanxii_shortcaption_tl { \tl_set_eq:NN \l_taiwanxii_shortcaption_tl \l_taiwanxii_caption_tl } \use:e { \exp_not:N \begin{figure}[\l_taiwanxii_pos_tl] } \centering \sbox0{\includegraphics[scale=\fp_use:N \l_taiwanxii_scale_fp]{\l_taiwanxii_image_tl}} \usebox0 \int_zero:N \l_tmpa_int \clist_map_inline:Nn \l_taiwanxii_x_clist { \int_incr:N \l_tmpa_int \tl_set:Nn \l_tmpa_tl {##1} \tl_set:Nx \l_tmpb_tl { \clist_item:Nn \l_taiwanxii_y_clist { \int_use:N \l_tmpa_int } } \tl_set:Nx \l_tmpc_tl { \clist_item:Nn \l_taiwanxii_text_clist { \int_use:N \l_tmpa_int } } \rlap{ \hspace{\dimexpr \l_tmpa_tl\wd0-\wd0\relax} \raisebox{\dimexpr \ht0-\l_tmpb_tl\ht0\relax}{ \makebox[0pt][l]{ \raisebox{-\height}{ \scalebox{\fp_use:N \l_taiwanxii_overlayscale_fp}{ \fcolorbox{black}{white}{ \shortstack[c]{\l_tmpc_tl} } } } } } } } \caption[\l_taiwanxii_shortcaption_tl]{\l_taiwanxii_caption_tl} \label{fig:\l_taiwanxii_label_tl} \end{figure} } \ExplSyntaxOff \begin{document} \listoffigures \IMG{ image = example-image, caption = Caption I, shortcaption = Caption, label = figA, pos = H, scale = 0.6, x = {0.0,0.5,0.2,0.7,0.8}, y = {0.0,0.2,0.3,0.65,0.9}, text = {AA\\BB,AABB,A,B,C}, overlayscale = 0.75, } \IMG{ image = example-image, caption = Caption II, shortcaption = Caption, label = figB, pos = H, scale = 0.6, x = {0.2,0.5}, y = {0.2,0.3}, text = {AABB,A}, overlayscale = 1, } \end{document}
- verse environment that checks if the verse is numbered and has a titleby user1850133 on February 22, 2026 at 5:11 pm
I need a verse environment that for each verse, checks if there is a heading line and a number at the end and puts them with a special formatting if it finds. Of course not forgetting to dump that verse too. And if the verse does not have either the header or the number or both, skip this task. In the past I once asked for a verse environment that automatically numbers the verses. (Environment honouring newlines and add stuff before empty lines). I want that your solution is based on that one there that i validated. Don't use fontsize as it is creating a problem (though subtle). Here a header is starting with > and takes the entire line as the header. This header must be put bold in the document. The number at the end of the verse is always the last character in its line and preceded by "||" and any white-spaces. Latex must dump the verse up to the "||" and" puts the number this way 1 || 2 || 3 || after the verse's "||". \documentclass[a4paper]{article} \usepackage{fancyhdr} \setlength{\parindent}{0pt} \fancyhead[C]{lipsum text (dummy text)} \begin{document} lipsum text \\ (dummy text) \begin{myenv} Laborum molestias nam possimus omnis. Libero sit maiores quas asperiores nobis est nulla. Culpa sequi iste deserunt. ||1 Adipisci fuga et quis dicta est et odit. Illo aut nulla qui incidunt necessitatibus nulla qui. Sunt cumque voluptatem quasi quam ||2 >the peacock says ... % this is the "heading line" commodi culpa quaerat sunt. Debitis accusantium et porro et libero nulla ut est. Asperiores sed exercitationem aut. Ex sapiente ||3 >the elephant says Debitis nobis fugiat doloremque voluptates enim ratione. Unde || % not numbered, this one magni beatae magni. Unde voluptatum qui odio corporis quia. ||4 \end{myenv} \end{document}
- Image with multiple white boxes and text/lettersby palloc on February 22, 2026 at 4:56 pm
I have found the following question: Extend custom \IMG macro: add percentage-based overlay label (white box + letter) at (x%, y%) with separate scale I want exactly the same, but with more options: Multiple text boxes, so having two different text boxes should be feasible Multi-line support, so not just single-line, e.g., A\\B should work I also want to use \keys_define Previous question: I have a basic macro that inserts a figure with \includegraphics, caption, and label: \documentclass{report} \usepackage{graphicx} \usepackage{float} \newcommand{\IMG}[4]{ \begin{figure}[H] \centering \includegraphics[scale=#1]{#2} \caption{#3} \label{fig:#4} \end{figure} } \begin{document} \IMG{0.5}{example-image}{Caption}{figA} \IMG{0.6}{example-image}{Caption}{figB} \end{document} I want to extend it so I can overlay a letter inside a white square with a black border on top of the image, with the position given in percentages of the image size, and with a separate scale that affects only the overlay (box + letter), not the image. Desired call syntax: \IMG{imgscale}{filename}{caption}{label}{y}{x}{letter}{overlayscale} Where: imgscale is passed to \includegraphics[scale=...] (scales the image) y and x are relative coordinates inside the image (fractions / percentages of the image size): (y=0, x=0) corresponds to the top-left corner of the image y increases downward (south) x increases to the right (east) e.g. y=0.10 means 10% from the top, x=0.05 means 5% from the left letter is something like A, B, etc. (only one letter) overlayscale scales only the overlay (white square + letter), not the image the letter should be centered inside the square Example usage I want: \IMG{0.5}{example-image}{Caption}{figA}{0.10}{0.05}{A}{1.2} This should place a small white square (black border) near the top-left, at 5% from the left and 10% from the top, and put the letter A inside it. I’m open to tikz, overpic, etc., as long as the coordinates are relative to the image (not the page). Ideally the overlay moves correctly when the image scale changes. It should look like this: Maybe the best answer: \documentclass{report} \usepackage{graphicx} \usepackage{float} \usepackage{color} \newcommand{\IMG}[7]{% don't forget % at EOL \begin{figure}[H] \centering \sbox0{\includegraphics[scale=#1]{#2}}% \usebox{0}% \rlap{\hspace{-#5\wd0}{\raisebox{#6\ht0}{\llap{\fcolorbox{black}{white}{#7}}}}}% \caption{#3} \label{fig:#4} \end{figure}% } \begin{document} \IMG{0.5}{example-image}{Caption}{figA}{.1}{.2}{A} \IMG{0.6}{example-image}{Caption}{figB}{.3}{.3}{B} \end{document} just measures the scaled image, then uses \hspace and \raisebox to move the box.
- Usage of the `\lastskip` as a flagby forrest on February 22, 2026 at 10:48 am
I would like to modify the value of \lastskip inside the macro that serves for putting asterisk between two consecutive parts of text. This \lastskip value should be detected, if present, by the other macro - one intended for typesetting quotes. To check if an asterisk separator is directly above the quote, it seems necessary to use \lastskip as a "flag" containing this information. If the "flag" is set to some chosen unique value, the macro creating the quote adjusts the space above it (the space separating the quote from the asterisk) to match the default space between the asterisk separator and the plain text below. In other words the distances marked by v in the picture should be the same. In the code below the line to be fixed is marked. It is inspired by @David Carlisle answer. \documentclass[11pt,twoside]{memoir} \usepackage[T1]{fontenc} % output data in log-file \showoutput \showboxdepth=3 \newtoks\realoutput \realoutput\output \output{% \batchmode \showboxbreadth\maxdimen \showboxdepth\maxdimen \showbox255 \the\realoutput } % page setup \setstocksize{115mm}{120mm} \settrimmedsize{115mm}{120mm}{*} \settypeblocksize{95mm}{100mm}{*} \setlrmargins{10mm}{*}{*} \setulmargins{10mm}{*}{*} \setheadfoot{0pt}{0pt} \settypeoutlayoutunit{mm} \checkandfixthelayout \raggedbottom \newlength{\myfancybreakbeforelength} \newlength{\myfancybreakafterlength} \setlength{\myfancybreakbeforelength}{1.25\baselineskip} \setlength{\myfancybreakafterlength}{.5\baselineskip} \newdimen\uniquedim \uniquedim=10000pt \newenvironment{myquotation}{% \list{}{% {\setlength\leftmargin{\the\leftmargin}% \setlength\rightmargin{0mm}}% \listparindent=\parindent% \parsep=0cm% }% \item\relax\slshape% \ifdim\lastskip=\uniquedim % check if immediately above is asterisk-separator \addvspace{\glueexpr-\topsep-\parskip-\partopsep\relax}% eliminating vskip before the current list environment if the fancy break is just preceding \fi }{% \endlist%\par\nointerlineskip% } \makeatletter \def\@xaddvskipreversed{% based on the standard definition of \@xaddvskip \ifdim\lastskip<\@tempskipb \vskip-\lastskip \vskip\@tempskipb \else \ifdim\@tempskipb<\z@ \ifdim\lastskip<\z@ \else % \advance\@tempskipb\lastskip \vskip-\lastskip \vskip\@tempskipb \fi \else \vskip-\lastskip % added \vskip\@tempskipb % added \fi \fi } \def\addvspacereversed#1{% based on the standard definition of \addvspace, just changed \@xaddvskip -> \@xaddvskipreversed \ifvmode \if@minipage\else \ifdim \lastskip =\z@ \begingroup\setlength\skip@{#1}\vskip\skip@\endgroup% \else \setlength\@tempskipb{#1}% \@xaddvskipreversed \fi \fi \else \@noitemerr \fi } \makeatother % macro generating asterisk-separator %\newskip\lastskip \newcommand{\myfancybreak}[1]{% {\par\nointerlineskip\addvspacereversed{\myfancybreakbeforelength}\centering #1\par}% distance above the asterisk-separator and the separator itself \addvspace{\myfancybreakafterlength}% distance below the separator \vskip 0pt% \leavevmode\lastskip=\uniquedim% FIXME - setting the "flag" to be recognized by myquotation environment \par\nointerlineskip% } \begin{document} \pagestyle{empty} \section{Distance between fancy anonymous breaks and plain text paragraphs} Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. \myfancybreak{$\ast$Aa}% Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. \newpage \section{Distance between fancy anonymous breaks and quotations/lists} \begin{myquotation}% Some own-defined or standard quotation.% \end{myquotation}% \myfancybreak{$\ast$Aa}% \begin{myquotation}% Some own-defined or standard quotation.% \end{myquotation}% \begin{myquotation}% Some own-defined or standard quotation.% \end{myquotation} \end{document}
- Setting an OpenType MATH kern for a particular stylistic set glyphby Apoorv Potnis on February 22, 2026 at 9:14 am
How do I add a math kern for a particular glyph belonging to a particular stylistic set in an OpenType MATH font? As shown here, one adds the kern to a particular Unicode slot---[0x211D] in this case. If one chooses a particular stylistic set though, it does not work. The kern gets added to only the default glyph in the Unicode slot, and it does not carry over to the stylistic set glyph. I found that uni211D.bb is the glyph name of NewCM bb R using FontForge. Also, is it possible to define different kerns for distinct glyphs belonging to different stylistic sets, but the same Unicode point? \documentclass{article} \directlua{ local kerns = { ["NewCMMath-Book"] = { [0x211D] = { topright = { { kern = -100 } } } } } local function addkerns(tfmdata) if tfmdata.mathparameters then local kerns = kerns[tfmdata.properties.fontname] if kerns then local characters = tfmdata.characters for unicode, specification in pairs(kerns) do local character = characters[unicode] if character and not character.mathkerns then character.mathkerns = specification end end end end end fonts.handlers.otf.features.register { name = "mathkerns", description = "additional math kerns", initializers = { position = 1, base = addkerns, node = addkerns, } } } \usepackage{unicode-math} \setmainfont{NewCM10-Book.otf} \setmathfont[ StylisticSet={3}, BoldFont = NewCMMath-Bold.otf, RawFeature=+mathkerns ]{NewCMMath-Book.otf} \usepackage{lua-visual-debug} \lvdset{glyph={show=true}} \begin{document} \(\symbb{R}^n\) \end{document}
- What is the best way to draw a potato (like found in vector analysis/continuum mechanics courses)by Dimitrios ANAGNOSTOU on February 21, 2026 at 11:34 pm
I apologized if this is a duplicate. What is the best way to draw such figures with tikz (or other packages)? For the time being just the potato like figure. I do not care for the vectors and the infinitesimal mass element. I do not want someone to do the work for me. Just some advice or suggestions.
- Restricting the area in which text is typeset, for lettersby Stefan Müller on February 21, 2026 at 4:07 pm
I want to write a letter template. The code below works but has the disadvantage that one has to state how many lines a paragraph has, so that it does not spill over into the margin where the details about the university are. This is done by \pshape. The second page is supposed to use all the available space. So no \pshape is necessary here. I think there is a conceptual mistake in this code. LaTeX should know about the region it can use. Is there a way to do this with paper size or something so that \pshapeis not necessary any longer? \documentclass[% a4paper, foldmarks=true, foldmarks=blmTP, fromlogo=true, locfield=wide, refline=nodate, firstfoot=false, pagenumber=headright ]{scrlttr2} \setlength{\textwidth}{160mm}% \addtolength{\textheight}{5\baselineskip} \addtoplength{toaddrvpos}{-16mm} \setplength{refvpos}{9,5cm} %\addtoplength{refhpos}{15mm} \setplength{locvpos}{50mm} \setplength{locwidth}{50mm} %\setplength{refhpos}{6mm} % it doesn't work for left margin \setplength{lochpos}{4mm} % right margin \setplength{locheight}{22,2cm} \usepackage{libertine} % XeLaTeX + libertine + MnSymbol (math symbols) create problems \renewcommand\ttdefault{lmtt} % change typewriter font to lmodern (smaller than tt in libertine)mtt} \usepackage{lipsum} %%%%%%%%%%%%%%%%%%%%%%% %%% Author's Metadata \newcommand*\sender{Stefan Müller} % sender's name \newcommand*\degree{Prof. Dr.} % sender's degree \newcommand*\authortitle{\degree\ \sender } % sender: degree + name \newcommand*\mail{St.Mueller@hu-berlin.de} % sender's e-mail \newcommand*\website{https://hpsg.hu-berlin.de/\~{}stefan/} % sender's website \newcommand*\officehour{Montag, 14:00–15:00} % office hours \newcommand*\telf{$+$49\,30\,2093-9631} \newcommand*\addressee{Prüfungsbüro\\ -- im Hause --} \def\pshape#1{% \parshape #1 \pshapexiicm{#1} 0pt 16cm } \def\pshapexiicm#1{% \ifnum#1>1 0pt 12,5cm \expandafter \pshapexiicm\expandafter{\the\numexpr#1-1\expandafter\relax\expandafter}\fi} \setkomavar{location}{\begin{tabular}[t]{l@{}} % Faculty {\footnotesize \textbf{Sprach- und}}\\[-1mm] {\footnotesize \textbf{literaturwissenschaftliche}}\\[-1mm] {\footnotesize \textbf{Fakultät}}\\[3mm] % Institute {\footnotesize Institut für deutsche Sprache}\\[-1mm] {\footnotesize und Linguistik}\\[3mm] {\scriptsize Sprachwissenschaft des Deutschen,}\\[-1mm] % Area {\scriptsize Syntax}\\[3mm] % Author {\scriptsize \textbf{\authortitle}}\\[-1mm] {\scriptsize \mail }\\[-1mm] {\scriptsize \website }\\[8mm] % Date {\scriptsize \textbf{Datum:}}\\[-1mm] {\scriptsize \usekomavar{date}}\\[37mm] % Address post {\scriptsize \textbf{Postanschrift:}}\\[-1mm] {\scriptsize Humboldt-Universität zu Berlin }\\[-1mm] {\scriptsize Unter den Linden 6 }\\[-1mm] {\scriptsize 10099 Berlin }\\[-1mm] {\scriptsize Telefon 030 54321 }\\[20mm] % Address office {\scriptsize \textbf{Sitz:}}\\[-1mm] {\scriptsize Seminargebäude am Hegelplatz }\\[-1mm] {\scriptsize hegelplatz 1 }\\[-1mm] {\scriptsize 1115 Berlin }\\[-1mm] {\scriptsize Raum R1411}\\[44,5mm] % Consultation hours {\scriptsize \textbf{Sprechzeiten:}}\\[-1mm] {\scriptsize Mo: 23:00--23:15}\\[-1mm] %% Bank account % {\scriptsize \textbf{Bankverbindung:}}\\[-1mm] % {\scriptsize Deutsche Bank PGK AG}\\[-1mm] % {\scriptsize BIC/SWIFT: DEUTDED110}\\[-1mm] % {\scriptsize IBAN: DE 95 1007 0848 0512 620601} \end{tabular} } \begin{document} \begin{letter}{ %% ADDRESS (see texfiles/localmetadata for the commands) \tiny{ HU | Sprach- und literaturwissenschaftliche Fakultät,\\ Institut für deutsche Sprache und Linguistik | 10099 Berlin}% % \\ \vspace{1cm} % %%ADDRESSEE (specify above) \footnotesize{ \addressee} } \setkomavar{subject}{Some subject/Betreff} %% OPENING \opening{Sehr geehrte Damen und Herren,} %\opening{To whom it may concern,} %% CONTENT OF LETTER \pshape{24} \lipsum[1] \pshape{18} Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. Phasellus eu tellus sit amet tortor gravida placerat. Integer sapien est, iaculis in, pretium quis, viverra ac, nunc. Praesent eget sem vel leo ultrices bibendum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Curabitur auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim rutrum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Curabitur auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim rutrum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Curabitur auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim rutrum. Donec varius orci eget risus. Duis nibh mi, congue eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim rutrum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Curabitur auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim rutrum. \closing{Best wishes} \end{letter} \end{document}
- Latex: Tikz - rectangle to inherit the width of another rectangleby GJW on February 21, 2026 at 1:44 pm
I would like node B to have exactly the same width as node A, without explicitly specifying a fixed dimension, with the following constraints: The two nodes are not adjacent in the source code. I do not want to hard-code a width (e.g., minimum width=3cm). Node A will always be at least as wide as node B. I would prefer a solution that does not rely on manually computing dimensions via \path let unless necessary. Here is a minimal example illustrating what I currently have: \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \node [draw] (A) {Some text}; \path let \p1 = (A.south west), \p2 = (A.north east) in node [draw, minimum width=\x2-\x1-\pgflinewidth, minimum height=\y2-\y1-\pgflinewidth, below right] at ([yshift={\pgflinewidth}]A.south west) {more}; \end{tikzpicture} \end{document}
- Using tikz's backgrounds library to draw something behind textby Werner on February 21, 2026 at 7:20 am
Consider the following minimal example where I want to draw a rectangle behind a sequence of numbers (to highlight them): \documentclass{article} \usepackage{tikz} \usetikzlibrary{backgrounds,calc} \NewDocumentCommand{\tikzmark}{ m }{\tikz[overlay, remember picture] \node (#1) {};} \newcounter{seq} \NewDocumentCommand{\seqstart}{}{% \stepcounter{seq}% Start a new sequence \tikzmark{seq-start-\theseq}}% Set start marker \NewDocumentCommand{\seqend}{}{% \tikzmark{seq-end-\theseq}% Set end marker \tikz[remember picture, overlay] \scoped [on background layer] \fill [fill=blue!10!white] ($(seq-start-\theseq.south west) + (-0.5pt,1pt)$) rectangle ($(seq-end-\theseq.south east) + (0.5pt,1.1\normalbaselineskip)$);% } \begin{document} \[ 12, 15, 8, 11, 4, 7, 0, 3, 16, 19, 12, 15, 8, 11, 4, 7, 0, 3, \ldots \] \[ \seqstart{}12, 15, 8, 11, 4, 7, 0, 3, 16, 19\seqend{}, 12, 15, 8, 11, 4, 7, 0, 3, \ldots \] \end{document} The idea is that \seqstart would set a (counter-driven) \tikzmark representing the start of the sequence to be marked. Then \seqend would set a \tikzmark at the end and highlight it using the background layer. The counter allows for multiple such sequence marking within a larger document. However, the output shows that the rectangle highlighting a part of the sequence is not being drawn on background layer as requested. Why is that? How can I ensure the rectangle is drawn on the background layer behind document/text elements? The backgrounds library documentation (in the tikz documentation, section 45) mentions that on background layer can only be used inside a {scope} or \scoped, which is done above.
- Create a directed graphby Dimitrios ANAGNOSTOU on February 19, 2026 at 4:15 pm
I want to create the following figure. Using the following code, I managed to get something close. But I cannot figure out how to get properly the diagonal vectors without too much trial and error. Any ideas? Thanks a lot! \documentclass[a4paper,11pt]{article} \usepackage[T1]{fontenc} \usepackage[french]{babel} \usepackage{tikz} \usetikzlibrary{positioning,arrows.meta} \begin{document} \begin{figure}[!htpb] \centering \begin{tikzpicture}[ node distance=3cm, box/.style={draw, rectangle, minimum size=1.2cm, font=\large}, arr/.style={->, >=Stealth, thick} ] % Nodes \node[box] (1) {1}; \node[box, below=of 1] (2) {2}; \node[box, right=of 1] (3) {3}; \node[box, below=of 3] (4) {4}; % Labels n_i \node[above=3mm of 1] {$n_1=3$}; \node[above=3mm of 3] {$n_3=1$}; \node[below=3mm of 2] {$n_2=2$}; \node[below=3mm of 4] {$n_4=2$}; % Horizontal 1 <-> 3 (two parallel arrows) \draw[arr] ([yshift=4pt]1.east) -- ([yshift=4pt]3.west); \draw[arr] ([yshift=-4pt]3.west) -- ([yshift=-4pt]1.east); % Vertical left \draw[arr] (1) -- (2); % Vertical right \draw[arr] (4) -- (3); % Bottom horizontal \draw[arr] (2) -- (4); % Diagonals \draw[arr] (2) -- (3); \draw[arr] ([xshift=-4pt]4.north) -- ([xshift=4pt]1.south); \draw[arr] ([xshift=-4pt]1.south) -- ([xshift=4pt]4.north); \end{tikzpicture} \end{figure} \end{document}