improve index generation and pagerefs
authorChristian Thaeter <ct@pipapo.org>
Tue, 17 Aug 2010 20:42:29 +0000 (22:42 +0200)
committerChristian Thaeter <ct@pipapo.org>
Tue, 17 Aug 2010 20:42:29 +0000 (22:42 +0200)
doc/latex.conf
doc/nobug_manual.conf

index 20c1093..e18c8e7 100644 (file)
@@ -293,7 +293,7 @@ $$passthrough=|
 {style#}{style$ref:!..backslash..!ref!..braceleft..!{target}!..braceright..!}
 {style#}{latex-use-bibliography-environment#}{style$cite:!..backslash..!cite!..braceleft..!{target}!..braceright..!}
 {style#}{latex-use-bibliography-environment%}{style$cite:!..backslash..!hyperlink!..braceleft..!{target}!..braceright..!!..braceleft..!{0=[{target}]}!..braceright..!}
-{style%}!..backslash..!hyperlink!..braceleft..!{target}!..braceright..!!..braceleft..!{0=[{target}]}!..braceright..!, !..backslash..!pageref!..braceleft..!{target}!..braceright..!
+{style%}!..backslash..!hyperlink!..braceleft..!{target}!..braceright..!!..braceleft..!{0=[{target}]}!..braceright..!!..backslash..!showpagenumber!..braceleft..!{target}!..braceright..!
 # <<id,text>>
 [xref2-inlinemacro]
 {3#}{3$page:!..backslash..!pageref!..braceleft..!{1}!..braceright..!}
@@ -550,7 +550,7 @@ ifdef::doctype-book[]
 endif::doctype-book[]
 
 # we generate our own index, dont make Index special
-^Index$=
+^Reference Index$=index
 
 ifdef::latex-use-bibliography-environment[]
 ^(Bibliography|References)$=bibliography
@@ -573,11 +573,10 @@ endif::latex-use-bibliography-environment[]
 \tableofcontents
 
 [index]
-\setindexpreamble\{
+\chapter\{{title}\}
+#\label\{{id}\}\\hypertarget\{{id}\}\{\}
+\renewcommand\{\\showpagenumber\}[1]\{, \pageref\{#1\}\}
 |
-\}
-\label\{{id}\}\\hypertarget\{{id}\}\{\}
-\printindex
 
 ifdef::latex-use-bibliography-environment[]
 [bibliography]
@@ -707,6 +706,7 @@ endif::doctype-book[]
 \usepackage\{microtype\}
 
 \newcommand*\FancyVerbStopString\{FANCYVRBSTOP\}
+\newcommand\{\\showpagenumber\}[1]\{ (p.\,\pageref\{#1\})\}
 
 %\lstset\{basicstyle=\footnotesize\ttfamily,showstringspaces=false,breaklines,frame=single, rulecolor=\color\{ListingBorderColor\}, xleftmargin=0cm, linewidth=0.95\textwidth\}
 
index 500d7a3..bd7afed 100644 (file)
 //=dlalgo
 
 //_
-//_ Index
-//_ -----
+//_ Reference Index
+//_ ---------------
 //_
-Todo index only for html generation, other dockbook toolchains generate
-the index automatically
+//_ [dotted]
 //=index
 //_