Sarah
Sarah

Reputation: 703

Line spacing issue when using restructured text line blocks

I am using RST styling to generate a PDF using rst2pdf. Sometimes I have content that needs to span multiple lines. I can't seem to figure out how to do this with line blocks because the spacing is way off. Does anyone know how to fix the line spacing or another way to do this?

RST file:

* I am a good a paragraph with normal spacing. I am a good a paragraph with normal spacing. I am a good a paragraph with normal spacing. I am a good a paragraph with normal spacing. 
|    Why is the spacing
|    so far apart
|    for these other lines?
|    Help!

Result: line spacing issue

Upvotes: 0

Views: 638

Answers (1)

Sarah
Sarah

Reputation: 703

I was able to fix this by applying a style to my line block.

style

  spacing:
    parent: bodytext
    spaceAfter: 0
    spaceBefore: 0

code

* I am a good a paragraph with normal spacing. I am a good a paragraph with normal spacing. I am a good a paragraph with normal spacing. I am a good a paragraph with normal spacing. 
.. class:: spacing

    |    Why is the spacing
    |    so far apart
    |    for these other lines?
    |    Help!

result enter image description here

Upvotes: 0

Related Questions