From Documentation
Jump to: navigation, search
(Collapsible items)
Line 93: Line 93:
  
 
'''NOTE: Use of tabs currently makes Table of Contents box disappear, so it cannot be used on long pages where having a table of contents is essential. This behavior can be changed in the extension settings.'''
 
'''NOTE: Use of tabs currently makes Table of Contents box disappear, so it cannot be used on long pages where having a table of contents is essential. This behavior can be changed in the extension settings.'''
 +
 +
<!--checked2016-->

Revision as of 10:44, 1 March 2016

This page is for tips and hints on using our wiki pages, things which are not trivial or generally known.

Please use <nowiki> wiki syntax </nowiki> to actually show the raw wikimedia syntax.

Note: This software requires a graphical connection to SHARCNET.
Please consult our Remote Graphical Connections page for instructions.

Templates

If you want to create text in a box like the one above that can be added to multiple pages, use this template example as a starting point.

If you edit any page, the templates used are listed at the bottom. There will be a link there to each template used. For the template above, the link points to Template:NeedsGraphics. That is the page to be edited to change the content/appearance of the box.

To make a new template, create the relevant page, say Template:SomethingNew, edit it with the content you want and save, then include it in some page via {{SomethingNew}}.

The content of that template page is:

{| cellpadding=5 style="border:4px solid #4682B4" |- bgcolor="#E0FFFF" | Note: This software requires a graphical connection to SHARCNET. <br> Please consult our [[Remote Graphical Connections]] page for instructions. |} __TOC__

In this case "#4682B4' is a color code. The table with various color possibilities is here. The __TOC__ directs the that the table of contents goes immediately below the template, which is useful for cases where you want the template at the very top of the page, above table of contents (otherwise, table of contents will be first)

Useful templates:

  • {{Delete|obsolete}}
  • {{Template:NeedsGraphics}}
  • {{Template:Outdated}}

Transclusions

It is possible to add the content from another page to the current page via transclusion, like this {{:Another Page}} This is very useful for splitting large pages into more manageable chunks. For an example, see our Knowledge Base page.

Collapsible items

According to this help page, collapsible module is in MediaWiki core by default as of MediaWiki 1.18 and higher. Add the class "mw-collapsible" to any element (div, table, list, anything) to trigger it.

An example (cleck on "Edit" on this section to see how it is implemented):

Bash: single_case.run
#!/bin/bash
# The actual (serial) computation, for a single case No. $2 in the table $1.
 
# Extracing and executing the $2-th line from file $1:
`sed -n ${2}p $1`
 
# Returning with the exit status of the previous command:
exit

If you use class="mw-collapsible mw-collapsed", the item will be collapsed initially; if simply class="mw-collapsible", it will be open initially.

You can use div brackets to explicitely designate visible and not visible content in the collapsed state, like in this example:

This text is not collapsible; but the next is collapsible and hidden by default:

  • Blah blah
  • Blah blah blah

Extensions

To see which extensions are already installed on this wiki, see Special:Version. To see what Mediawiki extensions are available, check [1].

Tabs

Implemented via Header Tabs extension

Submit parallel job on:

[edit]

sqsub -q mpi -n 4 -o test.txt test.x

sqsub -q mpi --gpp=1 -n 4 -o test.txt test.x

Can be used to easily present different ways of doing things on different systems.

Wiki syntax for this is:

 = orca =
  sqsub -q mpi -n 4 -o test.txt test.x
 = monk =
  sqsub -q mpi --gpp=1 -n 4 -o test.txt test.x
 <headertabs />

NOTE: Use of tabs currently makes Table of Contents box disappear, so it cannot be used on long pages where having a table of contents is essential. This behavior can be changed in the extension settings.