avoid ugly markup based on the unfortunate conversions of ">>" and "<<" to
guillemets; no need for magic here
diff --git a/Doc/lib/libcodeop.tex b/Doc/lib/libcodeop.tex
index 7d6153e..6972b6f 100644
--- a/Doc/lib/libcodeop.tex
+++ b/Doc/lib/libcodeop.tex
@@ -19,7 +19,7 @@
 \begin{enumerate}
   \item Being able to tell if a line of input completes a Python 
         statement: in short, telling whether to print
-        `\code{>\code{>}>~}' or `\code{...~}' next.
+        `\code{>>>~}' or `\code{...~}' next.
   \item Remembering which future statements the user has entered, so 
         subsequent input can be compiled with these in effect.
 \end{enumerate}
diff --git a/Doc/lib/libdoctest.tex b/Doc/lib/libdoctest.tex
index 4c4f228..b318d2a 100644
--- a/Doc/lib/libdoctest.tex
+++ b/Doc/lib/libdoctest.tex
@@ -333,8 +333,8 @@
 \end{verbatim}
 
 Any expected output must immediately follow the final
-\code{'>\code{>}>~'} or \code{'...~'} line containing the code, and
-the expected output (if any) extends to the next \code{'>\code{>}>~'}
+\code{'>>>~'} or \code{'...~'} line containing the code, and
+the expected output (if any) extends to the next \code{'>>>~'}
 or all-whitespace line.
 
 The fine print:
@@ -386,7 +386,7 @@
 \end{verbatim}
 
 and as many leading whitespace characters are stripped from the
-expected output as appeared in the initial \code{'>\code{>}>~'} line
+expected output as appeared in the initial \code{'>>>~'} line
 that started the example.
 \end{itemize}
 
diff --git a/Doc/lib/libhtmlparser.tex b/Doc/lib/libhtmlparser.tex
index b85ba56..52f8409 100644
--- a/Doc/lib/libhtmlparser.tex
+++ b/Doc/lib/libhtmlparser.tex
@@ -132,7 +132,7 @@
 \begin{methoddesc}{handle_decl}{decl}
 Method called when an SGML declaration is read by the parser.  The
 \var{decl} parameter will be the entire contents of the declaration
-inside the \code{<!}...\code{>} markup.It is intended to be overridden
+inside the \code{<!}...\code{>} markup.  It is intended to be overridden
 by a derived class; the base class implementation does nothing.
 \end{methoddesc}
 
diff --git a/Doc/lib/liboperator.tex b/Doc/lib/liboperator.tex
index 41da9b7..5ba3209 100644
--- a/Doc/lib/liboperator.tex
+++ b/Doc/lib/liboperator.tex
@@ -320,7 +320,7 @@
 
 \begin{funcdesc}{irshift}{a, b}
 \funcline{__irshift__}{a, b}
-\code{a = irshift(a, b)} is equivalent to \code{a >}\code{>= b}.
+\code{a = irshift(a, b)} is equivalent to \code{a >>= b}.
 \versionadded{2.5}
 \end{funcdesc}
 
@@ -499,7 +499,7 @@
           {\code{neg(\var{a})}}
   \lineiii{Negation (Logical)}{\code{not \var{a}}}
           {\code{not_(\var{a})}}
-  \lineiii{Right Shift}{\code{\var{a} >\code{>} \var{b}}}
+  \lineiii{Right Shift}{\code{\var{a} >> \var{b}}}
           {\code{rshift(\var{a}, \var{b})}}
   \lineiii{Sequence Repitition}{\code{\var{seq} * \var{i}}}
           {\code{repeat(\var{seq}, \var{i})}}
diff --git a/Doc/lib/libsys.tex b/Doc/lib/libsys.tex
index ea8950a..8a23fbc 100644
--- a/Doc/lib/libsys.tex
+++ b/Doc/lib/libsys.tex
@@ -410,7 +410,7 @@
   Strings specifying the primary and secondary prompt of the
   interpreter.  These are only defined if the interpreter is in
   interactive mode.  Their initial values in this case are
-  \code{'>\code{>}> '} and \code{'... '}.  If a non-string object is
+  \code{'>>>~'} and \code{'... '}.  If a non-string object is
   assigned to either variable, its \function{str()} is re-evaluated
   each time the interpreter prepares to read a new interactive
   command; this can be used to implement a dynamic prompt.
diff --git a/Doc/lib/libtrace.tex b/Doc/lib/libtrace.tex
index bafee61..2465aac 100644
--- a/Doc/lib/libtrace.tex
+++ b/Doc/lib/libtrace.tex
@@ -54,7 +54,7 @@
 
 \item[\longprogramopt{missing}, \programopt{-m}]
 When generating annotated listings, mark lines which
-were not executed with \code{>}\code{>}\code{>}\code{>}\code{>}\code{>}.
+were not executed with `\code{>>>>>>}'.
 
 \item[\longprogramopt{summary}, \programopt{-s}]
 When using \longprogramopt{count} or \longprogramopt{report}, write a