GNU TeXmacsUser manualReferenceAboutEnglish
Example: a paper with a coauthor

This page follows a typical collaboration from the beginning: you start a paper, put it on a server such as GitHub or GitLab, and a coauthor joins you. Both of you use the simple mode.

Starting the project

Save your paper in a directory of its own, for instance paper/paper.tm, together with its images and bibliography. Since the Version menu is only shown for documents which are already under version control, use Tools\(\rightarrow\)Versioning tool\(\rightarrow\)Create Git repository. Then open Version\(\rightarrow\)Git panel, choose the simple mode, and save a first snapshot with Version\(\rightarrow\)Save snapshot, for instance with the description “First draft”.

What to put under version control

A snapshot contains all files of the directory, except those which are ignored by Git. Version the sources: the documents, the images which they use, the bibliographies and your style files. If some of them are elsewhere, then Version\(\rightarrow\)Project offers to add them. Do not version files which can be regenerated, such as exported PDF files, nor very large files, which would make the repository heavy for everybody. The file .gitignore, which TeXmacs created in the directory, lists the files to ignore; it already contains the backup files of TeXmacs, and a line for PDF files which you only have to uncomment.

Putting the project on a server

On the web site of your hosting service, create a new, empty project (without a README file), and copy its address, for instance git@github.com:you/paper.git. Connecting your repository to the server is done once, in the full mode: select Version\(\rightarrow\)Git preferences and choose the full mode, use Version\(\rightarrow\)Git\(\rightarrow\)Remotes\(\rightarrow\)Add remote with the name origin and this address, then Version\(\rightarrow\)Git\(\rightarrow\)Send changes (push). You may then go back to the simple mode. Finally, invite your coauthor to the project on the web site.

Joining the project

Your coauthor uses Tools\(\rightarrow\)Versioning tool\(\rightarrow\)Clone Git repository, with the address of the project and a directory for the copy, then opens the paper from the new directory.

Working day by day

Each of you works as follows:

  1. Version\(\rightarrow\)Synchronize before starting, to get the work of the other;

  2. edit the documents as usual;

  3. Version\(\rightarrow\)Save snapshot at the end of a piece of work, with a short description;

  4. Version\(\rightarrow\)Synchronize again, to send it.

If you both saved snapshots since the last synchronization, then TeXmacs asks whether they should be merged: answer yes. Documents in which you changed different paragraphs are merged directly. If a document is reported as having a conflict, open it and use Version\(\rightarrow\)Resolve conflict: the changes are merged word by word, and you only choose between both versions where you changed the same words. Then use Version\(\rightarrow\)Mark as resolved, save a snapshot and synchronize. See resolving conflicts for the details.

At any time, Version\(\rightarrow\)Compare with shows how the document differs from an earlier version, and Version\(\rightarrow\)Who changed what shows who last changed each paragraph.

Submitting the paper

When you submit the paper, give a name to this version with Version\(\rightarrow\)Git\(\rightarrow\)Tag this version (in the full mode), for instance submitted. When the referee reports arrive, Version\(\rightarrow\)Compare with\(\rightarrow\)Tag submitted shows everything which was changed since, which helps you to write your answer. Note that tags are only kept in your own copy of the repository: they are not sent by Synchronize.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".