Ceci est une ancienne révision du document !
When I was in school, I was very focused on writing, and I didn't see the value in many other subjects, especially mathematics. As I grew older, I began to appreciate and enjoy mathematics. Through the years, I have studied mathematics on my own. While I studied, I created many documents containing my mathematics notes. I decided it was time to put them all into one document with chapters, a table of contents, and an index. But how does one combine a bunch of documents into one? I guess I could have just copied the text from one document into another big document, but this could get messy, especially since I wasn't sure about the best order for the documents. I wanted a method where I could work on the documents individually then combine them into one, and I wanted the ability to rearrange the order of the documents. In LibreOffice, you can do this with ‘master documents’. You can think of a master document as a container that joins together separate Writer documents. Just the kind of thing I needed. So, I decided to use a master document.
Quand j’étais à l’école, j’étais très concentré sur l’écriture et je ne voyais pas d’intérêt aux autres sujets, spécialement les mathématiques. En mûrissant, j’ai commencé à aimer jouer avec les mathématiques. Au fil des années, j’ai étudié les mathématiques par moi-même. Pendant que j’apprenais, j’ai créé de nombreux documents contenant mes notes de mathématiques. J’ai décidé qu’il était temps les mettre tous dans un même document avec des chapitres, une table des matières et un index. Mais comment faire pour fondre une liasse de documents en un seul ?
Je supposais que j’aurais juste à copier le texte de chaque document dans un autre gros document, mais ça pouvait être la pagaille, particulièrement parce que je n’étais pas sûr de l’ordre des documents le plus judicieux. Je voulais utiliser une méthode que je pouvais appliquer à documents individuels puis les combiner en un seul et je voulais avoir la possibilité de ré-arranger les documents. Dans LibreOffice, vous pouvez le faire avec les documents « maîtres ». Vous pouvez faire un idée d’un document maître comme un conteneur qui réunit des documents Writer séparés. Exactement la fonctionnalité que je cherchais. Aussi je décidais d’utiliser un document maître.
Preparing the Documents Since the documents were scattered through several years, they were created with different versions of OpenOffice and LibreOffice. They had no style or template in common. I needed to create a template for consistency throughout all the documents and the master document. To create my template, I started with a new blank document. While creating my template, there were a few things I took into consideration. I knew I wanted to create a table of contents, so I would need to edit the “Outline Numbering.” I also wanted each chapter to start on a new page. Finally, I would need a unique title page style.
Préparer les Documents
Parce que les documents avaient été clairsemés au fil des années, ils furent créés avec des versions différentes de OpenOffice et de LibreOffice. Ni style ni modèle en commun. Je décidais de créer un modèle pour homogénéiser tous les documents et le document maître.
Pour créer mon modèle, j'ai commencé par un document vierge. Tout en créant mon modèle, j'ai pris en compte quels points en considération. Je savais que je voulais créer une table des matières, si bien qu'il me fallait éditer la « Numérotation des chapitres ». Je voulais aussi que chaque chapitre commence par une nouvelle page. Pour finir, je ne voulais qu'un seul style de page de titre.
To edit the “Outline Numbering”, I went to Tools > Outline Numbering. I edited the top level to put “Chapter” and the chapter number before the top level headings, just as I discussed in Part 38 of this series (Full Circle issue 85). I decided to leave the other levels bare, although I would probably include some of them in the table of contents. To make each chapter start on a new page, I edited the outline top level style, “Heading 1.” I opened the “Styles and Formatting” tab in the sidebar, right-clicked on “Heading 1” in the paragraph styles, and selected “Modify.” On the “Text Flow” tab under “Breaks”, I checked “Insert”. For the type I selected “Page,” and for the position, I selected “Before.” OK saved the changes. NOTE: You can also open the “Styles and Formatting” window from its button on the Formatting toolbar, the menus (Format > Styles and Formatting), or by pressing F11.
Pour éditer la « Numérotation des chapitres », je suis allé dans Outils > Numérotation des chapitres… J'ai édité j'ai édité le niveau le plus haut pour mettre « Chapitre » et le numéro du chapitre avant le titre principal, comme on a parlé dans la partie 38 de cette série (voir le FCM n° 85). J'ai décidé de laissé les autres niveaux vides, bien que j'inclurai probablement certains d'entre eux dans la table des matières.
Pour que chaque chapitre commence par une nouvelle page, j'ai édité le style de chapitre de niveau le plus haut, « Titre 1 ». J'ai ouvert l'onglet « Styles et formats » de la barre latérale, fais un clic droit sur « Titre 1 » des styles de paragraphe et sélectionné « Modifier… ». Dans l'onglet « Enchaînements », rubrique « Sauts », j'ai choisi le type « Page » et la position « Avant ». Puis OK pour sauvegarder les changements.
Nota : Vous pouvez aussi ouvrir la fenêtre « Styles et Formatage » depuis son bouton dans la barre d'outils Formatage, par le menu (Format > Styles et Formatage) ou en appuyant sur F11.
I created a page style named “Title Page” based off the “First Page” style. The only real change I made was to set the top to halfway down the page to center the title on the page vertically. I modified the “Title” paragraph style to a font and size of my liking. I also created the paragraph style “Byline” based on the “Subtitle” style. Not many changes here, just selected a font to go with the title font. To save the template, File > Save as Template opened the Template Manager. I clicked on Save, and the program prompted me for a name for the template. I named it “Math Reference.” I clicked OK, and I had a new template. When you are creating a template, you may have other changes you want to make. These were the ones that I felt were a good starting point for me. You can go as far as you want with a template. In the end it is up to you. If you decide, while working on sub-documents, that you need to make more changes to styles, make the changes to the template rather than the individual document. To make changes to my mathematics template, File > New > Templates. I selected the template and clicked the Edit button. This opened the template rather than a new document using the template. I made my changes and then saved it as though it was a normal document (Click the save button on the main toolbar, File > Save, or CTRL-S). When I opened one of the documents that uses the template, LibreOffice notified me that the template had changed and asked me to update the document with the new version of the template. I clicked “Update Styles”, and the styles updated in the document.
J'ai créé un style de page appelé « Page de titre » basé sur le style « Première page ». Je n'ai fait qu'un seul vrai changement en positionnant le haut à mi-hauteur de la page pour centrer le titre verticalement sur la page. J'ai modifié le style de paragraphe « Titre » pour une police et une taille à mon goût. J'ai aussi créé un style de paragraphe « Signature » basé sur le style « Sous-titre ». Peu de changements ici, juste une adaptation de la police avec celle du titre.
Pour la sauvegarde, Fichier > Modèles > Enregistrer comme Modèle a ouvert le Gestionnaire de Modèles. J'ai cliqué sur Enregistrer et le programme m'a demandé un nom pour le modèle. Je l'ai nommé « Référence Maths ». J'ai validé et j'ai eu ainsi un nouveau modèle.
Quand vous créez un modèle, vous pouvez souhaiter faire d'autres changements. C'était ceux que je sentais qu'ils seraient un bon point de départ pour moi. Vous pouvez aller aussi loin que vous voulez avec un modèle. Au final, vous avez la main. Si vous décidez, pendant que vous travaillez sur les sous-documents, que vous avez besoin de faire plus de modifications sur les styles, faites les changements dans le modèle plutôt que sur un document individuel. Pour modifier mon modèle « Maths », Fichier > Nouveau > Modèles. J'ai sélectionné le modèle et cliqué sur Éditer. Ceci ouvre le modèle plutôt qu'un nouveau document utilisant le modèle. J'ai fait les changements puis je l'ai enregistré comme si c'était un document normal (en cliquant sur le bouton Enregistrer de la barre d'outil Standard, Fichier > Enregistrer ou CTRL-S). Quand j'ai ouvert un des documents qui utilise ce modèle, LibreOffice m'a informé que le modèle avait changé et m'a demandé si on mettait à jour le document avec la nouvelle version du modèle. J'ai cliqué sur « Actualiser les styles » et les styles dans le document ont été mis à jour.
Now, I needed to apply my new template to my existing documents. I opened each of the documents and Edit > Select All. I then created a new document using my template, File > New > Templates. I selected my template and clicked Open. Edit > Paste and the text and objects from the original file were pasted into the new file. I closed the old document because I wanted to save it with the same filename. I saved the new document and I had the old file contents using the new template. I repeated this procedure for all the existing documents. Creating the Master Document To create my master document, I opened a new document using my “Math Reference” template. Selecting the “Title” style from the paragraph styles, I typed in my title. I then created the subtitle and byline. Once I had something in the document, I saved it as a master document, File > Send > Create Master Document. I gave the document a name and clicked Save. I then went to the page styles in the Styles and Formatting dialog and changed the page style to “Title Page.”
Puis, j'ai eu besoin d'appliquer mon nouveau modèle à mes documents existants. J'ai ouvert chacun des documents et Éditer > Tout sélectionner. Ensuite, j'ai créé un nouveau document en utilisant mon modèle, Fichiers > Nouveau > Modèles. J'ai sélectionné mon modèle et cliqué sur Ouvrir. Éditer > Coller et le texte et les objets du fichier original ont été reproduits dans le nouveau fichier. J'ai fermé l'ancien document parce que je voulais enregistrer le nouveau sous le même nom. J'ai sauvegardé le nouveau document et j'avais le contenu de l'ancien fichier avec le nouveau modèle. J'ai répété cette procédure pour tous les documents existants.
Créer le Document Maître
Pour créer le document maître, j'ai ouvert un nouveau document en utilisant mon modèle « Référence Maths ». En sélectionnant le style « Titre principal », j'ai saisi mon titre. Ensuite j'ai créé le sous-titre et la signature. Une fois que mon document contenait quelque chose, je l'ai enregistré comme un document maître, Fichier > Envoyer > Créer un document maître. Je lui ai donné un nom et j'ai cliqué sur Enregistrer. Ensuite, je suis allé dans les styles de page du cadre Styles et Formatage et j'ai changé le style de page en « Page de titre ».
Inserting Documents Once I had a master document, I could start adding files to it. When I saved the master document, it opened the Navigator in a floating window automatically. I could have worked in this floating window, but I closed it and used the Navigator panel in the sidebar. They are both the same, so it's your choice which one you use. The Navigator window is opened by pressing F5 on the keyboard, or from the menus, View > Navigator. The Navigator in master documents is different from other documents. By default it is in document list mode. The first button in the toolbar is a toggle button that allowed me to toggle between the document list and a standard Navigator panel. While working in the master document, I did not see any reason for switching to normal mode, but it is there should you have a reason for navigating to an object or subheading in one of the sub-documents.
Insérer des Documents
Une fois le document maître existant, je peux commencer à lui ajouter des fichiers. Quand j'avais enregistré le document maître, Une fenêtre flottante s'était ouverte automatiquement, le Navigateur. J'aurai pu travailler dans cette fenêtre flottante, mais je l'ai fermé et j'ai utilisé le panneau latéral Navigateur. Les deux sont identiques ; donc, c'est vous qui choisissez comment vous voulez travailler. La fenêtre Navigateur s'ouvre en appuyant sur la touche F5 ou par le menu, Afficher > Navigateur.
Le navigateur pour les documents maîtres est différent ce lui des autres documents. Par défaut, il est en mode liste de documents. Le premier bouton à ma disposition dans la barre d'outils est une inverseur entre la liste de documents et le panneau standard Navigateur. Pendant que je travaillais dans le document maître, je ne voyais aucune raison pour basculer dans le mode normal, mais il pourrait se faire que vous ayez une raison pour naviguer vers un objet ou un sous-titre dans un des sous-documents.
I noticed that one document was already in the list of files. This was the Text of the master document itself, at this point, my title page. I would add other Text blocks as needed in the master document using the insert button. To add my documents to the master document, I clicked and held on the Insert button <image>. Dragging down to the File selection, I released the mouse button. An insert file dialog appeared for me to find and select my file. I clicked open and the file was added to my master document. When adding a file to the master document, Writer always adds it above the currently selected file. I used the “Move Up” and “Move Down” buttons <image> to get my documents in the order I wanted them. All references and chapter numbers adjusted automatically as I moved the documents up and down in the list.
Editing from the Master Document All documents linked to the master document are read only in the master document. To edit a document from the master document, I selected the document in the Navigator list and clicked the edit button. A new window containing the document I wanted to edit opened. I made my changes to the document, saved, and closed it. In the master document, I clicked and held the Update button. Dragging I released on Links. A message window appeared asking me whether I wanted to update all the links in the document. I clicked Yes, and the document I just edited updated in the master document. I was also able to open the document through normal methods and edit it that way. The changes still appeared when I updated the master document's links.
I inserted a table of contents by inserting a page break after my title page and using the same methods discussed in Part 38 of this series (Full Circle issue 85). I did the same for an index, but I had to insert a Text block at the end of the master document through the insert button. This text block was needed to create an editable block at the end of the master document. Master documents are a great way to create large documents. In my case, I wanted the flexibility to work on the individual documents and the ability to rearrange the order of the documents. A master document works best with a template shared by all the documents. Just like normal Writer documents, you can add a table of contents and indexes. While a master document is not always the best choice, it is a good choice if you need the ability to move the different parts around or have different people authoring the different parts. This was just one example of using a master document. If you plan things well, you can start from the very beginning before you even write the first document.