OOo plugin makes rectangle in Word

I am writing a paper in open office and when I cite in the nature format it inserts a space that is highlighted immediately after the number. This in and of itself is unimportant to me. However, when I open the file in WORD or other users do there is a blank rectangle there. This is needless to say unprofessional looking and I would like it to stop.

Is there a way to make the space go away or better yet make the rectangle go away in WORD? I tried searching for this phenomena in the forums and found one similar reference that it was "fixed" in the latest version which is what I have.

Thanks for any help.
  • More on this: https://www.zotero.org/trac/ticket/1013
  • I had the same problem. A feasible work around for me was to use Wod's search and replace function and have it delete the rectangle by simply not entering anything into the replace field. If you click on replace all it'll do your whole document in an instant.
  • Thank Dan for heads up on the Ticket. Good to know I am not the only person with this problem. Quick question Dan: does the unicode character have to have a no break property to it? If it doesn't you could try U+200A (Hair space)

    Gitty K: Thanks for the work around. Even though it does force me to use the necessary evils of microsoft (blah) I will definitely use that. Thanks for the help though
  • If it doesn't you could try U+200A (Hair space)
    I tried that, unfortunately. Type 200a in Word, hit Alt-X, and it turns into a square. Doesn't appear to be supported in OO either, actually.

    The closest I got was U+200B (Zero Width Space), which works in Word but displays a small (non-printing) diagonal line in OO. (It also displays a box in WordPad, but I wouldn't lose much sleep over that.)

    I really think there must be a way to fix the OO unending field problem without resorting to an extra character, though. But I need to see what Simon says on the ticket.
  • edited May 9, 2008
    Hmm . . . yeah that is a pain in the butt. Well, this is my work around I came up with. Go into the zotero "macro" for open office. Go to line 126 which says:

    oRange.String = Chr(8288) ' Zero-width non-joiner

    Put a ' in front of that to hide that line from the macro and it doesn't put a space after the citation. I realize this may have implications for other styles or something that I am unaware of but it works for me. Cheers!
  • Put a ' in front of that to hide that line from the macro and it doesn't put a space after the citation.
    Right, but the issue is that, in OO, the citation field isn't actually closed without the space, so after inserting it, your cursor will still be within the field, and you'll have to fiddle around to get out. That's why the character is inserted to begin with. There might be a better way to automatically place the cursor outside the field, however.
  • Oh I see. I have been adding my citations in after the paper is written so I never really noticed that. Let me see . . .
  • Okay well I've come to the conclusion that Open Office basic sucks. Even harder than visual basic. It should be as simple as writing a command to delete the selected space

    Selection.delete

    But no cant figure it out. Maybe someone more familiar with this language can help me out
  • Dan,

    can we use two characters to close the field - one for word and one for OOo. Everythime the wordprocessor is switched the user will reformat the references and the macro will switch the field closing character. I admit it is very ugly, but in the absence of alternatives may be worth considering.
  • can we use two characters to close the field - one for word and one for OOo.
    We could, but that wouldn't help if you were just exchanging the document with someone else who doesn't use Zotero, saving a flattened version, opening in other programs, etc. So it'd be better to just figure out a way to close the field in OO without inserting an unnecessary character. I don't know anything about the plugin code, but I would think that should be possible.
  • edited May 12, 2008
    Okay this seems to work better
    Go to line 126 which says:

    oRange.String = Chr(8288) ' Zero-width non-joiner

    Replace Chr(8288) with 8204. I checked this with MSWORD and it seems to work fine. It also allows the reseting of the formating. It is a Zero Width Non Joiner similar to 8288 but with out all the space ;P

    Dan . . . or someone could you please validate that this works for both OOo writer and MSWORD (I was using 2007 some maybe something is different for 2003)
  • edited May 12, 2008
    I'm afraid I looked into that one too. The ZWNJ displays a vertical bar in OO (at least in 2.3.1). It also has a particular specialized purpose for use with certain script characters, so using it as a hack isn't ideal, though that's probably not too big of a deal.

    But the goal here should really be to just get the cursor out of the field without inserting some obscure character.
  • Hmm . . . I am using the 2.4 version of OOo. Well then I've got a question. Suppose we inserted a random character but then did the equivalent of backspace. Would that not reset the formating or rather get the cursor out of the field?
  • Suppose we inserted a random character but then did the equivalent of backspace. Would that not reset the formating or rather get the cursor out of the field?
    I haven't worked on this code at all, so I don't know. But it's certainly worth trying. I believe someone said in another thread that the manual solution to the original problem was to insert a newline and then delete backwards. It's possible that some sort of script-based simulation of these steps will work.
  • Bah! curse my ignorance of OOo basic!
Sign In or Register to comment.