Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Preserving spacing and whitespace

Reply
Thread Tools

Preserving spacing and whitespace

 
 
burchill
Guest
Posts: n/a
 
      09-06-2004
I am writing a program that will convert guitar tablature text files
into html files.

The biggest stumbling block is that html doesn't preserve spacing of a
txt file. Is there a tag that will preserve the spacing of the text
inside it ?

Any help appreciated.

--
Eps
 
Reply With Quote
 
 
 
 
Els
Guest
Posts: n/a
 
      09-06-2004
burchill wrote:

> I am writing a program that will convert guitar tablature
> text files into html files.
>
> The biggest stumbling block is that html doesn't preserve
> spacing of a txt file. Is there a tag that will preserve
> the spacing of the text inside it ?


<pre></pre>

--
Els
http://locusmeus.com/
Sonhos vem. Sonhos vo. O resto imperfeito.
- Renato Russo -
 
Reply With Quote
 
 
 
 
The Doormouse
Guest
Posts: n/a
 
      09-06-2004
burchill <(E-Mail Removed)> wrote:

> The biggest stumbling block is that html doesn't preserve spacing of a
> txt file. Is there a tag that will preserve the spacing of the text
> inside it ?


No, but you could try CSS or even SVG.

The Doormouse

--
The Doormouse cannot be reached by e-mail without her permission.
 
Reply With Quote
 
Deryck
Guest
Posts: n/a
 
      09-06-2004

"burchill" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I am writing a program that will convert guitar tablature text files
> into html files.
>
> The biggest stumbling block is that html doesn't preserve spacing of a
> txt file. Is there a tag that will preserve the spacing of the text
> inside it ?
>


http://www.codetoad.com/html/text/pre_tag.asp

The example is even about guitars.

Deryck


 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      09-06-2004
"Deryck" <(E-Mail Removed)> wrote:

> http://www.codetoad.com/html/text/pre_tag.asp
>
> The example is even about guitars.


Huh? The example is

<pre>

text file stuff here
complete with line breaks and things.

</pre>

and the page has little useful content - it has a very sloppy description
of the "HTML <PRE> tag", followed by user comments that range from mostly
pointless to absurd (including the use of invalid markup).

However, <pre> element _might_ be a solution, but it's best to learn to
use it from some nice tutorial or reference.

Moreover, this might even be a case for using Ruby markup. But I know
virtually nothing about guitars, so I can't really tell.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
Jeffrey Silverman
Guest
Posts: n/a
 
      09-06-2004
On Mon, 06 Sep 2004 12:48:09 +0000, The Doormouse wrote:

> No, but you could try CSS or even SVG.
>
> The Doormouse


I'm sorry, Doormouse, but that advice doesn't even make sense, *or*
answser the question. SVG to preserve spacing in a text file??

I realize that at this point I appear to be merely pestering you for no
reason other than your lackluster response to my post in another, similar,
newsgroup.

But at this time I'd like to see you refrain from giving advice or
answering questions until you at least have a bit more correct
information. Your posts are often not correct, or just shy of
being quite correct. And you come close to trolling more often than not.

okay, later, have a nice day.

--
Jeffrey Silverman
http://www.velocityreviews.com/forums/(E-Mail Removed)
** Drop "PANTS" to reply by email


 
Reply With Quote
 
Neal
Guest
Posts: n/a
 
      09-06-2004
On Mon, 6 Sep 2004 16:12:11 +0000 (UTC), Jukka K. Korpela
<(E-Mail Removed)> wrote:

> "Deryck" <(E-Mail Removed)> wrote:
>
>> http://www.codetoad.com/html/text/pre_tag.asp
>>
>> The example is even about guitars.

>
> Huh? The example is
>
> <pre>
>
> text file stuff here
> complete with line breaks and things.
>
> </pre>
>
> and the page has little useful content - it has a very sloppy description
> of the "HTML <PRE> tag", followed by user comments that range from mostly
> pointless to absurd (including the use of invalid markup).
>
> However, <pre> element _might_ be a solution, but it's best to learn to
> use it from some nice tutorial or reference.


I'm sure Jukka would have provided
http://www.w3.org/TR/html401/struct/text.html#edef-PRE had he had enough
time. Good thing I do.
 
Reply With Quote
 
Deryck
Guest
Posts: n/a
 
      09-06-2004

"Jukka K. Korpela" <(E-Mail Removed)> wrote in message
news:Xns955CC35904251jkorpelacstutfi@193.229.0.31. ..
> "Deryck" <(E-Mail Removed)> wrote:
>
> > http://www.codetoad.com/html/text/pre_tag.asp
> >
> > The example is even about guitars.

>
> Huh? The example is
>
> <pre>
>
> text file stuff here
> complete with line breaks and things.
>
> </pre>
>

Oh very well....the example is introduced to the reader as a solution to a
problem that involves a guitar tab in text format - which is pretty much
what the OP was trying to solve.

" Say you have a text file - perhaps you're a guitarist and you've got a
guitar tab in text format, or perhaps you have a text-based email document
you want to put quickly online. Do you have to go through all the bother of
adding <BR> and spacing it all out correctly?
"

Forgive me for not being more precise in my text that followed the link that
would solve the OP's problem.

Cheers

Deryck


 
Reply With Quote
 
Toby Inkster
Guest
Posts: n/a
 
      09-06-2004
Jukka K. Korpela wrote:

> Moreover, this might even be a case for using Ruby markup. But I know
> virtually nothing about guitars, so I can't really tell.


IIRC, Ruby only allows three lines of concurrant text. Guitar tabs need at
least 6 (one for each string, then perhaps a line for lyrics and maybe one
for chords)

<pre> is what the OP wants.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Now Playing ~ ./bruce_springsteen/gratest_hits/18_this_hard_land.ogg

 
Reply With Quote
 
burchill
Guest
Posts: n/a
 
      09-06-2004
Toby Inkster wrote:
> Jukka K. Korpela wrote:
>
>
>>Moreover, this might even be a case for using Ruby markup. But I know
>>virtually nothing about guitars, so I can't really tell.

>
>
> IIRC, Ruby only allows three lines of concurrant text. Guitar tabs need at
> least 6 (one for each string, then perhaps a line for lyrics and maybe one
> for chords)
>
> <pre> is what the OP wants.
>


Thanks all, PRE does indeed seem to work.

--
Eps
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Structure using whitespace vs logical whitespace cmdrrickhunter@yaho.com Python 10 12-16-2008 03:51 PM
Python AST preserving whitespace and comments Michal Kwiatkowski Python 1 08-28-2008 03:30 AM
Sign preserving Vs value preserving sophia.agnes@gmail.com C Programming 4 12-07-2007 03:14 PM
integral promotion, arithmetic conversion, value preserving, unsigned preserving??? TTroy C Programming 16 01-31-2005 10:20 PM
Whitespace where I don't want whitespace! Oli Filth HTML 9 01-17-2005 08:47 PM



Advertisments