Comments (12)
It should return "{abc.def.fgh}.ijk"
, doesn't it do that?
from pylatex.
Will see here.
from pylatex.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{graphicx}
\title{4978}
\author{}
\date{}
\begin{document}
\begin{figure}[htbp]
\centering
\includegraphics[width=0.8\textwidth]{/home/eleve/vincent.lefoulon/mpf_env/lib/python3.4/site-packages/PyLaTeX-0.7.0-py3.4.egg/tmp/plottt}
\caption{Lactation 3}
\end{figure}
\begin{figure}[htbp]
\centering
\includegraphics[width=0.8\textwidth]{/home/eleve/vincent.lefoulon/mpf_env/lib/python3.4/site-packages/PyLaTeX-0.7.0-py3.4.egg/tmp/plotttt}
\caption{Lactation 2}
\end{figure}
\end{document}
works but
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{graphicx}
\title{4978}
\author{}
\date{}
\begin{document}
\begin{figure}[htbp]
\centering
\includegraphics[width=0.8\textwidth]{{/home/eleve/vincent.lefoulon/mpf_env/lib/python3.4/site-packages/PyLaTeX-0.7.0-py3.4}.egg/tmp/plottt}
\caption{Lactation 3}
\end{figure}
\begin{figure}[htbp]
\centering
\includegraphics[width=0.8\textwidth]{{/home/eleve/vincent.lefoulon/mpf_env/lib/python3.4/site-packages/PyLaTeX-0.7.0-py3.4}.egg/tmp/plotttt}
\caption{Lactation 2}
\end{figure}
\end{document}
displays ! LaTeX Error: File '{/home/eleve/vincent.lefoulon/mpf_env/lib/python3.4/site-p ackages/PyLaTeX-0.7.0-py3.4}.egg/tmp/plottt' not found.
.
from pylatex.
Damn paths...
from pylatex.
Why is it necessary to use fix_filename
?
from pylatex.
You should see the comment in the function: https://github.com/JelteF/PyLaTeX/blob/master/pylatex/utils.py#L64
I'm not sure when it breaks with paths maybe only the final file should have the curly braces fix if there is more than 1 dot in the filename.
from pylatex.
I had the same problem running the plt.py example:
> python3.4 ./plt.py
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./matplolib_pdf.tex
LaTeX2e <2014/05/01>
Babel <3.9l> and hyphenation patterns for 79 languages loaded.
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/size10.clo))
[...]
! LaTeX Error: File `{/opt/local/Library/Frameworks/Python.framework/Versions/3
.4/lib/python3}.4/site-packages/tmp/plot' not found.
I had to open the generated latex file, remove the inner curly braces from the include command and then it works perfectly through pdflatex.
from pylatex.
An easy fix should be to just give the file an extension (like pdf or png or whatever it should be, I think pdf)
At the mometn it thinks .4/site-packages/tmp/plot
is the extension. However, this should be fixed in PyLaTeX in a way that this error cannot occur.
from pylatex.
I just pushed some fixes and am waiting for travis to give the okay so I can do a bug fix release afterwards.
from pylatex.
@JelteF Many thanks! 👏
from pylatex.
Released
from pylatex.
@JelteF Working properly now, thanks!
from pylatex.
Related Issues (20)
- Compiler not found HOT 1
- Multirow / Mulitcolumn failure
- [Question] How can I just compile an existing TeX document? HOT 2
- Can we have an option to disable utils.fix_filename? HOT 1
- 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
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.