Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have created a thesis using mathptmx font. Now I would like to customize only the section title using Latin Modern Sans Bold.

I used titlesec with

\usepackage{titlesec}
\titleformat{\section}
{\fontfamily{lmr}\sffamily\bfseries\Large}
{\thesection}{1em}{}

I would like to know if this is right because I'm not convinced.

share|improve this question
2  
You should say \fontfamily{lmss}\bfseries\Large –  egreg Jan 18 '13 at 12:14
    
Thanks egreg. I didn't know the existence of that font family –  Mazzy Jan 18 '13 at 12:18
add comment

1 Answer

up vote 4 down vote accepted

You should change the default sans serif family in your document, which is done by saying

\renewcommand{\sfdefault}{lmss}

in the preamble. Thus each call of \sffamily in the document will choose the Latin Modern Sans font corresponding to the other specifications. For setting the section title you'll simply say

\usepackage{titlesec}
\titleformat{\section}
  {\sffamily\bfseries\Large}
  {\thesection}
  {1em}
  {}

This is based on the obvious assumption that you should not have two different sans serif fonts in a document.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.