Help:Contents

From Planck PLA Wiki
Revision as of 10:39, 6 February 2012 by Lmendes (talk | contribs) (MathJax)
Jump to: navigation, search

Organisation of the Explanatory Supplement[edit]

The explanatory supplement is organised in terms of what MediaWiki calls Categories. Using categories provides an automatic mechanism for Index and Table of Contents generation that would otherwise be time consuming and error prone. On top of that, there are a number of extensions based on the category concept, providing a useful set of features for the development, maintenance and use of this Wiki.

Each of the entries in the table of contents in the Main Page is a category. Categories are pages (and for the ES one expects them to be reasonably self contained for the subject they cover) and can independently be added to a Collection. A typical example can be found in the Mission Products Section: a user interested in frequency maps may or may not be interested in timelines as well but will certainly be interested in understanding the formats the maps are stored, the naming conventions, the size of the maps and will most likely also look for the details of the map making process possibly in the form of papers explaining algorithms. It will therefore make sense for the frequency maps page to contain sections on format, naming conventions, size and references to the map making process. On the other hand, the description of the timelines will most naturally appear under a different page. In order not to end up with a huge number of separate pages, instead of creating a page for frequency maps only we grouped all the map products under a single maps page which is also a category. After all, it is not entirely unexpected that a user interested in frequency maps may also be interested in other types of maps.

Guidelines for development[edit]

In order to keep the development of the wiki under control we would like to ask all contributors to follow a set of very simple guidelines.

  • Each topic on the table of contents is assigned to particular contributors (look here for the current list). This does not mean the others can not make minor changes or corrections but in general it would be advisable that contributors not assigned to a specific topic refrain from making major corrections on that topic's pages;
  • A very concise help with some recipes for common editing actions can be found below. For a more detailed User Guide please refer to the MediaWiki User's Guide;
  • Concerning pages mostly contributed to by other contributors try to keep in mind the following:
    • Fixing typos or performing minor corrections is encouraged. If you find one of those please go ahead and fix it;
    • If what you have in mind is a major rewriting or you would like to propose extensive changes we ask you not to do so before discussing it with all those concerned. For each page there is a discussions page associated which can be accessed through one of the tabs at
      Location of the discussion tab
      the top of the page. Please use it to circulate more widely the changes you would like to propose.
  • If you would like to add a new page bear in mind the discussion above. If you are still convinced the new page is necessary, make your intention know in the discussion page associated with the root page of your new page. If your proposal is approved follow the procedure for the creation of a new page

Note that as all contributors have access to the entire wiki the enforcement of these simple rules depends on self-discipline and it is absolutely essential you stick to them.

Contributors list[edit]

Common tasks[edit]

Including figures[edit]

Uploading a figure[edit]

Figures can be embedded in the text with the [[File]] tag. This tag has a large number of options for resizing, borders, formating and more and the details can be found here. The basic use is however very simple. Placing a

[[File:image.png]]

in the text will create a link when the page is displayed. Clicking on that link will cause a selection page to appear and the file to be embedded can then be selected.

Selection page for uploads

To produce the figure included above showing the location of the discussion tab the syntax used was

[[File:discussion.png|frame|Location of the discussion tab]]

In this case the frame option indicates the images will be displayed within a frame and the last field is the caption of the figure. Note that captions may behave a little differnet from what was expected: when a caption is given and the frame option is used, the cpation will appear just below the figure inside the frame. When no frame option is used, the caption will be displayed when hovering with the mouse over the figure. One more thing to note is that any size options do not have any effect when the frame option is used. For the details you are strongly advised to look here.

Once an image is uploaded and displayed on a page, left clicking on the image in the wiki will show a page with information about the image, a special link allowing its update and a special link allowing its deletion. This page will also show the history of the figure with an entry for the original upload and one more entry for every time the figure was updated. In this case we see three different versions of the image were uploaded.

Page with image history info

From here it is easy to navigate back toany page where the figure appears by using any of the links at the bottom of the page under the heading File Links.

Reusing a figure[edit]

Once the file containing the figure has been uploaded we can display it again with the same syntax. The figure below was produced using exactly the same syntax as before.

Location of the discussion tab

The important thing to take into account here is to use the same name as was used for the image when it was first uploaded. Note that the name of a figure in the wiki is completely independent of the original name of the figure in the user's hard drive.

List of figures available in the wiki[edit]

It is not possible to display a list containing only the figures upload to the wiki. However a list of all the files uploaded can be easily generated. In order to retrieve a list of all the files that were uploaded to the wiki the following steps should be followed:

  1. Click on the "Special Pages" link on the toolbox on the left
  2. In the "Special Pages" page follow the File List link under 'Media reports and uploads'. Here you will find a list of all the files uploaded to the wiki so far, as shown in the figure below.
FileList.png

Links[edit]

Links to other pages in the wiki[edit]

A link to a page in ES wiki is achieved with the following syntax

[[PageName]]
[[PageName|link]]

where the first line produces a link where the link text is PageName and the second a link with the text link link. As an example of the first syntax we have [[Main Page]] prodicing a link to the Main Page of this wiki. For the second syntax we can write [[Main Page|Table of Contents]] which produces a link to the ES Table of Contents.

If the page we wish to link too is a Category a small addition to the syntax is required. In this case the page name will necessarily be of the form Category:PageName. However just using Category:PageName as PageName in the link syntax as defined above will

  1. introduce the page where it appears in the Category hierarchy;
  2. produce a link to Category:PageName at the bottom of the page.

This can be put to good use (see below) but it is not what have in mind here. To produce a normal link to a category page a semi-colon must be added before Category:PageName:

[[:Category:PageName]]
[[:Category:PageName|link]]

The two different syntaxes above work exactly as in the examples above. A link to the maps chapter can produced with [[:Category:Maps|maps chapter]] resulting as expected in a link to the maps chapter in the ES.

It is also possible to define a link to a specific section in a given page (where a section is defined using the = syntax). In this case the syntax is

[[PageName#SectionName]]
[[PageName#SectionName|link]]

where the two differnet syntaxes work as described above. As an example, the link at the beginning of this paragraph was produced with

 
[[Help:Contents#New section in an existing page|''='' syntax]].

Links to external pages[edit]

In this case the syntax is

[url text]

Linking to the ESA Planck page can be achieved with

[http://sci.esa.int/science-e/www/area/index.cfm?fareaid=17 ESA Planck page]

and results in this link to the ESA Planck page. Dropping text will also work as expected but with a different appearance. With

[http://sci.esa.int/science-e/www/area/index.cfm?fareaid=17]

we produce [1].

When comparing with the syntax for internal links note the use of a single [ instead of [[and also the link text is separated by the url by a space and there is no need for a | as in the case of internal links.

External links can be easily identified in the displayed pages by an arrow next to the link.

Uploading documents[edit]

Uploading a document can be done exactly as described above for figures. Note however that the file types that can be uploaded are limited to png, gif, jpg, jpeg, pdf, txt, zip and the size of each individual document is limited to 100MB. What this means is that MediWiki knows what to do with files of these types (a png or jpg files will be displayed without the need to explicitely tell MediWiki to display them).

For files of other types please have a look at the section Attachments below.

Adding a new section[edit]

New section in an existing page[edit]

In this case the syntax is the following:

==New Section==
===New Subsection===
====New SubSubSection====

More details can be found in the MediaWiki User's Guide.

New section as new page[edit]

Should the new section appear as a new page (see the guidelines above on the addition of new pages) the Category syntax should be used:

STEP 1: Add a link to the (still non-existing) new page in the Table of Contents on the Main Page:

Assuming a new page with the title New Page is to be added to the ES, add the line
[[:Category:New Page|New Page]]
to the Main Page. This will create a link to the (yet non existing) page New Page. Note the slightly different link syntax: the : after the [[ is required otherwise the tag would be interpreted not as a link but as a Category hierarchy definitios (see step 2 below).
When the Category link above is added to the Main Page make sure it appears in the correct location as the Main Page is basically a table of contents for the ES.

STEP 2: Create the page (and Category):

Clicking on the link just created on step 1 (which will be displayed in red as the page still does not exist) will take you to an empty page displaying the warning You have followed a link to a page that does not exist yet. Enter the content of the new page as you would for any other page. Since we want this page to be part of the category tree enter the line
[[Category:TopCategory]]
where TopCategory is the existing category under which the new category will appear in the Category Tree. If this last step step is missed the new page will not be part of the Category Tree and you will therefore not be able to take advantage of the Category Tree features. The line above can be entered anywhere on the page but the structure of the page results easier to understand if it appears consistently at the end.
For example, in the maps section under mission products, the following line appears at the end of the page
[[Category:Mission products]]
This guarantees the maps section will correctly appear in the Category Tree

Use of the available extensions[edit]

MathJax[edit]

The MathJax extension allows the use of MathJax, a display engine for mathematics providing high quality mathematics fonts. The main interest for the ES lies in its ability to produce high quality display of latex formulae with no need for any extra tags. Equations may simply be written in Latex and MathJax will recognize the Latex Tags.

Simple mathematical expressions can be easily written inline. The following

$x^2 + y^2 +z^2 = 1$

will be displayed by MathJax as $x^2 + y^2 +z^2 = 1$.

We can write complex equations and even make use of \newcommand as illustrated by the following lines.

$
  \newcommand{\Re}{\mathrm{Re}\,}
  \newcommand{\pFq}[5]{{}_{#1}\mathrm{F}_{#2} \left( \genfrac{}{}{0pt}{}{#3}{#4} \bigg| {#5} \right)}
$
\begin{align}
  \label{def:Wns}
  W_n (s)
  &:= 
  \int_{[0, 1]^n} 
    \left| \sum_{k = 1}^n \mathrm{e}^{2 \pi \mathrm{i} \, x_k} \right|^s \mathrm{d}\boldsymbol{x}
\end{align}

\begin{align}
  \label{eq:W3k}
  W_3(k) &= \Re \, \pFq32{\frac12, -\frac k2, -\frac k2}{1, 1}{4}.
\end{align}

MathJax will display these as $

 \newcommand{\Re}{\mathrm{Re}\,}
 \newcommand{\pFq}[5]{{}_{#1}\mathrm{F}_{#2} \left( \genfrac{}{}{0pt}{}{#3}{#4} \bigg| {#5} \right)}

$ \begin{align}

 \label{def:Wns}
 W_n (s)
 &:= 
 \int_{[0, 1]^n} 
   \left| \sum_{k = 1}^n \mathrm{e}^{2 \pi \mathrm{i} \, x_k} \right|^s \mathrm{d}\boldsymbol{x}

\end{align}

\begin{align}

 \label{eq:W3k}
 W_3(k) &= \Re \, \pFq32{\frac12, -\frac k2, -\frac k2}{1, 1}{4}.

\end{align}

We can also refer to equations with a valid \label using the latex \eqref command. The second of the two eqautions above can be referred to with

\eqref{eq:W3k}

resulting in a correct reference to equation \eqref{eq:W3k} above. Note the reference works as a link. Clicking it you will be taken to the equation referred to.

Right clicking on an equation will generate a pop up menu that among other things allows to extract the latex code used to generate the equation on the page.

MathJax menu

Selecting Show Source a window will pop up showing the latex code used to create the equation displayed. The figure below show the result of this operation applied to \eqref{def:Wns} above.

MathJax latex source window

Note that although copying latex code from this window is allowed, editing the equation n the source code window is not possible.

CAVEAT: There is unfortunately a caveat associated with the use of MathJax. While MathJax is able to use high quality fonts to display equations, the export of pages using MathJax to Latex will in general require some manual editing in the Latex source produced. The default equation displaying mechanism for MediaWiki uses the math tag and therefore the wiki2latex extension converting MediaWIki to Latex will also look for this tag when it looks for the chunks of content that need special treatment (the equations). In MathJax however, the use of the math tag is not required and the usual Latex tags for equations can be used instead ($...$, \begin{equation}...\end{equation} and so on). This means that when attempting the conversion on a Wiki page containing equations tagged using only the Latex standard tags the conversion to Latex will not produce the expected result. In most cases this problem can be solved by using directly the <math> tag in equations as it is accepted by MathJax as a valid way to tag mathematical contents. However, as MathJax can make use of a much larger subset of the Latex set of tags dealing with mathematical content than the math tag can handle, this means the math tag will not be able to handle quite a large number of situations (for instance, in the equations above, using the math tag instead of the \begin{align}...\end{align} tags) and will produce unexpected results. The problem is such that when trying to convert MediaWiki directly to pdf using the mechanism described below, the process will in most cases fail. We therefore recommend to proceed as follows

Converting from MediaWiki to latex and pdf[edit]

Collection[edit]

The Collection extension allows a user to organise a set of pages as a book that can be converted to pdf. This comes handy for a user that is interested in a few sections of the ES but would rather print only the contents of the sections of interested than the entire ES. The user adds each section of interest to a book using a button on the toolbar. When the selection is complete the generate pdf button is pressed and a pdf version of the selected section, including a table of contents, is generated.

This section is still incomplete waiting for the extension to be installed.

CategoryTree[edit]

The Category tree extension generates a tree on the left hand side of the browser window.

Category Tree

. The category tree can Each entry on the initial unexpanded tree is a category

Attachments[edit]

Attachments can be used to include extra information in the form of data, higher resolution images that exceed the 100MB limit for uploaded files or documents in formats other than the ones directly supported by the default MediWiki upload mechanism.

Attachments as we define them here are not natively supported by MediaWiki but as with most other things in MediaWiki an extension was developed to allow the use of attachments with MediaWiki.

Converting latex documents for use in MediaWiki[edit]

As far as we can tell there is no way of exporting a latex document to Media Wiki at a click of a button, and even less so of copying a complex latex document to MediWiki and making MediaWiki understand what the document contains (apart from equations which where dealt with above). The best that can be done at the moment seems to be the used of blabala. We where able to install it on

CAVEAT: Unfortunately processing a very complex latex document with this tool may not always produce the desired results in one simple pass. Simple constructs like tables and simple equations are processed almost flawlessly. However when it comes to complex tables, equations or any constructs based on \new command things seem to be a lot more complicated. Our advice here is to process the input documents in small chunks and add everything that is still missing after the conversion or has incorrectly been converted by hand.

European Space Agency