Text FormattingModifying the section format

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
NELLLY
Posts: 113
Joined: Thu Nov 26, 2009 2:21 am

Modifying the section format

Post by NELLLY »

Hi
I am writting a paper, I need the following format of the sections

1. TITLE

Thanks

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

velisarus
Posts: 8
Joined: Thu Nov 26, 2009 1:20 am

Modifying the section format

Post by velisarus »

Hi, NELLLY!

Try titlesec package. With this package you can make any section format. Also this package can change the format of TOC.

Hope this will useful for you.
Russian page layout artist
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Modifying the section format

Post by gmedina »

velisarus wrote:...With this package you can make any section format. Also this package can change the format of TOC...
Not exactly. The titletoc package (a companion to titlesec) allows modifications to the format of the ToC entries.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
velisarus
Posts: 8
Joined: Thu Nov 26, 2009 1:20 am

Modifying the section format

Post by velisarus »

You are right, gmedina... My mistake.
Russian page layout artist
NELLLY
Posts: 113
Joined: Thu Nov 26, 2009 2:21 am

Modifying the section format

Post by NELLLY »

Hi
I tried the titlesec package and I have obtained the capitalized letters for the section by using

Code: Select all

\titleformat*{\section} {\scshape}
However I still have a problem for getting both capitalized letters and bold chartacters for the section. I need to have the following format

TITLE
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Modifying the section format

Post by localghost »

In case you want all headings to be in small capitals the easiest way would be to load the titlesec package with appropriate options.

Code: Select all

\usepackage[bf,sc]{titlesec}
Otherwise you have to supplement your new format.

Code: Select all

\titleformat*{\section}{\bfseries\scshape}

Best regards
Thorsten
NELLLY
Posts: 113
Joined: Thu Nov 26, 2009 2:21 am

Modifying the section format

Post by NELLLY »

Thanks Thorsten
I used the both commands

Code: Select all

\usepackage[bf,sc]{titlesec}
\titleformat*{\section}{\bfseries\scshape}
when I typset the document, I have
1. Introduction
but I should get
1. INTRODUCTION
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Modifying the section format

Post by localghost »

I suggested to use one or the other. Try the following.

Code: Select all

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[bf]{titlesec}
\usepackage{blindtext}

\titleformat*{\section}{\Large\scshape}

\begin{document}
  \blinddocument
\end{document}
NELLLY
Posts: 113
Joined: Thu Nov 26, 2009 2:21 am

Re: Modifying the section format

Post by NELLLY »

Hi Thorsten
This works well but I still have a problem. I need to have all the letters with the same Lengths. Foe example for the section Introdutcion I should have
INTRODUCTION when I use the provided commands I have the first letter "I" higher than the others.
Many thanks.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Modifying the section format

Post by localghost »

OK, next try.

Code: Select all

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[bf]{titlesec}
\usepackage{blindtext}

\titleformat{\section}{\normalfont\Large\bfseries}{\thesection}{1em}{\uppercase}

\begin{document}
  \section{One}
    \blindtext
\end{document}
Post Reply