Fixed spacing and unbalanced brackets or parenthesis.
diff --git a/Doc/lib/libarray.tex b/Doc/lib/libarray.tex
index 9db346d..a590ed9 100644
--- a/Doc/lib/libarray.tex
+++ b/Doc/lib/libarray.tex
@@ -229,5 +229,5 @@
            \url{http://numpy.sourceforge.net/} for further information
            about Numerical Python.  (A PDF version of the NumPy manual
            is available at
-           \url{http://numpy.sourceforge.net/numdoc/numdoc.pdf}.}
+           \url{http://numpy.sourceforge.net/numdoc/numdoc.pdf}).}
 \end{seealso}
diff --git a/Doc/lib/libftplib.tex b/Doc/lib/libftplib.tex
index d4851ab..58d16cb 100644
--- a/Doc/lib/libftplib.tex
+++ b/Doc/lib/libftplib.tex
@@ -160,7 +160,7 @@
 \begin{methoddesc}{retrlines}{command\optional{, callback}}
 Retrieve a file or directory listing in \ASCII{} transfer mode.
 \var{command} should be an appropriate \samp{RETR} command (see
-\method{retrbinary()} or a \samp{LIST} command (usually just the string
+\method{retrbinary()}) or a \samp{LIST} command (usually just the string
 \code{'LIST'}).  The \var{callback} function is called for each line,
 with the trailing CRLF stripped.  The default \var{callback} prints
 the line to \code{sys.stdout}.
@@ -280,7 +280,7 @@
 
 \begin{methoddesc}{close}{}
 Close the connection unilaterally.  This should not be applied to an
-already closed connection (such as after a successful call to
+already closed connection such as after a successful call to
 \method{quit()}.  After this call the \class{FTP} instance should not
 be used any more (after a call to \method{close()} or
 \method{quit()} you cannot reopen the connection by issuing another
diff --git a/Doc/lib/liboptparse.tex b/Doc/lib/liboptparse.tex
index 026239e..12af778 100644
--- a/Doc/lib/liboptparse.tex
+++ b/Doc/lib/liboptparse.tex
@@ -962,6 +962,7 @@
   make_option("--file", dest="filename",
               help="Input file to read data from"),
   make_option("--secret", help=SUPPRESS_HELP)
+])
 \end{verbatim}
 
 If \module{optparse} sees either \programopt{-h} or
diff --git a/Doc/lib/libos.tex b/Doc/lib/libos.tex
index c9cf137..dd492bb 100644
--- a/Doc/lib/libos.tex
+++ b/Doc/lib/libos.tex
@@ -453,7 +453,7 @@
 MS \cfunction{_commit()} function.
 
 If you're starting with a Python file object \var{f}, first do
-\code{\var{f}.flush()}, and then do \code{os.fsync(\var{f}.fileno()},
+\code{\var{f}.flush()}, and then do \code{os.fsync(\var{f}.fileno())},
 to ensure that all internal buffers associated with \var{f} are written
 to disk.
 Availability: \UNIX, and Windows starting in 2.2.3.
@@ -884,7 +884,7 @@
 \member{st_mode} (protection bits),
 \member{st_ino} (inode number),
 \member{st_dev} (device),
-\member{st_nlink} (number of hard links,
+\member{st_nlink} (number of hard links),
 \member{st_uid} (user ID of owner),
 \member{st_gid} (group ID of owner),
 \member{st_size} (size of file, in bytes),
diff --git a/Doc/lib/libtimeit.tex b/Doc/lib/libtimeit.tex
index 882cad1..42d9ea6 100644
--- a/Doc/lib/libtimeit.tex
+++ b/Doc/lib/libtimeit.tex
@@ -52,7 +52,7 @@
 it defaults to \code{sys.stderr}.
 \end{methoddesc}
 
-\begin{methoddesc}{repeat}{\optional{repeat\code{=3}\optional{,
+\begin{methoddesc}{repeat}{\optional{repeat\code{=3} \optional{,
                            number\code{=1000000}}}}
 Call \method{timeit()} a few times.