Difference between revisions of "Documentation/UserGuide/Formatting"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Introduction: minor gramatical changes)
 
(41 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{Documentation/DraftPage}}
 
  
 
{{DISPLAYTITLE:Formatting a document: direct formatting, styles and templates}}
 
{{DISPLAYTITLE:Formatting a document: direct formatting, styles and templates}}
  
= Introduction =
+
== 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.  
+
In Apache OpenOffice, you can apply formatting to documents in two different ways. You can do so directly using menus and toolbars, or you can use styles and templates.
  
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
+
To a new user, it may seem easier to format a document directly, applying formatting only as needed. However, this can be repetitive, and problematic when working with longer documents. You can save yourself a lot of time and trouble by using styles and templates, which cause your document to follow predefined formatting rules. While this may seem complex at first glance, it is actually an easy-to-learn tool that affords a great deal of flexibility and consistency when authoring documents.
  
= Direct format vs. styles =
+
Styles can be used in all Apache OpenOffice programs with the exception of Apache Math.
  
Maybe the simplest way to understand how styles work is a text document, but the concept is valid for all Apache OpenOffice components.
+
== Benefits of Styles Over Direct Formatting ==
  
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 we've written a long report that is divided into chapters, each marked by a heading. We need these headings to be displayed in a particular sans serif font. We also need these headings to be displayed in large, bold text, and centered on the page. To apply this formatting manually, we would need to set up the following formatting for each heading individually:
 +
*"Liberation Sans, 16 point, bold, centered..."
  
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.
+
At the same time, we want the rest of our text to be displayed in a smaller, serif font, as follows:
 +
*"Liberation Serif, 11 points, justified..."
  
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.  
+
While it is possible to accomplish this with direct formatting, two problems arise: consistency (remembering to use the exact same font size, font face, and alignment each time) and ''maintenance''. What happens if you decide you need the body of your report to be displayed in a different font, or that you need your chapter headings to be slightly smaller? If you've applied the formatting directly, you'll need to do a lot of work to fix this.  
  
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.  
+
This is where styles come in. Suppose that instead of setting each chapter heading's formatting individually, as shown above, we predefine all these rules in a style named "Heading 1". This way, each time we come across text we want to make into a chapter heading, we can simply select "Heading 1" as its 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.
+
Likewise, we can predefine the body formatting in a style named "Body Text" and apply this style to the body text of the document as necessary. In this way, the administration of document becomes much simpler. For example, to change the font used for all chapter headings, we only need to modify the definition of "Heading 1". The change will then be reflected throughout our document.  
  
= Administration and edition of styles =
+
Beyond this, styles can provide a lot more than just consistency and ease of administration. They permit the creation of an automatic table of contents, numbered chapters, the setting of colors, insertion of symbols, and more.
  
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 {{Key|F11}} or with {{Menu|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.
+
== Adding Styles to Your Document ==
 +
You can create, edit, and apply styles to your document through the 'Styles and Formatting' panel. This panel is accessed through one of the following methods:
  
= Templates =
+
[[File:AOO StylesandFormatting.PNG]]
  
The immediate question after spending some time defining and modifying styles is ''how can I use these styles on a new document''?
+
'''Method 1:'''
  
{{Menu|File|Templates|Save}} will save a copy of the current document as a ''template'' that we can use on a new document with {{Menu|New|Templates and documents|Templates}} and making a double click on the needed template.
+
* {{Menu|Format|Styles and Formatting}}
  
{{Documentation/Note|It is important to note that not only the styles but also the ''content'' of that document will be saved on the template}}
+
'''Method 2:'''
  
It is possible to do one step more and set our preferred template as the default template: {{Menu|File|Templates|Organize}}, double click on "My Templates", select the needed template and opening the {{Button|Commands}} button select "Set as Default Template" (this option is also available with doing a right click over the template on the list).
+
* Press  {{Button|F11}}
 +
* The 'Styles and Formatting' panel will appear
  
To modify an existing template, with {{Menu|File|Templates|Edit}} and browsing to the template file, or {{Menu|File|Templates|Organize|My Templates}} and selecting Edit under {{Button|Commands}}.
+
'''Method 3:'''
  
Once the changes are ready, it is enough to save the document as a normal document.  
+
* Open the 'Styles and Formatting' panel as an option through the Sidebar[https://wiki.openoffice.org/wiki/Documentation/UserGuide/UI#Side_bar]
  
{{Documentation/Note|Once a Template is edited, if you open a document based on that template Apache OpenOffice will as you if you want to update the styles. It is important to note that at the moment if we say "no" the association of the document with that template will be lost. For more information, see this report {{Bug|52783| - change templates for a document}}- }}
+
'''Once the panel is open:'''
 +
 
 +
* Right click anywhere inside the 'Styles and Formatting' panel
 +
* Select “New” or “Modify”
 +
 
 +
You will then be presented with a large selection of options. The best way to learn is to experiment and set up a style according to your own preferences.
 +
 
 +
See also: Styles on Apache OpenOffice Writer [[https://wiki.openoffice.org/wiki/Documentation/UserGuide/Writer/Styles]]
 +
 
 +
== Templates ==
 +
 
 +
Once a style has been defined, it can be saved in a file called a "Template" for future use in additional documents. This allows for easy consistency across documents or projects.
 +
 
 +
{{Menu|File|Templates|Save}} will save a copy of the current document as a ''template''. We can use this template for a new document by selecting {{Menu|File|New|Templates and documents|Templates}} and double clicking on the needed template.
 +
 
 +
{{Note|Note that both the styles '''AND''' the content of that document will be saved in the template}}
 +
 
 +
It is possible to go further and set our preferred template as the default template for all documents. To do so:
 +
* {{Menu|File|Templates|Organize}}
 +
** Double-click "My Templates"
 +
** Select the required template
 +
** Click the {{Button|Commands}} button
 +
** Select "Set as Default Template"
 +
 
 +
 
 +
{{Tip|Right-clicking on the template in the list will also provide this option}}
 +
To modify an existing template:
 +
* {{Menu|File|Templates|Edit}}
 +
** Double click template file
 +
 
 +
Alternate method:
 +
* {{Menu|File|Templates|Organize}}
 +
** Double-click My Templates
 +
** Select template from list
 +
** Select Edit under {{Button|Commands}}
 +
 
 +
Once the changes are ready, save the document as a normal document.
 +
 
 +
{{Note|Once a template is edited, if you open a document based on that template Apache OpenOffice will ask if you want to update the styles. Note that currently, if you say "no," the association of the document with that template will be lost. For more information, see this bug report {{Bug|52783| - change templates for a document}}- }}
  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 +
[[nl:NL/Documentation/UserGuide/Formatting]]

Latest revision as of 10:08, 16 July 2018


Introduction

In Apache OpenOffice, you can apply formatting to documents in two different ways. You can do so directly using menus and toolbars, or you can use styles and templates.

To a new user, it may seem easier to format a document directly, applying formatting only as needed. However, this can be repetitive, and problematic when working with longer documents. You can save yourself a lot of time and trouble by using styles and templates, which cause your document to follow predefined formatting rules. While this may seem complex at first glance, it is actually an easy-to-learn tool that affords a great deal of flexibility and consistency when authoring documents.

Styles can be used in all Apache OpenOffice programs with the exception of Apache Math.

Benefits of Styles Over Direct Formatting

Suppose we've written a long report that is divided into chapters, each marked by a heading. We need these headings to be displayed in a particular sans serif font. We also need these headings to be displayed in large, bold text, and centered on the page. To apply this formatting manually, we would need to set up the following formatting for each heading individually:

  • "Liberation Sans, 16 point, bold, centered..."

At the same time, we want the rest of our text to be displayed in a smaller, serif font, as follows:

  • "Liberation Serif, 11 points, justified..."

While it is possible to accomplish this with direct formatting, two problems arise: consistency (remembering to use the exact same font size, font face, and alignment each time) and maintenance. What happens if you decide you need the body of your report to be displayed in a different font, or that you need your chapter headings to be slightly smaller? If you've applied the formatting directly, you'll need to do a lot of work to fix this.

This is where styles come in. Suppose that instead of setting each chapter heading's formatting individually, as shown above, we predefine all these rules in a style named "Heading 1". This way, each time we come across text we want to make into a chapter heading, we can simply select "Heading 1" as its formatting.

Likewise, we can predefine the body formatting in a style named "Body Text" and apply this style to the body text of the document as necessary. In this way, the administration of document becomes much simpler. For example, to change the font used for all chapter headings, we only need to modify the definition of "Heading 1". The change will then be reflected throughout our document.

Beyond this, styles can provide a lot more than just consistency and ease of administration. They permit the creation of an automatic table of contents, numbered chapters, the setting of colors, insertion of symbols, and more.

Adding Styles to Your Document

You can create, edit, and apply styles to your document through the 'Styles and Formatting' panel. This panel is accessed through one of the following methods:

AOO StylesandFormatting.PNG

Method 1:

  • Format → Styles and Formatting

Method 2:

  • Press  F11 
  • The 'Styles and Formatting' panel will appear

Method 3:

  • Open the 'Styles and Formatting' panel as an option through the Sidebar[1]

Once the panel is open:

  • Right click anywhere inside the 'Styles and Formatting' panel
  • Select “New” or “Modify”

You will then be presented with a large selection of options. The best way to learn is to experiment and set up a style according to your own preferences.

See also: Styles on Apache OpenOffice Writer [[2]]

Templates

Once a style has been defined, it can be saved in a file called a "Template" for future use in additional documents. This allows for easy consistency across documents or projects.

File → Templates → Save will save a copy of the current document as a template. We can use this template for a new document by selecting File → New → Templates and documents → Templates and double clicking on the needed template.

Documentation note.png Note that both the styles AND the content of that document will be saved in the template

It is possible to go further and set our preferred template as the default template for all documents. To do so:

  • File → Templates → Organize
    • Double-click "My Templates"
    • Select the required template
    • Click the  Commands  button
    • Select "Set as Default Template"


Tip.png Right-clicking on the template in the list will also provide this option

To modify an existing template:

  • File → Templates → Edit
    • Double click template file

Alternate method:

  • File → Templates → Organize
    • Double-click My Templates
    • Select template from list
    • Select Edit under  Commands 

Once the changes are ready, save the document as a normal document.

Documentation note.png Once a template is edited, if you open a document based on that template Apache OpenOffice will ask if you want to update the styles. Note that currently, if you say "no," the association of the document with that template will be lost. For more information, see this bug report Issue 52783 - change templates for a document-
Personal tools
In other languages