module XHTML
Public Instance Methods
cb_env_end2()
click to toggle source
# File lib/ulmul.rb, line 415 def cb_env_end2() case @env_label when /^Fig:/ @body << "<div class=\"figure\" id=\"#{@env_label}\">\n" << " <img src=\"#{@env_file}\" alt=\"#{@env_file}\" />\n" @body << " <div class=\"figcaption\">\n" @body << " Figure #{@figures.length}. " << @subs_rules.call(@env_caption) @body << " </div>\n" @body << '</div>' << "\n" when /^Table:/ cb_env_end2table() when /^Code:/ cb_env_end2code() end end
file(stylesheets=["ulmul2xhtml.css"],javascripts=[],name="",language="en")
click to toggle source
# File lib/ulmul.rb, line 430 def file(stylesheets=["ulmul2xhtml.css"],javascripts=[],name="",language="en") style_lines="" stylesheets.each{|s| style_lines << " <link rel=\"stylesheet\" href=\"#{s}\" type=\"text/css\" />\n"} javascript_lines="" javascripts.each{|j| javascript_lines << "<script src=\"#{j}\" type=\"text/javascript\"></script>\n"} return "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN\" \"http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd\"> <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\"> <head> <meta name=\"language\" content=\"#{language}\" /> <title>#{@title}</title> <meta name=\"author\" content=\"#{name}\" /> <meta name=\"copyright\" content=\"Copyright © #{Date.today.year} #{name}\" /> #{style_lines}#{javascript_lines} <link rel=\"icon\" href=\"favicon.ico\" /> </head> <body onload=\"prettyPrint()\"> #{body()} </body> </html> " end