emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: narrow-to-here-document


From: David Kastrup
Subject: Re: narrow-to-here-document
Date: 21 Jun 2003 16:48:09 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Ilya Zakharevich <address@hidden> writes:

> On Sat, Jun 21, 2003 at 10:01:31AM +0200, David Kastrup wrote:
> > TeX is one particular contestant.  There are forms of "Literate
> > Programming" with a heavy mixture of code and comments, but every
> > reference manual contains C code passages, shell scripts and similar
> > stuff.  An excerpt:
> 
> TeX has no HERE documents.  Period.

An interesting style of discussion, given that I provided examples.

> There are *programming styles* in TeX (as far as can call fighting
> with TeX deficiencies programming ;-[) which provide a poor-man
> approximations to HERE documents.

The examples given were not concerned with programming in TeX.  They
demonstrated various ways to embed program code into documents
typeset with TeX.

> However, the target of the discussion is how to add mode-specific
> functions which find boundaries of the given HERE documents.
> 
> The problem with TeX is that given no standard way to define HERE
> docs, one cannot define such a function

listings.sty provides one of various ways for including documents in
particular languages, and AUCTeX has hooks for packages.  It could
easily use one for listings.sty.

Knuth's WEB system of structured documentation (aka Literate
Programming) has well defined semantics for including code pieces in
Pascal or (for CWEB) C in what amounts to a TeX document

noweb has well-defined ways to do the same (illustrated source code
in some programming language, using TeX for the typesetting).

So I think that the potential applicability of such functionality
can't be completely summarized with "TeX has no HERE documents.
Period."  For the sake of discussing the matter at hand, I don't see
that it would make sense not to consider the various TeX-based
applications here, too.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

[Prev in Thread] Current Thread [Next in Thread]