What is GLaTeX?

GLaTeX is a Google Docs Add-on! It converts Google Docs into a LaTeX editor that can compile PDF files and offers a rich user experience with various functionalities. We offer a Google Docs Add-on and a Chrome Extension!

GLaTeX Add-on converts your Google Docs into a LaTeX editor! It colors content of your file for LaTeX syntax, creates a sidebar with your compiled PDF in it, offers a LaTeX symbol dictionary, and so much more!

LEARN MORE GET

GLaTeX Extension provides a richer and server-independent user experience! It adjusts the size of the sidebar with your compiled PDF, offers theme selection, and compiles PDF files locally on your computer!

LEARN MORE GET

GLaTeX is Open Source!

Our vision is beyond our imagination! We know that the only way to exceed our own imagination is to collaborate with others and learn from them. That is why we made our project open source. We want to create a community to improve GLaTeX together! GitHub link

GLaTeX is verified!

GLaTeX needs your permission to access your Google Docs files, Google Docs interface, and your Google Drive. But, do not worry! GLaTeX is verified by Google for authentication! We never use your data for any other purposes. Privacy Policy

A Little More...

About GLaTeX

GLaTeX Add-on is a Google Docs Add-on available on the G Suite Marketplace! It covers most of the main GLaTeX functionalities. Below, features provided by the GLaTeX Add-on are listed.

  1. Page setup for a LaTeX-editor-like text look.
  2. LaTeX syntax highlighting.
  3. LaTeX special symbols dictionary.
  4. Standard LaTeX environments dictionary.
  5. A sidebar containing compiled PDF file.
  6. GLaTeX PDF Viewer inside the sidebar which contains following functionalities implemented in buttons, keyboard-mouse shortcuts, and switches.
    1. Previous-next page buttons and keyboard shortcuts.
    2. Zoom out-in buttons and keyboard shortcuts.
    3. Compilation button and keyboard shortcut.
    4. Find in PDF button and keyboard shortcut.
    5. Find in TeX keyboard-mouse combination shortcut.
    6. Download PDF button and keyboard shortcut.
    7. Server-local compilation switch.
    8. Help button.
    9. Information boxes triggered on mouse hovers for each item in the PDF viewer.
GLaTeX Add-on is implemented with Google Apps Script (a variation of Javascript adapted for extending Google services), HTML, and Javascript. Google Apps Script codes are executed on Google servers and HTML-Javascript codes are executed on the browsers. Communication between these two components is ensured by special Google API function calls.

GLaTeX Extension is Google Chrome Extension available on the Chrome Web Store! It assists GLaTeX Add-on to achieve several essential features of the GLaTeX. These features provided by the GLaTeX Extension are listed.

  1. Increases the size of the sidebar containing compiled PDF file.
  2. Enables local compilation.
  3. Offers light and dark themes for Google Docs.
GLaTeX Extension is implemented with HTML, Javascript, Python, and Bash. HTML-Javascript is used for the browser interface of the extension and for the dark theme. Python is used for enabling a local server on the user machine. This local server receives requests from GLaTeX Add-on and serves for all functionalities just like GLaTeX server. Bash is used in the installation script of the local server. The installation script installs all requirements, compile the local server implementation, and takes care of all adjustments for execution of the local server.

It is extremely easy to use GLaTeX. Actually, you already know how to use it!

  1. Download GLaTeX Add-on from the G Suite Marketplace.
  2. Download GLaTeX Extension from the Chrome Web Store.
  3. Open a Google Docs file and press Add-ons -> GLaTeX -> Start GLaTeX.
  4. Well... there is no other step actually. Just enjoy GLaTeX!

GLaTeX is a non-profit project. We are very strict on our privacy policy and never use user data for any other purposes.

  1. GLaTeX does not sell in-app products nor advertise to its users.
  2. GLaTeX is completely and will always be free.
  3. GLaTeX does not collect nor store any personal information permanently about the user, his/her Google Documents, or his/her Google Drive. Any data that is downloaded to the server for server-side compilation is deleted once a week.
  4. GLaTeX does not communicate with the user unless he/she has submitted an issue.
Source code of GLaTeX will be shared on GitHub and it will be publicly available in June 2020.

GLaTeX is a free GoogleDocs Add-on. It was created by four senior computer engineering students from the Middle East Technical University, Ankara, Turkey.

  1. GLaTeX is offered as a free tool. Developers are senior computer engineering students; however, we plan to continue supporting the tool after our graduation. Please keep your requests as specific as possible.
  2. Reporting through the help button in the sidebar is the best way to request technical support.
  3. The tool requires three authorization scopes to operate in full capacity.
    1. Read Only permission for user’s drive files: This is essential for the compilation of LaTeX files. If the Google Docs file is contained in the “My Drive” folder of the user, then only content of the current file is downloaded for compilation. If the Google Docs file is contained in a folder that is created by the user, then the whole folder is downloaded for compilation with images and/or other LateX files.
    2. Documents permission: This is essential for page setup for proper font size and type, syntax highlighting, position matching between the TeX source and the compiled pdf, inserting special LaTeX symbols requested by the user, and inserting LaTeX environments requested by the user.
    3. Script Container UI permission: This is essential for creating a sidebar containing compiled PDF files.
  4. Users can also use GLaTeX Chrome Extension (link) for resizing the sidebar, theme selection, and local compilation. When local compilation is enabled, user data is not transferred to our server, i.e., user data is kept in the user’s local machine. If the user prefers server compilation, then we keep user data for only a week and then delete.
  5. Under any condition, user data is not shared with anyone.
  6. Under any condition, we do not use user data for any other purpose than compilation.
  7. Any user data downloaded to the server for compilation purposes is deleted once a week and never used unless the user presses the compilation button.
  8. No guarantee is made for the maintenance and reliability of the service.

about

Features

GLaTeX offers a rich set of features!
Let's explore them!

  • GOOGLE-BASED
  • LATEX EDITOR
  • GDOCS FEATURES
  • EASY TO USE
  • TEX-PDF MATCHING
  • LOCAL COMPILATION
  • OFFLINE EDITING
  • LIGHT-DARK THEMES
  • LATEX DICTIONARIES
  • SYNTAX HIGHLIGHTING
  • MULTIPLE FILE COMPILATION
  • COMMAND-LINE TOOL


GLaTeX is Google-based so it is just like using a Google tool! GLaTeX Add-on is a Google Docs Add-on that can be enabled from the G Suite Marketplace. GLaTeX Extension is a Chrome Extension that can be loaded from the Chrome Web Store. Both are verified by Google and integrated with your current Google environment super easily!



GLaTeX converts your Google Docs environment into a LaTeX editor! Thanks the GLaTeX Add-on, a sidebar containing GLaTeX PDF Viewer with your compiled PDF is created on your Google Docs interface and thanks to GLaTeX Extension, size of this sidebar is adjusted for you!



GLaTeX never limits your Google Docs experience! You can use all the functionalities of Google Docs! We are only here to help!



It is super easy to use GlaTeX and you already know how to use it! You basically use Google Docs and start GLaTeX on the right side of the page. If you do not know what buttons of the GLaTeX PDF Viewer do just position your mouse on them and a help box will appear. GLaTeX will always be helping you and making things easier for you!



Just one of the cool functionalities of GLaTeX is the spatial matching feature! If you want to learn the corresponding TeX position of a PDF position, just shift+click that position and GLaTeX will show you the corresponding position on Google Docs file! If you want to learn the corresponding PDF position of a TeX position, just place your cursor on that line and press the find button on the GLaTeX PDF Viewer (or just control+f) and GLaTeX will show you the corresponding position on the Google Docs file!



Here is the coolest part: thanks to GLaTeX Extension, you can compile your LaTeX source on your local machine! You are independent and do not need to rely on our servers! This speeds up the compilation process and increases the security significantly. On top of local compilation, once you switch to local compilation settings, every functionality of GLaTeX is operated locally! So, you really are independent!



If you make your document offline available, you can always continue editing offline! Unfortunately, you cannot compile your LaTeX sources offline. But, you can always view and download your latest locally compiled PDF!



Nobody likes to pull an all-nighter but it is inevitable. GLaTeX Extension offers a dark theme for your Google Docs interface. Come on and switch to dark mode for those inevitable all-nighters!



We all like LaTeX, right? Well, at least we like it! But it is sometimes hard to remember keywords for all those special symbols and environments. GLaTeX provides a symbol dictionary and an environment dictionary for you! Now, you can focus on your work rather than searching for LaTeX keywords!



Whenever you feel overwhelmed by the huge amount of boring text in front of you, click color syntax! We promise things will get easier and more fun once we color the syntax for you!



Include images and other TeX sources from your document! You are not bound to work only on a single document. You can use multiple TeX sources and compile them all from a main TeX file! You can also include any image in your TeX file! Just place these files (or the folders containing these files) and your main TeX file in the same folder in your Drive. GLaTeX recursively includes these files for you!



GLaTeX also offers a command-line tool! Download from here. Just type "python glatex.py -h" and you will see instructions to use it!

Instructions for GLaTeX Usage


Add-on


In order to use the GLaTeX Add-on, you have to;

  1. Open a Google Docs document
  2. If you have not already got GLaTeX Add-on from GSuite Marketplace, please get it by clicking
    Add-ons>Get Add-ons
  3. Click Add-ons>GLaTeX>Start GLaTeX so that it opens up the PDF viewer 

Now you have successfully added the add-on to your document.

Extension


To be able to have the full functionality, please make sure you have added GLaTeX Extension to your Google Chrome.

  1. Click the following link
  2. Click on Add to Chrome

Now the extension is added to your Google Chrome. The only interactive functionality provided by the extension is Dark mode. When you click on the extension button from Google Chrome, you can see a switch indicating the "Dark mode" which you can use to enable/disable dark mode on your Google Docs document.

Important notice: In order to use GLaTeX you also have to get the GLaTeX Add-on.


Local Compilation


In order to be able to use the local compilation feature of GLaTeX, there is one more step that is needed to be done: running a script that connects a local server to the GLaTeX Extension, so that you will be able to get full functionality even when you are offline.


The steps you must follow;

  1. Download the setup folder zip file that includes the mentioned script from here
  2. Extract the content of the zip file to any directory in your local filesystem 
  3. There will be a script named install_host, change its permissions so you can execute the script (ie. it is executable)
  4. Execute the script by double clicking (may not be available on linux) or running from the terminal (by opening a terminal in the same directory and calling the command "./install_host")
  5. Wait for the install_host script to finish its execution (This might take a while do not worry)
  6. After it is finished, you can check the availability of the local server from the add-on sidebar's top-right local compilation switch (if the local server is available it will switch to be enabled and disabled if otherwise)

Now you have the offline features as well as the online ones. The offline usage is identical to the online one in the sense that you both have all the capabilities GLaTeX offers and they are accessed the same way. The only difference is that now you have your own local server and you are independent of our back-end server.  


Errors


Although we provide a robust system that ensures full functionality, there might be unprecedented errors.


Generally when you encounter a problem;

  1. Make sure you are using Google Chrome's latest version and have followed the exact procedure defined in the instructions

or

  1. Close and restart Google Chrome, disable and re-enable the extension from "Chrome Extension", and reload the Google Docs page

or

  1. Try removing all of the components (extension, add-on, script) and start over from the beginning

Local Compilation Errors

In order to bypass the errors and continue using GLaTeX locally;

  1. Try to run the script.py inside the Setup folder that you have downloaded earlier, with python3.7

or

  1. Try GLaTeX Command-Line Tool.

Command-Line Tool


You can also use GLaTeX Command-Line Tool! To create a client_secret.json, follow steps below or just use this link as a shortcut.

  1. Go to https://console.cloud.google.com
  2. Create a new project
  3. Wait for this project to be created
  4. Click "VIEW" on the notification sidebar after project is created
  5. Go to https://console.cloud.google.com/apis
  6. Click "OAuth consent screen" on the left, check "External" and click "CREATE"
  7. Enter an application name
  8. Add "https://www.googleapis.com/auth/drive.readonly" to scopes manually
  9. Click Save
  10. Click "Credentials" on the left
  11. Click "Create Credentials -> OAuth client ID"
  12. Set application type as "Desktop App", enter a name, and click "CREATE"
  13. Click download icon under the corresponding entering of "OAuth 2.0 Client IDs"
  14. Enter "Google Drive API" to the search bar on top and click the first entery
  15. Click "ENABLE"
  16. Wait a few minutes for these action to propagate in Google systems

GLaTeX Team

Let's meet with the team!

Team

Sina Şehlaver

Developer
Team

Sena Terzi

Developer