EditingTips: Difference between revisions

From RadiWiki
Jump to navigation Jump to search
No edit summary
 
(20 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This page contains several tips and suggestions when editing pages on this [[RadiWiki]] website.
This page contains several tips and suggestions when editing pages on this [[RadiWiki]] website.
= General Editing help =
A basic help for editing of Wiki pages is present on the [https://www.mediawiki.org/wiki/Help:Formatting    Formatting] link.
= Paragraphs versus New lines =
It is common behavior to type text in paragraphs. The line breaking and layout of the paragraph is handled by the webbrowser, and is very depending on the width of the screen on which the page is shown. During the editing of a page, one should thus not worry about where line breaks should be included. A new paragraph can be started by including a single whiteline in the page text. '''Using the <<nowiki />BR /> is strongly discouraged!'''


= Internal MediaWiki links =
= Internal MediaWiki links =
Line 10: Line 16:


  <nowiki>Not: [http://wiki.dare.nl/wiki/index.php/RadiMation_Application_Note_107  RadiMation Application Note 107]
  <nowiki>Not: [http://wiki.dare.nl/wiki/index.php/RadiMation_Application_Note_107  RadiMation Application Note 107]
But: [[RadiMation Application Note 107]]</nowiki>
But: [[RadiMation Application Note 107]]</nowiki>


will result in:  
will result in:  


Not: [http://wiki.dare.nl/wiki/index.php/RadiMation_Application_Note_107  RadiMation Application Note 107]
Not: [http://wiki.dare.nl/wiki/index.php/RadiMation_Application_Note_107  RadiMation Application Note 107]
But: [[RadiMation Application Note 107]]
 
But: [[RadiMation Application Note 107]]


= RadiWiki Templates =
= RadiWiki Templates =
Line 32: Line 39:


== MailSupport ==
== MailSupport ==
A linked URL to support@radimation.com can be included using the 'MailSupport' template. The advantage of this Template is that it also will also use the name of the RadiWiki page as the subject of the e-mail.
A linked URL to {{MailSupport}} can be included using the 'MailSupport' template. The advantage of this Template is that it also will also use the name of the RadiWiki page as the subject of the e-mail.
For example:
For example:


Line 61: Line 68:


{{Menu|Configuration|Configuration|Tab-name|Element}}
{{Menu|Configuration|Configuration|Tab-name|Element}}
== ReportGeneratorCode ==
Showing a report generator code can be challenging in MediaWiki, because the | is also used for template sepeators and table formatting.
The 'ReportGeneratorCode' can be used to simplify this.
Also the 'ReportGeneratorInfo' template can be used to generate a box that indicates that the content is related to the report generator.
For example:
<nowiki>{{ReportGeneratorInfo|The most often used report generate code is: {{ReportGeneratorCode|EUT|NAME}} }}</nowiki>
will result in:
{{ReportGeneratorInfo|The most often used report generate code is: {{ReportGeneratorCode|EUT|NAME}} }}


= Hide the Table of Contents =
= Hide the Table of Contents =
On several pages it is not desired to also have the Table of Contents (TOC) being shown.
On several pages it is not desired to also have the Table of Contents (TOC) being shown.
The Table of Contents can be hidden on a page, by including the 'Magic keyword': __NOTOC__ on the first line of the Wiki-text.
The Table of Contents can be hidden on a page, by including the 'Magic keyword': <nowiki>__NOTOC__</nowiki> on the first line of the Wiki-text.


This is a standard MediaWiki template, and not specific to the RadiWiki.
This is a standard MediaWiki template, and not specific to the RadiWiki.


= No article/page not found text =
= No article/page not found text =
When a page is non existent wiki normally offers you to create a new page. We use this page to show general support information so the customer at least gets re-directed to support. There are two pages that are displayed when a article is not found. One for the users that have permission to edit and one fo users that don't.
When a page is non existent wiki normally offers you to create a new page. We use this page to show general support information so the customer at least gets re-directed to support. There are two pages that are displayed when a article is not found. One for the users that have permission to edit and one of users that do not have editing permissions.


Because our users can't edit the pages we need to change http://wiki.dare.nl/wiki/index.php/MediaWiki:Noarticletext-nopermission
Because our users can't edit the pages we need to change http://wiki.dare.nl/wiki/index.php/MediaWiki:Noarticletext-nopermission
Line 86: Line 108:


<math>Z{t} = \frac{V{p}}{V{in}}</math>
<math>Z{t} = \frac{V{p}}{V{in}}</math>
= Numbered lists =
A numbered list can be created by placing "#" before each row which must be numbered.
For example:
# List entry 1
# List entry 2
# List entry 3
# List entry 4
== Images within a numbered list ==
When for example a numbered list is used to communicate step by step instructions in which also images are used.
The tag "< BR />"(without the spaces) can be used to add a new line within the numbered list on which the image can then be inserted.
For example:
# List entry 1
# List entry 2
# List entry 3 <BR />[[File:NRX-AdvancedSettingsGPIB.PNG]]<BR />
# List entry 4
= Hiding automatically generated sections =
The 'DeviceDriverInfo' macro generates a generic page with some automatically generated contents. (Also see: [[Template:DeviceDriverInfo]]).
The automaticly generated section on the page can be hidden from being present by adding "|HideAutoData=1" to the macro.
= Nicely formatted tables =
The standard table formatting, generates a table with no borders, which results in some floating texts that seem to be space seperated. A better looking table can be generated by specifying the 'wikitable' class style.
<nowiki>
{|class="wikitable"
! First header row || Description
|-
| Row 1 || An explanation
|-
| Row 2 || A second explanation
|}
</nowiki>
Will result in:
{|class="wikitable"
! First header row || Description
|-
| Row 1 || An explanation
|-
| Row 2 || A second explanation
|}
= Using fixed width font to include formatted text =
When adding formatted text such as code examples, the first character on a new line must be a whitespace. This shall keep the original formatting of the code from being changed.
For example:
int DeterminePaddingAmount(void) {
    int requiredAmountOfPadding = 0;
    requiredAmountOfPadding = (int)m_PreviousTextString.length() - (int)m_ReplacedTextString.length();
    return requiredAmountOfPadding;
Instead of:
int DeterminePaddingAmount(void) {
    int requiredAmountOfPadding = 0;
    requiredAmountOfPadding = (int)m_PreviousTextString.length() - (int)m_ReplacedTextString.length();
    return requiredAmountOfPadding;

Latest revision as of 09:19, 23 January 2024

This page contains several tips and suggestions when editing pages on this RadiWiki website.

General Editing help[edit]

A basic help for editing of Wiki pages is present on the Formatting link.

Paragraphs versus New lines[edit]

It is common behavior to type text in paragraphs. The line breaking and layout of the paragraph is handled by the webbrowser, and is very depending on the width of the screen on which the page is shown. During the editing of a page, one should thus not worry about where line breaks should be included. A new paragraph can be started by including a single whiteline in the page text. Using the <BR /> is strongly discouraged!

Internal MediaWiki links[edit]

When you are referring to another page within the RadiWiki website, it is best to use a short links.

The disadvantages of the long link are:

  • The writing of the text is more confusing
  • When the link to the website changes, the long links are not working anymore
  • An external link icon is shown behind the link
Not: [http://wiki.dare.nl/wiki/index.php/RadiMation_Application_Note_107   RadiMation Application Note 107]
But: [[RadiMation Application Note 107]]

will result in:

Not: RadiMation Application Note 107

But: RadiMation Application Note 107

RadiWiki Templates[edit]

The RadiWiki site provides a lot of usefull templates. A template can be included by using double-curly-braces. See some often used templates below.

RadiMation[edit]

The 'RadiMation' template will show RadiMation® correctly formatted. For example:

{{RadiMation}}

will result in:

RadiMation®

MailSupport[edit]

A linked URL to radimation-support@raditeq.com can be included using the 'MailSupport' template. The advantage of this Template is that it also will also use the name of the RadiWiki page as the subject of the e-mail. For example:

{{MailSupport}}

will result in:

radimation-support@raditeq.com

Note[edit]

A note box with some text can be created using the 'Note' template. For example:

{{Note|Be aware that the 'Note' template is used!}}

will result in:

Information.png
Note: Be aware that the 'Note' template is used!


Menu[edit]

The menu-entries can be created using the 'Menu' template. For example:

{{Menu|Configuration|Configuration|Tab-name|Element}}

will result in:


   Menu.svg Configuration
      Menu.svg Configuration
         Menu.svg Tab-name
            Menu.svg Element

ReportGeneratorCode[edit]

Showing a report generator code can be challenging in MediaWiki, because the | is also used for template sepeators and table formatting.

The 'ReportGeneratorCode' can be used to simplify this.

Also the 'ReportGeneratorInfo' template can be used to generate a box that indicates that the content is related to the report generator.

For example:

{{ReportGeneratorInfo|The most often used report generate code is: {{ReportGeneratorCode|EUT|NAME}} }}

will result in:

Report generator.png
The most often used report generate code is: ||EUT|NAME||

Hide the Table of Contents[edit]

On several pages it is not desired to also have the Table of Contents (TOC) being shown. The Table of Contents can be hidden on a page, by including the 'Magic keyword': __NOTOC__ on the first line of the Wiki-text.

This is a standard MediaWiki template, and not specific to the RadiWiki.

No article/page not found text[edit]

When a page is non existent wiki normally offers you to create a new page. We use this page to show general support information so the customer at least gets re-directed to support. There are two pages that are displayed when a article is not found. One for the users that have permission to edit and one of users that do not have editing permissions.

Because our users can't edit the pages we need to change http://wiki.dare.nl/wiki/index.php/MediaWiki:Noarticletext-nopermission

When you change this text it will be displayed when a page does not exist.

Editing formula's[edit]

Formula's can be entered in a text notation, where they are rendered into the corresponding graphical notation. See displaying a formula for a detailed description.

For example:

<math>Z{t} = \frac{V{p}}{V{in}}</math> 

will result in:

Numbered lists[edit]

A numbered list can be created by placing "#" before each row which must be numbered.

For example:

  1. List entry 1
  2. List entry 2
  3. List entry 3
  4. List entry 4

Images within a numbered list[edit]

When for example a numbered list is used to communicate step by step instructions in which also images are used. The tag "< BR />"(without the spaces) can be used to add a new line within the numbered list on which the image can then be inserted.

For example:

  1. List entry 1
  2. List entry 2
  3. List entry 3
    NRX-AdvancedSettingsGPIB.PNG
  4. List entry 4

Hiding automatically generated sections[edit]

The 'DeviceDriverInfo' macro generates a generic page with some automatically generated contents. (Also see: Template:DeviceDriverInfo). The automaticly generated section on the page can be hidden from being present by adding "|HideAutoData=1" to the macro.

Nicely formatted tables[edit]

The standard table formatting, generates a table with no borders, which results in some floating texts that seem to be space seperated. A better looking table can be generated by specifying the 'wikitable' class style.

 {|class="wikitable"
 ! First header row || Description
 |-
 | Row 1 || An explanation
 |-
 | Row 2 || A second explanation
 |}
 

Will result in:

First header row Description
Row 1 An explanation
Row 2 A second explanation

Using fixed width font to include formatted text[edit]

When adding formatted text such as code examples, the first character on a new line must be a whitespace. This shall keep the original formatting of the code from being changed.

For example:

int DeterminePaddingAmount(void) {
    int requiredAmountOfPadding = 0;
    requiredAmountOfPadding = (int)m_PreviousTextString.length() - (int)m_ReplacedTextString.length();
    return requiredAmountOfPadding;

Instead of:

int DeterminePaddingAmount(void) {

   int requiredAmountOfPadding = 0;
   requiredAmountOfPadding = (int)m_PreviousTextString.length() - (int)m_ReplacedTextString.length();
   return requiredAmountOfPadding;