Documentation standards
cover Documentation standards
This is a first attempt to standardize the way documentation (including diagrams) is created.
I'm proposing to write such rules in MarkDown format, for easier browsing. This is not included in the generated documentation anyway.
For SVG diagrams, proposing the first version of a template that should help creating new diagrams by copying and pasting shapes, boxes, arrows and clipart.
Your feedback is welcome. Standards for writing text, to add symbol references, for linking, etc., are not written yet. I'd like your opinion on how the specification draft looks like first, and of course your ideas to make it better.
Thanks in advance
Michael Opdenacker (1):
Start of documentation standards document
README | 6 + documentation/README | 9 +- documentation/standards.md | 102 +++ documentation/template/template.svg | 1160 +++++++++++++++++++++++++++ 4 files changed, 1276 insertions(+), 1 deletion(-) create mode 100644 documentation/standards.md create mode 100644 documentation/template/template.svg
Signature · 1 line
2.25.1
RFC 1/1 Start of documentation standards document
This first version specifies how to create consistent SGV graphics
--- README | 6 + documentation/README | 9 +- documentation/standards.md | 102 +++ documentation/template/template.svg | 1160 +++++++++++++++++++++++++++ 4 files changed, 1276 insertions(+), 1 deletion(-) create mode 100644 documentation/standards.md create mode 100644 documentation/template/template.svg
README +6 -0
@@ -7,6 +7,12 @@ Project components. In particular see the README under documentation/. An online version of the documentation can be found at: https://docs.yoctoproject.org +Contributing +============ + +Read the documentation/standards.md file with specifies some rules +to follow when contributing new documentation. + Where to Send Patches =====================
documentation/README +8 -1
@@ -56,9 +56,16 @@ poky.yaml This file defines variables used for documentation production. The variables are used to define release pathnames, URLs for the published manuals, etc. +standards.md +============ + +Specifies some rules to follow when contributing new documentation. + template ======== -Contains various templates, fonts, and some old PNG files. + +Contains a template.svg, to make it easier to create consistent +new SVG diagrams. Sphinx ======
documentation/standards.md new file +102 -0
102 lines not on this page · raw message
documentation/template/template.svg new file +1160 -0
1,160 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [docs] [RFC 1/1] Start of documentation standards document
Hi Michael,
Quoted 17 lines · Michael Opdenacker
This first version specifies how to create consistent SGV graphics
Signed-off-by Michael Opdenacker <[email protected]>--- README | 6 + documentation/README | 9 +- documentation/standards.md | 102 +++ documentation/template/template.svg | 1160 +++++++++++++++++++++++++++ 4 files changed, 1276 insertions(+), 1 deletion(-) create mode 100644 documentation/standards.md create mode 100644 documentation/template/template.svgREADME +0
-0
README Project components. In particular see the README under documentation/. · line 13
Quoted 7 lines
README +4
-0@@ -7,6 +7,12 @@ Project components. In particular see the README under documentation/. An online version of the documentation can be found at: https://urldefense.proofpoint.com/v2/url?u=https-3A__docs.yoctoproject.org&d=DwIFAg&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=QF3FZ993w-Eq44rMQY6KNn14ixpGQT25sTiSTI-PGOPWUDrRFhSlyigzrwqiikfb&s=-430Yj3FuRmdIcf5oy5dNhRKPmLckC_gby6i0CMj6Qg&e= +Contributing +============ + +Read the documentation/standards.md file with specifies some rules
s/with/which/
README Project components. In particular see the README under documentation/. · line 15
Quoted 2 lines
README +2
-0+to follow when contributing new documentation. +
s/new documentation/to the documentation/ ?
Quoted 8 lines
README +0
-0Where to Send Patches =====================documentation/README +0
-0
documentation/README poky.yaml · line 63
Quoted 8 lines
documentation/README +5
-0@@ -56,9 +56,16 @@ poky.yaml This file defines variables used for documentation production. The variables are used to define release pathnames, URLs for the published manuals, etc. +standards.md +============ + +Specifies some rules to follow when contributing new documentation. +
+This file specifies
s/new documentation/to the documentation/ ?
documentation/README poky.yaml · line 65
Quoted 2 lines
documentation/README +0
-0template ========
s/template/template\// ?
documentation/README poky.yaml · line 69
Quoted 5 lines
documentation/README +3
-1-Contains various templates, fonts, and some old PNG files. + +Contains a template.svg, to make it easier to create consistent +new SVG diagrams.
s/new// redundant with "to create" ?
Quoted 21 lines
documentation/README +0
-0Sphinx ======documentation/standards.md new file +13
-0@@ -0,0 +1,102 @@ +# Standards for contributing to Yocto Project documentation + +This document attemps to standardize the way the Yocto Project +documentation is created. + +It is currently a work in progress. + +## Text standards + +This section has not been filled yet + +## ReStructured Text Syntax standards +
documentation/standards.md line 23
Quoted 10 lines
documentation/standards.md new file +10
-0+This section has not been filled yet + +## Adding screenshots + +The preferred format for adding screenshots is +[Portable Network Graphics (PNG)](https://urldefense.proofpoint.com/v2/url?u=https-3A__en.wikipedia.org_wiki_Portable-5FNetwork-5FGraphics&d=DwIFAg&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=QF3FZ993w-Eq44rMQY6KNn14ixpGQT25sTiSTI-PGOPWUDrRFhSlyigzrwqiikfb&s=-nzeyBjDtATpahwb7Xr8TyZDe1O8W4X09Xc5l9zABvA&e= ). +Compared to the JPEG format, PNG is lossless and compresses screenshots better. + +Screenshots are usually stored in a `figures/` subdirectory. +
s/usually// It's a standard so let's encourage people to do it by not saying as if it were a suggestion :)
documentation/standards.md line 29
Quoted 6 lines
documentation/standards.md new file +6
-0+To include a screenshot in PNG format: + + .. image:: figures/user-configuration.png + :align: center + +Depending of the size of the image, you may also shrink it
s/Depending of/Depending on/
Quoted 9 lines
documentation/standards.md new file +9
-0+to prevent it from filling the whole page width: + + :scale: 50% + +For some types of screenshots, for example showing +programs displaying photographs or playing video, the JPEG +format may be more appropriate, because it is better at +compressing real-life images: +
documentation/standards.md line 48
Quoted 10 lines
documentation/standards.md new file +10
-0+ .. image:: figures/vlc.jpg + :align: center + :scale: 75% + +## Adding new diagrams + +New diagrams should be added in +[Scalable Vector Graphics (SVG) format](https://urldefense.proofpoint.com/v2/url?u=https-3A__en.wikipedia.org_wiki_Scalable-5FVector-5FGraphics&d=DwIFAg&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=QF3FZ993w-Eq44rMQY6KNn14ixpGQT25sTiSTI-PGOPWUDrRFhSlyigzrwqiikfb&s=U_vkD3055x6JoQUjZwpcc0mXYDLK6XGuF_JOVe3qpCo&e= ). +Thanks to this, diagrams render nicely at any zoom level on generated documentation, +instead of being pixellized.
s/pixellized/pixelated/ ?
documentation/standards.md line 58
Quoted 10 lines
documentation/standards.md new file +10
-0+ +The recommended tool for creating SVG diagrams for the Yocto Project +documentation is [Inkscape](https://urldefense.proofpoint.com/v2/url?u=https-3A__inkscape.org_&d=DwIFAg&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=QF3FZ993w-Eq44rMQY6KNn14ixpGQT25sTiSTI-PGOPWUDrRFhSlyigzrwqiikfb&s=c1dT8ta_JgI23fsbegExbb1Tc5IpzxvDkUmYMMWMCSU&e= ). + +### Colors + +The "GNOME HIG Colors" palette is used for our graphics +(get it from <https://urldefense.proofpoint.com/v2/url?u=https-3A__gitlab.gnome.org_Teams_Design_HIG-2Dapp-2Dicons_-2D_blob_master_GNOME-2520HIG.gpl&d=DwIFAg&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=QF3FZ993w-Eq44rMQY6KNn14ixpGQT25sTiSTI-PGOPWUDrRFhSlyigzrwqiikfb&s=6cYqH1OYrt_hp21c09Bm4naMFbxGx6VNLQ24IwHZ8H8&e= > +if you don't have it in your installation of Inkscape) +
"if you don't get it from Inkscape" ?
In any case, missing a point at the end of the sentence.
documentation/standards.md line 66
Quoted 8 lines
documentation/standards.md new file +8
-0+It's easier to use than the default one in Inkscape, +as it has fewer but sufficient colors. This is a way +to guarantee that we use consistent colors across the +diagrams used in our documentation. + +See <https://urldefense.proofpoint.com/v2/url?u=https-3A__inkscape-2Dmanuals.readthedocs.io_en_latest_palette.html&d=DwIFAg&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=QF3FZ993w-Eq44rMQY6KNn14ixpGQT25sTiSTI-PGOPWUDrRFhSlyigzrwqiikfb&s=azQJIziCwTC0mxAsM6_fThnhqmLRAAwjs4M8Y2S8TH4&e= > +for details about working with color palettes in Inkscape. +
While we're at the moment we pick color palettes, are we sure this one is ok for colorblind people?
documentation/standards.md line 70
Quoted 4 lines
documentation/standards.md new file +4
-0+### Template diagram + +The `template/` directory contains a `template.svg` file +to make it easier to create new diagrams.
s/new//
documentation/standards.md line 73
Quoted 3 lines
documentation/standards.md new file +3
-0+In particular, you can use it to copy standard text, shapes, +arrows and clipart to the new SVG document which you create. +
s/which you create//
documentation/standards.md line 76
Quoted 3 lines
documentation/standards.md new file +3
-0+### Fonts + +The recommend font for description text and labels is `Nimbus Roman`, size 10.
s/recommend/recommended/
documentation/standards.md line 78
Quoted 2 lines
documentation/standards.md new file +2
-0+Labels are with a bold style. +
s/with a bold style/in bold/ ?
documentation/standards.md line 80
Quoted 2 lines
documentation/standards.md new file +2
-0+`template.svg` contains ready to copy labels. +
s/ready to copy/ready-to-copy/ ?
documentation/standards.md line 84
Quoted 4 lines
documentation/standards.md new file +4
-0+### Text boxes + +Text boxes are rectangle boxes, with rounded corners, and contain centered text +or labels inside of them. Their stroke color is using a slightly darker color
s/inside of them// redundant with "contain" ?
"Their stroke color is slightly darker than their fill color." ?
documentation/standards.md line 96
Quoted 12 lines
documentation/standards.md new file +12
-0+that their fill color. + +See `template.svg` for example boxes with different colors, which are ready +to be reused. + +### Clipart + +To add new clipart, it's mandatory to use Public Domain files +which we can use in our documents without having license management +headackes. [Openclipart](https://urldefense.proofpoint.com/v2/url?u=https-3A__openclipart.org&d=DwIFAg&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=QF3FZ993w-Eq44rMQY6KNn14ixpGQT25sTiSTI-PGOPWUDrRFhSlyigzrwqiikfb&s=-BzxCi3tzcqHBWtyuR5QMN8QMYvh1crEF5GZD2G78C0&e= ) is the best +known and recommended source of such clipart. +
s/headackes/headaches/
In any case, I'd rephrase to something along the lines of:
"""
Only Public Domain files are accepted for cliparts. [Openclipart]... """
A bit more polite than "license management headaches" :)
We could also add a link to https://en.wikipedia.org/wiki/Public_domain
to explain what Public Domain is?
I would even go as far as to say the source of the clipart should be given in the commit log so that we can check ourselves?
documentation/standards.md line 98
Quoted 2 lines
documentation/standards.md new file +2
-0+For the sake of consistency across diagrams, we recommend +to use the same clipart as in existing diagrams, whenever possible.
s/same clipart as in existing diagrams/existing cliparts/ ?
documentation/standards.md line 102
Quoted 4 lines
documentation/standards.md new file +4
-0+Therefore, you should check existing clipart in `template.svg` first, +and if you don't find what you need there, find a new one on +[Openclipart](https://urldefense.proofpoint.com/v2/url?u=https-3A__openclipart.org&d=DwIFAg&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=QF3FZ993w-Eq44rMQY6KNn14ixpGQT25sTiSTI-PGOPWUDrRFhSlyigzrwqiikfb&s=-BzxCi3tzcqHBWtyuR5QMN8QMYvh1crEF5GZD2G78C0&e= ) which looks consistent with +existing clipart. Then, please add the new clipart to `template.svg`!
If I may suggest:
"""
If cliparts in template.svg do not satisfy your requirements, you can add to said file new cliparts, from e.g. Openclipart. Newly added cliparts shall stay consistent in style and color with existing ones. """
Thanks for starting this Michael, long overdue :)
I shall dig into my mail archives to add the rST rules we came up with some months ago :)
Cheers,
Quentin
Re: [docs] [RFC 1/1] Start of documentation standards document
Hi Quentin,
Many thanks for the review and the fixes!
I took all your suggestions. Let me just comment the open questions.
Quoted 8 lines · Quentin Schulz
documentation/standards.md line 58
Quoted 5 lines
documentation/standards.md new file +4
-0+The "GNOME HIG Colors" palette is used for our graphics +(get it from <https://urldefense.proofpoint.com/v2/url?u=https-3A__gitlab.gnome.org_Teams_Design_HIG-2Dapp-2Dicons_-2D_blob_master_GNOME-2520HIG.gpl&d=DwIFAg&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=QF3FZ993w-Eq44rMQY6KNn14ixpGQT25sTiSTI-PGOPWUDrRFhSlyigzrwqiikfb&s=6cYqH1OYrt_hp21c09Bm4naMFbxGx6VNLQ24IwHZ8H8&e= > +if you don't have it in your installation of Inkscape) +"if you don't get it from Inkscape" ?
In any case, missing a point at the end of the sentence.
I'll let you check the update I'm sending soon.
Quoted 2 lines
While we're at the moment we pick color palettes, are we sure this one is ok for colorblind people?
Oops, that's a serious concern. This prompted me to read
https://www.smashingmagazine.com/2016/06/improving-color-accessibility-for-color-blind-users/
Perhaps we should state that graphical items shouldn't be differentiated by color only. They should also use a different shape, pattern or different text. We could also make it mandatory to write text in black or white with sufficient contrast with the background.
In particular, using "red" or "green" should be the only way to differentiate between correct and incorrect. Additional shapes (such as STOP and OK signs) and text should explicit the difference.
What do you think?
Quoted 2 lines
I would even go as far as to say the source of the clipart should be given in the commit log so that we can check ourselves?
Makes sense. I added this.
Quoted 5 lines
Thanks for starting this Michael, long overdue :)
I shall dig into my mail archives to add the rST rules we came up with some months ago :)
I'm definitely interested in these rules.
Many thanks,
Michael.
Signature · 3 lines
Michael Opdenacker, Bootlin Embedded Linux and Kernel engineering https://bootlin.com