On 25 August 2012 16:18, Lex Trotman <[email protected]> wrote:
> On 25 August 2012 15:35, Stuart Rackham <[email protected]> wrote:
>>
>>
>> On 25/08/12 15:45, Lex Trotman wrote:
>>>
>>> On 25 August 2012 13:30, Stuart Rackham <[email protected]> wrote:
>>>>
>>>>
>>>>
>>>> On 31/07/12 00:24, Wilhelm wrote:
>>>>>
>>>>>
>>>>> Hi again,
>>>>>
>>>>> I try to do the following: using a listing block an place a download
>>>>> icons
>>>>> beside the block.
>>>>>
>>>>> Originally I tried to use a margin-note, but fop does not support that
>>>>> already.
>>>>>
>>>>> So I try to use a table, and it works almost (later randomtext will be
>>>>> replace
>>>>> with the icon and the url to the source, the source will be generated
>>>>> with
>>>>> the
>>>>> sys macro).
>>>>>
>>>>> If there are better solutions for this, please give me a hint.
>>>>>
>>>>> The problem are the callouts. Trying the text below gives me:
>>>>>
>>>>> xsltproc --nonet ../xsl/fo-simple.xsl test.xml > test.fo
>>>>> test.xml:64: element co: validity error : ID CO1-1 already defined
>>>>> ring="unnumbered">public void add(Comparable&lt;T&gt; value) { // <co
>>>>> id="CO1-1"
>>>>
>>>>
>>>>
>>>> The error is occurring because the next callout sequence number is not
>>>> passed to the child asciidoc process that is being used to generate that
>>>> "asciidoc" format column in the table (each "asciidoc" formatted table
>>>> cell
>>>> is rendered by spawning a new asciidoc process and each asciidoc process
>>>> starts the numbering at 1).
>>>>
>>>> There's no easy way round this outside of putting source code examples
>>>> in inline listing blocks rather than in tables cells.
>>>
>>>
>>>
>>> Hi Stuart,
>>>
>>> Maybe asciidoc could generate the callout IDs as CO_filename_1_1 to
>>> get around the problem.  Of course the filename would have to have
>>> illegal characters replaced by say _ as is done with headings.
>>
>>
>> Hi Lex. The only problem is that there is no filename, the cell source is
>> piped in through stdin (unless I've misunderstood your suggestion).
>>
>> Cheers, Stuart
>
> Hi Stuart,
>
> Ahh, erm, oh, oops :)
>
> In that case I guess asciidoc needs a --callout-id option so asciidoc
> can pass a "uniquifying" string to the recursive invocations.  Any
> asciidoc just needs to add a unique extension to the string it gets in
> --callout-id each time it calls asciidoc again, just a number will do.
>
> So --callout-id=xxx would generate CO_xxx_1_1 and its recursive
> asciidocs would be passed --callout-id=xxx_yyy giving ids of
> CO_xxx_yyy_1_1 etc where xxx and yyy are numbers counting the
> (recursive) invocations at each level.
>
> Or maybe you would like to name it more generally than callout-id
> since I can imagine such a string uniquely identifying each asciidoc
> recursive invocation could have other uses.

Or just an attribute of course, instead of a new command line option,
say -a recursion_level=xxx_yyy.

Cheers
Lex


>
> Cheers
> Lex
>
>
>
>>
>>
>>>
>>> Cheers
>>> Lex
>>>
>>>>
>>>> Cheers, Stuart
>>>>
>>>>
>>>>
>>>>>
>>>>>
>>>>> test case follows:
>>>>>
>>>>>
>>>>>
>>>>> [cols="<95%asciidoc,>.<5%",frame="none",grid="none",options="header",role="code"]
>>>>> |====
>>>>> |Überschrift |
>>>>> |["source","java",role="codeintable"]
>>>>> ----
>>>>> public void add(Comparable<T> value) { // <1>
>>>>> }
>>>>> ----
>>>>> <1> Bla
>>>>>    | randomtext
>>>>> |====
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> [cols="<95%asciidoc,>.<5%",frame="none",grid="none",options="header",role="code"]
>>>>> |====
>>>>> |Überschrift |
>>>>> |["source","java",role="codeintable"]
>>>>> ----
>>>>> public void add(Comparable<T> value) { // <1>
>>>>> }
>>>>> ----
>>>>> <1> Bla
>>>>>    | randomtext
>>>>> |====
>>>>>
>>>>>
>>>>
>>>> --
>>>> 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.
>>

-- 
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