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
7760cdea
Kaydet (Commit)
7760cdea
authored
Mar 17, 1995
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
recognize more latex commands; add obindex
üst
e83e3809
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
8 deletions
+44
-8
partparse.py
Doc/partparse.py
+22
-4
partparse.py
Doc/tools/partparse.py
+22
-4
No files found.
Doc/partparse.py
Dosyayı görüntüle @
7760cdea
...
...
@@ -857,9 +857,9 @@ class Wobj:
# ignore these commands
ignoredcommands
=
(
'bcode'
,
'ecode'
)
# map commands like these to themselves as plaintext
wordsselves
=
(
'UNIX'
,
'ABC'
,
'C'
,
'ASCII'
,
'EOF'
)
wordsselves
=
(
'UNIX'
,
'ABC'
,
'C'
,
'ASCII'
,
'EOF'
,
'LaTeX'
)
# \{ --> {, \} --> }, etc
themselves
=
(
'{'
,
'}'
,
'.'
,
'@'
)
+
wordsselves
themselves
=
(
'{'
,
'}'
,
'.'
,
'@'
,
' '
,
'
\n
'
)
+
wordsselves
# these ones also themselves (see argargs macro in myformat.sty)
inargsselves
=
(
','
,
'['
,
']'
,
'('
,
')'
)
# this is how *I* would show the difference between emph and strong
...
...
@@ -871,8 +871,8 @@ markcmds = {'code': ('', ''), 'var': 1, 'emph': ('_', '_'), \
fontchanges
=
{
'rm'
:
'r'
,
'it'
:
'i'
,
'em'
:
'emph'
,
'bf'
:
'b'
,
'tt'
:
't'
}
# transparent for these commands
for_texi
=
(
'emph'
,
'var'
,
'strong'
,
'code'
,
'kbd'
,
'key'
,
'dfn'
,
'samp'
,
\
'r'
,
'i'
,
't'
)
for_texi
=
(
'emph'
,
'var'
,
'strong'
,
'code'
,
'kbd'
,
'key'
,
'dfn'
,
'samp'
,
'file'
,
'r'
,
'i'
,
't'
)
# try to remove macros and return flat text
...
...
@@ -1759,6 +1759,24 @@ def changeit(buf, pp):
length
,
i
=
length
+
1
,
i
+
1
elif
s
(
buf
,
ch
.
data
)
==
'obindex'
:
ch
.
chtype
=
chunk_type
(
CSLINE
)
ch
.
data
=
'findex'
length
,
newi
=
getnextarg
(
length
,
buf
,
pp
,
i
)
ingroupch
=
pp
[
i
:
newi
]
del
pp
[
i
:
newi
]
length
=
length
-
(
newi
-
i
)
ingroupch
.
append
(
chunk
(
PLAIN
,
ch
.
where
,
' '
))
ingroupch
.
append
(
chunk
(
CSNAME
,
ch
.
where
,
'r'
))
ingroupch
.
append
(
chunk
(
GROUP
,
ch
.
where
,
[
\
chunk
(
PLAIN
,
ch
.
where
,
\
'(object)'
)]))
pp
.
insert
(
i
,
chunk
(
GROUP
,
ch
.
where
,
ingroupch
))
length
,
i
=
length
+
1
,
i
+
1
elif
s
(
buf
,
ch
.
data
)
==
'opindex'
:
ch
.
chtype
=
chunk_type
(
CSLINE
)
ch
.
data
=
'findex'
...
...
Doc/tools/partparse.py
Dosyayı görüntüle @
7760cdea
...
...
@@ -857,9 +857,9 @@ class Wobj:
# ignore these commands
ignoredcommands
=
(
'bcode'
,
'ecode'
)
# map commands like these to themselves as plaintext
wordsselves
=
(
'UNIX'
,
'ABC'
,
'C'
,
'ASCII'
,
'EOF'
)
wordsselves
=
(
'UNIX'
,
'ABC'
,
'C'
,
'ASCII'
,
'EOF'
,
'LaTeX'
)
# \{ --> {, \} --> }, etc
themselves
=
(
'{'
,
'}'
,
'.'
,
'@'
)
+
wordsselves
themselves
=
(
'{'
,
'}'
,
'.'
,
'@'
,
' '
,
'
\n
'
)
+
wordsselves
# these ones also themselves (see argargs macro in myformat.sty)
inargsselves
=
(
','
,
'['
,
']'
,
'('
,
')'
)
# this is how *I* would show the difference between emph and strong
...
...
@@ -871,8 +871,8 @@ markcmds = {'code': ('', ''), 'var': 1, 'emph': ('_', '_'), \
fontchanges
=
{
'rm'
:
'r'
,
'it'
:
'i'
,
'em'
:
'emph'
,
'bf'
:
'b'
,
'tt'
:
't'
}
# transparent for these commands
for_texi
=
(
'emph'
,
'var'
,
'strong'
,
'code'
,
'kbd'
,
'key'
,
'dfn'
,
'samp'
,
\
'r'
,
'i'
,
't'
)
for_texi
=
(
'emph'
,
'var'
,
'strong'
,
'code'
,
'kbd'
,
'key'
,
'dfn'
,
'samp'
,
'file'
,
'r'
,
'i'
,
't'
)
# try to remove macros and return flat text
...
...
@@ -1759,6 +1759,24 @@ def changeit(buf, pp):
length
,
i
=
length
+
1
,
i
+
1
elif
s
(
buf
,
ch
.
data
)
==
'obindex'
:
ch
.
chtype
=
chunk_type
(
CSLINE
)
ch
.
data
=
'findex'
length
,
newi
=
getnextarg
(
length
,
buf
,
pp
,
i
)
ingroupch
=
pp
[
i
:
newi
]
del
pp
[
i
:
newi
]
length
=
length
-
(
newi
-
i
)
ingroupch
.
append
(
chunk
(
PLAIN
,
ch
.
where
,
' '
))
ingroupch
.
append
(
chunk
(
CSNAME
,
ch
.
where
,
'r'
))
ingroupch
.
append
(
chunk
(
GROUP
,
ch
.
where
,
[
\
chunk
(
PLAIN
,
ch
.
where
,
\
'(object)'
)]))
pp
.
insert
(
i
,
chunk
(
GROUP
,
ch
.
where
,
ingroupch
))
length
,
i
=
length
+
1
,
i
+
1
elif
s
(
buf
,
ch
.
data
)
==
'opindex'
:
ch
.
chtype
=
chunk_type
(
CSLINE
)
ch
.
data
=
'findex'
...
...
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