Page Layout ⇒ Section Numbering 0.1
Section Numbering 0.1
I am new using LaTex and i am having an issue with numbering sections as they are coming out as 0.1, 0.2, 0.3. Is there a way to make my section numbered 1, 2, 3... (then subsection 1.1,1.2,2.1)?
I am not using chapters as with fancyhdr it removes all my headers and footers+adds in Chapter x in gigantic letters.
I've tried changing from report to article which solves the issue but then i lose my title page and abstract!
Anyone have any suggestions on how to fix this?
Thanks in advance
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10359
- Joined: Mon Mar 10, 2008 9:44 pm
Section Numbering 0.1
welcome to the board!
I recommend to use a class without chapters, like article what you've mentioned. The article class is supporting abstract and titlepage too. Try the titlepage option:
Code: Select all
\documentclass[a4paper,10pt,titlepage]{article}
Stefan
Re: Section Numbering 0.1
Thanks for the help that one line sorted out the issues i had with the title page and abstract!
I've just hit 1 issue changing across to article. My header changed because of the move to the article class so i added this code:
\fancyhead[LE,RO]{\slshape \rightmark}
\fancyhead[LO,RE]{\slshape \leftmark}
\fancyfoot[CO,CE]{\thepage}
which is working fine but i am now getting the numbering from the section and subsection in the heading. Is there a way of removing the numbering from the header?
Thanks again for the support! its a slow learning curve using LaTex but the outcome is sooooo much better than word!!!
- Stefan Kottwitz
- Site Admin
- Posts: 10359
- Joined: Mon Mar 10, 2008 9:44 pm
Section Numbering 0.1
Yes, there is, try these redefinitions:dizzam wrote:but i am now getting the numbering from the section and subsection in the heading. Is there a way of removing the numbering from the header?
Code: Select all
\renewcommand*\sectionmark[1]{\markboth{#1}{}}
\renewcommand*\subsectionmark[1]{\markright{#1}}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Section Numbering 0.1
Code: Select all
\documentclass[11pt,a4paper,english,titlepage,twoside]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage[includeheadfoot,margin=2cm]{geometry}
\usepackage[pagestyles,raggedright,bf,sf]{titlesec}
\usepackage{lmodern}
\usepackage{blindtext}
\parindent0em
% Setup for pagestyles (titlesec)
\newpagestyle{front}{%
\headrule
\footrule
\sethead[\thepage][][\bfseries\sffamily\sectiontitle]{\bfseries\sffamily\sectiontitle}{}{\thepage}
\setfoot[][][\scshape Institution]{Title}{}{}
% \renewcommand{\makefootrule}{\rule[0.8\baselineskip]{\linewidth}{0.4pt}}
}
\newpagestyle{main}{%
\headrule
\footrule
\sethead[\thepage][][\bfseries\sffamily\thesubsection\quad\subsectiontitle]{\bfseries\sffamily\thesection\quad\sectiontitle}{}{\thepage}
\setfoot[][][\scshape Institution]{Title}{}{}
% \renewcommand{\makefootrule}{\rule[0.8\baselineskip]{\linewidth}{0.4pt}}
}
\newpagestyle{back}{%
\headrule
\footrule
\sethead[\thepage][][\bfseries\sffamily\sectiontitle]{\bfseries\sffamily\sectiontitle}{}{\thepage}
\setfoot[][][\scshape Institution]{Title}{}{}
% \renewcommand{\makefootrule}{\rule[0.8\baselineskip]{\linewidth}{0.4pt}}
}
\begin{document}
\pagestyle{main}
\Blinddocument
\end{document}
Best regards
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10