0
\documentclass[letter,10.5pt]{article}
\usepackage[head=0pt,bottom=0.6in,top=0.8in, left=0.5in,right=0.5in, footskip=1cm]{geometry}

%%%%%%%%%%% pdflatex %%%%%%%%%
\usepackage[T1]{fontenc}
\usepackage{newtxmath,newtxtext}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%% xelatex %%%%%%%%%%%%%%
% \usepackage{fontspec}
% \setmainfont{Times New Roman}
% \setmainfont{TeX Gyre Termes}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%A Few Useful Packages
\usepackage{parskip}
\usepackage{titlesec}   
\usepackage{multirow}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{mdframed}
\usepackage{xcolor}

\usepackage{fontspec} 
\setmainfont{Arial}


%\usepackage{arial}                           % load package which provides the font
%\renewcommand{\sfdefault}{ua1}               % set default serif font as Arial
%\renewcommand{\familydefault}{\sfdefault}    % set the default font as serif, i.e., Arial

\definecolor{navyblue}{RGB}{31, 78, 120}
% line spacing
\linespread{1.0}

\titleformat{\section}
  {\normalfont\Large}{}{0pt}{}[{\titlerule[0.8pt]}]
  
\usepackage{eso-pic}

\AddToShipoutPictureBG{\color{navyblue}%
\AtPageUpperLeft{\rule[-20mm]{\paperwidth}{20mm}}%
}

\begin{document}

\section{\color{navyblue} SUMMARY OF QUALIFICATIONS}
Results-driven, customer-focused, and innovative professional with years of work experience in diverse software development roles. Highly skilled in JavaScript, React, Node.js and associated technologies. Hands-on experience in front-end and back-end development of web-based applications and advanced development methodologies, as well as design and development of automation systems. My proven capabilities in self-management, get-up-and-go attitude, and ability to understand complex coding with ease make me an ideal candidate to fit the position of software engineer, and I am confident that I will be a valuable asset to your organisation.

\end{document}
8
  • 3
    I experience no problems on my Mac-based system (MacOS 13.4 "Ventura", MacTeX2023) if I compile your document under LuaLaTeX and replace \setmainfont{Arial} with \setmainfont{Arial Narrow}.
    – Mico
    Jun 3 at 8:43
  • I have windows operating system and already applied this one but still got the error message
    – Samia Rani
    Jun 3 at 9:09
  • 2
    Can you show the error message you get? BTW: article does not support option 10.5pt. It only provides 10pt, 11pt, and 12pt. There are other classes, that do support, e.g., fontsize=10.5pt. Or you can add a package like scrextend or fontsize. article also does not support an option letter. Maybe you want letterpaper.
    – cabohah
    Jun 3 at 9:18
  • The error says "Arial.sty" not found.
    – Samia Rani
    Jun 3 at 10:15
  • 1
    Don't use \usepackage[T1]{fontenc} if you compile with xelatex or lualatex. There is even a comment in your code telling you to only use this with pdflatex. Jun 3 at 15:43

1 Answer 1

6

Setting the Font

First, check that you have Arial Narrow installed. TeX on Windows cannot find fonts unless they are installed for all users. To test how XeTeX looks it up, run fc-match "Arial Narrow" from the command line. To test how LuaTeX looks it up, run luaotfload-tool --find "Arial Narrow". If you install a font the default way, without Administrator permission, Windows puts it in a hidden directory that TeX engines don’t know about. If you did that by accident, make a copy of the font file, uninstall it from the Control Panel, and reinstall for all users.

You might also be able to load the font by its filename, which is the recommended way. If you have the file C:\Windows\Fonts\ARIALN.TTF, this should work for you:

\usepackage{fontspec}

\defaultfontfeatures[ARIALN]{
    UprightFont=*,
    BoldFont=*B,
    ItalicFont=*I,
    BoldItalicFont=*BI,
    Extension=.ttf }

\setmainfont{ARIALN}
\setsansfont{ARIALN}

If you happen not to have it, Arial Nova Condensed is available gratis.

Setting the Font Size

What TeX calls 10pt is the slightly-smaller European point. What Word and most other software calls a “point,” TeX calls a bp, or “big point.” One way to get what Microsoft Word calls “10.5-point” is:

\usepackage[fontsize=10.5bp]{scrextend}

You could also load the scrartcl class instead of article, to get the extra features of Koma-Script

However, if “10.5pt” is really a workaround for 10pt being smaller in TeX than Word, and what you actually want is what Word calls 10 points, say 10bp. (Similarly, if you want 2 cm, you should say 2cm, not 0.8in).

Other Bugs in Your Document

You seem to be copying someone else’s preamble. Worse, you seem to be copying from somebody who copied from somebody else. You ended up with several packages twice, or that are incompatible with each other.

Some changes you need are:

  • Load \usepackage[svgnames]{xcolor}, once, before fontspec, to get NavyBlue.
  • Don’t load fontenc or newtxtext (which load 8-bit fonts from last century) with fontspec.
  • Don’t load newtxmath here. It loads math mode (which I doubt a document that starts this way would need) in a legacy format, and also loads a font that clashes horribly with Arial Narrow. If you need to use math mode along with fontspec, you can pick from one of the samples here.
  • Set the color of your headers once, with \addtokomafont if you’re using the scrartcl document class, or a package such as titlesec otherwise. Don’t put a \color command in each individual section title.
  • The package option to get letter-size paper is letterpaper, not letter.
  • Remove any package you aren’t actually using.

A Possible Template

\documentclass[lettepaper,fontsize=10.5bp]{scrartcl}
\usepackage[head=0pt,bottom=0.6in,top=0.8in, left=0.5in,right=0.5in, footskip=1cm]{geometry}
\usepackage{parskip}
\usepackage{graphicx}
\usepackage[svgnames]{xcolor}
\usepackage{fontspec} 

\defaultfontfeatures[ARIALN]{
    UprightFont=*,
    BoldFont=*B,
    ItalicFont=*I,
    BoldItalicFont=*BI,
    Extension=.ttf }

\setmainfont{ARIALN}
\setsansfont{ARIALN}

\addtokomafont{disposition}{\color{NavyBlue}}

\begin{document}

\section{ SUMMARY OF QUALIFICATIONS}
Results-driven, customer-focused, and innovative professional with years of work experience in diverse software development roles. Highly skilled in JavaScript, React, Node.js and associated technologies. Hands-on experience in front-end and back-end development of web-based applications and advanced development methodologies, as well as design and development of automation systems. My proven capabilities in self-management, get-up-and-go attitude, and ability to understand complex coding with ease make me an ideal candidate to fit the position of software engineer, and I am confident that I will be a valuable asset to your organisation.
\end{document}
3
  • 1
    @amcarter_is_at_topanswers.xyz Thanks for catching that dumb bug.
    – Davislor
    Jun 3 at 22:40
  • Thank you so much. After very hard work, accidently I remove the package "\usepackage{newtxmath,newtxtext}" My error is solve. But I don't know why?
    – Samia Rani
    Jun 4 at 17:02
  • 2
    @SamiaRani The newtxmath and newtxtext packages load legacy 8-bit fonts. Just as a rule of thumb, add only packages you actually need.
    – Davislor
    Jun 4 at 17:14

You must log in to answer this question.

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