[OS X TeX] Autocompletion in TeXShop
Luis Sequeira
lfsequeira at fc.ul.pt
Mon Oct 1 12:05:08 CEST 2007
> Hi,
>
> I am having a problem with autocompletion (TeXShop 2.14, spanish
> localization) and the character ^. When I stroke the ^ key, the
> symbol appears in a yellow box. If the next key is a letter, say x, I
> get ^x, with no braces. But if the next stoke is a space, I get ^^{|}
> with the cursor | between the braces. Something similar happens with
> the umlauts. ä is converted into ¨\"a, with the umault before the
> backslash.
>
> On the other hand, _ produces _{|}, as expected.
>
> Thanks in advance for any help.
>
> Julian Aguirre
>
>
I get the same results with a Portuguese keyboard layout. This, of
course, like another poster has said, has to do with the fact that
when you press ^ it is considered as a diacritical that may be placed
upon the next letter -
to produce ê, or â, for example. I am not sure what one can do to
remedy this (my personal choice is to use an "international", or "us"
keyboard layout, even though some keys become out of place; it works
for me because I know where everything is, but this is not for
everyone).
Barring using a different or modified layout, the only option might
be to deal with it in TeXShop's autocompletion. You can't redefine
the "dead-key" behavior in this way - i.e., you cannot expect to
press the normal ^ key and not get the yellow box, etc, but if you
can get by just pressing the space bar after ^, here's a simple
workaround.
The autocompletions are defined in ~/Library/TeXShop/Keyboard/
autocompletion.plist
Open this file in a text editor (I use Smultron; you might be able to
use TextEdit - but make sure the file is saved as plain text, not rtf).
Look for the following lines:
<key>^</key>
<string>^{#SEL##INS#}</string>
(they should be near the start of the file). In the second of these
lines, remove the ^ character to get
<string>{#SEL##INS#}</string>
Now you can press ^ followed by space to get ^{} with the cursor
inside the braces. Not ideal, but I believe it's the best one can do
without changing the keyboard layout.
Luis Sequeira
------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/
More information about the macostex-archives
mailing list