Your code works, your entry appears
test\index{test}
. But I don't see the entries that I defined like that in my text. For example: Articles\index{Article} pour l'index. Essai\index{Essai}.
Is there the problem?
test\index{test}
. But I don't see the entries that I defined like that in my text. For example: Articles\index{Article} pour l'index. Essai\index{Essai}.
Articles\index{Article}
etc. is fine, there's another problem in the code.Code: Select all
\documentclass[a4paper, 12pt]{book}
\usepackage{fontspec}
\usepackage{polyglossia}
\usepackage{fancyhdr}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{imakeidx}
\makeindex[title= Index]
\setdefaultlanguage[frenchpart=false]{french}
%%%%%%%%%%%%%%%%%%%%
\makeatletter
\let\ps@plain\ps@empty
%%%%%%%%%%%%%%%%%%%
\title{TITRE DU LIVRE}
\author{}
\date{}
\begin{document}
%%%%%%%%%%%%
\frontmatter
%%%%%%%%%%%%
%\renewcommand{\thepage}{\textsc{\roman{page}}}
%\fancyhead[LE,RO]{\textsc{\thepage}}
\maketitle
\chapter{Préface}
Articles\index{Article} pour l'index. Essai\index{Essai}.
\lipsum[1-5]
%%%%%%%%%%%
\mainmatter
%%%%%%%%%%%
\chapter{Prologue}
\lipsum[1-5]
%%%%%%%%%%%
\backmatter
%%%%%%%%%%%
\appendix
\printindex
\addcontentsline{toc}{chapter}{Index}%Pour qu'il apparaisse dans la TOC
\tableofcontents
\end{document}
\frontmatter
are commented. The index appears.\makeatletter
\let\ps@plain\ps@empty
, the page numbers appear at the same time at the top and at the bottom. I don't understand how it works, but with this command the numbers appear as I want.\pagenumbering{Roman}
:Code: Select all
\documentclass[a4paper, 12pt]{book}
\usepackage{fontspec}
\usepackage{polyglossia}
\usepackage{fancyhdr}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{imakeidx}
\makeindex[title= Index]
\setdefaultlanguage[frenchpart=false]{french}
%%%%%%%%%%%%%%%%%%%%
\makeatletter
\let\ps@plain\ps@empty
%%%%%%%%%%%%%%%%%%%
\title{TITRE DU LIVRE}
\author{}
\date{}
\begin{document}
%%%%%%%%%%%%
\frontmatter
%%%%%%%%%%%%
\pagenumbering{Roman}
\maketitle
\chapter{Préface}
Articles\index{Article} pour l'index. Essai\index{Essai}.
\lipsum[1-5]
%%%%%%%%%%%
\mainmatter
%%%%%%%%%%%
\chapter{Prologue}
\lipsum[1-5]
%%%%%%%%%%%
\backmatter
%%%%%%%%%%%
\appendix
\printindex
\addcontentsline{toc}{chapter}{Index}%Pour qu'il apparaisse dans la TOC
\tableofcontents
\end{document}
\pagenumbering{Roman}
.Code: Select all
\indexentry{Article|textsc}{\textsc {iii}}
Code: Select all
!! Input index error (file = text.idx, line = 1):
-- Illegal space within numerals in second argument.
\textsc
at that place. The way of formatting page number would be like here:Code: Select all
\documentclass{article}
\usepackage{imakeidx}
\makeindex
\begin{document}
\pagenumbering{roman}
Text
\index{Article}
\index{Article|textsc}
\printindex
\end{document}
\pagenumbering{Roman}
that is easy and consistent, because if we want capital Roman numbers than this is it, instead of smaller-non-capital-capitals.