diff options
| author | goodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2004-04-18 01:57:01 +0000 |
|---|---|---|
| committer | goodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2004-04-18 01:57:01 +0000 |
| commit | ee66a5ca1279d52bd40c431671905d3838f0f20f (patch) | |
| tree | a64477d501cedf7f0e63758008308765a6de714e /docs/dev/rst | |
| parent | 5ce1011f520060770e231a3924fd7017a1d20f82 (diff) | |
| download | docutils-ee66a5ca1279d52bd40c431671905d3838f0f20f.tar.gz | |
Added "Syntax for Interpreted Text Role Bindings" section
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@1963 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docs/dev/rst')
| -rw-r--r-- | docs/dev/rst/alternatives.txt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/docs/dev/rst/alternatives.txt b/docs/dev/rst/alternatives.txt index 9d72b296d..d859e83cf 100644 --- a/docs/dev/rst/alternatives.txt +++ b/docs/dev/rst/alternatives.txt @@ -265,6 +265,38 @@ desire *not* to use it unless absolutely necessary. It's a matter of finding the right balance. +Syntax for Interpreted Text Role Bindings +----------------------------------------- + +The following syntax (idea from Jeffrey C. Jacobs) could be used to +associate directives with roles. + + .. :rewrite: class:: rewrite + + `She wore ribbons in her hair and it lay with streaks of + grey`:rewrite: + +The syntax is similar to that of substitution declarations, and the +directive/role association may resolve implementation issues. The +semantics, ramifications, and implementation details would need to be +worked out. + +The example above would implement the "rewrite" role as adding a +``class="rewrite"`` attribute to the interpreted text ("inline" +element). The stylesheet would then pick up on the "class" attribute +to do the actual formatting. + +The advantage of the new syntax would be flexibility. Uses other than +"class" may present themselves. The disadvantage is complexity: +having to implement new syntax for a relatively specialized operation, +and having new semantics in existing directives ("class::" would do +something different). + +The `"role" directive`__ has been implemented. + +__ http://docutils.sf.net/spec/rst/directives.html#role + + Character Processing -------------------- |
