1

I can't find the reason why hyphenation doesn't work in cover letter template document listed below.

%% start of file `template_en.tex'.
%% Copyright 2006-2010 Xavier Danaux ([email protected]).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
% available at http://www.latex-project.org/lppl/.


\documentclass[11pt]{article}


\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{marvosym}
\usepackage{ifpdf}
\ifpdf
  \usepackage[pdftex]{graphicx}
\else
  \usepackage[dvips]{graphicx}\fi

\pagestyle{empty}

\usepackage[scale=0.775]{geometry}
\setlength{\parindent}{0pt}
\addtolength{\parskip}{6pt}

\def\firstname{Joe}
\def\familyname{Doe}
\def\FileAuthor{\firstname \familyname}
\def\FileTitle{\firstname \familyname's cover letter}
\def\FileSubject{Cover letter}
\def\FileKeyWords{\firstname \familyname, Cover letter}

\renewcommand{\ttdefault}{pcr}

\usepackage{url}
\urlstyle{tt}
\ifpdf
  \usepackage[pdftex,pdfborder=0,breaklinks,baseurl=http://,pdfpagemode=None,pdfstartview=XYZ,pdfstartpage=1]{hyperref}
  \hypersetup{
    pdfauthor   = \FileAuthor,%
    pdftitle    = \FileTitle,%
    pdfsubject  = \FileSubject,%
    pdfkeywords = \FileKeyWords,%
    pdfcreator  = \LaTeX,%
    pdfproducer = \LaTeX}
\else
  \usepackage[dvips]{hyperref}
\fi


\begin{document}
\sffamily   % for use with a résumé using sans serif fonts;
%\rmfamily  % for use with a résumé using serif fonts;
\hfill%
\begin{minipage}[t]{.6\textwidth}
\raggedleft%
{\bfseries Joe Doe}\\[.35ex]
%\small\itshape%
%street and number\\
%postcode city\\[.35ex]
\Telefon~phone 515-515-15\\
\Letter~\href{mailto:[email protected]}{[email protected]}
\end{minipage}\\[1em]
%
\begin{minipage}[t]{.4\textwidth}
\raggedright%
{\bfseries Big Company}\\[.35ex]
\small\itshape%
16 Westbourne Avenue, Rhyl, Wales LL18 1UK
\end{minipage}
\hfill % US style
%\\[1em] % UK style
\begin{minipage}[t]{.4\textwidth}
\raggedleft % US style
\today
%April 6, 2006 % US informal style
%05/04/2006 % UK formal style
\end{minipage}\\[2em]
\raggedright
Dear Sir or Madam:\\[1.5em]
%
Denote simple fat denied add worthy little use. As some he so high down am week. Conduct esteems by cottage to pasture we winding. On assistance he cultivated considered frequently. Person how having tended direct own day man. Saw sufficient indulgence one own you inquietude sympathize. 

Attachment apartments in delightful by motionless it no. And now she burst sir learn total. Hearing hearted shewing own ask. Solicitude uncommonly use her motionless not collecting age. The properly servants required mistaken outlived bed and. Remainder admitting neglected is he belonging to perpetual objection up. Has widen too you decay begin which asked equal any. 

Consider now provided laughter boy landlord dashwood. Often voice and the spoke. No shewing fertile village equally prepare up females as an. That do an case an what plan hour of paid. Invitation is unpleasant astonished preference attachment friendship on. Did sentiments increasing particular nay. Mr he recurred received prospect in. Wishing cheered parlors adapted am at amongst matters. 

Affronting imprudence do he he everything. Sex lasted dinner wanted indeed wished out law. Far advanced settling say finished raillery. Offered chiefly farther of my no colonel shyness. Such on help ye some door if in. Laughter proposal laughing any son law consider. Needed except up piqued an. 

Savings her pleased are several started females met. Short her not among being any. Thing of judge fruit charm views do. Miles mr an forty along as he. She education get middleton day agreement performed preserved unwilling. Do however as pleased offence outward beloved by present. By outward neither he so covered amiable greater. Juvenile proposal betrayed he an informed weddings followed. Precaution day see imprudence sympathize principles. At full leaf give quit to in they up. 

%Yours sincerely,\\[2em] % if the opening is "Dear Mr(s) Doe,"
Yours faithfully,\\[2em] % if the opening is "Dear Sir or Madam,"
%
%\includegraphics[scale=0.75]{signature_blue}\\
{\bfseries Joe Doe}\\
%
\vfill%
{\slshape I hereby authorize you to process my personal data included in my job application for the needs of the recruitment process (in accordance with Personnel Protection Act dated 29.08.1997 no 133 position 883)}
%{\slshape Attachment: curriculum vit\ae{}}
\end{document}
2
  • Welcome to TeX.sx! Commented Mar 13, 2013 at 14:20
  • 3
    You have \raggedright so TeX will always prefer to leave a line short rather than hyphenate, it will only hyphenate if you have a word longer than the line width Commented Mar 13, 2013 at 14:21

1 Answer 1

4

LaTeX currently won't hyphenate words in the body of your document because the \raggedright directive is in effect.

To enable hyphenation while keeping the "ragged-right" look, I recommend that you load the ragged2e package and execute the command \RaggedRight instead of \raggedright immediately before the "Dear Sir or Madam" greeting. When I rerun your MWE with these modifications, I get five hyphenation instances -- one for each paragraph.

0

You must log in to answer this question.

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