Arabic

The Arabic Macintosh

  • Home
  • The Arabic Mac
  • Programs

  • Transliteration
  • Jaghbub
  • -Conversions
  • -The fonts

  • Downloads
  • -Nisus macros
  • -Word macros

  • Macros for converting old documents to Unicode:
    Installation and use


    I have gathered information for about 40 old ("legacy") fonts for transliterating Arabic or Semitic text, and have made some macros for converting these characters to Unicode equivalents. See the introduction page for background information, reservations and caveats. This is provided for trial and personal use with no guarantees (although those that I have been able to test, worked for me).

    These are macro files, and thus made for the particular programs that allow you to use macros for such conversion purposes. Currently, I have two sets, covering the same fonts and with pretty much the same functionality, one for NisusWriter Pro, the other for Microsoft Word.


    NisusWriter Pro

    The Nisus macros can be used only with NisusWriter Pro under OS X, not with NisusWriter Express or NisusWriter Classic.

    Installation
    Installation is simple. Each font has its own file or files. Place those you intend to use to NisusWriter's Macros folder, thus: icon

    • In Nisus, choose Open Macro folder in the Macro menu. Drag the file or files you want into the folder. The macro then becomes immediately available in the Macro menu, with the name "[font name] > UC".
    You can also drag the full folder of macros there, it will appear as a submenu under "Macro".

    Use

    • Open the document you want to convert, and choose the relevant item [font name] > UC from the Macro menu. Nisus will take a few seconds to do the conversion, and will then ask you if you want to display the converted text in the Times font. If your document or selection has multiple fonts, and you want to preserve this variety, click "No", otherwise accept the Yes default.
    • The initial display in Times is only to make sure the diacritics appear. If you prefer another font, choose it in the normal manner. Normally, you would also want to save the converted document under a new name, so that you can keep the old original, just in case.
    If this is a document received from someone else, using fonts you do not have installed, how do you know which macro to run? Open the document, and look in the Fonts menu. Fonts used in the original but not on your machine will appear in red at the top of the menu. If it says, e.g. islamicstudies, run the "islamicstudies > UC" macro.

    Conversion of parts of a document
    The macro will either convert just a part of the document, or all of it, thus:
    - If some text is selected, the macro will convert the selection only.
    - If there is no selection, the macro will convert the main body, footnotes and endnotes. Headers and footers will not be converted unless specifically selected, so you must click in the header/footer area, select the text and run the macro again for these. (These appear to be a limitations in the Nisus macro system.)

    Fonts
    If you accept the font choice, the macro will select Times New Roman if you have that font installed (most Macs now do); otherwise Apple's own Times. If you have a Mac system from before 2004, you may have a Times font that lacks some diacritics. These will in that case be displayed in Lucida Grande and stand out somewhat. If so, you will probably wish to switch to another Unicode font. Which font is your choice, as long as it contains the characters required. For a list of freely available fonts with the diacritic characters we want, check here: Unicode fonts with transliteration characters. But if you have a recent Mac, about a dozen of the pre-installed fonts have the required characters, so try out those you like on your Mac first.
    - If you chose "No" to display in Times, no font change is made. You must then choose a relevant Unicode font manually to make the Unicode diacritics appear (e.g. by using Find and replace: "Find: Wild Card : AnyText [in the old font] - Replace with: Match : Found [in the Unicode font]", to avoid changing other, non-diacritic, fonts in the document).

    Download:
    Download the NisusWriter Pro macros


    There are also some macro files for conversion directed specifially at the Titus Cyberbit / TimesTL fonts (the "extended character", xt, macros), these are stored separately. Only for use of those who want to include the non-standard "private area" codes of those two fonts; if this means nothing to you, ignore:
    Download the NisusWriter Pro "xt" macros for Titus


    Microsoft Word 2004 / 2011 and later

    These macros are made for the 2004 and 2011 versions of Microsoft Word for Macintosh. They will not work in older versions of Word, because the program then did not support Unicode at all, and it will not work in version Word 2008 because that did not support such macro files at all. Macros were reintroduced in the following version, Word 2011, and the macros will work there and in later versions. I have also tested some in Word for Windows, and they seem to work well there, although I have not tested all files there.

    The package
    Word macros are stored in Word documents, so we have put them into Word documents for you to transfer to your machine. In order to keep the size of each file down, we have split the 40-odd font macros into four storage documents, named "Conversion macros 1" to "Conversion macros 4". Mostly you will only want to work with a few of the old legacy fonts, so just take the "Conversion ..." file that contains the font(s) you want to work with, and store the others away somewhere for future use if you like. Below you will find a list of which font is dealt with in each file.

    Installation

      Word 2011 and later
    • Put the "Conversion macros..." files you downloaded anywhere on your Mac.
    • For occasional use: In the Tools menu, choose the item Templates and Add-Ins. In the middle panal, marked Global Templates and Add-Ins, click Add, locate the Conversion macros file, and click OK. The macros in this file will then be available for use.
      The next time you want to use the same macros, just open Templates and Add-Ins and check the macro file in the list to activate it for that session.
    • If you want to use one macro frequently, you can install it directly into your Word setting:
      • Open the relevant Conversion macros file by using Word's Open command (not by double-clicking it). Say OK to "Enable macros".
      • In the Macros... sub-menu in Tools: Macro, click on the Organizer ("Assistant") button. This will present you with a dialogue with the file's macros on the left, and your built-in "Normal" list on the right. Select the macro you want, and click Copy -->. Then you no longer need activate the "Conversion" file each time.
      • To make it even more convenient, you can also add the macro to the Macros menu, with the Customize Toolbars and Menus item in the View: Toolbars menu.

      icon Word 2004
    • Locate the folder Microsoft Office 2004 : Office : Startup : Word
      (- that is, the folder "Word" in the folder "Startup" in the folder "Office" etc. The "Microsoft Office 2004" folder is normally placed together with the Word program; most likely in your "Applications" folder.)
    • Place the "Conversion macros ..." file or files you like to work with, in that folder.
    • Restart Word.
    You will then find the macros contained in that file available to you in the Macros... menu.

    Use

      icon
    • Open the document you want to convert. In the Tools menu, you will see Macro with a submenu Macros.... Choose this.
    • That brings up a dialogue box with a list of macros on the left.* Select the appropriate one, and click on the button Run.
    • The macro will then ask whether you want to display the converted text in the Times font. If your document or selection contains different fonts and you want to maintain this variety, click "No". Otherwise, click on the default Yes. Word will then take a few moments to do the conversion (you will see dialogues flashing by). Wait until it is finished, a dialogue box will appear to say "Conversion complete". Say OK to that box. icon
    • The initial display in Times is only to make sure the diacritics appear. If you prefer another font, choose it in the normal manner. Normally, you would also want to save the converted document under a new name, so that you can keep the old original, just in case.
    * If the macro list is empty and it says "Macros in: [document name]" below, choose "All active templates and documents" which brings up the full list.
    -- If this is a document received from someone else, using fonts you do not have installed, how do you know which macro to run? Open the document, then choose "Preferences..." in the menu "Word". Choose the "Compatibility" panel, and click on "Font Substitution...". This lists the fonts used in the original but not on your machine in the left-hand column (you just want to know the name, so click Cancel to exit). If it lists, e.g. "islamicstudies", run the "islamicstudies_To-Unicode" macro.

    Conversion of parts of a document
    The macro will either convert just a part of the document, or all of it, thus:
    - If some text is selected, the macro will convert the selection only.
    - If there is no selection, the macro will convert the complete document, including footnotes, endnotes, headers and footers.

    Fonts
    The Times font was chosen for initial display because it is certain to be on all Macs. If you have a Mac older than 2004, Times may not display all diacritics, but on more modern Macs it will have most, but not "proper" 'ayn and hamza. If you used such, they will be displayed in Lucida Grande and stand out somewhat, so you will then probably wish to switch to another Unicode font. Which font is your choice, as long as it contains the characters required. For a list of freely available fonts with the diacritic characters we want, check here: Unicode fonts with transliteration characters. But if you have a recent Mac, about a dozen of the pre-installed fonts have the required characters, so try out those you like on your Mac first.
    - If you chose "No" to display in Times, no font change is made. You must then choose a relevant Unicode font manually to make the Unicode diacritics appear (e.g. by using Find and replace: "Find: Format [old font] - Replace with: Format [Unicode font]", to avoid changing other, non-diacritic, fonts in the document). test

    List of fonts converted from each of the Word files
    Conversion Marcos 1.dot: afroas, Bloomington, Jaghbub family, ME Times & ME Geneva, MidEast Times, New Baskerville ME, New World, New World Transliterator, Tabriz, TimesEncycBrillRoman, TimesTL.

    Conversion Marcos 2.dot: al-Arial, islamicstudies, IslwTimes, Semitic Transliterator, Times New Arabic, Times New Arabic Roman, Times New English Roman, TranslitLS.

    Conversion Marcos 3.dot: AHT, AO Times New Roman, ArabTransLit, DMG Tms, EuroIranica, Iran Web2, JAIS-font, Times Beyrut Roman & OI-Beirut, Timur & Helvan

    Conversion Marcos 4.dot: Abbas, Assur, Beyrut, Bock, Galil, GalilTimes, HaifaTimes, Nebe, Pamuk, Sima, UrmiTimes.

    Download:
    Download the Microsoft Word macros


    -- You can also in Word 2004 move just the font macro(s) you want into your "Normal" template, then it will be always available and you don't have to see the others in the large conversion macros file. You can do that this way:
    • Go to the menu item Macros... in the Tools menu and sub-menu Macro. A box opens with some buttons; click on the button Organizer.
    • Then you get a box with two panels, one called "To Normal", the other the name of the open document (if any).
    • Click the Close File/Open File button beneath the latter panel and point it to the Conversion document of your interest.
    • From the ensuing list, select the macro you want to work with, and click the button Copy...> to the "To Normal" panel. You can delete them from "Normal" later on with the same process.


    There are also some macro files for conversion directed specifially at the Titus Cyberbit / TimesTL fonts (the "extended character", xt, macros), these are stored separately. Only for use of those who want to include the non-standard "private area" codes of those two fonts; if this means nothing to you, ignore. The file "Conversion xt 2" covers the same fonts as in Conversion macros 4; "Conversion macros xt 1" covers these fonts: AO Times, Bloomington, DMG Tms, EuroIranica, IranWeb 2, IslwTimes, JAIS-font, ME Times & ME Geneva, MidEast Times, NWT/New World, Semitic Transliterator, Times Beyrut Roman & OI-Beirut, TimesEncycBrillRoman, Times New Arabic Roman, Times New English Roman, Timur/Helvan, and TranslitLS:
    Download the Microsoft Word "xt" macros for Titus


    Version history:
    • 31.3.08: Version 1 uploaded
    • 2.4.08: EuroIranica font added. - Font display in Nisus corrected - Some conversion errors in Beyrut, Bock, JAIS-Font, Nebe, UrmiTimes fixed.
    • 4.4.08: AO Times New Roman and Iran Web2 added - Code corrections in EuroIranica - Word files as .dot files.
    • 9.4.08: Major overhaul, code errors fixed in most of the macros. Beirut macro remade. Timur/Helvan added to the xt files.
    • 2.7.08: Fairly major overhaul, code errors fixed in many of the Word macros in particular. TranstliLS added.
    • 3.7.08: Some overall changes made to the code in the Word macros when no text is selected: The macros will now convert the complete document, including footnotes, endnotes, headers and footers (and not just the main window from the insertion point down), and Times is now displayed in this case as well. These changes made in all Word macros, so updating macros is suggested for Word users.
    • 6-7.7.08: Overall change to both Nisus and Word macros: Added code to give user choice of whether font should be changed automatically or not. Corrections in code for "combining diacritics" in Word macros for Jaghbub, JAIS-font and afroas.
    • 6.5.12: Corrected (complete) macros for Bloomington added; installation guide for Word 2011. The .dot files here can be used in both Word 2004 and 2011.

    Introduction

    Details about the fonts involved


    Back Forward

    Home | The Arabic Mac | Downloads | Index
    Responsible for this Web page is Knut S. Vikør.
    Last updated