Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjustments for index #1307

Open
daleif opened this issue Feb 15, 2024 · 1 comment
Open

Adjustments for index #1307

daleif opened this issue Feb 15, 2024 · 1 comment
Labels

Comments

@daleif
Copy link

daleif commented Feb 15, 2024

Version

3.1.10

Details

This is rather a suggestion for the manual: Add bookmarks for letter groups of the index to for easier navigation.

I've played with the code from the repro and it seems to work just fine. As my git foo is poor, I'll currently not be doing a PR, but will describe what I did.

build.lua

Add the line

indexstyle = "pgfmanual-index.ist"

And change docfiles to

docfiles =
  {
    "RELEASE_NOTES.md", "description.html", -- Part of the release script
    "color.cfg", "pgfmanual.cfg", "images", "plots", "pgfmanual-index.ist", "*.tex" -- Build the manual
  }

(added pgfmanual-index.ist)

pgf/doc/generic/pgf/pgfmanual-en-main-body.tex

Replace the line

\usepackage{imakeidx}

by

\usepackage{makeidx}

(you're building using l3build which runs makeindex so there is no need for imakeidx)

Add .ist file

In the same folder as pgfmanual.tex add the file pgfmanual-index.idx with the contents

preamble "\\begin{theindex}\n\\providecommand{\\doidxbookmark}[1]{\\pdfbookmark[2]{#1}{#1-idx}}\n"
headings_flag 1
heading_prefix "\\doidxbookmark{"
heading_suffix "}"

Then compile the manual using

l3build doc

By default l3build uses gind.ist which has a different look than the makeindex default (which is what the imakeidx uses), the style above just adjusts the makeindex defaults a bit in order to add bookmarks to each letter group, but will not print them (feel free to adjust this) so the printed index will look just like it does in the current release.

@daleif daleif added the manual label Feb 15, 2024
@daleif
Copy link
Author

daleif commented Feb 16, 2024

We can add a lot more to the indexes than this, but at least this is a start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant