robert wrote:
> On Saturday 20 January 2007 09:19, Oliver Hader wrote:
>> Hi!
>>
>> The Situation:
>> If have regular text sections describing some kind of software. In some
>> cases it is necessary to provide some lines of source-code (such as Java
>> or PHP). Sometimes it is also required to reference from the regular
>> text secitions to a certain line of such a source-code-box (e.g. "as you
>> can see in line 14 of the code-section...").
>>
>> The problem:
>> I'm looking for a solution to have automatically shown line numbers for
>> the source-code-sections. Tools>Line Numbering offers a possibility to
>> do this for the whole document and I can reduce this to selected
>> sections, but these line numbers appear very left to the section - but
>> I'd like to have them inside a given section that is styled with a
>> border, background, etc.
>>
>> Any hints on that? Thanks in advance to everyone for some feedback!
>>
>>
>> olly
> 
> You could try using a list style and assign it to a paragraph style. That 
> would give you lots of control where the line numbers appear (at least on the 
> left side, which is what you want), unlike the line numbering tool. The 
> downside is each paragraph, not line, would be numbered. For source code, 
> though, this shouldn't be a big issue.

Thanks Robert, I had something similar in mind. You're approach works!
It doesn't matter that each newline is in fact a new paragraph.

But one thing is left I couldn't handle yet. The first section showing
some source code is correctly numbered from e.g. 1 to 30, then some
lines of regular text follow and afterwards there is another block with
source code. But this one continues numbering from 31 instead of
restarting from 1. I have not found any possibility yet to set a
property to restart this counter...

Any hints? Thanks!


olly
-- 
Oliver Hader
http://inpublica.de/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to