RTL parentheses

Hello,
I love Zotero.
Lately, been looking at the option to roll it out
to all our students. When I add a hebrew citation
in Word 2010 I get parentheses that are backward,
like )this(.
Theres a thread from a while ago, but it didn't help.
I've read all the threads relating to RTL, and tried all
permutations of Word, Zotero version (incl MLZ), document
type, etc,

I would very much any help you can give.

Thanks for all the work!
David Burg
Lecturer
Ohalo Academic College
Israel
«1
  • edited May 7, 2013
    Have you tried setting the Language field of the item to "he"? I'm not sure it will help, but it might do.
  • Hi fbennett,

    Thanks so much, but alas, it also didn't work.

    I see that when building the Refences section,
    the APAv6 is formatted slightly differently,
    according to the lang. So I assume Zotero knows
    how to differentiate between Hebrew and English.

    Would it be possilbe to edit the style so that
    the parentheses are reversed if the Language is
    set to HE (or another RTL language), or are they
    encoded in Zotero?
    Could a custom style override this code?

    I'm going to try to run Zotero along with Open/LibreOffice
    and see what I get. I'll report back here later.
    Do you have more suggestions I might try, in the mean time?

    Thanks again for your time,
    David
  • When you set the Language field to "he", do the fields in the item display reverse to RTL mode?

    (If they do, then MLZ is behaving as designed, and we'll need to dig deeper. If they don't, then something is amiss and we'll need to dig sideways, as it were, to find the cause of the initial failure before going deeper.)
  • It will also be good to know what the setup is like, particularly whether the OS itself is running in Hebrew, and whether the bibliography output language ("CSL:" in language preference dialog) is set to Hebrew.
  • Sorry for not putting my setup config in the first post...
    Also apologies for the length of this post. I wanted to be
    thorough.

    My Setup:
    For convenience, I'm runnig WinXP w/ HE language pack inside a VM.
    Using Portable Hebrew Firefox v21beta, Word 2010 all defaults set
    to Hebrew, incl. OS variables. But the problem is also in Win7
    with the same setup, otherwise.
    I just reinstalled MLZ with the verison from 6th May, deleted the
    Zotero folder and inserted the bibliographic information.

    I do feel a little "off", since I had not changed the CSL in the
    languages prefernces - did that now (UI was already in HE mode).

    Not sure I understand "reverse to RTL mode".
    I've uploaded a sample to my Dropbox, and shared it. The link is:
    https://www.dropbox.com/s/71mfj43hjzojrig/ZoteroTry1.docx
    Could you open it to see if you get the same problem (in Hebrew)?

    Someething weird is going on:
    Dropbox gives a preview of the file. In IE8(and WinXP) the
    parentheses are backwards (like in WOrd 2010) but in FF
    (and IE9) they are correct!
    It seems there's a problem with Word?
    However, saving to PDF (via Word or doPDF) gave the same result-
    no matter the browser:
    https://www.dropbox.com/s/l31xphju0s97odn/ZoteroTry1.pdf

    As I stated a couple of hours ago:
    I've installed LibreOffice (4.0.3.x) - and the parentheses are OK!

    Any advice for Word?

    Thanks!
  • edited May 8, 2013
    In the processor code, it looks like I tried a couple of strategies for dealing with RTL text, and then left things in limbo. (Here's a reference to parens -- the force_parens_char variable is never set in MLZ or citeproc-js as far as I can tell, so this code is not used -- and as the note says, it's the wrong strategy).

    https://bitbucket.org/fbennett/citeproc-js/src/54e0952d27e76231a319bce0dd70732af272b2c4/src/formatters.js?at=default#cl-69

    There is an RTL character toggle in Unicode that could be set on RTL cites ("he" etc). That would probably be the first thing to try. It might force LibreOffice and Word to behave similarly with cites of this type. I'll try to take a look this weekend, and post again when I have something worth testing.
  • Hi fbennett,

    I was wondering if you had time (and luck) with this problem?
    Please let me know if I can contribute some work.

    Thanks again,
    David
  • I've gotten bogged down this weekend with some some internal editing work for school. It might be next weekend before I'm able to dig into the issue, but feel free to ping me. It is definitely something that I want to sort out.
  • edited May 12, 2013
    Actually I did have a question. Can you post a screenshot of a manually-entered pair of citations (one to a Hebrew document, one to an English document) that shows what you want things to look like? It would also be great if you could post the references as sample data, by exporting them (as Zotero RDF or Bibliontology RDF), saving to a file, pasting the content to http://gist.github.com, saving as a Public Gist, and posting the URL back here.
  • Hi,

    OK, I created a citation manually and then duplicated it before
    translating the new one to Hebrew That way they are identical
    in every other way. Here is the file: https://gist.github.com/anonymous/5562791
    [first time to use this, so I hope its OK...]

    Can't find a place to attach a file here. Here it is:
    http://imgur.com/6IOHTZy
    Or, on my Dropbox:
    https://www.dropbox.com/s/5hlofojud5lbiia/ScreenShot1.png

    Notice the pararentheses are backward in the Hebrew citation.


    In the bibliography, the Hebrew citation came out LTR so I had to
    manually change the paragraph setting to RTL. It's the same for
    Open/LibreOffice so it's probably creating it according to the
    word processor style. Anyway, it is not a problem.
    Otherwise, the bibliography looks OK.

    Have a great weekend!

    Bye,
    David
  • edited May 12, 2013
    The gist is perfect, thanks.

    The last time I looked at this, I had the idea of wrapping RTL-language bib and cite entries in RTL on/off chars (which Unicode does offer as a hack for situations like these). I'm not sure how well the strategy will fare when the rendered citation output hits the word processor, but it's worth a try. I'll post again when there's something to show -- and feel free to ping again if you don't hear anything for awhile.
  • OK.

    I was wondering if you can hypothesize this problem appears in
    Word while it looks fine in LibreOffice?

    Thanks!
  • I'm not sure. Maybe little gremlins are encouraging you to use open-source software? :-)

    It's possible that using force-to-RTL markup will produce uniform behaviour on both platforms, though.
  • Hi,

    First, I use OSS all the time, except when there's no alternative.
    I totally endorse OSS(whenever I get the chance). Howeer, the
    IT people aound here, either haven't heard about it, or belittle it
    (free is not as good as paid, or some such nonsense).
    Second, this is the reason I'm trying to emphasize Zotero, as opposed to
    the librarians who think Mendeley is great. It is - but it not the
    same...

    On the RTL issue:
    I'm not sure I understand your comments, but willing to test any fixes
    you can try. My coding abiblities (such as they are) are not up to this task, but I can definetly test and troubleshoot.

    Thanks,
    David
  • Hi David,

    Understood (and that quip wasn't meant as criticism!). I have a few other pending items on my desk today, but I'll try to dig into this soon. I'm really curious whether we can trick it all into working smoothly.
  • Hi,

    Just wondering how goes with the RTL?
    [Hope I'm not bothering you...]
    My ability to get my faculty to see
    the light is mcuh higher if this can work.

    My hope is that I can get even more people
    (and maybe institutions] to use Zotero.

    Thanks,
    David
  • No problem. The book is about to be pushed to publication (in the next few hours). I'll send you something to try out this weekend.
  • This is more exploratory than a serious attempt to fix the issue, but try the processor patch plugin (just install it alongside MLZ or mainline Zotero).

    To test it, set the Language field of a Hebrew item to "he", then insert a citation into a document.

    There are several possibilities: (a) it will make no difference; (b) the fail/not-fail behaviour of Word and LibreOffice will be reversed; (c) parens will magically start working in both environments; (d) things will just break. No idea which result you will get -- give it a try and let me know what happens!
  • Hi,
    I already tried that, but tried again.
    Unfortunately no change.
    Just to double-check: I just installed the patch.
    There are no other settings?
    Is/are there setting/s in the style file to override
    the problem?
    Thanks again,
    David
  • Thanks for checking. A bit of (possibly) good news at this end: I now have parens-reversal happening in a formal test. This will make it easier to test fixes without pestering you constantly.

    I now see that the initial attempt failed because the RTL on/off characters were inside the citation parens (so they had no effect).

    More soon. When a fix emerges, I'll bundle it up in the same plugin. There aren't any special settings -- when it works, it will just work.
  • edited May 26, 2013
    Try reinstalling the patch plugin now. This one should have an effect on the parens formatting, but I'm not sure it will play well in both Word and LibreOffice, so test with both.

    (This fix is a hack: it forces the cs:layout parens on citations to LTR mode with an override character, always. That's unnecessary clutter in most cases, so we only really want to do this for RTL formatting in Word. But I can worry about that later.)
  • Try the latest version: it may fix the problem.
  • Saw your post yesterday - sorry for taking so long...

    I wanted to get a new instance of FF+Zotero up and running,
    just in case there was some problem eith all my experimentation.
    I have FFv21-HE, with only 4 addons (Zotero, Word/LO integration, processor plugin) and Zotero MLZ has CSL set for HE.

    There's no change in Word. LibreOffice is still OK.
  • Is the Language field of the test record set to "he"?
  • Also, the plugin was set to work only up to FF 20. I've bumped the limit to FF 21. If you reinstall the plugin and try again, you may get a different result.
  • Yes, Language is set to he (also tried HE, just in case),
    on my test citation (made by hand).
    Reinstalled the plugin - but no change in Word or LO.
  • It looks like the plugin has not been installing the alternative citation processor -- that last iteration contained a bug that should have crashed, actually.

    I've made some adjustments to the install parameters and added some ugly marks to the formatting, so we can be sure that what should be happening is actually happening. The changes are in a temporary version of the plugin: install from here and see what happens.

    The processor is now producing output that is as correct as it can be made, so when it kicks in we'll either find the problem is solved, or know that Word is doing something clever to break the formatting that we'll need to work around.
  • Actually, I thought about the installation, because it deosn't
    ask to restart (like most addons do). Maybe it's not installing
    correctly on my system? Or maybe not kicking-in?
    How can I check that it is actually working?

    Also, I've been thinking - would it be useful if you had access
    to a working system? I can setup a computer with a remoting
    protocol (VNC/RDP/Teamviewer...).
    To be clear - this is not a cop-out to do my part, which seems
    (at least to me) to be the "easrier" part.
    Just wondering if it might give you more information?
  • The plugin won't ask to reboot, that's normal -- it uses a different install method that works on the fly.

    If it does work, it will be unmistakable in the output -- Chicago author-date in-text citation will have "X" before the opening parens, and "Y" after the closing one. If that doesn't turn up, and the item has "he" in the Language field, the new processor isn't being installed.
  • OK, now I feel real dumb... but I've installed many
    addons and this one shows up in the Addons menu in
    FF (v10.0.104 is displayed). So I just assumed everything
    was working, but there was a bug.

    I've been using Portable FF as a test platform, so I could
    easily rollback. I now installed the plugin on my production
    platform: Win8+He MUI, Office 2010(in he), FF v21EN,
    Zotero 4.0.8+ processor plugin.
    English citations are OK, with X and Y flanking.
    Now, in hebrew citation, I get the X and Y inside the backward
    parens, and is not dependent on the language setting (he, en or
    empty).
    However, I;m not getting the X and Y, in Word, after installing MLZ.

    So not exactly sure what's going on but it seems to be the
    combination of portable firefox and Word!
    Again, I assumed that since Zotreo was working in portable FF
    so was the plugin.
    Not sure if that can be fixed but I think the RTL issue might
    be more interesting.
    Apologies - should have tried this permutaion....

    To recap:
    Zotero 4.0.8+processor(test) works in Word.
    Zotero MLZ 4.0m360+processor(test) doesn't work.
    Any permutation of Zotero with protable FF doesn't work.

    Please advise :>
Sign In or Register to comment.