Cross-references in a Master Document

From NeoWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 00:47, 24 May 2007 (edit)
Lorinda (Talk | contribs)
(Setting up page for translation)
← Previous diff
Current revision (02:06, 15 June 2007) (edit) (undo)
Lorinda (Talk | contribs)
m (remove "InTranslation" template)
 
(14 intermediate revisions not shown.)
Line 1: Line 1:
-{{InTranslation}}+==Description of the Problem==
 + 
 +Let's say that a sub-document (an inserted document) of a master document must contain a [[Cross-references in NeoOffice Writer|cross-reference]] to an element in another sub-document in the same master document. In the case, it is not possible to use the {{Window|Fields}} window to define and insert the refrence in the "traditional" manner.
 + 
<!--==Description de l'astuce== <!--==Description de l'astuce==
Imaginons qu'un sous-document (un document inséré) d'un document maître doive contenir une [[Fr:Références_dans_le_NeoTexteur|référence]] à un élément se trouvant dans un autre sous-document de ce document maître. Imaginons qu'un sous-document (un document inséré) d'un document maître doive contenir une [[Fr:Références_dans_le_NeoTexteur|référence]] à un élément se trouvant dans un autre sous-document de ce document maître.
-Dans ce cas, il n'est pas possible d'utiliser la fenêtre « Champs » pour définir et insérer la référence de façon « traditionnelle ».+Dans ce cas, il n'est pas possible d'utiliser la fenêtre « Champs » pour définir et insérer la référence de façon « traditionnelle ».-->
-===Plus concrètement…===+===More Concretely...===
 + 
 +Let's say that the master document contains a sub-document with an outline detailing the contents of other documents. Sort of like a table of contents, but more detailed.
 + 
 +In this sub-document, we want the page numbers to appear, similar to a table of contents. For example, we might have the phrase "I discuss the relationship between dolphins and seals (page X)." This "X" must correspond to a page in another sub-document of the master document (it does not matter if the other sub-document is above or below the current one). Because the document is in the process of being written, I do not know what page will be the first page of my chapter on the relationship between dophins and seals. If there is only one '''reference''' in my document, I could keep it up to date manually, but then I would be treating my computer like a typewriter.
 + 
 +In this case, it is best to use a reference I call a '''global reference.''' Thanks to this reference, the page number will be updated with each change to the page.
 + 
 +<!--===Plus concrètement…===
Imaginons que le document maître contienne un sous-document qui décrit un plan de travail, une sorte de table des matières, mais plus détaillé. Imaginons que le document maître contienne un sous-document qui décrit un plan de travail, une sorte de table des matières, mais plus détaillé.
Line 12: Line 23:
Dans ce sous-document, nous voudrions que des numéros de pages apparaissent, un peu comme dans une table des matières. Par exemple, nous avons dans ce sous-document cette phrase : ''Je parle du rapport entre les dauphins et les phoques plus bas (page X) etc.''. Ce « X » doit correspondre à la page d'un autre sous-document du document maître (qui se trouve soit plus haut, soit plus bas, peu importe). Puisque mon document est en cours d'écriture, je ne peux pas savoir à quelle page va se retrouver mon chapitre sur le rapport entre les dauphins et les phoques. La valeur que je risque d'indiquer sera donc vite erronnée. S'il n'y avait qu'une '''référence''' dans mon document, je pourrais la tenir à jour manuellement (mais il faudrait que je sois vraiment très bête et que j'utilise mon ordinateur comme une vulgaire machine à écrire…). Dans ce sous-document, nous voudrions que des numéros de pages apparaissent, un peu comme dans une table des matières. Par exemple, nous avons dans ce sous-document cette phrase : ''Je parle du rapport entre les dauphins et les phoques plus bas (page X) etc.''. Ce « X » doit correspondre à la page d'un autre sous-document du document maître (qui se trouve soit plus haut, soit plus bas, peu importe). Puisque mon document est en cours d'écriture, je ne peux pas savoir à quelle page va se retrouver mon chapitre sur le rapport entre les dauphins et les phoques. La valeur que je risque d'indiquer sera donc vite erronnée. S'il n'y avait qu'une '''référence''' dans mon document, je pourrais la tenir à jour manuellement (mais il faudrait que je sois vraiment très bête et que j'utilise mon ordinateur comme une vulgaire machine à écrire…).
-Dans ce cas, nous allons plutôt utiliser une référence que j'appellerais '''référence globale'''. Grâce à cette référence, l'indication de la page sera actualisée à chaque modification de page.+Dans ce cas, nous allons plutôt utiliser une référence que j'appellerais '''référence globale'''. Grâce à cette référence, l'indication de la page sera actualisée à chaque modification de page.-->
 + 
 +==Procedure==
 + 
 +Since an illustration is more helpful than a long discourse, the following is an example of the technique;
 + 
 +*My master document contains a sub-document named <tt>dolphins_and_seals.odt<tt> containing a chapter titled "The Relationship Between Dolphins and Seals."
 +*my master document contains another sub-document, named <tt>outline.odt<tt> that contains the line "I discuss the relationship between dolphinis and seals (page X)."
 +*I want want the number (X) in "page X" to always refer to the page number of my chapter on the relationship between dolphiins and seals, regardless of any changes I make in the document.
-==Procédure==+<!--==Procédure==
Une illustration valant mieux qu'un long discours, je reprends mon exemple présenté ci-dessus : Une illustration valant mieux qu'un long discours, je reprends mon exemple présenté ci-dessus :
* Mon document maître contient un sous-document nommé <tt>dauphins_et_phoques.sxw</tt> contenant un chapitre dont le titre est « Rapport entre les dauphins et les phoques ». * Mon document maître contient un sous-document nommé <tt>dauphins_et_phoques.sxw</tt> contenant un chapitre dont le titre est « Rapport entre les dauphins et les phoques ».
* Mon document maître contient un autre sous-document, nommé <tt>plan_de_travail.sxw</tt> qui contient la ligne « Je parle du rapport entre les dauphins et les phoques plus bas (page X) » * Mon document maître contient un autre sous-document, nommé <tt>plan_de_travail.sxw</tt> qui contient la ligne « Je parle du rapport entre les dauphins et les phoques plus bas (page X) »
-* Je voudrais que le X de mon « page X » ci-dessus indique précisément et toujours la page de mon document maître où se retrouvera mon chapitre sur le rapport entre les dauphins et les phoques, et ce quelles que soient les ajouts et modifications que je pourrais faire.+* Je voudrais que le X de mon « page X » ci-dessus indique précisément et toujours la page de mon document maître où se retrouvera mon chapitre sur le rapport entre les dauphins et les phoques, et ce quelles que soient les ajouts et modifications que je pourrais faire.-->
-===Procédure pour la création d'une référence « globale »===+===Procedure for the Creation of a "Global" Reference===
-Pour créer et utiliser cette référence globale, suivez les trois étapes suivantes :+To create and use this global reference, follow the three steps below:
-====Première étape : DÉFINITION DE LA RÉFÉRENCE====+<!--===Procédure pour la création d'une référence « globale »===
 + 
 +Pour créer et utiliser cette référence globale, suivez les trois étapes suivantes :-->
 + 
 +====Step One: Defining the Reference====
 + 
 +{| cellspacing="8" cellpadding="0" width="100%"
 + |colspan="3"|''It is assumed that a master document has been created, which contains a sub-document <tt>abstract.odt<tt>and the sub-document <tt>dolphins_and_seals.odt</tt>.''
 + |--------------------------------------------------------
 + !width="180" align="left"|''Action''
 + !width="*" align="left" |''Operation/Result''
 + !width="80" align="left" |''Shortcut''
 + |--------------------------------------------------------
 + |'''1. Edit the sub-documents <tt>dolphins_and_seals.odt</tt>'''
 + | In the Navigator, in the section "Links," double-click on the sub document <tt>dolphins_and_seals.odt</tt>'''
 + | ---
 + |--------------------------------------------------------
 + | ||colspan="2"|''—> NeoOffice opens the document <tt>dolphins_and_seals.odt</tt> and places it in front.''
 + |--------------------------------------------------------
 + |'''2. Select the Text of the Reference'''
 + |In this document, select the title "Relationship between dolphins and seals." (or simply place the cursor at the beginning of this title.)
 + | ---
 + |--------------------------------------------------------
 + |'''3. Open the {{Window|Fields}} Window.'''
 + |Under the {{Menu|Insert}} menu, choose {{Menu|Fields}} then {{Menu|Other....}}
 + | ---
 + |--------------------------------------------------------
 + | ||colspan="2"|''—> NeoOffice opens the {{Window|Fields}} dialog''
 + |--------------------------------------------------------
 + |'''4. Choose the Tab'''
 + |Choose the {{Section|References}} tab
 + | ---
 + |--------------------------------------------------------
 + |'''5. Set the Reference'''
 + |In the left column, select "Set Reference"<br />In the {{prefName|Name}} (in the bottom right of the dialog box), give a name to this reference, here <tt>"relDolphinsSeals"</tt>
 + |---
 + |--------------------------------------------------------
 + | ||colspan="2"|'''Attention ! Make a note of the name that you have given to this reference, because it will not appear later!'''
 + |--------------------------------------------------------
 + | ||colspan="2"|''Tip: select the name of the reference using the mouse, the copy it (Command-c). The name will now be on the clipboard; then you can paste it (Command-v) ''
 + |--------------------------------------------------------
 + |'''6. Insert the definition of the reference'''
 + |Click on the {{button|Insert}} button...<br />... then close the {{Window|Fields}} dialog box by clicking {{Button|close}}.
 + |---
 + |--------------------------------------------------------
 + | ||colspan="2"|''—> NeoOffice closes the {{Window|Fields}} dialog box after creating the (invisible) reference.''
 + |--------------------------------------------------------
 + |'''7. Save the Document'''
 + |Save the document <tt>dolphins_and_seals.odt</tt><br />(And close it, if you do not have other edits to make in it).
 + | Command-s (then Command-w)
 + |}
 + 
 +<!--====Première étape : DÉFINITION DE LA RÉFÉRENCE====
{| cellspacing="8" cellpadding="0" width="100%" {| cellspacing="8" cellpadding="0" width="100%"
Line 71: Line 142:
|Enregistrer le document <tt>dauphins_et_phoques.sxw</tt><br />(Et fermez-le si vous n'avez pas d'autres modification à faire dessus). |Enregistrer le document <tt>dauphins_et_phoques.sxw</tt><br />(Et fermez-le si vous n'avez pas d'autres modification à faire dessus).
| Pomme-s (puis Pomme-w) | Pomme-s (puis Pomme-w)
 + |}-->
 +
 +====Step Two: Using the Reference====
 +
 +{| cellspacing="8" cellpadding="0" width="100%"
 + !width="180" align="left"|''Action''
 + !width="*" align="left" |''Operation/Result''
 + !width="80" align="left" |''Short-cut''
 + |--------------------------------------------------------
 + |'''8. Open the sub-document <tt>outline.odt</tt>'''
 + |Bring the master document to the front and double-click on the link to the dub-document <tt>outline.odt</tt>in the Navigator.
 + |---
 + |--------------------------------------------------------
 + | ||colspan="2"|''—> NeoOffice opens the document <tt>outline.odt</tt> and/or brings it to the front.''
 + |--------------------------------------------------------
 + |'''9. Choose the place where the reference needs to be'''
 + |Select the "X" described above, which appears in the sentence "I will discuss the relationship between dolphins and seals below (pags '''X''').
 + |---
 + |--------------------------------------------------------
 + |--------------------------------------------------------
 + |'''10. Open the {{Window|Fields}} window'''
 + |Under the {{Menu|Insert}} menu, choose {{Menu|Fields}} then {{Menu|Other...}}
 + | ---
 + |--------------------------------------------------------
 + | ||colspan="2"|''—> NeoOffice opens the {{Window|Fields}} dialog box''
 + |--------------------------------------------------------
 + |'''11. Choose the Tab'''
 + |Choose the {{Section|References}} tab if necessary (if you have followed this procedure to the letter, the tab will already be active.)
 + | ---
 + |--------------------------------------------------------
 + |'''12. Prepare the Reference'''
 + |In the left-hand column, choose {{prefName|Insert Reference}} <br />In the {{prefName|Name}} field (at the bottom right of the dialog box), type the exact name that you have given to the reference, here <tt>"relDolphinsSeals" — or press Command-v If you copied the name to the clipboard.
 + |---
 + |--------------------------------------------------------
 + |'''13. Format the Reference'''
 + |In the right column {{prefName|Format}}, make sure that {{prefName|Page}} is selected (because we want the page number where the paragraph is found).
 + |---
 + |--------------------------------------------------------
 + |'''14. Insert the Reference'''
 + |Click on the {{Button|Insert}]...<br />then close the {{Window|Fields}} dialog and click on {{Button|Close}}.
 + | Press Return
 + |--------------------------------------------------------
 + | ||colspan="2"|''—> NeoOffice closes the {{Window|Fields}} diialog box after inserting the reference in the desired place.<br />For the moment, the text must be (page 1), which is normal because the document has not yet found the definition of this reference.''
 + |--------------------------------------------------------
 + |'''15. Save the Sub-document'''
 + |Save the document …<br />and close it if you do not need to make any other changes.
 + | Command-s (and Command-w)
|} |}
-====Deuxième étape : UTILISATION DE LA RÉFÉRENCE====+<!--====Deuxième étape : UTILISATION DE LA RÉFÉRENCE====
{| cellspacing="8" cellpadding="0" width="100%" {| cellspacing="8" cellpadding="0" width="100%"
Line 118: Line 236:
|Sauver le document (menu <tt>Fichier > Enregistrer</tt>)…<br />et le fermer si aucune autre modification n'est à effectuer. |Sauver le document (menu <tt>Fichier > Enregistrer</tt>)…<br />et le fermer si aucune autre modification n'est à effectuer.
| Pomme + s (et Pomme + w) | Pomme + s (et Pomme + w)
 + |}-->
 +
 +====Step Three: Verify the Reference====
 +
 +{| cellspacing="8" cellpadding="0" width="100%"
 + !width="180" align="left"|''Action''
 + !width="*" align="left" |''Operation / Result''
 + !width="80" align="left" |''Shortcuts''
 + |--------------------------------------------------------
 + |'''16. Verification'''
 + |Bring the master document to the front and update the links by clicking on this icon [[Image:BNavUpdate.png]] in the Navigator; hold down the mouse button and choose "All" from the contextual menu. Confirm that this is what you want to do in the confirmation box that opens.
 + |---
 + |--------------------------------------------------------
 + | ||colspan="2"|''—> If you have followed these instructions to the letter, you will now see, in your document <tt>outline.odt</tt> the correct page number for your chapter on the relationship between dolphins and seals. <br /> Finally, because we have been speaking about it, can you tell me about this famous relationship between dolphins and seals?...''
|} |}
-====Troisième étape : VÉRIFICATION DE LA RÉFÉRENCE====+<!--====Troisième étape : VÉRIFICATION DE LA RÉFÉRENCE====
{| cellspacing="8" cellpadding="0" width="100%" {| cellspacing="8" cellpadding="0" width="100%"

Current revision

Contents

Description of the Problem

Let's say that a sub-document (an inserted document) of a master document must contain a cross-reference to an element in another sub-document in the same master document. In the case, it is not possible to use the Fields window to define and insert the refrence in the "traditional" manner.


More Concretely...

Let's say that the master document contains a sub-document with an outline detailing the contents of other documents. Sort of like a table of contents, but more detailed.

In this sub-document, we want the page numbers to appear, similar to a table of contents. For example, we might have the phrase "I discuss the relationship between dolphins and seals (page X)." This "X" must correspond to a page in another sub-document of the master document (it does not matter if the other sub-document is above or below the current one). Because the document is in the process of being written, I do not know what page will be the first page of my chapter on the relationship between dophins and seals. If there is only one reference in my document, I could keep it up to date manually, but then I would be treating my computer like a typewriter.

In this case, it is best to use a reference I call a global reference. Thanks to this reference, the page number will be updated with each change to the page.


Procedure

Since an illustration is more helpful than a long discourse, the following is an example of the technique;

  • My master document contains a sub-document named dolphins_and_seals.odt<tt> containing a chapter titled "The Relationship Between Dolphins and Seals."
  • my master document contains another sub-document, named <tt>outline.odt<tt> that contains the line "I discuss the relationship between dolphinis and seals (page X)."
  • I want want the number (X) in "page X" to always refer to the page number of my chapter on the relationship between dolphiins and seals, regardless of any changes I make in the document.


Procedure for the Creation of a "Global" Reference

To create and use this global reference, follow the three steps below:


Step One: Defining the Reference

It is assumed that a master document has been created, which contains a sub-document <tt>abstract.odt<tt>and the sub-document <tt>dolphins_and_seals.odt.
Action Operation/Result Shortcut
1. Edit the sub-documents dolphins_and_seals.odt In the Navigator, in the section "Links," double-click on the sub document dolphins_and_seals.odt ---
—> NeoOffice opens the document dolphins_and_seals.odt and places it in front.
2. Select the Text of the Reference In this document, select the title "Relationship between dolphins and seals." (or simply place the cursor at the beginning of this title.) ---
3. Open the Fields Window. Under the Insert menu, choose Fields then Other.... ---
—> NeoOffice opens the Fields dialog
4. Choose the Tab Choose the References tab ---
5. Set the Reference In the left column, select "Set Reference"
In the Name (in the bottom right of the dialog box), give a name to this reference, here "relDolphinsSeals"
Attention ! Make a note of the name that you have given to this reference, because it will not appear later!
Tip: select the name of the reference using the mouse, the copy it (Command-c). The name will now be on the clipboard; then you can paste it (Command-v)
6. Insert the definition of the reference Click on the Insert button...
... then close the Fields dialog box by clicking close.
—> NeoOffice closes the Fields dialog box after creating the (invisible) reference.
7. Save the Document Save the document dolphins_and_seals.odt
(And close it, if you do not have other edits to make in it).
Command-s (then Command-w)


Step Two: Using the Reference

Action Operation/Result Short-cut
8. Open the sub-document outline.odt Bring the master document to the front and double-click on the link to the dub-document outline.odtin the Navigator.
—> NeoOffice opens the document outline.odt and/or brings it to the front.
9. Choose the place where the reference needs to be Select the "X" described above, which appears in the sentence "I will discuss the relationship between dolphins and seals below (pags X).
10. Open the Fields window Under the Insert menu, choose Fields then Other... ---
—> NeoOffice opens the Fields dialog box
11. Choose the Tab Choose the References tab if necessary (if you have followed this procedure to the letter, the tab will already be active.) ---
12. Prepare the Reference In the left-hand column, choose Insert Reference
In the Name field (at the bottom right of the dialog box), type the exact name that you have given to the reference, here "relDolphinsSeals" — or press Command-v If you copied the name to the clipboard.
13. Format the Reference In the right column Format, make sure that Page is selected (because we want the page number where the paragraph is found).
14. Insert the Reference Insert}]...
then close the Fields dialog and click on Close.
Press Return
—> NeoOffice closes the Fields diialog box after inserting the reference in the desired place.
For the moment, the text must be (page 1), which is normal because the document has not yet found the definition of this reference.
15. Save the Sub-document Save the document …
and close it if you do not need to make any other changes.
Command-s (and Command-w)


Step Three: Verify the Reference

Action Operation / Result Shortcuts
16. Verification Bring the master document to the front and update the links by clicking on this icon Image:BNavUpdate.png in the Navigator; hold down the mouse button and choose "All" from the contextual menu. Confirm that this is what you want to do in the confirmation box that opens.
—> If you have followed these instructions to the letter, you will now see, in your document <tt>outline.odt the correct page number for your chapter on the relationship between dolphins and seals.
Finally, because we have been speaking about it, can you tell me about this famous relationship between dolphins and seals?...



This article in other languages: Italiano Français
Personal tools