5

In Brazil, we use ª for feminine ordinal numbers, just like 1st, 2nd, 3rd... in English. So it's a very common need. I just set up the Compose Key, so I can do "Compose Key, o, o" to get the masculine ordinal ° (in fact, this is the degree sign, but they're both similar. The real masculine ordinal faces the same problem as the feminine). But, although this site says I could get the ª with "Compose Key, a, _" (or similar compositions), I'm getting ā or Ā instead of ª.

Is there an easy way to type ª in Ubuntu 16.04 (LibreOffice, gedit, etc)? Please I'm not interested in memorizing/typing complex Unicode sequences.

EDIT

After the answer from Ludenticus, I realized that I can type only

Alt Gr + [ for ª

Alt Gr + ] for º

Rodrigo
  • 566
  • If you go to settings > text entry and select a language that does have the character ª cant you type it with the designed key, wich is usually the one under Esc ? – M. Becerra Nov 02 '16 at 16:05
  • Not sure. But would I need to change the language every time I want to type ª? – Rodrigo Nov 02 '16 at 16:10
  • You could also click on the indicator regarding the keyboard entry, which would read smth like Br or En, in case you have it in English, and open the character map, then find the desired character, i.e. ª, and copy/paste it. – M. Becerra Nov 02 '16 at 16:10
  • Wich language have you selected then as text entry? – M. Becerra Nov 02 '16 at 16:11
  • Yes, @M.Becerra I know about copying/pasting, but I would prefer a more practical solution. I'm using Brazilian Portuguese as text entry language. – Rodrigo Nov 02 '16 at 16:12
  • I hope you find a solution and unsure why Compose isn't giving you the right key. That being said, Ctrl+Shift+U 0363 doesn't seem that horrible if it's the only one you have to do that way. –  Nov 02 '16 at 16:19
  • @Rodrigo Your edit is actually an answer, and the best answer at that! You should post it and accept it. – wjandrea Nov 03 '16 at 00:54
  • @bc2946088 U+0363 is a combining diacritic. OP should use U+AA and U+BA. – wjandrea Nov 03 '16 at 01:49

5 Answers5

3

Here's my favourite trick to type any Unicode character, in any context:

  1. Google 'Unicode for {the character}'. Make sure you use the exact character.
  2. Note down the 4 characters after the 'U+'. In this case, ª is 00AA and º is 00BA, but you can skip the leading zeroes.
  3. Type Ctrl+Shift+U. You will see the cursor transform into an underscored 'u'.
  4. Type the 4 characters and press space.

Voila, your character is entered, and you don't need to mess around with keyboard layouts :)

wjandrea
  • 14,236
  • 4
  • 48
  • 98
  • That's useful for other characters, not for something so common as º and ª in Brazil. Thanks! – Rodrigo Nov 02 '16 at 16:44
  • Sure, if you're going to be typing something constantly then it might just be easier to switch keyboard layouts, but honestly once you remember the code, it is fairly swift – Brendan Donegan Nov 02 '16 at 17:22
2

To keep using Compose Key, a, _ and Compose Key, o, _ key combinations to type ª and º you should create a ~/.XCompose file on your home directory with the following contents:

include "/usr/share/X11/locale/en_US.UTF-8/Compose"
<Multi_key> <underscore> <a> : "ª"   ordfeminine # FEMININE ORDINAL INDICATOR 
<Multi_key> <a> <underscore> : "ª"   ordfeminine # FEMININE ORDINAL INDICATOR 
<Multi_key> <underscore> <o> :  "º"   masculine # MASCULINE ORDINAL INDICATOR
<Multi_key> <o> <underscore> :  "º"   masculine # MASCULINE ORDINAL INDICATOR

The reason Compose Key, a, _ gives you the ā character is because that's exactly what is configured on current Xorg X Server Compose Key mappings. Take a look at /usr/share/X11/locale/en_US.UTF-8/Compose:

<Multi_key> <underscore> <a>            : "ā"   U0101 # LATIN SMALL LETTER A WITH MACRON

It must have been different on the past, and all those websites with keymappings are outdated.

On that same file you'll see that in order to insert a ª you have to press ^, Compose Key, _, a:

<dead_circumflex> <Multi_key> <underscore> <a>  : "ª"   ordfeminine # FEMININE ORDINAL INDICA>

This will only work if your current keyboard layout outputs a silent (aka dead) ^. That's the default on the US intl keyboard variant.

dllud
  • 366
2

IF you have Portuguese (Brazil), you'll find it with

[Alt Gr] + [Shift] + [F]

enter image description here

Otherwise, see under the Keyboard Layout Chart

  • Thank you, it works! Where is the masculine, by the way? [Alt Gr] + [Shift] + [0] gives me the degree sign, which is slightly different. – Rodrigo Nov 02 '16 at 16:19
  • @Rodrigo you can check that Keyboard Layout by yourself, clicking on the indicator on the top panel. – M. Becerra Nov 02 '16 at 16:24
1

These are the instructions for libreOffice.

SUPER SCRIPT:

Select the text that you want to make superscript or subscript. Do one of the following: Choose Format - Character - Position, and then select Superscript or Subscript. Press Ctrl+Shift+P to make the text superscript, and Ctrl+Shift+B to make the text subscript.

INSERTING SPECIAL CHARACTER:

This function allows you to insert special characters, such as check marks, boxes, and telephone symbols, into your text.

To view a selection of all characters, choose Insert - Special Character. In the large selection field click the desired character or several characters in succession. The characters are displayed at the bottom of the dialog. When you close the dialog with OK, all displayed characters in the selected font are inserted in the current document. In any text input field (such as the input fields in the Find & Replace dialog) you can press Shift+Ctrl+S to open the Special Characters dialog.

For Gedit: See this.

  • Superscript is not the same as inserting the right characters. But thanks for the hint! – Rodrigo Nov 02 '16 at 16:11
  • Giving just links is arguable not an answer, you can read more about it here http://meta.stackexchange.com/questions/8231/are-answers-that-just-contain-links-elsewhere-really-good-answers/8259#8259 – M. Becerra Nov 02 '16 at 16:14
  • 1
    @M.Becerra, thanks for pointing out. I have corrected it now except for the last link because it is from askubuntu.com only. – vishal-wadhwa Nov 02 '16 at 16:19
  • Good! But you could still keep the links as "Extra info" or "In case you want to read more about it" and that way you show your sources as well. But great that you edited it. – M. Becerra Nov 02 '16 at 16:22
0
  1. Type Ctrl+Shift+U
  2. Type code aa
  3. Type space or enter to confirm