DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:side_note

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
plugin:side_note [2011-02-24 08:22] 84.22.142.254plugin:side_note [2013-03-06 15:42] (current) Klap-in
Line 1: Line 1:
 +
 ====== Definition Side Note ====== ====== Definition Side Note ======
  
Line 10: Line 11:
 depends    : depends    :
 conflicts  : conflicts  :
-similar    : note.+similar    : note, imagebox, imagereference
 tags       : boxes, caption, !experimental tags       : boxes, caption, !experimental
 ---- ----
Line 19: Line 20:
 ===== Description ===== ===== Description =====
  
-With this plugin the [[:syntax]] of [[:DokuWiki]] is extended to allow Side Notes. The syntax to use this plugin is:+With this plugin the [[:wiki:syntax]] of [[:DokuWiki]] is extended to allow Side Notes. The syntax to use this plugin is:
  
   <side>This is my centered note </side>   <side>This is my centered note </side>
Line 143: Line 144:
      */      */
     function connectTo($mode) {     function connectTo($mode) {
-        $this->Lexer->addEntryPattern('<side right>(?=.*\x3C/side\x3E)',$mode,'plugin_sidenote'); +        $this->Lexer->addEntryPattern('<side right>(?=.*</side>)',$mode,'plugin_sidenote'); 
-        $this->Lexer->addEntryPattern('<side left>(?=.*\x3C/side\x3E)',$mode,'plugin_sidenote'); +        $this->Lexer->addEntryPattern('<side left>(?=.*</side>)',$mode,'plugin_sidenote'); 
-        $this->Lexer->addEntryPattern('<side>(?=.*\x3C/side\x3E)',$mode,'plugin_sidenote');+        $this->Lexer->addEntryPattern('<side>(?=.*</side>)',$mode,'plugin_sidenote');
     }     }
     function postConnect() {     function postConnect() {
Line 216: Line 217:
 I disagree --- a better pattern would be ''%%<side(?:\s+[^\r\n>]+)?>(?=.*</side>)%%'' This would allow the plugin to catch ''%%<note>%%'', ''%%<note left>%%'', or ''%%<note gobble-de-gook>%%'', but allow another plugin to catch, say, ''%%<sideways>%%''. I disagree --- a better pattern would be ''%%<side(?:\s+[^\r\n>]+)?>(?=.*</side>)%%'' This would allow the plugin to catch ''%%<note>%%'', ''%%<note left>%%'', or ''%%<note gobble-de-gook>%%'', but allow another plugin to catch, say, ''%%<sideways>%%''.
  
->> I always knew there was a way, but that it was beyond my regex expertise :-)  (\x3c & \x3e changes to < > since parser has been patched to support them) --- //[[chris@jalakai.co.uk|Christopher Smith]] 2006-04-22 16:53//+>> I always knew there was a way, but that it was beyond my regex expertise :-)  --- //[[chris@jalakai.co.uk|Christopher Smith]] 2006-04-22 16:53//
  
 >This plugin slightly breaks the <nowiki>\\</nowiki> line breaker when entering sidenote text. If you use the doubleslashes it throws a full empty line between paragraphs. You are forced to use <br> if you don't want messy spacing between lines. Is it possible to change this plugin so you can set a fixed column width in the tag, and the sidenote will autowrap with you manually needing to enter line breaks? [[dhry@dhryland.com|Dean-Ryan Stone]] 20060807 >This plugin slightly breaks the <nowiki>\\</nowiki> line breaker when entering sidenote text. If you use the doubleslashes it throws a full empty line between paragraphs. You are forced to use <br> if you don't want messy spacing between lines. Is it possible to change this plugin so you can set a fixed column width in the tag, and the sidenote will autowrap with you manually needing to enter line breaks? [[dhry@dhryland.com|Dean-Ryan Stone]] 20060807
plugin/side_note.txt · Last modified: 2013-03-06 15:42 by Klap-in

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