Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
ecae0b7e
Kaydet (Commit)
ecae0b7e
authored
28 years ago
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed for Latex2e by Dave Ascher.
üst
84fb82dd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
40 deletions
+29
-40
myformat.sty
Doc/myformat.sty
+29
-40
No files found.
Doc/myformat.sty
Dosyayı görüntüle @
ecae0b7e
% Style parameters and macros used by most documents here
\input
{
a4wide.sty
}
% Take this out if it doesn't exist or doesn't work
\input
{
times.sty
}
% And this (at CWI, this uses PostScript fonts)
% This has to be tuned each time the repair person takes the printer apart:
%\addtolength{\oddsidemargin}{-2.5mm}
%\addtolength{\evensidemargin}{-2.5mm}
%
% myformat.sty for the Python doc [updated to work with Latex2e]
%
% Style parameters
% Style parameters
and macros used by most documents here
\raggedbottom
\sloppy
\parindent
= 0mm
...
...
@@ -36,11 +31,28 @@
\noindent
}
% Underscores are not magic throughout the Python documentation.
% This still only gives the right effect in the tt font!!!
\def\_
{
\ifnum\fam
=
\ttfam
\char
'137
\else
{
\tt\char
'137
}
\fi
}
\catcode
`
\_
=12
\catcode
`
\_
=
\active\def
_{
\ifnum\fam
=
\ttfam
\char
'137
\else
{
\tt\char
'137
}
\fi
}
% Underscore hack (only act like subscript operator if in math mode)
%
% The following is due to Mark Wooding (the old version didn't work with
% Latex 2e.
\DeclareRobustCommand\hackscore
{
%
\ifmmode
_
\else\textunderscore\fi
%
}
\begingroup
\catcode
`
\_\active
\def\next
{
%
\AtBeginDocument
{
\catcode
`
\_\active\def
_{
\hackscore
{}}}
%
}
\expandafter\endgroup\next
%
% This is the old hack, which didn't work with 2e.
% If you're still using Latex 2.09, you can give it a try if the above fails.
%
%\def\_{\ifnum\fam=\ttfamily \char'137\else{\tt\char'137}\fi}
%\catcode`\_=12
%\catcode`\_=\active\def_{\ifnum\fam=\ttfamily \char'137 \else{\tt\char'137}\fi}
% Define \itembreak: force the text after an item to start on a new line
\newcommand
{
\itembreak
}{
...
...
@@ -89,7 +101,6 @@
% Define \funcitem{func}{args}: define a function item
\newcommand
{
\funcitem
}
[2]
{
%
\ttindex
{
#1
}
%
%\item[{\tt #1(#2)}]
\item
[\code{#1(\varvars{#2})}]
\
}
...
...
@@ -140,37 +151,27 @@
\newcommand
{
\ABC
}{{
\sc
abc
}}
\newcommand
{
\UNIX
}{{
\sc
Unix
}}
\newcommand
{
\ASCII
}{{
\sc
ascii
}}
%\newcommand{\C}{{\bf C}}
\newcommand
{
\Cpp
}{
C
\protect\raisebox
{
.18ex
}{
++
}}
\newcommand
{
\C
}{
C
}
\newcommand
{
\EOF
}{{
\sc
eof
}}
% code is the most difficult one...
%\frenchspacing removed, because \section, etc., can't handle it
\newcommand
{
\code
}
[1]
{{
\@
vobeyspaces
\@
noligs
\def\{
{
\char
`
\{
}
\def\}
{
\char
`
\}
}
\def\~
{
\char
`
\~
}
\def\^
{
\char
`
\^
}
\def\e
{
\char
`
\\
}
\def\$
{
\char
`
\$
}
\def\#
{
\char
`
\#
}
\def\&
{
\char
`
\&
}
\def\%
{
\char
`
\%
}
%
\mbox
{
\tt
#1
}}}
%This one does not work
%%%% myspecials, same as dospecials, but without {, } and \
%%%\def\myspecials{\do\ \do\$\do\&%
%%% \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~}
%%%\newcommand{\code}[1]{\begingroup \catcode``=13 \@noligs
%%%\tt \let\do\@makeother \myspecials
%%%#1\endgroup}
\newcommand
{
\kbd
}
[1]
{
\mbox
{
\tt
#1
}}
\newcommand
{
\key
}
[1]
{
\mbox
{
\tt
#1
}}
\newcommand
{
\samp
}
[1]
{
\mbox
{
`
\code
{
#1
}
'
}}
\newcommand
{
\var
}
[1]
{
\mbox
{
\it
#1
\/
}}
\let\file
=
\samp
\newcommand
{
\dfn
}
[1]
{{
\em
#1
\/
}}
\newcommand
{
\emph
}
[1]
{{
\em
#1
\/
}}
\
re
newcommand
{
\emph
}
[1]
{{
\em
#1
\/
}}
\newcommand
{
\strong
}
[1]
{{
\bf
#1
}}
%\newcommand{\varvars}[1]{{\catcode`\,=\active\def,{\tt\char`\,\/tt}\var{#1}}}
%\newcommand{\varvars}[1]{{\def\,{\/{\tt\char`\,}}\var{#1}}}
\newcommand
{
\varvars
}
[1]
{{
\def\,
{
\/
{
\tt\char
`
\,
}}
\def
\({
\/
{
\tt\char
`
\(
}}
\def
\){
\/
{
\tt\char
`
\)
}}
\var
{
#1
}}}
\newif\iftexi\texifalse
%not supported yet%
\newif\iflatex\latextrue
\newif\iflatex\latextrue
\newenvironment
{
tableii
}
[4]
{
\begin{center}
\def\lineii
##1##2
{
\csname
#2
\endcsname
{
##1
}&
##2
\\
}
\begin{tabular}
{
#1
}
\hline
#3
&
#4
\\
\hline
}{
\hline
\end{tabular}\end{center}
}
...
...
@@ -182,15 +183,3 @@
\advance\@
tempdima
\leftmargin\makebox
[\@tempdima][l]
{
#1
}}
\newcommand
{
\sectcode
}
[1]
{{
\tt
#1
}}
%%%
%%%\let\orgchapter\chapter
%%%\def\chapter#1{{\let\code\sectcode\orgchapter{#1}}}
%%%\let\orgsection\section
%%%\def\section#1{{\let\code\sectcode\orgsection{#1}}}
%%%\let\orgsubsection\subsection
%%%\def\subsection#1{{\let\code\sectcode\orgsubsection{#1}}}
%%%\let\orgsubsubsection\subsubsection
%%%\def\subsubsection#1{{\let\code\sectcode\orgsubsubsection{#1}}}
%%%\let\orgsubsubsubsection\subsubsubsection
%%%\def\subsubsubsection#1{{\let\code\sectcode\orgsubsubsubsection{#1}}}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment