I have a folder which contains one latex file, few images(in .png as well as .pdf format). I want to convert this whole folder into a pdf file similar to what overleaf does. I want to use a terminal command as I have to do this for thousands of file. I want to run these commands in python. I used "pdflatex arxiv.tex" after going into that folder(from terminal) and it works fine. But when I run the command "pdflatex ~/path/to/folder/arxiv.tex" then it shows that the error that other files(.png, .bbl) are not present?
Asked
Active
Viewed 263 times
0
~/path/to/folderand callpdflatex arxiv.texeverything is fine, but if you are in, say~and callpdflatex ~/path/to/folder/arxiv.texthe files are not found. You can work around this by settingTEXINPUTS(https://tex.stackexchange.com/q/93712/35864) or the like. If you have to run additional tools (BibTeX, makeindex, ...) you may have to do a similar thing with those as well. That's why I would just try to run all tools from within the right folder and be done with it. ... – moewe Jun 17 '19 at 05:37pdflatex ~/path/to/folder/arxiv.texand notcd ~/path/to/folder/andpdflatex arxiv.tex? Note that it may or may not be enough to runpdflatexjust once (especially if things changed in the file since the last run), in cases like this automatic tools likelatexmkcan be useful. – moewe Jun 17 '19 at 05:38