Good morning,
I am writing technical documentation and I am trying to create a grey area in my document which is dedicated to programming code, to distinguish it from the explanatory text. To give an example of the visual aspect, look at the editor’s preview area here on libreoffice Q/A.
In my first attempt I created a paragraph style with a mono font and a gray background. Unfortunately, I found out that, since it’s a paragraph style, at every Enter a new paragraph is started. This leads to a very strange situation when exporting to pdf. In the document, the grey area appears as smooth, but in the pdf, you can see the individual horizontal paragraph lines, separated by a thin white line.
So I went on to create a Frame style. This apparently works, but with a complication. I get automatic capitalization when I don’t want it. Also, the frame is, of course, a frame, so it lives separated from the normal text flow, meaning that I have to click inside it to have the cursor enter the area for editing, and it does not wrap to the other page if it’s too long to fit in.
is there a better way to achieve what I want?