Graphics, Figures & Tables ⇒ Smaller font /Overfull hbox
-
- Posts: 3
- Joined: Wed Dec 07, 2022 4:16 pm
Smaller font /Overfull hbox
Does anyone have any ideas how I can make the font smaller?
I want to write longer words into the graphic but I don't know where and which code I have to insert.
\documentclass[border=10pt,tikz]{standalone}
\usetikzlibrary{positioning,shapes.multipart,calc,arrows.meta}
\usepackage{caption}
\begin{document}
\begin{tikzpicture}
[
basic/.style={draw, text centered},
circ/.style={basic, circle, minimum size=2em, inner sep=1.5pt},
rect/.style={basic, text width=1.5em, text height=1em, text depth=.5em},
1 up 1 down/.style={basic, text width=1.5em, rectangle split, rectangle split horizontal=false, rectangle split parts=2},
>={Stealth[]}
]
\node [rect] (FLE) {$FLE$};
\node [rect, right=of FLE] (RI) {$RI$};
\node [rect, right=of RI] (PTP) {$PTP$};
\node [rect, above=of RI] (RT) {$RT$};
\node [rect, below=of RI] (PC) {$PC$};
\node [circ, left=of FLE] (SGS) {$SGS$};
\node [circ, below=of PTP.south west] (ATR) {$ATR$};
\node [circ, below=of PTP.south east] (FTP) {$FTP$};
\foreach \i/\j in {SGS/FLE,FLE/RI,ATR/PTP,FTP/PTP,PC/RI,RT/RI} \draw [->] (\i) -- (\j);
\foreach \i/\j in {PTP/RI} \draw [->] (\i) -- (\j);
\draw [white, densely dashed, shorten >=.4pt, shorten <=.4pt] (SGS) -- (FLE);
\draw [white, densely dashed, shorten >=.4pt, shorten <=.4pt] (ATR) -- (PTP);
\draw [white, densely dashed, shorten >=.4pt, shorten <=.4pt] (FTP) -- (PTP);
\end{tikzpicture}
\captionof{figure}{Flowchart of X}
\end{document}
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Smaller font /Overfull hbox
Have a look at "The node text", "Text parameters: font" in the PGF manual. In the version I have this begins in page 233.
In situations as you describe I used, for instance, "\font=\scriptsize".
Hope this helps!
Smaller font /Overfull hbox
As migf already said, read section 17.4.2 "Text Parameters: Font" of the


A suggestion to revise your example:
Code: Select all
\documentclass[border=10pt,tikz]{standalone}\usetikzlibrary{positioning,arrows.meta}\begin{document}\begin{tikzpicture}[basic/.style={draw, minimum size=2em, font=\small},circ/.style={basic, circle, inner sep=1.5pt},rect/.style={basic, text height=1em, text depth=.5em},<>/.style={shorten >=#1, shorten <=#1},>={Stealth}]\path [nodes=rect]node (FLE) {FLE}node [right=of FLE] (RI) {RI}node [right=of RI] (PTP) {PTP}node [above=of RI] (RT) {RT}node [below=of RI] (PC) {PC};\path [nodes=circ]node [left=of FLE] (SGS) {SGS}node [below=of PTP.south west] (ATR) {ATR}node [below=of PTP.south east] (FTP) {FTP};\foreach \i in {FLE,PC,PTP,RT}\draw [->] (\i) -- (RI);\path [->, densely dashed, <>=.4pt](SGS) edge (FLE)(ATR) edge (PTP)(FTP) edge (PTP);\end{tikzpicture}\end{document}