Page LayoutRepeated chapter title

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
Mksah2
Posts: 3
Joined: Wed Sep 20, 2023 12:17 pm

Repeated chapter title

Post by Mksah2 »

While compiling following file, I am getting repeted chapter title before chpater heading. How can i slve that.
Main Code:

Code: Select all

\documentclass[11pt,a4paper]{book}
\include{format}
\makeindex

\begin{document}
\pagestyle{empty}\pagenumbering{roman}
\tableofcontents%
\mainmatter %
\pagestyle{fancy} \pagenumbering{arabic}
\setlength{\parindent}{0pt}

%\part{Introduction to Matlab}
\include{Tema_1.tex}
\include{Tema_2.tex}
\include{Tema_3.tex}
\include{Tema_4.tex}
\include{Tema_5.tex}

\end{document}
Chapter code:

Code: Select all

\chapter{Generalities}\label{ch:1}

\section{Introduction}

\end{reminder}
Preamble:

Code: Select all

\usepackage[english]{babel}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{pstricks}
\usepackage{algorithmic}
\usepackage[boxed]{algorithm}
\usepackage{graphicx}      
\usepackage{fancyhdr}  
\usepackage{fancyvrb}
\usepackage{hhline}
\usepackage{lscape}
\usepackage{verbatim}  
\usepackage{array}
\usepackage{amsthm}
\usepackage{picins}
\usepackage{eso-pic}
\usepackage{url}
\usepackage [latin1]{inputenc}

\graphicspath{{figures/}}

\newtheorem{teo}{Theorem}
\newtheorem{Ex}{Example}[chapter]
\newtheorem{Pb}{Problem}[chapter]
\theoremstyle{definition}
\newtheorem{ExSol}{Solution to example}[chapter]

\newcounter{hint}
\newcounter{reminder}

\renewcommand{\chaptermark}{\markboth{}{}}
\renewcommand{\footrulewidth}{0pt}  % no line on foot
latex.png
latex.png (7.41 KiB) Viewed 11455 times
Last edited by Stefan Kottwitz on Thu Sep 21, 2023 6:09 pm, edited 3 times in total.
Reason: code marked

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Repeated chapter title

Post by Stefan Kottwitz »

Hi,

welcome to the forum!

That can be caused by a \chapter (re)definition in your document class, your preamble, a loaded package, or in format.tex. All of this is missing here, feel free to add it. :-)

Stefan
LaTeX.org admin
Mksah2
Posts: 3
Joined: Wed Sep 20, 2023 12:17 pm

Repeated chapter title

Post by Mksah2 »

Thank you stefen, I have updated the post with preamble. There is not re-definition in the document class. I guess the problem might me in the loaded package. Thanks again!
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Repeated chapter title

Post by Stefan Kottwitz »

It is caused by this line:

Code: Select all

\renewcommand{\chaptermark}{\markboth{}{}}
Remove it, or make it another way.

Stefan
LaTeX.org admin
Mksah2
Posts: 3
Joined: Wed Sep 20, 2023 12:17 pm

Repeated chapter title

Post by Mksah2 »

Thanks a lot. It worked!
Post Reply