Difference between revisions of "Wiki:Editing"

From Wiki
Jump to navigation Jump to search
(trying to fix the help pages mess)
m (reverting back)
Line 1: Line 1:
 +
If you are uncertain how a special markup looks like or if you want to try out things, go to the [http://sandbox.contextgarden.net/ sandbox].
  
 +
== General ==
 +
 +
=== May I edit pages without signing in? ===
 +
 +
Yes, you may (mainly because we are still glad if the users who hate signing in can nevertheless contribute), but you are highly <b>discouraged</b> to do so. Please, sign in before contributing if possible. Even if you use a username/nickname with no resemblance to your real name, this is still better than not signing in at all.
 +
 +
=== How do I edit the first page? ===
 +
 +
First page is protected to avoid spammers. However, you can still edit it (let's hope for stupid spammers). Type '''Template:Main Page''' after contextgarden.net/ and edit that template.
 +
 +
=== How do I sign when posting a comment? ===
 +
 +
* <code><nowiki>~~~</nowiki></code> will expand into <nowiki>[[User:Yourusername|Yournickname]]</nowiki>, so basically your <b>nickname</b> will be shown
 +
* <code><nowiki>~~~~</nowiki></code> will also add a <b>timestamp</b> next to your nickname
 +
 
 +
So you will usually write <code><nowiki>--~~~</nowiki></code> or <code><nowiki>--~~~~</nowiki></code>
 +
 +
=== What are the other commands to edit this wiki? ===
 +
 +
The markup used in this wiki is a general MediaWiki markup and is described in the [http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide MediaWiki User Guide]  (esp. http://meta.wikimedia.org/wiki/Help:Editing ).
 +
 +
Most of the following markup on this help page is specific for contextgarden. So, read on!
 +
 +
 +
== Pretty printing ==
 +
 +
* <code><nowiki>'''Bold text'''</nowiki></code> -- '''Bold text'''
 +
* <code><nowiki>''Italic text''</nowiki></code> -- ''Italic text''
 +
* <code><nowiki>----</nowiki></code> draws a horizonal rule
 +
 +
=== In-line elements ===
 +
----
 +
'''<code><nowiki><code></nowiki></code>'''
 +
 +
For in-line markup of code, commands, parameters, etc. in the running text use <code><nowiki><code> ... </code></nowiki></code>.
 +
 +
''wiki markup''
 +
 +
<xmlcode>
 +
In the following examples we use <code>\framed</code> command with the parameters <code>background=color</code> and <code>offset=1cm</code>.
 +
</xmlcode>
 +
 +
''wiki display''
 +
 +
In the following examples we use <code>\framed</code> command with the parameters <code>background=color</code> and <code>offset=1cm</code>.
 +
----
 +
 +
=== Block elements ===
 +
----
 +
'''<code><nowiki><pre></nowiki></code>'''
 +
 +
To dispay verabtim text use <code><nowiki><pre> ... </pre></nowiki></code>.
 +
 +
''wiki markup''
 +
 +
<xmlcode>
 +
<pre>
 +
This is an announcement from the mailing list with some code.
 +
 +
\unprotect
 +
\def\!test{alfa}
 +
\protect
 +
</pre>
 +
</xmlcode>
 +
 +
''wiki display''
 +
 +
<pre>
 +
This is an announcement from the mailing list with some code.
 +
 +
\unprotect
 +
\def\!test{alfa}
 +
\protect
 +
</pre>
 +
 +
----
 +
'''<code><nowiki><texcode></nowiki></code>'''
 +
 +
For displaying TeX an ConTeXt source use <code><nowiki><texcode> ... </texcode></nowiki></code>.
 +
 +
''wiki markup''
 +
 +
<xmlcode>
 +
<texcode>
 +
\def\person#1#2{{\em #1 (#2)}}
 +
 +
\setupcolors [state=start]
 +
\framed [background=color,
 +
        backgroundcolor=green,
 +
        offset=1cm ]{hello world!}
 +
</texcode>
 +
</xmlcode>
 +
 +
''wiki display''
 +
 +
<texcode>
 +
\def\person#1#2{{\em #1 (#2)}}
 +
 +
\setupcolors [state=start]
 +
\framed [background=color,
 +
        backgroundcolor=green,
 +
        offset=1cm ]{hello world!}
 +
</texcode>
 +
----
 +
 +
'''<code><nowiki><xmlcode></nowiki></code>'''
 +
 +
For presenting XML source use <code><nowiki><xmlcode> ... </xmlcode></nowiki></code>.
 +
 +
''wiki markup''
 +
 +
<xmlcode>
 +
&lt;xmlcode>
 +
<?xml version="1.0"?>
 +
<TeXML>
 +
  <env name="text">
 +
    Hello World
 +
  </env>
 +
</TeXML>
 +
&lt;/xmlcode>
 +
</xmlcode>
 +
 +
''wiki display''
 +
 +
<xmlcode>
 +
<?xml version="1.0"?>
 +
<TeXML>
 +
  <env name="text">
 +
    Hello World
 +
  </env>
 +
</TeXML>
 +
</xmlcode>
 +
 +
----
 +
 +
'''<code><nowiki><context></nowiki></code>'''
 +
 +
Nice local feature of contextgarden allows you to run ConTeXt on the fly and the wiki page will include the result of the eneterd code in the page. See also http://live.contextgarden.net/ for an online ConTeXt.
 +
 +
''wiki markup''
 +
 +
<xmlcode>
 +
<context>
 +
\setupcolors [state=start]
 +
\framed [background=color,
 +
        backgroundcolor=green,
 +
        offset=1cm ]{hello world!}
 +
</context>
 +
</xmlcode>
 +
 +
''wiki display''
 +
 +
<context>
 +
\setupcolors [state=start]
 +
\framed [background=color,
 +
        backgroundcolor=green,
 +
        offset=1cm ]{hello world!}
 +
</context>
 +
----
 +
 +
'''<code>source="yes"</code>'''
 +
 +
If you add <code>source="yes"</code> to the <code><nowiki><context></nowiki></code> tag, you have the source and the result displayed. The contents of the attribute <code>text</code> will be inserted between the text and the result.
 +
 +
''wiki markup''
 +
 +
<xmlcode>
 +
<context source="yes" text="produces">
 +
\setupcolors [state=start]
 +
\framed [background=color,
 +
        backgroundcolor=green,
 +
        offset=1cm ]{hello world!}
 +
</context>
 +
</xmlcode>
 +
 +
''wiki display''
 +
 +
<context source="yes" text="produces">
 +
\setupcolors [state=start]
 +
\framed [background=color,
 +
        backgroundcolor=green,
 +
        offset=1cm ]{hello world!}
 +
</context>
 +
----
 +
 +
== Links ==
 +
 +
You can use references to other garden projects. Use the following syntax to create links to the other contextgarden projects:
 +
 +
<pre><nowiki>
 +
[[source:type-akb.tex| type-akb.tex]]
 +
[[manual:cont-eni.pdf| ConTeXt, the manual]] or [[magazine:0008|Magazine 8]]
 +
[[modules:t-bnf| bnf module]]
 +
[[cmd:goto|\goto]]
 +
[[gardenbugs:5| bug nr. 5]]
 +
[[article:80|A Few Dangerous Features]]
 +
[[publication:1|MAPS]]
 +
</nowiki></pre>
 +
 +
Looks like:
 +
* [[source:type-akb.tex| type-akb.tex]] -- source files of ConTeXt
 +
* [[manual:cont-eni.pdf| ConTeXt, the manual]] or [[magazine:0008|Magazine 8]] -- manuals on http://www.pragma-ade.com
 +
* [[modules:t-bnf| bnf module]] -- [http://texshow.contextgarden.net third party modules]
 +
* [[cmd:goto|\goto]] -- links to the definition of the command in [http://texshow.contextgarden.net texshow-web] command reference (deprecated way: <code><nowiki><cmd>about</cmd></nowiki></code> gives <cmd>about</cmd>)
 +
* [[gardenbugs:5| bug nr. 5]] -- bugs
 +
* [[article:80|A Few Dangerous Features]]
 +
* [[publication:1|MAPS]] -- MAPS articles
 +
 +
 +
== Tables ==
 +
 +
== Categories & Templates ==
 +
 +
=== How to add a category? ===
 +
 +
=== How to add a template? ===
 +
 +
 +
{{todo|This page still needs quite some work}}

Revision as of 19:23, 9 November 2006

If you are uncertain how a special markup looks like or if you want to try out things, go to the sandbox.

General

May I edit pages without signing in?

Yes, you may (mainly because we are still glad if the users who hate signing in can nevertheless contribute), but you are highly discouraged to do so. Please, sign in before contributing if possible. Even if you use a username/nickname with no resemblance to your real name, this is still better than not signing in at all.

How do I edit the first page?

First page is protected to avoid spammers. However, you can still edit it (let's hope for stupid spammers). Type Template:Main Page after contextgarden.net/ and edit that template.

How do I sign when posting a comment?

  • ~~~ will expand into [[User:Yourusername|Yournickname]], so basically your nickname will be shown
  • ~~~~ will also add a timestamp next to your nickname

So you will usually write --~~~ or --~~~~

What are the other commands to edit this wiki?

The markup used in this wiki is a general MediaWiki markup and is described in the MediaWiki User Guide (esp. http://meta.wikimedia.org/wiki/Help:Editing ).

Most of the following markup on this help page is specific for contextgarden. So, read on!


Pretty printing

  • '''Bold text''' -- Bold text
  • ''Italic text'' -- Italic text
  • ---- draws a horizonal rule

In-line elements


<code>

For in-line markup of code, commands, parameters, etc. in the running text use <code> ... </code>.

wiki markup

In the following examples we use <code>\framed</code> command with the parameters <code>background=color</code> and <code>offset=1cm</code>.

wiki display

In the following examples we use \framed command with the parameters background=color and offset=1cm.


Block elements


<pre>

To dispay verabtim text use <pre> ... </pre>.

wiki markup

<pre>
This is an announcement from the mailing list with some code.

\unprotect
\def\!test{alfa} 
\protect 
</pre>

wiki display

This is an announcement from the mailing list with some code.

\unprotect
\def\!test{alfa} 
\protect 

<texcode>

For displaying TeX an ConTeXt source use <texcode> ... </texcode>.

wiki markup

<texcode>
\def\person#1#2{{\em #1 (#2)}}

\setupcolors [state=start]
\framed [background=color,
         backgroundcolor=green,
         offset=1cm ]{hello world!}
</texcode>

wiki display

\def\person#1#2{{\em #1 (#2)}}

\setupcolors [state=start]
\framed [background=color,
         backgroundcolor=green,
         offset=1cm ]{hello world!}

<xmlcode>

For presenting XML source use <xmlcode> ... </xmlcode>.

wiki markup

<xmlcode>
<?xml version="1.0"?>
<TeXML>
  <env name="text">
    Hello World
  </env>
</TeXML>
</xmlcode>

wiki display

<?xml version="1.0"?>
<TeXML>
  <env name="text">
    Hello World
  </env>
</TeXML>

<context>

Nice local feature of contextgarden allows you to run ConTeXt on the fly and the wiki page will include the result of the eneterd code in the page. See also http://live.contextgarden.net/ for an online ConTeXt.

wiki markup

<context>
\setupcolors [state=start]
\framed [background=color,
         backgroundcolor=green,
         offset=1cm ]{hello world!}
</context>

wiki display


source="yes"

If you add source="yes" to the <context> tag, you have the source and the result displayed. The contents of the attribute text will be inserted between the text and the result.

wiki markup

<context source="yes" text="produces">
\setupcolors [state=start]
\framed [background=color,
         backgroundcolor=green,
         offset=1cm ]{hello world!}
</context>

wiki display

\setupcolors [state=start]
\framed [background=color,
         backgroundcolor=green,
         offset=1cm ]{hello world!}

produces


Links

You can use references to other garden projects. Use the following syntax to create links to the other contextgarden projects:

 [[source:type-akb.tex| type-akb.tex]]
 [[manual:cont-eni.pdf| ConTeXt, the manual]] or [[magazine:0008|Magazine 8]]
 [[modules:t-bnf| bnf module]]
 [[cmd:goto|\goto]] 
 [[gardenbugs:5| bug nr. 5]]
 [[article:80|A Few Dangerous Features]]
 [[publication:1|MAPS]]

Looks like:


Tables

Categories & Templates

How to add a category?

How to add a template?


TODO: This page still needs quite some work (See: To-Do List)