[OS X TeX] Scandinavian {\aa} ??
Ross Moore
ross at ics.mq.edu.au
Tue Mar 25 17:36:52 EDT 2008
Hi Ari,
On 26/03/2008, at 5:49 AM, Ari Stern wrote:
> Personally, I think this is a good argument for doing away with
> personal "shortcut" macros like this altogether.
Exactly right.
The macros that you put into your (La)TeX source should have
names that immediately recall their purpose and usage.
They should *not* be used simply as shorthands to
avoid typing a few extra characters.
(There are many ways to avoid excessive typing, some of
which have been mentioned already in this thread.)
> (Another argument is
> that it makes it hard to share TeX source files with collaborators,
> who may have different and/or conflicting macros.
Spot on.
Do not think that the only person who will ever see
your (La)TeX source is yourself.
You will share source with others.
You will submit papers to journals, and abstracts to conferences.
(Sometimes this will be via automated online systems.)
You will copy/paste from your own documents, without thinking
carefully about what personal macros you have defined and used.
If you have macros that conflict with those from the system,
or from other authors to the same collection or volume,
then you are creating a lot of work for somebody else who
would much prefer to be doing other things with your source
that are much more constructive.
> Still another is
> that it makes it harder to cut-and-paste formulas into different
> source files, programs like LaTeXiT, etc...)
The following TUGboat article should be required reading
for anyone who is thinking about defining their own macros:
http://tug.org/TUGboat/Articles/tb26-3/tb84gregorio.pdf
This one is amusing too, illuminating other traps that
commonly afflict (academic) authors:
http://tug.org/TUGboat/Articles/tb26-3/tb84tomaszewski.pdf
>
> 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.)
Some very good stuff has come out of that group. :-)
>
> 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
>> -------------
>> On Mar 24, 2008, at 9:56 PM, Ross Moore wrote:
>>>> ! 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.
This rule is the distillation of much communication amongst
George, myself and other very experienced TeX/TUG/LaTeX
personalities.
>>>> 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
------------------------------------------------------------------------
More information about the MacOSX-TeX
mailing list