File: Sentences.py

package info (click to toggle)
plastex 3.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,132 kB
  • sloc: python: 23,341; xml: 18,076; javascript: 7,755; ansic: 46; makefile: 40; sh: 26
file content (100 lines) | stat: -rw-r--r-- 1,260 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
"""
C.3.1 Making Sentences (p170)

"""

from plasTeX import Command, Environment


#
# Quotes
#
# '          Apostrophe
# `text'     Single quotes
# ``text''   Double quotes

#
# Dashes
#
# -      Intra-word
# --     Number-range
# ---    Punctuation

#
# Spacing
#

class SmallSpace(Command):
    macroName = ','
    str = '\u2009'

class InterWordSpace(Command):
    macroName = ' '
    str = '\u0020'

class NoLineBreak(Command):
    macroName = 'active::~'
    str = '\u00A0'

class EndOfSentence(Command):
    macroName = '@'
    str = ''

#
# Special characters
#

class Dollar(Command):
    macroName = '$'
    str = '$'

class Percent(Command):
    macroName = '%'
    str = '%'

class LeftBrace(Command):
    macroName = '{'
    str = '{'

class Underscore(Command):
    macroName = '_'
    str = '_'

class Ampersand(Command):
    macroName = '&'
    str = '&'

class HashMark(Command):
    macroName = '#'
    str = '#'

class RightBrace(Command):
    macroName = '}'
    str = '}'

#
# Logos
#

class LaTeX(Command):
    pass

class TeX(Command):
    pass

#
# Misc
#

class emph(Command):
    args = 'self'

class em(Environment):
    pass
    
class textsubscript(Command):
     args = 'self'
 
class textsuperscript(Command):
    args = 'self'