PDA

View Full Version : Macro for Converting BibleWorks Greek & Hebrew to Unicode?



John Parsons
07-13-2005, 03:48 AM
Hello;

Does anyone know if there is a macro to convert the BibleWorks Hebrew font to Unicode available?

Thank you kindly.

Charlie
07-15-2005, 09:29 AM
John,

In future versions of BibleWorks you will be able to export text in Unicode, but in the meantime we have come up with a solution for those with access to Microsoft Word 2000 or greater. It comes in the form of a set of MS Word macros and an automation server that provides code to do the work quickly. The macros allow you to convert all the BibleWorks Hebrew and Greek in a document into Unicode, or selectively the next word after the cursor.

Iíve attached the macros in the unimacros.zip file below. You will need to open up the macro editor in Word and manually copy the contents of unimac.txt into the macro file. You can customize the macros by editing this information at the end:

End Sub
Sub ConvertAllBwGrk2Unicode()
ConvertBwGrk2Unicode "bwgrkl", "Arial Unicode MS", True
End Sub
Sub ConvertAllBwHeb2Unicode()
ConvertBwHeb2Unicode "bwhebb", "Ezra SIL", True
End Sub
Sub ConvertAllBwLex2Unicode()
ConvertBwLex2Unicode "bwlexs", "Arial Unicode MS", True
End Sub
Sub ConvertAllBwSym2Unicode()
ConvertBwSym2Unicode "bwsymbs", "Arial Unicode MS", True
End Sub
Sub ConvertNextBwGrk2Unicode()
ConvertBwGrk2Unicode "bwgrkl", "Arial Unicode MS", False
End Sub
Sub ConvertNextBwHeb2Unicode()
ConvertBwHeb2Unicode "bwhebb", "Ezra SIL", False
End Sub
Sub ConvertNextBwLex2Unicode()
ConvertBwLex2Unicode "bwlexs", "Arial Unicode MS", False
End Sub
Sub ConvertNextBwSym2Unicode()
ConvertBwSym2Unicode "bwsymbs", "Arial Unicode MS", False
End Sub

Just change the Unicode font name to whatever you prefer to use. Then you will want to assign the macros to buttons or keys in Word.

Before using the macros copy the attached file named bwcom.exe to some convenient place, like your BibleWorks base directory. Then run it (double click it). It will register itself with the system so you don't have to run it again thereafter. This provides some code that the macros will use to speed up the conversions.

I hope this helps.

J Kendall
07-15-2005, 10:59 AM
Charlie,

This looks wonderful. Thank you!

In my initial trial I think I've spotted a bug in ConvertAllBwGrk2Unicode which causes spaces to be deleted. As an example, copy BDAG entry 967 avpolu,trwsij to Word 2000 and run ConvertAllBwGrk2Unicode. At the beginning of entry 2a where originally Bwgrkl text continued a sentence in Time New Roman you should see that the space between redeemed and διὰ is omitted.
-----------------
a. redemption, acquittal, also the state of being redeemedδιὰ τῆς ἀ. τῆς ἐν Χριστῷ ᾽Ιησοῦ Ro 3:24
-----------------

While this doesn't seem to occur in all cases where TNR changes to Bwgrkl in BDAG entries, the problem appears fairly frequently in the examples I've tried.

John
--
John Kendall
Cardiff
Wales

John Parsons
07-15-2005, 06:22 PM
It sure does, Charlie! THANK YOU SO MUCH!

- John Parsons


John,
I hope this helps.

MGVH
07-18-2005, 10:35 AM
Thanks so much for this converter! I've been using John Kendall's converter which works great, but yours is significantly faster, plus, yours handles the Hebrew.
I realize that you are probably in the process of adapting this for the next BW release, but John is correct in noting that spaces frequently are omitted, both in the Greek and the Hebrew when working with BDAG. (If I recall, John, you encountered this problem and fixed it somehow.)
Also, I suspect there must be something in the exe file you provide that overrides the choice of font in the macro. When I run the Greek converter, all the Greek ends up in Tahoma even though the macro indicates Arial Unicode MS and even if I change it to the Cardo font I want to use.
Also (and again I realize you are probably just releasing these macros for now out of the goodness of your heart!), at some point we will also want another subroutine to handle the Syriac.
(BTW, I'm using MS Word 2003 on WinXP.)

J Kendall
07-18-2005, 11:55 AM
I realize that you are probably in the process of adapting this for the next BW release, but John is correct in noting that spaces frequently are omitted, both in the Greek and the Hebrew when working with BDAG. (If I recall, John, you encountered this problem and fixed it somehow.)

Hi Mark,

This really is a whiz of a converter, isn't it!

Thanks for confirming the problem with spaces.

If I recall correctly, the issue with spaces related to my clunky macro for converting Unicode to Bwgrkl, not Bwgrkl to Unicode. Because it was intended documents with both Greek & English, it doesn't convert the font of spaces between Greek words.

John
--
John Kendall
Cardiff
Wales

MortenJensen
08-03-2005, 06:54 AM
Hi Charlie

I am trying to get your macro to work but have difficulties.
- I am not able to substitue the font. I have changed the last lines to:
Sub ConvertAllBwGrk2Unicode()
ConvertBwGrk2Unicode "bwgrkl", "New Athena Unicode", True
End Sub
Sub ConvertAllBwHeb2Unicode()
ConvertBwHeb2Unicode "bwhebb", "Ezra SIL", True
End Sub
Sub ConvertAllBwLex2Unicode()
ConvertBwLex2Unicode "bwlexs", "New Athena Unicode", True
End Sub
Sub ConvertAllBwSym2Unicode()
ConvertBwSym2Unicode "bwsymbs", "New Athena Unicode", True
End Sub
Sub ConvertNextBwGrk2Unicode()
ConvertBwGrk2Unicode "bwgrkl", "New Athena Unicode", False
End Sub
Sub ConvertNextBwHeb2Unicode()
ConvertBwHeb2Unicode "bwhebb", "Ezra SIL", False
End Sub
Sub ConvertNextBwLex2Unicode()
ConvertBwLex2Unicode "bwlexs", "New Athena Unicode", False
End Sub
Sub ConvertNextBwSym2Unicode()
ConvertBwSym2Unicode "bwsymbs", "New Athena Unicode", False
End Sub

Nevertheless, the macro continues to format in Tahoma (I guess that is because I do not have Arial Unicode MS installed).

How do I change the macro to the desired font?

Second, the macro changes the font size to 10. It should not alter the font size. I use point 12, but it could be whatever.

How is that corrected?

Finally, the macro works great otherwise, it is incredibly fast.
Morten

John Parsons
01-17-2006, 05:24 PM
Hi Charlie,

I pasted the text into Word 2003's macro editor, ran bwcom.exe, but it seems Word isn't doing the right-to-left conversion properly... (it worked fine in Word 2000). Any suggestions? THANKS!