1 [[!meta title="Documentation style guide"]]
6 We use this style guide to keep our documentation clear, consistent, and
7 accessible to a global audience. Apply this style guide when writing new
8 documentation or when updating existing documentation.
13 Use references in the following order:
17 2. [Apple Style Guide](https://help.apple.com/applestyleguide/)
19 3. Other style guides:
21 - [Google developer documentation style guide](https://developers.google.com/style)
23 - [Microsoft Writing Style Guide](https://docs.microsoft.com/en-us/style-guide/welcome/).
25 We use US spelling. For spelling of words, we use the
26 [Merriam-Webster](https://www.merriam-webster.com/) dictionary.
28 The following resources can also be helpful when writing documentation for
31 Related online resources
32 ------------------------
35 [How Users Read on the Web](http://www.nngroup.com/articles/how-users-read-on-the-web/)
36 and [Be Succinct - Writing for the Web](http://www.nngroup.com/articles/be-succinct-writing-for-the-web/).
37 However do not use bold for scanning in instruction steps. Steps
38 should be short enough and bold mixes up with other GUI formatting.
40 - [Wikipedia](https://en.wikipedia.org/) and
41 [Webopedia](http://www.webopedia.com),
42 [WhatIs](https://www.techtarget.com/whatis/) can be used as terminology websites
48 <a id="administration-password"></a>
50 - **administration password** vs **root password**
52 Use *administration password*. Avoid *root password* even though many
53 Linux users would use it.
57 - When starting Tails, [[set up an administration password|doc/first_steps/welcome_screen/administration_password]].
59 - Start Tails and [[set up an administration
60 password|doc/first_steps/welcome_screen/administration_password]].
64 - **`alt` attributes for images**
66 The `alt` attribute of an image is, for example, read by screen readers
67 in place of images allowing the *content* and *function* of the image to
68 be accessible to those with visual or certain cognitive disabilities.
70 Every image must have an `alt` attribute but it can be empty (`alt=""`).
72 In the case of our documentation:
74 - Often screenshots require no additional information to clarify their
75 *content*. They often provide visual context that is useful for people
76 who see them but not necessary to people who don't see them.
78 - For graphical buttons or icons, use as `alt` attribute the text that
79 is read by the GNOME Screen Reader (or that you think should be read
80 if none is read). For example:
82 1. Click on the <span class="guimenu">
83 \[[!img lib/unlock.png alt="Unlock" class="symbolic" link="no"]]
86 For more guidelines and examples about writing good `alt` attributes,
87 read the article on [alternative text by
88 WebAIM](https://webaim.org/techniques/alttext/).
92 - **anchor** (HTML anchor)
94 Use HTML anchors to provide shortcuts when pointing people to sections
97 Keep them as short as possible as they appear in the URL.
99 Use lowercase and underscore to separate words.
103 - `<a id="2014">` in `doc/about/finances` to be able to point to
104 `https://tails.net/finances#2014`.
106 When adding an anchor to a section on a page that has a table of
107 content, add the `id` attribute directly to
108 the HTML heading. ikiwiki automatically references this anchor in the table
109 of content instead of the default value that might change over time.
115 <h1 id="my_section">My section</h1>
118 Creates a hyperlink to `#my_section` in the
119 table of content instead of a hyperlink to
120 `#index1h1` that might change with the
121 structure of the page.
123 To reduce translation work, avoid adding anchors to translated pages when we
124 are not using them anywhere on the website.
128 - **boot** vs **start**
130 Use *start* and *restart* as much as possible to refer to starting a
131 computer on Tails; *boot* is almost always unnecessary jargon.
133 You might use *boot* when the word is displayed to the user by the
134 computer or when writing for a technical audience, like in our
135 design documentation.
137 Use *boot* when referring to *boot options*, which are only
138 documented for workarounds or a technical audience.
142 - When starting Tails, add the `toram`
143 boot option. See our instructions on [[modifying the boot options using
144 the Boot Loader|doc/advanced_topics/boot_options]].
146 - To make the display work properly, [[add the following boot option using the
147 Boot Loader|doc/advanced_topics/boot_options]] when starting Tails:
151 <a id="boot-menu"></a>
153 - **Boot Menu** and **Boot Loader**
155 Use *Boot Loader* when referring to either *GRUB* or *SYSLINUX*.
159 - The Boot Loader is the first screen that appears when starting Tails.
161 Use *Boot Menu* and *Boot Menu key* when referring to the BIOS
162 screen that allows choosing from which device to start from.
164 [[!img install/inc/screenshots/boot_menu.png link="no" alt=""]]
166 <a id="bulleted-lists"></a>
170 Refer to this article from NN/g on [presenting bulleted
171 lists](https://www.nngroup.com/articles/presenting-bulleted-lists/).
173 Always add empty lines between list items to:
175 - Make them easier to read.
177 - Make them easier to translate. Each item from the list will be put
178 in a separate PO string in PO files by the PO plugin when building
181 <a id="capitalization"></a>
185 * **Use sentence case for titles and headings**
187 Do not capitalize the second or subsequent words,
188 unless they are proper nouns. Sentence case
189 looks less formal and is easier to read for a global audience.
191 See the [capitalization rules from Wikipedia](https://en.wikipedia.org/wiki/Wikipedia:Naming_conventions_%28capitalization%29).
193 * **Use title case for GUI items**
195 Buttons, dialogs, applications, menus, etc.
199 - **Code excerpts and error messages**
201 To write an entire paragraph as code that cannot wrap and stop interpreting
202 HTML within it, use either:
204 - 4 spaces as indentation, like in Markdown
208 To write an entire paragraph as code that can wrap and keep interpreting HTML
213 To write only some words as code and stop interpreting HTML within them, use
216 - Backticks (<span class="code">\`</span>), like in Markdown
220 To write only some words as code and keep interpreting HTML within them, use:
222 - `<span class="code">`
226 To write a command line as an entire paragraph that can be selected and
229 - `<p class="command">`
231 Such a command line cannot wrap to make it clear to the reader that it has
232 to be executed as a single command line.
234 To write a command line *template* as an entire paragraph that cannot be
235 selected and copied, use:
237 - `<p class="command-template">`
239 Such a command line cannot be selected to prevent the reader from executing
242 Within a command line template, delimit the placeholders that have to be
243 replaced by the reader with:
245 - `<span class="command-placeholder">`
247 To write a command line that has to be executed as root, use:
249 - `<p class="command-root">`
251 You can combine these different classes.
253 Explain how to replace the placeholders before giving out the full comman line.
259 Execute the following commands to install a new package. Replace
260 <span class="command-placeholder">package</span> with the package that
263 <p class="command-template command-root">
264 apt install <span class="command-placeholder">package</span>
269 Execute the following commands to install a new package. Replace
270 <span class="command-placeholder">package</span> with the package that
273 <p class="command-template command-root">
274 apt install <span class="command-placeholder">package</span>
279 - **CSS formatting for documentation**
281 Use the following Markdown and HTML
282 to style your documentation using CSS.
286 Capitalize the name of major features of Tails.
294 - Application and file names
296 Write in italic the names of files and GUI applications other than Tails.
298 Write as code the names of command line applications.
302 * Markdown: `*Thunderbird*`
304 * HTML: `<i>Thunderbird</i>`
306 * Result: *Thunderbird*
310 * Markdown: `*~/.gnupg/gpg.conf*`
312 * HTML: `<i>~/.gnupg/gpg.conf</i>`
314 * Result: *~/.gnupg/gpg.conf*
318 * Ping: <code>`ping`</code>
320 * HTML: `<code>ping</code>`
324 - Button names, GUI labels, key caps, and menu items
326 Write in bold button names, GUI labels, key caps, and menu items, especially
331 * Markdown: `Click **Save**.`
333 * HTML: `Click <b>Save</b>.`
335 * Result: Click **Save**.
337 In documentation, do not a not add the elipsis of the button label to
338 indicate that a dialog box will appear.
342 * Markdown: `Choose **Applications ▸ Tor Browser**`
344 * HTML: `Choose <b>Applications ▸ Tor Browser</b>`
346 * Result: Choose **Applications ▸ Tor Browser**
348 <a id="debian-versions"></a>
350 - **Debian and Ubuntu versions**
352 Refer to Debian and Ubuntu versions primarily by their number, and additionally
357 - Tails 3.0 is based on Debian 9 (Stretch)
359 - *Tails Installer* is available on Ubuntu 15.10 (Wily Werewolf) or later.
363 - **earlier** and **later**
365 Use to refer to versions of software.
367 Don't use *lower* and *higher* or *newer* and *older*.
369 Don't use "regular expressions" like *Tails 2.1.**.
373 - If you are running macOS 10.10 (Yosemite) or earlier
375 <a id="future-tense"></a>
379 Whenever possible, use present, not future, tense. Don't switch
380 unnecessarily from present to future tense when present tense is
381 sufficient to express a sequence of steps or events.
383 Present tense is easier to read than past or future tense. Simple verbs
384 are easier to read and understand than complex verbs, such as verbs in
385 the progressive or perfect tense.
387 <a id="digit-grouping"></a>
391 Use a non-breaking thin space (HTML entity: ` `) or a space to separate
392 groups of three digits.
398 See [[!wikipedia Decimal_separator#Digit_grouping]] and [[!wikipedia
401 <a id="gnome-application"></a>
403 - **GNOME applications: *Files*, *Disks*, etc.**
405 GNOME applications that have a common noun as their name (like
406 *Files* or *Disks*) can be confusing when referred
407 to in the documentation.
409 Make sure to clarify that you are referring to an application (and
410 not, for example, a set of files or disks):
414 - In the title of sections
416 - When first referring to the application in a section
420 - The *Files* browser
422 - The *Disks* utility
424 Otherwise, use the short name of the application as it appears in the menus when giving
425 instructions to be executed inside Tails.
429 - Open */live/persistence/TailsData_unlocked/dotfiles* in *Files*.
431 Prepend "*GNOME*" when giving instructions to be executed outside of
436 - Install *GNOME Disks* in Debian.
438 <a id="graphics-card"></a>
442 And not *graphics adapters*, *graphics*, *graphical hardware*, or
445 <a id="compress-image"></a>
447 - **Image compression**
449 - Images on our website are compressed and cleaned using the
450 [[compress-image.sh]] script. To run this script you need the
451 `zopfli` and `mat2` packages.
453 <a id="internet"></a>
457 Capitalize. When used as a noun, always preceded by *the*.
459 <a id="shortcuts"></a>
461 - **Ikiwiki shortcuts**
463 The `\[[!tails_ticket ..]]` and `\[[!wikipedia ..]]` strings you can find in some files are ikiwiki [[shortcuts]].
464 You might also need to understand [[ikiwiki directives|ikiwiki/directive]].
470 Write link labels that are both specific and short to help with the
471 findability and accessibility of content.
473 Links must be able to stand alone as people scan rather than read on the web.
475 See [NN/g: Better Link Labels: 4Ss for Encouraging Clicks](https://www.nngroup.com/articles/better-link-labels/).
477 <a id="mac-address"></a>
479 - **MAC address anonymization**
481 And not *MAC address spoofing*, or *MAC spoofing*.
483 We're still using *MAC spoofing* in internal and design documentation because
484 it's common tech jargon.
488 - **media** and **installation media**
490 Use only in rare occasions where it is especially relevant to mention
491 both USB sticks and DVDs.
493 Tails is now primarily advertised for USB sticks. We prefer making our
494 text easy to read for the majority of people using USB sticks than to
495 be exhaustive and always mention DVDs, implicitly or explicitly.
499 - Tails runs on a USB stick that you can plug in and use on almost
502 - It is not possible to install Tails on a hard disk. Tails is
503 designed to be a live system running from a removable media: USB
508 - **might**, **may**, **can**
510 Use *might* to express possibility.
512 Only use *may* to express permission.
514 Use *can* to express ability.
516 Only use *could* to refer to the past.
518 See [Microsoft Style Guide: can, may](https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/c/can-may).
520 <a id="network-interface"></a>
522 - **network interface**, **Wi-Fi interface**
524 And not *card*, *device*, or *adapter*.
526 Still, **USB Wi-Fi adapters** are USB dongles that provide a Wi-Fi interface.
532 Show numbers as numerals, and not letters.
534 See [NN/g: Show Numbers as Numerals When Writing for Online Readers](https://www.nngroup.com/articles/web-writing-show-numbers-as-numerals/).
536 <a id="persistent-storage"></a>
538 - **Persistent Storage**
540 And not *persistence* or *persistent volume*. Capitalize. Can be
541 introduced by *your*, *the*, *a* or no article depending on the
544 The Persistent Storage refers to both the feature and the encrypted
545 volume on the USB stick.
547 In rare occasions, we write *encrypted Persistent Storage*, for
548 example when introducing the concept. Otherwise, we rely on the
549 interface of the Welcome Screen to remind people that it is encrypted.
551 The Persistent Storage is *created* using the Persistent Storage settings and
552 *unlocked* in the Welcome Screen.
556 - Create a Persistent Storage on your Tails USB stick.
558 - Enter your passphrase to unlock your Persistent Storage.
560 - Everything in the Persistent Storage is encrypted automatically.
562 - Add To Persistent Storage (button)
564 <a id="persistent-folder"></a>
566 - ***Persistent* folder**
568 The folder */home/amnesia/Persistent/*.
572 - Save the database as `keepassx.kdbx` in the *Persistent* folder.
574 <a id="persistence-feature"></a>
576 - **feature of the Persistent Storage**
578 And not *Persistent Storage feature*.
580 To refer to the features available in the configuration of the
581 *Persistent Storage*.
583 The construction *of the Persistent Storage* can be omitted if
584 redundant in the context.
588 - To install additional software automatically when starting Tails, turn on
589 the [[Additional Software|doc/persistent_storage/configure#additional_software]]
590 feature of the Persistent Storage.
592 <a id="persistent"></a>
594 - **persistent** and **persist**
596 The property of something saved in the Persistent Storage and the act
597 of making something persistent. Use rarely.
601 - The Persistent Storage is optional and you always decide what is
602 persistent. Everything else is amnesic.
608 Avoid please except in situations where the user is asked to do
609 something inconvenient or the software is to blame for the situation.
611 <a id="procedures"></a>
613 - **procedures** (a series of steps)
615 Keep the number of steps low within a procedure (for example, below
616 10, ideally 7). For longer procedures, split them and give each
619 Add a blank line between each step.
621 Rely on the automatic numbered of Markdown and number all the steps
624 See also the *Microsoft Manual of Style: Procedures and technical
629 1. Make sure that you are connected to the Internet.
631 1. Start *Software Sources*.
633 1. Click on the **PPAs** button and then choose to **Add a new PPA...**.
639 - To encode and decode QR codes, you can use the [[qrcode-encode.sh]]
640 and [[qrcode-decode.sh]] scripts. To run these scripts
641 you need to install the `qrencode` and `zbar-tools` packages.
643 For example (run from Tails' source root):
645 wiki/src/contribute/how/documentation/qrcode-encode.sh https://tails.net/
647 Creates a QR code in tails_net.png. And:
649 wiki/src/contribute/how/documentation/qrcode-decode.sh tails_net.png
653 QR-Code:https://tails.net/
655 <a id="right-click"></a>
659 Trackpads on Mac have a single button. Control-click, the usual way of
660 doing right-click on Mac, does something different in Tails (and
661 Windows): it is used to select multiple items.
663 Always clarify how to do right-click on Mac:
667 - Right-click (on Mac, click with two fingers) on the file and
668 choose **Share via OnionShare**.
670 <a id="screenshot"></a>
674 Use screenshots only when they provide useful additional information to
675 complete the text. The text should be enough to follow our documentation but
676 screenshots might help provide context, engage the reader, or support a
679 We limit the number of screenshots to the minimum
680 because they take time to produce, they need frequent update, are harder to
681 translate, and are not accessible.
683 When using screenshots of full windows, we include the window decoration
684 and a border of blue background to clarify the context and the nature of
685 the image. To take such a screenshot:
687 1. In *Gimp* choose **File** ▸ **Create** ▸ **Screenshot**.
689 2. Select **Include windows decoration**.
691 3. Make sure the blue border (`0x204a87`) on each side of the screenshot is at least 18px.
693 Use the `screenshot` CSS class to add a gray shadow under the screenshot and
694 help distinguish them from the actual application.
696 \[[!img screenshot-good.png link="no" class="screenshot" alt=""]]
698 Most often, screenshots are not necessary to follow instructions and can have
699 an empty `alt` tag. Screenshots that describe new features, usually benefit
700 from an `alt` tag that describes what is new.
702 Compress screenshots using [[compress-image|style_guide#compress-image]].
704 When an element of a screenshot needs to be highlighted, for example
705 because the element is small, has no label or is in a place that is hard
706 to describe, highlight it in red using Gimp:
708 1. Create the base screenshot.
710 1. Create a new layer for the highlighting.
712 1. Create a red circle or rectangle with:
716 - Margin of 3 px with the highlighted element
720 [[!img screenshot-good.png link="no" class="screenshot" alt=""]]
724 [[!img screenshot-bad.png link="no" class="screenshot" alt=""]]
726 If the full size screenshot is too big, in the
727 [img directive](https://ikiwiki.info/ikiwiki/directive/img/):
729 - Check if the automatic resizing from local.css to `max-width: 100%` is enough already.
731 - Use the `size=""` attribute to resize it even more, if needed.
733 - Do not specify any `link=""` attribute to add a link to the full size
734 image, if that's useful.
736 <a id="secure-boot"></a>
740 Capitalize as a brand or feature. Writing *secure boot* would make it
741 sound more like a magic security feature (which it is not).
743 <a id="serial-comma"></a>
747 Place a [[!wikipedia serial comma]] immediately before the
748 coordinating conjunction (usually *and* or *or*) in a series of three
755 SVG are easier to maintain and look great on all screen sizes, but they are
756 not displayed in the *Safest* security level of *Tor Browser*.
757 ([[!tails_ticket 17805]])
759 Because of that, we don't use SVG images by default. Instead, do the following:
761 1. Export SVG images to PNG at the same size as they would be displayed on a large screen.
763 1. [[Compress the PNG image.|style_guide#compress-image]]
765 1. Store the SVG source side-by-side with its PNG version, to ease future
768 1. For the bigger and more significant images that could benefit from the
769 additional quality of SVG on bigger screens, you can add `class="svg"` to
770 the image so that [[!tails_gitweb wiki/src/lib/js/local.js]]
771 replaces it with the SVG version whenever JavaScript is available.
773 \[[!img city.png link="no" class="svg" alt=""]]
779 Use to refer to the installation of the operating system of the user.
781 Use *your Tails USB stick* when it's useful to refer to the physical medium more explicitly.
783 Use *your current Tails* to refer to the usual USB stick used by someone,
784 compared to another one, when cloning or creating a backup for example.
788 - A virus in Windows could corrupt your Tails.
790 - Plug your Tails USB stick into your computer.
796 The time between starting Tails and shutting it down.
798 <a id="tails-versions"></a>
802 Refer to Tails versions by their number. Optionally mention the month
803 and year of the release when it might help users evaluate the
804 relevance of an information, for example when mentioning important
805 changes in a past version.
809 - Tails 1.1 does not start in some virtualization environments.
811 - Tails does not work on 32-bit computers since Tails 3.0 (June 2017).
815 - **Tips, notes, cautions, bugs, and next**
817 Use tips, notes, and cautions to highlight important information.
823 <p>This tip could be useful to some readers.</p>
829 <p>This tip could be useful to some readers.</p>
837 <p>This note attracts attention.</p>
843 <p>This note attracts attention.</p>
849 <div class="caution">
851 <p>This warning describes something dangerous.</p>
855 <div class="caution">
857 <p>This warning describes something dangerous.</p>
865 <p>This bug describes an important flaw of the software.</p>
871 <p>This bug describes an important flaw of the software.</p>
879 <p>This note helps to know what to read next.</p>
885 <p>This note helps to know what to read next.</p>
893 <p>This note decribes a security attack and its likelihood.</p>
899 <p>This note decribes a security attack and its likelihood.</p>
905 - **update** vs **upgrade**
907 Use **upgrade** to refer to the replacement of a previous version of
912 - If you know someone you trust who already did the upgrade, you can
913 upgrade your Tails by cloning from their Tails.
915 You might use **update** to refer to other operations that update
916 some data or software outside of Tails releases.
920 - Make sure to update your *dotfiles* each time you use the **init**
921 command of *keyringer*.
923 - The packages from your list of additional software will be updated
924 automatically when you connect to the Internet.
926 <a id="usb-stick"></a>
930 And not *USB drive*, *USB*, *thumb drive*, or *flash drive*.
932 <a id="vulnerability"></a>
934 - **vulnerability** or **security vulnerability**
936 And not *hole*, *bug*, *issue*, or *exploit*.
938 <a id="welcome-screen"></a>
942 With an article. Not *Tails Greeter* or *the Greeter*.
946 - **Wrap to 80 characters but only when needed**
948 New documentation should be wrapped to 80 characters. However, please do
949 not submit patches that merely re-wrap existing text, as this makes it
950 harder to read the Git history.