On Sat, Dec 10, 2011 at 1:03 PM, Dag Wieers <[email protected]> wrote:
> On Sat, 10 Dec 2011, Lex Trotman wrote:
>
>> On Sat, Dec 10, 2011 at 12:35 PM, Dag Wieers <[email protected]> wrote:
>>>
>>> On Sat, 10 Dec 2011, Dag Wieers wrote:
>>>
>>>> Now I am going to start implementing the new comment/annotation
>>>> proposal.
>>>> Using a comment-block instead of a listingblock !
>>>
>>>
>>>
>>> I get the following error I do not understand:
>>>
>>>    asciidoc: WARNING: test-odt.txt: line 257: missing section: [comment]
>>>
>>> While I am using the following in odt.conf:
>>>
>>>    [blockdef-comment]
>>>    delimiter=^/{4,}$
>>>    options=skip
>>
>>
>> The above makes it a real comment, ie not output.  This option should
>> be part of the default style definition so only that gets skipped, ie
>> a real comment. (I think, I havn't had a chance to try it).
>
>
> I tried this too (which I liked more), but to no avail:
>
>    [blockdef-comment]
>    delimiter=^/{4,}$
>    options=sectionbody
>    posattrs=style,name,date
>    default-style=options="skip"
>    annotation-style=template="annotationblock"
>    comment-style=template="commentblock"
>
> But it spawns the same error:
>
>
>    asciidoc: WARNING: test-odt.txt: line 257: missing section: [comment]
>
> So I have been trying a lot of other stuff. But I rather understand what
> this error means. And why defining a [comment] section fixes both this error
> and the same error for [annotation] while only showing DUH! once :-(
>

Unfortunately I think there is some internal hardcoded processing of
blocks called "comment" in asciidoc.py.  The following works fine:

[blockdef-fred]
delimiter=^%{4,}$
posattrs=style,name,date
style=default
default-style=template="skipcomment",options=("skip",)
annotation-style=template="annotationblock"
comment-style=template="commentblock"

[annotationblock]
{hideannotations%}<text:p
text:style-name="empty"><office:annotation><dc:creator>{name=AsciiDoc}</dc:creator><dc:date>{date=}</dc:date><text:p>|</text:p></office:annotation></text:p>

[commentblock]
{showcomments#}<text:p text:style-name="comment">|</text:p>

[skipcomment]
{empty}

If the block name is [blockdef-comment] it doesn't work.

(had to change the delimeter otherwise the standard comment is
recognised first and it never gets to this, but the point is that if
the block name is different its ok)

I don't think Stuart has made the fix yet to allow his suggested:

[style]
////
a styled comment
////

syntax.

Cheers
Lex

>
> --
> -- dag wieers, [email protected], http://dag.wieers.com/
> -- dagit linux solutions, [email protected], http://dagit.net/
>
> [Any errors in spelling, tact or fact are transmission errors]
>
> --
> 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