JavaRanch Home    
 
This page:         last edited 24 June 2013         What's Changed?         Edit

Page Formatting   

This installation of Friki uses "classic" formatting.

In this style page formatting is based on the style used in the "original" Wiki described at Wiki:TextFormattingRules

Text is mostly displayed as you have typed it. To prevent problems with rendering HTML, important characters such as '<'. '>, and '&' are "escaped". HTML normally joins lines and wraps the result, so to start a new paragraph, you need to put a blank line (which will be converted to a <p> tag). "Classic" markup also adds ways to indicate emphasis, strong emphasis, and so on.

The thing that makes this a "Wiki", and not just a collection of editable pages is the ability to create "links" between pages. In the "classic" formatting, a link is identified by creating a Wiki:WikiWord - placing two or more initial-capitalised words together (eg. FrontPage; this style is also known as Wiki:CamelCase). If the page exists, you'll see a link to it, if it doesn't exist yet, you'll see the name followed by a '?', which you can click to create the page.

The rules are described in more detail below:



Emphasis

  • Use doubled single-quotes ('') for emphasis (usually italics)
  • Use tripled single-quotes (''') for strong emphasis (usually bold)
  • Emphasis can be used multiple times within a line, but cannot span across line boundaries

References

  • JoinCapitalizedWords to make references to other pages on this Wiki.
  • Precede URLs with "http:", "ftp:", "gopher:", "mailto:", or "news:" to create links automatically as in: http://www.efsol.com/
  • You can also make "pretty" URLs by preceding them with a description in double quotes, like this: "Yahoo"http://www.yahoo.com/ results in Yahoo. This also works for local links: "the sandbox"SandBox results in the sandbox
  • Intra-page links can be made by using a hash marks between the page name and target name. This ("Link"PageFormatting#some-name) Link will jump to the bottom of the page.
  • Refer to pages on other Wikis using "interwiki" syntax as described at MeatBall:InterMap (see related FrikiInterWiki)
  • Use Six Single Quotes to AvoidMakingReferencesToOtherPagesOnThisWiki, or separate suffixes (like 's') (eg. FrontPages).
  • ISBN 0-13-748310-4 links to a bookseller. (The pattern is: "ISBN", optional colon, space, ten digits with optional hyphens, the whole thing optionally in square brackets. The last digit can be an "X".) We are an Amazon Associate.
  • I S B N: 0123456789 becomes ISBN 0123456789
  • [I S B N 0123456789] becomes ISBN 0123456789
  • [I S B N: 123-456-789-X] becomes ISBN 123-456-789-X

Images

  • URLs of objects ending with .gif, .jpg, .jpeg or .png are inlined as images.
  • To specify the size, use [width]*[height]:[URL], e.g. 100*50:http://www.abc.com/logo.png
  • Image links are possible via "http://www.abc.com/"http://www.abc.com/logo.png
  • Images can be left-aligned by prefixing them with "`": `http://www.abc.com/logo.png
  • Images can be right-aligned by prefixing them with "~": ~http://www.abc.com/logo.png
  • Images can be centered by prefixing them with "^": ^http://www.abc.com/logo.png

Horizontal Lines

  • Four or more hyphens at the beginning of a line make a horizontal rule

Bullets or Numbered Lists

  • One line for each item
  • tab * (or 8 spaces and *), for first level
  • tab tab * for second level, etc.
  • Use * for bullet lists, 1. for numbered lists (mix at will) -- always use 1., it will be renumbered automagically.

Definition Lists

  • tab term colon tab Definition, for example:

first term
This is first definition.
second term
This is the second definition.

Fonts

  • Indent with one or more spaces to use a monospace font:

This is text in a monospaced font.
  This is indented with three spaces.
This is not.

Indented Paragraphs (Quotes)

  • Prefix the text with the sequence tab space : tab, or 9 spaces, a colon, and 8 spaces, (often with emphasis) for quotations.

Sample:

This is quoted.
This isn't.

Preformatted Blocks

  • A line ending with '[' starts a preformatted block, which runs up to the next line which starts with ']'. Within a preformatted block WikiWords, lists, quotes, tables etc. have no significance, and indentation is preserved. Typically preformatted blocks are used for source code examples, or other complex text.
  • It is also possible to have a preformatted block syntax-colored. This works thanks to the JHighlight library. Instead of starting a block with '[', prepend a single character indicating the language in which to color the block: J for Java, X for XML and HTML, S for JavaScript, G for Groovy and C for C and C++. Here's an example for Java (which accordingly start with "J["):

    // comment about fancy objects
    FancyObject myFO = new FancyObject("foo""bar"42);
    myFO.doTheFancyObjectThing();

    @SomeAssertion("some value")
    public enum IceCream {
        VANILLA ("white"),
        STRAWBERRY ("pink"),
        WALNUT ("brown"),
        CHOCOLATE ("dark brown");
    }

Tables

This Wiki implements Ward Cunningham's table syntax introduced for his Wiki at http://fit.c2.com/, but not yet propagated back to the original Wiki.

  • Any line starting and ending with | (with optional trailing whitespace) will appear as a table.
  • Separate columns with |
  • Empty cells are merged with adjacent cells to form single spanning cells.
  • If you really want an empty cell, put six-single-quotes in it, and it will show as empty.
  • You can put preformatted blocks in table cells using |[ and ]|
  • line breaks can be put into table cells through the *br* syntax

 Example Table
typewith spanningheader
cols and several columns with a
line break

Sortable tables

This is a sortable table. Click on any of the labels in the header row, and watch what happens. Be sure to turn JavaScript on.

NumberTextDate
1.05jj2/6/1968
1.1bla7/20/1987
2.999999999999999999999ML7/16/2006
-5.0ee7/1/1987

Target of the intra-page link

  • Here (#some-name) is where the intra-page link jumps to:  


CategoryWiki

JavaRanchContact us — Copyright © 1998-2014 Paul Wheaton