diff --git a/src/beamer_slider.egg-info/PKG-INFO b/src/beamer_slider.egg-info/PKG-INFO index 094d8476809407722da8c08d3e2d303c1c6352a4..67c34480abde51792d15cf50172dc1d3cb1c21c1 100644 --- a/src/beamer_slider.egg-info/PKG-INFO +++ b/src/beamer_slider.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: beamer-slider -Version: 0.1.26.6 +Version: 0.1.26.8 Summary: Software to create inkscape overlays in Beamer Home-page: https://lab.compute.dtu.dk/tuhe/slider Author: Tue Herlau @@ -13,6 +13,18 @@ Classifier: Operating System :: OS Independent Requires-Python: >=3.8 Description-Content-Type: text/markdown License-File: LICENSE +Requires-Dist: Jinja2 +Requires-Dist: numpy +Requires-Dist: chardet +Requires-Dist: scipy +Requires-Dist: seaborn +Requires-Dist: lxml +Requires-Dist: matplotlib +Requires-Dist: pylatexenc +Requires-Dist: beautifulsoup4 +Requires-Dist: PyPDF2 +Requires-Dist: clize +Requires-Dist: click # Slider diff --git a/src/slider/convert.py b/src/slider/convert.py index dbeae927398ddeee034c5524615a0dc3b46255cf..4292d1ec262fd6d751edfa27042570e24a6d7776 100644 --- a/src/slider/convert.py +++ b/src/slider/convert.py @@ -56,7 +56,7 @@ def pdf2png(fin, fout=None, scale_to=None, page_to_convert=None, verbose=False): fout = fin[:-4] + ".png" fout = fout[:-4] - cmd = f"pdftocairo -png -singlefile {fin} {fout}" + cmd = f"pdftocairo -png -singlefile '{fin}' '{fout}'" if page_to_convert is not None: cmd += f" -f {page_to_convert} -l {page_to_convert}" diff --git a/src/slider/latexutils.py b/src/slider/latexutils.py index 19238ed35c1f0dd747a8a97b9c5551ea0f0ca39b..bfc89c99919cfaf9b0783ebff5c40bc5f0874bdf 100644 --- a/src/slider/latexutils.py +++ b/src/slider/latexutils.py @@ -5,17 +5,26 @@ import subprocess import glob import asyncio -def latexmk(texfile, pdf_out=None,shell=True,cleanup=False, Linux=False): +def latexmk(texfile,pdf_out=None,shell=True,cleanup=False, Linux=False): cdir = os.getcwd() texfile = os.path.abspath(texfile) dname = os.path.dirname(texfile) os.chdir(dname) texfile = os.path.basename(texfile) CMD = "latexmk -f -g -pdf -shell-escape -interaction=nonstopmode " + texfile - print("Running LaTeX command>> " + CMD) - - s = subprocess.check_output(CMD, shell=True) - # s = subprocess.check_output(CMD, shell=True) # try to run it twice to compile bibtex + print("[slider] Running LaTeX command> " + CMD) + try: + s = subprocess.check_output(CMD, shell=True) + except Exception as e: + print("[slider] " + "-"*50) + print("[slider] Latexmk encountered problem in:", CMD) + print("[slider] Log file is") + with open( f"{texfile[:-4]}.log", 'r') as f: + log = f.read() + print(log) + print("[slider] " + "-"*50) + print("[slider] END OF LOG") + raise e if pdf_out: shutil.copyfile(texfile[:-4]+".pdf", pdf_out) diff --git a/src/slider/version.py b/src/slider/version.py index dfb4a49dc0b8e621c72663a4d5849474e0543a0d..5dc5ee60ced8338c8a7dc4ab5560b174e31c7f48 100644 --- a/src/slider/version.py +++ b/src/slider/version.py @@ -1 +1 @@ -__version__ = "0.1.26.6" \ No newline at end of file +__version__ = "0.1.26.8" \ No newline at end of file