Thread: line numbers
View Single Post
  #22   Report Post  
Posted to microsoft.public.word.docmanagement
Peter T. Daniels Peter T. Daniels is offline
external usenet poster
 
Posts: 3,215
Default line numbers

In the middle of the night, Sociopath Maxey began whining to the
newsgroup that I wasn't acknowledging his messages, so he emailed me a
document that does indeed contain Arabic text, in a right-to-left
section (apparently he failed to read the posting to which he appended
this response), that does indeed contain line numbering in the right
margin. Extending the sample text to more than 4 lines, I found that
it also works with counting every fifth line.

This does not explain, however, why the line numbering does not appear
on screen at all in my actual file within a right-to-left section
containing actual Arabic text, or why when the page is printed, the
line numbers do appear -- printed over the text -- inset from the
right margin.

I experimented with each of these parameters: changing the font from
TNR to the one I was using ("Arabic Typesetting"); line numbering in
This section only; Next page section break instead of Continuous;
narrowing the margins to match those in my document. In each case,
line numbering appears properly in Greg's document and not in my
document.

His document includes the macro for changing section direction, but
the macro does not appear to contain a line number command.

On Nov 2, 1:05*am, "Greg Maxey"
wrote:
Mr. Daniels,

You were the one that posted here claiming it didn't exist. *Where you
blinded by arrogance?

I looked before enabling an Arabic language. *Hopefully my self admitted
ignorance of the world's languages wiil excuse the oversight.

Would you like for me to post a picture for the whole world to see or send
you an example?

Peter T. Daniels wrote:
As usual, when all you have is a hammer, everything looks like a nail


The existence of a "SectionDirection" command within PageSetup
prompted me to look more closely for the option.


In order to make a section read right-to-left, go to Page Setup
Layout second dropdown at the top.


No macro needed.


However, though line numbers are checked, they do not display. (In
fact, they blinked off when I Ok'd the Page Setup Layout change,
though the Line Numbers box was still checked.) So it appears _still_
to be impossible to get line numbers in the right margin with
right-to- left text.


On Nov 1, 7:55 pm, "Greg Maxey"
wrote:
Yes.


If you have an appropriate language enabled (e.g., Arabic (Iraq))
then you can use a macro to set specific section direction. For
example the following macro will display line numbers in the right
margin in secton 1.


Sub ScratchMaco()
ActiveDocument.Sections(1).PageSetup.SectionDirect ion =
wdSectionDirectionRtl
End Sub


Note: If you do not have an appropriate language enabled (I defer to
Mr. Daniels' expertise on what other languages may or may not be
appropriate) or subsequently disable the language then this setting
will suppress the display of line numbering. To restore them you
would need to set the direction back to left to right using:


Sub ScratchMaco()
ActiveDocument.Sections(1).PageSetup.SectionDirect ion =
wdSectionDirectionLtr
End Sub


Peter T. Daniels wrote:
I'm typing a page of Arabic. Is there any way to get the line
numbers to appear in the right margin (i.e., at the beginnings of
the lines)? Setting "mirror margins" doesn't do it.


--
Greg Maxey


See my web sitehttp://gregmaxey.mvps.org
for an eclectic collection of Word Tips.


--
Greg Maxey

See my web sitehttp://gregmaxey.mvps.org
for an eclectic collection of Word Tips.-