Outils pour utilisateurs

Outils du site


issue48:tuto-libreoffice

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 changer quelque chose dans un document plus long. Et c'est là que l'utilisation de styles rendra 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.

Writer de LibreOffice possède cing types de styles différents : paragraphe, caractère, cadre, page et liste. Vous accédez à tous les styles en cliquant sur le bouton Styles et Formatage dans la barre d'outils de formatage. La fenêtre des styles et formatage apparaîtra. Vous pouvez alors ancrer la fenêtre sur la gauche de la barre d'outils de formatage en appuyant sur la touche Ctrl tout en double-cliquant sur l'espace vide dans la barre d'outils de la fenêtre des Styles et Formatage.

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.

Sur la barre d'outils de styles (à droite), il y a sept icônes. Les cinq premières vous donnent accès aux différents types de styles. Dans l'ordre, à partir de la gauche, ils sont paragraphe, caractère, cadre, page et liste. Dans cet article, nous allons parler surtout des styles paragraphe et caractère.

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.

Ouvrez un nouveau document texte et tapez un titre. Ouvrez la fenêtre Styles et Formatage. L'icône paragraphe devrait être sélectionnée par défaut. En bas de la fenêtre Styles et Formatage, il y a une liste déroulante. Sélectionnez Styles de chapitre. Double-cliquez sur « Titre principal ». Votre titre sera maintenant centré, en gras, et deviendra plus grand. Nous allons maintenant modifier le style par défaut pour les titres. Dans la fenêtre Styles et Formatage, faites un clic droit sur « Titre principal » et choisissez Modifier… La boîte de dialogue qui s'affichera alors ressemble beaucoup à celle du dernier article, mais il y a quelques onglets nouveaux qui ne figurent pas dans la boîte de dialogue « paragraphe » standard. Le premier s'intitule Gérer. L'onglet Gérer (ci-dessous) affiche le nom du style, le « Style de suite » et « Lié à », le style auquel il est lié. Vous verrez que le Style de suite est actuellement « Sous-titre », mais, puisque nous ne voulons pas utiliser un sous-titre, on changera pour le style « Corps de texte ». Ainsi, quand on appuiera sur Entrée pour démarrer un nouveau paragraphe, celui-ci utilisera le style « Corps de texte ». Le style « Titre principal » est lié au style « Titre » . Quand des styles sont liés, toute modification au style parent aura un effet sur les styles qui y sont liés. Par exemple, si vous mettez le texte dans le « Titre » en bleu, le texte de tous les styles qui y sont liés deviendra bleu également.

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.

Nous allons maintenant changer le format de notre titre. Cliquez sur l'onglet Effets de caractère. Les Effets de caractère (en haut à gauche de la page suivante) vous permettent de modifier l'apparence de la police, couleur, barré, soulignage, ombre et relief. La boîte de dialogue vous montre l'apparence du texte de votre titre lorsque vous y appliquez des effets. Changez-en la couleur à bleu, le soulignage à Ondulation double et la couleur du soulignage à bleu. Cliquez sur 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.

Appuyez sur Entrée pour démarrer un nouveau paragraphe. Vous remarquerez que le style est devenu « Corps de texte », exactement tel que nous l'avons configuré dans l'onglet Gérer. Tapez maintenant trois paragraphes de texte que vous utiliserez comme document d'exemple.

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.

Ensuite, nous modifierons le style « Corps de texte » et en créerons deux nouveaux basés sur celui-ci. De retour dans la fenêtre Styles et Formatage, cliquez sur la liste déroulante et sélectionnez la catégorie Styles de texte. Faites un clic droit sur « Corps de texte », puis sélectionnez Modifier. Dans l'onglet Retraits et Espacement, changez l'interligne à 1,5 lignes et la première ligne à 0,50. Vous constaterez que ces modifications ont été appliquées aux trois paragraphes.

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”.

Nous allons maintenant créer un paragraphe pour les longues citations. Mettez votre pointeur n'importe où dans le deuxième paragraphe. Dans la fenêtre Styles, faites un clic droit sur Corps de texte et choisissez Nouveau. Dans l'onglet Gérer, appelez-le « Citation longue ». Changez Style de suite à « Corps de texte », puisqu'on n'a pas souvent deux longues citations à la file. Vous remarquerez que, puisque nous avons créé le nouveau style en faisant un clic droit sur Corps de texte, il est lié à « Corps de texte » automatiquement. Si vous voulez créer un nouveau style qui ne soit pas lié à un autre, changez le lien à « - Aucun(e) - ».

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.

Maintenant, changeons le formatage de notre nouveau style. Dans l'onglet Retraits et Espacement, changez le « Avant le texte » et « Après le texte » à 0,50. Changez le retrait de la « Première ligne » pour qu'il soit à nouveau à 0,00. Dans l'onglet Police, changez le style à Italique. Cliquez sur OK et vous verrez qu'un nouveau paragraphe appelé « Citation longue » a été ajouté à votre liste. À nouveau, mettez le pointeur n'importe où dans le deuxième paragraphe et double-cliquez sur « Citation longue ». Vous verrez alors que le retrait de la première ligne n'existe plus, que le paragraphe a un alinéa des deux côtés et que le texte est en italique. Nous voulons maintenant changer le premier paragraphe pour qu'il ait quelques lettrines. Puisque nous voulons que le premier paragraphe de chaque chapitre ait cette apparence, nous allons créer un autre style. À nouveau, faites un clic droit sur « Corps de texte » et choisissez Nouveau. Appelez le nouveau style « Premier paragraphe » et réglez le Style de suite à « Corps de texte ». Dans l'onglet Retraits et Espacement, mettez le retrait de la première ligne à nouveau à 0,00. Dans l'onglet Lettrines (voir ci-dessous), cochez « Afficher des lettrines », réglez le « Nombre de caractères » à 1 et la « Hauteur (en lignes) » à 2. Cliquez sur OK. Comme auparavant, aucune modification n'est encore visible. Mettez votre pointeur dans le premier paragraphe et double-cliquez sur votre nouveau style.

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

Ce nouveau style de paragraphe devra suivre le titre de chaque nouveau chapitre. Modifiez le style du « Titre » pour que le Style de suite devienne « Premier paragraphe ».

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.

Les styles de caractère ne s'appliquent qu'au texte sélectionné et non pas à des paragraphes entiers. Sélectionnez une partie du texte du troisième paragraphe. Dans la fenêtre Styles et Formatage, cliquez sur l'icône Styles de caractère et double-cliquez sur « Accentuation ». Ainsi, le texte sélectionné passera en italique. En règle générale, il est possible de modifier les styles de caractère de la même façon que les styles de paragraphe.

L'avantage principal des styles est que le formatage d'un même type de texte reste identique tout au long du document. Dans le prochain article, nous parlerons de l'ajout de cadres au document.

issue48/tuto-libreoffice.txt · Dernière modification : 2011/06/13 18:31 de jocelyn