closing paragraphs </p> (Was Re: [Pmwiki-users] Another idea bef..)

Reimer Behrends behrends
Fri Jan 16 10:11:50 CST 2004


On Wed, Jan 14, 2004 at 02:45:23PM -0700, Patrick R. Michaud wrote:
> A long discussion on <p> and PmWiki markup (feel free to skip)...
> 
> I don't think PmWiki has (or should have) "paragraphs" in the traditional
> sense.  What really exists are blank lines in the markup which the author
> generally wants to become blank lines in the output.  The fact that something
> could be represented by an HTML <p> tag is largely irrelevant as long as
> the output formats correctly.  This is why I'm somewhat in favor of using
> <br /><br /> instead of <p /> to mean "vertical space between elements".

The problem with that is that it is only by accident that the space
between paragraphs (i.e., the maximum of the top and bottom margins
defined for paragraphs) is 1.33em and equal to the height of the line.
If I set paragraph margins to, e.g.:

  p { margin: 0.667em 0 }

then using <br> to generate vertical white space will look all wrong.
Unfortunately, the height of the <br> element cannot be adjusted
properly in CSS.

The more general problem seems to be that the default margin settings
of HTML do not produce the desired output for you (and in some cases
that you want different margin settings in different contexts). I am
not sure that this can be solved adequately entirely with HTML
markup that is not annotated with CSS.

For another example, consider the case where I am trying to typeset
paragraphs in the traditional way. I.e, there are no margins around
paragraphs, but instead the first line is indented by 1em, i.e.
something like:

  p { margin: 0 }
  p:first-letter { padding-left: 1em } 

I'd also add additional CSS to remove the indent of the first paragraph
after a heading or as part of a list element. Now, the wiki markup:

| Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
| * Class aptent taciti sociosqu ad litora torquent per conubia nostra,
|   per inceptos hymenaeos. \\\
|   Vestibulum bibendum, leo at bibendum rutrum, massa purus
|   dapibus arcu, eget auctor turpis ligula imperdiet lectus.
| * Mauris pulvinar quam eu enim.
| Cras vehicula gravida nulla.

will generate the following output when using <br> as a separator:

| Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
|
| * Class aptent taciti sociosqu ad litora torquent per conubia nostra,
|   per inceptos hymenaeos.
|
|   Vestibulum bibendum, leo at bibendum rutrum, massa purus
|   dapibus arcu, eget auctor turpis ligula imperdiet lectus.
| * Mauris pulvinar quam eu enim.
|
| Cras vehicula gravida nulla.

rather than the desired:

| Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
|
| * Class aptent taciti sociosqu ad litora torquent per conubia nostra,
|   per inceptos hymenaeos.
|     Vestibulum bibendum, leo at bibendum rutrum, massa purus
|   dapibus arcu, eget auctor turpis ligula imperdiet lectus.
| * Mauris pulvinar quam eu enim.
|
| Cras vehicula gravida nulla.

Again, the use of <br> cannot be corrected using CSS.

Unfortunately, as you may have noticed, I am naming only the
problem and do not have a workable solution, either, except
for using CSS at a much larger scale.

			Reimer Behrends



More information about the pmwiki-users mailing list