Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Info Req: WEB's history/popularity

2 views
Skip to first unread message

Kingsley F. Kerce

unread,
Jun 9, 1990, 7:46:11 PM6/9/90
to
How popular is WEB? What well-known programs have been written using
it? (I know TeX has.) Is WEB too cumbersome to use for anything
other than midsized to large software projects? Is web2c just as
popular? How buggy are WEB and web2c? Any commercial developers
using it for structured docs on projects? What's Stanford U.'s
outlook on it? Have any commercial types taken the idea and
implemented something similar to WEB, or was the WEB idea taken from a
previous package (commercial or otherwise)? What's the history of WEB
since Knuth's publishing? Why am I asking so many questions?

Anecdotes welcome.
Email please...thanks
--
Kingsley Kerce USnail: Dept. of Computer Sci. (or Dept. of Psych.)
Email: ke...@nu.cs.fsu.edu Florida State University
Work Phone: (904) 644-5436 Tallahassee, FL 32306

Ajay Shah

unread,
Jun 10, 1990, 7:53:12 PM6/10/90
to
In article <KERCE.90J...@nu.cs.fsu.edu> ke...@nu.cs.fsu.edu (Kingsley F. Kerce) writes:
>How popular is WEB? What well-known programs have been written using
...

>since Knuth's publishing? Why am I asking so many questions?
Why did Knuth use Web? He's a smart guy, and not likely to be
flaky, so why Web? Knowing him, aren't you surprised he didn't
just go off and define a language he felt convenient to him? But
what the hell is Web anyway? If it's a language then why
translate to C? Why shouldn't I ask so many questions? I question
therefore I am (ack! someone just cut me off)
_______________________________________________________________________________
Ajay Shah, (213)747-9991, ajay...@usc.edu
The more things change, the more they stay insane.
_______________________________________________________________________________

Asbjorn Saetran

unread,
Jun 11, 1990, 5:13:43 AM6/11/90
to
I'm writing a paper in which I need an environment for short (<20 lines)
code fragments. The code should be typeset in \tt, just like in the verbatim
environment. But in addition I would to be able to add a caption, for example
to give a short explanation to the code. An example:

text text text text text text
\begin{codefragment}
/*
* Fill InitBlock
*/
#ifdef MONA
E->ed_ib.ib_mode = bit(15); /* promiscues mode */
#endif
E->ed_ib.ib_padr[0] = etheraddr[1];
E->ed_ib.ib_padr[1] = etheraddr[0];
\caption{Code for setting the mode bit in the Lance chip}
\end{codefragment}
more text text text text text text

This should be typeset as:

text text text text text text


/*
* Fill InitBlock
*/
#ifdef MONA
E->ed_ib.ib_mode = bit(15); /* promiscues mode */
#endif
E->ed_ib.ib_padr[0] = etheraddr[1];
E->ed_ib.ib_padr[1] = etheraddr[0];


Code fragment 1. Code for setting the mode bit in the Lande chip.


more text text text text text text

I tried to use \newenvironment and build on the 'verbatim' environment, but
failed. Has anyone out in there in netland constructed something like this,
or does anyone have suggestions to how it could be done?

Greetings from Troms\o .
Asbj\o rn S\ae tran
University of Troms\o
Troms\o , Norway.
asbj...@sfd.uit.no

Kevin Klop

unread,
Jun 11, 1990, 2:28:29 PM6/11/90
to
In article <1990Jun11.0...@hod.uit.no> asbj...@sfd.uit.no (Asbjorn Saetran) writes:
>I'm writing a paper in which I need an environment for short (<20 lines)
>code fragments. The code should be typeset in \tt, just like in the verbatim
>environment. But in addition I would to be able to add a caption, for example
>to give a short explanation to the code. An example:
>

>text text text text text text
>
>

> /*
> * Fill InitBlock
> */
>#ifdef MONA
> E->ed_ib.ib_mode = bit(15); /* promiscues mode */
>#endif
> E->ed_ib.ib_padr[0] = etheraddr[1];
> E->ed_ib.ib_padr[1] = etheraddr[0];
>
>
> Code fragment 1. Code for setting the mode bit in the Lande chip.
>
>
>more text text text text text text
>

Funny you should ask. It was for this prticular type of operation that I asked
about the indenting earlier. Here's how I solved it in plain TeX:

\def\Listing{
\interspace % A macro that places a reasonable amount of blank space on the page
$$\ast\ast\ast\ast$$
\halfinterspace
\begingroup
\tt
\advance\leftskip by 36pt
\obeylines
}
\def\EndListing#1{
\endgroup
\halfinterspace
\centerline{Listing \the\ListingNo. #1}
\advance\ListingNo by 1
}
\countdef\ListingNo = 127

So, to typeset your code, I would have used:

\Listing


/*
* Fill InitBlock
*/
#ifdef MONA
E->ed_ib.ib_mode = bit(15); /* promiscues mode */
#endif
E->ed_ib.ib_padr[0] = etheraddr[1];
E->ed_ib.ib_padr[1] = etheraddr[0];

\EndListing{Code for setting the mode bit in the Lande chip.}


-- Kevin --

Asbjorn Saetran

unread,
Jun 12, 1990, 7:36:38 AM6/12/90
to
Thanks to all who answered my query about a 'code' environment. One of the
answers, with a minor change and used in conjunction with a modified 'verb-
atim' environment, fills the bill. This posting presents the solution.

Review of problem: I wanted an environment to include short (<20 line)
fragments of code in a report. The environment should be similar to the
'verbatim' environment in that text should be typeset with \tt and all
characters interpreted literally, but in addition it should offer the
possibility of adding a caption (like in 'figure' and 'table' environments).
The code fragments should be numbered.

math...@maths.su.oz.au (Andrew) proposed the following solution (reposted
with permission) which satisfies all these conditions:

>Hi again. In an effort to avoid my thesis I decided that you
>might be interested in cross-referencing these things -
>afterall you want them numbered. Below is a version which
>allows this. If you don't want to refer to the segment later
>you give it a second argument of "N"
>
>\documentstyle[12pt]{report}
>
>\newcounter{Code}
>
>\newenvironment{code}[2]%
> {\refstepcounter{Code}% %** <- this is better than the \addtocounter on "version 1"
> \if#2N{}\else\label{#2}\fi%
> \def\CAPTION{#1}\begin{verbatim}}%
> {\centerline{Code fragment \theCode.\quad\CAPTION}}
>
>
>\begin{document}
> Some innocent innocuous pieces of tex
> blaah
>
> \begin{code}{A lovely caption}{ONE} %** <- can \ref{ONE} it!!
> Some code ##!&^%&*^%!()*&!
>
>> 09840938234#$!%$#!
> \end{verbatim}\end{code} %% note the \end{verbatim}
>
> More innocent text. In Fragment~\ref{ONE} we something
> happending and get a label, but the next one needs no
> label so we don't give it one.
>
> \begin{code}{A lovely caption}{N} %** <- no reference
> Some code ##!&^%&*^%!()*&!
>
> 09840938234#$!%$#!
> \end{verbatim}\end{code}
>
> After all, why should a repeated segment get two labels!
>
>\end{document}

I've made a minor change to this solution to ensure proper vertical spacing
between the code fragment and preceding and succeeding text. The modified
solution uses \vspace{\intextsep} to achieve this:

\newcounter{Code}
\newenvironment{code}[2]%
{\refstepcounter{Code}%
\if#2N{}\else\label{#2}\fi%
\def\CAPTION{#1}\vspace{\intextsep}\begin{verbatim}}%
{\centerline{Code fragment \theCode.\quad\CAPTION}\vspace{\intextsep}}

Finally, the standard 'verbatim' environment does not deal with tabs (of
which there are many in my code!) in a natural way (they are interpreted
as spaces). Michael Fine (sorry, no email address) has made an alternative
'verbatim' environment that does this, and in addition offers the posibility
of including entire files of code. This is part of the heading of Mr. Fine's
.sty file:

>% Verbatim With Tabbing and Page Breaks
>%
>% Written by:
>% Michael Fine
>% Distributed Systems Architecture.
>% September 1987
>%
>% This environment is similar to the LaTeX verbatim environment but it
>% interpretes tab characters as usually expected. It has the
>% additional feature that a CTL-L in the verbatim environment invokes
>% the LaTeX macro \newpage (thereby giving you some control over page
>% breaks).
>%
>% There is also a command \inputverbatim which can be used to specify
>% a file to be input and typeset in the verbatim environment.

I got this file by anonymous ftp some time ago, but have neither the address
of the machine I got it from, nor the address of Mr. Fine. The file contains
no restrictions on redistribution, so if it isn't available from any other
source, and interest warrants it, I will make it available for anonymous ftp
from a machine on our site.

0 new messages