In reStructuredText, how does one do an 'inline' include of an external document fragment? -
i have bullet lists of hyperlinks articles, each article has one-line summary. and, one-line summary appear in bullet list:
because (1) summaries quite involved, (2) have many articles, , (3) more bullets, i'd put summaries own document fragments , 'include' them in both bullet list , article. but, this not fly in restructuredtext:
* `thing1`_: .. include:: summary-of-thing1.txt * `thing1`_: .. include:: summary-of-thing2.txt
the text .. include:: summary-of-thing1.txt
ends in generated html document, , appears because directives (like .. include::
) must in own 'paragraph' this:
* `thing1`_: .. include: summary-of-thing1.txt
but, doing puts document fragment own paragraph, makes this:
when, want summaries appear on same line hyperlinks.
ok, see .. replace::
for. 1 can this:
* `thing1`_: |summary-of-thing1| * `thing2`_: |summary-of-thing2| .. include:: summaries.txt
and put summaries summaries.txt
this:
.. |summary-of-thing1| replace:: thing. .. |summary-of-thing2| replace:: thing.
Comments
Post a Comment