LaTeX forum ⇒ TeXworksTexstudio: Changing the look of section titles Topic is solved

Information and discussion about TeXworks, an integrated LaTeX environment for several platforms
jiragana
Posts: 6
Joined: Wed Jun 10, 2015 1:45 pm

Texstudio: Changing the look of section titles

Postby jiragana » Wed Jun 10, 2015 1:55 pm

Dear forum,
I'm new to this forum and LaTeX.
I can't seem to find an answer to the following:
My section and subsection titles are all bold and NOT italicized. I need to change them to this:
section: bold
subsection: not bold, italicized
subsubsection: not bold, italicized
Numbering can stay the same. I'd be really glad for some help.
Thank you!

Here's my preamble:

  1. \documentclass{article}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage[T1]{fontenc}
  4. \usepackage [english]{babel}
  5. \usepackage [autostyle, english = american]{csquotes}
  6. \MakeOuterQuote{"}
  7. \usepackage{linguex}
  8. \usepackage{footnote}
  9. \usepackage{lmodern}
  10. \usepackage{amsmath}
  11. \usepackage{amsfonts}
  12. \usepackage{amssymb}
  13. \usepackage{graphicx}
  14. \usepackage[margin=40mm]{geometry}
  15. \usepackage{amsmath,amsthm, amsfonts,amssymb}
  16. \usepackage{mathtools}
  17. \usepackage{endnotes}
  18. \usepackage{titlesec}
  19. \let\footnote=\endnote
  20. \usepackage[ onehalfspacing ]{ setspace }
  21. \date {21 April 2015}
  22. \author{xx}
  23. \title{Transparency Metonym Metaphor}
  24.  
  25. \begin{document}
  26. \maketitle
  27.  
  28. \begin{sloppy}
  29. {\subparagraph{Abstract}
  30.  
  31. ...
  32. \section{Introduction}
  33.  
  34. ...
  35. \subsection[unter]{What is metonymy?}
  36. ...

User avatar
Johannes_B
Site Moderator
Posts: 3584
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Wed Jun 10, 2015 2:16 pm

Hi and welcome, this can be done using package sectsty, or titlesec which you are not seem to use right now.

  1. \documentclass{article}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage[T1]{fontenc}
  4. \usepackage [english]{babel}
  5. %\usepackage [autostyle, english = american]{csquotes}
  6. %\MakeOuterQuote{"}
  7. %\usepackage{linguex}
  8. %\usepackage{footnote}
  9. %\usepackage{lmodern}
  10. %\usepackage{amsmath}
  11. %\usepackage{amsfonts}
  12. %\usepackage{amssymb}
  13. %\usepackage{graphicx}
  14. %\usepackage[margin=40mm]{geometry}
  15. %\usepackage{amsmath,amsthm, amsfonts,amssymb}
  16. %\usepackage{mathtools}
  17. %\usepackage{endnotes}
  18. \usepackage{blindtext}
  19. %\usepackage{titlesec}%doable also with titlesec
  20. %\let\footnote=\endnote
  21. %\usepackage[ onehalfspacing ]{ setspace }
  22. %\date {21 April 2015}
  23. %\author{xx}
  24. %\title{Transparency Metonym Metaphor}
  25.  
  26. \usepackage{sectsty}
  27. \subsectionfont{\normalfont\itshape}
  28. \subsubsectionfont{\normalfont\itshape}
  29. \begin{document}
  30. %\maketitle
  31.  
  32. %\begin{sloppy}%% bad bad bad
  33. \begin{abstract}
  34. \blindtext
  35. \end{abstract}
  36. \subparagraph{Abstract}
  37. \blindtext
  38.  
  39. \section{Introduction}
  40.  
  41. \subsection[unter]{What is metonymy?}
  42. \subsubsection{samba squirrel}
  43. \end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

jiragana
Posts: 6
Joined: Wed Jun 10, 2015 1:45 pm

Postby jiragana » Wed Jun 10, 2015 2:20 pm

Lovely, thanks so much for the quick reply!
I had titlesec in my preamble, but hadn't assigned it the info yet and didn't know how. Great!


Return to “TeXworks”

Who is online

Users browsing this forum: No registered users and 4 guests