3

I have to use Arial in my document. If I want to use special characters in the text, such as numbers set higher or lower, these are not displayed or are only displayed as a rectangle.Superscript 2(²) is working.

If I try it in math mode, I get the characters displayed, but with serifs (different font?!). This is okay for formulas, but not for body text.

What is the best practice to display these characters in Arial in body text? I use Overleaf and XeLaTeX.

\documentclass{article}
\usepackage{fontspec}
\begin{document}
\setmainfont{Arial} 
\Large
This ² is ⁴ a ₂ Text.
This $^2$ is $^4$ a $_{2}$ Text.
\end{document}

enter image description here

3
  • 2
    \textsuperscript{2} Nov 25, 2023 at 18:20
  • 1
    on windows arial contains the ⁴ too, (but not the ₂). Generally the support for such real script chars is rather patchy. \textsuperscript is safer. Nov 25, 2023 at 18:29
  • Try Arial Unicode MS also available on windows, has a wider range of unicode glyphs.
    – yannisl
    Nov 27, 2023 at 14:00

1 Answer 1

4

The superscript characters are in a current version of Arial on windows, but not subscript, however you can use \textsuperscript and \textsubscript to use scaled versions of the test font.

enter image description here

\documentclass{article}
\usepackage{fontspec}
\begin{document}
\setmainfont{Arial} 
\Large
This ² is ⁴ a ₂ Text.

This $^2$ is $^4$ a $_{2}$ Text.

This \textsuperscript{2} is \textsuperscript{4} is a \textsubscript{2} Text.
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .