Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Nov 1, 2020
1 parent af4b22a commit cccd981
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/isodoc/bipm/html_convert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,20 @@ def ol_attrs(node)
start: node["start"]), style: style, class: klass)
end

def mathjax(open, close)
BIPM_MATHJAX.gsub("OPEN", open).gsub("CLOSE", close)
end

BIPM_MATHJAX = <<~"MATHJAX".freeze
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
"HTML-CSS": { preferredFont: "STIX" },
asciimath2jax: { delimiters: [['OPEN', 'CLOSE']] }
});
</script>
<script src="#{MATHJAX_ADDR}?config=MML_HTMLorMML-full" async="async"></script>
MATHJAX

include BaseConvert
include Init
end
Expand Down

0 comments on commit cccd981

Please sign in to comment.