RTF and paragraph numbers

General TRichView support forum. Please post your questions here
Post Reply
mboth
Posts: 26
Joined: Thu Nov 26, 2009 10:48 am
Location: Hannover, Germany.

RTF and paragraph numbers

Post by mboth »

Greetings Sergey and all,

paragrpahs with numbering result in RTF in

number<tab>text

The tab is, at least, choosen by MS Word as a separator. Is there a way to change that? For centered headings, a tab character is most likely not what you want, instread, a single space would be good.

Moritz

(TRichView 12.1)
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Why not tab?
In centered paragraphs, widths of tabs are calculated as if this is a left-aligned paragraph. I.e., if the distance between the number and the text is 1 cm in a left-aligned paragraph, it still will be 1 cm if you apply center or right alignment.
mboth
Posts: 26
Joined: Thu Nov 26, 2009 10:48 am
Location: Hannover, Germany.

Post by mboth »

Sergey Tkachenko wrote:Why not tab?
Because in centered paragraphs, it may be desirable to get equal spacing between any paragraph number and the text, regardless of the width of the number.

Code: Select all

                    1 Terms of use
                     21 Liability
                    104 Termination
would be good and it can be accomplished in TRichView already by specifying no indents for the numbering but insert a trailing space character in the number format. Still in the RTF output you get

Code: Select all

                   1   Terms of use
                    21  Liability
                    104 Termination
Note the additional spacing between number and text.
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

It can be implemented simpler: by aligning list marker to the right.
In RichViewActions, in the numbering customization dialog, select in "Number position": <align right> at <N>, where <N> - distance from the left margin to the right side of the number (assuming that the paragraph is left-aligned).
In code, these properties are:
- MarkerAlignment: http://www.trichview.com/help/idh_trvli ... nment.html
- MarkerIndent: http://www.trichview.com/help/idh_trvli ... ndent.html
Image
mboth
Posts: 26
Joined: Thu Nov 26, 2009 10:48 am
Location: Hannover, Germany.

Post by mboth »

That worked for us, thank you!
Moritz
Post Reply