1

I'm searching for the way to use \textsc and \scshape when I compile with XeLaTeX my document and I set Arial font.

\usepackage[T1]{fontenc}\usepackage{fontspec}\setmainfont{Arial}

I am using Overleaf.

1
  • 1
    never use \usepackage[T1]{fontenc} with xelatex Dec 24, 2021 at 18:45

1 Answer 1

2

You provided no example showing your problem, it should just work with no additional definitions.

enter image description here

\documentclass{article}

\usepackage{fontspec}
\setmainfont{Arial}

\begin{document}

Abc \textsc{Abc}

\end{document}

Note That this assumes a full modern Arial as distributed with Windows. The Arial available in linux (including Overleaf) is an older version with fewer variants. However you can use the TeX Gyre Helvetica clone.

enter image description here

\documentclass{article}
 \usepackage{fontspec} \setmainfont{TeX Gyre Heros}
 \title{Example} \author{Francesco Contini}
\date{December 2021}
\begin{document}
\maketitle 
\section{Introduction} This is an \textsc{example}.
\end{document}


\documentclass{article}

\usepackage{fontspec}
\setmainfont{Arial}

\begin{document}

Abc \textsc{Abc}

\end{document}
4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.