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

[doc] Clarification of ability to use titles and other notes #428

Open
zedfactorial opened this issue Oct 27, 2024 · 3 comments
Open

[doc] Clarification of ability to use titles and other notes #428

zedfactorial opened this issue Oct 27, 2024 · 3 comments

Comments

@zedfactorial
Copy link

For the past few hours I have been trying to understand if adding a title to the output image is possible.

I have gone through all documentation and the issues and found lots of discussion related to this, but it was in context of implementing .pdf output which really quickly goes in technical levels above my ability.

I dont need fancy PDF output, I'm just looking for a way to put a title (or any other text) anywhere on the output image. The examples in #32 look perfect, something like that would be great but Id be happy with a lot less.

I have gone through all the examples and the tutorials and found nothing where a title would be present. So Im assuming it's not there, at the same time some of the examples in the .pdf discussions include a lot more than what Im asking for.

So in short - can someone who is only capable of editing the .yml files get text on a image or no?

As a workaround I used a unconnected connector, which works pretty well. But annoyingly I found that I need to set it to have at least 1 pin which clutters up the title and makes it confusing to people I send the image to.

In any case an update of the documentation to clarify this for monkeys like me would be very nice.

Your help and patience is greatly appreciated.

Attached is the example of the workaround Im using now.
Untitled

@kvid
Copy link
Collaborator

kvid commented Oct 27, 2024

All our examples create a title (from metadata or filename) and a BOM in the HTML output that also includes the diagram. Demo02 demonstrates how this can be customized. See #227 (comment) for a suggested work-around to test including such things directly in the diagram. A similar issue is also discussed in #367.

@zedfactorial
Copy link
Author

All our examples create a title (from metadata or filename) and a BOM in the HTML output that also includes the diagram. Demo02 demonstrates how this can be customized. See #227 (comment) for a suggested work-around to test including such things directly in the diagram. A similar issue is also discussed in #367.

Hi, kvid. Thanks for the quick reply.

Thanks for the clarification about the HTML file. I was not aware of that, while it doesn't solve my problem its certainly useful to know.

The comment from 227 seems to be exactly what I was looking for, I tried it and it works, brilliant!

Before this I was not even aware that tweak existed. Maybe that should be in one of the examples? Seems like a great feature to be aware of.

Apologies in advance if it is and I missed it - I ctrl-F -ed the tutorial page and found no mention of it.

For me the situation is solved, thanks again!

@kvid
Copy link
Collaborator

kvid commented Oct 27, 2024

The tweak feature is still an experimental post-processing of the .gv output (input to Graphviz) and is mainly designed for developers testing stuff not yet implemented or bug work-arounds. It requires detailed knowledge of both the Graphviz syntax and what .gv output WireViz normally generates. The goal is to include useful functionality as ordinary features that doesn't require such knowledge. However, it has been useful in many issues, and might deserve an example some day, but describing the Graphviz syntax is clearly out of scope within this project.

In addition to demos, examples and tutorials, I recommend reading the syntax doc. The tweak feature is described there.

PS: Your 1-pin connectors might optionally be rendered without the single pin row by adding this attribute: style: simple

PPS: In addition to tittle, our standard HTML templates also support optional values for description and notes in the metadata section (will be included above and below the diagram in the HTML output).

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