Giter Site home page Giter Site logo

Comments (3)

martinGithub avatar martinGithub commented on June 11, 2024

i made a change , does it work now ?

from beamer2pptx.

 avatar commented on June 11, 2024

Partially. The 'header.tex' error is gone now, but now I get another error stating that it can't find 'equations/eqn1.png' (below is the output). I was able to fix the problem by replacing lines 131 and 142 with file=os.path.join('eqn%d.png'%ideqn), so the equation .png's are just placed in the working directory. That or I can just manually make a directory called 'equations' and leave the script as-is. Thanks for putting this code out on github, I'm sure its going to save me quite a bit of time in the future! --David

~/python/beamer2pptx$ python beamer2pptx.py
add slide First Slide (1 over 4)
add slide Slide with images (2 over 4)
add slide Equations (3 over 4)
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/MacPorts 2015_3) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./tmp_equation.tex
LaTeX2e <2015/01/01>
Babel <3.9l> and hyphenation patterns for 2 languages loaded.
(/opt/local/share/texmf-texlive/tex/latex/standalone/standalone.cls
Document Class: standalone 2012/09/15 v1.1b Class to compile TeX sub-files stan
dalone
(/opt/local/share/texmf-texlive/tex/generic/oberdiek/ifluatex.sty)
(/opt/local/share/texmf-texlive/tex/generic/oberdiek/ifpdf.sty)
(/opt/local/share/texmf-texlive/tex/generic/ifxetex/ifxetex.sty)
(/opt/local/share/texmf-texlive/tex/latex/xkeyval/xkeyval.sty
(/opt/local/share/texmf-texlive/tex/generic/xkeyval/xkeyval.tex
(/opt/local/share/texmf-texlive/tex/generic/xkeyval/xkvutils.tex
(/opt/local/share/texmf-texlive/tex/generic/xkeyval/keyval.tex))))
(/opt/local/share/texmf-texlive/tex/latex/standalone/standalone.cfg)
(/opt/local/share/texmf-texlive/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/opt/local/share/texmf-texlive/tex/latex/base/size10.clo))
(/opt/local/share/texmf-texlive/tex/latex/preview/preview.sty
(/opt/local/share/texmf-texlive/tex/latex/preview/prtightpage.def)))
No file tmp_equation.aux.
Preview: Fontsize 10pt
Preview: PDFoutput 1
Preview: Tightpage 0 0 0 0
1{/opt/local/var/db/texmf/fonts/map/pdftex/updmap/pdftex.map} )</opt/local/share/texmf-texlive/fonts/type1/public/amsfon
ts/cm/cmex10.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm
/cmmi10.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmmi
7.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmr10.pfb>
</opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmr7.pfb></opt/l
ocal/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmsy10.pfb>
Output written on tmp_equation.pdf (1 page, 45340 bytes).
Transcript written on tmp_equation.log.
convert: unable to open image equations/eqn1.png': No such file or directory @ error/blob.c/OpenBlob/2709. convert: WriteBlob Failedequations/eqn1.png' @ error/png.c/MagickPNGErrorHandler/1645.
Traceback (most recent call last):
File "beamer2pptx.py", line 148, in
pic = newslide.shapes.add_picture(file, left, top,height=height)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pptx/shapes/shapetree.py", line 321, in add_picture
image_part, rId = self.part.get_or_add_image_part(image_file)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pptx/parts/slide.py", line 40, in get_or_add_image_part
image_part = self._package.get_or_add_image_part(image_file)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pptx/package.py", line 49, in get_or_add_image_part
return self._image_parts.get_or_add_image_part(image_file)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pptx/package.py", line 119, in get_or_add_image_part
image = Image.from_file(image_file)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pptx/parts/image.py", line 166, in from_file
with open(image_file, 'rb') as f:
IOError: [Errno 2] No such file or directory: 'equations/eqn1.png'

from beamer2pptx.

martinGithub avatar martinGithub commented on June 11, 2024

i added two lines to create the "equations" directory if it doesn't exists

from beamer2pptx.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.