Automatically convert Pinyin with tone numbers
to Pinyin with tone marks (diacritics)

Right now it supports adding pinyin to text files, Rich Text Format files, and web pages. I have created a Mac install package for DimSum. I've added a version of the Chinese E-mail fixer to DimSum, available under the 'Programs' menu. Learn Chinese Characters Volume 1B 1 supplies you with an advantageous multimedia learning program which is able to teach reading and writing Chinese characters. For each character, it gives English definitions, Pinyin and Zhuyin annotations, cross.

Downloads

Microsoft Office
Windows or Mac*
LibreOffice or OpenOffice
Windows, Mac, or Linux
Word — whole documents
(Supports tables.)
Writer — whole documents
Word — selected text
(Selected text or text before cursor.)
Writer — selected text
(Selected text only.)
Excel — selected cells
Calc — selected cells
PowerPoint
Impress - not yet available
(Want to help?)

*Not Compatible with Office for Mac 2008 or Apple iWork. See FAQ for more info.

Pinyin Macro Instructions
OverviewUse The Right FontInstallationRuby Text

Pinyin Macro Help
FAQs & Technical NotesContact Information


Overview

These macros are very simple to use, as easy as '1-2-3':

  1. Type Pinyin with numbers representing the tones, as in 'Han4yu3 Pin1yin1'.
  2. Select the text or document you want to convert.
  3. Run the macro. Done.

To run macros, in Word or Excel for Windows press <alt-F8> or add the macro to your Quick Access Toolbar. In Office for Mac, go to Tools > Macros. In Libre/OpenOffice, go to Tools > Macros > Run Macro..

Use The Right Font

To use this macro, the only other thing to remember is that you'll need to select a font that includes letters with these diacritics. Otherwise you may find that in each word the one letter with a tone will be in a different font.

In Ubuntu Linux, I've found the default Liberation Serif and the other 'Liberation' fonts do not have everything we need, but Free Sans, DejaVu Sans, DejaVu Serif, 'Ubuntu' and many others look great. Starting with 16.04 / Xerus, Ubuntu includes the Google Chinese font Noto Sans CJK (also available for other systems as a free download under that name or as Adobe Source Han Sans), and that font also includes all the letters with diacritics we require for Hanyu Pinyin tones.

Macs have had Unicode fonts for years. Not every font on a Mac will have these letters, but worrying about Unicode fonts is mostly a Windows thing these days, and Microsoft is getting better and better about that too.

In Windows, use one of these:

Latin fonts

Arial
Courier New
Times New Roman
Calibri*
Cambria*

In recent versions of Office, these 'core' fonts have been updated to include at least enough of the Unicode character set to display Pinyin with tone marks. (See my note below about the default Calibri and Cambria fonts in Office 2007. Office 2010 and later are OK).

Arial Unicode MS The default Unicode font, included since MS Office 2000. Safest for use in Access databases too.
Lucida Sans UnicodeThe default Unicode font in earlier versions of Windows. Also used in Mac systems.
Chinese fonts
Microsoft YaHeiIncluded with Windows 8 and later.
Adobe Source Han Sans (Google Noto Sans CJK)Free open-source Pan-CJK font.

*Windows Office 2010 and later versions include all of these fonts, but Calibri and Cambria did not include all the necessary characters in Office 2007 until I installed Office Multi-Language Pack 2007.

Office XP (2002) and 2003 include the latest Arial, Courier New and Times New Roman, and those editions also normally install the Arial Unicode MS font as the 'Universal Font', also known as the 'Unicode Font' as part of International Support.

In Office 2000 that font is an option. If you did not install it, for either XP 2002/2003 or 2000, follow the instructions for 'Installing the Unicode Font' on Microsoft's 'Administering Fonts for Office XP' page.

Installation

Click one of the download links at the top of this page, and copy/extract the file to your PC.

To install in Microsoft Office, open Word or Excel and in Windows press <alt-F8>, or on a Mac go to Tools > Macros. Type a name for the macro and hit the 'Create' button. Then open the downloaded file, select all the text and copy it into a blank macro. Note my instructions in each macro on exactly where and how to paste it, especially the part about the 'sub' and 'end sub' lines. 99 times out of 100, the reason a macro doesn't work will be a mistake pasting it in during this step.

The MS Office Help files on this topic are actually are pretty good. Open Help, enter 'macro' in the Help index, and drill down to info on creating a macro 'from scratch'. (Note that Excel can be especially difficult about security: you must enable macros, and in recent versions of Excel you must save your final spreadsheet as a macro-enabled file.)

To install in OpenOffice or LibreOffice, go to Tools > Macros > Organize Macros > LibreOffice (or OpenOffice) Basic to create a macro and paste in my code. Here's a link to someone offering more detailed help: 5 Steps to Creating an OpenOffice Macro. In his step 5, instead of writing a macro you would paste in one of mine, making sure to follow my instructions in the macro comments about deleting the 'sub Main' and 'end sub' lines automatically created for any new blank macro.

When running these macros in OOo or LibrO, if you get a message saying you need a 'Java runtime environment' (JRE), that has nothing to do with me and you can run macros without it, but I know how to make that annoyance go away in Linux: install OpenJDK Java Runtime. This is easy in Ubuntu. Open Software Center, search for LibreOffice, click the 'More Info' button, scroll down to find OpenJDK Java Runtime, select it and click the 'Apply changes' button above.

The Help files on this topic included with Open/LibreOffice are not very detailed, but there is some information there. Look under 'Macros' (plural) and click through 'Organize Macros' to 'LibreOffice Basic'.

See also the Troubleshooting section of the Pinyin macro FAQ page. If you get ambitious, the Help files in the Basic editors (launched when you click the 'Edit' button in the macro dialog) can help you add tweaks of your own. For example, you can tell the MS Word macro to search forward from your cursor instead of backwards by setting '.Forward=' to 'True', or you can remove that feature entirely.

Ruby Text

Although you can use this macro to create 'ruby' text (small phonetic transcriptions aligned above or alongside Chinese characters), there is an easier way: there are inexpensive Chinese character fonts available that include Pinyin ruby text, and there are the Phonetic Guide features of Word and Writer. With any of these options you'll have to input the Chinese characters first of course. See this section of my Zhuyin setup page for more information on Zhuyin and Pinyin ruby fonts, and Microsoft Word's Phonetic Guide, and this a brief discussion of Phonetic Guide in LibreOffice/OpenOffice (in my Ubuntu Linux section, but there is also a version of OpenOffice for Windows), which someone is trying to automate by developing an an extension called OOPinyinGuide.

Need More Help?

Please see the Troubleshooting section on the macro FAQ page, and feel free to send send questions, comments or suggestions anytime via the contact page.

Modifying this control will update this page automatically

Chinese and Cantonese Input Method User Guide

  1. On your Mac, choose Apple menu > System Preferences, click Keyboard, then click Input Sources.

  2. Click the Add button , select “Chinese, Traditional”, “Chinese, Simplified”, or “Cantonese, Traditional”, then select any of the following.

    • Cangjie

    • Pinyin - Traditional

    • Shuangpin - Traditional

    • Stroke - Traditional

    • Sucheng

      To Merge files, drag a file and drop it onto another one, they will be merged into one chapter. If you want to unmerge it, please drag the file out of the chapter till you see a blue line. Then the files will be unmerged. Go to the Convert section of the program and click the Add Files or Load DVD button to load source medias. Check Merge all videos into one file on the bottom of the interface. Choose one output format on the right Output Format section of the program, and click Convert to start conversion. The program will merge all files on the file list into one after conversion. Select the desktop location to save the merged videos at the Output tab. Hit on the Convert All button to start with the file conversion and merging process. The processed file on the Mac can be located at the Output tab location and on the software interface at the Converted tab. Iskysoft video converter download

    • Handwriting - Traditional

    • Zhuyin

    • Zhuyin - Eten

    • Pinyin - Simplified

    • Shuangpin - Simplified

    • Wubi Xing

      Pokemon Reborn is an Emerald-styled downloadable game featuring all content through Generation 7. Experience a never-before-seen layer of strategy with the all-original Field Effects, using the terrain to outplay and overwhelm your opponent! Pokemon reborn for mac Before anything, you need to know that the application to run Pokemon Reborn is a.exe file, which in most circumstances, cannot be run normally by Macs. However, through the use of Wine, an incredible application that facilitates the use of.exe files, you can play Pokemon Reborn just like everyone else.

    • Stroke - Simplified

    • Handwriting - Simplified

    • Cangjie - Cantonese

    • Stroke - Cantonese

    • Sucheng - Cantonese

    • Handwriting - Cantonese

    Tip: You can add a handwriting input source even if there are no other input sources for that language. For example, you can add Handwriting - Cantonese when French is the only other input source added.

  3. Click Add.

Note: If your Mac has a Touch Bar, you can customize the Control Strip by adding the Input Sources button and the Handwriting button . See Use the Touch Bar on Mac.

Once you set up a Chinese or Cantonese input source, you can start typing Chinese or Cantonese characters.

See alsoChange Chinese and Cantonese input method preferences on MacType in another language on your Mac with input sources