We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You need to opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
You are here: TWiki> Plugins Web>SpacedWikiWordPlugin (09 Jun 2008, OliverKrueger)
Tags:
linking2Add my vote for this tag rendering2Add my vote for this tag usability1Add my vote for this tag create new tag
, view all tags

Spaced Out Wiki Word Plugin

Display TWiki links spaced out: WebHome is displayed as Web Home.
Or (TWiki 4.2) use this plugin to display "underscore topic names" like Topic_name as Topic name.

Space Out Options

You can choose to switch on or off either display option.

Spaced out WikiWords will definitely make links more readable, but they can also produce "Odd Looking Sentence Case" links.

Use underscore topic names if you want total control over links:

  1. (Optionally) disable automatic linking of WikiWords. Do this if you are in the position to teach your users to only write links in bracket notation like [[WebHome]]. This is also how Wikipedia links are written. Bracket notation is necessary to create links for underscore topic names, but you can also mix both link notations.
  2. Use bracket notation without explicit link labels:
    • [[WebHome][TWiki WebHome]] - explicit link label, no spacing out
    • [[WebHome]] - link is label, so no explicit link label: this is spaced out
  3. Use underscores to create natural looking links:
    • A topic name such as [[Human_evolution]] will be rendered as Human evolution
    • Plain topic names like Human_evolution are not expanded; always use bracket notation

Syntax Rules

WikiWord links

You don't have to write any syntax. If this plugin is enabled, wiki words are automatically spaced out. Automatically spaced out are: TopicName, Web.TopicName, [[TopicName]].

Explicitly written link labels are not spaced out. Examples: [[TopicName][TopicName]] or [[TopicName][SomeOtherName]].

Underscore links

SPACE_OUT_UNDERSCORE_LINKS needs to be set to 1. Automatically spaced out are: [[Underscore_topic]], but not Underscore_topic (without brackets).

Spacing out search results

Link labels in search results are also considered 'explicit':

[[$web.$topic][$topic]]
... is not spaced out automatically.

Instead write:

[[$web.$topic][$percntSPACEOUT{$topic}$percnt]]

to generate: Spaced Wiki Word Plugin Spaced Wiki Word Plugin Appraisal Spaced Wiki Word Plugin Dev Spaced Wiki Word Plugin Dev Archive Spaced Wiki Word Plugin Next Gen Spaced Wiki Word Plugin Next Gen Dev

More info on search syntax in FormattedSearch? .

Preventing spacing out of some words

Some words (often brand names and medical terms) are written in CamelCase notation and should not be spaced out. For example: CamelCase, DaimlerChrysler, MasterCard.

Define a list of words that should not get spaced out with DONTSPACE at the Plugin Settings below.

Troubleshooting

My links do not display spaced out

  • At Plugin test below, check if this plugin is enabled and if the correct spacing settings are applied.
  • You have used an explicit link label: with [[WebHome][TWiki WebHome]], "WebHome" is not spaced out. Use [[WebHome]] or [[WebHome][TWiki %SPACEOUT{"WebHome"}%]]
  • You have used underscore topic names without bracket notation. Always write [[Human_evolution]]
  • You are showing links from a search result. See #SearchResults above.
  • You are using the Find Elsewhere Plugin, and the link is in another web. You need to explicitly qualify the WikiWord with the web name prefix (or, even better, fix this plugin to be compatable with that one).

I try to write anchors with underscores

Anchors written as #Some_anchor are not supported. Use WikiWord syntax instead: #SomeAnchor

Some word are spaced out but shouldn't

See #PreventingSpaceOut.

Plugin Settings

Plugin settings are stored as preferences variables.

  • One line description, shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Display TWiki links spaced out

  • List of words that should not be spaced out (separated by commas):
    • Set DONTSPACE =

  • Where spacing is applied.
    • SPACE_OUT_WIKI_WORD_LINKS will space out WikiWord links to Wiki Word links
      • Set SPACE_OUT_WIKI_WORD_LINKS = 1
    • SPACE_OUT_UNDERSCORE_LINKS will space out Topic_name links to Topic name links
      • Set SPACE_OUT_UNDERSCORE_LINKS = 1
    • Remove anchor dashes when writing [[#SomeAnchor]]
      • Set REMOVE_ANCHOR_DASHES = 1

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 0

Plugin Tests

  • This plugin is not enabled.
  • WikiWord links will be spaced out.
  • Underscore_topic links will be spaced out.
  • NOAUTOLINK is not set. WikiWords will automatically create links. Test: SpacedWikiWordPlugin
  • Anchor dashes will be removed. Test: #PluginSettings

Plugin Installation Instructions

To install plugin:

  • Unzip the archive to the top of your directory
  • TWiki 4 and higher: Visit configure in your TWiki installation, and enable the plugin in the {Plugins} section.

Plugin Info

Plugin Author: TWiki:Main.MartinCleaver (2002, 2004), TWiki:Main.ArthurClemens (2007)
Plugin Version: 05 May 2007
History:  
05 May 2007 Arthur Clemens: fixed a wrong function call, thanks TWiki:Main.JohnFitzpatrick.
04 May 2007 Arthur Clemens: spacing out uses a Core function (from Plugins version 1.13; fallback for older versions); added support for spacing out of "underscore topic names"; added optional removal of anchor dashes.
20 Apr 2007 Arthur Clemens: updated with regexes from TWiki Core spaceOutWikiWord; added DONTSPACE option.
12 Apr 2004 Updated for TWiki 3
14 Apr 2002 First release
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.0
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/SpacedWikiWordPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/SpacedWikiWordPluginDev
Download: http://TWiki.org/cgi-bin/view/Plugins/SpacedWikiWordPlugin
Topic attachments
I Attachment Action Size Date Who Comment
elsemd5 SpacedWikiWordPlugin.md5 manage 0.2 K 05 May 2007 - 16:33 ArthurClemens  
ziptgz SpacedWikiWordPlugin.tgz manage 14.0 K 05 May 2007 - 16:33 ArthurClemens  
zipzip SpacedWikiWordPlugin.zip manage 24.5 K 05 May 2007 - 16:33 ArthurClemens  
elseEXT SpacedWikiWordPlugin_installer manage 29.6 K 05 May 2007 - 16:33 ArthurClemens  
Topic revision: r25 - 09 Jun 2008 - 12:58:10 - OliverKrueger
Plugins.SpacedWikiWordPlugin moved from Plugins.SpacedOutWikiWordsPlugin on 16 Apr 2002 - 19:51 by JohnTalintyre - put it back
 
TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback