Class: KatexDocinfoProcessor

Inherits:
Asciidoctor::Extensions::DocinfoProcessor
  • Object
show all
Defined in:
lib/asciidoctor-katex-2.rb

Instance Method Summary collapse

Instance Method Details

#process(doc) ⇒ Object



72
73
74
75
76
77
78
79
80
81
82
# File 'lib/asciidoctor-katex-2.rb', line 72

def process doc
  %{<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/katex@#{doc.attributes.fetch('katex-version', '0.10.2')}/dist/katex.min.css"
crossorigin="anonymous"
>
<style>
.katex { font-size: #{doc.attributes.fetch('katex-font-size', '1.5em')}; }
</style>
}
end