Issue #541 open

Captions for literalinclude

Vinay Sajip avatarVinay Sajip created an issue

I wanted to have pre- and post-captions for literalinclude as described in this post,

and I have implemented a proof-of-concept as per attached diff.

There's still some work to do on setting up the CSS with good defaults; however, I'd first like to know if this is likely to be the right way to do it. The implementation can perhaps be improved.

Comments (7)

  1. Vinay Sajip

    Added screenshot fragment to show how rendered captions might look, for the ReST fragment

    .. literalinclude:: examples/example.txt
       :precaption: My precaption
       :postcaption: My postcaption
  2. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.