subroutinemathprivate
subroutine math(tex, display, out)
Write math for MathJax.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| tex | character(len=*) | in | the TeX | |
| display | logical | in | true for display math | |
| out | type(buffer_t) | inout | the HTML |
Calls
Source
Show the code
subroutine math(tex, display, out)
character(len=*), intent(in) :: tex !! the TeX
logical, intent(in) :: display !! true for display math
type(buffer_t), intent(inout) :: out !! the HTML
if (display) then
call add(out, NL//'<script type="math/tex; mode=display">')
else
call add(out, '<script type="math/tex">')
end if
call add(out, tex)
call add(out, '</script>')
if (display) call add(out, NL)
end subroutine math