Admonition "caption" option doesn't work with FOP backend?

40 views
Skip to first unread message

Grant Edwards

unread,
Jun 22, 2011, 3:12:35 PM6/22/11
to asci...@googlegroups.com
I can't seem to get the "caption" option for admonition
blocks/paragraphs to work with the FOP backend. The HTML output looks
right (says "Question" in the left column), but pdf output still says
"Note".

[icon=None, caption="Question"]
NOTE: Caption option doesn't work with FOP backend?

--
Grant Edwards grant.b.edwards Yow! Sign my PETITION.
at
gmail.com

Lex Trotman

unread,
Jun 22, 2011, 8:10:18 PM6/22/11
to asci...@googlegroups.com
On 23 June 2011 05:12, Grant Edwards <grant.b...@gmail.com> wrote:
> I can't seem to get the "caption" option for admonition
> blocks/paragraphs to work with the FOP backend.  The HTML output looks
> right (says "Question" in the left column), but pdf output still says
> "Note".
>
> [icon=None, caption="Question"]
> NOTE: Caption option doesn't work with FOP backend?

See the admonition :-) at the beginning of user guide 12.4.1 and later
where it explicitly says "Use the caption attribute to customize the
admonition captions (not applicable to docbook backend)."

Cheers
Lex

>
> --
> Grant Edwards               grant.b.edwards        Yow! Sign my PETITION.
>                                  at
>                              gmail.com
>

> --
> You received this message because you are subscribed to the Google Groups "asciidoc" group.
> To post to this group, send email to asci...@googlegroups.com.
> To unsubscribe from this group, send email to asciidoc+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/asciidoc?hl=en.
>
>

Grant Edwards

unread,
Jun 22, 2011, 8:26:02 PM6/22/11
to asci...@googlegroups.com
On 2011-06-23, Lex Trotman <ele...@gmail.com> wrote:
> On 23 June 2011 05:12, Grant Edwards <grant.b...@gmail.com> wrote:
>> I can't seem to get the "caption" option for admonition
>> blocks/paragraphs to work with the FOP backend. ?The HTML output looks

>> right (says "Question" in the left column), but pdf output still says
>> "Note".
>>
>> [icon=None, caption="Question"]
>> NOTE: Caption option doesn't work with FOP backend?
>
> See the admonition :-) at the beginning of user guide 12.4.1 and later
> where it explicitly says "Use the caption attribute to customize the
> admonition captions (not applicable to docbook backend)."

Yep. Found it.

Unfortunately, the user guide at http://www.methods.co.nz/asciidoc/userguide.html

is formatted such that it's so wide (at least in my browser) it's
difficult to read due to the constant left/right scrolling required.
In my browser a normal paragraph averages about 170 characters wide.

--
Grant Edwards grant.b.edwards Yow! SHHHH!! I hear SIX
at TATTOOED TRUCK-DRIVERS
gmail.com tossing ENGINE BLOCKS into
empty OIL DRUMS ...

Lex Trotman

unread,
Jun 22, 2011, 9:31:45 PM6/22/11
to asci...@googlegroups.com
On 23 June 2011 10:26, Grant Edwards <grant.b...@gmail.com> wrote:
> On 2011-06-23, Lex Trotman <ele...@gmail.com> wrote:
>> On 23 June 2011 05:12, Grant Edwards <grant.b...@gmail.com> wrote:
>>> I can't seem to get the "caption" option for admonition
>>> blocks/paragraphs to work with the FOP backend. ?The HTML output looks
>>> right (says "Question" in the left column), but pdf output still says
>>> "Note".
>>>
>>> [icon=None, caption="Question"]
>>> NOTE: Caption option doesn't work with FOP backend?
>>
>> See the admonition :-) at the beginning of user guide 12.4.1 and later
>> where it explicitly says "Use the caption attribute to customize the
>> admonition captions (not applicable to docbook backend)."
>
> Yep.  Found it.
>
> Unfortunately, the user guide at http://www.methods.co.nz/asciidoc/userguide.html
>
> is formatted such that it's so wide (at least in my browser) it's
> difficult to read due to the constant left/right scrolling required.
> In my browser a normal paragraph averages about 170 characters wide.


Welcome to my campaign for limited width text web pages in accordance
with W3C guidelines (about 80 characters ~ 35-40em). All Stuart has to
do is set :max-width: 40em instead of its current value of 70em,
please feel free to hassle him, I've been banging on in this and other
forums about it too much lately, people will be thinking I'm obsessed.
:-)

Cheers
Lex

Grant Edwards

unread,
Jun 22, 2011, 10:18:14 PM6/22/11
to asci...@googlegroups.com

I think I've complained about it before.

I've also complained about the same readability issues with auto
generated web pages at other sites (e.g. Gentoo documentation pages),
but often they claim that there's nothing they can do about it because
they html-generator is too dumb to realize that just because one line
of pre-formtted source code is 150 characters long that doesn't mean
everything else needs to be formatted that wide.

--
Grant

Lex Trotman

unread,
Jun 22, 2011, 10:36:04 PM6/22/11
to asci...@googlegroups.com

Asciidoc is of course smarter! (or at least doesn't try to be smart so
it isn't so dumb :-) So get them to change to asciidoc.

Preformatted content and images being too big is not something the
generator should care about. Yes they might extend beyond the normal
text (especially if the user has a small font size) and may need
scrolling but the user only has to scroll to read the
image/preformatted content not the text.

Cheers
Lex

Grant Edwards

unread,
Jun 22, 2011, 10:55:24 PM6/22/11
to asci...@googlegroups.com
On 2011-06-23, Lex Trotman <ele...@gmail.com> wrote:

>> I've also complained about the same readability issues with auto
>> generated web pages at other sites (e.g. Gentoo documentation pages),
>> but often they claim that there's nothing they can do about it

>> because the html-generator is too dumb to realize that just because


>> one line of pre-formtted source code is 150 characters long that
>> doesn't mean everything else needs to be formatted that wide.
>
> Asciidoc is of course smarter! (or at least doesn't try to be smart so
> it isn't so dumb :-) So get them to change to asciidoc.

I suggested that, but they say it would require a lot of work (which I
don't doubt).

> Preformatted content and images being too big is not something the
> generator should care about. Yes they might extend beyond the normal
> text (especially if the user has a small font size) and may need
> scrolling but the user only has to scroll to read the
> image/preformatted content not the text.

Exactly. But whatever they use for the Gentoo site formats all
paragraphs so that they're the same width as the widest "thing" on the
page -- even if that thing is pre-formated source code or a shell
session. As you can imagine, the results can be pretty bad --
especially if the monospaced font used for preformatted stuff is wide
compared to the "normal" font (and that usually seems to be the case).

--
Grant


Stuart Rackham

unread,
Aug 8, 2011, 1:24:47 AM8/8/11
to asci...@googlegroups.com

The big problem is that the text doesn't wrap when the browser window width
drops below 70em -- a restriction imposed by the the table based layout. The
table based layout was historically mandated because of IE6 CSS
incompatibilities. I've changed to the CSS based layout (layout2):

http://code.google.com/p/asciidoc/source/detail?r=9ffd3078924b3d7a2e074b7b6038465e742f3312

and uploaded the User Guide in the new layout (just the User Guide for now):

http://www.methods.co.nz/asciidoc/userguide.html

Newer browsers shouldn't have problems with the CSS.


Cheers, Stuart


>
> Cheers
> Lex
>

Reply all
Reply to author
Forward
0 new messages