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

Improve documentation describing how to set document wide diagram attribute values #197

Open
brtjdcole opened this issue Sep 29, 2018 · 6 comments

Comments

@brtjdcole
Copy link

I'd like to specify SVG as the default image rendering format for all my diagrams so I don't have to worry about selecting the /right/ resolution for images. Can't find a way to do this. From the look of it, Diagram extensions only respect :pos_attrs which, I assume, means the attribs must fall in the block description.

Am I missing something?

:generated-image-format: svg

[graphviz]
....
A->B;
....

vs.

[graphviz, save_name.svg, svg]
....
A->B:
....
@pepijnve
Copy link
Member

To specify the default format for a diagram type you should use a document attribute of the form <diagram-type>-format so for graphviz :graphviz-format: svg. Could you give that a try?

@brtjdcole
Copy link
Author

@pepijnve That does the trick. Did I miss this in the documentation or is it standard behavior for any attributes within an extension, i.e. -?

@pepijnve
Copy link
Member

pepijnve commented Oct 1, 2018

It’s documented but should probably be more explicit. Here’s the bit in question from the attributes section.

Each attribute can either be specified at the block level or at the document level. The attribute name at the block level should be prefixed with the name of the diagram type and a dash.

@pepijnve
Copy link
Member

pepijnve commented Oct 1, 2018

Rereading that sentence, it doesn’t actually make any sense. Should definitely be clarified.

@mojavelinux
Copy link
Member

You might also point out that the reason there is a dedicated attribute per diagram engine is that each diagram engine has vastly different capabilities and a one-size-fits-all attribute just wouldn't work.

@brtjdcole
Copy link
Author

brtjdcole commented Oct 1, 2018 via email

@pepijnve pepijnve changed the title Can't Specify Default Image Format for Blocks Improve documentation describing how to set document wide diagram attribute values Oct 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants