summaryrefslogtreecommitdiff
path: root/sandbox/richard/pythonpoint/pythonpoint.py
diff options
context:
space:
mode:
authorrichard <richard@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2003-06-10 22:29:52 +0000
committerrichard <richard@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2003-06-10 22:29:52 +0000
commit46d27fd0988345162aa05e8c8214fca51757feb4 (patch)
treecce873fe530d8c57978a70758e7c79bf523300a7 /sandbox/richard/pythonpoint/pythonpoint.py
parentc45b2a35a1bb9d6dd7aee710af3713e5f1444cc9 (diff)
downloaddocutils-46d27fd0988345162aa05e8c8214fca51757feb4.tar.gz
patch from Michael Hudson improving layout and tag usage
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@1417 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'sandbox/richard/pythonpoint/pythonpoint.py')
-rw-r--r--sandbox/richard/pythonpoint/pythonpoint.py37
1 files changed, 30 insertions, 7 deletions
diff --git a/sandbox/richard/pythonpoint/pythonpoint.py b/sandbox/richard/pythonpoint/pythonpoint.py
index 00febdd22..d2c0b9418 100644
--- a/sandbox/richard/pythonpoint/pythonpoint.py
+++ b/sandbox/richard/pythonpoint/pythonpoint.py
@@ -52,8 +52,8 @@ class DumbPythonPointFormatter(nodes.NodeVisitor):
name = node.attributes['name']
self.slidenum += 1
self.w('<slide id="Slide%03d" title="%s">\n'
- '<frame x="160" y="72" width="600" height="432" leftmargin="36"'
- 'rightmargin="0">\n'%(self.slidenum, name))
+ '<frame x="90" y="72" width="600" height="432" leftmargin="12"'
+ 'rightmargin="0">\n'%(self.slidenum, name))
def depart_section(self, node):
self.w('</frame>\n</slide>\n')
@@ -65,7 +65,7 @@ class DumbPythonPointFormatter(nodes.NodeVisitor):
self.w('</para>\n')
def visit_paragraph(self, node):
- if not self.suppress_para: self.w('<para>')
+ if not self.suppress_para: self.w('<para style="BodyText">')
def depart_paragraph(self, node):
if not self.suppress_para: self.w('</para>\n')
@@ -113,13 +113,36 @@ class DumbPythonPointFormatter(nodes.NodeVisitor):
self.suppress_para = 0
self.w('</para>\n')
+ def visit_field(self, node):
+ self.w('<para>')
+ def depart_field(self, node):
+ self.w('</para>\n')
+
+ def visit_field_body(self, node):
+ self.suppress_para = 1
+ return
+ def depart_field_body(self, node):
+ self.suppress_para = 0
+
+ def visit_field_list(self, node):
+ return
+ def depart_field_list(self, node):
+ return
+
+ def visit_field_name(self, node):
+ self.w('<b>')
+
+ def depart_field_name(self, node):
+ self.w(':')
+ self.w('</b>')
+
# Literal Block
def visit_literal_block(self, node):
- self.w('<pre>')
+ self.w('<prefmt style="Code">')
self.suppress_para = 1
def depart_literal_block(self, node):
self.suppress_para = 0
- self.w('</pre>\n')
+ self.w('</prefmt>\n')
# Block Quote
def visit_block_quote(self, node):
@@ -224,9 +247,9 @@ class DumbPythonPointFormatter(nodes.NodeVisitor):
pass #raise NotImplementedError, node
def visit_literal(self, node):
- self.w('<tt>')
+ self.w('<div style="Code">')
def depart_literal(self, node):
- self.w('</tt>')
+ self.w('</div>')
def visit_reference(self, node):
attrs = node.attributes