From 7c0a8795ea49402ecb407550b51b18977be0fa88 Mon Sep 17 00:00:00 2001 From: Brecht Machiels Date: Mon, 6 Jan 2014 22:26:25 +0100 Subject: [PATCH] Adjust the IEEE style sheet to properly handle nested lists --- rinohlib/stylesheets/ieee.py | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/rinohlib/stylesheets/ieee.py b/rinohlib/stylesheets/ieee.py index 5e3b5aebd..9091f2799 100644 --- a/rinohlib/stylesheets/ieee.py +++ b/rinohlib/stylesheets/ieee.py @@ -94,29 +94,40 @@ space_below=6*PT, numbering_style=CHARACTER_UC) -styles('list', ClassSelector(List, 'enumerated'), +styles('enumerated list', ClassSelector(List, 'enumerated'), base='body', space_above=5*PT, space_below=5*PT, - indent_left=0*INCH, - indent_first=0*INCH, + indent_left=0*PT, + indent_first=0*PT, + item_indent=12*PT, ordered=True, flowable_spacing=0*PT, numbering_style=NUMBER, numbering_separator=')') +styles('nested enumerated list', ContextSelector(ClassSelector(ListItem), + ClassSelector(List, + 'enumerated')), + base='enumerated list', + indent_left=10*PT) + styles('bulleted list', ClassSelector(List, 'bulleted'), - base='body', - indent_left=5*PT, + base='enumerated list', ordered=False, flowable_spacing=0*PT) +styles('nested bulleted list', ContextSelector(ClassSelector(ListItem), + ClassSelector(List, 'bulleted')), + base='bulleted list', + indent_left=10*PT) + styles('list item paragraph', ContextSelector(ClassSelector(ListItem), ClassSelector(Paragraph)), base='body', space_above=0*PT, space_below=0*PT, - indent_first=14*PT) + indent_first=15*PT) styles('definition list', ClassSelector(DefinitionList), base='body')