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
Post
by 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:
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 (7.41 KiB) Viewed 19303 times
Last edited by
Stefan Kottwitz on Thu Sep 21, 2023 6:09 pm, edited 3 times in total.
Reason: code marked
NEW: TikZ book now 40% off at Amazon.com for a short time.
Stefan Kottwitz
Site Admin
Posts: 10321 Joined: Mon Mar 10, 2008 9:44 pm
Post
by 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
Post
by 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!
Stefan Kottwitz
Site Admin
Posts: 10321 Joined: Mon Mar 10, 2008 9:44 pm
Post
by Stefan Kottwitz » Thu Sep 21, 2023 6:23 pm
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
Post
by Mksah2 » Fri Sep 22, 2023 9:42 am
Thanks a lot. It worked!