3

When doing bigger projects in LaTeX, it's nice to write tikzpictures and graphs in a standalone document, and then include the generated PDF document as a picture.

When collaborating with others, it is nice to share the documents with an editor such as ShareLaTeX or overleaf.

What is then nice to do, when combining bigger projects with sharing, would be to use both together. When using ShareLaTeX one can easily change the compiled document to a standalone figure:

button in <code>ShareLaTeX</code> to change the document to compile

However, ShareLaTeX does not put the PDF file produced by this in the directory, so it is not avaliable to use as an input file ;-(

I do realize that I can just compile the document I want, and then download it: enter image description here

And reupload it to the directory, but to be honest this is just a big hassle.

So the question goes: Is there a better way to compile standalone figures in ShareLaTeX that get's you the PDF?

Thanks in advance!

  • 1
    You can try to redefine \jobname to get a pdf with a different name. See https://tex.stackexchange.com/questions/252317/can-one-safely-redefine-jobname. But I don't know if it works also for pdf and how permanent the pdf is. – Ulrike Fischer Feb 16 '18 at 12:25
  • I would really like it to just put a permanent pdf with the right name in the same folder as the compiled tex file (for example if you have a figure/ folder that you point to as your graphicspath – Thorbjørn E. K. Christensen Feb 16 '18 at 12:28
  • No my idea won't work, the change is fine for auxiliary files but too late to affect the pdf. And as you don't have --shell-escape on sharelatex there is imho no chance to rename the files. – Ulrike Fischer Feb 16 '18 at 12:35
  • That was sad :-( I actually send a message to one of the overleaf overlords, and he stated that this feature should be avaliable in the Overleaf 2 revamp of overleaf comming in may. But it's just sad that it's not here yet – Thorbjørn E. K. Christensen Feb 16 '18 at 12:40
  • thanks for looking into it though ;-) – Thorbjørn E. K. Christensen Feb 16 '18 at 12:40
  • Try including the standalone graphs using \includestandalone in the main file and use buildnew as option for the standalone package in the main file. This way the main file compiler run will call a sub-compiler run to produce the PDFs. If this doesn't work, then you might keep using the source directly (i.e. simply remove buildnew) – Martin Scharrer Mar 09 '18 at 08:02

0 Answers0