tikz\latex: Scaling

asked May 27, 2021 in Bug
edited May 27, 2021

If I reduce the size of the created figure, I need to increase the text size of PlantUML.
The following statement inside @startuml leads to smaller text but increases the rectangles.

skinparam defaultFontSize 25

Using a size like 5 does the opposite. It changes the font size to a bigger font than normal  but the rectangles are decreasing and the text doesn't fit anymore to the boxes.

\begin{figure}[H]
\centering
\begin{subfigure}[b]{0.20\linewidth}
\catcode\#12
\begin{plantuml}
@startuml
skinparam defaultFontSize 5
start
if (Number) is ( < 5 ) then
:Number++;
endif
stop
@enduml
\end{plantuml}
\catcode\#13
\end{subfigure}
\end{figure}

commented May 27, 2021 by (3,320 points)

In the presented example there are 2 components

- TIKZ / LaTeX

- plantuml

Here we should concentrate us on the plantuml part:

      @startuml
skinparam defaultFontSize 5
start
if (Number) is ( < 5 ) then
:Number++;
endif
stop
@enduml

The size of the box looks like to be decreased (maybe not as much as expected though). When changing the fontsize  to 25 is looks all larger (and correct size, as it does when the complete skinparameter is removed.

So this all looks OK in my opinion when using version 1.2021.7.

Which version do you use:

@startuml

version

@enduml
commented May 27, 2021 by (55,740 points)
edited May 27, 2021 by The-Lu

Hello all,

Here are all the combinations:

 defaultFontSize 5 defaultFontSize 25 normal size no scale scale .5

Then perhaps the better small image is with:

scale .5
skinparam defaultFontSize 25

If that can help,
Regards,
Th.

 Your name to display (optional): Email me at this address if my answer is selected or commented on: Privacy: Your email address will only be used for sending these notifications. Anti-spam verification: [Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------) To avoid this verification in future, please log in or register.