Outils pour utilisateurs

Outils du site


issue48:tuto-libreoffice

Ceci est une ancienne révision du document !


In my last article, I wrote about changing the layout of paragraphs to format your document. While this approach is okay on short documents, it creates a lot of work should you decide to change something in a large document. This is where the use of styles will make things easier.

La dernière fois, le sujet était la modification de la mise en page des paragraphes pour formater votre document. Tandis que cette méthode est OK pour de courts documents, elle crée beaucoup de travail si vous décidez de changez quelque chose dans un document plus long. Et c'est là où l'utilisation de styles rendront les choses plus faciles.

LibreOffice writer has five different style types: paragraph, character, frame, page, and list. You can access all the styles by clicking on the Styles and Formatting button on the formatting toolbar. This will pop up the Styles and Formatting window. You can dock the Styles and Formatting window on the left by holding down the Ctrl key and double-clicking the empty space in the Styles and Formatting window toolbar.

The styles toolbar (right)has seven icons. The first five give you access to the different style types. In order from the left, they are paragraph, character, frame, page, and list. We will concentrate on paragraph and character styles in this article.

Open a new text document and type in a title. Open the Styles and Formatting window. The paragraph icon should be selected by default. At the bottom of the Styles and Formatting Window is a drop-down box. Click on the box and select Chapter Styles. Double-click “title”. Your title will center, enlarge, and become bold. Now, let's change the default styling for titles. In the Styles and Formatting window, right-click on the “title” style and select modify. The dialog that pops up looks a lot like the dialog from the last article, but there are a few new tabs that are not in the standard paragraph dialog. The first is the organizer. The organizer (below) shows you the name for the style, the next style to use, and the linked style. You will see that the next style is “subtitle”, but we don't want to use a subtitle, so we will change this to the “text body” style. This makes it so that when we hit Enter to start a new paragraph the next paragraph will use the “text body” style. The “title” style is linked with the “Heading” style. When styles are linked, any changes to the parent style affects the styles linked to it. As an example, if you change the text in the “Heading” to blue, all the styles linked to it will have blue text as well.

Now, let's format our title differently from the default. Click on the Font Effects tab. The Font Effects (next page, top left) allow you to change the look of the font, including color, strike-through, underline, shadow, and relief. The dialog shows you how the effects make your text look. Change the color to blue, underlining to Double Wave, and underline color to blue. Click OK.

Press Enter to start a new paragraph. Notice the style changed to “text body” just like we set up in the organizer tab. Now, type in three paragraphs of text to use for our example document.

Next, we will modify the “text body” style and create two new ones based on the “text body” style. Back in the Styles and Formatting window, click the drop-down box and select the Text Styles category. Right-click on “text body” and select modify. On the Indents & Spacing tab, change the line spacing to 1.5 lines, and the First Line to 0.50. Click OK. Notice that our changes affected all three paragraphs.

Now, let's create a paragraph for long quotes. Move the cursor to anywhere in the second paragraph. In the styles window, right-click text body and select New. On the organizer tab, give it the name of “Blockquote.” Change the next style to “text body”, as we rarely have two long quotes in a row. You will notice that because we created the new style by right-clicking on text body, it is automatically linked to “text body”. To create a new style not linked to another, change the Linked with to “None”.

Now, let's change the formatting of our new style. On the Indents & Spacing tab, change the “before text” and “after text” to 0.50. Change the First Line back to 0.00. On the Font tab, change the typeface to italic. Click OK, and you will notice a new paragraph named “Blockquote” has been added to your list. Again, move your cursor to anywhere in the second paragraph and double-click “Blockquote.” Now, you will see the first line indent has been taken away, the paragraph is indented on both sides, and the text is italicized. Now, we want to change the first paragraph, giving it some drop caps. Since we want the first paragraph of each chapter to look this way, we will create another style. Again, right-click on “text body” and select New. Name the new style “First Paragraph”, and change the next style to “Text Body.” On the Indents & Spacing tab, change the First Line back to 0.00. On the Drop Caps tab (shown below), check “Display drop caps”, set “Number of characters” to 1 and set “Lines” to 2. Click OK. Again, no changes are seen yet. Move your cursor into the first paragraph and double-click your new style.

We need this new paragraph style to follow every new chapter title. Modify the “title” style so the next style is “First Paragraph.”

Character styles affect only selected text rather than entire paragraphs. In the third paragraph, select some of the text. Click on the character style icon in the styles window, and double-click “Emphasis.” This will italicize the text you have selected. You can modify the character styles much in the same way you do the paragraph styles.

The key advantage to styles is making the formatting of like text the same throughout a document. In the next article, we will talk about adding frames to your document.

issue48/tuto-libreoffice.1305464047.txt.gz · Dernière modification : 2011/05/15 14:54 de auntiee