Page 1 of 1

Reversing Paragraph Line

Posted: 2022-03-30 12:42:49
by Daniel Siegel
I have a Hebrew paragraph where the first line is really the last and so on through the paragraph. Is there a macro or some other way to reverse these lines so that what is now the first becomes the last and so on for each line? The macros I have don't do that. I've got the words themselves going from right to left.

Re: Reversing Paragraph Line

Posted: 2022-03-30 13:30:37
by phspaelti
I'm a bit wary of such problems. It's certainly possible to write macros that rearrange text any way you want.
The important goal is that the right to left order should be achieved by the font/script. You want the logical order of the characters to be the same as it would be for a left-to-right language.
So the questions:
  • The characters of the text are in a regular Unicode font?
  • The characters on each line display correctly, you say?
  • How are the lines connected? Is there some kind of hard return? Or, if you move the cursor left over the end of the line, do you move to the line above?
Note if the answer to that last question is yes, then the text is in logical order and there should be no need to reorder the lines at all. The question becomes, why do they display bottom to top?

Note that in this last case, you should be able to copy the text as plain text and paste it into a paragraph with regular Hebrew formatting, at which point it should display normally. (All of this advice comes from someone who does not use right-to-left languages.)

Re: Reversing Paragraph Line

Posted: 2022-03-31 11:58:25
by Daniel Siegel
Thanks for your response, Philip. I realized that you were pointing out complexities that I hadn't really thought through and it turns out that the best way to get the text in proper order was to do it manually. So I think my question is answered for now.