[OS X TeX] Scandinavian {\aa} ??

Ari Stern ari at caltech.edu
Tue Mar 25 19:49:16 CET 2008


Personally, I think this is a good argument for doing away with
personal "shortcut" macros like this altogether.  (Another argument is
that it makes it hard to share TeX source files with collaborators,
who may have different and/or conflicting macros.  Still another is
that it makes it harder to cut-and-paste formulas into different
source files, programs like LaTeXiT, etc...)

I've found it far easier to use keyboard shortcuts, which
automatically expand into proper TeX expressions, as they are typed,
rather than defining new commands in the header.  (For example, I use
"x" as a prefix for greek letters, so "xr" auto-expands to "\rho",
"xa" auto-expands to "\alpha", etc.  There are lots of other
time-saving commands, like "beq" for "\begin{equation}" and "eeq" for
"\end{equation".)  I know that Emacs (my choice) and VI can do this
auto-expansion natively ... not sure if TeXShop can do this on its
own, but there are add-on utilities like TypeIt4Me that can add this
capability to any Mac application.

Check out the FasTeX project, which is basically an extensible
shorthand system for LaTeX: http://www.cds.caltech.edu/~fastex/.  (My
Ph.D advisor helped develop it; I ported it over to Emacs and
subsequently became a die-hard convert.)

Cheers,
Ari


On 25/03/2008, Bruce Kellogg <rbmjk at alltel.net> wrote:
> Thanks for all the comments. One letter macros are too convenient
>  for me to give up, so I will have to work around this situation.
>
>
>  Bruce Kellogg
>  rbmjk at alltel.net
>  -------------
>
> And when things start to happen, don't worry, don't stew.
>  Just go right along. You'll start happening too.
>  Dr. Seuss
>
>
>
>
>  On Mar 24, 2008, at 9:56 PM, Ross Moore wrote:
>
>  > Hi all,
>  >
>  > On 25/03/2008, at 12:34 PM, Martin Costabel wrote:
>  >
>  >> Bruce Kellogg wrote:
>  >>> It is strange: when I process the file
>  >>> \documentclass[10pt,oneside,leqno]{article}
>  >>> \def \r{\rho}
>  >
>  >   Oh no!  ...
>  >
>  >>> \begin{document}
>  >>> G{\aa}rding
>  >>>  \end{document}
>  >>> I get an error message, and if I type "q" in the dialog box, I
>  >>> get a misspelt Garding with
>  >>> a Greek rho inserted. On the other hand, when I process the file
>  >>> \documentclass[10pt,oneside,leqno]{article}
>  >>> %\def \r{\rho}
>  >>> \begin{document}
>  >>> G{\aa}rding
>  >>>  \end{document}
>  >>> there is no error message and I get what I expect.
>  >>
>  >> I guess this is an example for why they recommend to use
>  >> \newcommand in latex instead of \def. With \newcommand you would
>  >> have got an error message telling you
>  >>
>  >> ! LaTeX Error: Command \r already defined.
>  >
>  >  ... and it is also an example of why you should not use
>  > 1-letter names for your own personal macros.
>  >
>  > There is too great a possibility of conflicting with
>  > something already defined -- in particular an accent
>  > or diacritic mark used primarily with other (i.e.
>  > non-English) languages.
>  >
>  > It is unwise to use even 2-letter command names without care.
>  >
>  > Grätzer mentions this, as Rule 2 on p.416 of his book.
>  >
>  >>
>  >> Indeed, in latex.ltx you can find the line
>  >>
>  >> \def \aa {\r a}
>  >>
>  >> --
>  >> Martin
>  >
>  >
>  > Hope this helps,
>  >
>  >       Ross
>  >
>  > ----------------------------------------------------------------------
>  > --
>  > Ross Moore                                       ross at maths.mq.edu.au
>  > Mathematics Department                           office: E7A-419
>  > Macquarie University                             tel: +61 (0)2 9850
>  > 8955
>  > Sydney, Australia  2109                          fax: +61 (0)2 9850
>  > 8114
>  > ----------------------------------------------------------------------
>  > --
>  >
>  >
>  >
>  >
>  > -------------------------- Helpful Info --------------------------
>  > TeX FAQ: http://www.tex.ac.uk/faq
>  > List Reminders and Etiquette: http://www.esm.psu.edu/mac-tex/list/
>  > List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
>  > List Archive: http://tug.org/pipermail/macostex-archives/
>  > Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>  >
>
>
>  -------------------------- Helpful Info --------------------------
>  TeX FAQ: http://www.tex.ac.uk/faq
>  List Reminders and Etiquette: http://www.esm.psu.edu/mac-tex/list/
>  List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
>  List Archive: http://tug.org/pipermail/macostex-archives/
>  Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>
>



More information about the macostex-archives mailing list