has_mathtext Function

public pure function has_mathtext(text) result(is_mathtext)

Check if text needs math layout. A matched '$...$' segment always enables math. Braced script markup ('^{...}' or '{...}') also enables math even without dollars so grouped exponents and subscripts render as scripts instead of leaking literal grouping braces. Bare unbraced '^'/'' outside dollars still render literally and are not math.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: text

Return Value logical