There are several ways to type & show pīnyīn (拼音) on computers. But I recently learned a very simple way to do this on Mac. If you feel it a bit difficult to use the "ABC-Extension" input source, the following might be helpful for you:)
This method will use a standard Chinese input source, then hit Tab, and Enter. Let me explore a bit more details.
Install Chinese Input Source
1. Open System Preferences from your dock or the Apple menu
2. Select "Keyboard"
3. Click "Input Sources"
If you select "Keyboard Preferences" from the menu bar (like this image), it'll directly open "Input Sources."
4. Add a Chinese input source
Once you open the Input sources, click the " + " button on the bottom left to add a new input source.
Searching "Chinese" on the search box would be easy to find Chinese input sources.
Select "Pinyin" from the list. Either Simplified or Traditional would be fine.
Installation of Chinese input source is done!
Switch to the Pinyin Input Source
From your menu bar, switch to the "Pinyin - Simplified/Traditional" input source.
(If you've activated the shortcut for switching input sources on your Mac, ^ (Ctrl) + Space bar will switch the input source by default.)
Type Pinyin Then Tab, Enter
As the headline says, type whatever you like then hit "Tab" afterward. It will show the tone mark from 1 to 4 in order.
When the console shows your desired tone mark, hit Enter. Voilà! You have the pīnyīn with tone mark.
It's way easier than using the "ABC-Extended" input source, which we need to remember "⌥ (option) + a" to get 1st tone, and so on.
- To get "ü" type "v"
ex. To get "nü" with tone marks, type "nv" then hit Tab: nǖ nǘ nǚ nǜ.
- To type just "ü"
1. hold "⌥ (option) + u"
2. type "u"
* Though I'm not sure if I will need only "ü" in Chinese.