I would like to collaborate on a paper with someone who's experienced with LaTeX and it would be improper for me to ask them to use LyX, but I really don't like digging into raw LaTeX code. Is there a way we can interact where I get to view his changes in LyX and he can view mine as raw LaTeX? Ideally, he wouldn't even know I was using LyX (or at least it wouldn't get in his way).

Note: I'm very, very inexperienced with LaTeX and I don't really understand how LyX interacts with LaTeX. I've generally just used defaults and enjoyed how it formats things without much looking under the hood or trying to add advanced customizations. I don't really know what a .layout file is and how it interacts with .cls and .sty files (or for that matter what's the difference between .cls and .sty files), but I have lots of time and I'm willing to learn. I'd much rather read a book (if the book is well-written) with an in-depth explanation than I would a "Getting Started" tutorial which just gives instructions.

If necessary, I'm willing to write my own .layout file, but I expect I'll have to learn a lot first.

  • 1
    LyX essentially just generates LaTeX code, saves it in a temporary file, and generates the PDF based on that temporary file. It's possible to export and import LaTeX files from/to LyX, but based on a couple of questions I've seen on here earlier, that might not always work seamlessly. I've never done this myself though, so have no experience of my own. Oct 6, 2018 at 18:48
  • I agree with the comment above. I would not try to do that. I know LaTeX looks intimidating, but as long as your collaborator is willing to help, you might consider putting in the time to learn the basics of LaTeX. In my opinion, collaboration with LyX only works well if all are using LyX.
    – scottkosty
    Oct 6, 2018 at 19:18

1 Answer 1


A craftsman relies on professional tools with which they have acquired years of experience. They do not like to be asked to give up their tools, for good reasons. But when two of them are collaborating, it is also a mark of professionalism to be able to adapt to other professional tools when needed.

Here is my experience collaborating on several documents both with LyX and LaTeX: papers, grant proposals, exercise sheets for teaching... One thing stands out: in all the successful collaborations, the tool in use was the one which the author who was the main the driving force in the writing was the most comfortable with.

The first thing to understand is that LyX is not a LaTeX editor. It is not possible to receive a LaTeX file from your collaborator, edit it with LyX, and send them back a LaTeX file. LyX can import LaTeX files, but the import is imperfect. It can output complex and high-quality LaTeX documents of the best quality, but it is not designed for round-trips.

I will look at three possible alternatives for LyX users seeking to collaborate with LaTeX users.

  1. Use LyX!
  2. Use LaTeX!
  3. Use both!

To cut to the chase, in your case my advice will be that learning LaTeX is actually a good thing and that LyX can still help you in the process, but I wanted to address the more general question of collaboration for LyX users which arises frequently. The first item is more developed because I have the most experience with it, but hopefully my answer can be completed with comments and other answers.

Use LyX!

I have had a few successful collaborations entirely in LyX, with collaborators who had never used LyX before. Collaborators can accept to use LyX for several reasons. They can be curious, they can accept to let a leading author decide, and they can also let themselves be convinced.

Picking up LyX is easy (for editing an already set-up document) but requires a curious and open mind. At least one collaborator needs to be experienced enough to set up the document to the required format, and to help others and fix whatever occasional compilation issues. The interface can be found a bit quirky by newcomers, but some effort has been put in evening-out some of the quirkiness in recent versions. They must be told that if LyX ever crashes, it always manages to make an emergency save. That could save them some scare.

I only ever used LyX together with git for version control. It will not be possible to edit the document simultaneously like in ShareLatex anytime soon, so everybody must be told to sync frequently, and the lyx file format handles well non-overlapping merges.

In one occasion, part of the article had already been written in LaTeX, so the LyX expert made the conversion. This is a workflow that can work well if a collaborator wants to write their main contributions with LaTeX and use LyX only for small changes. Note that converting from LaTeX to LyX once is easy.

One occasion was a bit different: on a grant proposal with five collaborators, we chose LyX over LaTeX when switching from Google Documents to have a professional look. This gave us the good support for bibliography while keeping a similar workflow using change-tracking and notes.

If you need to convince somebody, some arguments might come handy. First it is important not to present LyX as a LaTeX editor, which can lead to a lot of confusion. Here are a few features that can make people want to use it, especially in a collaborative setting.

  • In-line notes and change-tracking (suggest a change, review and amend changes, comment on a proposed or rejected change...)
  • Bibliography manager (look up articles in the data base, easily see which are the articles corresponding to a citation, see in advance how the citation is going to appear according to the particular variant of the \cite command, see if an article is missing or duplicate...)
  • Automatic compilation (handles all compilation phases, automatic package inclusion, automatic coding of special characters, no pollution with temporary files...)
  • Semantic edition (edition and display according to the structure of the document; inherits LaTeX philosophy and structure; no need to chase { and }; copy-paste that takes the semantics into account; easy to reorder paragraphs, items, and sections; edit mathematical formulas easily; spot the typos before compiling; perform semantics actions with customisable keyboard shortcuts...)
  • Outliner (see and navigate in your document through various tables of contents)
  • Math macros (enter standard math macros with their LaTeX name; define custom macros by giving separately how it compiles in LaTeX and how it looks in LyX; moreover as everyone tends to come with their own set of macros: completion reminds you of other people's macros, LyX shows them with their meaning and argument count...)
  • Discoverability (the interface shows you LaTeX features and commands you did not know you needed, and reminds you of those you seldom use; in addition LyX tries to push you towards the most standard LaTeX usage, and people may surprise themselves to learn something about LaTeX too...)
  • Extensibility (you can define custom insets and macros for custom commands; and fall back to entering raw LaTeX if ever needed)

You say that you are inexperienced with LaTeX, but expertise of LyX requires a good knowledge of LaTeX. For this reason my advice is to learn LaTeX.

Use LaTeX!

Collaborators can be reluctant to use LyX. As mentioned, they want to use their own tools for many good reasons. For instance they might have invested in learning some advanced and specialised LaTeX which is crucial to their work, or have developed their own dialect over the years with an accumulated legacy of custom macros and style files. They might just be overall satisfied with their workflow.

You can ask them what is their workflow. For instance they surely have their own professional tools or methods for: communicating comments and suggesting changes, automatically handling compilation, managing the document's bibliography, editing LaTeX easily, remembering commands and macros... They will surely be happy to teach them to you.

In addition, although LyX cannot help you edit the LaTeX file directly, you can still use it to learn LaTeX. For this purpose, you can write in LyX with the code preview panel open.

Another thing to know is that LyX can be a math editor for LaTeX. You edit math in LyX by copy-pasting the LaTeX it into a document, and you get the output converted back to LaTeX with the code preview panel again. By the way LyX works, this works better than for non-maths.

Use both!

A natural idea is to mix LyX and LaTeX on a per-file basis. The document is divided in sub-documents, each of which is either a .tex file or a .lyx file depending on the designated main contributor.

At a technical level, this works well. The simplest is to have a .lyx file as the main document. You can setup a Makefile which will call lyx to generate either the .tex or the pdf directly. In this way the collaborator does not even need to open LyX to compile.

In practice, we found that the evolution of the document during the final rush made it necessary to switch to 100% LyX. So, it has been a good gateway to LyX. It could also have worked till the end if the division of the document had been more rigid, e.g. book chapters.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.