• I want to create a new recipe in the LaTeX Workshop for working with Asymptote
    by Ascended Ru on December 12, 2025 at 1:04 pm

    How to create a recipe in the LateX workshop of the form: pdflatex -> asy -> pdflatex?

  • Reduce spacing in TikZ state diagram with split nodes
    by mingabua on December 12, 2025 at 11:55 am

    I have the following code to create a tikzpicture of a labelling algorithm. However, I am currently not satisfied with the way it looks right now. Every looks to big and to much spread out. How can I create a more condense but still clear version of it. This is my code: \documentclass{article} \usepackage[margin=1in]{geometry} \usepackage{tikz} \usepackage{amsmath} \usetikzlibrary{positioning, arrows.meta, shapes.multipart, calc} \usepackage{lipsum} \begin{document} \lipsum[1] \begin{figure}[htbp] \centering \begin{tikzpicture}[ scale=1, % --- STYLES --- node distance=2.5cm and 3cm, font=\sffamily\footnotesize, % Label Box labelnode/.style={ rectangle split, rectangle split parts=2, draw=black!80, rounded corners, fill=gray!5, align=center, inner sep=3pt, minimum width=2.1cm }, % Infeasible (MS Pruning) - Rot infeasible/.style={ labelnode, draw=red!80, fill=red!5, dashed }, % Dominated (History Dominance) - Lila dominated/.style={ labelnode, draw=violet!80, fill=violet!5, dashed }, % Optimal Path Node - Grün optimal/.style={ labelnode, draw=green!50!black, fill=green!10, line width=1pt }, % Edges worker/.style={-{Latex[length=3mm]}, blue!70!black, thick}, ai/.style={-{Latex[length=3mm]}, orange!80!black, thick}, optedge/.style={worker, line width=1.5pt, green!40!black}, prunededge/.style={-{Latex[length=3mm]}, red!70, dashed}, domedge/.style={-{Latex[length=3mm]}, violet!70, dashed} ] % --- ZEITACHSE --- % Verschiebung nach oben (y=7) und Skalierung x (Faktor 3.2) \draw[->, thick, gray] (0, 7) -- (10.5, 7) node[right] {Time $t$}; \foreach \x in {0,1,2,3} \node[gray] at (\x*3.2, 7.3) {$t=\x$}; % --- KNOTEN --- % t=0 \node[labelnode] (start) at (0,0) { \textbf{Start} \nodepart{second} $V=0$\\$\omega=0$ }; % t=1 % Worker \node[optimal] (t1_w) at (3.2, 2.0) { \textbf{W1} \nodepart{second} $V=3$\\$\omega=1.0$\\$h=[1]$ }; % AI \node[labelnode] (t1_a) at (3.2, -2.0) { \textbf{A1} \nodepart{second} $V=1$\\$\omega=0.3$\\$h=[0]$ }; % t=2 % PATH A: \node[optimal] (t2_ww) at (6.4, 3.8) { \textbf{W $\to$ W} \nodepart{second} $V=6$\\$\omega=2.0$\\$h=[1,1]$ }; % PATH B: \node[labelnode] (t2_aw) at (6.4, 0) { \textbf{AI $\to$ W} \nodepart{second} $V=4$\\$\omega=1.3$\\$\mathbf{h=[0,1]}$ }; % PATH C: \node[dominated] (t2_wa) at (6.4, -2.5) { \textbf{W $\to$ AI} \nodepart{second} \textit{Dominated}\\$V=4$\\$\omega=1.3$\\$\mathbf{h=[1,0]}$ }; % PATH D: \node[infeasible] (t2_aa) at (6.4, -4.5) { \textbf{AI $\to$ AI} \nodepart{second} \textit{Pruned}\\$h=[0,0]$ }; % PATH A+: W -> W -> W \node[optimal] (t3_www) at (9.6, 4.8) { \textbf{3 Workers} \nodepart{second} $V=9$\\$\omega=3.0$\\Target Met }; % --- Arcs --- % t0 -> t1 \draw[optedge] (start) -- (t1_w) node[midway, above, sloped] {W (+3)}; \draw[ai] (start) -- (t1_a) node[midway, below, sloped] {AI (+1)}; % t1 -> t2 \draw[optedge] (t1_w) -- (t2_ww) node[midway, above, sloped] {W (+3)}; \draw[ai] (t1_w) -- (t2_wa) node[midway, below, sloped, pos=0.3] {AI (+1)}; \draw[worker] (t1_a) -- (t2_aw) node[midway, above, sloped, pos=0.4] {W (+3)}; \draw[prunededge] (t1_a) -- (t2_aa) node[midway, below, sloped] {Violation}; % t2 -> t3 \draw[optedge] (t2_ww) -- (t3_www) node[midway, above, sloped] {W (+3)}; % --- DOMINANCE --- \draw[->, violet, thick] (t2_aw) -- (t2_wa) node[midway, right, align=left, font=\scriptsize, xshift=2mm] {\textbf{Dominance Check}}; % --- NOTES BEREICH UNTER DEM PLOT --- \node[align=left, text width=12cm, anchor=north west, font=\sffamily\small] at (-0.5, -5.5) { \textbf{Notes:}\\ }; \end{tikzpicture} \caption{Your caption here} \label{fig:your-label} \end{figure} \lipsum[2] \end{document}

  • How to remove line numbers in A&A template
    by Markus Schmassmann on December 12, 2025 at 10:56 am

    In earlier versions (verified with v9.1) of the Astronomy & Astrophysics template, it was possible to remove the line numbers by \documentclass[desactivate]{aa}. However, in the current version (9.3) this does not compile. How do I fix this. A current version of the template with a some content can be found on overleaf. A MWE is here: \documentclass{aa} \usepackage{lipsum} \begin{document} \title{Astronomy \& Astrophysics \LaTeX\ template} \author{M. Example\inst{1}} \institute{nowhere} \abstract{no context}{aimless}{stupid method}{without results}{or conclusions} \maketitle \lipsum[1] \end{document} Note that line numbers are only printed if \maketitle is present.

  • Simulating language-related OpenType font features
    by Apothikon on December 12, 2025 at 10:03 am

    In LuaLaTeX, is it possible to use babel (or anything else) to simulate some language-related OpenType features not defined in the font? I give an example of what I mean: Writing in ecclesiastical latin requires to put an acute accent on some vowels. On my Italian keyboard I've only the character é, thus typing á, í, ó, ú is quite inefficient. I would like to tell LaTeX that, inside an ecclesiasticallatin environment, whenever I type à, ì, ò, ù, it must be rendered as á, í, ó, ú. Thanks in advance.

  • Lyx: Two Table of Contents with Different Granularity Levels
    by texmex on December 12, 2025 at 9:53 am

    Please note, I am not a very advanced user of Lyx (or Latex). I am trying to accomplish the following when I export the PDF document from Lyx. I want to have two Table of Contents (TOC) in my document. The first TOC, named "Brief Contents" should have only the Sections and Parts. I know this can be done using: \setcounter{tocdepth}{0} and \addto\captionsenglish{% \renewcommand{\contentsname}{Brief Contents}% } Right after the first TOC I want a detailed TOC, named "Detailed Contents" with Sub-Sections also. The issue is adding this second TOC with a different tocdepth and name. I am not sure how to accomplish this in Lyx. I have spent a lot of time trying to various things. But I have not been able to do this. There is a crude solution that might work. Generate two PDFs each one with different \setcounter{tocdepth}{0} and combine them. But I am hoping there is a better solution than manually having to generate two PDFs and combine them. Related Questions Switching tocdepth in the middle of a document Creating a table of contents using \addcontentstline in LyX LyX - How to lower ToC depth of multiple entries Childish Downvote Behaviour Please note, anyone who downvoted the answer anonymously, kindly grow up. Explain why you did what you did. If not, do not engage in any activity since you are not contributing anything positive to the discussion. The answer given by Google AI works and solves the problem. So refrain from such behaviour. The question and the answer might be simple for you. But everything is simple when the steps and details are known. Please do not get carried away because you know a few extra details.

  • Draw line at right angle
    by user4035 on December 12, 2025 at 9:09 am

    Code: \documentclass[12pt]{standalone} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage[T2A]{fontenc} \usepackage{tikz} \usetikzlibrary{shapes, positioning, decorations.pathreplacing,calc,arrows} \begin{document} \begin{tikzpicture} \tikzset{ node/.style={draw, rectangle, rounded corners}, } \node [node] (excursions) {excursions}; \node [node, below right = 2.5cm of excursions] (excursions_cities_from) {excursions\_cities\_from}; \node [node, right = 3.5cm of excursions] (currencies) {currencies}; \draw[->] (currencies.west) -- node [below] {(id, currency\_id)} (excursions.east); \draw[->] (currencies.south) -> node [right] {(id, currency\_id)} (excursions_cities_from.north); \end{tikzpicture} \end{document} Is it possible to move the line \draw[->] (currencies.south) -> node [right] {(id, currency\_id)} (excursions_cities_from.north); to the position, indicated with red line? How to calculate coordinate from currencies.south - down until to top line of excursions_cities_from where the red arrow ends?

  • fontsize package: weird behavior
    by Iacobus1983 on December 12, 2025 at 8:49 am

    I compile with LuaLaTeX this quite simple code: \documentclass[11pt]{article} \usepackage{fontspec} \setmainfont[RawFeature=+onum]{EBGaramond} \usepackage{fontsize} %\changefontsize[14.5pt]{10.9pt} \usepackage{lipsum} \begin{document} \lipsum \end{document} If I uncomment %\changefontsize[14.5pt]{10.9pt}, I'd expect the output to be slightly smaller; yet, in fact it's slightly larger. Without \changefontsize: With \changefontsize: Why? (I fear it's just some trivial oversight of mine...)

  • What is the minimum set of commands to compile a plain tex file with UTF-8 Chinese characters to PDF?
    by merlin2011 on December 12, 2025 at 4:42 am

    Consider the following minimum Tex example with Chinese characters: 你好 \bye I tried to compile it the traditional way, and it produces an blank document: tex Hello.tex dvipdf Hello.dvi I tried to compile it with xetex and get an error: sudo apt install texlive-xetex xetex Hello.tex This is XeTeX, Version 3.141592653-2.6-0.999995 (TeX Live 2023/Debian) (preloaded format=xetex) restricted \write18 enabled. kpathsea: Running mktexfmt xetex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: /usr/share/texmf/web2c/fmtutil.cnf mktexfmt: /usr/share/texlive/texmf-dist/web2c/fmtutil.cnf mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /home/hq6/.texlive2023/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /home/hq6/.texlive2023/texmf-var/web2c mktexfmt [INFO]: Did not find entry for byfmt=xetex skipped mktexfmt [INFO]: not selected formats: 8 mktexfmt [INFO]: total formats: 8 mktexfmt [INFO]: exiting with status 0 I can't find the format file `xetex.fmt'! I tried running the command suggested in a different question and it completed successfully, but I still get the same error: sudo fmtutil-sys --all ... ... 50 preloaded fonts No pages of output. Transcript written on dviluatex.log. fmtutil [INFO]: log file copied to: /var/lib/texmf/web2c/luatex/dviluatex.log fmtutil [INFO]: /var/lib/texmf/web2c/luatex/dviluatex.fmt installed. fmtutil [INFO]: successfully rebuilt formats: 8 fmtutil [INFO]: total formats: 8 fmtutil [INFO]: exiting with status 0 How might I fix this error and compile the UTF-8 to PDF?

  • Problem inputing a file into another with LuaLaTeX
    by Knudsen on December 12, 2025 at 2:55 am

    I am trying to write a macro to input a set of small text files into a larger file, in lualatex, but seeing some variances how the text is inserted in the main file. So far I prepared this: \documentclass[11pt]{report} \usepackage{amsthm} \usepackage{polyglossia} \setmainfont{STIX Two Text} \usepackage[ a4paper, margin=4cm, marginparwidth=50pt, ]{geometry} \newtheoremstyle{problemstyle}% name of the style to be used {\topsep}% measure of space to leave above the theorem. E.g.: 3pt {\topsep}% measure of space to leave below the theorem. E.g.: 3pt {}% name of font to use in the body of the theorem {0pt}% measure of space to indent {\bfseries}% name of head font {}% punctuation between head and body { }% space after theorem head; " " = normal interword space {\thmname{#1}\thmnumber{ #2}\textbf{\thmnote{ (#3)}}} \theoremstyle{problemstyle} \newtheorem{problema}{\textbf{Problem}}[section] \newcommand{\bp}[1]{\begin{problema}[#1] \input{#1} \label{#1}\end{problema}} \begin{document} \bp{Fa87}% \begin{problema}[Fa87] Prove that $\cos^p \theta \leq \cos p\theta$ for $0 \leq \theta \leq \pi /2$ and $0 < p < 1$. \end{problema} \begin{problema}[Fa87] Prove that $\cos^p \theta \leq \cos p\theta$ for $0 \leq \theta \leq \pi /2$ and $0 < p < 1$. \end{problema} \begin{problema}[Fa87] Prove that $\cos^p \theta \leq \cos p\theta$ for $0 \leq \theta \leq \pi /2$ and $0 < p < 1$. \end{problema} \end{document} ẁith the text of Fa87 to be exactly Prove that $\cos^p \theta \leq \cos p\theta$ for $0 \leq \theta \leq \pi /2$ and $0 < p < 1$. all of it to be processed with lualatex. The variance can be seen here: where the spacing after the entry that uses the command \bp is about twice as much as the spacing of all others, entered directly into the text. Observe that the text introduced by the command is exactly the same as the one directly in the main file. The problem seems to be related to the text getting closer to the end of the line, but I fail to gresp how to address it.

  • Tikz vertical multipart rectangle error
    by ozsu on December 12, 2025 at 1:55 am

    I am having a problem with a multipart rectangle. I give a MWE below. I understand that the max number of parts are limited to 20. Following this, I added definitions for twentyone (newbox\pgfnodeparttwentyonebox) and twentytwo (newbox\pgfnodeparttwentytwobox) and that works when the multipart rectangle is horizontal. But, when it is vertical, it does not show twentyfirst and twentysecond parts and the node height of twentieth entry is very high. Not sure how to fix this and would appreciate help \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{shapes.multipart} \begin{document} \begin{tikzpicture} \newbox\pgfnodeparttwentyonebox \newbox\pgfnodeparttwentytwobox \node[ rectangle split, rectangle split parts=22, draw, align=center, rectangle split part fill={ green!50,green!50,green!50,green!50,green!50, % dict dates green!50,green!50,green!50,green!50,green!50,green!50, yellow,yellow,yellow,yellow,yellow, % bitmaps yellow,yellow, yellow,yellow,yellow,yellow,yellow } ] (recSt) {% % Dictionary (dates) \nodepart{one} {2005-11-01}% \nodepart{two} {1998-05-01}% \nodepart{three} {2009-04-22}% \nodepart{four} {1998-11-01}% \nodepart{five} {2010-05-01}% \nodepart{six} {2022-09-01}% \nodepart{seven} {2021-03-18}% \nodepart{eight} {2011-01-01}% \nodepart{nine} {0216-07-01}% \nodepart{ten}{2013-01-08}% \nodepart{eleven}{2017-10-10}% % Bitmaps (one-hot) \nodepart{twelve} {10000000000}% \nodepart{thirteen} {01000000000}% \nodepart{fourteen} {00100000000}% \nodepart{fifteen} {00010000000}% \nodepart{sixteen} {00001000000}% \nodepart{seventeen} {00000100000}% \nodepart{eighteen} {00000010000}% \nodepart{nineteen} {00000001000}% \nodepart{twenty}{00000000100}% \nodepart{twentyone}{00000000010}% \nodepart{twentytwo}{00000000001}% }; \end{tikzpicture} \end{document}

  • Official documentation of \pgfmathparse's behavior when processing a comma-separated list of ⟨expressions⟩?
    by Ulrich Diez on December 11, 2025 at 11:19 pm

    \pgfmathparse{(1*2),(2+2),(sqrt(36))} yields defining \pgfmathresult as macro:->{2.0}{4.0}{6.00000} : \documentclass{article} \usepackage{tikz} \begin{document} \pgfmathparse{(1*2),(2+2),(sqrt(36))} \ttfamily \meaning\pgfmathresult \end{document} But this feature of processing a comma-separated list of ⟨expressions⟩ via \pgfmathparse in one go for obtaining a list of undelimited macro arguments seems not documented clearly/explicitly in pgfmanual.pdf. Precise syntax-rules for the quantity "⟨expression⟩", which is introduced and referred to in in pgfmanual.pdf, seem to be missing, too. So the question is: Can you rely on \pgfmathparse calculating all components of a comma-separated tuple of independent ⟨expressions⟩ in one go and via \pgfmathresult delivering the results as a tuple of undelimited macro arguments? (In section "96 Customizing the Mathematical Engine" of the TikZ & PGF Manual for Version 3.1.11a you find: For functions with more than nine arguments, or functions with a variable number of arguments, these macros are only defined as taking one argument. The public macro expects its arguments to be comma separated, for example, \pgfmathVariableArgs{1.1,3.5,-1.5,2.6}. Each argument is parsed and passed on to the private macro as follows: \pgfmathVariableArgs@{{1.1}{3.5}{-1.5}{2.6}}. However, this does not exactly refer to \pgfmathparse/\pgfmathresult...)

  • Handwriting-style fonts [duplicate]
    by Latexfan on December 11, 2025 at 8:47 pm

    how can I creat the text format like this picture. It is not "kalam" format. Can you please help me that it can be compiled with pdftex? This is french. I wish to write in norwegian Thank you

  • Multipart rectangle error
    by ozsu on December 11, 2025 at 8:28 pm

    I am having a problem with a multipart rectangle. I give a MWE below. At \nodepart{twentyone} {\scriptsize 00000000010}% and \nodepart{twentytwo} {\scriptsize 00000000001}% it complains error: 45: Missing number, treated as zero. \nodepart{twentyone} { Any reason? Is there a max limit on the boxes? \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{shapes.multipart} \begin{document} \begin{tikzpicture} \node[ rectangle split, rectangle split horizontal, rectangle split parts=22, draw, minimum height=1cm, align=center, rectangle split part fill={ % --- FIX: Added commas before the % comments --- green!50,green!50,green!50,green!50,green!50,green!50, % dict dates green!50,green!50,green!50,green!50,green!50, % (11 parts) yellow,yellow,yellow,yellow,yellow,yellow, % bitmaps yellow,yellow,yellow,yellow,yellow,yellow % (11 parts) } ] (recSt) {% % Dictionary (dates) \nodepart{one} {\scriptsize 2005-11-01}% \nodepart{two} {\scriptsize 1998-05-01}% \nodepart{three} {\scriptsize 2009-04-22}% \nodepart{four} {\scriptsize 1998-11-01}% \nodepart{five} {\scriptsize 2010-05-01}% \nodepart{six} {\scriptsize 2022-09-01}% \nodepart{seven} {\scriptsize 2021-03-18}% \nodepart{eight} {\scriptsize 2011-01-01}% \nodepart{nine} {\scriptsize 0216-07-01}% \nodepart{ten} {\scriptsize 2013-01-08}% \nodepart{eleven} {\scriptsize 2017-10-10}% % Bitmaps (one-hot) \nodepart{twelve} {\scriptsize 10000000000}% \nodepart{thirteen} {\scriptsize 01000000000}% \nodepart{fourteen} {\scriptsize 00100000000}% \nodepart{fifteen} {\scriptsize 00010000000}% \nodepart{sixteen} {\scriptsize 00001000000}% \nodepart{seventeen} {\scriptsize 00000100000}% \nodepart{eighteen} {\scriptsize 00000010000}% \nodepart{nineteen} {\scriptsize 00000001000}% \nodepart{twenty} {\scriptsize 00000000100}% \nodepart{twentyone} {\scriptsize 00000000010}% \nodepart{twentytwo} {\scriptsize 00000000001}% }; \end{tikzpicture} \end{document}

  • Cannot get rid of "Label(s) may have changed" warning in a TikZ picture
    by pdini on December 11, 2025 at 7:04 pm

    I made partial progress on this question thanks to two answers to this question. The first answer, by David Carlisle, provides some very useful diagnostic code, which I used. The second answer, by Matthew Leingang, talks about a similar error to what I got involving TikZ and in particular pgfid*. The solution that worked for Leingang is not relevant to my code because I do not use \tkzstyle. Since I know next to nothing about TikZ and use it only occasionally, I am hoping someone can help me find the cause of the warning. It took me a while to isolate the problem in this code for a (rather odd-looking) table. The table is just showing two balance sheets, with nonsensical filler text. In this code example the arrows are not properly placed, but this is just because I am using a different class file. When using the class file of the journal this is supposed to go into the arrows come out fine (and, importantly, I get the same error). \documentclass[pdftex]{article} \usepackage{tikz} \usetikzlibrary{arrows,through} \usepackage{nicematrix} \usepackage{multirow,array} \usepackage{ragged2e,booktabs} \makeatletter \def\Cline#1#2{\@Cline#1#2\@nil} \def\@Cline#1-#2#3\@nil{% \omit \@multicnt#1% \advance\@multispan\m@ne \ifnum\@multicnt=\@ne\@firstofone{&\omit}\fi \@multicnt#2% \advance\@multicnt-#1% \advance\@multispan\@ne \leaders\hrule\@height#3\hfill \cr} \makeatother \newcolumntype{M}[1]{>{\Centering\arraybackslash}m{#1}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% This code by David Carlisle addresses the warning %%% 'Label(s) may have changed...' %%% It causes the specific labels causing the problem %%% to be output in the log file: \makeatletter \def\@testdef #1#2#3{ \def\reserved@a{#3}\expandafter \ifx \csname #1@#2\endcsname \reserved@a \else \typeout{^^Jlabel #2 changed:^^J% \meaning\reserved@a^^J% \expandafter\meaning\csname #1@#2\endcsname^^J}% \@tempswatrue \fi} \makeatother %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} \renewcommand{\arraystretch}{1.2} \begin{table} \small \centering \begin{tabular}{wc{2.3cm} !{\vrule width 1pt} wc{2.3cm} M{2.5cm} wc{2.3cm} !{\vrule width 1pt} wc{2.3cm} } \multicolumn{2}{c}{}&&\multicolumn{2}{c}{}\\ \small{A} & \small{B} & & \small{C} & \small{D} \\ \Cline{1-2}{1pt}\Cline{4-5}{1pt} \tikz[remember picture]\node (AD) {\small{11111}}; \tikz[remember picture]\node (X) {\small{22222}}; & \tikz[remember picture]\node (LD) {\small{33333}}; \tikz[remember picture]\node (X) {\small{44444}}; & & \tikz[remember picture]\node (X) {\small{11111}}; \tikz[remember picture]\node (AC) {\small{22222}}; & \tikz[remember picture]\node (X) {\small{33333}}; \tikz[remember picture]\node (LC) {\small{44444}}; \\ \tikz[remember picture]\node (AD) {$+\qquad$ }; \tikz[remember picture]\node (X) {$-$}; & \tikz[remember picture]\node (LD) {$-\qquad$}; \tikz[remember picture]\node (X) {$+$}; & & \tikz[remember picture]\node (X) {$+\qquad$}; \tikz[remember picture]\node (AC) {$-$}; & \tikz[remember picture]\node (X) {$-\qquad$}; \tikz[remember picture]\node (LC) {$+$}; \end{tabular} \begin{tikzpicture}[remember picture, ->, >=stealth', shorten >= -0.3cm, shorten <= -0.3cm, line width=1pt, auto] \draw[thick, draw=black, bend right=15] (LD) to (AC); \draw[dotted, draw=black, bend right=20] (AD) to (LC); \end{tikzpicture} \caption{This is the table caption} \label{tab:table1} \end{table} \end{document} Any help debugging this code is much appreciated.

  • Theorem numbers in smallcaps
    by xryophile on December 11, 2025 at 6:04 pm

    I have sectioning elements in my documents in bold smallcaps of various sizes. I was hoping to be able to achieve this with my theorems, remarks, etc. as well. However, while this works for the labels (i.e. "Theorem", "Definition", etc.) for some reason the numbers remain in upshape (although they are bolded). Is there some way to "smallcap" the number too? Here is a minimal (not) working example: \documentclass{article} \usepackage{tgpagella} % Need a font with scshape \usepackage{amsthm,thmtools} \declaretheoremstyle[ headfont=\scshape\normalsize\bfseries, ]{definition} \declaretheorem[style=definition] {definition} \begin{document} \setcounter{definition}{2} % Difference is clear with 3 \begin{definition} Number is bold, but not \\smallcaps. Bold \emph{and} small caps: \textbf{\textsc{3}}. \end{definition} \end{document} The result is N.B. I've tried using the headformat key of declaretheoremstyle too, passing things like \textsc{\NUMBER}, but this doesn't seem to help. [Although it does work with \NAME.] N.B.B. I'm using thmtools for reasons I've omitted from this MWE, so if an answer is possible within the framework of this package that would be excellent. Of course, if it can be done internally in amsthm or ntheorem that would be fine too. On the other hand, even though it may be possible to simply write a whole theorem environment from scratch, I'm not at this point inclined to fix this (minor) issue in this way.

  • Fit brackets around a fraction expression
    by category on December 11, 2025 at 5:55 pm

    The following code: \{ \frac{m}{n} \} creates a fraction that is larger than the brackets: how do I fit the fraction inside the brackets?

  • Maximum, minimum, saddle and inflection points
    by Dimitrios ANAGNOSTOU on December 11, 2025 at 5:27 pm

    I want to illustrate the different cases that can arise in a typical calculus course of functions of one variable. After searching a lot, I found a relevant question here. So, I am using the following code to plot a function for illustrating the various cases (local extremums, inflection and saddle points) along with the respective tangents. \documentclass[tikz,border=5pt]{standalone} \usepackage{pgfplots} \usetikzlibrary {intersections} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} \begin{axis}[ width=12cm, height=7cm, axis x line=middle, axis y line=middle, xlabel={$x$}, ylabel={$f(x)$}, xmin=-0.08, xmax=1.3, ymin=-0.008, ymax=0.01, samples=300, domain=-0.08:1.3, clip=false, xtick=\empty, ytick=\empty, xlabel style={at={(ticklabel cs:1)}, anchor=west}, ylabel style={at={(ticklabel cs:1)}, anchor=south} ] % === Polynomial (The function) === \addplot[very thick, blue, name path=poly] {(1/16)*x - (3/8)*x^2 + (37/48)*x^3 - (21/32)*x^4 + (1/5)*x^5}; % ======================================================= % === Critical points (f'(x)=0) and Horizontal Tangents === % Points: (0.125, 0.0033045), (0.5, -0.0009115), (1, 0.0020833) \addplot[only marks, mark=*, blue] coordinates { (0.125,0.0033045) (0.5,-0.0009115) (1,0.0020833) }; % Tangent segment 1 (Horizontal) \addplot[red, very thick, domain=-0.075:0.325, samples=2] {0.0033045}; % Tangent segment 2 (Horizontal) \addplot[red, very thick, domain=0.3:0.7, samples=2] { -0.0009115}; % Tangent segment 3 (Horizontal) \addplot[red, very thick, domain=0.8:1.2, samples=2] {0.0020833}; % ======================================================= % === Inflection points (f''(x)=0) and General Tangents === % Points: (0.2673, 0.0015571), (0.7014, 0.0004592) % Slopes: m1 ~ -0.019, m2 ~ 0.0104 \addplot[only marks, mark=*, orange] coordinates { (0.2673056,0.0015571) (0.7014444,0.0004592) }; % Tangent segment 4 (Inflection 1) \addplot[green, very thick, domain=0.0673:0.4673, samples=2] {-0.019*(x-0.2673056)+0.0015571}; % Tangent segment 5 (Inflection 2) \addplot[green, very thick, domain=0.5014:0.9014, samples=2] {0.0104*(x-0.7014444)+0.0004592}; % Origin label \node[anchor=north west] at (axis cs:0,0) {\small $O$}; \end{axis} \end{tikzpicture} \end{document} But this require a lot of manual calculations on my own. Is there a way or package to accelerate such calculus visualisations? A big thank you!

  • 2D-image of a coil winding around a cylinder with 'dash pattern'
    by cis on December 11, 2025 at 4:35 pm

    (2nd picture from here) I was wondering if it's possible to create a 2D-image of a coil winding around a cylinder, similar to the example shown above, using a dash pattern. If so, how do I configure it? \documentclass[margin=5pt]{standalone} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \begin{document} \begin{tikzpicture}[] \draw[] (0,-0.4) rectangle (5,0.4); \draw [decorate, decoration={coil, aspect=0.4, amplitude=5 mm, segment length=4mm, }, dash pattern=on 11mm off 8mm, dash phase=0mm ] (0,0) -- (5,0); \end{tikzpicture} \end{document}

  • Sidecaption and capion text bidi
    by الطريق طالب العلم on December 11, 2025 at 3:34 pm

    I'm having trouble creating Arabic sidebar text; it's not working properly. \documentclass[twoside]{book} \usepackage[]{geometry} \geometry{ paperwidth=8.49in,%210mm, paperheight=297mm, right=.8in,%42pt, top=72pt, textwidth=320pt, marginparsep=20pt, marginparwidth=180pt, reversemarginpar, textheight=650pt, footskip=40pt, } %\evensidemargin 1.5in %\oddsidemargin -0.1in \usepackage{graphicx} \usepackage{sidenotes} \NewDocumentCommand{\SideCaption}{sO{#3}mo}{% \IfBooleanTF{#1} {% \sidecaption* \IfNoValueTF{#4}{\sidecaption*{#3}}{\sidecaption*[#4]{#3}}% } {% \sidecaption \IfNoValueTF{#4}{\sidecaption[#2]{#3}}{\sidecaption[#2][#4]{#3}}% }% } \makeatletter \newcommand*{\centerfloat}{% \parindent \z@ \leftskip \z@ \@plus 0fil \@minus \textwidth \rightskip\leftskip \parfillskip \z@skip} \makeatother \usepackage{polyglossia} \setmainlanguage[numerals=maghrib,abjadjimnotail]{arabic} \setotherlanguage{english} \newfontfamily\englishfont[]{Times New Roman} \newfontfamily\englishfontsf[AutoFakeBold=4.1,AutoFakeSlant=0.28,AutoFakeBold=4.1]{HacenTunisia}% \newfontfamily\arabicfont[Script=Arabic,Scale=.92,ItalicFont=Amiri-Italic,BoldItalicFont=Amiri-BoldItalic,AutoFakeBold=4.5 ]{Calibri} \newfontfamily\arabicfontsf[Script=Arabic,AutoFakeSlant=-0.28,AutoFakeBold=4.1]{HacenTunisia} \begin{document} \listoffigures \begin{figure}[htb] \SideCaption{Text next to image 1}[-2\baselineskip] \includegraphics[width=\textwidth]{example-image-a} \end{figure} \begin{figure}[htb] \SideCaption[Lof text]{Text next to image 2}[-2\baselineskip] \includegraphics[width=\textwidth]{example-image-a} \end{figure} \begin{figure}[htb] \caption[Text in listoffigures]{Text next to image 3} \includegraphics[width=\textwidth]{example-image-a} \end{figure} \end{document}

  • METAFONT character sizes are unpredictable
    by Grzegorz Brzczyszczykiewicz on December 11, 2025 at 2:22 pm

    I thought I finally fixed a size issue, but when I wanted to fix a character and re-ran METAFONT, the dimensions are too big, and there is too much empty space. The results are similar to what I see here. I tried everything: define_pixels, removing hash marks, changing mode - NOTHING works. here is what I have: % strokeff.mf mode_setup; xoo#:=10pt; yoo#:=10pt; thick#:=8pt; define_pixels(xoo, yoo, thick); beginchar(0, 7*xoo#, 7*yoo#, 0); %H pickup pencircle scaled thick; draw (0*xoo#, 3*yoo#)--(6*xoo#, 3*yoo#); endchar; % more characters here, omitted beginchar(66, 0*xoo#, 0*yoo#, 0); %meant to be unused, just to test font pickup pencircle scaled thick; draw (0*xoo#, 0*yoo#)--(0*xoo#, 7*yoo#)--(7*xoo#, 7*yoo#)--(7*xoo#, 0*yoo#)..cycle; endchar; font_quad:=7*yoo#; font_normal_space:=7*xoo#; font_normal_stretch:=1*xoo#; font_normal_shrink:=1*xoo#; font_identifier:="strokeff"; font_coding_scheme:="FONT SPECIFIC" end and the .fd file: \DeclareFontFamily{U}{strokeff}{} \DeclareFontShape{U}{strokeff}{m}{n}{<-> strokeff}{}

  • Expansion of ~ in \index entries
    by richard on December 11, 2025 at 1:36 pm

    I have defined a command called \defn which formats its argument in bold and creates an index entry for it. I use it when defining a term in the text of the document. Here's a MWE showing a simplified version of it: \documentclass{book} \makeindex \newcommand\defn[1]{\textbf{#1}\index{#1}} \begin{document} I can write \defn{Q~set} instead of \textbf{Q~set}\index{Q~set}. \end{document} The problem arises in examples like the one above where I have a ~ in the index entry. (My publisher's house style is not to hyphenate this particular term and use a non-breaking space: it's not my choice.) My document, like the MWE above, has a mixture of instances of \defn and direct uses of \index where I don't want the bold formatting. However, they come out differently in the .idx file, meaning I get two identical looking index entries instead of one. This is what the MWE's .idx file looks like: \indexentry{Q\nobreakspace {}set}{1} \indexentry{Q~set}{1} I still want to be able to use \index directly as well as my \defn command. How do I fix the command or otherwise fix the code so that the two commands produce the same index entry? I've also tried changing the definition of \defn to use the TeX's \def built-in, in case this was a weirdness of how \newcommand works, but to no effect. I'm using XeLaTeX, but I've tested it in LaTeX which does the same.

  • odd left side space in tikz path`\draw`? [duplicate]
    by Explorer on December 11, 2025 at 11:55 am

    It's not very easy to describe the case in the title, I could only show the example: \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture}% % \draw[blue] (0.0,.5cm) -- +(1,0);% \node[anchor=south west,inner sep=0pt,outer sep=0pt,fill=red,text=white] at (0,0){test test};% \end{tikzpicture}% \end{document} However, if the extra line is \drawed: \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture}% \draw[blue] (0.0,.5cm) -- +(1,0);% \node[anchor=south west,inner sep=0pt,outer sep=0pt,fill=red,text=white] at (0,0){test test};% \end{tikzpicture}% \end{document} It gives: Noted the left blank area, appeared from the \draw[blue] (0.0,.5cm) -- +(1,0); . That looks like that \draw would extend the bounding box. Learning from here: Adding overlay is okay, but it would make the bounding box smaller, and is not elegant to eliminate the left blank area. My Question is as below: Is that elegant method to make \draw not extend bounding box around? How is this behavior documented? Is this the expected behavior that TikZ regards?

  • How to globally turn OFF a macro from the preamble?
    by Cham on December 11, 2025 at 5:08 am

    Consider the epigraph macro in the following MWE: \documentclass[11pt,twoside]{report} \usepackage[T1]{fontenc} \usepackage[tt=false]{libertinus} \usepackage[french]{babel} \usepackage[stretch=50]{microtype} \usepackage[letterpaper,left=1.25in,right=1in,top=0.5in,bottom=0.5in,includeheadfoot,headheight=15pt]{geometry} \usepackage{epigraph} \renewcommand{\textflush}{flushleft} \setlength{\epigraphrule}{0pt} \newcommand{\epig}[2]{\epigraphhead[1in]{\epigraph{\itshape\centering{#1}}{\itshape{#2}}}} \renewcommand{\epigraphflush}{center} \setlength{\epigraphwidth}{\textwidth} \begin{document} \chapter{Some title} \epig{ An epigraph. } Some text \end{document} My main text have many chapters, each one with an epigraph from that epig macro. For testings and various other reasons, I need to compile with and without the epigraphs. I can turn them off by adding % in the code, but it's tedious to do and to remove. So is there a way to turn the macro off by adding a simple piece of code to the macro definition, while leaving all the \epig{...} in the whole code (without having to add/remove %), and without getting compilation issues (warnings and errors)?

  • Conspicuous deficiency of the longdivision package
    by Michael Hardy on December 11, 2025 at 3:11 am

    This manual seems to say that this package does the arithmetic for you and only gives results that are correct and complete. I don't know how anyone who teaches mathematics fails to see what's wrong with that before they notice anything else. What if you want to write something like this: \begin{array}{rccccccccccccc} \bullet\bullet & ) & \bullet & \bullet & . & 0 & 0 & 0 & 0 \\ & & \bullet & \bullet \\ {} \\ & & & 3 & 0 \end{array} etc., and fill in some, but far from all, of the digits that follow, and then ask a question of students on an exam? You are concealing some of the digits from them and expecting them to answer the question with only the partial information given. Everybody does that every day, except those who don't teach things like this. Or what if you want to insert a digit that's wrong, and either ask examinees to identify the error or ask them why it's wrong? Apparently you can't do that with this package. How is it to be done?

  • Apply specific font and stroke to title text
    by Will Kim on December 11, 2025 at 2:05 am

    ar LaTeX users, I am trying to apply the font Alfa Slab One to the title text on my cover page and add a black stroke to it. Could you please help me with this?Thank you \documentclass[12pt]{book} \usepackage[margin=0.5in]{geometry} % % Packages \usepackage[utf8]{inputenc} \usepackage{amsmath, amssymb, amsfonts} % math symbols \usepackage{geometry} \usepackage{graphicx} % figures \usepackage{tikz} % drawings \usepackage{hyperref} % clickable links \usepackage{fancyhdr} % headers/footers \usepackage{titlesec} % formatting chapter titles % Page layout % \usepackage{pgfplots} \usepackage{mathtools} \usepackage{cancel} \usepackage{pgfplots} \usepackage{array} \usepackage{amsmath} \newtheorem{theorem}{THEOREM} \newtheorem{proof}{PROOF} \usepackage{tikz} \usepackage{amssymb} \usetikzlibrary{patterns} \usepackage{bigints} \usepackage{color} \usepackage{tcolorbox} \usepackage{cancel} \usepackage{soul} \usepackage{multirow} \usepackage{booktabs} \usepackage{dcolumn} \usepackage{graphicx} % Required for \includegraphics \usepackage{contour} %\usepackage{alfaslabone} \usepgfplotslibrary{fillbetween} %\usepackage{background} %\usepackage{fullpage, lipsum, tikz} %\usepackage{eso-pic} \usepackage{alfaslabone} } \begin{document} % % % Title \begin{titlepage} \centering \vspace*{3cm} {\Huge\bf \color{black} TITLE}\\[1cm] {\Huge\bfseries\color{black} TITLE2}\\[1cm] {\Large\it\color{black} AUTHOR}\\[1cm] \vfill % % %{\Large ME}\\ %{\Large \today} \end{titlepage} \end{document}

  • Compatibility issues between ibrackets and \underset/\overset/\substack
    by Sebastiano on December 10, 2025 at 10:22 pm

    The ibrackets package doesn't seem to work when I use \underset or \overset. \[ ]-\infty\underset{\substack{\uparrow \\ \frac{\pi}{2n}}}{,} a] \text { oppure } [a\underset{\substack{\uparrow \\ \frac{\pi}{2n}}}{,} \!+\infty[ \] I would like your opinion on how to adjust the spacing in this case as well, when I have a long text that should remain in normal style. \[ -\infty<\underset{\substack{\uparrow \\ punto \\di \\massimo}}{\frac{\pi}{2n}}<a \] I would prefer not to write the \text command three times. Here a MWE \documentclass[12pt,a4paper]{article} \usepackage{amsmath,amssymb,ibrackets} \begin{document} \[ ]-\infty\underset{\substack{\uparrow \\ \frac{\pi}{2n}}}{,} a] \text { oppure } [a\underset{\substack{\uparrow \\ \frac{\pi}{2n}}}{,} \!+\infty[ \] Ora in $x\in]-\infty,a]$, la funzione $f_n(x)$ è crescente ($k=0$) in $]-\pi/2n,\pi/2n[$, decrescente altrove, se \[ -\infty<\underset{\substack{\uparrow \\ punto \\di \\massimo}}{\frac{\pi}{2n}}<a \] allora \[ \sup_{\substack{]-\infty,a]\\ \frac {\pi}{2n}<a}} f_n(x)=f_n(c_n)=1/n^2 \] e qui si ha uniforme convergenza \end{document}

  • why tex4ht gives this invalid math conversion only in the table of content and not in the actual chapter header?
    by Nasser on December 10, 2025 at 10:06 pm

    Using TL 2025, this mwe \documentclass[12pt]{book} \usepackage{amsmath} \begin{document} \ifdefined\HCode \Configure{tableofcontents*}{chapter} \else \tableofcontents \fi \chapter{reflections $\prod_{v} I - v v^T$} text \end{document} Compiled with lualatex gives expected output for the toc But compiled using make4ht -ulm default -a debug A.tex 'mathjax,htm' Gives The problem only shows in the TOC, not in the actual chapter header. The HTML generated is <!DOCTYPE html> <html lang='en-US' xml:lang='en-US'> <head><title></title> <meta charset='utf-8' /> <meta content='TeX4ht (https://tug.org/tex4ht/)' name='generator' /> <meta content='width=device-width,initial-scale=1' name='viewport' /> <link href='A.css' rel='stylesheet' type='text/css' /> <meta content='A.tex' name='src' /> <script>window.MathJax = { tex: { tags: "ams", }, }; </script> <script async='async' id='MathJax-script' src='https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js' type='text/javascript'></script> </head><body> <!-- l. 12 --><p class='indent'> </p> <div class='tableofcontents'> <span class='chapterToc'>1 <a href='#reflections-v-i-v-vt' id='QQ2-1-1'>reflections <span class='mathjax-inline'>\(\DOTSB \prod@ \slimits@ _{v} I - v v^T\)</span></a></span> </div> <h2 class='chapterHead' id='reflections-v-i-v-vt'><span class='titlemark'>Chapter 1</span><br /><a id='x1-10001'></a>reflections <span class='mathjax-inline'>\(\prod _{v} I - v v^T\)</span></h2> <!-- l. 13 --><p class='noindent'>text </p> </body> </html> Is this a problem in tex4ht or mathjax? >which make4ht /usr/local/texlive/2025/bin/x86_64-linux/make4ht >make4ht --version make4ht version v0.4d >

  • Gradients in TikZ
    by karlh on December 10, 2025 at 3:53 am

    Based on the documentation, I would expect the two rectangles generated by this code to look identical: \documentclass{article} \usepackage{tikz} \begin{document} \pgfdeclarehorizontalshading{myshadingA} {1cm}{rgb(0cm)=(1,0,0); color(2cm)=(green); color(4cm)=(blue)} \begin{tikzpicture} \pgfuseshading{myshadingA} \shade [shading=myshadingA] (-2,-1) rectangle (2,-3); \end{tikzpicture} \end{document} However, this is clearly not the case. What am I doing wrong and/or misinterpreting in the documentation?

  • How many expl3 code lines are in the LaTeX kernel?
    by TeXtnik on December 9, 2025 at 11:27 pm

    I was courious to know how many line of expl3 code is in the LaTeX kernel. I run a python script (code below) to count the number of lines in each dtx file in the base directory of the LaTeX2e repository. The result I got is taht around 17% of the code is written in expl3. The breaking of this number for each file is below. I guess there are some improvements to be done: Don't count documentation lines. Include files in other directories (requires, tools ...) Use the striped tex files instead the dtx files? Some other? Can someone improve this estimate? (Apologize the use of python for these; I am force today to use a Windows machine, and I can't use some awk and shell tools to this work easier. I did it in a dirty way 🙁 ) total_lines expl3lines % alltt.dtx 224 0 0 classes.dtx 4505 0 0 doc.dtx 6293 517 8.2 docstrip.dtx 4603 0 0 exscale.dtx 202 0 0 fix-cm.dtx 829 0 0 fontdef.dtx 1623 0 0 graphpap.dtx 195 0 0 ifthen.dtx 558 0 0 inputenc.dtx 3053 0 0 latex209.dtx 1152 4 0.3 latexrelease.dtx 1355 237 17.5 latexsym.dtx 203 0 0 letter.dtx 1950 0 0 ltalloc.dtx 176 0 0 ltbibl.dtx 481 0 0 ltboxes.dtx 1622 0 0 ltclass.dtx 4171 2 0 ltcmd.dtx 5867 5753 98.1 ltcmdhooks.dtx 1865 1672 89.7 ltcntrl.dtx 326 0 0 ltcounts.dtx 881 0 0 ltdefns.dtx 2837 0 0 ltdirchk.dtx 1031 0 0 lterror.dtx 915 0 0 ltexpl.dtx 602 81 13.5 ltfilehook.dtx 1840 408 22.2 ltfiles.dtx 1842 20 1.1 ltfinal.dtx 1554 143 9.2 ltfloat.dtx 1690 0 0 ltfntcmd.dtx 806 0 0 ltfssaxes.dtx 4544 0 0 ltfssbas.dtx 2550 5 0.2 ltfsscmp.dtx 378 0 0 ltfssdcl.dtx 2234 131 5.9 ltfssini.dtx 2459 0 0 ltfsstrc.dtx 2053 25 1.2 lthooks.dtx 8160 5775 70.8 lthyphen.dtx 143 0 0 ltidxglo.dtx 218 0 0 ltkeys.dtx 740 573 77.4 ltlength.dtx 184 0 0 ltlists.dtx 1227 0 0 ltlogos.dtx 124 0 0 ltluatex.dtx 2201 0 0 ltmarks.dtx 2406 1519 63.1 ltmath.dtx 1483 0 0 ltmeta.dtx 251 81 32.3 ltmiscen.dtx 1899 0 0 ltoutenc.dtx 3861 0 0 ltoutput.dtx 6682 0 0 ltpage.dtx 438 41 9.4 ltpageno.dtx 101 0 0 ltpar.dtx 189 0 0 ltpara.dtx 1353 670 49.5 ltpictur.dtx 2046 0 0 ltplain.dtx 1745 0 0 ltproperties.dtx 1018 531 52.2 ltsect.dtx 1101 0 0 ltshipout.dtx 2270 1305 57.5 ltsockets.dtx 1218 459 37.7 ltspace.dtx 1500 0 0 lttab.dtx 1675 0 0 lttagging.dtx 1661 954 57.4 lttemplates.dtx 2830 2066 73 lttextcomp.dtx 2778 0 0 ltthm.dtx 319 0 0 ltvers.dtx 448 0 0 ltxdoc.dtx 728 0 0 ltxref.dtx 668 0 0 makeindx.dtx 313 0 0 newlfont.dtx 204 0 0 nfssfont.dtx 499 0 0 oldlfont.dtx 252 0 0 preload.dtx 269 0 0 proc.dtx 449 0 0 slides.dtx 2740 0 0 syntonly.dtx 282 0 0 utf8ienc.dtx 2327 0 0 Total 130469 22972 17.6 We can see that new features like ltcmd or the hook mechanism (ltchooks.dtx) are close to pure expl3. Despite the great work of the LaTeX project tema (small bang is getting bigger with the tagging), most parts of the kernel are not use expl3 at this moemnt. Are we going to see a 100% expl3 usage? Does this question make any sense? 😀 The code: import re import glob import pandas as pd def count_lines(filename): num_lines = sum(1 for _ in open(filename, encoding="utf8")) return num_lines starttag = "ExplSyntaxOn" endtag = "ExplSyntaxOff" pattern = rf"{starttag}(.*?){endtag}" # make pattern def count_expl3(filename): # get input with open(filename, "r", encoding="utf8") as fp: data = fp.read() # read in all the data to a string results = re.findall(pattern, data, flags=re.DOTALL) # DOTALL finds over multiple lines # print out results (you could write it to a file instead) find_lines = [] for res in results: for item in res.strip().split("\n"): find_lines.append(item) return len(find_lines) line_data = {} for latexfile in glob.glob("*.dtx"): total_lines = count_lines(latexfile) expl3_lines = count_expl3(latexfile) line_data[latexfile] = {"total_lines": total_lines, "expl3lines": expl3_lines} df = pd.DataFrame(line_data) df = df.head().transpose() df.loc['Total'] = df.sum(numeric_only=True) df['%'] = ((df["expl3lines"] / df["total_lines"]) * 100).round(1) print(df.to_markdown())

  • How to layout the two-side notes using Latex
    by xuehao on December 8, 2025 at 4:49 am

    The following is an example from an English book. I'm planning to rewrite it in latex. The layout is with an itemize of points in the middle, and with "CONNECTIONS" notes along the two sides. I tried to solve it using TikZ, but the vertical align is hard to control. \documentclass{article} \usepackage{graphicx} % Required for inserting images \usepackage{tikz} \begin{document} \begin{center} \begin{tikzpicture} \node[draw,text width=3.1cm] at (0cm,0) {CONNECTIONS Because \\ \vspace{\baselineskip} It \\ and \\ Though \\ Since ... not \\ only \\ but also \vspace{\baselineskip} }; \node[draw,text width=6.3cm] at (5.1cm,0) {\begin{center} POINTS \end{center} 1. Brazil needs to be developed. \\ 2. New city, Brasilia, built 600 miles, Rio. \\ 3. Designed Lucio Costa. \\ 4. Became capital 1960. \\ 5. Planned for modern living. \\ 6. People at first reluctant to go. \\ 7. 1960 - population increasing. \\ 8. Established as capital. }; \node[draw,text width=3.1cm] at (10.2cm,0) {CONNECTIONS \vspace{\baselineskip} which was built \\ and which \\ \vspace{\baselineskip} It \\ but \\ However, with the increase }; \end{tikzpicture} \end{center} \end{document} Anyone could give me any clever solution for this task?