[rtems-docs commit] pdf: Update the RTEMS style to work recent Sphinx versions.

Chris Johns chrisj at rtems.org
Fri Aug 11 03:46:48 UTC 2017


Module:    rtems-docs
Branch:    master
Commit:    c68461134ea5bfe6859ca6c49055252ef978b860
Changeset: http://git.rtems.org/rtems-docs/commit/?id=c68461134ea5bfe6859ca6c49055252ef978b860

Author:    Chris Johns <chrisj at rtems.org>
Date:      Fri Aug 11 00:32:18 2017 +0000

pdf: Update the RTEMS style to work recent Sphinx versions.

---

 common/rtemsstyle.sty | 77 +++++++++++++++------------------------------------
 1 file changed, 23 insertions(+), 54 deletions(-)

diff --git a/common/rtemsstyle.sty b/common/rtemsstyle.sty
index e55bb93..8f963c4 100644
--- a/common/rtemsstyle.sty
+++ b/common/rtemsstyle.sty
@@ -24,41 +24,38 @@ gobble=0,
 }
 
 \renewcommand{\maketitle}{%
+  \let\spx at tempa\relax
+  \ifHy at pageanchor\def\spx at tempa{\Hy at pageanchortrue}\fi
+  \hypersetup{pageanchor=false}% avoid duplicate destination warnings
   \begin{titlepage}%
     \let\footnotesize\small
     \let\footnoterule\relax
-    \ifsphinxpdfoutput
-      \begingroup
-      % This \def is required to deal with multi-line authors; it
-      % changes \\ to ', ' (comma-space), making it pass muster for
-      % generating document info in the PDF file.
-      \def\\{, }
-      \pdfinfo{
-        /Author (\@author)
-        /Title (\@title)
-      }
+    \par
+      \begingroup % for PDF information dictionary
+       \def\endgraf{ }\def\and{\& }%
+       \pdfstringdefDisableCommands{\def\\{, }}% overwrite hyperref setup
+       \hypersetup{pdfauthor={\@author}, pdftitle={\@title}}%
       \endgroup
-    \fi
-    \begin{flushright}%
-      %\sphinxlogo%
-      {\center
-        \vspace*{3cm}
-      	\includegraphics{logo.pdf}
-        \vspace{3cm}
-	\par
-        {\rm\Huge \@title \par}%
-        {\em\LARGE \py at release\releaseinfo \par}
-        {\large
-          \copyright Copyright \rtemscopyright \par
-         \py at authoraddress \par
-        }}%
-    \end{flushright}%\par
+    \begin{center}{%
+      \vspace*{3cm}
+      \includegraphics{logo.pdf}
+      \vspace{3cm}
+      \par
+      {\rm\Huge \@title \par}%
+      {\em\LARGE \py at release\releaseinfo \par}
+      {\large
+       \copyright Copyright \rtemscopyright \par
+       \py at authoraddress \par
+      }%
+    }%
+    \end{center}%\par
     \@thanks
   \end{titlepage}%
-  \cleardoublepage%
   \setcounter{footnote}{0}%
   \let\thanks\relax\let\maketitle\relax
   %\gdef\@thanks{}\gdef\@author{}\gdef\@title{}
+  \if at openright\cleardoublepage\else\clearpage\fi
+  \spx at tempa
 }
 
 \fancypagestyle{normal}{
@@ -113,31 +110,3 @@ gobble=0,
 % fonts
 \usepackage{charter}
 \usepackage{rtemsextrafonts}
-
-\def\@part[#1]#2{%
-    \ifnum \c at secnumdepth >\m at ne
-      \refstepcounter{part}%
-      \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
-    \else
-      \addcontentsline{toc}{part}{#1}%
-    \fi
-    {\parindent \z@ %\center
-     \interlinepenalty \@M
-     \normalfont
-     \ifnum \c at secnumdepth >\m at ne
-       \rm\Large \partname~\thepart
-       \par\nobreak
-     \fi
-     \MakeUppercase{\rm\Huge #2}%
-     \markboth{}{}\par}%
-    \nobreak
-    \vskip 8ex
-    \@afterheading}
-\def\@spart#1{%
-    {\parindent \z@ %\center
-     \interlinepenalty \@M
-     \normalfont
-     \huge \bfseries #1\par}%
-     \nobreak
-     \vskip 3ex
-     \@afterheading}



More information about the vc mailing list