At 04:30 09/11/2014 +0100, Andreas Ziegler wrote:
i've got a writer document, where i want to cite code fragments. so i set up a frame template with grey background and a template for the text inside so the lines are numbered. but i've got two problems: 1) i can't have lines without a number, which i need, if a code line doesn't fit in a single line of the document

I'm not sure how you are doing this (your screenshot shows only the appearance, not the structure) so I cannot really comment. But if I apply numbering on the Outline & Numbering tab of the paragraph style, it is paragraphs that are numbered, not lines. This will work if your code text is generally separated by paragraph breaks (inserted by pressing Enter) with your long lines broken by the natural flow of text or by line breaks (inserted by pressing Shift+Enter).

2) i can't assign a description to that listing, because captions do always seem to be *inside* the frame - which looks terribly wrong. so i have the description as a simple text line after the code/listing-frame - which is bad, when i change big parts of the document, because the self-made caption doesn't stick to the code-listing.

That's easier. You are evidently applying a border to the frame. Remove that border and apply it instead using the paragraph style. Then the caption can be inside the (invisible) frame but outside the visible paragraph border and will keep together with frame contents as you edit the material. Your grey background can also be applied to the paragraph or to the frame, so that it extends just to the contents or to the area including the caption - as you prefer.

I trust this helps.

Brian Barker


--
To unsubscribe e-mail to: [email protected]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to