Thoughts on {maketoc} behaviour

View: New views
12 Messages — Rating Filter:   Alert me  

Thoughts on {maketoc} behaviour

by Mike Kerr :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

I was just thinking…  Many people use

 

!Page Title

{maketoc}

 

!!Sub-heading

Blahblah

 

!!Sub-heading2

Blah…

 

as a standard template.  I’ve always thought that this wasted a layer of headings.  Would a more logical approach to {maketoc} processing be to ignore any ! markup before {maketoc} appears?  This way you can still take advantage of the heading formatting for the text, but you also save an entire heading hierarchy.  Not to mention you don’t end up clicking on the link and going backwards for the first heading.

 

I can probably make this an option like {maketoc|ignoreprev} or {maketoc|-} or something.

 

Any thoughts on this?  Would that break anything outside of a specific page?  (eg. The Tiki book using structures)

 

Mike.

 

 

 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Tikiwiki-devel mailing list
Tikiwiki-devel@...
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel

Re: Thoughts on {maketoc} behaviour

by Gustavo Ferreira-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hello mike,

thanks for this!

i was always upset with {maketoc} including the first level heading...

i vote for a change.

regards,
- gustavo.


On Aug 9, 2008, at 3:20 AM, Mike Kerr wrote:

I was just thinking…  Many people use

 

!Page Title

{maketoc}

 

!!Sub-heading

Blahblah

 

!!Sub-heading2

Blah…

 

as a standard template.  I’ve always thought that this wasted a layer of headings.  Would a more logical approach to {maketoc} processing be to ignore any ! markup before {maketoc} appears?  This way you can still take advantage of the heading formatting for the text, but you also save an entire heading hierarchy.  Not to mention you don’t end up clicking on the link and going backwards for the first heading.

 

I can probably make this an option like {maketoc|ignoreprev} or {maketoc|-} or something.

 

Any thoughts on this?  Would that break anything outside of a specific page?  (eg. The Tiki book using structures)

 

Mike.



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Tikiwiki-devel mailing list
Tikiwiki-devel@...
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel

Re: Thoughts on {maketoc} behaviour

by ricksapir :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Great idea. How about adding the ability to specify the starting level (we can already specify the depth)?
 
So this page.....
 
! level 1
!! level 2
{maketoc start=3, maxdepth=4}
!!! level 3
!!!! level 4
!!!!! level 5
 
 
would produce....:
 
Contents
- Level 3
  - Level 4
 
 
Just need some basic error checking to ensure that maxdepth => start.
 
-R
 
 
---
Greetings from Sanford, NC, USA!
----- Original Message -----
Sent: Saturday, August 09, 2008 2:20 AM
Subject: [Tikiwiki-devel] Thoughts on {maketoc} behaviour

I was just thinking…  Many people use

 

!Page Title

{maketoc}

 

!!Sub-heading

Blahblah

 

!!Sub-heading2

Blah…

 

as a standard template.  I’ve always thought that this wasted a layer of headings.  Would a more logical approach to {maketoc} processing be to ignore any ! markup before {maketoc} appears?  This way you can still take advantage of the heading formatting for the text, but you also save an entire heading hierarchy.  Not to mention you don’t end up clicking on the link and going backwards for the first heading.

 

I can probably make this an option like {maketoc|ignoreprev} or {maketoc|-} or something.

 

Any thoughts on this?  Would that break anything outside of a specific page?  (eg. The Tiki book using structures)

 

Mike.

 

 

 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Tikiwiki-devel mailing list
Tikiwiki-devel@...
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel

Re: Thoughts on {maketoc} behaviour

by Jean-Marc Libs :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I like your example but what would you have appear for this example:
! level 1
!! level 2a
{maketoc start=3, maxdepth=4}
!!! level 3a
!!!! level 4a
!!!!! level 5a
!! level 2b
!!! level 3b
!!!! level 4b
!!!!! level 5b

And for this one:
 level 1
!! level 2a
{maketoc start=3, maxdepth=4}
!!! level 3a
!!!! level 4a
!!!!! level 5a
...page...
!! level 2b
{maketoc start=3, maxdepth=4}
!!! level 3b
!!!! level 4b
!!!!! level 5b

What would be best? Should each {maketoc} interrupt the previous one,
or do we need a third argument ?

Jyhem

On 8/9/08, Rick Sapir <ricksapir@...> wrote:

> Great idea. How about adding the ability to specify the starting level (we
> can already specify the depth)?
>
> So this page.....
>
> ! level 1
> !! level 2
> {maketoc start=3, maxdepth=4}
> !!! level 3
> !!!! level 4
> !!!!! level 5
>
>
> would produce....:
>
> Contents
> - Level 3
>   - Level 4
>
>
> Just need some basic error checking to ensure that maxdepth => start.
>
> -R
>
>
> ---
> Greetings from Sanford, NC, USA!
>   ----- Original Message -----
>   From: Mike Kerr
>   To: 'Tikiwiki developers'
>   Sent: Saturday, August 09, 2008 2:20 AM
>   Subject: [Tikiwiki-devel] Thoughts on {maketoc} behaviour
>
>
>   I was just thinking.  Many people use
>
>
>
>   !Page Title
>
>   {maketoc}
>
>
>
>   !!Sub-heading
>
>   Blahblah
>
>
>
>   !!Sub-heading2
>
>   Blah.
>
>
>
>   as a standard template.  I've always thought that this wasted a layer of
> headings.  Would a more logical approach to {maketoc} processing be to
> ignore any ! markup before {maketoc} appears?  This way you can still take
> advantage of the heading formatting for the text, but you also save an
> entire heading hierarchy.  Not to mention you don't end up clicking on the
> link and going backwards for the first heading.
>
>
>
>   I can probably make this an option like {maketoc|ignoreprev} or
> {maketoc|-} or something.
>
>
>
>   Any thoughts on this?  Would that break anything outside of a specific
> page?  (eg. The Tiki book using structures)
>
>
>
>   Mike.
>
>
>
>
>
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Tikiwiki-devel mailing list
Tikiwiki-devel@...
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel

Re: Thoughts on {maketoc} behaviour

by Dave Thacker-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Saturday 09 August 2008 01:20:29 Mike Kerr wrote:

Problem snipped.


> Would a more logical approach to {maketoc} processing be to
> ignore any ! markup before {maketoc} appears?  This way you can still
> take advantage of the heading formatting for the text, but you also save
> an entire heading hierarchy.  Not to mention you don't end up clicking
> on the link and going backwards for the first heading.
>
> I can probably make this an option like {maketoc|ignoreprev} or
> {maketoc|-} or something.
>
> Any thoughts on this?  Would that break anything outside of a specific
> page?  (eg. The Tiki book using structures)

+1 for the solution

Dave Thacker





-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Tikiwiki-devel mailing list
Tikiwiki-devel@...
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel

Re: Thoughts on {maketoc} behaviour

by ricksapir :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

How (if at all) will these {MAKETOC} changes affect the {TOC} usage within
structures?

Will users be able to modify the processing of the generated table of
contents within a structure? That would be great. I often may have a heading
level on a specific page that I do not want to appear in the {TOC} for the
full structure.

-R

---
Greetings from Sanford, NC, USA!


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Tikiwiki-devel mailing list
Tikiwiki-devel@...
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel

Re: Thoughts on {maketoc} behaviour

by Michael Pilling-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I like this suggestion very much.

adding extra complexity is ok for some {maketoc,start=3,depth=2} but
getting the default action perfect is better .

++good         {maketoc} only parses down, not whole page.

I think a better end user syntax for end users would be

{maketoc 2}  (as in h2 headings only)

{maketoc 3,4} (as in h3 and h4)


If {maketoc x} starts parsing downward and stops at next x-1 heading -
you can do anything.



of course the other way to solve this would be to make a syntax = !!~
(heading that escapes {maketoc} )



MLP





On Mon, Aug 11, 2008 at 3:00 PM, Rick Sapir <ricksapir@...> wrote:

> How (if at all) will these {MAKETOC} changes affect the {TOC} usage within
> structures?
>
> Will users be able to modify the processing of the generated table of
> contents within a structure? That would be great. I often may have a heading
> level on a specific page that I do not want to appear in the {TOC} for the
> full structure.
>
> -R
>
> ---
> Greetings from Sanford, NC, USA!
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Tikiwiki-devel mailing list
> Tikiwiki-devel@...
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Tikiwiki-devel mailing list
Tikiwiki-devel@...
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel

Re: Thoughts on {maketoc} behaviour

by Xavier de Pedro Puente-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



En/na Michael Pilling ha escrit:

> I like this suggestion very much.
>
> adding extra complexity is ok for some {maketoc,start=3,depth=2} but
> getting the default action perfect is better .
>
> ++good         {maketoc} only parses down, not whole page.
>
> I think a better end user syntax for end users would be
>
> {maketoc 2}  (as in h2 headings only)
>
> {maketoc 3,4} (as in h3 and h4)
>
>
> If {maketoc x} starts parsing downward and stops at next x-1 heading -
> you can do anything.
>
>
>
>  
+1

thanks Mike to start this thread

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Tikiwiki-devel mailing list
Tikiwiki-devel@...
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel

Re: Thoughts on {maketoc} behaviour

by Stephane Casset :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Le Wed, Aug 20, 2008 at 09:06:17PM +0200, Xavier de Pedro écrivait :
>
>
> En/na Michael Pilling ha escrit:
> > I like this suggestion very much.

I don't like it at all ;)

> > adding extra complexity is ok for some {maketoc,start=3,depth=2} but
> > getting the default action perfect is better .
> >
> > ++good         {maketoc} only parses down, not whole page.

No {maketoc} should display the toc of the page according to some
options I am ok with the suggestions like {maketoc 2} {maketoc 2,4,5} or
other options to select what section levels you want.

But maketoc should not ignore sections based on its position in the page !
If you want to ignore a section in the toc just say so at the section
level ! Like this

!!* hidden subsection in the toc
!!  shown subsection in the toc
!* hidden section in the toc
!  shown section in the toc

It is nice and clean, it is the way you do it in other markup languages,
and I like it better ! ;p

A+
--
Stéphane Casset            LOGIDÉE sàrl       Se faire plaisir d'apprendre
1a, rue Pasteur        Tel : +33 388 23 69 77           casset@...
F-67540 OSTWALD        Fax : +33 388 23 69 77           http://logidee.com

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Tikiwiki-devel mailing list
Tikiwiki-devel@...
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel

Re: Thoughts on {maketoc} behaviour

by Nyloth-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

On Thursday 21 August 2008 10:03:21 Stephane Casset wrote:
> No {maketoc} should display the toc of the page according to some
> options I am ok with the suggestions like {maketoc 2} {maketoc 2,4,5} or
> other options to select what section levels you want.
> [...]
> It is nice and clean, it is the way you do it in other markup languages,
> and I like it better ! ;p

+1
I also prefer that {maketoc} generates the full TOC even if placed in the
middle of the page.

About options, I'm not really against {maketoc 2,4,5} , but I would prefer
rick's initial syntax {maketoc start=2, maxdepth=5} OR something like
{maketoc levels=2,3,5} just to ease parsing factorisation (and even
auto-documentation) and to always have {plugin option=value ...} which is,
IMO, better for the user.

Nyloth.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Tikiwiki-devel mailing list
Tikiwiki-devel@...
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel

Re: Thoughts on {maketoc} behaviour

by Stephane Casset :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Le Thu, Aug 21, 2008 at 10:53:38AM +0200, Nyloth écrivait :

> Hi all,
>
> On Thursday 21 August 2008 10:03:21 Stephane Casset wrote:
> > No {maketoc} should display the toc of the page according to some
> > options I am ok with the suggestions like {maketoc 2} {maketoc 2,4,5} or
> > other options to select what section levels you want.
> > [...]
> > It is nice and clean, it is the way you do it in other markup languages,
> > and I like it better ! ;p
>
> +1
> I also prefer that {maketoc} generates the full TOC even if placed in the
> middle of the page.
>
> About options, I'm not really against {maketoc 2,4,5} , but I would prefer
> rick's initial syntax {maketoc start=2, maxdepth=5} OR something like
> {maketoc levels=2,3,5} just to ease parsing factorisation (and even
> auto-documentation) and to always have {plugin option=value ...} which is,
> IMO, better for the user.

Yes I also prefer initial options syntax.

A+
--
Stéphane Casset            LOGIDÉE sàrl       Se faire plaisir d'apprendre
1a, rue Pasteur        Tel : +33 388 23 69 77           casset@...
F-67540 OSTWALD        Fax : +33 388 23 69 77           http://logidee.com

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Tikiwiki-devel mailing list
Tikiwiki-devel@...
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel

Re: Thoughts on {maketoc} behaviour

by Xavier de Pedro Puente-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

+1
ok with me, it this is better from the coding point of view.
Xavi

En/na Stephane Casset ha escrit:

> Le Thu, Aug 21, 2008 at 10:53:38AM +0200, Nyloth écrivait :
>  
>> Hi all,
>>
>> On Thursday 21 August 2008 10:03:21 Stephane Casset wrote:
>>    
>>> No {maketoc} should display the toc of the page according to some
>>> options I am ok with the suggestions like {maketoc 2} {maketoc 2,4,5} or
>>> other options to select what section levels you want.
>>> [...]
>>> It is nice and clean, it is the way you do it in other markup languages,
>>> and I like it better ! ;p
>>>      
>> +1
>> I also prefer that {maketoc} generates the full TOC even if placed in the
>> middle of the page.
>>
>> About options, I'm not really against {maketoc 2,4,5} , but I would prefer
>> rick's initial syntax {maketoc start=2, maxdepth=5} OR something like
>> {maketoc levels=2,3,5} just to ease parsing factorisation (and even
>> auto-documentation) and to always have {plugin option=value ...} which is,
>> IMO, better for the user.
>>    
>
> Yes I also prefer initial options syntax.
>
> A+
>  

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Tikiwiki-devel mailing list
Tikiwiki-devel@...
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
LightInTheBox - Buy quality products at wholesale price!