Re: <PRE tab-width=4> (Thumbs Down)

Daniel W. Connolly (
Fri, 27 Jan 95 12:42:38 EST

In message <>, Wayne Long writes:
> > Actually... now that I think about it, the problem of implementing:
> >
> > <a href="foo.c">foo.c</a>
> >
> > has nothing to do with HTML at all: that's a text/plain body. You'd
> > have to convince the browser to display tabs in plain text documents
> > at every 4 spaces. So you'd have to put the info in the link,
>Now you're with me... In the link info.
>The tab setting can have different values for different text documents.
>Only the HTML author knows what the tab setting is for a given document,
>therefore the setting value for a given document must be passed along
>with the link.
>I suppose a special mime type could be deployed but this would not
>be usable beyond a given site.

What limits a special MIME type to a given site?

First, choose one of:

Content-Type: text/plain; tabs-width=4
Content-Type: text/tabbed; tabs-width=4

as the way of indicating that a tab means 4 spaces.

If you're serving foo.c over HTTP, you just configure your server to
send that out (and get browsers fixed w.r.t. parsint MIME content
types with parameters!). In the interim, you can configure your browser
to launch an external viewer for text/tabbed, ala:

text/tabbed: less %s -x%{tab-width} %needsterminal

If you're _not_ serving foo.c over HTTP, you have to be able to put
this info in the link.

I have argued for a CONTENT-TYPE attribute on the <A> element for
over two years. There are cases where the author of the link knows
more than the receiving browser can infer about the content type.

For example, if there's a postscript file on an FTP server out there
called "report_127," you effectively can't link to it given today's
web. The browsers just look at the filename to determine the
type. (OK... they could look for %! like the unix file command, but
(1) they don't, and (2) for things like this tab witdth situation,
there's nothing in the file to tell you what its type is.)

So we should be able to write:

<a href="foo.c" content-type="text/tabbed; tab-width=4">foo.c</a>

I think this is a good idea, but I have never been able to convince
enough folks to get it deployed :-{