fdoc

subroutinemathprivate

subroutine math(tex, display, out)

Write math for MathJax.

Arguments

NameTypeIntentAttributesDescription
texcharacter(len=*)in

the TeX

displaylogicalin

true for display math

outtype(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

Graphs

Calls

Called by