esreveR

Everything related to our flagship word processor.
User avatar
useeger
Posts: 89
Joined: 2004-06-28 00:03:01
Location: Germany

esreveR

Post by useeger »

I really miss the esreveR-command from NisusWriter Classic. It enabled me to write Latin text from right to left. Is there any workaround to do this task in NisusWriter Pro?

The “Reverse characters” macro is no solution. If I apply the macro for example to

one two three four five six seven eight nine ten eleven
twelve thirteen fourteen fifteen sixteen seventeen
eighteen nineteen twenty

(written as continous text without line breaks)
I get

ytnewt neetenin neethgie neetneves neetxis neetfif
neetruof neetriht evlewt nevele net enin thgie neves xis
evif ruof eerht owt eno

This is not what I want. I want:

nevele net enin thgie neves xis evif ruof eerht owt eno
neetneves neetxis neetfif neetruof neetriht evlewt
ytnewt neetenin neethgie
(right justified)

Thanks for help (it is not a gimmick, I really need it for a scientific work)

Ulrich
User avatar
martin
Official Nisus Person
Posts: 5227
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: esreveR

Post by martin »

Hi Ulrich- there isn't any such feature/style in NWP, sorry. It's unlikely we'll add such a feature, since it isn't really something that's needed much these days.

As I understand it, the Classic reverse style was useful back then so one could use fonts that weren't really right-to-left aware. But now that we have Unicode fonts and proper right-to-left layout, I'm not sure I understand why one would need a reverse style. What are you doing exactly?

Well, in any case, I think one could write a macro that produced the kind of reversed output you desire, but it would be fragile. It would have to inspect the current line wraps, so if you edited the text (or margins, formatting, etc) you'd have a real mess on your hands. If you're interested in such a macro, please let me know.
User avatar
useeger
Posts: 89
Joined: 2004-06-28 00:03:01
Location: Germany

Re: esreveR

Post by useeger »

Hi Martin, In the 90s I prepared the layout for a book which contained a complete inventory of the Aramaic inscriptions found in the ancient desert city of Hatra, now in northern Iraq. You can have a look at a sample of the book at
http://rabe.macbay.de/hatra/

The structure of the book is very easy: First you have an inscription in the original Hatra script, a right to left Aramaic writing. Afterwards a transcription of the text as he was presumably pronounced. Finally a German translation.

In the pre-Unicode times I myself have designed all the fonts used in the book. I am not a font designer or programmer, I am only a linguist, therefore I designed the font for the original Hatra script as a Latin font and made the input by using the esreveR-format tool of NisusWriter Classic.

Now, in the past 15 years a lot of new inscriptions have been found in Hatra and the author wants to publish a second volume which looks exactly as the first one. All my fonts still work in MacOS X and NisusWriter Pro. But I have a serious input-problem for the original Hatra script. Note also, how the original text is justified.

The Hatra script is not part of Unicode, there is even no other font for it than the one I have designed, it is unique.

So, I hope you understand my problem now.
Greetings from Germany
Ulrich
User avatar
Elbrecht
Posts: 354
Joined: 2007-03-31 14:59:22
Location: Frankfurt, Germany

Re: esreveR

Post by Elbrecht »

Ulrich -

you should transfer your old Latin font to Unicode - there is a PrivateUseArea for glyphs not [yet] encoded officially.

But then the official Unicode mailing list has this:

# # #

On 21 Jan 2010, at 22:09, Raymond Mercier wrote:

> Although I am not sure why you would chose " Palmyrene"
> particularly, since it is on a par with Nabataean and Hatra, and of
> course there are even striking similarities with the familiar square
> Hebrew.

because we will be doing Nabataean and Hatran later. (Have you
information on Hatran? It's hard to find.) Nabataean and Palmyrene
at least have shaping properties which are unique to each.

Michael Everson * http://www.evertype.com/

# # #

So it looks like Michael Everson is heading for Hatran - join him to UNIcode Hatran.
Then you can easily assign to your font glyphs the UNIcodes & you are done with it.
Get it straight - don't esreveR anymore.

HE
MacBook Pro i5
SSD 840/850 Pro
High Sierra 10.13.6
Nisus Writer Pro 3.4
Kino
Posts: 400
Joined: 2008-05-17 04:02:32

Re: esreveR

Post by Kino »

Select some text portion(s), for examaple,
useeger wrote:one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen nineteen twenty
and run the following macro:

Code: Select all

 $R2L = Text.newWithCodepoint 0x202E # RIGHT-TO-LEFT OVERRIDE
$POP = Text.newWithCodepoint 0x202C # POP DIRECTIONAL FORMATTING
$doc = Document.active
if $doc == undefined
	exit 'No open document, exiting...'
end

$sels = $doc.textSelections
if ! $sels.firstValue.length
	exit 'There is no visible selection, exiting...'
end

foreach $sel in reversed $sels
	$doc.setSelection $sel
	Menu ':Format:Paragraph:Align Right'
	$sel.text.insertAtIndex $sel.bound, $POP
	$sel.text.insertAtIndex $sel.location, $R2L
end
Hope this work for you.
User avatar
useeger
Posts: 89
Joined: 2004-06-28 00:03:01
Location: Germany

Re: esreveR

Post by useeger »

Kino, you are great!

Your macro solves my problem. Concerning “Format:Paragraph” I had to make some small changes (German system and program language) and additions (Right to left Direction; Align justified) so that it comes out perfect.

Thank you very much!

@HL: Very interesting! I will contact Michael Everson. But for my problem it is not a solution, because the second volume should look exactly like the first one and these Unicode guys will for sure not use my amateurish glyphs.
User avatar
Elbrecht
Posts: 354
Joined: 2007-03-31 14:59:22
Location: Frankfurt, Germany

Re: esreveR

Post by Elbrecht »

Yes -

Kino's great macros will do for you today, to create volume 2 the way volume 1 was done - but both volumes will survive as printed media only then. In future times only Unicode data will survive - if at all. That's why I would urge you to UNIcode volume 2 - help Michael Everson with Hatran and he will assign you the UNIcodes for YOUR identical glyphs. You just open your Hatran font in Fontographer maybe, enter the UNIcodes to each of your glyphs and Save your font - then you can do your volume 2 in Unicode. And there are macros to transfer old pre-Unicode documents to Unicode, so you can UNIcode your volume 1 as well. That's the way to go!

HE
Last edited by Elbrecht on 2012-08-15 00:46:04, edited 1 time in total.
MacBook Pro i5
SSD 840/850 Pro
High Sierra 10.13.6
Nisus Writer Pro 3.4
Kino
Posts: 400
Joined: 2008-05-17 04:02:32

Re: esreveR

Post by Kino »

useeger wrote:Concerning “Format:Paragraph” I had to make some small changes (German system and program language) and additions (Right to left Direction; Align justified) so that it comes out perfect.
Yeah, I made a mistake in the macro above: 'Align Right' should have been 'Right to Left Direction'. And, as you noticed, applying 'Right to Left Direction' seems to affect the text alignment (I just sent them a feedback about this behaviour).

Oh! and I should have posted another macro which restores the original state. Before running it, please select text portion(s) containing paragraphs in esreveR style.

Code: Select all

Menu ':Format:Paragraph:Natural Writing Direction'
# Menu ':Format:Natürliche Schreibrichtung' # in German interface, I think
Replace All in Selection '\x{202E}|\x{202C}', '', 'E'
User avatar
useeger
Posts: 89
Joined: 2004-06-28 00:03:01
Location: Germany

Re: esreveR

Post by useeger »

Hi Kino,

with
Format:Absatz:Natürliche Schreibrichtung
it works perfect.

It’s unbelieveable: Only one short line of code!

But ... do I need it ... (?)

Anyway: Thanks!

... and greetings from Germany
Ulrich
User avatar
useeger
Posts: 89
Joined: 2004-06-28 00:03:01
Location: Germany

Re: esreveR

Post by useeger »

Hi HE,

Michael Everson already answered to my mail. Yes, he is interested.

But I think, you are too enthusiastic about Unicode. Look at my Beyrut-font, which I designed for the transcription of the Hatra inscriptions: A lot of the glyphs are not part of Unicode as a single entity but can only be obtained by combining signs. And these combined signs may look good in one application, but bad in another one. The looking depends on the application, the font and the style used. Sometimes it's a typographical disaster.

In Arabic dialectology we use for example often a "d" with a line under and a dot under the line: ḏ̣. It's not in Unicode as a single entity. After a lot of tests, I found, that only with NisusWriter and the Unicode font "Charis SIL" it always looks good. So Unicode does us not make independent from certain fonts or Word processors.

So much glyphs are missing in Unicode. Did you know, that even the Small Capital Q is until now not part of Unicode? In scientific publications we are used to write author names in Small Caps. So we can’t use a Unicode font for publication if we don’t want fake Small Caps and we have to modify existing fonts for our needs. That’s the same situation as in the pre-Unicode times.

PDF with embedded fonts is still the best way for publications to survive digitally.

Greetings
Ulrich
User avatar
Elbrecht
Posts: 354
Joined: 2007-03-31 14:59:22
Location: Frankfurt, Germany

Re: esreveR

Post by Elbrecht »

Well Ulrich -

you're right with the trouble all linguists have with Unicode - but without Unicode who is to help you/us? Who in the world is supporting "esreveR" - not even Nisus anymore. Kino takes good care of us - to be true & thanks a lot!

But the point is to get UNIcoded - all else can be done/hacked therewith then. So to avoid typographical disaster you could help yourself/others with OpenType features & using PrivateUseArea characters for missing/ugly Unicode slots etc. For "myTTFont" I did the "d with macron below dot below" and I have true SC of all this as well - just hacking a "MyFont SC OSF" into "MyFont Family" instead of the ugly & of no typographical use "BoldItalic" - that way with "CMD-B" & "CMD-I" even all HATRAN transliterations would turn into SC. Yes this all displays fine with MyFont only, but I can make PDFs for print and can handle the file in NWP as elegant as thinkable in times to come - just because all is done in UNICODE. For 10 years now I didn't do any non-Unicode files anymore - they are (for print & the) trash. Think it over…

Good luck to you!
HE

Image
MacBook Pro i5
SSD 840/850 Pro
High Sierra 10.13.6
Nisus Writer Pro 3.4
Kino
Posts: 400
Joined: 2008-05-17 04:02:32

Re: esreveR

Post by Kino »

There seems to be some confusion…
Elbrecht wrote:Who in the world is supporting "esreveR"
Unicode does support the esreveR style or what can be called so. The macros above just insert or remove Unicode formatting codes available since Unicode 3.0 at least, for over 10 years now. See “Unicode Bidirectional Algorithm”. So this method is robust enough and should continue to work as far as Cocoa Text engine supports Unicode.

I macroized that Unicode feature just because it is difficult to manipulate those invisible zero-width characters manually.

Personally I think Ulrich’s solution is very practical and it would not be a good idea to waste time in trying to assign characters in his Hatra font to codepoints in Private Use Area. Or do you know how to give the right-to-left directionality to characters in Private Use Area? If not (and I don’t know), you will still need the esreveR style.
User avatar
Elbrecht
Posts: 354
Joined: 2007-03-31 14:59:22
Location: Frankfurt, Germany

Re: esreveR

Post by Elbrecht »

Hi Kino -

you know bi-directionality is not my cup of tea - but I just assigned "RTL mark 200F" and "LTR mark 200E" to a Latin TTF of mine and therewith I can change - "RTL/LTR/RTL" - writing directions in Arabic Language. And experimenting a bit with "RTL override 202E" and "LTR override 202D" I truly can enter my Latin PUA characters "RTL" - as blindly guessed in my previous messages. There definitely must be a way to do HATRAN in Unicode just straight ahead - assigning UNIcodes and/or PUA for glyphs is easily done. Linguists get frustrated far too easily - I found out over the years - they just love staying back in pre-Unicode times they know…

HE

PS: Yes, and there are "POP directional formatting 202C" & "RTL embedding 202B" & "LTR embedding 202A" …

Download: http://elbrecht.com/LTRTL.zip & http://elbrecht.com/LTRTL.pdf
Last edited by Elbrecht on 2012-08-16 03:35:45, edited 1 time in total.
MacBook Pro i5
SSD 840/850 Pro
High Sierra 10.13.6
Nisus Writer Pro 3.4
User avatar
useeger
Posts: 89
Joined: 2004-06-28 00:03:01
Location: Germany

Re: esreveR

Post by useeger »

Kino wrote: Personally I think Ulrich’s solution is very practical and it would not be a good idea to waste time in trying to assign characters in his Hatra font to codepoints in Private Use Area. Or do you know how to give the right-to-left directionality to characters in Private Use Area? If not (and I don’t know), you will still need the esreveR style.
Kino, you hit the nail on the head. But in one point I must disagree: Your macro-solution is the best under the given circumstances, but it is far away from beeing "very practical". Imagine that you have to write an English text from right to left and then take it with a macro in the correct order. Is that practical?

Elbrecht wrote: Linguists get frustrated far too easily - I found out over the years - they just love staying back in pre-Unicode times they know…
No, this is not fair. 7 years ago I first tried to switch to MacOS X and Unicode. And I did my best to make use of the new technologies, have a look at
http://semitistik.uni-hd.de/seeger_semicode_en.html
But every time I start a large project with NW Pro+UC, I get stuck.

Life was so easy in former times with NW Classic, the fantastic Find/Replace-tool, the mighty macro language, that also an amateurish programmer like me could use, and the selfmade fontographer fonts - I had the feeling of being omnipotent. I layouted innumerable articles, 8 books, one of it, a 900 pages festschrift with 60 contributers containing a lot of phonetic transcription, Arabic, Hebrew, Syrian Estrangela, Syrian Serto, Hatra, Sabaic, Amharic, Greek, Russian and some illustrations. It was easy then, nowadays everything became so complicated. I've really made great efforts to understand the new technologies and to use them, but perhaps I am old now and have lost the plot.

So, let's see what will happen with the second volume of Hatra ...

Anyway, many thanks to everyone for help and advice!
Ulrich
User avatar
Elbrecht
Posts: 354
Joined: 2007-03-31 14:59:22
Location: Frankfurt, Germany

Re: esreveR

Post by Elbrecht »

Hi Ulrich -

never mind, I didn't want to be un-fair to you or any other linguist. That's just the experience I have with linguists asking for Mac support for the TITUS font - believe me, it is even easier to do multie-cultie layout these days. Just get a new Fontographer, open your Hatra font and add the UNIcodes - the officially assigned ones you get at: http://www.unicode.org - all else you add to PUA: E000 through F8FF - TITUS uses E000 thru EFFF, but you are free to use whatever you like to for your project. And as shown before: adding SEVEN RTL & LTL formatting characters with just no glyph & zero width will let you write esreveR like writing French - OK you have to modify your keyboard with SIL Ukelele http://scripts.sil.org/cms/scripts/page ... id=ukelele to enter the special characters - but easily done too! BTW I did my above experiment by entering via PopChar - a nice tool I helped to get Unicode ready years ago… Good luck to you!

Von wegen heilig - offene Weite…

HE
Last edited by Elbrecht on 2012-08-17 03:35:38, edited 1 time in total.
MacBook Pro i5
SSD 840/850 Pro
High Sierra 10.13.6
Nisus Writer Pro 3.4
Post Reply