Help:Editing/Tips

Habits of this wiki. For the markup itself, see Help:Editing.

Source code

edit

Put code in a fenced block and name its language, so it gets colours:

```pascal
program Test;
var
  I : Integer;
begin
  for I := 0 to 12 do
    WriteLn('Test ', I:2);
end.
```
program Test;
var
  I : Integer;
begin
  for I := 0 to 12 do
    WriteLn('Test ', I:2);
end.

These language names get colours:

Language Names
Free Pascal, Delphi pascal, pas, delphi, objectpascal, fpc, lazarus
Shell scripts and commands bash, sh, shell, console
SQL sql, pgsql, mysql
JavaScript javascript, js
JSON json
Go go, golang

Name the language for other code too (xml, ini, lfm, c, python, ...). It is shown without colours for now, and gets them as soon as the wiki supports that language.

For program output and other text that is no code, use text:

```text
Test  0
Test  1
```

A short piece of code inside a sentence goes between single backticks: `WriteLn` gives WriteLn.

Keys

edit

Write keys and key combinations with :kbd: :kbd[Ctrl+F12] gives Ctrl+F12, :kbd[F9] gives F9.

Notes, tips and warnings

edit
:::note
This is a note for the reader.
:::

:::tip
This is a tip for the reader.
:::

:::warning
This is a warning for the reader.
:::

This is a note for the reader.

This is a tip for the reader.

This is a warning for the reader.

edit

Link to the reference documentation on freepascal.org with an ordinary link:

[TStringList](https://www.freepascal.org/docs-html/rtl/classes/tstringlist.html)

Page names

edit
  • A page name starts with a capital letter. [[lazarus Tutorial]] and [[Lazarus Tutorial]] link to the same page.
  • Spaces and underscores are the same: [[Lazarus Tutorial]] and [[Lazarus_Tutorial]].
  • A slash makes a subpage: [[Lazarus Tutorial/Exercises]]. A subpage named after a language code is a translation (see Help:Add language bar).

Translations and categories

edit