01379: Problems with rtl class

Summary: Problems with rtl class
Created: 2016-02-11 08:49
Status: Discussion
Category: Bug
From: Frank
Assigned:
Priority: 3
Version: 2.2.83
OS: Mac OS 10.7.5

Description: Odd behaviour comparing the ltr class

-> indent text
-< hanging text
'''ltr'''

-> indent text (e.g.)
-< hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.)
-> indent text (e.g.)
normal text (e.g.)
-< hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.)
normal text (e.g.)
>>rtl<<
'''rtl'''

-> نص البادئة (مثال)
-< معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال)
-> نص البادئة (مثال)
نص عادي (مثال)
-< معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال)
نص عادي (مثال)
>><<

ltr

indent text (e.g.)
hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.)
indent text (e.g.)

normal text (e.g.)

hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.) hanging text (e.g.)

normal text (e.g.)

rtl

نص البادئة (مثال)
معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال)
نص البادئة (مثال)

نص عادي (مثال)

معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال) معلقة نص البادئة (مثال)

نص عادي (مثال)

Frank February 11, 2016, at 08:54 AM

I've made a change to the styles, please confirm if now works as expected. --Petko February 11, 2016, at 09:41 AM

Unfortunately, no improvement. Do you think is a problem of my installation? Frank February 11, 2016, at 09:53 PM

No, look at this page here. The new styles are applied. See the second row of the Markup table above. For LTR text it indents and outdents to/from the left, for RTL text it indents and outdents to/from the right. (I don't read Arabic or any other RTL script, so I assumed the problem was with the text flow which went out of the frame in RTL. This should be fixed. If there is another problem, please tell me more.) --Petko February 11, 2016, at 03:41 PM

I have tested all the basic markups of PmWiki (all work as expected, except indent above) and all the recipes that I have installed (few have problems, e.g. postit, sidenote, stickynote, that remain as rfloat).

The main problem for a rtl writer is the complex markups (divisions, conditionals, advanced tables, etc.) although they work well, customizing them is painful because while writing the linear position of the items change.

'''ltr'''

[@(:@]input default name=name value="اسم"[@:)@]

[@(:@]toggle id="1" show="تبين" hide="إخفاء" init=hide button=0 ttshow="تبين" tthide="إخفاء"[@:)@]

[@(:if@] [ name الصفحةاسم and group جماعةاسم ] [@:)@]

[@(:@]pagelist group=جماعة list=normal fmt=#default[@:)@]

>>rtl<<
'''rtl'''

[@(:@]input default name=name value="اسم"[@:)@]

[@(:@]toggle id="1" show="تبين" hide="إخفاء" init=hide button=0 ttshow="تبين" tthide="إخفاء"[@:)@]

[@(:if@] [ name الصفحةاسم and group جماعةاسم ] [@:)@]

[@(:@]pagelist group=جماعة list=normal fmt=#default[@:)@]
>><<

ltr

(:input default name=name value="اسم":)

(:toggle id="1" show="تبين" hide="إخفاء" init=hide button=0 ttshow="تبين" tthide="إخفاء":)

(:if [ name الصفحةاسم and group جماعةاسم ] :)

(:pagelist group=جماعة list=normal fmt=#default:)

rtl

(:input default name=name value="اسم":)

(:toggle id="1" show="تبين" hide="إخفاء" init=hide button=0 ttshow="تبين" tthide="إخفاء":)

(:if [ name الصفحةاسم and group جماعةاسم ] :)

(:pagelist group=جماعة list=normal fmt=#default:)

It happens also with simple markups, even if you do not write any rtl word.

'''ltr'''

[@{{@]*$FullName[@}$Description}@]


[@{(@]math '(2+3) * 7 /4'[@)}@]

>>rtl<<
'''rtl'''

[@{{@]*$FullName[@}$Description}@]

[@{(@]math '(2+3) * 7 /4'[@)}@]
>><<

ltr

{{*$FullName}$Description}

{(math '(2+3) * 7 /4')}

rtl

{{*$FullName}$Description}

{(math '(2+3) * 7 /4')}

In April I hope to put online the alpha-version of my site, so you will see all the markups with rtl writings.

P.S. Secondary issues

#anchor_name (links, includes, templates, fmt= of pagelists, etc.),
id=name/number (divisions, toggles, tables, etc),
name=name (input forms, fox),
file_name.ext (Attach / Mini, video and audio files, etc.)

They work just with names in latin characters (I tested unsuccessfully with arab and greek).

Frank February 13, 2016, at 03:01 AM

Anchors, form element names/ids are defined in the HTML standard and can only have Latin characters, digits, dash, dot, underscore, so no other alphabet, not even accented Latin characters like é, à, ö. Attached files in the default installation only allow Latin characters. You can allow other alphabets, see $UploadNameChars, but your files will probably need at least the extension to be in Latin characters (and I've no idea how this will look). I cannot be of much help as I wouldn't know if something is broken or not when I look at it. Wikipedia has versions in Arabic and Hebrew languages, and the markup share some similarities. Maybe you can investigate how they manage to write markup and make recommendations. Additionally, mixing LTR and RTL texts in the same page is probably not ideal, but you can have different WikiGroups in order to make the whole page RTL, including the edit text form (with a custom skin or with CSS, see GroupCustomizations). Work on this PITS entry cannot advance unless a specific solution is offered and approved by users who can read RTL languages. --Petko February 13, 2016, at 06:15 PM

In fact I'm structuring the site in different groups by language. I checked Wikipedia, but I'm not very satisfied (and not even the Wikipedia users, I’ve noted). I'll keep you up to date on how I'm dealing with this issue. I have got an idea, not at all a brilliant one, but it seems to work.
I have tested the subversion, but the indent - outdent problem still remains. --Frank February 14, 2016, at 06:20 AM

Sorry, I forgot to update the ZIP export from the Subversion reposiory. Please see pmwiki-latest-svn.zip and more precisely get the file scripts/xlpage-utf-8.php which contains the fixes for indent/outdent RTL style. --Petko February 14, 2016, at 02:17 AM

Now it works well. Thank you very much. --Frank February 14, 2016, at 04:24 PM