diff --git a/doc/interactive.js b/doc/interactive.js index 1a2bf5e..15baf17 100644 --- a/doc/interactive.js +++ b/doc/interactive.js @@ -49,6 +49,19 @@ jqueryCheck( function() { hljs.highlightBlock( element, ' ' ); } ); + + // quick-n-dirty sub and super script impl (it is by no means perfect) + $( 'var:contains("\\")' ).each( function() + { + var $this = $( this ); + + $this.html( + $this.html().replace( /(\\.*)$/, '
$1
' ) + .replace( /\\_([^ \\]+)/, '$1' ) + .replace( /\\\^([^ \\]+)/, '$1' ) + .replace( /(<\/su[bp]>/, '$1 class="left">' ) + ); + } ); } ); } ); diff --git a/doc/manual.css b/doc/manual.css index 188c614..0223b6f 100644 --- a/doc/manual.css +++ b/doc/manual.css @@ -43,6 +43,27 @@ var { font-family: monospace; } +var div { + position: relative; + display: inline; +} + +var sub, var sup { + font-size: 0.75em; +} + +sup.left { + position: absolute; + left: 0px; + top: -0.75em; +} + +sub.left { + position: absolute; + left: 0px; + bottom: -0.2em; +} + .float { border: 1px solid #babdb6; padding: 0px;