[texhax] tex
Reinhard Kotucha
reinhard.kotucha at web.de
Mon Feb 21 03:08:25 CET 2005
>>>>> "moheb" == moheb missaghi <moheb1333 at comcast.net> writes:
Please avoid HTML in mails.
> I am interested in writing new packages. I appreciate any answers
> to these questions: 1. Do I needs tex source code? When Lamport
> wrote latex did he modify tex executable or he just wrote a bunch
> of macros in place of or in addition to plaintex? If latex is a
> bunch of macros [...]
You definitely do not have to read the source code of tex (the
program). Lamport just provided macros.
> why do I have a latex executable which I run on my
> .tex files?
Just for your convenience. tex and latex are the same files, instead
of forcing you to type "tex \&latex", a program can find out under
which name it had been called (ARGV[0] in C) and it loads the
appropriate (precompiled) macro package automatically.
> 2. Does it matter to know tex well if I want to develop new
> packages? If it does could you tell me what is the best book,
> help, documentation for tex (particularly free resources)?
If you talk about plain tex, Donald Knuth's texbook is a good choice.
But it's not free.
> 3. I like to write a .tex file which changes according to the
> value of a variable say x inside the .tex file. Other things in
> the file depend on the x value by means of some arithmatic
> operations. Does tex accept arithmatic values as parameters?
Tex macros accept parameters, files do not. But external files see
everything defined in the file from which they had been called, for
instance:
\def\scalefactor{1.2}
\input scale.tex
then in scale.tex you can say
\def\scale#1{....}
\scale{\scalefactor}
Is it this what you need?
Are you sure that latex or context do not already provide what you
need?
Regards,
Reinhard
--
----------------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-4592165
Marschnerstr. 25
D-30167 Hannover mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------
More information about the texhax
mailing list