\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}
1 Answer
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, beforefontspec
, to getNavyBlue
. - Don’t load
fontenc
ornewtxtext
(which load 8-bit fonts from last century) withfontspec
. - 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 withfontspec
, you can pick from one of the samples here. - Set the color of your headers once, with
\addtokomafont
if you’re using thescrartcl
document class, or a package such astitlesec
otherwise. Don’t put a\color
command in each individual section title. - The package option to get letter-size paper is
letterpaper
, notletter
. - 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}
-
1
-
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? Jun 4 at 17:02
-
2@SamiaRani The
newtxmath
andnewtxtext
packages load legacy 8-bit fonts. Just as a rule of thumb, add only packages you actually need.– DavislorJun 4 at 17:14
\setmainfont{Arial}
with\setmainfont{Arial Narrow}
.article
does not support option10.5pt
. It only provides10pt
,11pt
, and12pt
. There are other classes, that do support, e.g.,fontsize=10.5pt
. Or you can add a package likescrextend
orfontsize
.article
also does not support an optionletter
. Maybe you wantletterpaper
.\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.