Background.
I would like to replace the intentionally blank pages or vacat pages in scrbook with a page which shows a new quote on every new blank page. Thanks to scrbook and LuaTeX this is not that difficult to write.
Here is my problem.
Unfortunately, the index on these pages does not work. The entry does not show up in the .idx-file.
Remarks.
- Choosing a different engine than LuaTeX is not an option.
- The code which accesses the quote from Lua-
tablesis not shown here to avoid a bloated MWE and a separated.lua-file. - Choosing a different class than
scrbookis not an option. - The same problem occurs in the header and footer.
- The indexes
index does work here Aandindex does work here Bwork fine.
My MWE.
\documentclass[paper=a4,twoside]{scrbook}
\usepackage{fontspec,polyglossia}
\setdefaultlanguage[variant=usmax]{english}
\usepackage{hyperref,makeidx}
\usepackage{scrlayer,scrlayer-scrpage}
\DeclareNewLayer[
foreground,
align=l,
area={.25\paperwidth}{.37\paperheight}{.5\paperwidth}{.5\paperheight},
contents={A quote which is accessed by Lua. But not in the MWE. But the \textbf{index}\index{index does not work here} does not work here!
Just some Lua code: \directlua{tex.sprint(math.exp(-1))}.}
]{intentionallyBlankLayer}
\DeclareNewPageStyleByLayers{intentionallyBlank}{intentionallyBlankLayer}
\KOMAoptions{cleardoublepage=intentionallyBlank}
\ihead[bar \index{bar head index does not work}]{foo \index{foo head index does not work}}
\ifoot[bar \index{bar foot index does not work}]{foo \index{foo foot index does not work}}
\makeindex
\begin{document}
\chapter{Lorem foo}
Some text with a working index\index{index does work here A}.
\chapter{Lorem bar}
Some other text with a working index\index{index does work here B}.
\printindex
\end{document}
idxfile I get\indexentry{index does work here A|hyperpage}{1}Fixing the page number is the only issue I see. – Marco Daniel Mar 25 '17 at 09:42index does not work here. – CampanIgnis Mar 25 '17 at 11:23