Template Function sequant::utf_to_latex(const std::basic_string_view<Char, Traits>&)

Function Documentation

template<typename Char, typename Traits>
std::basic_string<Char, Traits> sequant::utf_to_latex(const std::basic_string_view<Char, Traits> &str)

replaces certain Unicode characters with their (math-mode) LaTeX equivalents

Note

only some combined Unicode characters are currently supported

Warning

if str contains non-ASCII characters Char must be wchar_t

Template Parameters:
  • Char – character type

  • Traits – character traits type

Parameters:

str – input string

Throws:

std::invalid_argument – if Char is narrow and str contains non-ASCII characters

Returns:

str with some Unicode characters replaced by their LaTeX equivalents