Abstract:
One embodiment of the present invention provides a system that facilitates preserving the structure of a list in an electronic document while displaying an outline view of the electronic document. During operation, the system receives a command from a user to display an electronic document in an outline view. In response to the command, the system determines a location of a list in the electronic document. Next, the system determines an outline-indentation level for the location in the electronic document. The system then determines an indentation level for each item in the list. Next, the system increases the indentation level for each item in the list by the outline-indentation level. Finally, the system displays the electronic document in the outline view.