Re: [docbook-apps] Section[1] only in toc

2020-04-02 Thread Peter Fleck
Brilliant. Worked perfectly.

Peter

On Thu, 2 Apr 2020 at 16:32, Bob Stayton  wrote:

> Hi Peter,
>
> This is what I would try (I haven't tested it, so let me know if it
> doesn't work).
>
> In fo/autotoc.xsl, elements for a TOC are selected as a set of $nodes and
> then those nodes are processed in mode="toc".   In those templates, each
> line in the toc is generated by calling the template named "toc.line".
> This template handles an article:
>
> 
>
> You can create a custom template that matches on only "article" that
> removes the call to "toc.line" and processes the top-level sections in a
> for-each loop:
>
> 
>
>   
>   
> 
>
> The "toc.line" template does not process any subsections.
>
> Bob staytonb...@sagehill.net
>
> On 4/1/2020 2:05 AM, Peter Fleck wrote:
>
> Yes, sorry FO, I know I can use a manual.toc for HTML.
>
> Thanks,
>
> Peter
>
> On Tue, 31 Mar 2020 at 23:27, Bob Stayton  wrote:
>
>> You didn't mention whether this was for FO or HTML type of output.
>>
>> Bob staytonb...@sagehill.net
>>
>> On 3/31/2020 2:08 PM, Peter Fleck wrote:
>>
>> I have an abnormal use case.
>>
>> The source file is a book with many articles, however the TOC is to be
>> first level sections of each article and not the article title itself.
>>
>> Example:
>>
>> 
>>  -- not included
>>  -- included
>>  -- included
>> ...
>> 
>> 
>>  -- not included
>>  -- included
>>  -- included
>> ...
>> 
>>
>> Any pointers would be appreciated.
>>
>> Thanks,
>>
>> Peter
>>
>>


Re: [docbook-apps] Section[1] only in toc

2020-04-02 Thread Bob Stayton

Hi Peter,

This is what I would try (I haven't tested it, so let me know if it 
doesn't work).


In fo/autotoc.xsl, elements for a TOC are selected as a set of $nodes 
and then those nodes are processed in mode="toc".   In those templates, 
each line in the toc is generated by calling the template named 
"toc.line".  This template handles an article:




You can create a custom template that matches on only "article" that 
removes the call to "toc.line" and processes the top-level sections in a 
for-each loop:



   
  
  


The "toc.line" template does not process any subsections.

Bob Stayton
b...@sagehill.net

On 4/1/2020 2:05 AM, Peter Fleck wrote:

Yes, sorry FO, I know I can use a manual.toc for HTML.

Thanks,

Peter

On Tue, 31 Mar 2020 at 23:27, Bob Stayton > wrote:


You didn't mention whether this was for FO or HTML type of output.

Bob Stayton
b...@sagehill.net  

On 3/31/2020 2:08 PM, Peter Fleck wrote:

I have an abnormal use case.

The source file is a book with many articles, however the TOC is
to be first level sections of each article and not the article
title itself.

Example:


                        -- not included
    -- included
    -- included
...


                          -- not included
    -- included
    -- included
...


Any pointers would be appreciated.

Thanks,

Peter




Re: [docbook-apps] Section[1] only in toc

2020-04-01 Thread Peter Fleck
Yes, sorry FO, I know I can use a manual.toc for HTML.

Thanks,

Peter

On Tue, 31 Mar 2020 at 23:27, Bob Stayton  wrote:

> You didn't mention whether this was for FO or HTML type of output.
>
> Bob staytonb...@sagehill.net
>
> On 3/31/2020 2:08 PM, Peter Fleck wrote:
>
> I have an abnormal use case.
>
> The source file is a book with many articles, however the TOC is to be
> first level sections of each article and not the article title itself.
>
> Example:
>
> 
>  -- not included
>  -- included
>  -- included
> ...
> 
> 
>  -- not included
>  -- included
>  -- included
> ...
> 
>
> Any pointers would be appreciated.
>
> Thanks,
>
> Peter
>
>


Re: [docbook-apps] Section[1] only in toc

2020-03-31 Thread Bob Stayton

You didn't mention whether this was for FO or HTML type of output.

Bob Stayton
b...@sagehill.net

On 3/31/2020 2:08 PM, Peter Fleck wrote:

I have an abnormal use case.

The source file is a book with many articles, however the TOC is to be 
first level sections of each article and not the article title itself.


Example:


                -- not included
    -- included
    -- included
...


                  -- not included
    -- included
    -- included
...


Any pointers would be appreciated.

Thanks,

Peter


[docbook-apps] Section[1] only in toc

2020-03-31 Thread Peter Fleck
I have an abnormal use case.

The source file is a book with many articles, however the TOC is to be
first level sections of each article and not the article title itself.

Example:


 -- not included
 -- included
 -- included
...


 -- not included
 -- included
 -- included
...


Any pointers would be appreciated.

Thanks,

Peter