Difference between revisions of "Documentation/UserGuide/Formatting"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Introduction: minor gramatical changes)
(Direct format vs. styles: Gramatical Changes)
Line 13: Line 13:
 
Maybe the simplest way to understand how styles work is a text document, but the concept is valid for all Apache OpenOffice components.
 
Maybe the simplest way to understand how styles work is a text document, but the concept is valid for all Apache OpenOffice components.
  
Suppose it is needed to write a long document with many chapters, each one with several sub-levels, that the chapter heading needs to be written on a particular sans serif font (like Liberation Sans, Arimo, Arial...) on bold and at large size, while the body text must be on a particular, and smaller, serif font (tinos, times, etcetera).  
+
Suppose it is needed to write a long document with many chapters, each one with several sub-levels, that the chapter heading needs to be written on a particular sans serif font (like Liberation Sans, Arimo, Arial...) on bold and at large size, while the body text must be on a particular, and smaller, serif font (tinos, times, or others).  
  
While it is possible to do that with direct formatting, the possible problems of working on this way are quite clear: consistency (use 14 point instead of 16 for a heading, forgot to use bold...), but mainly ''maintenance''. If afterwards you decide to change the typeface, or its size, or the page margins... you'll need to do a lot of work.  
+
While it is possible to do that with direct formatting, the possible problems of working in this way are quite clear: consistency (use 14 point instead of 16 for a heading, forgot to use bold...), but mainly ''maintenance''. If afterwards you decide to change the typeface, or its size, or the page margins... you'll need to do a lot of work.  
  
But suppose that instead of setting "Liberation Sans, 16 point, bold, centred, five millimetres before the paragraph, three after"... you just say "Heading 1", that instead of "Liberation Serif, 11 points, justified..." you just said "Body text" and that ''on a different place'' you define how a Heading 1 or the Body text looks alike. By separating the ''attributes'' applied to the text from the ''definition'' of those attributes the administration of documents became far more easy: for example, changing to change the font used on the document you only need to modify the definition, not the document content because that change on the definition will propagate without effort.  
+
But suppose that instead of setting "Liberation Sans, 16 point, bold, centred, five millimetres before the paragraph, three after"... you just say "Heading 1", that instead of "Liberation Serif, 11 points, justified..." you just said "Body text" and that ''on a different place'' you define how a Heading 1 or the Body text looks alike. By separating the ''attributes'' applied to the text from the ''definition'' of those attributes the administration of documents became far more easy: for example, to change the font used on the document you only need to modify the definition, not the document content because that change on the definition will propagate without effort.  
  
But styles provide with a lot more that just consistency and easy administration: they permit to create an automatic table of content, to number chapters, that a particular set of graphical elements that use one style display the same line style, or colour, or text associated, it is possible to set the format of a particular cell on Calc dependant of its content... a lot more than by the use of direct formatting.  
+
But styles provide a lot more that just consistency and easy administration: they permit to create an automatic table of contents, to number chapters, that a particular set of graphical elements that use one style display the same line style, or colour, or text associated, it is possible to set the format of a particular cell on Calc dependant of its content... a lot more than by the use of direct formatting.  
  
In addition to this, styles can be "stored" on particular documents called "Templates" to reuse the styles definitions: defining styles is something that need to be done only seldom, but that it is used a lot.
+
In addition to this, styles can be "stored" on particular documents called "Templates" to reuse the styles definitions: defining styles is something that need to be done only seldom, but can be used a lot.
  
 
= Administration and edition of styles =
 
= Administration and edition of styles =

Revision as of 07:11, 21 January 2013

Template:Documentation/DraftPage


Introduction

On Apache OpenOffice it is possible to work in two different ways: applying format directly through the use of menus or toolbars or through the use of styles.

Direct formatting seems easier, but can be problematic on complex documents while styles seems complex but are a really powerful tool easy to use once you get used to them: let's see why

Direct format vs. styles

Maybe the simplest way to understand how styles work is a text document, but the concept is valid for all Apache OpenOffice components.

Suppose it is needed to write a long document with many chapters, each one with several sub-levels, that the chapter heading needs to be written on a particular sans serif font (like Liberation Sans, Arimo, Arial...) on bold and at large size, while the body text must be on a particular, and smaller, serif font (tinos, times, or others).

While it is possible to do that with direct formatting, the possible problems of working in this way are quite clear: consistency (use 14 point instead of 16 for a heading, forgot to use bold...), but mainly maintenance. If afterwards you decide to change the typeface, or its size, or the page margins... you'll need to do a lot of work.

But suppose that instead of setting "Liberation Sans, 16 point, bold, centred, five millimetres before the paragraph, three after"... you just say "Heading 1", that instead of "Liberation Serif, 11 points, justified..." you just said "Body text" and that on a different place you define how a Heading 1 or the Body text looks alike. By separating the attributes applied to the text from the definition of those attributes the administration of documents became far more easy: for example, to change the font used on the document you only need to modify the definition, not the document content because that change on the definition will propagate without effort.

But styles provide a lot more that just consistency and easy administration: they permit to create an automatic table of contents, to number chapters, that a particular set of graphical elements that use one style display the same line style, or colour, or text associated, it is possible to set the format of a particular cell on Calc dependant of its content... a lot more than by the use of direct formatting.

In addition to this, styles can be "stored" on particular documents called "Templates" to reuse the styles definitions: defining styles is something that need to be done only seldom, but can be used a lot.

Administration and edition of styles

Beside Math, all Apache OpenOffice components make use of styles. These styles have their differences on each component, differences that will be treated on the corresponding chapters, but the workflow is always the same: opening the Stylists with  F11  or with Format → Styles and formatting it will be possible to modify an existing style or to create a new one with a simple right click. To apply one style to an element on our document, it is only needed to select that element and double click on the desired style.

Templates

The immediate question after spending some time defining and modifying styles is how can I use these styles on a new document?

File → Templates → Save will save a copy of the current document as a template that we can use on a new document with New → Templates and documents → Templates and making a double click on the needed template.

Template:Documentation/Note

It is possible to do one step more and set our preferred template as the default template: File → Templates → Organize, double click on "My Templates", select the needed template and opening the  Commands  button select "Set as Default Template" (this option is also available with doing a right click over the template on the list).

To modify an existing template, with File → Templates → Edit and browsing to the template file, or File → Templates → Organize → My Templates and selecting Edit under  Commands .

Once the changes are ready, it is enough to save the document as a normal document.

Template:Documentation/Note

Personal tools