Forum How do I...?

Topic / See Page table

ricky.how
We need to create Topic See Page tables for each section of a publication. This is simply a table that is contained in an Overview page, and lists the topics in the section.

An Overview page always starts a new section. So for Chapter 1 we might have an Overview Page that would have a Topic See Page table as follows:

Topic See Page
My First Topic 10
My Second Topic 15
etc

Topic titles are coded as <h1>My First Topic</h1>. Any help would be most appreciated!
mikeday
I think it might be best to post this question on the Deki forum, as it is going to require some understanding of the internals of Deki templates.
ricky.how
The problem can be stated more simply.

Is it possible to display the page number of a specified page?
oliof
Yes. This is how I generate a printable table of contents from the one generated by docutils:

div.contents.topic a.reference::after {
  content: leader('.') target-counter(attr(href), page);
  font-variant: prince-opentype(tnum)  ;
}

div.contents.topic ul {
  list-style-type: none ;
  padding: 0;
  margin-left: 0; 
  width: 100% ;
}

div.contents.topic ul.simple * {
  text-align: left ;
  hyphens: none ;
}


/* h1 */
div.contents.topic  ul.simple > li {
  font-weight: bold ;
}

div.contents.topic  ul.simple > li + li {
  padding-top: 1em ; 
}

/* h2 */
div.contents.topic  ul.simple > li ul {
  font-weight: normal ; 
}
  
div.contents.topic  ul.simple > li ul li ul li {
  padding-left: 0.5em ; 
  font-style: italic ; 
}

div.contents.topic  ul.simple > li ul li ul li ul li { 
  padding-left: 0.25em; font-size: 6pt;  
  font-style: italic ; 
}
ricky.how
Thanks - however I am trying to get the page number of a specific page, not a table of contents. We have a working table of contents...

In the sample below there is a rule to always break before <h1> elements.

<h1>First heading</h1>
<p>content...</p>
<h1>Second heading</h1>
<p>content...</p>

I need to say "First heading" occurs on page x.
oliof
the table of contents is just a set of links to h1, h2, … headings. The CSS outlined turns the links into links with page numbers.
ricky.how
Okay I get it now! Great, thanks....