Tell me more ×
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 at 12:14
Thanks egreg. I didn't know the existence of that font family – Mazzy Jan 18 at 12:18

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

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.
http://tex.stackexchange.com/questions/94354/customize-the-section-title-with-latin-modern/94360
tex.stackexchange.com
crawl=CC-MAIN-2013-20
43885
application/http; msgtype=response
sha1:C24U4MLJTJWVFZWPG3SKACNMLDRBGXEI
<urn:uuid:aa0f29de-500f-4f74-a490-970e5f0c26fb>
2013-05-24T14:31:22Z
198.252.206.16
sha1:6P7BK6NRWRHDZ6JAZKMBPEQ4FUB3KYWI
<urn:uuid:34311ab4-12dd-497e-bacf-cd337a51f0c2>
http://tex.stackexchange.com/questions/94354/customize-the-section-title-with-latin-modern/94360
response
<urn:uuid:40c36717-35dd-4926-b2a1-ff11cc838953>
robots: classic
hostname: ip-10-60-113-184.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2013-20
operator: CommonCrawl Admin
description: Wide crawl of the web with URLs provided by Blekko for Spring 2013
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf