LaTeX forum ⇒ Page LayoutRepeated chapter title

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

Repeated chapter title

Postby Mksah2 » Wed Sep 20, 2023 12:35 pm

While compiling following file, I am getting repeted chapter title before chpater heading. How can i slve that.
Main Code:
\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:
\chapter{Generalities}\label{ch:1}

\section{Introduction}

\end{reminder}


Preamble:
\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 1249 times
Last edited by Stefan Kottwitz on Thu Sep 21, 2023 6:09 pm, edited 3 times in total.
Reason: code marked

Recommended reading 2021:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics
User avatar
Stefan Kottwitz
Site Admin
Posts: 10068
Joined: Mon Mar 10, 2008 9:44 pm

Repeated chapter title

Postby Stefan Kottwitz » Wed Sep 20, 2023 2:25 pm

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

Postby Mksah2 » Thu Sep 21, 2023 2:51 pm

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: 10068
Joined: Mon Mar 10, 2008 9:44 pm

Repeated chapter title

Postby Stefan Kottwitz » Thu Sep 21, 2023 6:23 pm

It is caused by this line:

\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

Postby Mksah2 » Fri Sep 22, 2023 9:42 am

Thanks a lot. It worked!


Return to “Page Layout”

Who is online

Users browsing this forum: No registered users and 8 guests