> <\body> When writing documents in collaboration with other authors, it frequently arises that one wants to go through changes made by the other authors, and either accept, discard or further correct them. After enabling the versioning tool through , a special menu appears in the main menu bar, which makes this process automatic. Below, we will describe in more detail how this tool works. In addition, there exist many stand-alone programs for maintaining several versions of a same file, such as |http://subversion.tigris.org/>, |http://git-scm.com/>, |http://darcs.net/>, |http://www.gnu.org/software/gnu-arch/>, just to mention a few of them. currently provides a rudimentary support for and , but interfaces for the other systems could easily be added. Assume that we have two versions and of the same document. In order to see the changes, first load the newer version , then click on and select the older version . The buffer will still be named , and the changes between both versions will be indicated by special markup. If there are any changes, then the cursor will be positioned at the first difference. In a similar way, you may compare the current buffer with anewer version on disk using . It is possible to go through all the differences between the old and new versions either from the items in the submenu , or using the keyboard shortcuts and . One may also use the more general structured navigation shortcuts , , and . Differences between the two versions can be displayed in three ways: by showing only the old version, only the new version, or both versions simultaneously. In all cases, the old version is displayed in dark red and the new version in dark green. The visualization style can be specified individually for each individual change, via or the keyboard shortcuts (old version), (new version) and (both versions). One may also cycle through the different style using the structured variant key . If you selected some text, then the above actions will apply to the whole selection. In particular, by selecting the entire file, you can visualize the older or the newer version, or both versions. It often occurs that we want to go through the changes between two versions and progressively retain either one or the other version for each individual difference. Assuming that the cursor is inside a given difference, this can be done from entries in the submenu . Alternatively, one may use the shortcuts , and to retain the old, new and currently displayed version, respectively. If both versions are displayed, then retains the new version. After retaining one of the versions, we automatically jump to the next difference, which can then be processed. If you selected some text, then any of the above action will retain the appropriate version for each of the differences in the selection. This applies in particular to the case when you select the entire document. A convenient alternative way to process all differences is to use and to go through the differences, use and to select the preferred version. As soon as all differences have been processed, you select the entire document and click on . The entries in the submenu allow you to control the grain with which differences between versions are computed. By default, we use the finest grain . It is also possible to compute differences on a paragraph-based level, using . In that case, the entire paragraphs in which a change occurs will be highlighted. The roughest grain will highlight the entire text, if a change occurs somewhere inside. The grain is used when comparing two documents using , but it is also possible to change the grain for a selected portion of text: simply select the text and choose the new grain in the submenu . This can in particular be applied on the entire buffer. Similarly, if you change the grain inside a difference, then the difference will be recomputed using the new grain. Notice that you may also \Pchange\Q the grain to the current grain. This has the effect of reactualizing the differences of a selected portion or of the current difference at the cursor position. This may be useful, if you made some changes to one of the versions. For instance, assume that the old version contained a theorem and that we changed it into a lemma in the new version and also modified part of its inside text. When visualizing the changes, the whole theorem will be highlighted, since there is no appropriate markup to indicate that we just changed from atheorem to a lemma. Nevertheless, if we want to compare the inside texts, we may turn the old theorem into a lemma and then reactualize. for version control> If the file you are editing belongs to a directory that is under version control (only and is currently supported, although other systems might follow), then the first part of the menu will contain some clickable entries. First of all, if the current buffer is under version control, then you may take a look at its history using . The history contains a list of hyperlinks to older revisions, together with short information about who changed what and when. Older revisions cannot be saved, but you may compare them to the current user version (on disk or being edited) using . After making some changes to a file under version control, the version inside the editor or on disk no longer corresponds to the version in the repository. Using, the current user's version can be committed to the repository. When doing so, you will be prompted for a small explanatory message about the changes that you have made. A file that is not yet under version control can be added to the version control system using . Registering a file does commit it to the repository: you still have to use in order to do so. If, while you were editing, changes to the file were made in the repository, then you may merge the result with your current version using . At the moment, no conflict resolution has been implemented yet, although this is planned for the future. >