[Zope-Checkins] CVS: Zope/doc - RESTRUCTUREDSTEXT.txt:1.2
Andreas Jung
andreas@andreas-jung.com
Sat, 1 Feb 2003 04:29:44 -0500
Update of /cvs-repository/Zope/doc
In directory cvs.zope.org:/tmp/cvs-serv20898
Added Files:
RESTRUCTUREDSTEXT.txt
Log Message:
merge from ajung-restructuredtext-integration-branch
=== Zope/doc/RESTRUCTUREDSTEXT.txt 1.1 => 1.2 ===
--- /dev/null Sat Feb 1 04:29:43 2003
+++ Zope/doc/RESTRUCTUREDSTEXT.txt Sat Feb 1 04:29:41 2003
@@ -0,0 +1,50 @@
+Integration of reStructuredText (reST) in Zope:
+
+Zope 2.7 or higher integrates reST as part of the Python
+docutils package. The syntax of reST is defined under
+
+ http://docutils.sf.net/spec/rst/introduction.html
+
+
+Usage inside DTML:
+
+ <dtml-var rest-document fmt="restructured-text">
+
+
+Usage inside ZPT:
+
+ <span tal:content="structure python: modules['Products.PythonScripts.standard'].restructured_test(rest_txt)" />
+
+
+Usage inside PythonScripts:
+
+ from Products.PythonScripts.standard import restructured_text
+
+ rendered_html = restructured_test(rest_txt)
+ return rendered_html
+
+
+Usage inside Zope products:
+
+ from reStructuredText import HTML
+ rendered_html = HTML(rest_txt)
+ ...
+
+Character set issues:
+
+ reST processes the reST document internally using unicode. A reST
+ document is converted using Pythons default encoding to unicode and
+ converted back from unicode to the default encoding on the output side.
+ This means you must ensure that Python default encoding is properly.
+
+ You can customize the default encoding by creating a file sitecustomize.py
+ somewhere in yout PYTHONPATH:
+
+ import sys
+ sys.setdefaultencoding("iso-8859-1")
+
+
+
+This version of Zope also includes the ZReST product written by Richard Jones.
+ZRest is a standalone Zope product to handle reStructuredText documents.
+