====== symbols4odt Plugin ====== ---- plugin ---- description: Provides symbols that can be exported into ODT files with the odt plugin. For example, the plugin can create checkboxes in wiki pages, as well as in an exported ODT file. author : Thomas Schäfer email : thomas@hilbershome.de type : syntax lastupdate : 2021-11-01 compatible : 2020-07-29 "Hogfather" depends : odt conflicts : similar : shy tags : export, odt, symbols downloadurl: https://github.com/ternite/dokuwiki-plugin-symbols4odt/archive/v0.8.zip bugtracker : https://github.com/ternite/dokuwiki-plugin-symbols4odt/issues sourcerepo : https://github.com/ternite/dokuwiki-plugin-symbols4odt donationurl: screenshot_img : ---- ===== Installation ===== Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually. :!: **External requirements:** This plugin requires the following additional components that must be installed separately: * [[odt]] ===== What's it for? ===== This plugin allows for the insertion of symbols that work both on wiki pages, as well as in exported ODT files. Originally, this plugin was intended for the insertion of soft hyphens. It was implemented to provide the functionality of the [[https://www.dokuwiki.org/plugin:shy|Shy Syntax Plugin]] plus an export implementation for ODT files created by the [[https://www.dokuwiki.org/plugin:odt|ODT Plugin]]. The implementation was a more generic approach, so it can create more symbols in addition to soft hyphens. It has a generic syntax for the insertion of UTF8 symbols, and a specific syntax for adding soft hyphens, and check boxes. ===== Syntax ===== ^ Syntax ^ Result ^ Alternative Syntax ^ | {{utf8symbol>CODE}} | Generic function to insert a hexadecimal code of an UTF8 symbol. Inserting 26A0 (instead of CODE) will create the UTF8 symbol ''[[https://www.compart.com/de/unicode/U+26A0|⚠]];'' (Warning Sign). | None. | | | Creates an empty checkbox. | | | | Creates a checked checkbox. | | | | Create a soft hyphen, functional in wiki pages and ODT files. If inserted in the middle of a word, this indicates that a line break can be placed there, if necessary. | <->\- | ===== Configuration and Settings ===== **No configuration settings available.** On the code level, the plugin is readily extendible by inserting patterns into the ''getPatterns()'' function inside the class ''syntax_plugin_symbols4odt'' (within the module's ''syntax.php''). This extension mechanicsm is explained in the following by example: "checkbox_filled" => array( "pattern" => array('',''), "substitute4XHTML" => "", "substitute4ODT" => $this->getUTF8forHexadecimal('2612'), ), This entry is an element of the array stored in ''$this->patterns''. The first string, ''checkbox_filled'' is the name of the pattern, which will be used internally and must be unique in respect to the plugin's list of patterns. This string maps to an array that consists of 3 constituents. ^ Constituent ^ Semantics ^ | "pattern" | Maps to an array of strings that will be used within the [[https://www.dokuwiki.org/devel:syntax_plugins?s[]=handle#handle_method|handle() method]] of this plugin. In this example, the pattern "checkbox_filled" will count as a match if the parsed wiki text contains either the string "", or "". | | "substitute4XHTML" | In case of a match (see "pattern"), the string defined in ''substitute4XHTML'' will be given to the XHTML representation of the wiki page. HTML Tags are allowed, here, so take care of what you define here, and who accesses the syntax.php file. | | "substitute4XODT" | In case of a match (see "pattern"), the string defined in ''substitute4XODT'' will be given to the ODT export file. | You can access ''$this->getUTF8forHexadecimal($utfCode)'' to pass through UTF8 symbols. Inserting ''$utfCode = "26A0"'' will create the UTF8 symbol ''[[https://www.compart.com/de/unicode/U+26A0|⚠]];'' (Warning Sign) as an HTML entity, which should nicely show both on XTML output, and on ODT output. ===== Development ===== [[https://github.com/ternite/dokuwiki-plugin-symbols4odt|Sources]] on github. === Change Log === * **2021-11-01** * v0.8 (Initial release) === Known Bugs and Issues === See [[https://github.com/ternite/dokuwiki-plugin-symbols4odt/issues|issue tracker]] on github. ===== FAQ ===== None, yet. ===== Discussion ===== Start here.