On Thu, Nov 10, 2011 at 7:09 PM, Stuart Rackham <[email protected]> wrote:
>
>
> On 10/11/11 14:47, Lex Trotman wrote:
>>
>> Hi Stuart,
>>
>> Testing has shown two problems as below, source and the newsworthy
>> part of the output attached (gazillion style defs left off :).
>>
>> On Tue, Nov 8, 2011 at 7:35 PM, Stuart Rackham<[email protected]>  wrote:
>>>
>>> I've added global 'blockname' attribute that is dynamically updated to
>>> the
>>> current block short name. Applies to delimited blocks, lists and
>>> tables.
>>>
>>
>> It needs to be the containing template, not the blockdef.  Otherwise
>> we have no way of differentiating between examples and admonitions as
>> far as I can see.  That means that admonition paragraphs are styled as
>> example not admonition.
>>
>> If it used the template it would work, eg for [exampleblock]
>> {blockname} becomes "example", for [admonitionblock] it becomes
>> "admonition" etc.
>>
>> Or some other method of differentiating of course :)
>
> Hi Lex
>
> OK, I've switched to using the block 'name' attribute (an obscure block
> definition attribute hitherto only used in admonition styles). The output is
> more fine-grained (e.g. you get 'note', 'tip', 'important', 'warning',
> 'caution' in place of 'admonitionblock' template name).
>
> Has the advantage of being able to be customized by the configuration file
> author without affecting the template section name interdependencies.
>
> I've got a couple of couple of things to tidy up but it seems to work,
> question is will is solve the problem?
>
> http://code.google.com/p/asciidoc/source/detail?r=136237afe5242216c2d567f57ddca2fb6cab1213

As I understand it, I think it will.

The expansion of names will probably cause a proliferation of ODT
styles, but hopefully that will just be one referring to another or
worst case a bunch of boring cut and paste, Dag is the ODT style
expert.


Cheers
Lex

>
>
>>
>>
>>>
>>> http://code.google.com/p/asciidoc/source/detail?r=08d77b0075c5a4075d3167850afc4b3a41cc6fdd
>>>
>>> To see what's going on run asciidoc with a block trace e.g.
>>>
>>>  asciidoc -a trace=block t.txt
>>>
>>> The ``short name'' is the text following the last dash in the conf
>>> file definition section name e.g. the quote delimited block is defined
>>> in the [blockdef-quote] section so the short name is 'quote'. The
>>> short name for tables is 'table'.
>>>
>>> So hopefully templates like:
>>>
>>> <text:p
>>> text:style-name="{style}"
>>> text:style-name="{style%}{blockname}-paragraph"
>>>>
>>> |
>>> </text:p>
>>>
>>
>> For paragraphs {style} is always defined to be "normal", never
>> undefined, so the above doesn't work.  This does,
>>
>> <text:p
>> text:style-name="{style$normal::{style}}"
>> text:style-name="{style$normal:}{blockname}-paragraph"
>>>
>>> |</text:p>
>>
>> but doing regex checks twice on every para in a long document is kinda
>> expensive.  Any thoughts.
>
> I'll have a think about this tomorrow.
>
>
> Cheers, Stuart
>
>>
>> Cheers
>> Lex
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "asciidoc" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/asciidoc?hl=en.
>
>

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

Reply via email to