# Help:Editing

### From HaskellWiki

(Indentation old wiki vs. new wiki) |
m (→General editing help: Corrected another misspelling) |
||

(19 intermediate revisions by 7 users not shown) | |||

Line 8: | Line 8: | ||

==General editing help== |
==General editing help== |
||

− | Take a look at [http://en.wikipedia.org/wiki/Help:Editing wikipedia's help], which has all the details of how to format. |
+ | Take a look at Wikipedia's [http://en.wikipedia.org/wiki/Help:Editing editing help] and [http://en.wikipedia.org/wiki/Help:Wiki_markup Wiki markup] pages, which have all the details on how to format. |

− | + | ||

+ | You may wish to try out editing in the [[Sandbox]] or in your own user page before editing the wiki pages. |
||

==Differences from old wiki == |
==Differences from old wiki == |
||

Line 23: | Line 23: | ||

I'm sure there are others, feel free to add as you go :) |
I'm sure there are others, feel free to add as you go :) |
||

+ | |||

+ | ==Differences from recent Wikipedia== |
||

+ | |||

+ | ===Math=== |
||

+ | |||

+ | ==== Under/overbrace ==== |
||

+ | |||

+ | {| border=1 |
||

+ | | Wikipedia's new under/overbrace syntax |
||

+ | | <nowiki><math>\underbrace{2+3}_5</math></nowiki> |
||

+ | | <math>\underbrace{2+3}_5</math> |
||

+ | | works here in a different way. |
||

+ | |- |
||

+ | | The former Wikipedia syntax |
||

+ | | <nowiki><math>\begin{matrix} \underbrace{2+3} \\5 \end{matrix}</math></nowiki> |
||

+ | | <math>\begin{matrix}\underbrace{2+3}\\5\end{matrix}</math> |
||

+ | | works here as expected |
||

+ | |} |
||

+ | |||

+ | The former syntax uses matrix environment as an auxiliary tool — the same tool can be used to typeset matrices: |
||

+ | :<nowiki><math>\left[ \begin{matrix}1 & 2 \\ 3 & 4\end{matrix} \right]</math></nowiki> |
||

+ | :<math>\left[ \begin{matrix}1 & 2 \\ 3 & 4\end{matrix} \right]</math> |
||

+ | |||

+ | Multiple-embedded underbracings |
||

+ | :<math>\begin{matrix}1+\underbrace{2+3}\\\underbrace{\;\;\;\;\;\;\;\;\;5\;\;\;}\\6\end{matrix}</math> |
||

+ | can be achieved with the subscript-using syntax of the new Wikipedia in a straightforward way — embedding the parts in a hierarchical way. |
||

+ | |||

+ | As for the matrix-using syntax of the former Wikipedia and recent Haskell Wiki, a similar idea may work too, because also the <nowiki>\begin{matrix}...\end{matrix}</nowiki> environments can be embedded in a hierarchical way: |
||

+ | :<nowiki><math>\left[ \begin{matrix}1 & 2 \\ 3 & \left[ \begin{matrix} 4 & 5 \\ 6 & 7\end{matrix} \right] \end{matrix} \right]</math></nowiki> |
||

+ | :<math>\left[ \begin{matrix}1 & 2 \\ 3 & \left[ \begin{matrix} 4 & 5 \\ 6 & 7\end{matrix} \right] \end{matrix} \right]</math> |
||

+ | thus, also underbracings can be embedded, but precise alignment must be achieved with care. |
||

+ | |||

+ | There is also an alternative way to achieve the same visual result, using a rather "nasty" (but easy) trick |
||

+ | :<nowiki><math>\begin{matrix}1+\underbrace{2+3}\\\underbrace{5}\\6\end{matrix}</math></nowiki> |
||

+ | it is almost good |
||

+ | :<math>\begin{matrix}1+\underbrace{2+3}\\\underbrace{5}\\6\end{matrix}</math> |
||

+ | but the precise alignment must be made by hand, e.g. |
||

+ | :<nowiki><math>\begin{matrix}1+\underbrace{2+3}\\\underbrace{\;\;\;\;\;\;\;\;\;5\;\;\;}\\6\end{matrix}</math></nowiki> |
||

+ | resulting the expected |
||

+ | :<math>\begin{matrix}1+\underbrace{2+3}\\\underbrace{\;\;\;\;\;\;\;\;\;5\;\;\;}\\6\end{matrix}</math> |
||

+ | Thus, this is a rather nasty trick, operating at a low level and failing to grasp the logical structure. But it has an easy (layered) structure. |
||

+ | |||

+ | ==== Some new math symbols ==== |
||

+ | |||

+ | Upper corner quotation marks are used often in mathematical logic to denote "quotation", stressing that the enclosed expression is meant as literal part of the object language. In LaTeX's mathematical mode environments, they can be typeset with <nowiki>\ulcorner</nowiki> and <nowiki>\urcorner</nowiki>. The recent Wikipedia knows this solution too. In the former Wikipedia and recent Haskell Wiki, this solution does not work, another notation must be chosen or the sign must be inserted as an image. |
||

==Syntax highlighting and vim== |
==Syntax highlighting and vim== |
||

Line 41: | Line 86: | ||

If you find some spam - the easiest way to undo it is use the "diff" on the recent changes page (selecting the first spam change). Then, click on the "Revison as of yyyy-mm ..." link on the left side. This will show the page as it was before the spam edit. |
If you find some spam - the easiest way to undo it is use the "diff" on the recent changes page (selecting the first spam change). Then, click on the "Revison as of yyyy-mm ..." link on the left side. This will show the page as it was before the spam edit. |
||

− | Then, edit the page and save it as is (Please indicate you are reverting spam in the Summary). WikiPedia will warn you when you edit that this is an old version. But that is what you want - so go ahead and save it. |
+ | Then, edit the page and save it as is (Please indicate you are reverting spam in the Summary). [http://mediawiki.org MediaWiki] will warn you when you edit that this is an old version. But that is what you want - so go ahead and save it. |

## Latest revision as of 08:00, 20 January 2012

## [edit] 1 Style

Please adhere to the style guide:

## [edit] 2 General editing help

Take a look at Wikipedia's editing help and Wiki markup pages, which have all the details on how to format.

You may wish to try out editing in the Sandbox or in your own user page before editing the wiki pages.

## [edit] 3 Differences from old wiki

If you are converting / copying a page from the old wiki, there are few differences in the formatting.

- Numbered lists: Old wiki used
**1.**for numbered lists, new wiki uses the hash mark**#**. - List levels: Old wiki used spaces (AFAICT) to indent lists. New one uses multiple hashes or asterisks. e.g.
**#****would prefix a third level bullet item under a top level numbered, second level bulleted list. - Code: Old wiki used three braces to surround code. For this new wiki, delete the braces and then:
- In a list environment, use html (<code></code>) pairs. This also usually requires <br /> tags for line breaking.
- If you are at the main level, you can simply put a space in front of each line.
- And even better - Use <hask></hask> pairs for inline Haskell code and <haskell></haskell> for Haskell code blocks.

- General formatting: The old wiki seemed to be somewhat looser in its treatment of spaces and new lines. In the new wiki, a space at the start of a line means to do
*as is*or*code*type formatting. Extra blank lines between list items will restart lists. - Indentation: Old wiki used leading spaces. New wiki uses leading colons
**:**. The entire indented paragraph should be entered on a single line.

I'm sure there are others, feel free to add as you go :)

## [edit] 4 Differences from recent Wikipedia

### [edit] 4.1 Math

#### [edit] 4.1.1 Under/overbrace

Wikipedia's new under/overbrace syntax | <math>\underbrace{2+3}_5</math> | works here in a different way. | |

The former Wikipedia syntax | <math>\begin{matrix} \underbrace{2+3} \\5 \end{matrix}</math> | works here as expected |

The former syntax uses matrix environment as an auxiliary tool — the same tool can be used to typeset matrices:

- <math>\left[ \begin{matrix}1 & 2 \\ 3 & 4\end{matrix} \right]</math>

Multiple-embedded underbracings

can be achieved with the subscript-using syntax of the new Wikipedia in a straightforward way — embedding the parts in a hierarchical way.

As for the matrix-using syntax of the former Wikipedia and recent Haskell Wiki, a similar idea may work too, because also the \begin{matrix}...\end{matrix} environments can be embedded in a hierarchical way:

- <math>\left[ \begin{matrix}1 & 2 \\ 3 & \left[ \begin{matrix} 4 & 5 \\ 6 & 7\end{matrix} \right] \end{matrix} \right]</math>

thus, also underbracings can be embedded, but precise alignment must be achieved with care.

There is also an alternative way to achieve the same visual result, using a rather "nasty" (but easy) trick

- <math>\begin{matrix}1+\underbrace{2+3}\\\underbrace{5}\\6\end{matrix}</math>

it is almost good

but the precise alignment must be made by hand, e.g.

- <math>\begin{matrix}1+\underbrace{2+3}\\\underbrace{\;\;\;\;\;\;\;\;\;5\;\;\;}\\6\end{matrix}</math>

resulting the expected

Thus, this is a rather nasty trick, operating at a low level and failing to grasp the logical structure. But it has an easy (layered) structure.

#### [edit] 4.1.2 Some new math symbols

Upper corner quotation marks are used often in mathematical logic to denote "quotation", stressing that the enclosed expression is meant as literal part of the object language. In LaTeX's mathematical mode environments, they can be typeset with \ulcorner and \urcorner. The recent Wikipedia knows this solution too. In the former Wikipedia and recent Haskell Wiki, this solution does not work, another notation must be chosen or the sign must be inserted as an image.

## [edit] 5 Syntax highlighting and vim

Wiki syntax highlighting with support for highlighted, embedded Haskell fragments, specifically for the Haskell wiki, is available for Vim. Save this .vim file to your ~/.vim/syntax directory, and enable syntax highlighting dynamically with ":setf haskellwiki".

You can configure your browser to invoke vim with the haskellwiki syntax highlighting enabled by default, by calling vim with: -c "setf haskellwiki". More details in this blog entry.

## [edit] 6 Reverting spam

If you find some spam - the easiest way to undo it is use the "diff" on the recent changes page (selecting the first spam change). Then, click on the "Revison as of yyyy-mm ..." link on the left side. This will show the page as it was before the spam edit.

Then, edit the page and save it as is (Please indicate you are reverting spam in the Summary). MediaWiki will warn you when you edit that this is an old version. But that is what you want - so go ahead and save it.