Loading...
 

Autocorrect for adding characters not easily accessible on your keyboard

 

Do you find yourself stuck trying to type characters into Paratext that are infrequent but hard to find?  Have you ever gone to a Word document to find a character and paste it into your translation? Have you ever memorized the Alt + Number pad sequence for a special character and typed it in?  Then this article is for you.  Read on!

When many accented or special characters are needed, you should use a custom keyboard from Keyman, or Microsoft Keyboard Layout Creator (MSKLC). However, many projects only need to type a few characters that are not on the physical keyboard. These would include special punctuation such as the em dash, ellipsis, curly quotes, and one or two accented characters. In cases like this, you can use Paratext’s autocorrect feature instead.

Autocorrect

Just like Word, Paratext has an autocorrect feature that the user can configure. You may not have heard of it because there is no option on the menu called autocorrect.  It is explained in the help file, but we will show you what to do here.

You can have one autocorrect file for each project, and so the file must be stored in that project’s folder.  Create a new text file with notepad.exe and save it in your project folder \My Paratext 8 Projects\project name. When saving the file, you must select Encoding: UTF-8 and the file must be named “autocorrect.txt”.

The basic form of each entry is:

word>changed word
  • There should not be any extra spaces unless you want them to appear in the changed word.
  • You can use the actual characters or the Unicode numerical values in the format \uxxxx in the entries.

Here are several examples to clarify how it works:

Typing em dash

\u002D\u002D>\u2014

When two hyphens (U+002D) are typed, autocorrect will change them to one em dash (U+2014).

Typing ellipsis

\u002E\u002E\u002E>\u2026

When three periods (U+002E) are typed, autocorrect will change them to an ellipsis (U+2026).

Typing smartquotes

One of the most useful autocorrect examples comes straight from the Paratext help file.  How to create smartquotes “ ” just by typing angle brackets << >> and how to add hair spaces between quotation marks.

# Change space (\u0020) between quotes to hair spaces (\u200A)

“\u0020<>“\u200A‘
‘\u0020‘<-->‘\u200A“
’\u0020’>-->’\u200A”
”\u0020>>”\u200A’

# Change angle brackets into curly quotes

<>‘
‘‘-->“
>-->’
’’-->”

–->—

Typing Accented Vowels like É

e´>\u00E9

When an “e” and an acute accent are typed, autocorrect will change them to a lower case composed é (U+00E9).

E´>\u00C9

When and “E” and an acute accent are typed, autocorrect will change them to an upper case composed é (U+00C9.)
Note: Lower and upper cases have to be defined separately because they each have their own Unicode code points.

Typing Accented Consonants like Ŵ

w
>\u0175 W

>\u0174

Typing ꞌ as the Character for Glottal Stop

Many languages need to type a character for glottal stops. It is not recommended to use the apostrophe (U+0027) or the right single quotation mark (U+2019) since they are punctuation. Instead it is recommended that you use either the Latin Small Letter Saltillo (U+A78C) or the Modifier Letter Apostrophe (U+02BC) since they are word forming characters and not punctuation.
To implement this auto correction you will need to select a key on your keyboard that will then be corrected. Typically, a key that looks like the character you want to type is easiest to remember. So the acute accent key “`” or the apostrophe key “’” are the keys on the English keyboard that most look like the glottal stop character. You could use whatever key is easy for you to remember.

`>\uA78C

Now, when an “`” acute accent is typed, autocorrect will change it to a Saltillo (U+A78C).

      –or–

'-->\uA78C

Now, when an “’” apostrophe key is typed, autocorrect will change it to a Saltillo (U+A78C).
Note: If you would prefer to use the Modifier Letter Apostrophe instead of the Saltillo, then replace \uA78C with \u02BC.

Typing ꞌ as Part of Velar Nasal Character (ngꞌ)

Many languages need to type ngꞌ to represent a velar nasal. We recommend you use one of the two characters shown in the above section for this.

Activate your autocorrect.txt file

After putting the lines of code into the autocorrect.txt file and saving it as a UTF-8 text file in the project directory, there is one more thing to do.  You must close Paratext if it was open and restart it.  Then you can test your file in any window that accepts the vernacular text.  If the results aren’t what you expected, you can close Paratext, modify the file, and open Paratext again until you get it right.

We hope this will save you many many keystrokes!


Contributors to this page: JFFRYS .
Page last modified on Friday October 12, 2018 18:47:22 GMT-0000 by JFFRYS.

License

Creative Commons License
All content on this LingTranSoft wiki are by SIL International are licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.