Yes, that does seem like the solution, but is it possible to write that solution and then "attach" it to a new, user-defined directive, such as @autohead, which could then be used in place of @auto?
In short, can the user create a new file output directives (to go along with @file, @auto, @nosent, etc) ? I just find it odd that we lose the headings in the @auto output. Thanks! Bill Le dimanche 13 octobre 2013 11:58:36 UTC-7, Fidel N a écrit : > > Hey: > If I understand correctly, what you need is the position property called > level. > > So depending on the number you get in c.p.level() > You get different string such as: > > for i in range(c.p.level()): > string.append(r"#@") > string.append(c.p.h) > > Then you add that string to the output file and add its body, then keep > going to the next node. > > On Sunday, October 13, 2013 8:52:57 PM UTC+2, wgw wrote: >> >> Is there are way to put the outline structure in a user-defined comment >> format? I want to generate a stripped down version of @file, where the >> only thing that would be indicated in the #@ comments would be the headings >> and their level. That comment string could be user-defined, so you might >> want "#####<legal numbering>" or other. >> >> This would of course lose the directives and so on, but retain the >> headings and their hierarchy. A file that is something between the @auto >> and the @file format. (Right now, I just reformat the @file and strip >> anything that isn't a node.) >> >> For example, if the leo headings are: >> >> a >> .b >> .c >> ..d >> e >> >> then the output file would indicate the outline structure by a proper >> stacking of #@ : >> >> #@ a >> code and comments >> #@#@ b >> code and comments >> #@#@ c >> code and comments >> #@#@#@ d >> code and comments >> #@ e >> code and comments >> >> >> Is there any easy way to achieve that output format? >> >> Thanks! >> > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/groups/opt_out.
