0

How can I get unicode text to appear under the square-root symbol?

\documentclass{article}
\usepackage{fontspec}
\newfontfamily\myfont[Script=Devanagari,Scale=1.0]{Sanskrit 2003}

\begin{document}
Normal text: $\sqrt{hello}$ \\
Testing unicode text under square root: $\sqrt{1.1{\myfont भू सत्तायाम् }}$
\end{document}

The above fails to print any of the unicode text in sanskrit: Output generated

Henri Menke
  • 109,596
linuxfan
  • 437
  • 1
    Does $\sqrt{1.1\text{\myfont भू सत्तायाम् }}$ work? (needs \usepackage{amsmath}) – Henri Menke Aug 18 '19 at 00:05
  • 2
    Also, be aware, that the glyphs in $\sqrt{hello}$ come from the math font, not from the text font (compare \textit{different} and $different$). If you want to use a text font, you have to switch to text mode first using \text{...}. – Henri Menke Aug 18 '19 at 00:07
  • Hi @HenriMenke Your solution with \usepackage{amsmath} works. If you post it as a solution I will accept it. Thanks – linuxfan Aug 18 '19 at 00:11

0 Answers0