Page Layoutmemoir | Wrong Chapter Name in Header

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
heniczyna
Posts: 7
Joined: Tue Apr 03, 2012 10:35 pm

memoir | Wrong Chapter Name in Header

Post by heniczyna »

Hi all,

I am using memoir class for my document. In attachment you can find MWE.
Please see page 3.: there is header with "CONTENTS" but should be "INTRODUCTION"... For comparison see page 5.: everything is OK, header is "CHAPTER 1. FIRST CHAPTER" (heading is the same as name of chapter)

I am sure that code below is responsible for this situation:

Code: Select all

\chapter*{INTRODUCTION}
\addcontentsline{toc}{chapter}{INTRODUCTION}
But Polish habit says that Introduction chapter should not be numbered in ToC.

So is there any solution for this problem? Heading in Introduction chapter should be INTRODUCTION. I hope I am clear with that.
Attachments
mwe.tex
mwe
(8.75 KiB) Downloaded 253 times

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

memoir | Wrong Chapter Name in Header

Post by Stefan Kottwitz »

Hi,

you could use \markboth or \markright, right after \chapter*, such as

Code: Select all

\markboth{INTRODUCTION}{INTRODUCTION}
Is it required to use headings completely in capital letters? I think that's too heavy: all caps + big + bold + serifs. I usually prefer normal caps, big, bold, sans serif. I would only use all caps when I use an old typewriter without any other kind of possible emphasis.

Stefan
LaTeX.org admin
heniczyna
Posts: 7
Joined: Tue Apr 03, 2012 10:35 pm

memoir | Wrong Chapter Name in Header

Post by heniczyna »

Stefan_K wrote:Hi,

you could use \markboth or \markright, right after \chapter*, such as

Code: Select all

\markboth{INTRODUCTION}{INTRODUCTION}
thanks, works fine.
Stefan_K wrote: Is it required to use headings completely in capital letters?
It is not required. my MWE that I attached above has standard page layout from memoir class. I personalized it and looks like in attachment. This is bibliography chapter. Normal chapters have headers looks the same but they are:

Code: Select all

Chapter 1. Chapter name (in Polish will be Rozdział 1. instead of Chapter 1.  ;) )
Chapter 2. Chapter name
Chapter 3. Chapter name
etc
Attachments
ex.pdf
(10.42 KiB) Downloaded 243 times
heniczyna
Posts: 7
Joined: Tue Apr 03, 2012 10:35 pm

memoir | Wrong Chapter Name in Header

Post by heniczyna »

I did not notice that before but I have similar problem with nomenclature (is this equal to list of abbreviations?)
Please see attached file and page 15.: there is header "CHAPTER 2. SECOND CHAPTER" but should be "Nomenclature". How can I change it?

I am making my nomenclature by adding to my latex code:

Code: Select all

\usepackage{nomencl} %list of abbreviations
\makenomenclature
before

Code: Select all

\begin{document}
each entry is:

Code: Select all

\nomenclature{XYZ}{definition of XYZ}
and at the end there is

Code: Select all

\printnomenclature[2.5cm]
I do not know if this is the simplest way to make this list, but works good.

quick guide of compilation proces:
1. latex compilation
2. make nomenclature list
3. latex compilation

Step 2. makeindex is script called out from my latex editor directly, this script is:

Code: Select all

@rem You can put here any commands you want - this batch file can be executed from LEd's toolbar
@rem There are 3 parameters passed  to this batch:
@rem     %1 - <MAINFILEDIR>
@rem     %2 - <MAINFILENAME>
@rem     %3 - <MAINFILEDISK>
@rem You can also define in tex_cmd.gd file some additional parameters to be passed to this batch file.
@echo off

@poniżej skrypt MakeIndex do wykazu skrótów
%3
cd %1
makeindex %2.nlo -s nomencl.ist -o %2.nls
I hope everything is clear.
Summarizing my problems:
1. wrong header in Nomenclature section
2. how can I add Nomenclature to my List of Contents?
Attachments
mwe.tex
(25.77 KiB) Downloaded 253 times
heniczyna
Posts: 7
Joined: Tue Apr 03, 2012 10:35 pm

memoir | Wrong Chapter Name in Header

Post by heniczyna »

second problem is solved 8-) : change

Code: Select all

\usepackage{nomencl} %list of abbreviations
\makenomenclature
into

Code: Select all

\usepackage[intoc]{nomencl} %list of abbreviations
\makenomenclature
and if you want to change the title "Nomenclature" to sth else you have to add after

Code: Select all

\makenomenclature
this fragment

Code: Select all

\renewcommand{\nomname}{Something you want instead of Nomenclature}
Reviewed file attached (and I changed place of "Nomenclature" from end of file to start of file).
But first problem is still unsolved :?
1. wrong header in Nomenclature section
Attachments
mwe.tex
(25.88 KiB) Downloaded 247 times
heniczyna
Posts: 7
Joined: Tue Apr 03, 2012 10:35 pm

Re: memoir | Wrong Chapter Name in Header

Post by heniczyna »

any news with this problem?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

memoir | Wrong Chapter Name in Header

Post by Stefan Kottwitz »

Also for the nomenclature you can use \markboth. In this case even in the document preamble, redefining \nompreamble, such as

Code: Select all

\renewcommand{\nompreamble}{\markboth{Nomenclature}{Nomenclature}}
as I mentioned in this topic: Header problem with Nomenclature.

Stefan
LaTeX.org admin
heniczyna
Posts: 7
Joined: Tue Apr 03, 2012 10:35 pm

memoir | Wrong Chapter Name in Header

Post by heniczyna »

many thanks Stefan! Works!
What is more: I carefully read http://www.ctex.org/documents/packages/ ... omencl.pdf (page 7. at the end) and found shorter, I think 8-), solution. I just added

Code: Select all

\markboth{\nomname}{\nomname}
before

Code: Select all

\printnomenclature[2.5cm]
and works fine, too.

thank you Stefan one more time for showing me right direction :D
Post Reply