Translations of this page?:

Entities

DokuWiki can replace certain characters or strings with other strings based on a configuration file. By default this is used to convert various character combinations to their typographical equivalent.

e.g.

<<  to « 
>>  to » 
=>  to ⇒

see also typography.

Details of the conversions are stored in the conf/entities.conf file. To avoid your changes being overwritten when upgrading Dokuwiki, you should place your own additions in a new file called conf/entities.local.conf.

Even though by default it is used with simple character replacements only, the entity system can also be used to insert more complex constructs into your pages. This includes HTML. However you should be aware that doing so is bound to break when used in combination with non-HTML renderers (like ODT for example). It is recommended to use UTF-8 characters instead whenever possible.

Be sure to read about UTF-8 Encoding before editing the config file.

Example Configs

The entity mechanism can be used to adapt DokuWiki to some French typography rules that necessitate non-breaking spaces before or after some punctuation marks.

<< &laquo;&nbsp;
? &nbsp;?
: &nbsp;:
! &nbsp;!
; &nbsp;;

To use typography for esperanto x-writing use the following:

CX   Ĉ
cx   ĉ
GX   Ĝ
gx   ĝ
HX   Ĥ
hx   ĥ
JX   Ĵ
jx   ĵ
SX   Ŝ
sx   ŝ
UX   Ŭ
ux   ŭ
entities.txt · Last modified: 2012/01/17 09:47 by Michitux
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Imprint Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsGitXRefTranslate