1. A document generating apparatus comprising: means for inputting document data; heading dictionary storing means for storing words and phrases frequently used as headings, said headings being arranged in a column direction; heading candidate extraction means for extracting as heading candidate particular words and phrases of said words and phrases stored in said heading dictionary storing means, said heading candidate extraction means connecting to said heading dictionary storing means, said heading candidate extraction means connecting to said means for inputting document data; heading rule dictionary means for storing rules which are used to determine said headings, said heading rule dictionary means connecting to a heading deciding means; said heading deciding means connecting to said heading candidate extracting means, said heading deciding means being used to check said heading candidate extraction means according to said rules stored in said heading rule dictionary means, said heading deciding means deciding whether said heading candidate is a suitable heading; document architecture rule dictionary means for storing rules associated with document logical architecture, said document architecture rule dictionary means being connected to a document architecture deciding means; and said document architecture deciding means being used for deciding a document logical architecture of said headings, said document architecture deciding means comparing relations between said headings and comparing a relation between said headings and at least one non-heading in accordance with said rules associated with document logical architecture stored in said document architecture rule dictionary means, said headings and said at least one non-heading being decided by said heading deciding means, said document architecture deciding mean being connected to said heading deciding means.