1

I have a simple question. I have a basic document, to which I would like to add an index. I am using standard tools for this: the package imakeidx.

I have encountered following problems:

  1. Index pages contain list of indexed words (in two columns) and the header with word "INDEX". How can I remove this header (I do not need headers in the document).
  2. It seems that "Index" pages have different geometry (judging from size of margins). Is it my eyes or "index" doesn't follow document layout by geometry package? How can I make it to pick the defined page geometry?

Thank you!

\documentclass[oneside,a4paper,12pt]{report}
\usepackage{polyglossia}
\setmainlanguage{english}
\usepackage{microtype} 

\usepackage[margin=1in]{geometry}
\usepackage{lipsum}

\usepackage{imakeidx}
\makeindex

\begin{document}
\section{Intorduction}

\lipsum[1-3]
term_1\index{term_1} 
term_2\index{term_2}
term_3\index{term_3}
term_4\index{term_4}

\printindex
\end{document}

2 Answers 2

0

After considering the feedback, which was provided by Mr.Wilson, I realized that the problem is related to fancyhdr package and not imakeidx itself. I will try to adjust my settings.

-1

Your MWE does not compile without errors, eg., for term_1 etc.

I don't understand what you mean by "header". I always think of "header" as applying to something at the top of each page; an extended version (more \lipsum) of your MWE does not show any of these. If by "header" you mean the title of a section in the document then your \section{Intorduction} produces one, but you say you don't want any headers. I am confused. I can't imagine a document without any such headers. If you don't want such things then don't use \section etc.

If you just want to remove the title Index then change your \makeindex to:

\makeindex[title=]

as indicated by the imakeidx documentation.

The page geometry in a document is constant unless you change it, which your MWE does not do.

EDIT

After a comment by the OP @user136555 where the OP clarifies that by "header" is meant headers and footers produced by the likes of fancyhdr I have no idea what the problem is. The OP's MWE only produces a single index page and therefore cannot show headers, or not, on subsequent pages. Below is an extended version of the OP's MWE which generates multiple Index pages.

% indexprob.tex  SE 592445
\documentclass[oneside,a4paper,12pt]{report}
\usepackage{polyglossia}
\setmainlanguage{english}
\usepackage{microtype} 

\usepackage[margin=1in]{geometry}
\usepackage{lipsum}
\renewcommand{\indexname}{}

\usepackage{imakeidx}
\makeindex%[title=]

\setlength{\textheight}{0.22\textheight}
\begin{document}
\tableofcontents
\section{Intorduction}

\lipsum[1-3]

%term_1\index{term_1} 
%term_2\index{term_2}
%term_3\index{term_3}
%term_4\index{term_4}
term-1\index{term-1} 
term-2\index{term-2}
term-3\index{term-3}
term-4\index{term-4}

\lipsum[1]

term-5\index{term-5} 
term-6\index{term-6}
term-7\index{term-7}
term-8\index{term-8}

\lipsum[2]

term-9\index{term-9} 
term-10\index{term-10}
term-11\index{term-11}
term-12\index{term-12}

term-13\index{term-13} 
term-14\index{term-14}
term-15\index{term-15}
term-16\index{term-16}

term-17\index{term-17} 
term-18\index{term-18}
term-19\index{term-19}
term-20\index{term-20}

term-21\index{term-21} 
term-22\index{term-22}
term-23\index{term-23}
term-24\index{term-24}

term-25\index{term-25} 
term-26\index{term-26}
term-27\index{term-27}
term-28\index{term-28}

\printindex
\end{document}

This produces 3 Index pages and no headers on any of them.

I worked hard on this producing the multiple index pages and am now rather unhappy. --- GOM

3
  • >I don't understand what you mean by "header -- by this I mean "page headers and footers" as defined by package "fancyhdr". I did not define any headers for my document, however, I see page header "Index" on top of every "index" page. I would like to have them removed.
    – user136555
    Apr 13, 2021 at 5:49
  • @user136555 See my revised answer. You have failed to show what your problem is. Goodbye. --- GOM Apr 14, 2021 at 17:26
  • Thank you for the input! It seems that I understood where the problem is. It is not "Index" itself, it is the package fancyhdr which I used for adjusting my footers and page numbering (but not headers). I did not consider it important and thus did not include in MWE. Anyways, thank you for pointing me in the right direction. Much appreciated!
    – user136555
    Apr 15, 2021 at 3:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .