Sha256: c5ecfc29732d9b5b013da253edd964ae37b043158c445a6e1e03f3ec90d1b9ee
Contents?: true
Size: 611 Bytes
Versions: 2
Compression:
Stored size: 611 Bytes
Contents
require 'asciidoctor' require 'asciidoctor/extensions' # Modify the default mathJax script to run mhchem instead # of autonumbuering of equations -- which is taken care of # by [env.equation], [env.equationalign] # # See http://www.noteshare.io/section/the-chem-environment # module Asciidoctor::LaTeX # Map @@DOLLAR: to $ class Chem < Asciidoctor::Extensions::Postprocessor def process document, output output = output.gsub($tex_snippet, $chem_snippet) end end end $tex_snippet = 'TeX: { equationNumbers: { autoNumber: "none" } }' $chem_snippet = 'TeX: { extensions: ["mhchem.js"] }'
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
asciidoctor-latex-1.5.0.1.dev | lib/asciidoctor/latex/chem.rb |
asciidoctor-latex-1.5.0.dev | lib/asciidoctor/latex/chem.rb |