From ec623034cc2c3b6f180a4ead360ddd3ce21fff07 Mon Sep 17 00:00:00 2001 From: Akihiro Uchida Date: Sun, 8 Dec 2013 14:19:15 +0900 Subject: [PATCH] Fix broken hyperlinks to chapters in appendix in Japanese environment --- sphinx/texinputs/sphinx.sty | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty index 9b083cc6b..50c0d16a4 100644 --- a/sphinx/texinputs/sphinx.sty +++ b/sphinx/texinputs/sphinx.sty @@ -508,13 +508,11 @@ } \fi -% do not use \@chappos in Appendix in pTeX +% disable \@chappos in Appendix in pTeX \ifx\kanjiskip\undefined\else - \renewcommand{\appendix}{\par - \setcounter{chapter}{0} - \setcounter{section}{0} - \gdef\@chapapp{\appendixname} - \gdef\@chappos{} - \gdef\thechapter{\@Alph\c@chapter} + \let\py@OldAppendix=\appendix + \renewcommand{\appendix}{ + \py@OldAppendix + \gdef\@chappos{} } \fi