====== keyboard plugin ====== ---- plugin ---- description: Marks text as keyboard keys author : Gina Häußge email : osd@foosel.net type : syntax lastupdate : 2008-05-04 compatible : 2006-03-09, 2006-11-06, 2009-12-25 "Lemming", 2010-11-07 "Anteater", 2011-05-25 "Rincewind", "Angua" depends : conflicts : similar : tags : keyboard downloadurl: http://foosel.org/_media/snippets/dokuwiki/plugin-keyboard.tar.gz ---- [[http://wiki.foosel.net/snippets/dokuwiki/keyboard|Details and Download]] ===== Add Latex-Render ==== If you want to use this package with [[plugin:dokutexit]], you can easily add latex-support: add the following after line 105 in "syntax.php" if ($mode == 'latex') { list($state, $match) = $data; switch ($state) { case DOKU_LEXER_ENTER : $renderer->doc .= '\framebox{'; break; case DOKU_LEXER_UNMATCHED : foreach ($match as $key) { if (substr($key, 0, 1) == "'" and substr($key, -1, 1) == "'" and strlen($key) > 1) { $out[] = $renderer->_xmlEntities(substr($key,1,-1)); } else { if (isset($lang[$key])) { $out[] = $lang[$key]; } else { $out[] = $renderer->_xmlEntities(ucfirst($key)); } } } $renderer->doc .= implode('} + \framebox{', $out); break; case DOKU_LEXER_EXIT : $renderer->doc .= '}'; break; } return true; }