diff options
author | goodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2004-07-29 03:25:30 +0000 |
---|---|---|
committer | goodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2004-07-29 03:25:30 +0000 |
commit | 42995df86af2db6cd9fa67f247b2b07ce2a99470 (patch) | |
tree | 3b047cc6e39df4515e12f1d6e7532bc6b59803e8 /FAQ.txt | |
parent | fdb35a67420389496e9224e5d8f0097e41a449f3 (diff) | |
download | docutils-42995df86af2db6cd9fa67f247b2b07ce2a99470.tar.gz |
updated
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2503 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'FAQ.txt')
-rw-r--r-- | FAQ.txt | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -588,6 +588,26 @@ first asterisk, like this:: Escaping the second asterisk doesn't hurt, but it isn't necessary. +How can I make a literal block with *some* formatting? +------------------------------------------------------ + +Use the `parsed-literal`_ directive. + +.. _parsed-literal: docs/ref/rst/directives.html#parsed-literal + +Scenario: a document contains some source code, which calls for a +literal block to preserve linebreaks and whitespace. But part of the +source code should be formatted, for example as emphasis or as a +hyperlink. This calls for a *parsed* literal block:: + + .. parsed-literal:: + + print "Hello world!" # *tricky* code [1]_ + +The emphasis (``*tricky*``) and footnote reference (``[1]_``) will be +parsed. + + HTML Writer =========== |