I'm putting together a document containing some code snippets. The way I'm doing this is to have a style called code with a monospaced font. This style has to have no spacing between paragraphs, however this means that at the end of code blocks when returning to the the normal style I end up with something like the example shown below.
To get around this I either: a) put a new line after each codeblock in a 5pt font or b) have a second style called code last line that has a break after a paragraph, and select that style for the last line of every code snippet. Can anyone recommend a more elegant solution?
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
int main(){
cout << "Hello world";
return(0);
}
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.