Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Verbatim or the like

Reply
Thread Tools

Verbatim or the like

 
 
Dieter Britz
Guest
Posts: n/a
 
      09-21-2009
I use HTML markup directly, to make web pages, not web page tools. Now I
want to reproduce some text as is, i.e. not have it formatted. An example
might be a program, or, say, a poem. In my case, some BibTeX entries.

Is there an HTML markup that prevents formatting, like <NOFORMAT>, or
<LITERAL> or the like? I tried googling, but find only pointers to
buttons to press within web building tools - which I don't use.
--
Dieter Britz (dieterbritz<at>yahoo.com)
 
Reply With Quote
 
 
 
 
Jonathan N. Little
Guest
Posts: n/a
 
      09-21-2009
Ben C wrote:
> On 2009-09-21, Dieter Britz <> wrote:


>> Is there an HTML markup that prevents formatting, like <NOFORMAT>, or
>> <LITERAL> or the like? I tried googling, but find only pointers to
>> buttons to press within web building tools - which I don't use.

>
> PRE (stands for "preformatted" which is a euphemism for "not
> formatted").


To OP a handy reference for you:

http:://www.w3.org/TR/html4/index/elements.html

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      09-21-2009
Ben C wrote:

>> Is there an HTML markup that prevents formatting, like <NOFORMAT>, or
>> <LITERAL> or the like? I tried googling, but find only pointers to
>> buttons to press within web building tools - which I don't use.

>
> PRE (stands for "preformatted" which is a euphemism for "not
> formatted").


I would not call it a euphemism. Informally, <pre>...</pre> means: the text
data inside the tags has been formatted in a particular way, as regards to
the use of spaces, newlines, and other whitespace - don't change this the
way you usually (and for good reasons) do with text! Se it's preformatted
and must not be reformatted.

On the other hand, is such formatting essential to poetry? Poetry is
thousands of years older than written language, not to mention spaces and
significant newlines. While a poem can usually be divided into units we
might call "lines", in an abstract structural sense, and this concept can
usually be mapped to the concept of a line of text, I would rather use some
markup for the lines, say

<div class="poem">
<div>...</div>
<div>...</div>
....
<div>...</div>
</div>

The advantages might become obvious if you think how a poem should be
rendered in a small-size device, like a fairly primitive cell phone with a
small line length. Using <pre> you lose data or get a horizontal scroll bar.
Using the approach I suggest, you could use CSS to suggest indentation of
continuation lines in order to make the structure (division into abstract
"lines") understandable.

> Still need to escape < and > (use &lt; and &gt.


No, only "<" and "&" need to be escaped, and in some contexts only. It's a
good idea, though, to escape all of "<", ">", and "&" independently of
context (when they are not used for markup), just for simplicity. And of
these, "&" is probably the one that might appear in poetry...

--
Yucca, http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
nice.guy.nige
Guest
Posts: n/a
 
      09-21-2009
Ben C wrote:
[...]
> I wouldn't use PRE except for code listings.

[...]

You wouldn't use <code> then?

Cheers,
Nige

--
Nigel Moss
http://www.nigenet.org.uk
Replace "spamfree" in email address with "nigel" to reply
"Your mother ate my dog!", "Not all of him"
 
Reply With Quote
 
William Gill
Guest
Posts: n/a
 
      09-21-2009
Jonathan N. Little wrote:

> To OP a handy reference for you:
>
> http:://www.w3.org/TR/html4/index/elements.html
>

To OP Jonathon's hand must have stuttered a bit. The link is:

http://www.w3.org/TR/html4/index/elements.html

or you could try

http://www.w3.org/TR/html401/index/elements.html

--
Bill
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      09-21-2009
In article <>,
Ben C <> wrote:

> On 2009-09-21, Dieter Britz <> wrote:
> > I use HTML markup directly, to make web pages, not web page tools. Now I
> > want to reproduce some text as is, i.e. not have it formatted. An example
> > might be a program, or, say, a poem. In my case, some BibTeX entries.
> >
> > Is there an HTML markup that prevents formatting, like <NOFORMAT>, or
> ><LITERAL> or the like? I tried googling, but find only pointers to
> > buttons to press within web building tools - which I don't use.

>
> PRE (stands for "preformatted" which is a euphemism for "not
> formatted").
>
> Still need to escape < and > (use &lt; and &gt.


If you are in a hurry, select all the stuff in PRE and tell your GREP
enabled editor to replace <([^<>]+)> with \&lt;\1\&gt;

--
dorayme
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      09-21-2009
In article <pRNtm.18910$>,
"Jukka K. Korpela" <> wrote:

> Ben C wrote:
>
> >> Is there an HTML markup that prevents formatting, like <NOFORMAT>, or
> >> <LITERAL> or the like? I tried googling, but find only pointers to
> >> buttons to press within web building tools - which I don't use.

> >


>
> On the other hand, is such formatting essential to poetry? Poetry is
> thousands of years older than written language, not to mention spaces and
> significant newlines.


> While a poem can usually be divided into units we
> might call "lines", in an abstract structural sense, and this concept can
> usually be mapped to the concept of a line of text, I would rather use some
> markup for the lines, say
>
> <div class="poem">
> <div>...</div>
> <div>...</div>
> ...
> <div>...</div>
> </div>
>
> The advantages might become obvious if you think how a poem should be
> rendered in a small-size device, like a fairly primitive cell phone with a
> small line length. Using <pre> you lose data or get a horizontal scroll bar.
> Using the approach I suggest, you could use CSS to suggest indentation of
> continuation lines in order to make the structure (division into abstract
> "lines") understandable.
>


Some poetry is meant to be seen, something that straddles more
traditional notions (that lend to your mark up above) and visual art
(that do not). There is an argument for desisting from trying to cater
to primitive cell phones for this type of poem. A wrong impressionwill
be created. Better for a *difficulty* to exist than a ruination of a
fine visual poem.

--
dorayme
 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      09-22-2009
William Gill wrote:
> Jonathan N. Little wrote:
>
>> To OP a handy reference for you:
>>
>> http:://www.w3.org/TR/html4/index/elements.html
>>

> To OP Jonathon's hand must have stuttered a bit. The link is:


Yep, Jonath*a*n's hand has a mind of its own, a common affliction!

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
William Gill
Guest
Posts: n/a
 
      09-22-2009
Jonathan N. Little wrote:
> William Gill wrote:
>> Jonathan N. Little wrote:
>>
>>> To OP a handy reference for you:
>>>
>>> http:://www.w3.org/TR/html4/index/elements.html
>>>

>> To OP Jonathon's hand must have stuttered a bit. The link is:

>
> Yep, Jonath*a*n's hand has a mind of its own, a common affliction!
>

I think that was a brain tremor. Sorry.

--
Bill
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      09-22-2009
Ben C wrote:

> On 2009-09-21, nice.guy.nige <> wrote:
>> Ben C wrote:
>> [...]
>>> I wouldn't use PRE except for code listings.

>> [...]
>>
>> You wouldn't use <code> then?

>
> I do use that but only for function names or keywords etc. appearing
> in the middle of other text.


Odd.

> But you make a good point-- why not use it for code listings and make
> it display: block?


Because <code> is by definition inline (text-level) in HTML, and it
generally causes confusion and risks to make inline elements display as
blocks or vice versa. It's also pointless. If you don't like to use <pre>
(which I understand), then use <div> for a block. Using <code> inside it is
logical if the content is computer code. But it has nothing to do with the
issue of preserving whitespace.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

 
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
Verbatim Store 'n' Go problems - Win98 Steve Baker Computer Support 1 07-22-2004 04:47 AM
Verbatim Dual Layer luminos DVD Video 9 05-31-2004 03:00 AM
Best price for VERBATIM DVD+R Media? Sseaott Computer Support 5 05-07-2004 12:40 PM
Verbatim Dual format DVD Burner (Cendyne (NEC?)) Lance Hill DVD Video 2 09-15-2003 01:01 AM
Asus CRW-5224a (rebranded by Verbatim) G+S Computer Support 0 08-16-2003 04:37 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57