Changes

Jump to navigation Jump to search
2,027 bytes added ,  18:48, 5 September 2020
m
typo
As you can see above, Using the {{tl|cmd}} template for referring to the group pages looks a bit weird (`<nowiki>{{cmd|_startsection}}</nowiki>` was given) which is why there is a separate template for referring to those group pages: {{tl|gen}}. `<nowiki>{{gen|startsection}}</nowiki>` produces: {{gen|startsection}}.
== Page stucture structure ==
The structure of the new command pages is always the same:
| '''Forum help''' || A list of quick-links to community searches.
|}
 
=== The syntax table in '''Settings''', in detail ===
 
A table that is set up along the following lines.
 
<table cellspacing="4" cellpadding="2" class="cmd">
<tr>
<td colspan="2" class="cmd">\XXX<!--
--><span class="first">[...]</span><!--
--><span class="second">[...]</span><!--
--><span class="third">[...]</span><!--
--></td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[...]</td>
<td>''text''</td>
</tr>
<tr valign="top" class="second">
<td class="cmd">key</td>
<td>'''default''' variant other</td>
</tr>
<tr valign="top" class="third">
<td class="cmd">[...]</td>
<td>''text''</td>
</tr>
</table>
 
Let us examine the following example:
 
<syntax>placefloat</syntax>
 
You would not normally type {{cmd|placefloat}} in your TeX-text, but rather a previously defined kind of float (<tt>figure</tt>, for example). If you '''did''' use {{cmd|placefloat}} literally, then the first argument would be the name of the predefined kind of float, like <tt>figure</tt>.
 
But normally, the command to use in a document would be {{cmd|placefigure}}:
 
<syntax>placefigure</syntax>
 
The first two arguments of {{cmd|placefigure}} are optional (recognisable because they are slanted), the second two are mandatory. The first optional argument takes one of the keywords mentioned in {{cmd|placefloat}}. If the argument is not given, then it uses the keyword in bold (assuming there is one). <tt>reference</tt> stands for a reference label; just insert a name that you want to refer to later. In the third and fourth argument ''text'' is in ''italics'' (to indicate that it is not the keyword '''text''', which does exist). Rather, it is a (terse) description of what you can enter. In this case, you can enter any kind of text. ''content'' is similar.
 
To get syntax tables like the ones above easily in a different page, add
 
<pre>
<syntax>placefloat</syntax>
</pre>
 
where you need it. This will fetch the relevant table(s) from the command database.
== Pre-existing pages ==
* Move the existing page away to e.g. `Command_old/setuphead` (this can be done via the `More` dropdown at the top of the page). <br/>Make sure you '''uncheck''' the ''leave a redirect'' box, or you will first have to delete that redirect again using the `More` dropdown at the top of the page.
The goal of this the previous step is to make `Command/setuphead` temporarily be a 'Missing page', so that the extension can initialise it.
* Now go to the `Command/setuphead` url.<br/>If you followed a wiki link, it should automatically open the editor. Otherwise, click on the `Create` link.<br/>The edit screen will automatically be filled with a form that is suitable for the command you are editing.
* If the Edit field is missing but you see an error that states '''Command not found''', you are trying to document a no longer existing command, and you should ask for advice on the mailing list.

Navigation menu