[NTG-context] \definesomething?

Aditya Mahajan adityam at umich.edu
Sun Aug 27 06:19:19 CEST 2006


On Sun, 27 Aug 2006, Mojca Miklavec wrote:

> On 8/27/06, Pepe Barbe wrote:
>> On 8/25/06, Aditya Mahajan wrote:
>>> \define\mymacro#1 is equivalent to
>>>
>>> \def\mymacro#1 but also checks if mymacro has already been defined.
>>
>> Thanks for the info. I am using \define for something simple, define
>> some keywords with special format that I will be repeating a lot.
>> Something like:
>>
>> \define\mybi{\bf\sl BoldItalic}
>
> \define\mybi{{\bs BoldItalic}}
>
> You need two braces, otherwise everything else will be bold italic as well.
>
>> Works fin except that if I use in a sentence like: This is \mybi word.
>
> Any space after a command is ignored (unless you start a new paragraph).
>
> This is \mybi{} word.
> This is \mybi\ word.

There is also \autoinsertnextspace but that is not to be spoken about 
;)

> Don Knuth has written an excellent book about TeX (TeXBOOK) that is
> really worth reading. Try to find it in a library

or a book store ....

> or to compile it from the source:
>    http://www.ctan.org/tex-archive/help/Catalogue/entries/texbook.html

Do not do that! The file is copyrighted and should not be TeXed. From 
the file:

% This manual is copyright (C) 1984 by the American Mathematical Society.
% All rights are reserved!
% The file is distributed only for people to see its examples of TeX input,
% not for use in the preparation of books like The TeXbook.
% Permission for any other use of this file must be obtained in writing
% from the copyright holder and also from the publisher (Addison-Wesley).

Aditya


More information about the ntg-context mailing list