Help Center

Clear, practical guides for writing, compiling, and sharing LaTeX and Typst projects.

Add “Open in JointTex” to your site

Let readers of your tutorial, course or documentation open a LaTeX or Typst example as their own JointTex project in one click.

Add the button

The button is an ordinary HTML form that sends the example's code to JointTex. A page written for Overleaf's “Open in Overleaf” uses the same field names, so changing the form's address is enough.

How to do it

  1. Next to the example, put a form with method post and action https://jointtex.com/open.
  2. Put the code in a field named snip, or in encoded_snip if your page encodes it with encodeURIComponent.
  3. Add a submit button. Your site needs no script, key or account.
<form action="https://jointtex.com/open" method="post" target="_blank">
  <textarea name="snip" hidden>
\documentclass{article}
\begin{document}
Hello, JointTex!
\end{document}
  </textarea>
  <button type="submit">Open in JointTex</button>
</form>

Send several files

An example with a bibliography or a chapter of its own sends each file as a field of its own, in order.

How to do it

  1. Repeat snip[] (or encoded_snip[]) once for each file and give each a name in snip_name[], in the same order. An unnamed first file is main.tex.
  2. When there is more than one .tex file, name the one to compile in main_document. Otherwise JointTex takes the only .tex file, or the one with \documentclass.
  3. File names may include folders, such as chapters/intro.tex.
<form action="https://jointtex.com/open" method="post" target="_blank">
  <input type="hidden" name="encoded_snip[]" value="...main.tex, encoded with encodeURIComponent...">
  <input type="hidden" name="snip_name[]" value="main.tex">
  <input type="hidden" name="encoded_snip[]" value="...refs.bib, encoded...">
  <input type="hidden" name="snip_name[]" value="refs.bib">
  <input type="hidden" name="main_document" value="main.tex">
  <input type="hidden" name="engine" value="xelatex">
  <button type="submit">Open in JointTex</button>
</form>

Choose the engine

JointTex compiles with pdfLaTeX unless the form or the code says otherwise.

How to do it

  1. Set engine to pdflatex, xelatex, lualatex or latex. Overleaf's latex_dvipdf is read as latex.
  2. Without an engine field, a line such as % !TEX program = xelatex near the top of the main file decides.
  3. Without either, a main file with Chinese, Japanese or Korean text compiles with XeLaTeX, and any other with pdfLaTeX.
  4. A single file without \documentclass, such as a table on its own, is placed in a minimal document so that it compiles.

Send Typst code

The same form opens Typst examples as Typst projects. Overleaf has no such field, so this part is JointTex's own.

How to do it

  1. Set engine to typst. Unnamed files are then main.typ, snippet-2.typ and so on.
  2. Without an engine field, a file named with .typ is the main file when no .tex file is sent; main_document can name one too.
  3. Typst code is never wrapped in a document: any Typst text compiles as it is.
<form action="https://jointtex.com/open" method="post" target="_blank">
  <textarea name="snip" hidden>
= Hello, JointTex!
Typst sets this paragraph.
  </textarea>
  <input type="hidden" name="engine" value="typst">
  <button type="submit">Open in JointTex</button>
</form>

What your reader sees

The code never becomes a project by itself: the reader looks at it first.

How to do it

  1. The form takes the reader to a JointTex page that shows the files, the main file, the engine and your site's address.
  2. A signed-in reader names the project and chooses Create project. A new reader creates an account or signs in, and comes back to the same page.
  3. The project is the reader's own and private. Choosing Create project again, reloading or going back opens the same project, not a second copy.
  4. The code stays in the reader's browser for 7 days, not on JointTex's servers: nothing is stored there until the reader creates the project. In a private window, or a browser that keeps nothing for the site, it lasts only as long as the tab.

Limits

A submission is meant for a teaching example, not a whole thesis.

How to do it

  1. At most 20 files, 256 KB each and 512 KB in all, counted in UTF-8.
  2. Text only: attached files, and snip_uri or zip_uri (which ask for a file to be fetched from a URL), are refused.
  3. When the form sends something JointTex cannot open, the reader lands on a page that says why.
Questions, bugs, and ideasAsk the community, report a bug, or vote on feature requests on the JointTex forum.
Account, billing, or privacy?Email our support team about your account, subscription, or personal data.
[email protected]
JointTex

Browser compatibility

JointTex could not start

The application did not finish loading. Check your connection, then try again.

Supported versions

  • Chrome and Edge 88 or later
  • Firefox 84 or later
  • Safari and iOS Safari 14 or later
Reload