martingithub / beamer2pptx Goto Github PK
View Code? Open in Web Editor NEWpython script to convert beamer (latex) presentations to PowerPoint presentations
python script to convert beamer (latex) presentations to PowerPoint presentations
I'm attempting to run the script using the 'example.tex' file, but it errors out when pdflatex attempts to convert the equations. I've tried this on 2 OS's (OS X and Fedora 20), and I get the same error. Any idea why? Am I missing a TeXLive dependency? Full error output is below.
[username@localhost beamer2pptx-master]$ 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.1415926-2.6-1.40.14 (TeX Live 2014/dev)
restricted \write18 enabled.
entering extended mode
(./tmp_equation.tex
LaTeX2e <2011/06/27>
Babel <3.9h> and hyphenation patterns for 2 languages loaded.
(/usr/share/texlive/texmf-dist/tex/latex/standalone/standalone.cls
Document Class: standalone 2012/09/15 v1.1b Class to compile TeX sub-files stan
dalone
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/share/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/keyval.tex)))
(/usr/share/texlive/texmf-dist/tex/latex/standalone/standalone.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/preview/preview.sty
(/usr/share/texlive/texmf-dist/tex/latex/preview/prtightpage.def)))
! LaTeX Error: File `header.tex' not found.
Type X to quit or to proceed,
or enter new name. (Default extension: tex)
Enter file name:
Please update script for Python3 as Python2.7 is already EOL.
Using 2to3 produces a seemingly correct version of the script. Changes seem trivial, though I didn't scrutinize each one very closely. I would make a PR, but I get the feeling that isn't the reason this hasn't been done before, so I thought I would check.
Hello, don't know what could be...
WARNING: unrecognized command/environment: PassOptionsToPackage
.......
WARNING: unrecognized command/environment: @FirstOfTwo
WARNING: unrecognized command/environment: pdfobj
WARNING: unrecognized command/environment: pdfrefobj
WARNING: unrecognized command/environment: pdflastobj
.... )
( /usr/local/lib/python2.7/dist-packages/plasTeX/Packages/hyperref.pyc )..
WARNING: unrecognized command/environment: graphicspath
WARNING: unrecognized command/environment: hypersetup
..
ERROR: Error while reading argument "self" of title in on line 26
('ascii' codec can't decode byte 0xc3 in position 0: ordinal not in
range(128))
ERROR: Error while expanding "title" in on line 26 ('ascii' codec
can't decode byte 0xc3 in position 0: ordinal not in range(128))
ERROR: An error occurred while building the document object in on
line 26 ('ascii' codec can't decode byte 0xc3 in position 0: ordinal not in
range(128))
could not parse the latex fil eusing plasTex
Traceback (most recent call last):
File "beamer2pptx.py", line 75, in
document = tex.parse()
File "/usr/local/lib/python2.7/dist-packages/plasTeX/TeX.py", line 412, in parse
for item in tokens:
File "/usr/local/lib/python2.7/dist-packages/plasTeX/TeX.py", line 46, in next
return self._next()
File "/usr/local/lib/python2.7/dist-packages/plasTeX/TeX.py", line 321, in iter
tokens = obj.invoke(self)
File "/usr/local/lib/python2.7/dist-packages/plasTeX/Base/LaTeX/Packages.py", line 160, in invoke
Command.invoke(self, tex)
File "/usr/local/lib/python2.7/dist-packages/plasTeX/init.py", line 366, in invoke
self.parse(tex)
File "/usr/local/lib/python2.7/dist-packages/plasTeX/init.py", line 476, in parse
**arg.options)
File "/usr/local/lib/python2.7/dist-packages/plasTeX/TeX.py", line 722, in readArgumentAndSource
toks, source = self.readToken(expanded, parentNode=parentNode)
File "/usr/local/lib/python2.7/dist-packages/plasTeX/TeX.py", line 784, in readToken
for t in tokens:
File "/usr/local/lib/python2.7/dist-packages/plasTeX/TeX.py", line 244, in itertokens
t = inputs[-1][-1].next()
File "/usr/local/lib/python2.7/dist-packages/plasTeX/Tokenizer.py", line 368, in iter
token = next()
File "/usr/local/lib/python2.7/dist-packages/plasTeX/Tokenizer.py", line 272, in iterchars
code = whichCode(token)
File "/usr/local/lib/python2.7/dist-packages/plasTeX/Context.py", line 716, in whichCode
if char in c[Token.CC_LETTER]:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)
Hello
I had to install "requests" and "plasTeX" with pip
;)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.