Ceci est une ancienne révision du document !
In this month's article, we will discover a few new ways to format our documents using page styles, headers and footers. In past articles, I have discussed the use of paragraph and character styles. Page styles are similar, but deal with the overall geometry and formatting of the entire page. Headers and footers are the area at the top and bottom of the page, and are usually the same on every page of the same style. We will start by setting up our document and styles. Start a new writer document, File > New. In order to have access to the document's title, we will change some of the document's properties, File > Properties. On the description tab, put “This Is The Title” as the title of the document. We will use this later when we start creating our headers and footers. Click OK to save your changes.
Ce mois-ci, nous allons découvrir quelques méthodes nouvelles pour formater nos documents en utilisant les styles de page, les en-têtes et les pieds de page. Dans des articles précédents, j'ai expliqué l'utilisation des styles de paragraphe et de caractères. Les styles de page sont similaires, mais traitent de la géométrie de l'ensemble et le formatage de la page entière. Quant aux en-têtes et aux pieds de page, il s'agit d'une zone en haut et en bas de la page. D'habitude, ils sont pareils sur chaque page du même style.
Pour commencer, nous allons configurer nos document et styles. Démarrer un nouveau document texte, Fichier > Nouveau. Pour pouvoir accéder au titre du document, nous allons changer certaines des propriétés du document, Fichier > Propriétés. Sous l'onglet Description, mettre comme titre du document « Ceci est le titre ». Nous allons nous en servir plus tard quand nous commencerons à créer nos en-têtes et nos pieds de page. Cliquez sur OK pour sauvegarder vos changements.
Now, we need to set up our page styles. We will use three page styles, First Page, Normal Page, and Landscape. First Page and Landscape already exist, but we will modify them. We will create our Normal Page style first. For our normal page style, we want a header area at the top with a light gray background. Open the Styles and Formatting dialog, Tools > Styles and Formatting, or click on the Style and formatting button (right). Click on the page styles button (right), right-click in the window, and select new. The Page Style dialog appears. On the Organizer tab, name the style “Normal Page.” Change the next style to Normal Page. This tells Writer that when we get to the end of the page, it will create a new page with the same style. On the Header tab, check Header On. This inserts a header area on the page. Still on the Header tab, click the More button. A new dialog comes up. This dialog allows us to add borders and background colors to our header. On the Background tab, pick the light gray color for the background. Click OK on both dialogs, and we are finished with our Normal Page style. For our First Page, we will modify the one that already exists. We want a 3” (7.5cm) margin at the top (for first page graphics added at another time), and a light gray footer area at the bottom. Right-click the First Page style in the Styles and Formatting dialog, and select modify. On the organizer tab, make our Normal Page the next style. The Page tab allows us to change the margins for the page. Make the top margin 3” (7.5cm). This time we will go to the footer tab, check Footer On, click on the More button, and choose our light gray background.
Maintenant, nous devons configurer nos styles de page. Nous allons en utiliser trois : Première page, Standard et Paysage. Première page et Paysage existent déjà, mais nous allons les modifier. D'abord, nous créerons notre style Standard. Pour ce style Standard, nous voulons une zone d'entête en haut, dont le fond soit en gris clair. Ouvrez le dialogue Styles et formatage, Outils > Styles et formatage ou cliquez sur le bouton Styles et formatage (à droite). Cliquez sur le bouton styles de page (à droite), faites un clic droit dans la fenêtre et sélectionner Nouveau… Le dialogue de Style de page s'affiche. Sous l'onglet Gérer, nommez le style « Standard ». Changer le Style de suite en Standard. Cela signifie à Writer que, quand nous aurons atteint le bas de la page, il devra créer une nouvelle page avec le même style.
For our Landscape page style, we will modify the existing Landscape style. For our Landscape style, we will add both a header and footer. Right-click on the Landscape style and modify. Take a few moments to look at the page tab and notice the orientation for the page is landscape, which is exactly what we wanted. Turn on the header and footer on their respective tabs, and select the light gray background for both.
Now, we are ready to create our document. Double-click the First Page style, and the page in your document will change to the formatting we added. You will notice the light gray footer area at the bottom. Click inside the box to edit the footer. We will first add our title, Insert > Fields > Title. This inserts the title we added in the document properties. You can use this method to insert the title of the document anywhere you need it. If you change your title later in the document properties, you can update all instances of the inserted field with Tools > Update > Fields or by pressing F9 on your keyboard. Type “ Page “, remembering to put spaces on either side of the word Page, and insert the page number, Insert > Fields > Page Number. Move your cursor to the beginning of “Page” and press the tab key on your keyboard until the page number is flush against the right side of the footer area. Click out of the footer area into the main body of the page.
Once this is done, you can begin to type in your text. Once you reach the end of the page and a new page is inserted, you will notice it is formatted with the Normal Page style with a header area at the top. Fill in the header information just like we did for the footer of the first page. Make sure you use the fields, especially on the page number. The page number field comes in handy when we get to the third page. You will then notice the header information has been copied for you and the page number updated to reflect the current page.
Next, we will insert a Landscape page. Before you get to a new page, Insert > Manual Break. Select Page Break, and under the style, select Landscape. This will take you to a new page with a Landscape layout. Because this is a different style from our Normal Page style, we will need to fill in our header and footer information. This is handy should you need different header or footer information on some pages, just insert a page with a different page style. Once you have completed your landscaped page, create another page break (Insert > Manual Break) with a style of Normal Page. You will notice your page numbering continues, including the inserted landscaped page(s). If you do not want the inserted landscape pages included in the page count, you can manually adjust the page number in the Manual Break dialog.
Writer makes it easy to add pages with different styles and orientation, as well as automatic headers and footers. You can make the headers and footers as big as you want, and they can contain whatever information you want to put in them. Fields help keep certain information consistent in your document, and let you write without worrying about page numbers.
In my next article, I will move away from Writer and show you how to make a poor man's database using a Calc spreadsheet. After that, we will use our spreadsheet to create a form letter.