Sha256: 64d1d04e81eccf3da3b425703f0c7fb1a2abc668ab0df04fe1642a45f05f5e39
Contents?: true
Size: 1.08 KB
Versions: 2
Compression:
Stored size: 1.08 KB
Contents
require 'asciidoctor' require 'asciidoctor/extensions' require 'asciidoctor/latex/core_ext/colored_string' # module Asciidoctor::LaTeX class InjectHTML < Asciidoctor::Extensions::Postprocessor def process document, output output = output.gsub('</head>', $click_insertion) end end $click_insertion = <<EOF <style> .click .title { color: blue; } .openblock>.box>.content { margin-top:1em;margin-bottom: 1em;margin-left:3em;margin-right:4em; } </style> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script> $(document).ready(function(){ $('.openblock.click').click( function() { $(this).find('.content').slideToggle('200'); $.reloadMathJax() } ) $('.openblock.click').find('.content').hide() }); $(document).ready(function(){ $('.listingblock.click').click( function() { $(this).find('.content').slideToggle('200') } ) $('.listingblock.click').find('.content').hide() }); $(document).ready(ready); $(document).on('page:load', ready); </script> </head> EOF end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
asciidoctor-latex-1.5.0.5.dev | lib/asciidoctor/latex/inject_html.rb |
asciidoctor-latex-1.5.0.4.dev | lib/asciidoctor/latex/inject_html.rb |