[Home]TextFormattingRules

UseModWiki | RecentChanges | Preferences

Overview

1. Tips and Hints
2. Basic Text Formatting
3. Additional Text Formatting Rules
4. Pages, URL, and InterWiki Links
4.1. Pages
4.2. URLs
4.3. URLs Using Anchors
4.4. On-Site URLS
4.5. InterWiki
5. Lists
5.1. Simple lists
5.2. Numbered lists
5.3. Indented Text
5.4. Definition List
6. Images
7. Preformatted Text
8. Miscellaneous rules
9. HTML
10. Questions
See also, too: WikiBugs/TextFormatting, MeatBall:TextFormattingRules and WikiMarkupLanguage.

1. Tips and Hints

The following text is an overview of the UseModWiki text formatting rules.

Wiki Text Formatting Rules: simple editing is one of the major benefits of using a wiki. Users can edit pages without knowing HTML, and still use many formatting features of HTML. Most wikis define a set of formatting rules to convert plain text into HTML. Some wikis (like this one) also allow some HTML "tags", like <b>, <i>, and <pre> within a page. (Some wikis use raw HTML instead of special formatting rules.)

Q. Can anyone change this page?

A. Yes, but please don't unless you're actually adding useful content.

2. Basic Text Formatting

Entering text on a wiki can be done simply. Follow these guidelines:

Repetition of the first character on the line generally increases the indentation or emphasis

3. Additional Text Formatting Rules

4. Pages, URL, and InterWiki Links

See InterWiki, too.

4.1. Pages

You can link to a page by removing the spaces between two or more words, and starting each word with a capital letter. For instance, WikiName and TextFormattingExamples are samples of page links.

People abhorring PascalCase? can use a free link: surround text with two pairs of square brackets like [[Sample Free Link]]. This allows all-downcase or atomic capitalized names as well as strange names including punctuation.

N. B. To create a new page, simply add a new entry to the appropriate index page(s); once you save the changes the new entries will appear as the link name with a question-mark appended (e.g. NewEntry?). Click on the question-mark and an empty page will be presented.

4.2. URLs

Plain URL link: http://meatballwiki.org/wiki/SandBox -- http://meatballwiki.org/wiki/SandBox

Named URL link: [Sandbox] -- [http://meatballwiki.org/wiki/SandBox Sandbox]

4.3. URLs Using Anchors

 [Buried Treasure]  -- [http:/cgi-bin/mb.pl?SandBox#anchor Buried Treasure]

(Tip: you should be able to use relative addressing eg http:/wiki.pl?SandBox#Anchor)

To set an anchor:

Questions: 1) I guess "anchor" can have any letters valid in an URL?! 2) I cannot make [#anchor] work on my wiki, and it will appear as text on the screen instead of creating an anchor.

4.4. On-Site URLS

To make on-site links you must respecify the protocol e.g.:

Problem is local; this #anchor syntax works for me without any issues. --CParker?
It doesn't work because the syntax is incorrect. You need to use [http:/cgi-bin/wiki.pl?page#anchor link-text] instead of [http:#anchor link-text]. --AndrewTurner

Full relative urls do not seem to work.

There is a problem with this. This generates links which looks like this in the source: <a href="http:/wiki.gif">. This is, however, not a correct relative URL, according to [RFC1808] (see Section 5.2, last example). It seems that netscape 7 does not interpret such links as intended, for example.

4.5. InterWiki

InterWiki link: UseMod:InterWiki -- UseMod:InterWiki

You can separate links from adjacent text with spaces or the special "" (two double-quotes) delimiter. The "" delimiter is not displayed - it is useful for cases like plural forms of page links (such as UseModWikis). In nearly all cases, trailing punctuation is ignored, so you can safely make links like https://www.usemod.org/, without the trailing comma being part of the link. You can also use FreeLinks.

5. Lists

5.1. Simple lists

* Text for a bulleted list item.
** Text for second-level list.
*** Text for third level, etc.

...which looks like:

5.2. Numbered lists

# Text for a numbered list item.
## Text for second-level list.
### Text for third level, etc.
## Another Text for the second level.

...which looks like:

  1. Text for a numbered list item.
    1. Text for second-level list.
      1. Text for third level, etc.
    2. Another Text for the second level.

5.3. Indented Text

: Text to be indented (quote-block)
:: Text indented more
::: Text indented to third level

...which looks like:

Text to be indented (quote-block)
Text indented more
Text indented to third level

5.4. Definition List

Term with indented definition: [without a blank line between term and definition]

;Term:Definition (indented)
;;Term (indented):Definition (indented two levels)
;;;Term (indented twice):Definition (indented to third level)
...which looks like:
Term
Definition (indented)
Term (indented)
Definition (indented two levels)
Term (indented twice)
Definition (indented to third level)

6. Images

Just provide the URL, and the image will be inserted inline.

These extensions are recognized: gif, jpg, png, bmp, jpeg, ico and tiff.

Note case sensitivity: capitalized extensions such as .GIF, .PNG, .JPG, etc. do NOT work. Some digital cams capitalize image names automatically, so you have to edit them before linking them into your wiki. -- Celine

If you have a choice, results are usually best with png for computer generated images, and JPEG for photographic images.

7. Preformatted Text

Individual lines can be displayed as preformatted (fixed-width or "typewriter"-font) text by placing one or more spaces at the start of the line. Other wiki formatting (like links) will be applied to this kind of preformatted text.

Additionally, multi-line sections can be marked as pre-formatted text using lines starting with <pre> (to start pre-formatted text), and </pre> (to end preformatted text). The <pre> and </pre> tags are not displayed. Wiki links and other formatting is not done within a preformatted section. (If you want wiki formatting, use spaces at the start of the line instead of the <pre> and </pre> tags.)

For instance:

Pre-formatted section here.  No other link =link=
  or format processing

is done on pre-formatted sections.

For instance, UseModWiki is not a link here.

Use nowiki tags if you want \
to include a backslash at the end of a line.
and:

   This is the starting-spaces version of
   preformatted text.  Note that links like
   UseModWiki still work.

8. Miscellaneous rules

9. HTML

10. Questions

Q. I don't know whether this is intentional, but you can create an image which links to a url using [url image_url] e.g.

A. This feature is intentional, and it was added for the 1.0 release of UseModWiki. I simply hadn't updated the documentation yet.

Problem With Underscores in Links to Pages:

Q. Say I create a page called "My_New_Page" -- when viewing it, the underscores are changed to spaces, etc.

But I can't seem to link to it using a page link. If I link to MyNewPage? it's shown with a questionmark as a nonexistant page. Fair enough, it doesn't exist. But if I link to it as "My_New_Page" that doesn't get picked up as a page link. Any thoughts?

A. Try [My New Page]? ("My_New_Page" in double square brackets). Look at the explanation of FreeLinks.

Nonexistent pages, like SampleUndefinedPage?, will be displayed with a question mark link. The question mark link indicates the page doesn't exist yet--follow the link to create and edit the page. [The sample page used here is a special example page--you can't define it.]

Q. How can I create a comment in UseModWiki? I want to place a comment in a Wiki, not shown on the generated HTML page.

A. There is no way to add invisible comments in UseModWiki. (Some other wikis allow HTML-style comments, but not UseModWiki.) -- CliffordAdams

Not strictly true - if you allow raw html ($RawHtml =1; NB security risk) you can then put <html><!-- coment in here --></html> -- Rob Stone

Futher to that i've made a simple change adding one line (~ line 1690 immediately before the <tt> (MeatBall) line
s/\&lt;\!--(.*?)--\&gt;/<\!-- $1 -->/gis; #RFS

This seems to work fine for coments - Is there an issue i am missing ?-- Rob Stone

I use // at the beginning of a line for a comment by adding 1 line in foreach around line 1770 -- Ken Rich --:

       foreach (split(/\n/, $pageText)) {  # Process lines one-at-a-time
          /^\/\/.*$/ && next;         ## Implement // commenting

Q. A company has a name ending in a plus sign, such as "foo+". How can I make that into a link? If I use the doubled brackets [[foo+]], it doesn't come out right.

Q. If a link has a '[' and ']' character, how do I link it to wiki? e.g. www.anywebpage.com/[test].doc

A. un-escaped '[' and ']' characters are not valid in URIs [RFC2396 2.4.3]. Maybe %encoding them (%5b and %5d) in the URL would work?

Q. I have just got UseMod working on my Windows 2K machine, with Apache, but the InterWiki feature doesn't seem to work. For example, when I type UseMod:InterWiki , it assumes I want to create two new pages, called UseMod and InterWiki respectively. How do I enable the InterWiki functionality?

A. Have you added an Intermap file to your data directory, as discussed in InterWikiDocumentation?

Q. Referencing an uploaded file with a camel-case-name produces defunct link. Is there a workaround?

A. See WikiBugs/CamelCaseImageUploadCausesProblemsWithDisplay

Q. Has anyone considered removing the underscore '_' character from the page name. So that these: '[Many Times Before]?' '[Many Times Before]?' and ManyTimesBefore? would all go to the same page? Also, is the behavior of free links with spaces intentional (it diplays an outer set of brackets)?

A. To remove underscore characters from page names, modify the function FreeToNormal (on or about line 3057). My version follows. It not only removes underlines as suggested (as that appeals to me), but always capitalizes the first character (as the current code has a slight bug in it that resolves [[ many times before]] to [[many_Times_Before]] rather than [[Many_Times_Before]]. By simply moving the ucfirst call to after the check for leading spaces, this is resolved.
                               -- DarochDad

sub FreeToNormal {
  my ($id) = @_;

  $id =~ s/ /_/g;
  if (index($id, '_') > -1) {  # Quick check for any space/underscores
    $id =~ s/__+/_/g;
    $id =~ s/^_//;
    $id =~ s/_$//;
    if ($UseSubpage) {
      $id =~ s|_/|/|g;
      $id =~ s|/_|/|g;
    }
  }
  $id = ucfirst($id)  if ($UpperFirst || $FreeUpper); #moved -- DarochDad
  if ($FreeUpper) {
    # Note that letters after ' are *not* capitalized
    if ($id =~ m|[-_.,\(\)/][a-z]|) {    # Quick check for non-canonical case
      $id =~ s|([-_.,\(\)/])([a-z])|$1 . uc($2)|ge;
    }
  }
  $id =~ s/_//g; # Remove _ characters -- DarochDad
  return $id;
}
A. Hmm, I can't reproduce this: [many times before]? [many Times Before]? [Many Times Before]?. sample free link sample Free Link Sample Free Link -- MarkusLude

Q: Is there an equivalent to named URL links for uploaded files? I would prefer to see [Document_A] or [important document] instead of upload:Document_A when linking a document?

A: There's no an equivalent by design; unless you want to hack the script and sintax. If you make that, there won't be possible export to other usemod based wikis (unless you want to write some snippets in order to make possible conversion) --JuanmaMP

UseModWiki | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited November 6, 2023 7:56 pm by MarkusLude (diff)
Search: