How to control box size?

0 votes
asked Oct 8, 2017 in To be sorted by DarcyHu (120 points)

Here is my uml code:

```

@startuml

start
: Input;
: Initialize;
repeat
    : Randomly select a sample pair;
    : Forward propagation;
    : Computing gradient;
    : Back propagation;
    : Caculate <latex>J_t</latex>;
repeat while (convergence?)
: Output;
stop
@enduml
 

```

which produces:

 

 

the width of the box differs, and look not so good, how could I control it?

And the math equation seems do not work well with text.

And if I could somehow add text to the arrow from "convergence?" to loop start, it will be great.

commented Feb 18, 2018 by Anthony-Gaudino (5,720 points)
The only way I know to have same size is using whitespace to force it.

1 Answer

0 votes
answered Feb 16, 2025 by kirchsth (7,760 points)

it can be set with style

<style>
activity {
  MinimumWidth 200
}
</style>

commented Feb 17, 2025 by The-Lu (89,080 points)

Hi all,

Good catch...


And just for the record:

>the width of the box differs, and look not so good, how could I control it?

Use style as mentioned by K.

>And the math equation seems do not work well with text.

See similar remark/request here:

>And if I could somehow add text to the arrow from "convergence?" to loop start, it will be great.

Use backward, see: 


Enjoy,
Regards,
Th.

...