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

'title' parameter of 'render' block should be caption of included diagram #6

Open
bandel65 opened this issue Nov 3, 2021 · 6 comments

Comments

@bandel65
Copy link

bandel65 commented Nov 3, 2021

i.e., the following:

@startuml
Alice -> Bob: hello
@enduml

...should result in this:

![Alice & Bob](.build/cache/0ec62f1568ac33e20ec8d430ae77a9cbe6c9cd46.svg "Alice & Bob")

...rather than this:

![](.build/cache/0ec62f1568ac33e20ec8d430ae77a9cbe6c9cd46.svg "Alice & Bob")
@CDSoft
Copy link
Owner

CDSoft commented Nov 4, 2021

In fact there should be a parameter for the caption and another one for the alternative text.
I'll add two parameters and use them in the right places.

@CDSoft
Copy link
Owner

CDSoft commented Nov 4, 2021

fixed

@bandel65
Copy link
Author

bandel65 commented Nov 4, 2021

For the following example, I would expect the figure caption "Figure 1: Repository Structure" to be displayed. But it isn't, at least not converting to PDF via LaTeX. Converting to markdown does yield expected syntax. Issue seems to be trailing "{.dot}" in resulting markdown. Removing manually and converting that markdown to PDF via LaTeX yields proper caption.

graph {
  fontsize=18.0
  splines="ortho"
  node [shape=folder fontname="Helvetica" width=2.0 fixedsize=true]
  sogs [root=true shape=box]
  sogs -- {
    lib
    scripts
	src
	system_test
	test
  }
}

@bandel65
Copy link
Author

bandel65 commented Nov 4, 2021 via email

@CDSoft
Copy link
Owner

CDSoft commented Nov 5, 2021

in

```{.dot render="{{dot}}" title="Repository Structure"}
graph {
...
}
```

.dot is not required. It's not even used to generate the diagram. I usually keep the .dot class to let my text editor colorize the source of the diagram using the appropriate syntax. You can remove it:

```{render="{{dot}}" title="Repository Structure"}
graph {
...
}
```

@bandel65
Copy link
Author

bandel65 commented Nov 5, 2021 via email

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

2 participants