LDP WikiText Editing HOWTO
Prev |  | Next

# 5. How Does It Work?

We tried to use the same text hints that are used on the Wikipedia, which came from UseModWiki. There are some differences between different Wiki systems, but most of them are quite similar to this one, and it has proved itself through use.

A blank line separates paragraphs, and there are other hints for making sections, bulleted lists, links, filenames, etc.

## 5.1. Sections

    =Introduction|intro=

creates a new top level section. See the pipe character followed by "intro"? Many hints provide for an "id", and this is how you supply it. For sections, the id will become the output filename (intro.html, in the first example), or the html "tag" used for intradocument linking.

    ==How Does It Work?|how-does-it-work==

creates a second-level section, and

    ===Why Would I Use It?|why?===

creates a third level section.

## 5.2. Lists

### 5.2.1. Numbered Lists

    #one
    #two
    #three
    /#

The "#" prefix says to make a numbered list. The numbered list continues until the end of the current section, or until it hits a line with only "/#", which closes the list. After opening another "#" list, the numbering will begin over again at "1".

Here is how the above block will appear in the final document:

1. one

2. two

3. three

### 5.2.2. Bulleted Lists

Bulleted lists work almost the same, except you use the "*" hint, and you don't have to worry about renumbering issues:

    *one
    *two
    *three
    /*

Here's how the above block will appear in the final document:

- one

- two

- three

## 5.3. Links

Use the square brackets to identify links, like this:

    [[http://www.linuxdoc.org|Linux Documentation Project]]

In this case, the text after the pipe character isn't an id, but the "title" of the link.

There are two special namespaces that you can use besides the standard "http:" and "mailto:" namespaces that you are probably famliar with. The first is the "ldp:" namespace. Look at the following link:

    [[ldp:Distributions-HOWTO]]

When you use the "ldp:" namespace, WikiText will look up the document that you named in the LDP database, and generate a link to it.

Note: we're still working on entering the correct "name" in all of our database records, so only a few are working. But don't worry. Just let us know if you need to use a link that isn't correct yet and we'll fix it right away.

The second special namespace is the "wiki:" namespace. It will generate a link to the article on the Wikipedia, an open source encyclopedia project. We hope to mirror some of the most appropriate articles from the Wikipedia right on the LDP. Wikipedia has many great articles on computer related topics that aren't the kind of information we do at the LDP, but which would complement our documents very well. For instance, there are articles on virtual memory, operating systems, and so on. For now, your link will go to the live Wikipedia site. Eventually, it will go to a mirror on our site, but with a link to the "real" site.

The following links go to articles called "Operating system" and "Linux kernel" on the Wikipedia:

    [[wiki:Operating system]]
    [[wiki:Linux kernel]]

Wikipedia is a great resource for all Netizens. Both the software they use and their content are open source.

## 5.4. Filenames

You can indicate filenames by wrapping them with double brackets, just like http and other links. Or, you can specify the "file" namespace:

    [[/etc/apache/httpd.conf]]
    [[file:/etc/apache/httpd.conf]]

Either way, it will render as `/etc/apache/httpd.conf`.

## 5.5. Emphasis

You can make certain words emphasized by wrapping them with three (3) single-quotes, like this:

    '''Wow!'''

That will render like: Wow!

## 5.6. QandASets

You can create question and answer sets if you're writing a FAQ, or if you have a FAQ section in your document. Just make "Q:" and "A:" the first characters on a new line, and the QandASet tags will automatically be created.

    Q: What if you want to do DocBook that isn't supported by WikiText?

    A: Mu.

And this is how the example renders. Notice that a list of questions appears right before the first question. This looks a bit silly in this example, since there is only one question and it just gets repeated twice. If you're working on the Linux-FAQ, though, it's really nice.

Q: What if you want to do DocBook that isn't supported by WikiText?

Q: What if you want to do DocBook that isn't supported by WikiText?

A: Mu. See the next section.

## 5.7. Fancy Stuff

There is no DocBook structure that is not supported by WikiText. Why? Because if there is no WikiText for it, you can just put the tags you need directly into the document, and they will work.

There are a few "special" tags that are not inline DocBook, but section structures, among them the "programlisting" and "screen" tags. You should keep in mind that none of the WikiText functions will work inside these tags. You don't want commented lines in your code sample converted into numbered lists, do you?

    # this is a comment
    # it is NOT a numbered list!

Prev | Home | Next
Why Would I Want to Use One? |  | But What About the Meta-Data?