Style And Syntax

From Synfig Studio :: Documentation
Jump to: navigation, search
m
(updates)
Line 9: Line 9:
  
 
  <code><nowiki><!-- Page info --></nowiki>
 
  <code><nowiki><!-- Page info --></nowiki>
  <nowiki>{{</nowiki>Title|Getting Started}}<!-- Scary? That's to make sure that GetTitle template will not catch the Title tag -->
+
  <nowiki>{{</nowiki>Title|Getting Started}}<!-- Scary? That's to make sure that GetTitle template will not catch the Title template -->
 
  <nowiki>{{</nowiki>Navigation|Category:Manual|Doc:Animation_Basics}}
 
  <nowiki>{{</nowiki>Navigation|Category:Manual|Doc:Animation_Basics}}
  <nowiki>{{</nowiki>Category|Manual}}
+
  <nowiki>[[</nowiki>Category:Manual]]
  <nowiki>{{</nowiki>Category|Tutorials}}
+
  <nowiki>[[</nowiki>Category:Tutorials]]
  <nowiki>{{</nowiki>Category|Tutorials Basic}}
+
  <nowiki>[[</nowiki>Category:Tutorials Basic]]
 
  <nowiki><!-- Page info end --></nowiki></code>
 
  <nowiki><!-- Page info end --></nowiki></code>
  
Please take your time and be sure to fill in this section properly, otherwise some things may not work as expected. There are only few tags allowed in this section.
+
Please take your time and be sure to fill in this section properly, otherwise some things may not work as expected. There are only few templates allowed in this section.
  
== Title tag ==
+
= Title template =
 
The Title tag is mandatory and used to specify the title for a page. Its main purpose is to provide a proper title for translated pages. You should set the page title even if it's the same as the page name. This ensures that translators will not forget to set this tag at the time of translation.
 
The Title tag is mandatory and used to specify the title for a page. Its main purpose is to provide a proper title for translated pages. You should set the page title even if it's the same as the page name. This ensures that translators will not forget to set this tag at the time of translation.
  
== Category tag ==
+
== Categories ==
You can specify which categories a page belongs to using the Category tag, like this:  
+
You can specify categories a page belongs to the same way as with any mediawiki:  
<pre><nowiki>{{Category|Manual}}</nowiki></pre>
+
<pre><nowiki>[[Category:Manual]]</nowiki></pre>
  
:Consider the fact that this syntax statement differs from the usual MediaWiki syntax. In an ordinary MediaWiki setup, category is specified with ''<nowiki>[[</nowiki>Category:MyCategory<nowiki>]]</nowiki>'' statement and you are forced to use ''<nowiki>[[</nowiki>:Category:MyCategory<nowiki>]]</nowiki>'' syntax if you want a link to category. That approach is replaced here by one considered more logical for our taste, where all links are defined by L tag (see below) and categories are set with Category tag.
+
:Consider the fact that linking to categories differs from the usual MediaWiki syntax. In an ordinary MediaWiki setup you are forced to use ''<nowiki>[[</nowiki>:Category:MyCategory<nowiki>]]</nowiki>'' syntax if you want a link to category. That approach is replaced here by one considered more logical for our taste, where all links are defined by L tag (see below).
  
== Navigation tag ==
+
= Navigation template =
 
The Navigation tag is optional. It's used when you want to link a set of pages into a sequence, like {{l|Doc:Manual|Manual pages}}. The syntax is: <pre><nowiki>{{</nowiki>Navigation|Parent Page|Next Page<nowiki>}}</nowiki></pre>
 
The Navigation tag is optional. It's used when you want to link a set of pages into a sequence, like {{l|Doc:Manual|Manual pages}}. The syntax is: <pre><nowiki>{{</nowiki>Navigation|Parent Page|Next Page<nowiki>}}</nowiki></pre>
  
Line 36: Line 36:
  
 
= Links =
 
= Links =
The rule is simple: just use <nowiki>{{l| ... }}</nowiki> instead of <nowiki>[[ ... ]]</nowiki> EVERYWHERE.
+
The rule is simple: just use <nowiki>{{L| ... }}</nowiki> instead of <nowiki>[[ ... ]]</nowiki> EVERYWHERE for internal links.
  
 
TODO: table here
 
TODO: table here
  
= Menu entries =
+
= Menu command template =
 +
Usage: <nowiki>{{c|<menuname>|<submenu1>|submenu2|…}}</nowiki>
 +
 
 +
= Development Notes =
 +
Use DevNotesBegin and DevNotesEnd templates to mark text describing features of development Synfig version.
 +
Usage: <nowiki>{{DevNotesBegin}}Any wiki markup.{{DevNotesEnd}}</nowiki>
 +
 
 +
= Note template =
 +
(TODO) This template gives a box of fixed width.
 
...
 
...
  
= Useful templates =
+
= NiceTip template =
 +
(TODO) This template gives a box with an icon and a title, expanding with the text width up to page-width.
 
...
 
...

Revision as of 17:41, 17 April 2010

Navigation Navigation:  <<Writer Documentation>>

Before you start editing pages in this wiki, you should be aware about some improvements we made to original MediWiki to provide extra features.

Page head

At the top of each page there is a special section where additional page information is stored. Shown below is an example of how this section might look:

<!-- Page info -->
{{Title|Getting Started}}
{{Navigation|Category:Manual|Doc:Animation_Basics}}
[[Category:Manual]]
[[Category:Tutorials]]
[[Category:Tutorials Basic]]
<!-- Page info end -->

Please take your time and be sure to fill in this section properly, otherwise some things may not work as expected. There are only few templates allowed in this section.

Title template

The Title tag is mandatory and used to specify the title for a page. Its main purpose is to provide a proper title for translated pages. You should set the page title even if it's the same as the page name. This ensures that translators will not forget to set this tag at the time of translation.

Categories

You can specify categories a page belongs to the same way as with any mediawiki:

[[Category:Manual]]
Consider the fact that linking to categories differs from the usual MediaWiki syntax. In an ordinary MediaWiki setup you are forced to use [[:Category:MyCategory]] syntax if you want a link to category. That approach is replaced here by one considered more logical for our taste, where all links are defined by L tag (see below).

Navigation template

The Navigation tag is optional. It's used when you want to link a set of pages into a sequence, like Manual pages. The syntax is:
{{Navigation|Parent Page|Next Page}}
  • "Parent Page" is the name of the top-level (index) page for the sequence which the current page belongs to. For example, "Parent Page" for Getting Started is Manual. And the parent page for this page is Writer Documentation.
  • "Next Page" is the neme of the page which place in sequence is after current one. For example, "Next Page" for Getting Started is Animation Basics.

Notice that you don't need to specify the previous page because it's determined automatically from the data in the navigation tags of other pages.

Links

The rule is simple: just use {{L| ... }} instead of [[ ... ]] EVERYWHERE for internal links.

TODO: table here

Menu command template

Usage: {{c|<menuname>|<submenu1>|submenu2|…}}

Development Notes

Use DevNotesBegin and DevNotesEnd templates to mark text describing features of development Synfig version. Usage: {{DevNotesBegin}}Any wiki markup.{{DevNotesEnd}}

Note template

(TODO) This template gives a box of fixed width. ...

NiceTip template

(TODO) This template gives a box with an icon and a title, expanding with the text width up to page-width. ...