Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>CoTeXNew to Visual Studio Code? Get it now.
CoTeX

CoTeX

alex6095

|
85 installs
| (0) | Free
Overleaf sync, LaTeX compilation, and PDF review in VS Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CoTeX

CoTeX on Visual Studio Marketplace CoTeX Remote Pack on Visual Studio Marketplace

Edit and sync Overleaf projects locally or over Remote-SSH. Compile LaTeX and review the resulting PDFs in VS Code.

Get started

  1. Open CoTeX in the Activity Bar, add your Overleaf server, and choose Continue in browser. For Remote-SSH, install CoTeX Remote Pack in your local desktop VS Code.
  2. Choose Select Project Folder Locally on your project. Browse to a folder on the workspace host or create one in the picker.
  3. Edit files in VS Code and Overleaf. If both sides change a file and CoTeX cannot safely merge the changes, open the comparison to resolve the conflict.

Upgrading to CoTeX 0.17

CoTeX starts with fresh settings, browser profiles, server sign-ins, and local replica mappings. Keep any unsynced edits from the old version before upgrading. Close windows still syncing a previous replica, install both updates if using Remote-SSH, and run Developer: Reload Window in each affected VS Code window. If the Activity Bar still shows Semantic Researcher Overleaf, check the CoTeX version under SSH: Installed in the Extensions view, then reload the SSH window.

Sign in again and use Select Project Folder Locally with a new empty folder. CoTeX detects folders with previous replica metadata and asks you to select a fresh folder. Old local project files can serve as a backup of unsynced edits. Apply those edits to the new copy after checking it against Overleaf.

Custom settings and keybindings now use cotex.*. The desktop companion uses cotex-remote-pack.*.

Features

  • Keep a local or SSH copy of an Overleaf project. Browse to a folder or create one directly in the folder picker.
  • Compare a local draft with concurrent edits from Overleaf. Resolve the conflict to resume upload and compilation.
  • Use CoTeX as the default PDF viewer, with page-by-page text search, drawing and text annotations, and export to a separate PDF. Press Ctrl/Cmd+S on a generated project PDF to compile. The SSH replica contains the output at .output/output.pdf.

[!NOTE] Continue in browser is the recommended default, especially for https://www.overleaf.com, SSO, two-factor authentication, or captcha-enabled servers. It opens a dedicated extension-owned desktop-browser profile. Choose Remember sign-in to keep a fresh profile after the workspace verifies the login. Use once opens a temporary profile. Each profile is separate from your everyday browser profile.

  • Login Server, Open Projects and Edit Files

  • On-the-fly Compiling and Previewing

    Ctrl+Alt+B to compile, Ctrl+Alt+V preview.

  • SyncTeX and Reverse SyncTeX

    Ctrl+Alt+J to jump to PDF. Double click on PDF to jump to source code

  • Chat with Collaborators

  • Open Project Locally, Compile/Preview with LaTeX-Workshop

    Use Open Project Locally ... to create a replica under a parent folder, or Select Project Folder Locally ... to use an exact folder as the replica root while keeping the current VS Code window and activating local Overleaf features against that folder. Browse the directories on the workspace host, choose New Folder… to create a child at the current location, then choose Select This Folder.

    In the project list, hover over a project to use the default inline actions: open in the current window, open in a new window, or select an exact local folder for that project. The folder selection action is placed at the right edge for quick local-replica setup.

    Files written directly on disk, including unopened source files and images written by coding agents, synchronize to Overleaf. Overleaf collaborator changes synchronize back to the selected folder. The replica records a durable baseline and reports a conflict when both sides changed and a safe merge cannot be proven.

    Local Replica sync resumes when the extension is activated by VS Code startup, the CoTeX sidebar, a CoTeX command, an Overleaf virtual workspace, or a workspace that contains .cotex/settings.json. Startup activation restores a previously selected external replica from the current window's workspace state when its marker file still exists; otherwise no Overleaf project connection or replica sync is started.

    [!IMPORTANT] One VS Code window has one active Local Replica. Selecting a different project first confirms and disconnects the current live replica without deleting its local files, then activates the new project with isolated project state. Use a separate VS Code window when you need two replicas live at the same time.

How to Login in Browser

Choose Continue in browser from the login method list. The extension opens a Chrome, Edge, or Chromium window and navigates to the Overleaf project page, which shows the login page when needed. Sign in there as usual, including Google, SSO, or two-factor authentication. Once Overleaf reaches the project page, the extension reads the browser session cookies and completes the same cookie login flow automatically.

Choose Use saved session to reopen a previous dedicated login, Remember a new session to start fresh, or Use once to discard the temporary profile after login. Failed fresh attempts are removed. Successful remembered profiles retain the Overleaf and Google/SSO sessions used inside them until cleared. On macOS, selecting Arc as the login executable lets you choose an installed Chrome, Edge, or Chromium browser for the dedicated login window.

To forget a remembered profile, run CoTeX: Forget Browser Session from the Command Palette and select the server. In Remote windows, this forwards to the local Remote Pack; you can also run CoTeX Remote Pack: Forget Browser Session locally. Close all dedicated login browsers for that server in every VS Code window before clearing. Clearing removes the browser's remembered Overleaf/Google/SSO sessions and resets the consent choice; it does not log out the extension's existing API session or your normal browser. Use Logout separately for the extension session.

Profiles are isolated by server URL (including self-hosted installation prefix), extension storage location, and browser executable. Changing the browser executable or switching between local and Remote Pack storage can require signing in once again. Profile directories use restrictive POSIX permissions where supported; on Windows they inherit the VS Code storage directory's ACLs. This is browser-profile storage, not a promise that all browser session data is encrypted. Login/clear operations in the same extension host are guarded; Chromium supplies cross-process profile locking, and launch failures never silently replace or delete a remembered profile. Clearing requires you to close browsers in other VS Code windows first.

Login keeps Chromium's sandbox enabled and does not request Playwright's basic-password-store or mock-keychain defaults. Available protection still depends on the browser and OS; Linux needs a working configured keyring. If a root/headless Linux environment cannot run the sandboxed browser, use the local Remote Pack on a desktop rather than disabling the sandbox.

In a local VS Code window, no extra extension is needed. In a VS Code Remote window, install CoTeX Remote Pack locally so the remote extension can ask your desktop VS Code to open the local browser. For VSIX installs, install the main extension in the remote window and the Remote Pack VSIX in the local desktop VS Code. If the browser is not found automatically, set cotex.auth.browserPath for the main extension or cotex-remote-pack.browserPath for the Remote Pack.

How to Login with Cookies

In an already logged-in browser (Firefox for example):

Choose Use session cookies to reuse that session manually without logging in again. Cookie input is masked, but the cookie is an account credential: copy only the Overleaf request header for the configured server, never Google cookies, and never share it in chat, logs, or screenshots.

  1. Open "Developer Tools" (usually by pressing F12) and switch to the "Network" tab;

    Then, navigate to the Overleaf main page (e.g., https://www.overleaf.com) in the address bar.

  2. Filter the listed items with /project and select the exact match.

  3. Check the "Cookie" under "Request Headers" of the selected item and copy its value to login.

    The format of the Cookie value would be like: overleaf_session2=... or sharelatex.sid=...

Compatibility

The following Overleaf (ShareLatex) Community Edition docker images provided on Docker Hub have been tested and verified to be compatible with this extension.

  • [x] sharelatex/sharelatex:5.0.4 (verified by @Mingbo-Lee)

  • [x] sharelatex/sharelatex:4.2.4

  • [x] sharelatex/sharelatex:4.1 (verified by @iamhyc)

  • [x] sharelatex/sharelatex:3.5 (verified by @iamhyc)

  • [ ] sharelatex/sharelatex:3.4

  • [ ] sharelatex/sharelatex:3.3

  • [ ] sharelatex/sharelatex:3.2

  • [ ] sharelatex/sharelatex:3.1

  • [ ] sharelatex/sharelatex:3.0

Source and license

CoTeX is based on Overleaf Workshop and is distributed under the GNU Affero General Public License v3.0.

The published 0.17.0 VSIX includes its source at extension/cotex-source.tar.gz. See CONTRIBUTING.md in the source tree for build instructions.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft