Difference between revisions of "Wiki Tips"

From GnuCash
Jump to: navigation, search
(Using Images)
 
(Syntax Highlighting)
Line 1: Line 1:
 
Tips to edit and maintain this wiki
 
Tips to edit and maintain this wiki
 +
==Syntax Highlighting==
 +
Syntax Highlighting is enabled and should be prefered over <nowiki><nowiki></nowiki></nowiki>, <nowiki><pre></pre></nowiki> or indentation to mark code snippets or other formated files.
 +
;Example: <nowiki><syntaxhighlight lang="sh">
 +
LANG=C gnucash
 +
</syntaxhighlight>
 +
</nowiki>
 +
will result in
 +
<syntaxhighlight lang="sh">
 +
LANG=C gnucash
 +
</syntaxhighlight>
 +
 +
Examples with optional parameters can be found at https://www.mediawiki.org/wiki/Extension:SyntaxHighlight.
 +
:A list of supported languages is available at [http://pygments.org/languages/ Supported languages],
 +
: more details at [http://pygments.org/docs/lexers/ Available lexers].
  
 
==Using Images==
 
==Using Images==

Revision as of 01:53, 26 July 2017

Tips to edit and maintain this wiki

Syntax Highlighting

Syntax Highlighting is enabled and should be prefered over <nowiki></nowiki>, <pre></pre> or indentation to mark code snippets or other formated files.

Example
<syntaxhighlight lang="sh"> LANG=C gnucash </syntaxhighlight>

will result in

LANG=C gnucash

Examples with optional parameters can be found at https://www.mediawiki.org/wiki/Extension:SyntaxHighlight.

A list of supported languages is available at Supported languages,
more details at Available lexers.

Using Images

There are several ways to use images - beneath other files - in this wiki:

Uploading

Admins and other users with uploadaccess can upload images via Special:Upload.

[[File:filename.extension|options|caption]]

can than be used to embed them in a text.

Example
[[File:Gnucash-icon.png|100px|Click me!]]

appears as

Click me!

This Images will have a full version history and other metadata. To see them, just click on the image.

With the link={target} option you can refer files from other sites with a wikimedia upload directory like commons.wikimedia.org.

Linking

Sometimes you might wish to link elsewhere existing images whithout overhead e.g. drafts of the guide might reuse the images from the nightly docs. But the URL must not match our MediaWiki:Spam-blacklist or conform our MediaWiki:Spam-whitelist.

embedding

http://url.for/some/image.png

The URL must match our MediaWiki:External image whitelist.

Example
http://www.gnucash.org/images/gnucash-perspective.png

appears as

gnucash-perspective.png

linking

[http://www.gnucash.org/images/banner5.png Banner]

This will only show up as a textual link:

Banner

You will have to click on it to see the image.

Source
https://www.mediawiki.org/wiki/Help:Images