RTL parentheses
This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
I'm not sure why the plugin would fail in MLZ on you. It works here. I'll have to think about that one.
To confirm, you're getting the "X" and "Y" in Zotero 4.0.8, but the parens are wrongly formatting (reversed)? If so, Word is messing things up on its own, and we'll have to figure out how to apply a hack to work around its broken code in that specific environment.
Needs some more thought, I'll post again when I have more questions.
Yes, parens are reversed in Word.
Totaly agree that testing should be on a normal firefox
installation, and will do so from now on.
Apologies for the mix-up...
Apologies for going of the radar - it's getting quiet
hectic with the all of the end-of-the-year activity...
Any thoughts on how to hack around Word?
I wanted to let you know that I have asked a friend,
Nadav Kavelerchik (open source is his profession),
to look at this bug. Perhaps with his experience in
RTL will open up some new avenues.
He said he'd find some time to look into it.
Thanks,
David
I have my finger on the portion of code where the parens can be forced to reverse, but it will take a little time to work out how to detect the environment.
I spoke with Nadav. He said that there were those problems
traslating OpenOffice, but they were able to fix the code in OO.
That's probabaly the reason it works there.
He wanted to look at the macro but editing was not available to
in Word on my computer.
In any case, he suggested [I'm for sure getting this wrong...]
using the RLE (right to left embedding) hidden code. I assume you
know this but wanted to forward his first suggestions.
Does this help?
In a related, somewhat embarrassing item, I discovered yesterday that the patch plugins I have issued recently have been non-functional. Could you try installing the latest and see if it does anything useful? (It may not, but at least it will be real test of the code this time.)
but I dont get the X/Y near the parens in
Chicago(author-date)-mode. So I'm not sure its
working...
Does this version the prosessor give this output?
Please advise.
Forgot to say that after installing the processor
FF asked to be restarted. But I'd still like to be
sure that it is indeed functioning...
Before I attempt the next fix, I'm musing about the problem of mixed text. See this thread:
https://forums.zotero.org/discussion/30429/?Focus=159443#Comment_159443
The selection of RTL vs LTR on the citation as a whole seems to be the root of the parens-reversal issue. Parens have a "weak" direction attribute, so in running RTL text, the parens will (or at least can) be treated as RTL, while the text they contain is LTR. That would produce the effect we're seeing.
The solution seems be to force each in-text citation, as a whole and including the parens, to be LTR. There are two worries with this approach. One is that the hidden Unicode characters involved might cause unexpected side effects on some systems, or (due to the clutter in the byte stream of the citation) make debugging more cumbersome. The risk there is probably acceptable, at least in MLZ.
The second, more serious worry is with documents containing a mixture of LTR and RTL citations. The thread linked above will be the place for that discussion.
If you could take a look at the thread linked above, and indicate the preferred format for LTR cites in RTL text in your environment, it will help me to get a handle on the requirements. Many thanks!
It seems that this is definetly something impotant to many people.
I'm confused- he doesn't have the same problem with the parens I do.
Is it because he changed the CSL?
I will ask on that thread.
It is indeed important in RTL. I think the issue posted there is with combinig special characters (:) inside the parens. Hoevwver, it looks
like the "correct" logical format for numbers.
Probably the reason I didn't bring it up was because at the moment I
do not have that need in the papers my students write (most citations
are journal articles). So Ididn't test for it.
But perhaps in the future....
I did try just now to add page numbers. Word mangled everthing up,
with LO it worked better but the page numbers are "backwards".
I'll post in the paralell thread to see what he did, and see
how I can reprosuce his results.
Thanks,
Perhaps it is possible to dictate direction via Language setting,
for each citation. Even LTR references with Language set to an RTL
languge could be formated "backward"?
The RTL logic works so that text is right-to-left- but numbers stay left-to-right. So I think the citations have to be formatted really "weird" for it to work.
The RTL languages are problematic for computers (I remember when the
BIOS on PCs had to be flashed to even support RTL characters).
I hope that you can find a solution fo that Word behaves like LO.
In the style try setting:
prefix="(‎"
and
suffix=")‎"
That is, without reversing the parens. If this works (touch wood), we can move on to the ordering issues within the citations themselves.
suffix=")"
don't work.
Sorry for disappearing butI just finished two summer courses
and graded most of the exams/reports.
I tried your last suggestion and got all confused. I'll try
again tonight and let you know.
I've updated the syllabus to the course I teach to include
LibreOffice, just in case we can't get Word working before
Nov/Dec. At least there everything works the way it should.
However, I think it would be more relavant to the students
if they could use Zotero in Word.
Thanks again,
David
1) if I reverse the parens in- suffix=")" to suffix="("
then parens one on the left of the citation is correctly positioned.
2) no matter which parens I used for the prefix "(" or ")" the right-
hand parnes is always misformatted.
It seems wierd that one would work while the second wouldn't.
Well I guess it's half-way?
A couple of questions:
1) I don't know the code you used for the parens from Jun 23. Could
you point me to a reseource with info on these codes?
2) In my tests I used "Replace All" so other things on now all wrong.
Which section in the style file do I need to change?
3) The changes to the style caused the parnes to be the same for Hebrew and English citations. It may sort itself out if we can get
the correct code? If not- is there a way for Zotero to use different
styles (or different sections in the style file) for different
languages?
Sorry for the noob questions.
Thanks,
David
I'm new to Zotero, I tried looking through the code for this problem (I'm a Hebrew user).
I noticed that InvokeHelper() is used for inserting refs.
This function does not pass locale information.
see for example: http://kbalertz.com/246501/Explicit-Locale-Identifier-Automating-Excel-Currency-Formats.aspx
could this be the issue?
I tried loading the project into vs2012 EE, but MFC is not supported.
In what environment is this project developed?
Muchael
Could you post to zotero-dev (a Google group)? You're more likely to attract the attention of the core devs in that forum (Simon is the author of the word processor plugins, and would be the one to answer your query).