DokuWiki

It's better when it's simple

User Tools

Site Tools


entities

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
entities [2015-03-27 15:00] – How to disable some of the default text to html conversions 81.19.3.71entities [2023-11-25 00:57] (current) – [See also] Klap-in
Line 14: Line 14:
 see also [[wiki:syntax#text to html conversions]] on the syntax page. see also [[wiki:syntax#text to html conversions]] on the syntax page.
  
-Details of the conversions are stored in the ''[[https://github.com/splitbrain/dokuwiki/blob/master/conf/entities.conf|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''. If you need to //disable// some of the default conversions you could do it by adding the same characters on both columns to ''conf/entities.local.conf'': the line there will take precedence over the one in the ''conf/entities.conf''E.g. add <code>(c)    (c)</code> to ''conf/entities.local.conf'' if you do not wish to have the letter c in brackets automatically replaced by the copyright sign.+=====Modifying/disabling some entity replacements===== 
 +Details of the conversions are stored in the ''[[https://github.com/dokuwiki/dokuwiki/blob/master/conf/entities.conf|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'' 
 + 
 +If you need to //disable// some of the default conversions you could do it by adding only the pattern and //not// a replacement to ''conf/entities.local.conf''. Modifying can by reusing a pattern, but add your own symbol. The line there will take precedence over the one in the ''conf/entities.conf'' 
 + 
 +e.g. if you do not wish to have the letter c in brackets automatically replaced by the copyright sign <code - conf/entities.local.conf> 
 +(c) 
 +>> #or with comment explaining that entity is removed 
 +</code> 
 +or if you prefer another arrow <code - conf/entities.local.conf
 +=>   ▶ 
 +</code> 
 + 
 +For configuration changes to take effect on the pages, the [[devel:caching|cache must be purged]]. 
  
 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 [[plugin:ODT]] for example). It is recommended to use UTF-8 characters instead whenever possible. 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 [[plugin:ODT]] for example). It is recommended to use UTF-8 characters instead whenever possible.
  
 Be sure to read about [[utf-8|UTF-8 Encoding]] before editing the config file. Be sure to read about [[utf-8|UTF-8 Encoding]] before editing the config file.
-===== Example Configs =====+ 
 +===== 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. 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.
- +<code - conf/entities.local.conf> 
-  << &laquo;&nbsp; +<< &laquo;&nbsp; 
-  ? &nbsp;? +? &nbsp;? 
-  : &nbsp;: +: &nbsp;: 
-  ! &nbsp;+! &nbsp;
-  ; &nbsp;; +; &nbsp;; 
-  >> &nbsp;&raquo;+>> &nbsp;&raquo; 
 +</code>
  
 To use typography for [[wp>esperanto|esperanto]] x-writing use the following: To use typography for [[wp>esperanto|esperanto]] x-writing use the following:
  
-  CX   Ĉ +<code - conf/entities.local.conf> 
-  cx   ĉ +CX   Ĉ 
-  GX   Ĝ +cx   ĉ 
-  gx   ĝ +GX   Ĝ 
-  HX   Ĥ +gx   ĝ 
-  hx   ĥ +HX   Ĥ 
-  JX   Ĵ +hx   ĥ 
-  jx   ĵ +JX   Ĵ 
-  SX   Ŝ +jx    
-  sx   ŝ +</code> 
-  UX   Ŭ + 
-  ux   ŭ+===== Using the number sign (#), not as comment ===== 
 + 
 +In ''conf/entities.local.conf'' the number sign ''#'' is used to start comments. If you want to use it as normal character, you have to escape it via backslash ''\#''. For example:
  
 +<code - conf/entities.local.conf>
 +~~noheader~~      <style> \#dokuwiki__header { display: none; } </style>
 +</code>
  
-=====See also=====+===== See also =====
   * [[config|Configuring DokuWiki]]   * [[config|Configuring DokuWiki]]
 +  * You can install and use the [[plugin:confmanager|{{https://raw.githubusercontent.com/cosmocode/confmanager/master/admin.svg?16}}]][[plugin:confmanager|Configuration File Manager]] for editing via admin interface of the wiki
entities.1427464807.txt.gz · Last modified: 2015-03-27 15:00 by 81.19.3.71

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki