Revision: 13739
          http://gate.svn.sourceforge.net/gate/?rev=13739&view=rev
Author:   ian_roberts
Date:     2011-04-21 10:49:54 +0000 (Thu, 21 Apr 2011)

Log Message:
-----------
Fixed two problems with the table of contents - in the HTML version the
References header appeared twice and in the PDF version it appeared only once
but linked to the wrong page.

Modified Paths:
--------------
    userguide/branches/release-6.1/tao_main.tex

Modified: userguide/branches/release-6.1/tao_main.tex
===================================================================
--- userguide/branches/release-6.1/tao_main.tex 2011-04-21 10:33:14 UTC (rev 
13738)
+++ userguide/branches/release-6.1/tao_main.tex 2011-04-21 10:49:54 UTC (rev 
13739)
@@ -696,8 +696,23 @@
 %\input{oracle-postgre}
 
 \renewcommand{\bibname}{References}
+\cleardoublepage
 \markboth{References}{References}
-\addcontentsline{toc}{chapter}{References}
+% In tex4ht the bibliography is included in the table of contents
+% automatically.  In pdflatex it isn't, so we need an explicit addcontentsline
+% in that case, but this needs to come after the start of the "chapter" in
+% order to get the TOC entry to link to the correct page.  To achieve this we
+% redefine the thebibliography environment (in non-HTML mode only) to include
+% the addcontentsline at the right place.
+\ifhtml\else
+  % save the old definition of the environment
+  \let\oldThebib\thebibliography
+  \let\oldEndthebib\endthebibliography
+  % and reuse it in the new definition
+  \renewenvironment{thebibliography}[1]%
+    {\oldThebib{#1}\addcontentsline{toc}{chapter}{References}}%
+    {\oldEndthebib}
+\fi
 \bibliography{../big}
 
 \ifprintedbook


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to