AFAIR, there's only one edge case, if the first section heading has unique adornment it is the document title
Mystuff ====== asdfasdf Morestuff ======= asdfasdfasdf >>> the above document has 2 sections in the document root Mystuff ====== asdfasdf Morestuff ------------ asdfasdf >>> the above document is titled "Mystuff" and has one section in the root On Fri, Apr 3, 2009 at 4:33 PM, Kent Tenney <[email protected]> wrote: > On Fri, Apr 3, 2009 at 2:20 PM, Edward K. Ream <[email protected]> wrote: >> >> >> On Fri, Apr 3, 2009 at 1:28 PM, Kent Tenney <[email protected]> wrote: >>> >>> Leo will benefit from an rst importer which converts sections to nodes >>> however it is implemented. >> >> Yes. You mentioned at the sprint that there were several (four?) >> attributes, including iirc, indentation, that had to be remembered. Can you >> explain what these attributes are? > > a section title consists of text followed by a line of punctuation > > Title > ----- > > the underline cannot be shorter than the title, it can be longer > > Title > ----------- > > the same punctuation line can appear above the text > > ----------- > Title > ----------- > > when using the under-over style, the text can be indented > > ----------- > Title > ----------- > > so, the 'style' can be defined by > - punctuation character > - under or under-over > - indent > - padding > > this could be spelled as > (int, str, int) > if len(str) == 1, underline, if len(str) == 2 under/over > int at [0] is indent, [2] is padding > > The examples would be > (0,'-',0) > (5,'-',0) > (0, '--', 5) > (2, '--', 2) > > The 'style' for a document would be a list of these tuples, > in order of the subtree level they define. > >> >> Edward >> >> >> >> > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "leo-editor" 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/leo-editor?hl=en -~----------~----~----~----~------~----~------~--~---
