I collaboratively edit documents in Google Docs. Unfortunately, there are no LaTeX macros/wrappers I know of for Google Docs. So, editing a TeX file on Google Docs is like going back to the old days when you had to edit LaTeX in plan text.

Does anybody know of a LaTeX wrapper for Google Docs/Drive?

Auto-Latex Equations add-on for Google Docs

For all math equations typeset in MathJax/LaTeX, the Auto-Latex Equations add-on for Google Docs is free and works brilliantly. It simply replaces all your math with high-quality images of the equation.

All you have to do is type an equation within delimiters, like $$55 + \sqrt{5}$$ and it can be rendered in super high quality at whatever time you like by rendering all the equations in your document. If you mess up, you can always undo one or all the equations.

You can get it for free at the Google Docs add-ons store.

  • 1
    LaTeX != MathJax. – cfr Oct 11 '15 at 2:23
  • @cfr Yup. I'm just hoping this will help someone who needs LaTeX for math equations in particular. Indeed, this is better than nothing from OPs perspective. – John Targaryen Oct 11 '15 at 21:37
  • 1
    @Joe this is exactly what I was looking for. +1 – zeboidlund Jun 24 '17 at 2:42
  • Sadly, this does not support anything with more than one line. It's astonishingly limited. – Neil Traft Apr 16 at 13:21

LaTeX Lab

Unfortunately, LaTeX Lab has been declared deprecated by its developers. This seems to be a results of Google's massive API changes in recent versions of Google Docs. There is a vast number of LaTeX-Lab-like wrappers for Google Docs whose developments has ceased due to that fact.

If you want to have integration with Google Docs you may want to use LaTeX Lab (offline). From the Google Code project site:

LaTeX Lab is deprecated

LaTeX Lab is an open source implementation of a web based LaTeX editor for Google Docs.

Other online editors

Some other popular online editors are:

  • Overleaf (formerly known as WriteLaTeX; doesn't require signup, you can immediately start typing)
  • ShareLaTeX (AFAIK has Dropbox integration)
  • changed the link and description due to the rebranding. Feel free to roll back. – Johannes_B Jan 26 '15 at 20:33
  • 1
    It seems LaTeX Lab doesn't work anymore... – Royi Jul 20 '15 at 19:33
  • 3
    @jvriesem Google substantially changed its Google Docs API recently. Therefore most other wrappers also stalled their development due to not being able to keep up with Google's rapid sequence of changes. – Henri Menke Aug 23 '15 at 13:56
  • 4
    Dear downvoter, it is common practice on this site to leave a comment stating the reason for downvoting. I would really appreciate if you can point out the things where my answer is lacking. – Henri Menke Feb 2 '16 at 8:07
  • 1
    Overleaf and ShareLaTeX are now part of the same company (can't remember which one bought the other) so it seems they will be gradually merging into one product. – daknowles Aug 31 '17 at 6:55

Following from the @aaron terse answer, I have been using http://weavr.co.uk/...

Pros

  • It's free
  • As far as I can ascertain at the moment it's the only Latex compilation that works with Google Drive/Docs. You therefore get all the collaborative environment tools.
  • Certainly for the basic editing I've done it works fine. There is some weavr specific code which needs to be included to reference other files (e.g. bib, images, etc.), but it's not too invasive.

Cons

  • The documentation is very minimal (one page and a half) and there is no obvious user support (e.g. forum, wiki).
  • I can find little information about weavr and the code seems to be developed/supported by one person (http://weavr.co.uk/contact.html). So it's not clear the extent to which the code will be maintained/developed in the future.
  • The website has now been in existence for more than three years. The developer is very responsive to any problems that are brought to his attention. There appears to be active development over the years. Seems to be a great solution. – A Feldman Dec 27 '15 at 2:40
  • Do you have further experience with weavr two years later? How does it compare to sharelatex/overleaf? – daknowles Aug 31 '17 at 6:55
  • Weavr is still very useful even two years later. I did use it recently and it works well. I think that it compares very well to sharelatex/overleaf, and Weavr has always been completely free to use. The storage space is practically unlimited as gdoc format is not counted against your storage quota in google docs. Google docs has extremely good collaboration features, that cannot be beat at present. However, I more often use my own solution as it uses my own latex installation, which I like. – A Feldman Sep 18 '17 at 4:23

Also check out Authorea. From what I understand it is similar to Overleaf and ShareLatex mentioned by @HenriMenke above.

  • This is more a comment than a new answer. Maybe you could suggest adding it the Henri Menke's existing answer? – cfr Dec 27 '15 at 2:57
  • 2
    @cfr Thanks for the suggestion. I purposefully choose this format because people can sometimes miss out on comments when there is a large number of them. – champost Jan 4 '16 at 19:58

I love Weavr, and use it extensively. However, in Ubuntu 14.04, if you have fully working texlive installation, you can also "roll your own" so to speak by using a script. Mine, which I called "glatex.sh", looks like this:

#!/bin/bash

wget -O $2.tex "https://docs.google.com/document/export?format=txt&id=$1"; 
bom-remove.sh $2.tex; 
latexmk -pdf -f -interaction=nonstopmode $2.tex;
xdg-open $2.pdf

The bom-romove script is set out in this post bom_remover It is necessary because gdocs downloads with a "bom" included, which LaTeX will choke on.

Make both bom-remove script and glatex script executable (chmod +), and then either put them both in /usr/local/bin or put an alias to each there.

To use: a) Make a google doc, share it as a link and copy the link id b)on the command line, type your script's name, the link id, and a name for your local file, then Enter

This will then download the google doc, name it and compile it as tex file, produce a like named pdf file and then pop up evince with the pdf loaded. To refresh when the google doc is changed run the script again.

Credit for the idea goes to Using GoogleDocs as Team editor for Latex-files

For those who might want to use a "beeline reader" effect, I adapted @phg's solution which is in LuaLaTeX. To do this I made 4 bash script files, two for black/red/blue beeline, and 2 for just black.

The reason for the black script files is that the header cannot be in the LuaLaTeX file containing the text, your header has to be set out in a separate document that calls "beegradients.tex" which I wrote into the bash script files texscript.sh (black) and color-texscript.sh (red/black/blue). These have to be used with glatex-beeline.sh and color-glatex-beeline.sh in order to work. If I didn't make a black color version of the files, I would have to cut and paste the header from color-texscript.sh to my document in order to allow it to compile. It seemed easier to just make a "beelines" version in black instead.

Please note that for some reason I had to make links to beegradients.lua and beegradients.tex and those links had to be present in my compilation directory.

To create "beelines" pdf's make sure all the *.sh files are in a system wide directory, (eg, /usr/local/bin), fire up your terminal type

 color-glatex-beeline.sh <google doc id> <any-filename-you-want> (for red/black/blue text) 

and it will produce a *.tex and a *.pdf and then pop up the pdf in evince pdf viewer.

For the black version of the same document do the same thing using glatex-beeline.sh

I have only tested this on Linux.

The scripts are set up expecting a file named "abbrev.tex" containing "abbrevs" package abbreviations. The

\let\maybe@space@\xspace

corrects for a bug that mis-spaces commas after abbreviations. LuaLaTeX complains about this, but I don't know what to do about that.

  • 1
    If you use xdg-open rather than evince then it will use the default PDF viewer, whatever that happens to be. – cfr Jan 4 '16 at 20:38

Disclaimer: This is official account of Docx2Latex

We have just launcher Google Docs-add on which combines power of Latex and ease of word processors and cross Referencing too.

Here are features provided by Docx2Latex add-On

  1. Write LaTeX code snippets inside Google Docs with syntax highlighting.
  2. Add captions to figures and tables.
  3. Cross-refer figures and tables.
  4. Auto update captions and references too, when a new figure or a table is inserted.
  5. View LaTeX compiled PDF in real-time.
  6. Automatic LaTeX source code generation and free downloading.

Add-On Link: Docx2Latex Google Docs Add-on

Watch Demo: Short Demo

The g(math) plug-in works really well for me.

It has a simple interface where you can enter some LaTeX code and then insert it as an image into your Google Doc. This with suggestive formatting makes adding LaTeX to your Google Doc a breeze.

  • 1
    Could you elaborate a little more on this, since (external) link-only answers are not all that helpful. Include some screen shots of your own work and explain how one can set things up to work on your machine. – Werner Mar 22 '17 at 22:15
  • @Werner hope that helps a little. It's just a plug in. So you just add it, give it the permissions it asks for and you're done. – CGTheLegend Mar 24 '17 at 7:09

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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