[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: @quotation and @indentedblock in html and DocBook

From: Gavin Smith
Subject: Re: @quotation and @indentedblock in html and DocBook
Date: Wed, 24 Dec 2014 16:35:25 +0000

On Mon, Dec 22, 2014 at 10:59 PM, Mahlon <address@hidden> wrote:
> Yes, that's an interesting idea. @quotation, @indentedblock, @example,
> @display and their @small. . . counterparts could receive class
> designations.

I believe they already have class designations that you could use to
apply your own CSS.

> I have some concerns though about how the style stubs in the <head> section
> would be configured to support this. Currently these stubs are extremely
> simple. Our existing template for the blockquote looks like this:
> blockquote.smallquotation {font-size: smaller}
> but this is not quite right because the @quotation command indents both left
> and right in the info output:
> blockquote.smallquotation {margin-right: 3.2em; font-size: smaller}

I don't see any need to override the browser's default margins for
blockquotes. We don't have to follow the Info output exactly. We just
want the default output to look reasonable, but it does not have to be
anything fancy.

> Should we then have something like this for our style stubs? (relies on the
> default left margin of <blockquote>):
> blockquote.quotation {margin-right: 3.2em;}
> blockquote.smallquotation {margin-right: 3.2em; font-size: smaller;}
> blockquote.indentedblock { /*nothing needed here*/ }
> blockquote.smallindentedblock {font-size: smaller;}
> blockquote.display {white-space: pre;}
> blockquote.smalldisplay {white-space: pre; font-size: smaller;}
> blockquote.example {font-family: monospace; white-space: pre;}
> blockquote.smallexample {font-family: monospace; white-space: pre;
> font-size: smaller;}

It looks like the output for @example is currently done with the <pre>
tag, which gives the monospaced font as well as preformatting. The
<pre> tag is used for @display as well (nested within a <div>) but the
monospaced font is turned off with CSS:

pre.display {font-family: inherit}

I think we should carry on using <pre> instead of "white-space: pre"
as it would work better when there is no CSS.

The proposed CSS for @example seems contradictory to me, using CSS to
define the font family, while changing from a "<div>" tag to a
"<blockquote>" tag to support the case of CSS being absent.

I'm not convinced we want to use blockquote for some of the other
commands, like "display" or "example". Although it would give
indentation when there is no CSS, there could be other undesirable
formatting, processing or display, due to it being marked as a
quotation. For example, I noticed recently when looking at a
blockquote in the Lynx browser that the text was coloured. We wouldn't
want all indented preformatted text (like code samples) to be
coloured. That is a minor example, but something similar may happen.
Even if the text is not indented the important information will still
be there (for example, where the line breaks are in a code sample).

> I also have had some discussions about the @exdent command used within these
> blocks. This command seems useless to me, but it exists, so we need to
> determine how (or if) it can be supported within these blocks. (see post of
> 23 November).

We will have to see if it can be supported.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]