Difference between revisions of "WritingRules"

From ArmadeusWiki
Jump to: navigation, search
(QDWL)
(Tables)
 
(22 intermediate revisions by 3 users not shown)
Line 2: Line 2:
  
 
==Shell commands==
 
==Shell commands==
* If you're speaking about a command launched as a '''normal user''' on your development Host then use:
+
* If you're speaking about a command launched as a '''user''' on your development Host then use:
<pre>
+
 
<source lang="bash">
+
<source lang="html4strict">
[  ] $ command
+
<pre class="host">
</source>
+
  [  ] $ command
 
</pre>
 
</pre>
* If you're speaking about a command launched as '''root''' on your development Host then use:
 
<pre>
 
<source lang="bash">
 
[  ] # command
 
 
</source>
 
</source>
 +
 +
That will give you :
 +
<pre class="host">
 +
  [  ] $ command
 
</pre>
 
</pre>
 +
 
* If you're speaking about a command launched on the '''target''' then use:
 
* If you're speaking about a command launched on the '''target''' then use:
<pre>
+
<source lang="html4strict">
<source lang="bash">
+
<pre class="apf">
 
  # command
 
  # command
 +
</pre>
 
</source>
 
</source>
 +
 +
That will give you :
 +
<pre class="apf">
 +
# command
 +
</pre>
 +
 +
* If you're speaking about a make menuconfig configuration then use :
 +
<source lang="html4strict">
 +
<pre class="config">
 +
[*] Networking support  --->
 +
    Wireless  --->
 +
        <*> Generic IEEE 802.11 Networking Stack (mac80211)
 +
</pre>
 +
</source>
 +
 +
That will give you :
 +
<pre class="config">
 +
[*] Networking support  --->
 +
    Wireless  --->
 +
        <*> Generic IEEE 802.11 Networking Stack (mac80211)
 
</pre>
 
</pre>
  
Line 27: Line 49:
 
</pre>
 
</pre>
  
= QDWL =
+
==Warning==
 +
 
 +
<pre>
 +
{{Warning| it's dangerous !}}
 +
</pre>
 +
 
 +
give :
 +
 
 +
{{Warning| it's dangerous !}}
 +
 
 +
==Note==
 +
 
 +
<pre>
 +
{{Note| A little information flash}}
 +
</pre>
 +
 
 +
give:
 +
 
 +
{{Note| A little information flash}}
 +
 
 +
==Pages under construction==
 +
* Use the "Under_Construction Template:
 +
<pre>
 +
{{Under_Construction}}
 +
</pre>
 +
<br />
 +
{{Under_Construction}}
 +
 
 +
== Page need update ==
 +
 
 +
* Some page are too old and may need some update. In that case use this template :
 +
<pre>
 +
{{Need_Update}}
 +
</pre>
 +
<br />
 +
{{Need_Update}}
 +
 
 +
== Page to be deleted ==
 +
 
 +
* Some pages may be too old and won't be updated. In that case, use this template :
 +
<pre>
 +
{{to_be_deleted}}
 +
</pre>
 +
<br />
 +
{{to_be_deleted}}
 +
 
 +
== QDWL ==
  
 
[http://code.google.com/p/qdwl/source/browse/trunk/QDWL.py '''Q'''uick and '''D'''irty '''W'''iki to '''L'''atex] is an home made script used to convert Wikimedia pages in Latex (that can be converted in pdf). To use this script, some special writing rules must be followed:
 
[http://code.google.com/p/qdwl/source/browse/trunk/QDWL.py '''Q'''uick and '''D'''irty '''W'''iki to '''L'''atex] is an home made script used to convert Wikimedia pages in Latex (that can be converted in pdf). To use this script, some special writing rules must be followed:
Line 61: Line 129:
 
To insert image, you must use the following syntax :
 
To insert image, you must use the following syntax :
 
<source lang="bash">
 
<source lang="bash">
[[image:imagename.png|center|frame|'''figure <number>''' - ''legend title'']]
+
[[image:imagename.png|center|500px|thumb|'''figure <number>''' - ''legend title'']]
 
</source>
 
</source>
 +
 +
Replace ''500px|thumb'' with ''frame'', if you want to keep the orignal size of the picture and have a legend.
  
 
If '''QDWL''' find this syntax, it will download the picture and print the legend.
 
If '''QDWL''' find this syntax, it will download the picture and print the legend.
 +
 +
==Tables==
 +
If you want to insert a table then please use the following template:
 +
<pre>
 +
{| border="1" cellpadding="5" cellspacing="0" summary="put summary here"
 +
|- style="background:#efefef;" align="center"
 +
! width="33%" | Title A !! width="33%" | Title B !! Title C
 +
|- align="center"
 +
| A1
 +
| B1
 +
| C1
 +
|- align="center"
 +
| A2
 +
| B2
 +
| C2
 +
|- align="center"
 +
| A3
 +
| B3
 +
| C3
 +
|}
 +
</pre>
 +
or
 +
<pre>
 +
{| border="1" cellpadding="5" cellspacing="0" summary="put summary here"
 +
|- style="background:#efefef;" align="center"
 +
! width="33%" | Title A !! width="33%" | Title B !! Title C
 +
|- align="center"
 +
| A1 || B1 || C1
 +
|- align="center"
 +
| A2 || B2 || C2
 +
|- align="center"
 +
| A3 || B3 || C3
 +
|}
 +
</pre>
 +
That will both give you:
 +
{| border="1" cellpadding="5" cellspacing="0" summary="put summary here"
 +
|- style="background:#efefef;" align="center"
 +
! width="33%" | Title A !! width="33%" | Title B !! Title C
 +
|- align="center"
 +
| A1
 +
| B1
 +
| C1
 +
|- align="center"
 +
| A2
 +
| B2
 +
| C2
 +
|- align="center"
 +
| A3
 +
| B3
 +
| C3
 +
|}
 +
 +
* There is a tool to generate the wiki code for you, if you have complicated tables to create: [http://www.tablesgenerator.com/mediawiki_tables]
 +
 +
==File/directory names==
 +
Please put the file/directory names in italic:
 +
<pre>
 +
''buildroot/target/device/armadeus/''
 +
</pre>
 +
which gives:
 +
''buildroot/target/device/armadeus/''
 +
 +
== Redirection ==
 +
 +
When several page name point on the same wiki page, it's a good idea to do a redirection page with following syntax :
 +
<pre>
 +
#REDIRECT [[destination_page]]
 +
</pre>

Latest revision as of 16:47, 17 February 2015

On this page are explained the rules to follow when writing articles for this wiki

Shell commands

  • If you're speaking about a command launched as a user on your development Host then use:
<pre class="host">
  [  ] $ command
</pre>

That will give you :

  [  ] $ command
  • If you're speaking about a command launched on the target then use:
<pre class="apf">
 # command
</pre>

That will give you :

 # command
  • If you're speaking about a make menuconfig configuration then use :
<pre class="config">
[*] Networking support  --->
    Wireless  --->
        <*> Generic IEEE 802.11 Networking Stack (mac80211)
</pre>

That will give you :

[*] Networking support  --->
    Wireless  --->
        <*> Generic IEEE 802.11 Networking Stack (mac80211)

Traduction

  • Use the "LanguageBar" Template to add multiple languages selection to your page:
 {{LanguageBar|Page_English_Name|Page_French_Name|Page_German_Name}}

Warning

{{Warning| it's dangerous !}}

give :

Warning Warning: it's dangerous !


Note

 {{Note| A little information flash}}

give:

Note Note: A little information flash


Pages under construction

  • Use the "Under_Construction Template:
 {{Under_Construction}}


Page under construction... Construction.png Informations on this page are not guaranteed !!

Page need update

  • Some page are too old and may need some update. In that case use this template :
 {{Need_Update}}


Update.png This page is too old and need some updates. Informations on this page are not guaranteed !! Update.png

Page to be deleted

  • Some pages may be too old and won't be updated. In that case, use this template :
 {{to_be_deleted}}


Update.png This page is obsolete and will be deleted soon Update.png

QDWL

Quick and Dirty Wiki to Latex is an home made script used to convert Wikimedia pages in Latex (that can be converted in pdf). To use this script, some special writing rules must be followed:

Source code syntax highlighting

  • When you write code or bash script directly in the Wiki, you must use the automatic syntax highlighting feature with "source" tag; for example:
<source lang="c">
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
    printf( "APF9328 says: Hello World ! ;-)\n" );
    exit(0);
}
</source>

will give you:

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
    printf( "APF9328 says: Hello World ! ;-)\n" );
    exit(0);
}

Insert image

To insert image, you must use the following syntax :

[[image:imagename.png|center|500px|thumb|'''figure <number>''' - ''legend title'']]

Replace 500px|thumb with frame, if you want to keep the orignal size of the picture and have a legend.

If QDWL find this syntax, it will download the picture and print the legend.

Tables

If you want to insert a table then please use the following template:

{| border="1" cellpadding="5" cellspacing="0" summary="put summary here"
|- style="background:#efefef;" align="center"
! width="33%" | Title A !! width="33%" | Title B !! Title C
|- align="center"
| A1
| B1
| C1
|- align="center"
| A2
| B2
| C2
|- align="center"
| A3
| B3
| C3
|}

or

{| border="1" cellpadding="5" cellspacing="0" summary="put summary here"
|- style="background:#efefef;" align="center"
! width="33%" | Title A !! width="33%" | Title B !! Title C
|- align="center"
| A1 || B1 || C1
|- align="center"
| A2 || B2 || C2
|- align="center"
| A3 || B3 || C3
|}

That will both give you:

Title A Title B Title C
A1 B1 C1
A2 B2 C2
A3 B3 C3
  • There is a tool to generate the wiki code for you, if you have complicated tables to create: [1]

File/directory names

Please put the file/directory names in italic:

''buildroot/target/device/armadeus/''

which gives: buildroot/target/device/armadeus/

Redirection

When several page name point on the same wiki page, it's a good idea to do a redirection page with following syntax :

#REDIRECT [[destination_page]]