0

I need to use bold Arial for selected words, as shown in the paragraph below.

enter image description here

I am using pdfLaTeX in Overleaf.

The answered questions I find give solutions to use Arial for the entire document (How to set font to Arial throughout the entire document?) or How to change the font for selected words in LaTeX document, which I can't quite follow.

3 Answers3

1

In case you just need bold sans-serif text:

\documentclass{article}

\begin{document}

text \textbf{\sffamily text} text

\end{document}

enter image description here

If you actually need real Arial, I suggest to switch to lualatex or xelatex (you can change the engine in the sidebar of your overleaf project):

% !TeX TS-program = lualatex
\documentclass{article}

\usepackage{fontspec} \newfontfamily{\boldarial}{Arial Bold}

\begin{document}

text {\boldarial text} text

\end{document}

enter image description here

1

With pdflatex you can use uarial (but this needs to run getnonfreefonts)

\documentclass{article}
\usepackage[T1]{fontenc}

\usepackage[scaled=0.85]{uarial}

\DeclareTextFontCommand{\ba}{\bfseries\sffamily}

\begin{document}

Some words in the default font and \ba{arial} for emphasis.

\ba{abcdefghijklmnopqrstuvwxyz}

\ba{ABCDEFGHIJKLMNOPQRSTUVWXYZ}

\end{document}

enter image description here

Chances are the nobody would notice if you use Helvetica instead of Arial. This requires installing nothing.

\documentclass{article}
\usepackage[T1]{fontenc}

\usepackage[scaled=0.85]{helvet}

\DeclareTextFontCommand{\ba}{\bfseries\sffamily}

\begin{document}

Some words in the default font and \ba{arial} for emphasis.

\ba{abcdefghijklmnopqrstuvwxyz}

\ba{ABCDEFGHIJKLMNOPQRSTUVWXYZ}

\end{document}

enter image description here

egreg
  • 1,121,712
0

For the first option of samcarter_is_at_ansers.xyz we can as well define a new command and avoid lualatex:

\documentclass{article}

\newcommand{\ba}[1]{\textbf{\sffamily #1}}

\begin{document}

text \ba{text} text.\\

Testo di controllo per vedere se funziona il \ba{nuovo} comando.

\end{document}

Output:

enter image description here