Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Title font changes when tried to bold titlesec font in Latex

I want to bold the words ‘Professional experience’ in Latex. Using \textbf changes the font of the words which was previously there. I tried placing \textbf in multiple positions in the same line but didn’t work.
Here is the code and screenshot of the output. Please help.

\documentclass[10pt]{article}
\usepackage[a4paper,bottom = 0.6in,left = 0.6in,right = 0.6in,top = 1cm]{geometry}
% \usepackage{graphicx}
\usepackage{titlesec}

%for color
\usepackage[usenames, dvipsnames]{color}
\definecolor{myblue}{RGB}{70,70,200}

\newcommand{\xfilll}[2][1ex]{
\dimen0=#2\advance\dimen0 by #1
\leaders\hrule height \dimen0 depth -#1\hfill}
\titleformat{\section}{\large\scshape\raggedright}{}{0em}{}

\begin{document}
\section*{{\LARGE \color{myblue} {Professional Experience}}\xfilll[0pt]{0.5pt}}
\end{document}

enter image description here

After adding \textbf, I see this output with font changed.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

enter image description here

>Solution :

You can use \usepackage[T1]{fontenc} to get a font which does contain bold small caps:

\documentclass[10pt]{article}
\usepackage[a4paper,bottom = 0.6in,left = 0.6in,right = 0.6in,top = 1cm]{geometry}
% \usepackage{graphicx}
\usepackage{titlesec}

\usepackage[T1]{fontenc}

%for color
\usepackage[usenames, dvipsnames]{color}
\definecolor{myblue}{RGB}{70,70,200}

\newcommand{\xfilll}[2][1ex]{
\dimen0=#2\advance\dimen0 by #1
\leaders\hrule height \dimen0 depth -#1\hfill}
\titleformat{\section}{\large\scshape\raggedright}{}{0em}{}

\begin{document}
\section*{{\LARGE \color{myblue} \textbf{Professional Experience}}\xfilll[0pt]{0.5pt}}
\end{document}

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading