Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7d9f8d7

Browse files
committed
Small changes. Use description instead of list env.
1 parent 4c41778 commit 7d9f8d7

2 files changed

Lines changed: 24 additions & 74 deletions

File tree

Doc/tut.tex

Lines changed: 12 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,6 @@
11
% Format this file with latex.
22

3-
\documentstyle{article}
4-
5-
% Page lay-out parameters
6-
\textwidth = 150mm
7-
\textheight = 240mm
8-
\topmargin = -11mm
9-
\oddsidemargin = 5mm
10-
\evensidemargin = 5mm
11-
12-
% Macros for e.g. and E.g. if you want them italicized:
13-
% \newcommand{\eg}{{\it e.g.}}
14-
% \newcommand{\Eg}{{\it E.g.}}
15-
% If you don't want them italicized:
16-
\newcommand{\eg}{e.g.}
17-
\newcommand{\Eg}{E.g.}
18-
19-
% Frequently used system names
20-
\newcommand{\Python}{{\em Python}}
21-
\newcommand{\UNIX}{U{\sc nix}}
22-
23-
% Code environment
24-
\newenvironment{code}{\begin{itemize}\samepage}{\end{itemize}}
3+
\documentstyle[myformat]{article}
254

265
\title{\bf
276
Python Tutorial \\
@@ -956,15 +935,15 @@ \subsection{Defining Functions}
956935
}
957936
\end{itemize}
958937
The list object type has two more methods:
959-
\begin{list}{}{\labelwidth=4cm}
938+
\begin{description}
960939
\item[{\tt insert(i, x)}]
961940
Inserts an item at a given position.
962941
The first argument is the index of the element before which to insert,
963942
so {\tt a.insert(0, x)} inserts at the front of the list, and
964943
{\tt a.insert(len(a), x)} is equivalent to {\tt a.append(x)}.
965944
\item[{\tt sort()}]
966945
Sorts the elements of the list.
967-
\end{list}
946+
\end{description}
968947
For example:
969948
\begin{code}\begin{verbatim}
970949
>>> a = [10, 100, 1, 1000]
@@ -1562,18 +1541,14 @@ \subsubsection{A Simple Example}
15621541

15631542
\section{XXX P.M.}
15641543

1565-
The {\tt del} statement.
1566-
1567-
The {\tt dir()} function.
1568-
1569-
Tuples.
1570-
1571-
Dictionaries.
1572-
1573-
Objects and types in general.
1574-
1575-
Backquotes.
1576-
1577-
And/Or/Not.
1544+
\begin{itemize}
1545+
\item The {\tt del} statement.
1546+
\item The {\tt dir()} function.
1547+
\item Tuples.
1548+
\item Dictionaries.
1549+
\item Objects and types in general.
1550+
\item Backquotes.
1551+
\item And/Or/Not.
1552+
\end{itemize}
15781553

15791554
\end{document}

Doc/tut/tut.tex

Lines changed: 12 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,6 @@
11
% Format this file with latex.
22

3-
\documentstyle{article}
4-
5-
% Page lay-out parameters
6-
\textwidth = 150mm
7-
\textheight = 240mm
8-
\topmargin = -11mm
9-
\oddsidemargin = 5mm
10-
\evensidemargin = 5mm
11-
12-
% Macros for e.g. and E.g. if you want them italicized:
13-
% \newcommand{\eg}{{\it e.g.}}
14-
% \newcommand{\Eg}{{\it E.g.}}
15-
% If you don't want them italicized:
16-
\newcommand{\eg}{e.g.}
17-
\newcommand{\Eg}{E.g.}
18-
19-
% Frequently used system names
20-
\newcommand{\Python}{{\em Python}}
21-
\newcommand{\UNIX}{U{\sc nix}}
22-
23-
% Code environment
24-
\newenvironment{code}{\begin{itemize}\samepage}{\end{itemize}}
3+
\documentstyle[myformat]{article}
254

265
\title{\bf
276
Python Tutorial \\
@@ -956,15 +935,15 @@ \subsection{Defining Functions}
956935
}
957936
\end{itemize}
958937
The list object type has two more methods:
959-
\begin{list}{}{\labelwidth=4cm}
938+
\begin{description}
960939
\item[{\tt insert(i, x)}]
961940
Inserts an item at a given position.
962941
The first argument is the index of the element before which to insert,
963942
so {\tt a.insert(0, x)} inserts at the front of the list, and
964943
{\tt a.insert(len(a), x)} is equivalent to {\tt a.append(x)}.
965944
\item[{\tt sort()}]
966945
Sorts the elements of the list.
967-
\end{list}
946+
\end{description}
968947
For example:
969948
\begin{code}\begin{verbatim}
970949
>>> a = [10, 100, 1, 1000]
@@ -1562,18 +1541,14 @@ \subsubsection{A Simple Example}
15621541

15631542
\section{XXX P.M.}
15641543

1565-
The {\tt del} statement.
1566-
1567-
The {\tt dir()} function.
1568-
1569-
Tuples.
1570-
1571-
Dictionaries.
1572-
1573-
Objects and types in general.
1574-
1575-
Backquotes.
1576-
1577-
And/Or/Not.
1544+
\begin{itemize}
1545+
\item The {\tt del} statement.
1546+
\item The {\tt dir()} function.
1547+
\item Tuples.
1548+
\item Dictionaries.
1549+
\item Objects and types in general.
1550+
\item Backquotes.
1551+
\item And/Or/Not.
1552+
\end{itemize}
15781553

15791554
\end{document}

0 commit comments

Comments
 (0)