Comments (9)
I've changed the file deletion in generate_pdf() to this:
if clean:
for ext in ['.aux', '.log', '.out', '.tex']:
try:
os.remove(filename + ext)
except:
pass
which works great on windows. The exception handling should be done better (Log? Or Print?), but for a quick fix this is enough.
from pylatex.
Looks good, I don't think the exception should be a bit more specific. I'm not sure what error is raised when the file is not there, possibly IOerror or something, that way an unexpected exception is still recognized. But the handling itself is good, when the file is not there it also doesn't have to be removed.
If you can make a pull request I will merge it.
One more question, does the compiling really work on linux. Since the code uses the pdflatex command, or do you supply a different command for windows?
from pylatex.
There is a whole latex for windows including pdflatex:
http://miktex.org/download
from pylatex.
It should be fixed by by af96fc00
Could one of you confirm that it now works on Windows?
from pylatex.
Oh, it seems I'm using a python 3 specific error. I will fix that, but for now could you guys check if it works with Python 3?
from pylatex.
af96fc00
I can confirm it works.
(Windows 8.1, Pyhton 3.4.1)
from pylatex.
Great, then I will close the issue. Btw I have made a workaround for the error, so Python 2 should work again as well.
from pylatex.
Can this issue be reopened? This bug exists again, see the comment I made for commit f6ffaa4
from pylatex.
I missed those when merging. It should be fixed now.
from pylatex.
Related Issues (20)
- Add sympy support
- Texify to tableofcontents HOT 1
- fontenc and inputenc should not be included
- Store the generated PDF in byteIO
- How to properly add math and refs to captions
- No LaTex compiler was found (Windows 10) HOT 8
- How to to compile .tex file? HOT 2
- File not found for files with dots in relative or absolute path to file
- How to Specify LaTeX Compiler
- "PermissionError: [WinError 5] Access is denied" with document.generate_pdf()
- Adding pandas dataframes to pylatex sections breaks with pandas 2.0
- Negative values in TextBlock
- Two-Column document HOT 1
- Question: Tiny text size HOT 1
- Python 3.12 install fails HOT 2
- Missing Options Paramter in Section classes
- Proposal for `add_item`
- how add txt file content to tex file ?
- cannot use bytes as filename
- Research
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pylatex.