ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* diving into source code
@ 2002-06-20  9:58 Kris Hermans
  2002-06-20 17:16 ` Henning Hraban Ramm
  2002-06-20 20:54 ` Patrick Gundlach
  0 siblings, 2 replies; 6+ messages in thread
From: Kris Hermans @ 2002-06-20  9:58 UTC (permalink / raw)


Hello again!

After experimenting for a few weeks now zith ConTeXt, I really would like to
gain a deeper understanding of the source code. Therefore my question,
because I'm a TeX novice:

What are good documents to study, before actually diving into ConTeXt
source? I'm already reading "a gentle introduction to TeX" (Michael Doob).
Is this enough or is there better material around?

What I don't find in the ConTeXt manuals, is documentation on how to make
interactive, screen based documents and what are good strategies for
producing different versions (screen/print/questions/answers/...) from the
same base document. Any links to docs are also more than welcome!

kind regards,

Kris.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: diving into source code
  2002-06-20  9:58 diving into source code Kris Hermans
@ 2002-06-20 17:16 ` Henning Hraban Ramm
  2002-06-20 20:54 ` Patrick Gundlach
  1 sibling, 0 replies; 6+ messages in thread
From: Henning Hraban Ramm @ 2002-06-20 17:16 UTC (permalink / raw)


Am Donnerstag, 20. Juni 2002 11:58 schrieb Kris Hermans:
> What are good documents to study, before actually diving into ConTeXt
> source? I'm already reading "a gentle introduction to TeX" (Michael Doob).
> Is this enough or is there better material around?

If you really like to understand TeX, you should read Donald Knuth's TeXbook.
But you may not. ;-)

> What I don't find in the ConTeXt manuals, is documentation on how to make
> interactive, screen based documents and what are good strategies for

Oh, maybe you need glasses? ;-)
Look after "Widgets" or "Presentations".

And maybe you'd like to have a look at my presentations (see link below); 
they're all in german, but the code is english. ;-) Fetch "fiee-source.zip".

> producing different versions (screen/print/questions/answers/...) from the
> same base document.

That's easy:

\startmode[handout]
This should not go to the screen.
\stopmode

\startmode[screen]
This will not print
\stopmode

\startnotmode[handout]
If you use many modes you can make exclosures.
\stopnotmode

TeX such with "texexec --mode=handout" etc.

Grüßlis vom Hraban!
-- 
http://www.fiee.net/texnique/
---


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: diving into source code
  2002-06-20  9:58 diving into source code Kris Hermans
  2002-06-20 17:16 ` Henning Hraban Ramm
@ 2002-06-20 20:54 ` Patrick Gundlach
  2002-06-21 16:00   ` Henning Hraban Ramm
  2002-06-23 11:01   ` Hans Hagen
  1 sibling, 2 replies; 6+ messages in thread
From: Patrick Gundlach @ 2002-06-20 20:54 UTC (permalink / raw)


"Kris Hermans" <KrisHermans@advalvas.be> writes:

Hi,

> After experimenting for a few weeks now zith ConTeXt, I really would like to
> gain a deeper understanding of the source code. Therefore my question,
> because I'm a TeX novice:
> 
> What are good documents to study, before actually diving into ConTeXt
> source? 

1) a dutch dictionary ;)

2) the source.

Well, this is hard to say. I'd suggest that you generate the 'nice'
variants of the source code by (iirc) texexec --module supp-mis.tex
(and all the other source files you'd like to read; you need the nl
format for this and copy the file to a seperate dir). This gives you a
pdf version with nicely printed comments and examples. If you have
texexec built in your head (and a TeX-interpreter), you can read the
source directly. 

I am not really into the source but I suggest to start
syst-gen.tex. There are a lot of the macros defined that are needed
throughout the other files. But beware. You need a deep understanding
the way TeX works (the word \expandafter should not scare you, and a
catcode has nothing to do with the small furry creatures :) Don't let
the \dododododdodosomething irritate you. They are just Hans' way of
keeping the source obscure. 
Just seen something like this:

\def\dodogetargument#1################################1#2%

got it? This is why I think that reading any not trivial TeX code is
rather difficult. (Well, Forth is even worse :)

Then it might be helpful to have a look at the multilingual
interface (mult-ini.tex) After that, just go to some of the core* and
supp* files and see what is in there. The xtag* files are not suited
for first time reading. 

If you are really brave (and have *lots* of disk space) you can put a
\tracingall=1\starttext Hello World \stoptext in your tex file and
read the logfile :)

> I'm already reading "a gentle introduction to TeX" (Michael Doob).
> Is this enough or is there better material around?

I like 'the advanced TeX book' (David Salomon) really much. It is a
companion to the TeX book, but 'normal people' can understand
that one. It might help if you have programmed some little recursion
stuff yourself. 

> What I don't find in the ConTeXt manuals, is documentation on how to make
> interactive, screen based documents and what are good strategies for
> producing different versions (screen/print/questions/answers/...) from the
> same base document. Any links to docs are also more than welcome!

If I remember correctly, the pdftex faq is available in different
formats. The source code is available. Go for that one. And follow
Hennings advice to get his material. I haven't had a look into it yet but
I am sure it is very nice to study.

Patrick
-- 
I'll fade into the darkness


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: diving into source code
  2002-06-20 20:54 ` Patrick Gundlach
@ 2002-06-21 16:00   ` Henning Hraban Ramm
  2002-06-23 11:01   ` Hans Hagen
  1 sibling, 0 replies; 6+ messages in thread
From: Henning Hraban Ramm @ 2002-06-21 16:00 UTC (permalink / raw)


Am Donnerstag, 20. Juni 2002 22:54 schrieb Patrick Gundlach:
> formats. The source code is available. Go for that one. And follow
> Hennings advice to get his material. I haven't had a look into it yet but
> I am sure it is very nice to study.

Don't be too sure! ;-)

I'm not much more than a beginner, and the code is rather bad documented.
But it works. Probably because I copied or got most snippets from this list or 
Hans' templates.

Grüßlis vom Hraban!
-- 
http://www.fiee.net/texnique/
---


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: diving into source code
  2002-06-20 20:54 ` Patrick Gundlach
  2002-06-21 16:00   ` Henning Hraban Ramm
@ 2002-06-23 11:01   ` Hans Hagen
  2002-06-30  5:45     ` Johannes Hüsing
  1 sibling, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2002-06-23 11:01 UTC (permalink / raw)
  Cc: ntg-context

At 10:54 PM 6/20/2002 +0200, Patrick Gundlach wrote:

>the \dododododdodosomething irritate you. They are just Hans' way of
>keeping the source obscure.

more a matter of namespacing -)

>Just seen something like this:
>
>\def\dodogetargument#1################################1#2%
>
>got it? This is why I think that reading any not trivial TeX code is
>rather difficult. (Well, Forth is even worse :)

actually, such deeply nested args are seldom used; this is one of the few 
occasions where it cannot be avoided since #1 and #2 are delimiters 
(potential speedup: replace #1 by [ and #2 by ])

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: diving into source code
  2002-06-23 11:01   ` Hans Hagen
@ 2002-06-30  5:45     ` Johannes Hüsing
  0 siblings, 0 replies; 6+ messages in thread
From: Johannes Hüsing @ 2002-06-30  5:45 UTC (permalink / raw)


On Sun, Jun 23, 2002 at 01:01:18PM +0200, Hans Hagen wrote:
> At 10:54 PM 6/20/2002 +0200, Patrick Gundlach wrote:
> 
> >the \dododododdodosomething irritate you. They are just Hans' way of
> >keeping the source obscure.
> 
> more a matter of namespacing -)
> 

I am just glad you spared us \maakmaakmaakmaakmaakmaakzoiets :-)

Greetings

Johannes
-- 
Johannes Hüsing   There is something fascinating about science. One gets
hannes@ruhrau.de  such wholesale returns of conjecture from such a 
                  trifling investment of fact.                Mark Twain


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-06-30  5:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-20  9:58 diving into source code Kris Hermans
2002-06-20 17:16 ` Henning Hraban Ramm
2002-06-20 20:54 ` Patrick Gundlach
2002-06-21 16:00   ` Henning Hraban Ramm
2002-06-23 11:01   ` Hans Hagen
2002-06-30  5:45     ` Johannes Hüsing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).