diff options
| author | Simon Tatham <anakin@pobox.com> | 2004-04-15 08:37:39 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2004-04-15 08:37:39 +0000 |
| commit | 8603d13eb7651e7721e421750202344f0ced55a7 (patch) | |
| tree | 11f728601f20de3c30cff54afaa388bac6a4d7aa | |
| parent | c57b34b0b1bb87427bd0cc3d7018e3b6f1c9c334 (diff) | |
| download | halibut-8603d13eb7651e7721e421750202344f0ced55a7.zip halibut-8603d13eb7651e7721e421750202344f0ced55a7.tar.gz halibut-8603d13eb7651e7721e421750202344f0ced55a7.tar.bz2 halibut-8603d13eb7651e7721e421750202344f0ced55a7.tar.xz | |
Ahem. If an indexable term appears in a section heading, the index
should not also point to a page in the contents! :-)
[originally from svn r4078]
| -rw-r--r-- | bk_paper.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -12,9 +12,6 @@ /* * TODO in future work: * - * - the index should not refer to the contents, if an indexable - * term crops up in a section title! - * * - include the version IDs. * * - linearised PDF, perhaps? @@ -571,6 +568,9 @@ void *paper_pre_backend(paragraph *sourceform, keywordlist *keywords, paper_idx *pi = (paper_idx *)entry->backend_data; para_data *text, *pages; + if (!pi->words) + continue; + text = make_para_data(para_Normal, 0, 0, conf->base_width - conf->index_colwidth, NULL, NULL, entry->text, conf); @@ -1742,7 +1742,10 @@ static int render_text(page_data *page, para_data *pdata, line_data *ldata, * referenced by an index entry. */ case word_IndexRef: - { + /* + * We don't create index references in contents entries. + */ + if (!pdata->contents_entry) { indextag *tag; int i; |