bug-texinfo
[Top][All Lists]
Advanced

[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, 17 Dec 2014 18:04:23 +0000

On Fri, Dec 12, 2014 at 4:54 AM, Per Bothner <address@hidden> wrote:
> May I suggest some tweaks for how @quotation and @indentedblock are
> translated?
>
> Currently, in HTML, @quotation becomes a <blockquote>, while @indentedblock
> becomes plain <div class="indentedblock"> - and then we use CSS to indent.
> This fails if stylesheets are disabled, or the default CSS style is
> replaced.

Thanks for the suggestion. It is not just @indentedblock; all of
preformatted block commands, like @example, also are output as a <div>
and indented with CSS.

> IMO I think it would be more logical to translate @indentedblock to
> <blockquote class="indentedblock"> and then change the builtin <style>
> to set
>   blockquote.indentedblock {margin-right: 0em}

I thought I would look at what the HTML standards say about the
semantics of <blockquote> to see if it would be appropriate. At
http://www.w3.org/TR/html401/struct/text.html, we can read:

"These two elements designate quoted text. BLOCKQUOTE is for long
quotations (block-level content)..."

and

"The usage of BLOCKQUOTE to indent text is deprecated in favor of style sheets."

(I haven't researched different versions of HTML standards but I
expect others would be similar.)

Probably only @quotation/@smallquotation quotation match this; the
semantics of @indentedblock could be anything, as it specifies how the
block is formatted, but not what the contents of the block are for.

Using <blockquote> for indentation would work. From the same standard
document, "However, as some authors have used BLOCKQUOTE merely as a
mechanism to indent text, in order to preserve the intention of the
authors, user agents should not insert quotation marks in the default
style." It's worth mentioning that there is already an option you can
use to makeinfo if you don't trust CSS to indent blocks: running it as
"makeinfo --html -c COMPLEX_FORMAT_IN_TABLE=1" will put blocks to be
indented inside a <table>.

> This has better fall-back if stylesheets are disabled or changed,

I can't see why this would be a problem. Most browsers today would
support CSS, so I don't see any harm in following the recommendation
of the HTML standards and relying on CSS for formatting.

Is there Is a problem with customizing the CSS for the Texinfo-output
HTML? If it's the case that customizing the CSS for some elements
cancels the default CSS for other elements (like for
"div.indentedblock"), maybe that can be changed, so you can customize
the CSS incrementally. (I don't know if that is the case.)



reply via email to

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