Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add a \caption properly? #8

Open
schnells opened this issue Aug 8, 2018 · 3 comments
Open

How to add a \caption properly? #8

schnells opened this issue Aug 8, 2018 · 3 comments

Comments

@schnells
Copy link

schnells commented Aug 8, 2018

Hello,
I wanted to add a caption to my plantuml. I tried to solve this with wrapping inside a figure.
But now I have to problem that the plantuml floats sometimes in really bad ways, even sometimes it places itself between other lstlistings :/.

Is there a way to do better?

\begin{figure}[h]
	\begin{plantuml}
	
	@startuml
	Alice -> Bob: Authentication Request
	Bob --> Alice: Authentication Response

	Alice -> Bob: Another authentication Request
	Alice <-- Bob: another authentication Response
	@enduml
	
	\end{plantuml}
	\caption{my caption}
	\label{my label}
\end{figure}
@schnells
Copy link
Author

schnells commented Aug 8, 2018

I tried \begin{plantuml}[caption={my caption},captionpos=b] but this does not work

@koppor
Copy link
Owner

koppor commented Sep 15, 2019

Can you post a MWE for bad positioning? The figure approach is the right one. I assume, you do \begin{listing} without float option. Thus, please either let all listings float or all figures not float (not recommended! - \usepackage{float} offers H to turn off floating)

@aradnix
Copy link

aradnix commented Oct 8, 2019

I would try to isolate it, making my UML diagram into a separate document using the standalone class to get an image that I can insert as a figure and then make use of all the options of a floating object.

But that may be the most lazy and the least interesting solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants