APL Wiki:Formatting

APL Wiki is a standard MediaWiki, so the MediaWiki documentation for applies. In particular, the following sections may be useful:


 * Links
 * Formatting

APL Wiki doesn't have all the extensions and templates Wikipedia has, but does have some of its own. This page serves as a reference for many of them. If you are interested in making APL Wiki easier to edit, and know a bit about MediaWiki templates, you are also free to create your own.

Links to Wikipedia
Linking to a Wikipedia page is more like an internal link than an external one: both technically, because it uses MediaWiki just like APLWiki, and conceptually, because Wikipedia also has encyclopedic information on a variety of topics. And in fact Wikipedia links are supported by our internal link syntax. This form is preferred because it is displayed with a "W" as an indication to the reader. Write an internal link as it would appear on Wikipedia, but put  in front.

A Wikipedia link always needs to be given displayed text with, because otherwise it will appear with that   in the link, a very cluttered display! However, when editing there is a shortcut that can often be used. Writing the  character with no text afterwards will strip   and any trailing material in parentheses from the display, so that for example   displays as APL.

Mentioning subjects that have their own page
It is fine for a page to have a section about a subject that also has its own page. When that happens, begin the section with  where   is the target page title. Don't include double brackets (as a page link) — it is done for you.

Also on Wikipedia
If a subject is notable for reasons unrelated to APL, in addition to being APL notable, then you can indicate this fact using the Also on Wikipedia template. By default, both the text and the Wikipedia link target are taken from the page's title. The optional first argument changes the name used in the text (for example, to use only a person's last name) and the second gives the Wikipedia article to link to.

As the template suggests, only APL-related topics, and important background information, should be covered on the APL Wiki if there is also a substantial Wikipedia article. In contrast, topics which are on Wikipedia only because of APL should eventually have APL Wiki articles with at least as much information as Wikipedia, and should not use the Also on Wikipedia template—instead, these articles should include a link to the Wikipedia article in an "External links" section. However, content should not be copied directly from Wikipedia. Rewrite it from an APL perspective instead.

Yes/No tables
For tables comparison tables, use the,  , and   templates, e.g.: gives:

You can customise the text by supplying an argument: gives:

Inline code
Inline code is used for single primitives and short expressions and uses the format

"" which results in ""

Code blocks
For session transcripts, function definitions and longer expressions, use code blocks like

""

which results in:

""

Tagging dialects
Optionally, you can indicate one or more APL dialects which are able to run the code by using a special template immediately after the source tag, like

which results in:

Run online
You can also include a permalink to TryAPL, Try It Online, repl.it, abrudz.github.io/ngn-apl etc. right before the source tag, for example

which results in:

Note: Make sure to spell the template exactly as  including   as otherwise any equal sign in the URL will prevent the template from working properly!

Very long code blocks
Use

which results in:

Unsupported languages
If your code is in a language the highlighter doesn't support, then there are two ways to present code without highlighting it. Don't use a  tag with no   attribute as this puts the page in the "Pages with syntax highlighting errors" category, which is visible at the bottom of the page.
 * Use  tags for inline code and   tags for blocks, avoiding   entirely
 * Use.

Mathematical notation
MathJax is enabled, so you can insert mathematical notation (for example for Iverson notation) inline using included the expression $$\bot p_{32,33}:+/\alpha^2/I^0$$ in its description which results in: included the expression $$\bot p_{32,33}:+/\alpha^2/I^0$$ in its description For multiple and larger mathematical expressions, use included the expression
 * $$i \gets O^{\bot I^0_{0,1,2,3}}_{\bot I^0_{4,5,6,7}}$$

in its description which results in: included the expression
 * $$i \gets O^{\bot I^0_{0,1,2,3}}_{\bot I^0_{4,5,6,7}}$$

in its description

Equivalence
It is quite common to state equivalences. Please use a proper equivalence arrow, which is easy to insert with the template: "this that" which results in: "this that"

Navboxes
Most articles should have a navigation template giving links to other articles of interest. The navbox should be added after all of the article text, but before the article's categories. A navbox is a template such as, which displays as an expandable table of links:

The following navboxes exist at the moment:
 * Template:APL built-ins
 * Template:APL community
 * Template:APL development
 * Template:APL dialects
 * Template:APL features
 * Template:APL glyphs
 * Template:APL syntax

If you create a page that belongs in one of these navboxes but isn't already there, add it in the appropriate place in addition to placing the navbox in the new page.

Categories
The APL Wiki has a full Wikipedia-style category tree, which you can see by starting at the top-level category Contents. While all of Wikipedia's user-facing content is in encyclopedic articles, APL Wiki also has non-encyclopedic essays that discuss a topic such as how to use APL for a particular problem. When adding a new page, try and fit it into at least one category, but it's fine to leave it out if you're not yet comfortable with the category system (other editors can easily see pages with no category). Categories are added with syntax such as  at the end of the page.

Create new categories if needed, but please avoid Overcategorization. As with articles, each category should be placed in a parent category (the only uncategorized category is Contents). Make sure to read Wikipedia's guidelines about categories carefully and understand the existing category tree if you plan to make major changes to the category system.

Primitives and other built-ins
When creating a page for a primitive function, operator, or quad name, begin the page with the following template:

""

This inserts the text

""

and also adds a large floating illustration of the glyph, as seen at the right. You can use the  template for primitives with two different glyphs (for example  ), and   if you just want a box at the right (for example  ). Since all of these templates must be put at the very beginning of the article's first paragraph,  is useful if there should be leading text before the primitive's name.

At the bottom of such pages, include  and [ edit that template's content] if the page you're creating isn't already listed there.

Dialects
Begin your page about an APL dialect with the Infobox array language info box. These are all the optional parameters it supports:

Have a look at the existing dialect pages, e.g. Dyalog APL, to see how these values are used, Try to fill in as many as you can (but use only one of each singular/plural pair). You only need to use  if the language title differs from the page title (e.g. for technical reason like the inability to create a page that begins with a lowercase letter). In that case, begin the page with  where   should be the proper name of the dialect.

At the bottom of the page, include  and [ edit that template's content] if the dialect you're creating a page about isn't already listed there.