Help:Style - ArchWiki (original) (raw)

These style conventions encourage tidy, organized, and visually consistent articles. Follow them as closely as possible when editing the ArchWiki.

Article pages

Title

Layout

  1. Magic words (optional)
  2. Categories
  3. Interlanguage links (optional)
  4. Article status templates (optional)
  5. Related articles box (optional)
  6. Preface or introduction
  7. Table of contents (automatic)
  8. Article-specific sections.

Magic words

This rule applies in particular to {{DISPLAYTITLE:title}} and Template:Lowercase title, which makes use of the former.

Categories

Article status templates

Preface or introduction

Do not explicitly make an == Introduction == or == Preface == section: let it appear above the first section heading. A table of contents is shown automatically between the preface and first section when there are sufficient sections in the article.

Rather than paraphrasing or writing your own (possibly biased) description of a piece of software, you can use the upstream author's description, which can usually be found on the project's home page or about page, if it exists—an example is WireGuard. You may also use the description from Wikipedia, as is the case with ImageMagick.

See Help:Writing article introductions for more information.

Standard sections

"Installation" section
"Known issues" section
"Tips and tricks" section
"Troubleshooting" section
"See also" section

Section headings

See Some related article for more information.

For the same reason, also avoid using any kind of HTML or wiki markup code, including #Code formatting templates. See also Help:Style/Formatting and punctuation.

Formatting

Code formatting

$ sh ./hello_world.sh

Hello World

#!/bin/sh

Demo

echo "Hello World"

$ sh ./hello_world.sh

Hello World

~/hello_world.sh

#!/bin/sh

Demo

echo "Hello World"

Command line text

Keyboard keys

Notes, Warnings, Tips

A Note can also be used to highlight information that is important, but easily overlooked by someone new to the subject area.

In general, do not abuse Warnings: if you are undecided, chances are high that you should use a Note.

Tip

Tables

See mw:Help:Tables for the syntax.

Instructions

File editing requests

echo -e "clear\nreset" >> ~/.bash_logout should be:

Append the following lines to ~/.bash_logout:

clear
reset

A common exception are commands which involve generating a complex, system-specific output—for example, genfstab -U /mnt >> /mnt/etc/fstab.

Package management instructions

Official packages

Instead, just use a simple statement like:

Install the foobar package.

Or, if for example the application name differs from the package name:

MyApplication can be installed with the my-app-pkg package.

The instructions for the installation of a list of packages may appear as:

Install the foobar1, foobar2 and foobar3 packages.

If referring to a package group you may use:

Install the foobar group.

When referring to package groups, use Template:Grp instead; for example, {{Grp|foobar}}.

Install the foobar package from the official multilib repository.

AUR packages

Instead, just use a simple statement like:

Install the foobarAUR package.

Unofficial repositories

Install the foobar package from the example repository.

If the package is also available in the AUR:

Install the foobarAUR package, also available in the example repository.

If the package is available in the AUR with a different name:

Install the aurpkgAUR package, also available as builtpackage from the example repository.

systemd units operations

To have GDM launched at boot time, enable gdm.service.

Or, if for example the unit is a template that needs instantiation:

To enable automatic switching of netctl profiles on a wireless interface, enable an instance of netctl-auto@.service with the interface name; for example netctl-auto@wlan0.service.

You are granted the flexibility to adapt the wording to your specific article.

Coding style

Shells

Hypertext metaphor

See Help:Editing#Links for the syntax of internal, interwiki and external links.

A link can be used in two ways:

See these examples:

Topic reference Page/section reference
Use an SSH agent to speed up authentication. Follow SSH keys#SSH agents to speed up authentication.
Subpixel rendering is supported by most monitors. Enable subpixel rendering as described in Font configuration#Subpixel rendering.
Include a keyfile in the initramfs. Instructions can be found in dm-crypt/Device encryption#Keyfiles.
Be aware that mouse keys is disabled by default. See Wikipedia:Mouse keys for details.
We have style rules for links. The #Hypertext metaphor section has style rules for links.

For example: "Kernel parameters are used to issue system calls at boot; see the Linux kernel documentation for a complete list."

In general, maintain coherence with Help:Reading#Organization.

Man pages

Supported kernel versions

Non-pertinent content

Spelling

Language register

Category pages

Redirect pages

Redirects using interlanguage links are exceptionally allowed in accordance with Help:i18n, and upon authorization from the ArchWiki:Maintenance Team.

User pages

Generic rules

Edit summary

See ArchWiki:Contributing#The 3 fundamental rules.

HTML tags

Tip Common exceptions to this rule are when it is necessary to break a line in a list item and you cannot use a sub-item, or inside a template and you cannot use a list.