DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:xhtmlruby

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
Next revisionBoth sides next revision
plugin:xhtmlruby [2010-05-01 00:28] 86.89.151.209plugin:xhtmlruby [2013-11-02 02:29] Klap-in
Line 6: Line 6:
 email      : pomax@nihongoresources.com email      : pomax@nihongoresources.com
 type       : Action type       : Action
-lastupdate : 2010-05-01+lastupdate : 2010-10-14
 compatible : 2009-02-14b (not tested on earlier versions) compatible : 2009-02-14b (not tested on earlier versions)
 tags       : ruby, furigana tags       : ruby, furigana
 +
 +downloadurl: http://projects.nihongoresources.com/downloadables/plugin-xhtmlruby.tar.gz
 ---- ----
  
Line 15: Line 17:
 Download and install the plugin using the [[plugin:plugin|Plugin Manager]] using the following URL. Download and install the plugin using the [[plugin:plugin|Plugin Manager]] using the following URL.
  
-  * [[http://pomax.nihongoresources.com/downloads/plugin-xhtmlruby.tar.gz|tar.gz format (3k)]]+  * [[http://projects.nihongoresources.com/downloadables/plugin-xhtmlruby.tar.gz|tar.gz format (3k)]] FIXME Link not available (as at 12-Sep-2013) 
 +  * [[http://sites.google.com/site/seifer03/index/dokuwiki_xhtmlruby.zip|zip format (3k)]], Temp Mirror :!:
  
 To install the plugin manually, download the source to your plugin folder, ''lib/plugins'', and extract its contents.  That will create a new plugin folder, ''lib/plugins/xhtmlruby'', containing four file: To install the plugin manually, download the source to your plugin folder, ''lib/plugins'', and extract its contents.  That will create a new plugin folder, ''lib/plugins/xhtmlruby'', containing four file:
Line 222: Line 225:
  // Opera (9.5x) is even more annoying. Neither "bottom" nor "baseline" does what it's supposed to do, so we're left with value (em) manipulation instead.  // Opera (9.5x) is even more annoying. Neither "bottom" nor "baseline" does what it's supposed to do, so we're left with value (em) manipulation instead.
  else if(browser=="opera") { rubyrule.style.verticalAlign = "1.3em"; }  else if(browser=="opera") { rubyrule.style.verticalAlign = "1.3em"; }
-  +
- // Chrome 4.x doesn't support ruby unless IT gets to call the CSS shots +
- else if(browser=="chrome") { +
- killCSSRule('rp'); +
- killCSSRule('rt'); +
- killCSSRule('rb'); +
- killCSSRule('ruby'); }+
  // if we don't know what browser this is, assume "bottom" works. If it doesn't, their fault.  // if we don't know what browser this is, assume "bottom" works. If it doesn't, their fault.
  else { rubyrule.style.verticalAlign = "bottom"; }  else { rubyrule.style.verticalAlign = "bottom"; }
Line 288: Line 285:
  * Postprocesses the HTML that was built from that, to rubify kanji that have associated furigana.  * Postprocesses the HTML that was built from that, to rubify kanji that have associated furigana.
  */  */
- function register(&$controller) + function register(Doku_Event_Handler $controller) 
  {  {
  // initialise variables  // initialise variables
Line 334: Line 331:
 ?> ?>
 </file> </file>
-===== Discussion ===== 
- 
->Thank you thank you so much for this fantastic plugin! I searched for a DokuWiki "ruby" plugin thinking it would be so obscure a need I'd never find anything, but was delighted to find something that works EXACTLY like I need it to (in Internet Explorer 6.0 no less!). 
-> 
->I do have one question though, and it's regarding support in Chrome and possibly other browsers. These adhere to HTML5 standards for ruby tags, and therefore the ruby texts, as well as chunks of the page, don't display correctly. Would it be very complicated to add a conditional <ruby>Text<rt>テキスト</rt></ruby> HTML5 style tag in the case of browsers that don't support the XHTML standard? Once again, thanks for this awesome plug-in! --- //kououken 2010/02/19 16:08// 
- 
-Actually, the reason it malrenders in Chrome is because for a while now it's been using a version of webkit that messes up ruby code. If there is no stylesheet CSS rule for the ruby element, things looks fine, but if there is, good chance the ruby markup magically disappears (see [[http://pomax.nihongoresources.com/downloads/temp/chrome%20xhtml%20css%20bug/demonstrator.html|here]] for a demonstrator of this behaviour). This has been filed as bug for webkit, and has been patched, but Chrome has to date (being at public version 4.1.249.1064) not updated to include this webkit patch. 
- 
-I will update the javascript responsible for massaging the CSS based on browsers so that it actually disables the ruby rule when it sees Chrome. This seems to be the only actually useful fix at the moment. --- //Pomax 2010/05/01 00:15// 
plugin/xhtmlruby.txt · Last modified: 2023-10-30 23:26 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