TiddlyWiki has an option to make CamelCase text (where the words are run together without spaces and capitalized) turn automatically into links. This is discussed extensively in the answer to the camel-case knowledge tiddlers exercise.
Should you use CamelCase?
CamelCase makes it easier to link to things, but some people think it's ugly. The only general advice I can give is figure out what you like, and don't feel like you have to fall solidly on one side of the fence for every wiki. For my personal notes, I love CamelCase; for the wiki I wrote this book in, it's more irritating than helpful, since I want my page titles to be friendlier and I don't want the CamelCase titles I quote to become links.
You can learn more about my decision to use CamelCase for my Mosaic Muse notes system at the WikiCamelCase page there.
Escaping CamelCase words
If you have a word that is in CamelCase, but you don't want it to be a link, you can escape it by placing a tilde in front of it, like ~CamelCase
. As of TiddlyWiki 5.3.0, the tilde won't be rendered whether CamelCase linking is on or not, so you can always do this if you think some CamelCase text might be incorporated in a wiki that has CamelCase linking on.
Is it CamelCase?
The rules for determining whether a given word is in CamelCase are not always obvious, particularly when numbers or symbols are involved. Here are several things that aren't CamelCase that you might think would be:
CAmelcase
Camel2Camel
3Camels
camelCaseWord
Camel-Case
To be considered CamelCase, the word must:
- Begin with an uppercase letter.
- Contain at least one uppercase letter that immediately follows a lowercase letter.
- Contain only letters and numbers – no spaces or punctuation.
The above cases all fail that test.
(Folks who have been around for long enough may remember that in TiddlyWiki Classic, the rules were different, even going so far as to allow punctuation in some places. They were made quite a bit stricter in TiddlyWiki 5.)
Temporarily turning off CamelCase linking
Even if you normally like CamelCase in your wiki, you might occasionally find you'd like to turn it off for a particular tiddler. For instance, maybe you've copied and pasted some text that contains a bunch of CamelCase words from some other source, and you don't want to have to go through and manually escape all of them.
Fortunately, there's an easy fix in this situation. Just insert the following pragma at the top of the tiddler:
\rules except wikilink
As with any other pragma, this must go at the beginning of your tiddler. If other lines come before it, they must be empty lines, comments, or other pragmas (e.g., \procedure
or \import
). Otherwise, the text \rules except wikilink
will appear literally.