# How to achieve bold section titles in a Europass CV via europecv package?

I have a problem getting the section headers of my Europass CV to appear bold in the europecv package. Neither \bf nor \textbf{} seem to work. I am using XeLaTeX and this is how my document looks:

\documentclass[helvetica,narrow,german]{europecv}
\usepackage[a4paper,top=1.27cm,left=1.2cm,right=1cm,bottom=2cm]{geometry}
\usepackage[ngerman]{babel}
\usepackage{graphicx,fontspec}

\ecvlastname{}
\ecvfirstname{}
\ecvtelephone{}
\ecvemail{}
\ecvnationality{}
\ecvdateofbirth{}
\ecvgender{}

\begin{document}
\begin{europecv}

\ecvpersonalinfo[1em]

\ecvsection{}

\ecvitem{}{}
\ecvitem{}{}
\ecvitem{}{}

\end{europecv}
\end{document}


\evcsection{Bla bla} is what I want to have in bold like in this sample CV. Any help would be greatly appreciated!

The europecv class is built for pdflatex: indeed it loads the inputenc package with the utf8x option. One can overcome the limitation with some tricks:

\makeatletter
\@namedef{ver@inputenc.sty}{}       % pretend that inputenc has been loaded
\@namedef{opt@inputenc.sty}{utf8x}  % with the utf8x option
\makeatother

\documentclass[narrow,german]{europecv}

% fontspec doesn't want to see inputenc loaded,
% so now we pretend it hasn't been
\expandafter\let\csname ver@inputenc.sty\endcsname\relax
% europecv uses the \inputencoding command, that we neutralize
\providecommand{\inputencoding}[1]{}

\usepackage[a4paper,top=1.27cm,left=1.2cm,right=1cm,bottom=2cm]{geometry}
\usepackage[ngerman]{babel}
\usepackage{graphicx,fontspec}

\setmainfont[Ligatures=TeX]{Linux Biolinum O}

\ecvlastname{}
\ecvfirstname{}
\ecvtelephone{}
\ecvemail{}
\ecvnationality{}
\ecvdateofbirth{}
\ecvgender{}

\begin{document}
\begin{europecv}

\ecvpersonalinfo[1em]

\ecvsection{Bla Bla}

\ecvitem{}{}
\ecvitem{}{}
\ecvitem{}{}

\end{europecv}
\end{document}


You have to define a main font for the document, in order that the styles are correctly applied. The helvetica option doesn't do anything with XeLaTeX.

It's probably better to stick with pdflatex (or ask the class author to provide a XeLaTeX compatible version).

Actually, the patch to europecv.cls would be very easy: change the lines

\LoadClass{article}
\RequirePackage{ucs}
\RequirePackage[utf8x]{inputenc}


into

\LoadClass{article}
\RequirePackage{ifxetex,ifluatex}
\ifxetex
\newcommand\ecv@utf[1]{#1}
\else
\ifluatex
\newcommand\ecv@utf[1]{#1}
\else
\RequirePackage{ucs}
\RequirePackage[utf8x]{inputenc}
\newcommand\ecv@utf[1]{{\inputencoding{utf8x}#1}}
\fi
\fi


assuming that using utf8x is desirable: probably it would be best left as something to load in the document preamble. In this case the two lines after \LoadClass{article} should simply be omitted.

The definition of \ecv@utf appearing at the start of the file should be also omitted.

• Thanks, egreg. I solved my problem using your suggested trick of simulating an included inputenc. I didn't want to bother with meddling with the europe.cls because the other solution was working very well anyway. Thanks a lot! Jun 23, 2012 at 23:46