best way to present multi format information

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

  I am a real newbie, reading my first book on HTML, reading all of the back
posts in this group, and making my first page.  Please rip me a new one if I
am out to lunch -- as long as you also tell me what to do to do things right!
  The administrator of my LAN gave me a site that can only be seen by employees
and showed me how to put up a hello world page with  notepad and ftp.  Later I
will put my pages on the world wide web.
  I have many, many files I want to publish, all in plain DOS text. I have a
utility that will convert from hard returns 79 characters per line to hard
returns at end of paragraph for user word wrapping, so I just take the second,
wrap a <p> and </p> around it, and insert  it in my HTML document.  Works great
and I added all the stuff to make it w3C validate as HTML 4.01 strict (I TOLD
you I have been  reading the back posts!!) ;=)
  I want to put at the top of each HTML page links that say the following
and links to .txt .rtf .doc versions and to my index page.
  Should I make the .txt have hard returns at 79 characters or at the end of
each paragraph?  Or should I do both, call them .txt and .text, and have my
administrator set the server to tell browsers that .text  is MIME text/plain?
DOS style hard returns, Unix style hard returns, or versions with each?  
I would like to have only one filename with  different extensions, so I
don't like filename1.txt and filenam2.txt much.
  What other formats should I offer?  I feel like I am ignoring the Mac and
Unix users.  I will buy whatever software I need to get any other versions
that you people think are worth having.  PDF?  Latex?  Some strange VI or
EMAC format I don't know about yet?
  Any more advice to a newbee who is willing to learn?

Re: best way to present multi format information

Buford Early wrote:

Quoted text here. Click to load it

What clients do you need to support? If primarily UNIX or Mac, use UNIX or
Mac line breaks. Otherwise, use Windows line breaks.

Windows line breaks kill all the birds with one stone. This is because
Windows uses "\r\n", which is a Mac line break ("\r") followed by a UNIX
one ("\n"). So all three of these systems *should* recognise it as a line
break (although some *might* add a funny-looking character at the end or
beginning of each line).

I like the idea of a choice between word-wrapped and no-word-wrapped
versions, but I fear that it might be a lot of work for you. If your
server supports PHP, you could do something like this:

        header("Content-Type: text/plain");
        $txt = '';
        function cap ($buffer) { global $txt; $txt.=$buffer; }
    All your paragraphs go here, with no word wrapping.
    La la la la la.
        /* X */
        if ($_GET['wrap']) print wordwrap($txt, 79);
        else print $txt;

Then you could link to it like so:

    <a href="filename.php">plain text</a>
    <a href="filename.php?wrap=1">plain text (with word wrapping)</a>

With a little creativity, you could insert some code where I've put an X
to change line break types too. :-)

Quoted text here. Click to load it

Us UNIX users aren't completely in the stone age. We do have web browsers,
text editors and word-processors, so your HTML, plain text, RTF and
(shock, horror!) usually even MS Word versions will work fine.

To finish, I'd say you're going overboard with the different formats.
I'd drop the RTF (most recent word processors can import HTML fine) and
perhaps even the plain text and MS Word versions.

Toby A Inkster BSc (Hons) ARCS
Contact Me  ~

Site Timeline