Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to use arial font, but it doesn't generate any document. I'm using Texpad software. I tried with helvet package, but it doesn't work. Here's my code, maybe I'm not right. Can you help me?

\documentclass[10pt, a4paper]{article}

\usepackage{fontspec}
\setmainfont{Arial}
\usepackage{lipsum}
\usepackage[ampersand]{easylist}

\begin{document}

\tableofcontents
\newpage
\section{TITLE}
\section{TITLE}
\subsection{Subtitle}
\subsection{Subtitle}
\section{TITLE}
\lipsum
\subsection{Subtitle}
\subsection{Subtitle}
\subsubsection{Title}
\begin{easylist}
& Title
& Title
&& Subtitle
&&& Title
& Title
\end{easylist}
\subsubsection{Title}
\subsection{Subtitle}
\section{TITLE}
\subsection{Subtitle}
\subsubsection{Title}

\end{document}
share|improve this question
2  
Your document works fine for me with xelatex You can not use pdflatex or latex as that can not use system fonts and the fontspec package. –  David Carlisle Jun 25 '13 at 19:21
    
It works fine for me compiled with xelatex. Do you have Arial installed? –  karlkoeller Jun 25 '13 at 19:22
    
@DavidCarlisle You're right, but I have errors in my code when I use xeLatex, such as size of fonts, bolding text and another. Can I bold and resize text? –  Isai Jun 25 '13 at 19:29
    
The headings in your example are already large and bold, to get bold in general text all normal latex commands work eg aaaa \textbf{bbb} ccc makes bbb bold. –  David Carlisle Jun 25 '13 at 19:31
    
Can you add in the question the errors you get? –  karlkoeller Jun 25 '13 at 19:38

1 Answer 1

up vote 6 down vote accepted

Your code works perfectly for me but it must be compiled by XeTeX, not with pdflatex. Note also that you must have that True Type Font (.ttf) available in your system.

To obtain the default sans serif font with pdflatex, basically you only need add this line to the preamble, without any package:

\renewcommand*\familydefault{\sfdefault} 

To use the helvetica font as the default font with pdflatex you can add these lines:

\usepackage[scaled]{helvet}
\renewcommand\familydefault{\sfdefault} 
\usepackage[T1]{fontenc}

Please note that you cannot use \usepackage{fontspec} with pdflatex.

Tip: Go to http://www.tug.dk/FontCatalogue/sansseriffonts.html for many other options.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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