TeXworksTexstudio: Changing the look of section titles

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

Texstudio: Changing the look of section titles

Post by jiragana »

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:

Code: Select all

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage [english]{babel}
\usepackage [autostyle, english = american]{csquotes}
\MakeOuterQuote{"}
\usepackage{linguex}
\usepackage{footnote}
\usepackage{lmodern}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[margin=40mm]{geometry}
\usepackage{amsmath,amsthm, amsfonts,amssymb}
\usepackage{mathtools}
\usepackage{endnotes}
\usepackage{titlesec}
\let\footnote=\endnote
\usepackage[ onehalfspacing ]{ setspace }
\date {21 April 2015}
\author{xx}
\title{Transparency Metonym Metaphor}

\begin{document}
\maketitle

\begin{sloppy}
{\subparagraph{Abstract}

...
\section{Introduction} 

...
\subsection[unter]{What is metonymy?}
...

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
TikZ book
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Texstudio: Changing the look of section titles

Post by Johannes_B »

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

Code: Select all

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage [english]{babel}
%\usepackage [autostyle, english = american]{csquotes}
%\MakeOuterQuote{"}
%\usepackage{linguex}
%\usepackage{footnote}
%\usepackage{lmodern}
%\usepackage{amsmath}
%\usepackage{amsfonts}
%\usepackage{amssymb}
%\usepackage{graphicx}
%\usepackage[margin=40mm]{geometry}
%\usepackage{amsmath,amsthm, amsfonts,amssymb}
%\usepackage{mathtools}
%\usepackage{endnotes}
\usepackage{blindtext}
%\usepackage{titlesec}%doable also with titlesec
%\let\footnote=\endnote
%\usepackage[ onehalfspacing ]{ setspace }
%\date {21 April 2015}
%\author{xx}
%\title{Transparency Metonym Metaphor}

\usepackage{sectsty}
\subsectionfont{\normalfont\itshape}
\subsubsectionfont{\normalfont\itshape}
\begin{document}
%\maketitle

%\begin{sloppy}%% bad bad bad
	\begin{abstract}
		\blindtext
	\end{abstract}
	\subparagraph{Abstract}
		\blindtext

	\section{Introduction}

	\subsection[unter]{What is metonymy?}
	\subsubsection{samba squirrel}
	\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

Re: Texstudio: Changing the look of section titles

Post by jiragana »

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!
Post Reply