Load, Open and Compile any LaTeX File including Multiple Files or Zipped Projects in Overleaf Online LaTeX Editor

Includes PGF, TikZ, PSTricks, and platforms/distributions: Kile, TeXstudio, TeXmaker, TeXnicCenter, MiKTeX, LyX
Post Reply
User avatar
Eli
Senior Expert Member
Reactions: 183
Posts: 5334
Joined: 9 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#1

We can load a LaTeX code snippet attached in this forum posts into Overleaf by passing it (or its URI - Uniform Resource Identifier) to

Code: Select all

https://www.overleaf.com/docs?snip_uri=
using Overleaf API.

The most basic approach is:

Code: Select all

https://www.overleaf.com/docs?snip_uri=http://pathtoyourfile.tex
We may also link to a project instead of a single LaTeX snippet by passing the location of zipped folder(s) or even load separate multiple files.

Usage:

Load a single file

Code: Select all

https://www.overleaf.com/docs?snip_uri=http://pathtoyourfile.tex
Here, replace http://pathtoyourfile.tex with a path or url to the LaTeX file.

Load multiple files

We can upload multiple files using snip_uri[] array parameters with

Code: Select all

https://www.overleaf.com/docs?snip_uri[]=http://.../a.tex&snip_uri[]=http://.../b.tex
And use snip_name parameter to override the name of each uploaded file, like this:

Code: Select all

https://www.overleaf.com/docs?snip_uri[]=http://.../a.tex&
                              snip_uri[]=http://.../b.tex&
                              snip_name[]=file1.tex&
                              snip_name[]=file2.tex
Load zipped file/folder(s) (a project)

This is the most practical approach because LaTeX documents are usually produced from multiple files which may also be located in different folders with snippets including folders with images and so on. It is seamlessly convenient to zip the files/folders into a single project and archive them on this forum rather than uploading one by one. We illustrate how uploading a zipped project works in action:

Code: Select all

https://www.overleaf.com/docs?snip_uri=http://pathtoyourfile_zipped_files
Example 1:

We can load the zipped project located here as follows:

Code: Select all

https://www.overleaf.com/docs?snip_uri=https://www.tssfl.com/download/file.php?id=961
where anything after = sign is the path/link to the zipped project.

Load this project now and Open in Overleaf

Example 2:

We can again load and open in Overleaf the zipped project found here in a similar manner:

Code: Select all

https://www.overleaf.com/docs?snip_uri=https://www.tssfl.com/download/file.php?id=1161
Load this project and Open in Overleaf

You can also use this LaTeX online Editor or mathcha.io.
0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
Post Reply

Return to “LaTeX and MathJax”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests