index refers to wrong page when indexing words outside of the mainmatter

When using bookdown to render to pdf following the instructions in Write a Book with bookdown and Publish with Chapman & Hall, we have found in two projects that items that are indexed in the frontmatter are given the wrong page number - they get pointed to a page of the list of figures, but not to the preface.

So, including something like this in index.Rmd (which comes before the /mainmatter command):

Basic familiarity with version control\index{version control} and ...

Gets a page number of x - which is one of the pages of the list of figures. Has anyone else encountered this? And found a solution?

1 Like

This also happens in the bookdown package demo book. On this line is an index entry in front matter ( index.Rmd ) for GitBook:

And then in the pdf, if you look in the index for GitBook it refers to page ix, which again is a page in the list of figures.

For reference, issue has been opened

we'll look into that there.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.